@cedarjs/internal 2.2.1-next.0 → 2.2.1-rc.23
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/dist/ast.js +1 -1
- package/dist/build/api.d.ts.map +1 -1
- package/dist/build/api.js +2 -2
- package/dist/cjs/ast.js +2 -2
- package/dist/cjs/build/api.d.ts.map +1 -1
- package/dist/cjs/build/api.js +2 -2
- package/dist/cjs/generate/graphqlCodeGen.js +3 -3
- package/dist/cjs/generate/graphqlSchema.js +2 -2
- package/dist/cjs/generate/possibleTypes.js +3 -3
- package/dist/cjs/generate/trustedDocuments.js +4 -4
- package/dist/cjs/generate/typeDefinitions.js +11 -11
- package/dist/cjs/generate/watch.js +3 -3
- package/dist/cjs/project.js +8 -8
- package/dist/cjs/ts2js.js +10 -10
- package/dist/generate/graphqlCodeGen.js +1 -1
- package/dist/generate/graphqlSchema.js +1 -1
- package/dist/generate/possibleTypes.js +1 -1
- package/dist/generate/trustedDocuments.js +1 -1
- package/dist/generate/typeDefinitions.js +1 -1
- package/dist/generate/watch.js +1 -1
- package/dist/project.js +1 -1
- package/dist/ts2js.js +1 -1
- package/package.json +9 -11
package/dist/ast.js
CHANGED
package/dist/build/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/build/api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/build/api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgB,YAAY,EAAe,MAAM,SAAS,CAAA;AAatE,eAAO,MAAM,QAAQ,4DAOpB,CAAA;AAED,eAAO,MAAM,UAAU,4DAQtB,CAAA;AAED,eAAO,MAAM,aAAa,qBAGzB,CAAA;AAiCD,eAAO,MAAM,YAAY,GAAU,OAAO,MAAM,EAAE,yDAEjD,CAAA"}
|
package/dist/build/api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
1
2
|
import { build, context } from "esbuild";
|
|
2
|
-
import fs from "fs-extra";
|
|
3
3
|
import {
|
|
4
4
|
getApiSideBabelPlugins,
|
|
5
5
|
transformWithBabel
|
|
@@ -21,7 +21,7 @@ const rebuildApi = async () => {
|
|
|
21
21
|
};
|
|
22
22
|
const cleanApiBuild = async () => {
|
|
23
23
|
const rwjsPaths = getPaths();
|
|
24
|
-
return fs.
|
|
24
|
+
return fs.promises.rm(rwjsPaths.api.dist, { recursive: true, force: true });
|
|
25
25
|
};
|
|
26
26
|
const runRwBabelTransformsPlugin = {
|
|
27
27
|
name: "rw-esbuild-babel-transform",
|
package/dist/cjs/ast.js
CHANGED
|
@@ -36,7 +36,7 @@ __export(ast_exports, {
|
|
|
36
36
|
hasDefaultExport: () => hasDefaultExport
|
|
37
37
|
});
|
|
38
38
|
module.exports = __toCommonJS(ast_exports);
|
|
39
|
-
var
|
|
39
|
+
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
40
40
|
var import_path = __toESM(require("path"), 1);
|
|
41
41
|
var import_core = require("@babel/core");
|
|
42
42
|
var import_parser = require("@babel/parser");
|
|
@@ -46,7 +46,7 @@ var import_project_config = require("@cedarjs/project-config");
|
|
|
46
46
|
var import_files = require("./files.js");
|
|
47
47
|
const traverse = import_traverse.default.default || import_traverse.default;
|
|
48
48
|
const fileToAst = (filePath) => {
|
|
49
|
-
const code =
|
|
49
|
+
const code = import_node_fs.default.readFileSync(filePath, "utf-8");
|
|
50
50
|
const isJsxFile = import_path.default.extname(filePath).match(/[jt]sx$/) || (0, import_files.isFileInsideFolder)(filePath, (0, import_project_config.getPaths)().web.base);
|
|
51
51
|
const plugins = [
|
|
52
52
|
"typescript",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/build/api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/build/api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgB,YAAY,EAAe,MAAM,SAAS,CAAA;AAatE,eAAO,MAAM,QAAQ,4DAOpB,CAAA;AAED,eAAO,MAAM,UAAU,4DAQtB,CAAA;AAED,eAAO,MAAM,aAAa,qBAGzB,CAAA;AAiCD,eAAO,MAAM,YAAY,GAAU,OAAO,MAAM,EAAE,yDAEjD,CAAA"}
|
package/dist/cjs/build/api.js
CHANGED
|
@@ -34,8 +34,8 @@ __export(api_exports, {
|
|
|
34
34
|
transpileApi: () => transpileApi
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(api_exports);
|
|
37
|
+
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
37
38
|
var import_esbuild = require("esbuild");
|
|
38
|
-
var import_fs_extra = __toESM(require("fs-extra"), 1);
|
|
39
39
|
var import_babel_config = require("@cedarjs/babel-config");
|
|
40
40
|
var import_project_config = require("@cedarjs/project-config");
|
|
41
41
|
var import_files = require("../files.js");
|
|
@@ -54,7 +54,7 @@ const rebuildApi = async () => {
|
|
|
54
54
|
};
|
|
55
55
|
const cleanApiBuild = async () => {
|
|
56
56
|
const rwjsPaths = (0, import_project_config.getPaths)();
|
|
57
|
-
return
|
|
57
|
+
return import_node_fs.default.promises.rm(rwjsPaths.api.dist, { recursive: true, force: true });
|
|
58
58
|
};
|
|
59
59
|
const runRwBabelTransformsPlugin = {
|
|
60
60
|
name: "rw-esbuild-babel-transform",
|
|
@@ -34,7 +34,7 @@ __export(graphqlCodeGen_exports, {
|
|
|
34
34
|
getResolverFnType: () => getResolverFnType
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(graphqlCodeGen_exports);
|
|
37
|
-
var
|
|
37
|
+
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
38
38
|
var import_path = __toESM(require("path"), 1);
|
|
39
39
|
var addPlugin = __toESM(require("@graphql-codegen/add"), 1);
|
|
40
40
|
var import_cli = require("@graphql-codegen/cli");
|
|
@@ -187,8 +187,8 @@ async function runCodegenGraphQL(documents, extraPlugins, filename, side) {
|
|
|
187
187
|
};
|
|
188
188
|
const options = getCodegenOptions(documents, mergedConfig, extraPlugins);
|
|
189
189
|
const output = await (0, import_core.codegen)(options);
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
import_node_fs.default.mkdirSync(import_path.default.dirname(filename), { recursive: true });
|
|
191
|
+
import_node_fs.default.writeFileSync(filename, output);
|
|
192
192
|
return [filename];
|
|
193
193
|
}
|
|
194
194
|
function getLoadDocumentsOptions(filename) {
|
|
@@ -31,7 +31,7 @@ __export(graphqlSchema_exports, {
|
|
|
31
31
|
generateGraphQLSchema: () => generateGraphQLSchema
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(graphqlSchema_exports);
|
|
34
|
-
var
|
|
34
|
+
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
35
35
|
var import_core = require("@graphql-codegen/core");
|
|
36
36
|
var schemaAstPlugin = __toESM(require("@graphql-codegen/schema-ast"), 1);
|
|
37
37
|
var import_code_file_loader = require("@graphql-tools/code-file-loader");
|
|
@@ -145,7 +145,7 @@ const generateGraphQLSchema = async () => {
|
|
|
145
145
|
if (loadedSchema) {
|
|
146
146
|
try {
|
|
147
147
|
const schema = await (0, import_core.codegen)(options);
|
|
148
|
-
|
|
148
|
+
import_node_fs.default.writeFileSync(redwoodProjectPaths.generated.schema, schema);
|
|
149
149
|
return { schemaPath: redwoodProjectPaths.generated.schema, errors };
|
|
150
150
|
} catch (e) {
|
|
151
151
|
errors.push({
|
|
@@ -31,7 +31,7 @@ __export(possibleTypes_exports, {
|
|
|
31
31
|
generatePossibleTypes: () => generatePossibleTypes
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(possibleTypes_exports);
|
|
34
|
-
var
|
|
34
|
+
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
35
35
|
var import_path = __toESM(require("path"), 1);
|
|
36
36
|
var fragmentMatcher = __toESM(require("@graphql-codegen/fragment-matcher"), 1);
|
|
37
37
|
var import_graphql_file_loader = require("@graphql-tools/graphql-file-loader");
|
|
@@ -86,8 +86,8 @@ const generatePossibleTypes = async () => {
|
|
|
86
86
|
arrowParens: "always",
|
|
87
87
|
parser: "typescript"
|
|
88
88
|
});
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
import_node_fs.default.mkdirSync(import_path.default.dirname(filename), { recursive: true });
|
|
90
|
+
import_node_fs.default.writeFileSync(filename, output);
|
|
91
91
|
return { possibleTypesFiles: [filename], errors };
|
|
92
92
|
} catch (e) {
|
|
93
93
|
errors.push({
|
|
@@ -32,7 +32,7 @@ __export(trustedDocuments_exports, {
|
|
|
32
32
|
trustedDocumentsStore: () => trustedDocumentsStore
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(trustedDocuments_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
36
36
|
var import_path = __toESM(require("path"), 1);
|
|
37
37
|
var import_prettier = require("prettier");
|
|
38
38
|
var import_project_config = require("@cedarjs/project-config");
|
|
@@ -56,8 +56,8 @@ const trustedDocumentsStore = async (generatedFiles) => {
|
|
|
56
56
|
(0, import_project_config.getPaths)().api.lib,
|
|
57
57
|
"trustedDocumentsStore.ts"
|
|
58
58
|
);
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
import_node_fs.default.mkdirSync(import_path.default.dirname(trustedDocumentsStoreFile), { recursive: true });
|
|
60
|
+
import_node_fs.default.writeFileSync(trustedDocumentsStoreFile, content);
|
|
61
61
|
}
|
|
62
62
|
return trustedDocumentsStoreFile;
|
|
63
63
|
};
|
|
@@ -85,7 +85,7 @@ const replaceGqlTagWithTrustedDocumentGraphql = async (generatedFiles) => {
|
|
|
85
85
|
arrowParens: "always",
|
|
86
86
|
parser: "typescript"
|
|
87
87
|
});
|
|
88
|
-
|
|
88
|
+
import_node_fs.default.writeFileSync(gqlFile.filename, content);
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
91
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -45,7 +45,7 @@ __export(typeDefinitions_exports, {
|
|
|
45
45
|
mirrorPathForDirectoryNamedModules: () => mirrorPathForDirectoryNamedModules
|
|
46
46
|
});
|
|
47
47
|
module.exports = __toCommonJS(typeDefinitions_exports);
|
|
48
|
-
var
|
|
48
|
+
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
49
49
|
var import_path = __toESM(require("path"), 1);
|
|
50
50
|
var import_source_map = require("source-map");
|
|
51
51
|
var import_project_config = require("@cedarjs/project-config");
|
|
@@ -94,7 +94,7 @@ const mirrorPathForDirectoryNamedModules = (p, rwjsPaths = (0, import_project_co
|
|
|
94
94
|
};
|
|
95
95
|
const generateMirrorDirectoryNamedModule = (p, rwjsPaths = (0, import_project_config.getPaths)()) => {
|
|
96
96
|
const [mirrorDir, typeDef] = mirrorPathForDirectoryNamedModules(p, rwjsPaths);
|
|
97
|
-
|
|
97
|
+
import_node_fs.default.mkdirSync(mirrorDir, { recursive: true });
|
|
98
98
|
const typeDefPath = import_path.default.join(mirrorDir, typeDef);
|
|
99
99
|
const { name } = import_path.default.parse(p);
|
|
100
100
|
(0, import_templates.writeTemplate)(
|
|
@@ -120,7 +120,7 @@ const generateMirrorDirectoryNamedModule = (p, rwjsPaths = (0, import_project_co
|
|
|
120
120
|
source: import_path.default.relative(import_path.default.dirname(typeDefPath), p),
|
|
121
121
|
original: defaultExportLocation
|
|
122
122
|
});
|
|
123
|
-
|
|
123
|
+
import_node_fs.default.writeFileSync(
|
|
124
124
|
`${typeDefPath}.map`,
|
|
125
125
|
JSON.stringify(map.toJSON(), void 0, 2)
|
|
126
126
|
);
|
|
@@ -143,12 +143,12 @@ const mirrorPathForCell = (p, rwjsPaths = (0, import_project_config.getPaths)())
|
|
|
143
143
|
rwjsPaths.generated.types.mirror,
|
|
144
144
|
import_path.default.relative(rwjsPaths.base, import_path.default.dirname(p))
|
|
145
145
|
);
|
|
146
|
-
|
|
146
|
+
import_node_fs.default.mkdirSync(mirrorDir, { recursive: true });
|
|
147
147
|
return [mirrorDir, "index.d.ts"];
|
|
148
148
|
};
|
|
149
149
|
const generateMirrorCell = (p, rwjsPaths = (0, import_project_config.getPaths)()) => {
|
|
150
150
|
const [mirrorDir, typeDef] = mirrorPathForCell(p, rwjsPaths);
|
|
151
|
-
|
|
151
|
+
import_node_fs.default.mkdirSync(mirrorDir, { recursive: true });
|
|
152
152
|
const typeDefPath = import_path.default.join(mirrorDir, typeDef);
|
|
153
153
|
const { name } = import_path.default.parse(p);
|
|
154
154
|
const fileContents = (0, import_ast.fileToAst)(p);
|
|
@@ -186,7 +186,7 @@ const generateMirrorCell = (p, rwjsPaths = (0, import_project_config.getPaths)()
|
|
|
186
186
|
source: import_path.default.relative(import_path.default.dirname(typeDefPath), p),
|
|
187
187
|
original: successComponent.location
|
|
188
188
|
});
|
|
189
|
-
|
|
189
|
+
import_node_fs.default.writeFileSync(
|
|
190
190
|
`${typeDefPath}.map`,
|
|
191
191
|
JSON.stringify(map.toJSON(), void 0, 2)
|
|
192
192
|
);
|
|
@@ -235,7 +235,7 @@ const generateTypeDefRouterRoutes = () => {
|
|
|
235
235
|
original: routes[i].location
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
|
-
|
|
238
|
+
import_node_fs.default.writeFileSync(
|
|
239
239
|
`${typeDefPath}.map`,
|
|
240
240
|
JSON.stringify(map.toJSON(), void 0, 2)
|
|
241
241
|
);
|
|
@@ -283,7 +283,7 @@ const generateTypeDefRouterPages = () => {
|
|
|
283
283
|
original: defaultExportLocation
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
|
|
286
|
+
import_node_fs.default.writeFileSync(
|
|
287
287
|
`${typeDefPath}.map`,
|
|
288
288
|
JSON.stringify(map.toJSON(), void 0, 2)
|
|
289
289
|
);
|
|
@@ -320,7 +320,7 @@ const generateViteClientTypesDirective = () => {
|
|
|
320
320
|
redwoodProjectPaths.generated.types.includes,
|
|
321
321
|
"web-vite-client.d.ts"
|
|
322
322
|
);
|
|
323
|
-
|
|
323
|
+
import_node_fs.default.writeFileSync(viteClientDirectivePath, viteClientDirective);
|
|
324
324
|
return [viteClientDirectivePath];
|
|
325
325
|
};
|
|
326
326
|
function generateStubStorybookTypes() {
|
|
@@ -331,7 +331,7 @@ function generateStubStorybookTypes() {
|
|
|
331
331
|
`;
|
|
332
332
|
const redwoodProjectPaths = (0, import_project_config.getPaths)();
|
|
333
333
|
const packageJson = JSON.parse(
|
|
334
|
-
|
|
334
|
+
import_node_fs.default.readFileSync(
|
|
335
335
|
import_path.default.join(redwoodProjectPaths.base, "package.json"),
|
|
336
336
|
"utf-8"
|
|
337
337
|
)
|
|
@@ -346,7 +346,7 @@ function generateStubStorybookTypes() {
|
|
|
346
346
|
redwoodProjectPaths.generated.types.includes,
|
|
347
347
|
"web-storybook.d.ts"
|
|
348
348
|
);
|
|
349
|
-
|
|
349
|
+
import_node_fs.default.writeFileSync(stubStorybookTypesFilePath, stubStorybookTypesFileContent);
|
|
350
350
|
return [stubStorybookTypesFilePath];
|
|
351
351
|
}
|
|
352
352
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -22,7 +22,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
23
23
|
mod
|
|
24
24
|
));
|
|
25
|
-
var
|
|
25
|
+
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
26
26
|
var import_path = __toESM(require("path"), 1);
|
|
27
27
|
var import_ansis = __toESM(require("ansis"), 1);
|
|
28
28
|
var import_chokidar = __toESM(require("chokidar"), 1);
|
|
@@ -94,7 +94,7 @@ Created ${files.length} in ${Date.now() - start} ms`);
|
|
|
94
94
|
await (0, import_graphqlCodeGen.generateTypeDefGraphQLWeb)();
|
|
95
95
|
await (0, import_clientPreset.generateClientPreset)();
|
|
96
96
|
if (eventName === "unlink") {
|
|
97
|
-
|
|
97
|
+
import_node_fs.default.unlinkSync((0, import_typeDefinitions.mirrorPathForCell)(absPath, rwjsPaths)[0]);
|
|
98
98
|
} else {
|
|
99
99
|
(0, import_typeDefinitions.generateMirrorCell)(absPath, rwjsPaths);
|
|
100
100
|
}
|
|
@@ -108,7 +108,7 @@ Created ${files.length} in ${Date.now() - start} ms`);
|
|
|
108
108
|
finished("Page");
|
|
109
109
|
} else if ((0, import_files.isDirectoryNamedModuleFile)(absPath)) {
|
|
110
110
|
if (eventName === "unlink") {
|
|
111
|
-
|
|
111
|
+
import_node_fs.default.unlinkSync((0, import_typeDefinitions.mirrorPathForDirectoryNamedModules)(absPath, rwjsPaths)[0]);
|
|
112
112
|
} else {
|
|
113
113
|
(0, import_typeDefinitions.generateMirrorDirectoryNamedModule)(absPath, rwjsPaths);
|
|
114
114
|
}
|
package/dist/cjs/project.js
CHANGED
|
@@ -34,7 +34,7 @@ __export(project_exports, {
|
|
|
34
34
|
isTypeScriptProject: () => isTypeScriptProject
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(project_exports);
|
|
37
|
-
var
|
|
37
|
+
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
38
38
|
var import_path = __toESM(require("path"), 1);
|
|
39
39
|
var import_typescript = require("typescript");
|
|
40
40
|
var import_project_config = require("@cedarjs/project-config");
|
|
@@ -42,13 +42,13 @@ const getTsConfigs = () => {
|
|
|
42
42
|
const rwPaths = (0, import_project_config.getPaths)();
|
|
43
43
|
const apiTsConfigPath = import_path.default.join(rwPaths.api.base, "tsconfig.json");
|
|
44
44
|
const webTsConfigPath = import_path.default.join(rwPaths.web.base, "tsconfig.json");
|
|
45
|
-
const apiTsConfig =
|
|
45
|
+
const apiTsConfig = import_node_fs.default.existsSync(apiTsConfigPath) ? (0, import_typescript.parseConfigFileTextToJson)(
|
|
46
46
|
apiTsConfigPath,
|
|
47
|
-
|
|
47
|
+
import_node_fs.default.readFileSync(apiTsConfigPath, "utf-8")
|
|
48
48
|
) : null;
|
|
49
|
-
const webTsConfig =
|
|
49
|
+
const webTsConfig = import_node_fs.default.existsSync(webTsConfigPath) ? (0, import_typescript.parseConfigFileTextToJson)(
|
|
50
50
|
webTsConfigPath,
|
|
51
|
-
|
|
51
|
+
import_node_fs.default.readFileSync(webTsConfigPath, "utf-8")
|
|
52
52
|
) : null;
|
|
53
53
|
return {
|
|
54
54
|
api: apiTsConfig?.config ?? null,
|
|
@@ -57,21 +57,21 @@ const getTsConfigs = () => {
|
|
|
57
57
|
};
|
|
58
58
|
const isTypeScriptProject = () => {
|
|
59
59
|
const paths = (0, import_project_config.getPaths)();
|
|
60
|
-
return
|
|
60
|
+
return import_node_fs.default.existsSync(import_path.default.join(paths.web.base, "tsconfig.json")) || import_node_fs.default.existsSync(import_path.default.join(paths.api.base, "tsconfig.json"));
|
|
61
61
|
};
|
|
62
62
|
const isServerFileSetup = () => {
|
|
63
63
|
const serverFilePath = import_path.default.join(
|
|
64
64
|
(0, import_project_config.getPaths)().api.src,
|
|
65
65
|
`server.${isTypeScriptProject() ? "ts" : "js"}`
|
|
66
66
|
);
|
|
67
|
-
return
|
|
67
|
+
return import_node_fs.default.existsSync(serverFilePath);
|
|
68
68
|
};
|
|
69
69
|
const isRealtimeSetup = () => {
|
|
70
70
|
const realtimePath = import_path.default.join(
|
|
71
71
|
(0, import_project_config.getPaths)().api.lib,
|
|
72
72
|
`realtime.${isTypeScriptProject() ? "ts" : "js"}`
|
|
73
73
|
);
|
|
74
|
-
return
|
|
74
|
+
return import_node_fs.default.existsSync(realtimePath);
|
|
75
75
|
};
|
|
76
76
|
// Annotate the CommonJS export names for ESM import in node:
|
|
77
77
|
0 && (module.exports = {
|
package/dist/cjs/ts2js.js
CHANGED
|
@@ -37,7 +37,7 @@ __export(ts2js_exports, {
|
|
|
37
37
|
typeScriptSourceFiles: () => typeScriptSourceFiles
|
|
38
38
|
});
|
|
39
39
|
module.exports = __toCommonJS(ts2js_exports);
|
|
40
|
-
var
|
|
40
|
+
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
41
41
|
var import_path = __toESM(require("path"), 1);
|
|
42
42
|
var import_core = require("@babel/core");
|
|
43
43
|
var import_fast_glob = __toESM(require("fast-glob"), 1);
|
|
@@ -58,28 +58,28 @@ const convertTsFilesToJs = async (cwd, files) => {
|
|
|
58
58
|
for (const f of files) {
|
|
59
59
|
const code = await transformTSToJS(f);
|
|
60
60
|
if (code) {
|
|
61
|
-
|
|
61
|
+
import_node_fs.default.writeFileSync(
|
|
62
62
|
import_path.default.join(cwd, f.replace(".tsx", ".jsx").replace(".ts", ".js")),
|
|
63
63
|
code,
|
|
64
64
|
"utf8"
|
|
65
65
|
);
|
|
66
|
-
|
|
66
|
+
import_node_fs.default.unlinkSync(import_path.default.join(cwd, f));
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
if (
|
|
70
|
-
|
|
69
|
+
if (import_node_fs.default.existsSync(import_path.default.join(cwd, "api/tsconfig.json"))) {
|
|
70
|
+
import_node_fs.default.renameSync(
|
|
71
71
|
import_path.default.join(cwd, "api/tsconfig.json"),
|
|
72
72
|
import_path.default.join(cwd, "api/jsconfig.json")
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
|
-
if (
|
|
76
|
-
|
|
75
|
+
if (import_node_fs.default.existsSync(import_path.default.join(cwd, "web/tsconfig.json"))) {
|
|
76
|
+
import_node_fs.default.renameSync(
|
|
77
77
|
import_path.default.join(cwd, "web/tsconfig.json"),
|
|
78
78
|
import_path.default.join(cwd, "web/jsconfig.json")
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
|
-
if (
|
|
82
|
-
|
|
81
|
+
if (import_node_fs.default.existsSync(import_path.default.join(cwd, "scripts/tsconfig.json"))) {
|
|
82
|
+
import_node_fs.default.renameSync(
|
|
83
83
|
import_path.default.join(cwd, "scripts/tsconfig.json"),
|
|
84
84
|
import_path.default.join(cwd, "scripts/jsconfig.json")
|
|
85
85
|
);
|
|
@@ -93,7 +93,7 @@ const typeScriptSourceFiles = (cwd, globPattern = "{api,web}/src/**/*.{ts,tsx}")
|
|
|
93
93
|
});
|
|
94
94
|
};
|
|
95
95
|
const transformTSToJS = (file) => {
|
|
96
|
-
const tsCode =
|
|
96
|
+
const tsCode = import_node_fs.default.readFileSync(file, "utf8");
|
|
97
97
|
const filename = import_path.default.basename(file);
|
|
98
98
|
const result = (0, import_core.transform)(tsCode, {
|
|
99
99
|
filename,
|
package/dist/generate/watch.js
CHANGED
package/dist/project.js
CHANGED
package/dist/ts2js.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/internal",
|
|
3
|
-
"version": "2.2.1-
|
|
3
|
+
"version": "2.2.1-rc.23",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -140,10 +140,10 @@
|
|
|
140
140
|
"@babel/plugin-transform-typescript": "^7.26.8",
|
|
141
141
|
"@babel/runtime-corejs3": "7.28.4",
|
|
142
142
|
"@babel/traverse": "7.28.5",
|
|
143
|
-
"@cedarjs/babel-config": "2.2.1-
|
|
144
|
-
"@cedarjs/graphql-server": "2.2.1-
|
|
145
|
-
"@cedarjs/project-config": "2.2.1-
|
|
146
|
-
"@cedarjs/router": "2.2.1-
|
|
143
|
+
"@cedarjs/babel-config": "2.2.1-rc.23",
|
|
144
|
+
"@cedarjs/graphql-server": "2.2.1-rc.23",
|
|
145
|
+
"@cedarjs/project-config": "2.2.1-rc.23",
|
|
146
|
+
"@cedarjs/router": "2.2.1-rc.23",
|
|
147
147
|
"@graphql-codegen/add": "4.0.1",
|
|
148
148
|
"@graphql-codegen/cli": "3.3.1",
|
|
149
149
|
"@graphql-codegen/client-preset": "4.8.3",
|
|
@@ -162,23 +162,21 @@
|
|
|
162
162
|
"deepmerge": "4.3.1",
|
|
163
163
|
"esbuild": "0.27.2",
|
|
164
164
|
"fast-glob": "3.3.3",
|
|
165
|
-
"fs-extra": "11.3.3",
|
|
166
165
|
"graphql": "16.12.0",
|
|
167
166
|
"kill-port": "1.6.1",
|
|
168
167
|
"prettier": "3.6.2",
|
|
169
168
|
"rimraf": "6.1.2",
|
|
170
169
|
"source-map": "0.7.6",
|
|
171
170
|
"string-env-interpolation": "1.0.1",
|
|
172
|
-
"systeminformation": "5.
|
|
171
|
+
"systeminformation": "5.28.1",
|
|
173
172
|
"termi-link": "1.1.0",
|
|
174
173
|
"ts-node": "10.9.2",
|
|
175
174
|
"typescript": "5.9.3"
|
|
176
175
|
},
|
|
177
176
|
"devDependencies": {
|
|
178
177
|
"@arethetypeswrong/cli": "0.18.2",
|
|
179
|
-
"@cedarjs/framework-tools": "2.2.1-
|
|
180
|
-
"
|
|
181
|
-
"concurrently": "8.2.2",
|
|
178
|
+
"@cedarjs/framework-tools": "2.2.1-rc.23",
|
|
179
|
+
"concurrently": "9.2.1",
|
|
182
180
|
"graphql-tag": "2.12.6",
|
|
183
181
|
"publint": "0.3.16",
|
|
184
182
|
"tsx": "4.21.0",
|
|
@@ -187,5 +185,5 @@
|
|
|
187
185
|
"publishConfig": {
|
|
188
186
|
"access": "public"
|
|
189
187
|
},
|
|
190
|
-
"gitHead": "
|
|
188
|
+
"gitHead": "24dbb96b93c3cf4a316ac2965158d378c87a76db"
|
|
191
189
|
}
|