@isograph/compiler 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/linux-arm64/isograph_cli +0 -0
- package/artifacts/linux-x64/isograph_cli +0 -0
- package/artifacts/macos-arm64/isograph_cli +0 -0
- package/artifacts/macos-x64/isograph_cli +0 -0
- package/artifacts/win-x64/isograph_cli.exe +0 -0
- package/index.js +1 -2
- package/isograph-config-schema.json +125 -0
- package/package.json +1 -1
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
package/index.js
CHANGED
@@ -12,8 +12,7 @@ if (process.platform === 'darwin' && process.arch === 'x64') {
|
|
12
12
|
} else if (process.platform === 'linux' && process.arch === 'arm64') {
|
13
13
|
binary = path.join(__dirname, 'artifacts', 'linux-arm64', 'isograph_cli');
|
14
14
|
} else if (process.platform === 'win32' && process.arch === 'x64') {
|
15
|
-
|
16
|
-
// binary = path.join(__dirname, "artifacts", "win-x64", "isograph_cli.exe");
|
15
|
+
binary = path.join(__dirname, 'artifacts', 'win-x64', 'isograph_cli.exe');
|
17
16
|
} else {
|
18
17
|
throw new Error('Platform not supported yet');
|
19
18
|
// binary = null;
|
@@ -0,0 +1,125 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
3
|
+
"title": "IsographProjectConfig",
|
4
|
+
"description": "This struct is deserialized from an isograph.config.json file.",
|
5
|
+
"type": "object",
|
6
|
+
"required": [
|
7
|
+
"project_root",
|
8
|
+
"schema"
|
9
|
+
],
|
10
|
+
"properties": {
|
11
|
+
"$schema": {
|
12
|
+
"description": "The user may hard-code the JSON Schema for their version of the config.",
|
13
|
+
"type": [
|
14
|
+
"string",
|
15
|
+
"null"
|
16
|
+
]
|
17
|
+
},
|
18
|
+
"artifact_directory": {
|
19
|
+
"description": "The relative path to the folder where the compiler should create artifacts Defaults to the project_root directory.",
|
20
|
+
"type": [
|
21
|
+
"string",
|
22
|
+
"null"
|
23
|
+
]
|
24
|
+
},
|
25
|
+
"options": {
|
26
|
+
"description": "Various options of less importance",
|
27
|
+
"allOf": [
|
28
|
+
{
|
29
|
+
"$ref": "#/definitions/ConfigFileOptions"
|
30
|
+
}
|
31
|
+
]
|
32
|
+
},
|
33
|
+
"project_root": {
|
34
|
+
"description": "The relative path to the folder where the compiler should look for Isograph literals",
|
35
|
+
"type": "string"
|
36
|
+
},
|
37
|
+
"schema": {
|
38
|
+
"description": "The relative path to the GraphQL schema",
|
39
|
+
"type": "string"
|
40
|
+
},
|
41
|
+
"schema_extensions": {
|
42
|
+
"description": "The relative path to schema extensions",
|
43
|
+
"default": [],
|
44
|
+
"type": "array",
|
45
|
+
"items": {
|
46
|
+
"type": "string"
|
47
|
+
}
|
48
|
+
}
|
49
|
+
},
|
50
|
+
"additionalProperties": false,
|
51
|
+
"definitions": {
|
52
|
+
"ConfigFileJavascriptModule": {
|
53
|
+
"type": "string",
|
54
|
+
"enum": [
|
55
|
+
"commonjs",
|
56
|
+
"esmodule"
|
57
|
+
]
|
58
|
+
},
|
59
|
+
"ConfigFileOptionalValidationLevel": {
|
60
|
+
"oneOf": [
|
61
|
+
{
|
62
|
+
"description": "If this validation error is encountered, it will be ignored",
|
63
|
+
"type": "string",
|
64
|
+
"enum": [
|
65
|
+
"ignore"
|
66
|
+
]
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"description": "If this validation error is encountered, a warning will be issued",
|
70
|
+
"type": "string",
|
71
|
+
"enum": [
|
72
|
+
"warn"
|
73
|
+
]
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"description": "If this validation error is encountered, the compilation will fail",
|
77
|
+
"type": "string",
|
78
|
+
"enum": [
|
79
|
+
"error"
|
80
|
+
]
|
81
|
+
}
|
82
|
+
]
|
83
|
+
},
|
84
|
+
"ConfigFileOptions": {
|
85
|
+
"type": "object",
|
86
|
+
"properties": {
|
87
|
+
"generated_file_header": {
|
88
|
+
"description": "A string to generate, in a comment, at the top of every generated file.",
|
89
|
+
"default": null,
|
90
|
+
"type": [
|
91
|
+
"string",
|
92
|
+
"null"
|
93
|
+
]
|
94
|
+
},
|
95
|
+
"include_file_extensions_in_import_statements": {
|
96
|
+
"description": "Should the compiler include file extensions in import statements in generated files? e.g. should it import ./param_type or ./param_type.ts?",
|
97
|
+
"default": false,
|
98
|
+
"type": "boolean"
|
99
|
+
},
|
100
|
+
"module": {
|
101
|
+
"description": "The babel plugin transforms isograph literals containing entrypoints into imports or requires of the generated entrypoint.ts file. Should it generate require calls or esmodule imports?",
|
102
|
+
"allOf": [
|
103
|
+
{
|
104
|
+
"$ref": "#/definitions/ConfigFileJavascriptModule"
|
105
|
+
}
|
106
|
+
]
|
107
|
+
},
|
108
|
+
"no_babel_transform": {
|
109
|
+
"description": "Set this to true if you don't have the babel transform enabled.",
|
110
|
+
"default": false,
|
111
|
+
"type": "boolean"
|
112
|
+
},
|
113
|
+
"on_invalid_id_type": {
|
114
|
+
"description": "What the compiler should do if it encounters an id field whose type is not ID! or ID.",
|
115
|
+
"allOf": [
|
116
|
+
{
|
117
|
+
"$ref": "#/definitions/ConfigFileOptionalValidationLevel"
|
118
|
+
}
|
119
|
+
]
|
120
|
+
}
|
121
|
+
},
|
122
|
+
"additionalProperties": false
|
123
|
+
}
|
124
|
+
}
|
125
|
+
}
|