Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
rouzwelt committed Feb 12, 2024
1 parent 3066af0 commit c12aa89
Show file tree
Hide file tree
Showing 20 changed files with 16,621 additions and 3,583 deletions.
556 changes: 299 additions & 257 deletions client/src/browserClient.ts

Large diffs are not rendered by default.

550 changes: 299 additions & 251 deletions client/src/nodeClient.ts

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@
"command": "rainlang.restart",
"title": "Restart Rain Language Server"
},
{
"command": "rainlang.compile.all",
"title": "Rainlang Compile"
},
{
"command": "rainlang.compile",
"title": "Rainlang Compile Current"
Expand All @@ -65,10 +61,6 @@
{
"when": "resourceLangId == rainlang",
"command": "rainlang.compile"
},
{
"when": "resourceLangId == rainlang",
"command": "rainlang.compile.all"
}
]
},
Expand Down
149 changes: 2 additions & 147 deletions rainconfig.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,163 +11,18 @@
"title": "File/Folder Directory"
}
},
"src": {
"type": "array",
"title": "Source List (Compilation Mappings)",
"description": "Specifies list of .rain source files mappings for compilation, where specified .rain input files will get compiled and results written into output json file.",
"minItems": 1,
"items": {
"type": "object",
"title": "Mapping",
"description": "A single mappping item, all relative paths must be relative to current workspace root directory.",
"required": ["input", "output", "entrypoints"],
"additionalProperties": false,
"properties": {
"input": {
"type": "string",
"title": "Input File Path",
"description": "Path to a .rain file as source to read from.",
"pattern": ".rain$"
},
"output": {
"type": "string",
"title": "Output File Path",
"description": "Path to a .json file as output to write results into."
},
"entrypoints": {
"type": "array",
"title": "Entrypoints",
"description": "Array of entrypoints to compile.",
"items": {
"type": "string",
"title": "Entrypoint",
"pattern": "^[a-z][0-9a-z-]*$"
}
}
}
},
"examples": [
[{
"input": "./path/to/input.rain",
"output": "./path/to/output.json",
"entrypoints": ["main", "fn"]
}]
]
},
"subgraphs": {
"description": "Specifies additional subgraph endpoints to search for a meta for a given hash, default rain subgraphs are always included.",
"markdownDescription": "Specifies additional subgraph endpoints to search for a meta for a given hash, [default rain subgraphs](https://github.com/rainprotocol/meta/blob/master/src/rainSubgraphs.ts) are always included.",
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"pattern": "^https:|^wss:",
"minItems": 1
"pattern": "^https:|^wss:"
},
"examples": [
["https://subgraph1-endpoint-url", "https://subgraph2-endpoint-url"]
]
},
"meta": {
"title": "Local Meta",
"description": "Spcifies local meta files paths or an object with path and hash (this will result in hash explicit validation) as binary or utf8 encoded hex strings starting with 0x.",
"type": "object",
"minProperties": 1,
"properties": {
"binary": {
"title": "Local Binary Meta",
"description": "List of binary meta files paths (or object of path and hash).",
"type": "array",
"minItems": 1,
"items": {
"anyOf": [
{
"type": "string",
"description": "The binary meta path."
},
{
"type": "object",
"description": "Binary meta path with hash",
"properties": {
"path": {
"type": "string",
"description": "The path of the binary meta file."
},
"hash" : {
"type": "string",
"description": "The hash of the meta, will be explicitly checked against the data"
}
},
"required": ["path", "hash"]
}
]
},
"examples": [
[
"path/to/binary-meta",
{
"path": "path/to/another-binary-meta",
"hash": "0x1234567890abcdef..."
}
]
]
},
"hex": {
"title": "Local Hex String Meta",
"description": "List of utf8 encoded hex string starting with 0x meta files paths (or object of path and hash).",
"type": "array",
"minItems": 1,
"items": {
"anyOf": [
{
"type": "string",
"description": "The hex meta path,"
},
{
"type": "object",
"description": "Hex meta path with hash",
"properties": {
"path": {
"type": "string",
"description": "The path of the hex meta file."
},
"hash" : {
"type": "string",
"description": "The hash of the meta, will be explicitly checked against the data."
}
},
"required": ["path", "hash"]
}
]
},
"examples": [
[
"path/to/hex-meta",
{
"path": "path/to/another-hex-meta",
"hash": "0x1234567890abcdef..."
}
]
]
}
},
"examples": [
{
"binary": [
"path/to/binary-meta",
{
"path": "path/to/another-binary-meta",
"hash": "0x1234567890abcdef..."
}
],
"hex": [
"path/to/binary-meta",
{
"path": "path/to/another-binary-meta",
"hash": "0x1234567890abcdef..."
}
]
}
]
}
}
}
Loading

0 comments on commit c12aa89

Please sign in to comment.