@soda-gql/builder 0.12.0 → 0.12.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/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/plugin-support.cjs +1 -1
- package/dist/plugin-support.mjs +1 -1
- package/dist/{service-acu0uwVA.cjs → service-CNpxn4cF.cjs} +26 -9
- package/dist/service-CNpxn4cF.cjs.map +1 -0
- package/dist/{service-CqUHXFUE.mjs → service-DXvoj0YF.mjs} +26 -10
- package/dist/service-DXvoj0YF.mjs.map +1 -0
- package/dist/service-Do9da7Cm.d.mts.map +1 -1
- package/dist/service-vzMbq7Pe.d.cts.map +1 -1
- package/package.json +5 -5
- package/dist/service-CqUHXFUE.mjs.map +0 -1
- package/dist/service-acu0uwVA.cjs.map +0 -1
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as getSeverity, a as createGraphqlSystemIdentifyHelper, b as BuilderArtifactSchema, c as BuilderEffects, d as formatBuilderErrorForCLI, f as formatBuilderErrorStructured, g as diagnosticMessages, h as createStandardDiagnostic, i as extractModuleAdjacency, l as FileReadEffect, m as createDiagnostic, n as createBuilderSession, o as __clearGqlCache, p as builderErrors, r as collectAffectedFiles, s as executeSandbox, t as createBuilderService, u as FileStatEffect, v as loadArtifact, y as loadArtifactSync } from "./service-
|
|
1
|
+
import { _ as getSeverity, a as createGraphqlSystemIdentifyHelper, b as BuilderArtifactSchema, c as BuilderEffects, d as formatBuilderErrorForCLI, f as formatBuilderErrorStructured, g as diagnosticMessages, h as createStandardDiagnostic, i as extractModuleAdjacency, l as FileReadEffect, m as createDiagnostic, n as createBuilderSession, o as __clearGqlCache, p as builderErrors, r as collectAffectedFiles, s as executeSandbox, t as createBuilderService, u as FileStatEffect, v as loadArtifact, y as loadArtifactSync } from "./service-DXvoj0YF.mjs";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { err, ok } from "neverthrow";
|
|
4
4
|
import { resolve } from "node:path";
|
package/dist/plugin-support.cjs
CHANGED
package/dist/plugin-support.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as formatBuilderErrorForCLI, t as createBuilderService, y as loadArtifactSync } from "./service-
|
|
1
|
+
import { d as formatBuilderErrorForCLI, t as createBuilderService, y as loadArtifactSync } from "./service-DXvoj0YF.mjs";
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
import { createCanonicalId } from "@soda-gql/common";
|
|
4
4
|
import { loadConfig } from "@soda-gql/config";
|
|
@@ -31,10 +31,10 @@ let node_fs_promises = require("node:fs/promises");
|
|
|
31
31
|
let neverthrow = require("neverthrow");
|
|
32
32
|
let zod = require("zod");
|
|
33
33
|
let node_crypto = require("node:crypto");
|
|
34
|
+
let node_module = require("node:module");
|
|
34
35
|
let node_path = require("node:path");
|
|
35
36
|
let node_vm = require("node:vm");
|
|
36
37
|
let __soda_gql_common = require("@soda-gql/common");
|
|
37
|
-
let __swc_core = require("@swc/core");
|
|
38
38
|
let __soda_gql_core = require("@soda-gql/core");
|
|
39
39
|
__soda_gql_core = __toESM(__soda_gql_core);
|
|
40
40
|
let __soda_gql_core_adapter = require("@soda-gql/core/adapter");
|
|
@@ -1253,9 +1253,20 @@ const createIntermediateRegistry = ({ analyses } = {}) => {
|
|
|
1253
1253
|
|
|
1254
1254
|
//#endregion
|
|
1255
1255
|
//#region packages/builder/src/intermediate-module/evaluation.ts
|
|
1256
|
+
let _transformSync;
|
|
1257
|
+
const getTransformSync = () => {
|
|
1258
|
+
if (!_transformSync) {
|
|
1259
|
+
if (typeof require("url").pathToFileURL(__filename).href !== "string") {
|
|
1260
|
+
throw new Error("@swc/core cannot be resolved: import.meta.url is unavailable in CJS bundle context");
|
|
1261
|
+
}
|
|
1262
|
+
const localRequire = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
1263
|
+
_transformSync = localRequire("@swc/core").transformSync;
|
|
1264
|
+
}
|
|
1265
|
+
return _transformSync;
|
|
1266
|
+
};
|
|
1256
1267
|
const transpile = ({ filePath, sourceCode }) => {
|
|
1257
1268
|
try {
|
|
1258
|
-
const result = (
|
|
1269
|
+
const result = getTransformSync()(sourceCode, {
|
|
1259
1270
|
filename: `${filePath}.ts`,
|
|
1260
1271
|
jsc: {
|
|
1261
1272
|
parser: {
|
|
@@ -2352,13 +2363,19 @@ const collectClassPropertyDiagnostics$1 = (module$1, gqlIdentifiers) => {
|
|
|
2352
2363
|
module$1.body.forEach(visit);
|
|
2353
2364
|
return diagnostics;
|
|
2354
2365
|
};
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2366
|
+
let _parseSync;
|
|
2367
|
+
const getParseSync = () => {
|
|
2368
|
+
if (!_parseSync) {
|
|
2369
|
+
if (typeof require("url").pathToFileURL(__filename).href !== "string") {
|
|
2370
|
+
throw new Error("@swc/core cannot be resolved: import.meta.url is unavailable in CJS bundle context");
|
|
2371
|
+
}
|
|
2372
|
+
const localRequire = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
2373
|
+
_parseSync = localRequire("@swc/core").parseSync;
|
|
2374
|
+
}
|
|
2375
|
+
return _parseSync;
|
|
2376
|
+
};
|
|
2360
2377
|
const swcAdapter = { analyze(input, helper) {
|
|
2361
|
-
const program = (
|
|
2378
|
+
const program = getParseSync()(input.source, {
|
|
2362
2379
|
syntax: "typescript",
|
|
2363
2380
|
tsx: input.filePath.endsWith(".tsx"),
|
|
2364
2381
|
target: "es2022",
|
|
@@ -6368,4 +6385,4 @@ Object.defineProperty(exports, 'loadArtifactSync', {
|
|
|
6368
6385
|
return loadArtifactSync;
|
|
6369
6386
|
}
|
|
6370
6387
|
});
|
|
6371
|
-
//# sourceMappingURL=service-
|
|
6388
|
+
//# sourceMappingURL=service-CNpxn4cF.cjs.map
|