eddev 0.1.26 → 0.1.30
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/blocks/installGutenbergHooks.js +1 -0
- package/build/codegen-worker-script.js +4 -4
- package/build/create-codegen-worker.d.ts +1 -1
- package/build/create-codegen-worker.js +1 -1
- package/build/create-webpack-worker.js +2 -2
- package/build/get-webpack-config.js +26 -27
- package/build/graphql-codegen/graphql-codegen-files.js +3 -3
- package/build/graphql-codegen/graphql-codegen-no-duplicates.js +1 -1
- package/build/graphql-codegen/graphql-codegen-queries.js +17 -17
- package/build/reporter.js +1 -1
- package/build/workers/codegen-worker-script.d.ts +5 -0
- package/build/workers/codegen-worker-script.js +543 -0
- package/build/workers/webpack-worker-script.d.ts +2 -0
- package/build/workers/webpack-worker-script.js +160 -0
- package/cli/cli.js +3 -28
- package/cli/display/components/BundleDisplay.js +1 -1
- package/cli/display/components/CodegenDisplay.js +2 -2
- package/cli/generate.js +1 -15
- package/components/BrowserRouter.js +1 -1
- package/components/InlinePage.js +1 -1
- package/components/index.d.ts +0 -1
- package/components/index.js +0 -1
- package/components/routing.d.ts +3 -1
- package/components/routing.js +4 -5
- package/entry/Root.js +4 -4
- package/hooks/queryUtils.js +2 -2
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +5 -7
- package/routing/index.d.ts +1 -0
- package/routing/index.js +13 -0
- package/routing/routing.d.ts +45 -0
- package/routing/routing.js +373 -0
- package/style/createStitches.d.ts +5 -4
- package/style/createStitches.js +9 -9
- package/style/index.d.ts +0 -1
- package/style/index.js +0 -1
- package/utils/promptIfRepoNameIncorrect.js +1 -1
- package/utils/remoteProps.d.ts +2 -2
- package/build/dev/codegen-state.d.ts +0 -6
- package/build/dev/codegen-state.js +0 -2
- package/build/dev/compiler-state.d.ts +0 -11
- package/build/dev/compiler-state.js +0 -2
- package/build/getWebpackConfig.d.ts +0 -11
- package/build/getWebpackConfig.js +0 -428
- package/cli/build.dev2.d.ts +0 -5
- package/cli/build.dev2.js +0 -88
- package/cli/dev/codegen-state.d.ts +0 -6
- package/cli/dev/codegen-state.js +0 -2
- package/cli/dev/compiler-state.d.ts +0 -11
- package/cli/dev/compiler-state.js +0 -2
- package/cli/dev/dev-command.d.ts +0 -5
- package/cli/dev/dev-command.js +0 -56
- package/cli/dev/webpack-worker.d.ts +0 -1
- package/cli/dev/webpack-worker.js +0 -5
- package/cli/dev/worker.d.ts +0 -0
- package/cli/dev/worker.js +0 -2
- package/cli/display/components/SyntaxErrorBox.d.ts +0 -0
- package/cli/display/components/SyntaxErrorBox.js +0 -1
- package/cli/lib/create-webpack-worker.d.ts +0 -0
- package/cli/lib/create-webpack-worker.js +0 -1
- package/cli/lib/webpack-worker-script.d.ts +0 -1
- package/cli/lib/webpack-worker-script.js +0 -5
- package/cli/lib/webpack-worker.d.ts +0 -1
- package/cli/lib/webpack-worker.js +0 -5
- package/hooks/createUseQuery.d.ts +0 -9
- package/hooks/createUseQuery.js +0 -12
- package/style/themeDefinition.d.ts +0 -22
- package/style/themeDefinition.js +0 -2
- package/utils/cxBabelPlugin.d.ts +0 -0
- package/utils/cxBabelPlugin.js +0 -21
- package/utils/generateSchemaTypes.d.ts +0 -6
- package/utils/generateSchemaTypes.js +0 -169
- package/utils/graphql-codegen/graphql-codegen-blocks.d.ts +0 -1
- package/utils/graphql-codegen/graphql-codegen-blocks.js +0 -8
- package/utils/graphql-codegen/graphql-codegen-files.d.ts +0 -1
- package/utils/graphql-codegen/graphql-codegen-files.js +0 -64
- package/utils/graphql-codegen/graphql-codegen-no-duplicates.d.ts +0 -1
- package/utils/graphql-codegen/graphql-codegen-no-duplicates.js +0 -13
- package/utils/jsx/jsx-runtime.d.ts +0 -2
- package/utils/jsx/jsx-runtime.js +0 -27
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function beginWork(): void;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
declare type CreateUseQueryOptions = {
|
|
2
|
-
name: string;
|
|
3
|
-
};
|
|
4
|
-
export declare function createUseQuery<TReturn extends any, TVars extends {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
} | undefined>(opts: CreateUseQueryOptions): void;
|
|
7
|
-
export declare function createUseInfiniteQuery(): void;
|
|
8
|
-
export declare function createUseMutation(): void;
|
|
9
|
-
export {};
|
package/hooks/createUseQuery.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createUseMutation = exports.createUseInfiniteQuery = exports.createUseQuery = void 0;
|
|
4
|
-
function createUseQuery(opts) {
|
|
5
|
-
// return (opts: QueryOptions) => {
|
|
6
|
-
// }
|
|
7
|
-
}
|
|
8
|
-
exports.createUseQuery = createUseQuery;
|
|
9
|
-
function createUseInfiniteQuery() { }
|
|
10
|
-
exports.createUseInfiniteQuery = createUseInfiniteQuery;
|
|
11
|
-
function createUseMutation() { }
|
|
12
|
-
exports.createUseMutation = createUseMutation;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Properties as CSS } from "csstype";
|
|
2
|
-
declare type Breakpoints = {
|
|
3
|
-
[key: string]: string;
|
|
4
|
-
};
|
|
5
|
-
declare type ResponsiveScale<TBreakpoints extends Breakpoints, TValue> = TValue | {
|
|
6
|
-
[K in keyof TBreakpoints]?: TValue | [TValue];
|
|
7
|
-
};
|
|
8
|
-
declare type ResponsiveTypography<TBreakpoints extends Breakpoints> = {
|
|
9
|
-
letterSpacing: CSS["letterSpacing"];
|
|
10
|
-
fontFamily?: CSS["fontFamily"];
|
|
11
|
-
lineHeight?: ResponsiveScale<TBreakpoints, CSS["lineHeight"]>;
|
|
12
|
-
fontSize?: ResponsiveScale<TBreakpoints, CSS["fontSize"]>;
|
|
13
|
-
};
|
|
14
|
-
export interface ThemeDefinition<TBreakpoints extends Breakpoints> {
|
|
15
|
-
breakpoints: TBreakpoints;
|
|
16
|
-
colors: Record<string, CSS["color"]>;
|
|
17
|
-
space: {
|
|
18
|
-
[key: string]: CSS["paddingTop"];
|
|
19
|
-
};
|
|
20
|
-
typography: Record<string, ResponsiveTypography<TBreakpoints>>;
|
|
21
|
-
}
|
|
22
|
-
export {};
|
package/style/themeDefinition.js
DELETED
package/utils/cxBabelPlugin.d.ts
DELETED
|
File without changes
|
package/utils/cxBabelPlugin.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// import { types, Visitor } from "@babel/core"
|
|
3
|
-
// export default function ({ types: t }: { types: typeof types }): {
|
|
4
|
-
// visitor: Visitor
|
|
5
|
-
// } {
|
|
6
|
-
// return {
|
|
7
|
-
// visitor: {
|
|
8
|
-
// BinaryExpression(path) {},
|
|
9
|
-
// JSXOpeningElement(path) {
|
|
10
|
-
// const classNameAttribute = path.node.attributes.find(attr => {
|
|
11
|
-
// if (t.isJSXAttribute(attr)) {
|
|
12
|
-
// return attr.name === "class"
|
|
13
|
-
// }
|
|
14
|
-
// })
|
|
15
|
-
// const attributes = path.node.attributes
|
|
16
|
-
// path.replaceWith(t.jSXOpeningElement(path.node.name, attributes, path.node.selfClosing))
|
|
17
|
-
// // process.exit()
|
|
18
|
-
// },
|
|
19
|
-
// },
|
|
20
|
-
// }
|
|
21
|
-
// }
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.generateSchemaTypes = void 0;
|
|
43
|
-
var cli_1 = require("@graphql-codegen/cli");
|
|
44
|
-
var path_1 = __importDefault(require("path"));
|
|
45
|
-
// import { codegen } from "@graphql-codegen/core"
|
|
46
|
-
// import { buildSchema, printSchema, parse, GraphQLSchema } from "graphql"
|
|
47
|
-
var graphql_1 = require("graphql");
|
|
48
|
-
var load_1 = require("@graphql-tools/load");
|
|
49
|
-
var url_loader_1 = require("@graphql-tools/url-loader");
|
|
50
|
-
var fs_1 = __importDefault(require("fs"));
|
|
51
|
-
function generateSchemaTypes(opts) {
|
|
52
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
53
|
-
var schema, schemaFile;
|
|
54
|
-
var _a;
|
|
55
|
-
return __generator(this, function (_b) {
|
|
56
|
-
switch (_b.label) {
|
|
57
|
-
case 0: return [4 /*yield*/, (0, load_1.loadSchema)(opts.endpoint, {
|
|
58
|
-
loaders: [new url_loader_1.UrlLoader()],
|
|
59
|
-
})
|
|
60
|
-
// Determine the absolute path
|
|
61
|
-
];
|
|
62
|
-
case 1:
|
|
63
|
-
schema = _b.sent();
|
|
64
|
-
schemaFile = path_1.default.relative(process.cwd(), path_1.default.join(opts.rootDir, "schema.json"));
|
|
65
|
-
// Write the introspection schema
|
|
66
|
-
fs_1.default.writeFileSync(schemaFile, JSON.stringify((0, graphql_1.introspectionFromSchema)(schema, {
|
|
67
|
-
descriptions: true,
|
|
68
|
-
schemaDescription: false,
|
|
69
|
-
specifiedByUrl: true,
|
|
70
|
-
})), {
|
|
71
|
-
encoding: "utf-8",
|
|
72
|
-
});
|
|
73
|
-
return [4 /*yield*/, (0, cli_1.generate)({
|
|
74
|
-
schema: schemaFile,
|
|
75
|
-
documents: [
|
|
76
|
-
path_1.default.resolve(opts.rootDir, "./views/**/*.graphql"),
|
|
77
|
-
path_1.default.resolve(opts.rootDir, "./blocks/**/*.graphql"),
|
|
78
|
-
path_1.default.resolve(opts.rootDir, "./queries/**/*.graphql"),
|
|
79
|
-
],
|
|
80
|
-
generates: (_a = {},
|
|
81
|
-
_a[path_1.default.join(opts.rootDir + "/types.graphql.ts")] = {
|
|
82
|
-
plugins: [
|
|
83
|
-
"typescript",
|
|
84
|
-
"typescript-operations",
|
|
85
|
-
path_1.default.resolve(__dirname, "./graphql-codegen/graphql-codegen-no-duplicates.js"),
|
|
86
|
-
],
|
|
87
|
-
config: {
|
|
88
|
-
// maybeValue: "T",
|
|
89
|
-
avoidOptionals: true,
|
|
90
|
-
// exportFragmentSpreadSubTypes: true,
|
|
91
|
-
inlineFragmentTypes: "combine",
|
|
92
|
-
onlyOperationTypes: true,
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
_a[path_1.default.join(opts.rootDir, "/types.views.ts")] = {
|
|
96
|
-
plugins: [path_1.default.resolve(__dirname, "./graphql-codegen/graphql-codegen-files.js")],
|
|
97
|
-
config: {
|
|
98
|
-
rootDir: opts.rootDir,
|
|
99
|
-
folderName: "views",
|
|
100
|
-
globalName: "ViewProps",
|
|
101
|
-
additionalTypes: {
|
|
102
|
-
_html: "{ \"template\": string, \"htmlContent\": string }",
|
|
103
|
-
_app: "{ children: any }",
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
_a[path_1.default.join(opts.rootDir, "/types.blocks.ts")] = {
|
|
108
|
-
plugins: [path_1.default.resolve(__dirname, "./graphql-codegen/graphql-codegen-files.js")],
|
|
109
|
-
config: {
|
|
110
|
-
rootDir: opts.rootDir,
|
|
111
|
-
globalName: "BlockProps",
|
|
112
|
-
folderName: "blocks",
|
|
113
|
-
getType: function (importedName, def) {
|
|
114
|
-
var _a, _b, _c;
|
|
115
|
-
var queryKeyVals = [];
|
|
116
|
-
var blockSelection = "";
|
|
117
|
-
for (var _i = 0, _d = def.selectionSet.selections; _i < _d.length; _i++) {
|
|
118
|
-
var item = _d[_i];
|
|
119
|
-
if (item.name.value === "block") {
|
|
120
|
-
var blockField = (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.selectionSet) === null || _a === void 0 ? void 0 : _a.selections[0]) === null || _b === void 0 ? void 0 : _b.name) === null || _c === void 0 ? void 0 : _c.value;
|
|
121
|
-
blockSelection = "Exclude<" + importedName + "[\"block\"][" + JSON.stringify(blockField) + "], null>";
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
queryKeyVals.push([JSON.stringify(item.name.value), importedName + "[" + JSON.stringify(item.name.value) + "]"].join(": "));
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
var type = [];
|
|
128
|
-
if (queryKeyVals.length)
|
|
129
|
-
type.push("{" + queryKeyVals.join(",\n") + "}");
|
|
130
|
-
if (blockSelection)
|
|
131
|
-
type.push(blockSelection);
|
|
132
|
-
if (type.length === 0)
|
|
133
|
-
return {};
|
|
134
|
-
return type.join(" & ");
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
_a),
|
|
139
|
-
}, true)
|
|
140
|
-
// console.log("Generated files", generatedFiles)
|
|
141
|
-
// console.log("Generating with opts", opts)
|
|
142
|
-
// const outputFile = "relative/pathTo/filename.ts"
|
|
143
|
-
// const config = {
|
|
144
|
-
// documents: [],
|
|
145
|
-
// config: {},
|
|
146
|
-
// // used by a plugin internally, although the 'typescript' plugin currently
|
|
147
|
-
// // returns the string output, rather than writing to a file
|
|
148
|
-
// filename: outputFile,
|
|
149
|
-
// schema: parse(printSchema(schema)),
|
|
150
|
-
// plugins: [
|
|
151
|
-
// // Each plugin should be an object
|
|
152
|
-
// {
|
|
153
|
-
// typescript: {}, // Here you can pass configuration to the plugin
|
|
154
|
-
// },
|
|
155
|
-
// ],
|
|
156
|
-
// pluginMap: {
|
|
157
|
-
// typescript: typescriptPlugin,
|
|
158
|
-
// },
|
|
159
|
-
// }
|
|
160
|
-
// const output = await codegen(config);
|
|
161
|
-
];
|
|
162
|
-
case 2:
|
|
163
|
-
_b.sent();
|
|
164
|
-
return [2 /*return*/];
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
exports.generateSchemaTypes = generateSchemaTypes;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function plugin(schema: any, documents: any, config: any): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var glob_promise_1 = require("glob-promise");
|
|
7
|
-
var path_1 = __importDefault(require("path"));
|
|
8
|
-
module.exports = {
|
|
9
|
-
plugin: function (schema, documents, config, info) {
|
|
10
|
-
var folder = path_1.default.resolve(config.rootDir, config.folderName);
|
|
11
|
-
var imports = [];
|
|
12
|
-
var items = [];
|
|
13
|
-
var files = glob_promise_1.glob.sync(folder + "/**/*.tsx");
|
|
14
|
-
var filesFound = {};
|
|
15
|
-
var additionalTypes = config.additionalTypes || {};
|
|
16
|
-
// const additionalTypes: Record<string, string> = {
|
|
17
|
-
// "_html.tsx": `{ "template": string, "htmlContent": string }`,
|
|
18
|
-
// }
|
|
19
|
-
var getRelative = function (path) { return path_1.default.relative(folder, path); };
|
|
20
|
-
var typeForFile = function (file, baseType) {
|
|
21
|
-
var types = [];
|
|
22
|
-
if (baseType)
|
|
23
|
-
types.push(baseType);
|
|
24
|
-
if (additionalTypes[file]) {
|
|
25
|
-
types.push(additionalTypes[file]);
|
|
26
|
-
}
|
|
27
|
-
if (types.length === 0) {
|
|
28
|
-
return config.fallbackType || "{}";
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
return types.join(" & ");
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
documents.forEach(function (doc) {
|
|
35
|
-
var _a;
|
|
36
|
-
if (!doc.location.startsWith(folder))
|
|
37
|
-
return;
|
|
38
|
-
filesFound[doc.location.replace(/\.graphql/, "")] = true;
|
|
39
|
-
var relative = getRelative(doc.location);
|
|
40
|
-
// const docsNames = doc.document.definitions.map(
|
|
41
|
-
// (def: any) => def.name.value
|
|
42
|
-
// )
|
|
43
|
-
if (relative && doc.document.definitions.length) {
|
|
44
|
-
var importedName = doc.document.definitions[0].name.value + "Query";
|
|
45
|
-
var typeName = ((_a = config.getType) === null || _a === void 0 ? void 0 : _a.call(config, importedName, doc.document.definitions[0])) || importedName;
|
|
46
|
-
imports.push(importedName);
|
|
47
|
-
var key = relative.replace(/\.graphql/, "");
|
|
48
|
-
items.push(JSON.stringify(key) + ": " + typeForFile(key, typeName));
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
|
|
52
|
-
var file = files_1[_i];
|
|
53
|
-
if (!filesFound[file.replace(/\.tsx/, "")]) {
|
|
54
|
-
var key = getRelative(file).replace(/\.tsx$/, "");
|
|
55
|
-
items.push(JSON.stringify(key) + ": " + typeForFile(key, ""));
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
if (imports.length === 0) {
|
|
59
|
-
process.exit();
|
|
60
|
-
return "export { };";
|
|
61
|
-
}
|
|
62
|
-
return "import { " + imports.join(", ") + " } from \"./types.graphql\"\nexport { };\n\ndeclare global {\n type " + config.globalName + " = {\n" + items.sort().join(",\n") + "\n }\n}\n ";
|
|
63
|
-
},
|
|
64
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
module.exports = {
|
|
4
|
-
plugin: function () { },
|
|
5
|
-
validate: function (schema, documents, config, info) {
|
|
6
|
-
documents.forEach(function (doc) {
|
|
7
|
-
if (doc.document.definitions.length === 0) {
|
|
8
|
-
throw new Error("GraphQL file '" + doc.location + "' does not contain any uniquely named operations.");
|
|
9
|
-
process.exit();
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
};
|
package/utils/jsx/jsx-runtime.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.jsxs = exports.jsx = void 0;
|
|
7
|
-
// @ts-ignore
|
|
8
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
-
// @ts-ignore
|
|
10
|
-
var jsx_runtime_2 = require("react/jsx-runtime");
|
|
11
|
-
var clsx_1 = __importDefault(require("clsx"));
|
|
12
|
-
function jsx(type, props, ref) {
|
|
13
|
-
if (props.cx && typeof type === "string") {
|
|
14
|
-
props.className = (0, clsx_1.default)(props.classNames);
|
|
15
|
-
delete props.cx;
|
|
16
|
-
}
|
|
17
|
-
return (0, jsx_runtime_1.jsx)(type, props, ref);
|
|
18
|
-
}
|
|
19
|
-
exports.jsx = jsx;
|
|
20
|
-
function jsxs(type, props, ref) {
|
|
21
|
-
if (props.cx && typeof type === "string") {
|
|
22
|
-
props.className = (0, clsx_1.default)(props.classNames);
|
|
23
|
-
delete props.cx;
|
|
24
|
-
}
|
|
25
|
-
return (0, jsx_runtime_2.jsxs)(type, props, ref);
|
|
26
|
-
}
|
|
27
|
-
exports.jsxs = jsxs;
|