houdini 1.0.0-next.7 → 1.0.0-next.8
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/build/cmd-cjs/index.js +45 -46
- package/build/cmd-esm/index.js +18 -19
- package/build/codegen-cjs/index.js +19 -19
- package/build/codegen-esm/index.js +6 -6
- package/build/lib/config.d.ts +2 -1
- package/build/lib/path.d.ts +1 -1
- package/build/lib-cjs/index.js +40 -37
- package/build/lib-esm/index.js +14 -11
- package/build/runtime/cache/cache.d.ts +6 -6
- package/build/runtime/cache/storage.d.ts +5 -5
- package/build/runtime/cache/stuff.d.ts +0 -2
- package/build/runtime/client/documentStore.d.ts +4 -3
- package/build/runtime/client/index.d.ts +5 -4
- package/build/runtime/client/plugins/injectedPlugins.d.ts +2 -1
- package/build/runtime/client/utils/documentPlugins.d.ts +2 -2
- package/build/runtime/lib/flatten.d.ts +2 -0
- package/build/runtime/lib/types.d.ts +1 -0
- package/build/runtime/public/record.d.ts +1 -2
- package/build/runtime-cjs/cache/cache.d.ts +6 -6
- package/build/runtime-cjs/cache/cache.js +6 -5
- package/build/runtime-cjs/cache/lists.js +3 -3
- package/build/runtime-cjs/cache/storage.d.ts +5 -5
- package/build/runtime-cjs/cache/storage.js +2 -2
- package/build/runtime-cjs/cache/stuff.d.ts +0 -2
- package/build/runtime-cjs/cache/stuff.js +2 -19
- package/build/runtime-cjs/cache/subscription.js +5 -4
- package/build/runtime-cjs/client/documentStore.d.ts +4 -3
- package/build/runtime-cjs/client/documentStore.js +3 -3
- package/build/runtime-cjs/client/index.d.ts +5 -4
- package/build/runtime-cjs/client/index.js +37 -11
- package/build/runtime-cjs/client/plugins/injectedPlugins.d.ts +2 -1
- package/build/runtime-cjs/client/utils/documentPlugins.d.ts +2 -2
- package/build/runtime-cjs/lib/flatten.d.ts +2 -0
- package/build/runtime-cjs/lib/flatten.js +41 -0
- package/build/runtime-cjs/lib/types.d.ts +1 -0
- package/build/runtime-cjs/public/cache.js +2 -2
- package/build/runtime-cjs/public/record.d.ts +1 -2
- package/build/runtime-cjs/public/record.js +1 -2
- package/build/runtime-esm/cache/cache.d.ts +6 -6
- package/build/runtime-esm/cache/cache.js +7 -6
- package/build/runtime-esm/cache/lists.js +3 -3
- package/build/runtime-esm/cache/storage.d.ts +5 -5
- package/build/runtime-esm/cache/storage.js +2 -2
- package/build/runtime-esm/cache/stuff.d.ts +0 -2
- package/build/runtime-esm/cache/stuff.js +1 -17
- package/build/runtime-esm/cache/subscription.js +6 -5
- package/build/runtime-esm/client/documentStore.d.ts +4 -3
- package/build/runtime-esm/client/documentStore.js +3 -3
- package/build/runtime-esm/client/index.d.ts +5 -4
- package/build/runtime-esm/client/index.js +36 -11
- package/build/runtime-esm/client/plugins/injectedPlugins.d.ts +2 -1
- package/build/runtime-esm/client/utils/documentPlugins.d.ts +2 -2
- package/build/runtime-esm/lib/flatten.d.ts +2 -0
- package/build/runtime-esm/lib/flatten.js +17 -0
- package/build/runtime-esm/lib/types.d.ts +1 -0
- package/build/runtime-esm/public/cache.js +2 -2
- package/build/runtime-esm/public/record.d.ts +1 -2
- package/build/runtime-esm/public/record.js +1 -2
- package/build/test-cjs/index.js +19 -19
- package/build/test-esm/index.js +6 -6
- package/build/vite-cjs/index.js +42 -38
- package/build/vite-esm/index.js +16 -12
- package/package.json +4 -4
package/build/cmd-cjs/index.js
CHANGED
|
@@ -68320,7 +68320,7 @@ function mergeSchemas(config2) {
|
|
|
68320
68320
|
// src/lib/config.ts
|
|
68321
68321
|
var graphql2 = __toESM(require_graphql2(), 1);
|
|
68322
68322
|
var import_minimatch = __toESM(require_minimatch(), 1);
|
|
68323
|
-
var
|
|
68323
|
+
var import_node_url2 = require("node:url");
|
|
68324
68324
|
|
|
68325
68325
|
// src/runtime/lib/config.ts
|
|
68326
68326
|
function defaultConfigValues(file) {
|
|
@@ -68423,10 +68423,10 @@ __export(fs_exports, {
|
|
|
68423
68423
|
writeFile: () => writeFile
|
|
68424
68424
|
});
|
|
68425
68425
|
var import_fs_extra = __toESM(require_lib(), 1);
|
|
68426
|
-
var import_promises = __toESM(require("fs/promises"), 1);
|
|
68427
68426
|
var import_glob = __toESM(require_glob(), 1);
|
|
68428
68427
|
var import_memfs = __toESM(require_lib2(), 1);
|
|
68429
|
-
var
|
|
68428
|
+
var import_promises = __toESM(require("node:fs/promises"), 1);
|
|
68429
|
+
var import_node_util = require("node:util");
|
|
68430
68430
|
|
|
68431
68431
|
// src/lib/path.ts
|
|
68432
68432
|
var path_exports = {};
|
|
@@ -68443,36 +68443,36 @@ __export(path_exports, {
|
|
|
68443
68443
|
resolve: () => resolve,
|
|
68444
68444
|
sep: () => sep
|
|
68445
68445
|
});
|
|
68446
|
-
var
|
|
68447
|
-
var
|
|
68446
|
+
var import_node_os = __toESM(require("node:os"), 1);
|
|
68447
|
+
var import_node_path = __toESM(require("node:path"), 1);
|
|
68448
68448
|
var sep = "/";
|
|
68449
68449
|
function resolve(...parts) {
|
|
68450
|
-
return posixify(
|
|
68450
|
+
return posixify(import_node_path.default.resolve(...parts));
|
|
68451
68451
|
}
|
|
68452
68452
|
function join2(...parts) {
|
|
68453
|
-
return posixify(
|
|
68453
|
+
return posixify(import_node_path.default.join(...parts));
|
|
68454
68454
|
}
|
|
68455
68455
|
function extname(target) {
|
|
68456
|
-
return
|
|
68456
|
+
return import_node_path.default.extname(target);
|
|
68457
68457
|
}
|
|
68458
68458
|
function relative(from, to) {
|
|
68459
|
-
return posixify(
|
|
68459
|
+
return posixify(import_node_path.default.relative(from, to));
|
|
68460
68460
|
}
|
|
68461
68461
|
function basename(target) {
|
|
68462
|
-
return
|
|
68462
|
+
return import_node_path.default.basename(target);
|
|
68463
68463
|
}
|
|
68464
68464
|
function dirname(target) {
|
|
68465
|
-
return
|
|
68465
|
+
return import_node_path.default.dirname(target);
|
|
68466
68466
|
}
|
|
68467
68467
|
function isAbsolute(target) {
|
|
68468
|
-
return
|
|
68468
|
+
return import_node_path.default.isAbsolute(target);
|
|
68469
68469
|
}
|
|
68470
68470
|
function parse2(target) {
|
|
68471
|
-
return
|
|
68471
|
+
return import_node_path.default.parse(target);
|
|
68472
68472
|
}
|
|
68473
68473
|
var posixify = (str) => str.replace(/\\/g, "/");
|
|
68474
68474
|
function importPath(target) {
|
|
68475
|
-
return ["win32", "win64"].includes(
|
|
68475
|
+
return ["win32", "win64"].includes(import_node_os.default.platform()) ? "file:///" + target : target;
|
|
68476
68476
|
}
|
|
68477
68477
|
|
|
68478
68478
|
// src/lib/fs.ts
|
|
@@ -68596,7 +68596,7 @@ async function rmdir(filepath) {
|
|
|
68596
68596
|
recursive: true
|
|
68597
68597
|
});
|
|
68598
68598
|
}
|
|
68599
|
-
return await (0,
|
|
68599
|
+
return await (0, import_node_util.promisify)(import_memfs.fs.rmdir)(filepath);
|
|
68600
68600
|
}
|
|
68601
68601
|
async function stat(filepath) {
|
|
68602
68602
|
if (!houdini_mode.is_testing) {
|
|
@@ -68674,7 +68674,7 @@ async function recursiveCopy(source, target, transforms, notRoot) {
|
|
|
68674
68674
|
}
|
|
68675
68675
|
}
|
|
68676
68676
|
async function glob(pattern) {
|
|
68677
|
-
return await (0,
|
|
68677
|
+
return await (0, import_node_util.promisify)(import_glob.glob)(posixify(pattern));
|
|
68678
68678
|
}
|
|
68679
68679
|
glob.hasMagic = import_glob.glob.hasMagic;
|
|
68680
68680
|
|
|
@@ -68729,7 +68729,7 @@ var dist_default = dataUriToBuffer;
|
|
|
68729
68729
|
|
|
68730
68730
|
// ../../node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/body.js
|
|
68731
68731
|
var import_node_stream = __toESM(require("node:stream"), 1);
|
|
68732
|
-
var
|
|
68732
|
+
var import_node_util2 = require("node:util");
|
|
68733
68733
|
var import_node_buffer = require("node:buffer");
|
|
68734
68734
|
init_fetch_blob();
|
|
68735
68735
|
init_esm_min();
|
|
@@ -68783,7 +68783,7 @@ var isSameProtocol = (destination, original) => {
|
|
|
68783
68783
|
};
|
|
68784
68784
|
|
|
68785
68785
|
// ../../node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/body.js
|
|
68786
|
-
var pipeline = (0,
|
|
68786
|
+
var pipeline = (0, import_node_util2.promisify)(import_node_stream.default.pipeline);
|
|
68787
68787
|
var INTERNALS = Symbol("Body internals");
|
|
68788
68788
|
var Body = class {
|
|
68789
68789
|
constructor(body, {
|
|
@@ -68796,7 +68796,7 @@ var Body = class {
|
|
|
68796
68796
|
body = import_node_buffer.Buffer.from(body.toString());
|
|
68797
68797
|
} else if (isBlob(body)) {
|
|
68798
68798
|
} else if (import_node_buffer.Buffer.isBuffer(body)) {
|
|
68799
|
-
} else if (
|
|
68799
|
+
} else if (import_node_util2.types.isAnyArrayBuffer(body)) {
|
|
68800
68800
|
body = import_node_buffer.Buffer.from(body);
|
|
68801
68801
|
} else if (ArrayBuffer.isView(body)) {
|
|
68802
68802
|
body = import_node_buffer.Buffer.from(body.buffer, body.byteOffset, body.byteLength);
|
|
@@ -68870,7 +68870,7 @@ var Body = class {
|
|
|
68870
68870
|
return consumeBody(this);
|
|
68871
68871
|
}
|
|
68872
68872
|
};
|
|
68873
|
-
Body.prototype.buffer = (0,
|
|
68873
|
+
Body.prototype.buffer = (0, import_node_util2.deprecate)(Body.prototype.buffer, "Please use 'response.arrayBuffer()' instead of 'response.buffer()'", "node-fetch#buffer");
|
|
68874
68874
|
Object.defineProperties(Body.prototype, {
|
|
68875
68875
|
body: { enumerable: true },
|
|
68876
68876
|
bodyUsed: { enumerable: true },
|
|
@@ -68878,7 +68878,7 @@ Object.defineProperties(Body.prototype, {
|
|
|
68878
68878
|
blob: { enumerable: true },
|
|
68879
68879
|
json: { enumerable: true },
|
|
68880
68880
|
text: { enumerable: true },
|
|
68881
|
-
data: { get: (0,
|
|
68881
|
+
data: { get: (0, import_node_util2.deprecate)(
|
|
68882
68882
|
() => {
|
|
68883
68883
|
},
|
|
68884
68884
|
"data doesn't exist, use json(), text(), arrayBuffer(), or body instead",
|
|
@@ -68946,7 +68946,7 @@ var clone = (instance, highWaterMark) => {
|
|
|
68946
68946
|
}
|
|
68947
68947
|
return body;
|
|
68948
68948
|
};
|
|
68949
|
-
var getNonSpecFormDataBoundary = (0,
|
|
68949
|
+
var getNonSpecFormDataBoundary = (0, import_node_util2.deprecate)(
|
|
68950
68950
|
(body) => body.getBoundary(),
|
|
68951
68951
|
"form-data doesn't follow the spec and requires special treatment. Use alternative package",
|
|
68952
68952
|
"https://github.com/node-fetch/node-fetch/issues/1167"
|
|
@@ -68964,7 +68964,7 @@ var extractContentType = (body, request) => {
|
|
|
68964
68964
|
if (isBlob(body)) {
|
|
68965
68965
|
return body.type || null;
|
|
68966
68966
|
}
|
|
68967
|
-
if (import_node_buffer.Buffer.isBuffer(body) ||
|
|
68967
|
+
if (import_node_buffer.Buffer.isBuffer(body) || import_node_util2.types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) {
|
|
68968
68968
|
return null;
|
|
68969
68969
|
}
|
|
68970
68970
|
if (body instanceof FormData) {
|
|
@@ -69003,7 +69003,7 @@ var writeToStream = async (dest, { body }) => {
|
|
|
69003
69003
|
};
|
|
69004
69004
|
|
|
69005
69005
|
// ../../node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/headers.js
|
|
69006
|
-
var
|
|
69006
|
+
var import_node_util3 = require("node:util");
|
|
69007
69007
|
var import_node_http = __toESM(require("node:http"), 1);
|
|
69008
69008
|
var validateHeaderName = typeof import_node_http.default.validateHeaderName === "function" ? import_node_http.default.validateHeaderName : (name) => {
|
|
69009
69009
|
if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(name)) {
|
|
@@ -69028,7 +69028,7 @@ var Headers = class extends URLSearchParams {
|
|
|
69028
69028
|
result.push(...values.map((value) => [name, value]));
|
|
69029
69029
|
}
|
|
69030
69030
|
} else if (init2 == null) {
|
|
69031
|
-
} else if (typeof init2 === "object" && !
|
|
69031
|
+
} else if (typeof init2 === "object" && !import_node_util3.types.isBoxedPrimitive(init2)) {
|
|
69032
69032
|
const method = init2[Symbol.iterator];
|
|
69033
69033
|
if (method == null) {
|
|
69034
69034
|
result.push(...Object.entries(init2));
|
|
@@ -69037,7 +69037,7 @@ var Headers = class extends URLSearchParams {
|
|
|
69037
69037
|
throw new TypeError("Header pairs must be iterable");
|
|
69038
69038
|
}
|
|
69039
69039
|
result = [...init2].map((pair) => {
|
|
69040
|
-
if (typeof pair !== "object" ||
|
|
69040
|
+
if (typeof pair !== "object" || import_node_util3.types.isBoxedPrimitive(pair)) {
|
|
69041
69041
|
throw new TypeError("Each header pair must be an iterable object");
|
|
69042
69042
|
}
|
|
69043
69043
|
return [...pair];
|
|
@@ -69284,7 +69284,7 @@ Object.defineProperties(Response.prototype, {
|
|
|
69284
69284
|
|
|
69285
69285
|
// ../../node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/request.js
|
|
69286
69286
|
var import_node_url = require("node:url");
|
|
69287
|
-
var
|
|
69287
|
+
var import_node_util4 = require("node:util");
|
|
69288
69288
|
|
|
69289
69289
|
// ../../node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/utils/get-search.js
|
|
69290
69290
|
var getSearch = (parsedURL) => {
|
|
@@ -69441,7 +69441,7 @@ var INTERNALS3 = Symbol("Request internals");
|
|
|
69441
69441
|
var isRequest = (object) => {
|
|
69442
69442
|
return typeof object === "object" && typeof object[INTERNALS3] === "object";
|
|
69443
69443
|
};
|
|
69444
|
-
var doBadDataWarn = (0,
|
|
69444
|
+
var doBadDataWarn = (0, import_node_util4.deprecate)(
|
|
69445
69445
|
() => {
|
|
69446
69446
|
},
|
|
69447
69447
|
".data is not a valid RequestInit property, use .body instead",
|
|
@@ -69945,7 +69945,7 @@ var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
|
|
|
69945
69945
|
|
|
69946
69946
|
// src/lib/config.ts
|
|
69947
69947
|
var import_meta = {};
|
|
69948
|
-
var currentDir = global.__dirname || dirname((0,
|
|
69948
|
+
var currentDir = global.__dirname || dirname((0, import_node_url2.fileURLToPath)(import_meta.url));
|
|
69949
69949
|
var Config = class {
|
|
69950
69950
|
filepath;
|
|
69951
69951
|
rootDir;
|
|
@@ -70436,13 +70436,16 @@ var pendingConfigPromise = null;
|
|
|
70436
70436
|
async function getConfig({
|
|
70437
70437
|
configPath = DEFAULT_CONFIG_PATH,
|
|
70438
70438
|
noSchema,
|
|
70439
|
+
forceReload,
|
|
70439
70440
|
...extraConfig
|
|
70440
70441
|
} = {}) {
|
|
70441
|
-
if (
|
|
70442
|
-
|
|
70443
|
-
|
|
70444
|
-
|
|
70445
|
-
|
|
70442
|
+
if (!forceReload) {
|
|
70443
|
+
if (_config) {
|
|
70444
|
+
return _config;
|
|
70445
|
+
}
|
|
70446
|
+
if (pendingConfigPromise) {
|
|
70447
|
+
return await pendingConfigPromise;
|
|
70448
|
+
}
|
|
70446
70449
|
}
|
|
70447
70450
|
let resolve2 = () => {
|
|
70448
70451
|
};
|
|
@@ -70460,7 +70463,7 @@ async function getConfig({
|
|
|
70460
70463
|
if (!pluginName.startsWith(".")) {
|
|
70461
70464
|
pluginFile = await pluginPath(pluginName, configPath);
|
|
70462
70465
|
}
|
|
70463
|
-
const { default: pluginInit } = await import((0,
|
|
70466
|
+
const { default: pluginInit } = await import((0, import_node_url2.pathToFileURL)(pluginFile).toString());
|
|
70464
70467
|
if (!pluginInit.plugin || !pluginInit.name) {
|
|
70465
70468
|
throw new HoudiniError({
|
|
70466
70469
|
filepath: pluginFile,
|
|
@@ -70637,8 +70640,8 @@ async function loadSchemaFile(schemaPath) {
|
|
|
70637
70640
|
}
|
|
70638
70641
|
|
|
70639
70642
|
// src/lib/graphql.ts
|
|
70640
|
-
var import_crypto = __toESM(require("crypto"), 1);
|
|
70641
70643
|
var graphql3 = __toESM(require_graphql2(), 1);
|
|
70644
|
+
var import_node_crypto = __toESM(require("node:crypto"), 1);
|
|
70642
70645
|
function getRootType(type) {
|
|
70643
70646
|
if (graphql3.isNonNullType(type)) {
|
|
70644
70647
|
return getRootType(type.ofType);
|
|
@@ -70652,7 +70655,7 @@ function hashDocument({
|
|
|
70652
70655
|
document
|
|
70653
70656
|
}) {
|
|
70654
70657
|
const docString = typeof document === "string" ? document : document.artifact?.raw;
|
|
70655
|
-
return
|
|
70658
|
+
return import_node_crypto.default.createHash("sha256").update(docString ?? "").digest("hex");
|
|
70656
70659
|
}
|
|
70657
70660
|
function parentTypeFromAncestors(schema, filepath, ancestors) {
|
|
70658
70661
|
const parents = [...ancestors];
|
|
@@ -76070,11 +76073,7 @@ async function pullSchema_default(args) {
|
|
|
76070
76073
|
};
|
|
76071
76074
|
}, headers);
|
|
76072
76075
|
}
|
|
76073
|
-
await pullSchema(
|
|
76074
|
-
apiURL,
|
|
76075
|
-
config2.schemaPath ? config2.schemaPath : path_exports.resolve(targetPath, "schema.json"),
|
|
76076
|
-
headers
|
|
76077
|
-
);
|
|
76076
|
+
await pullSchema(apiURL, config2.schemaPath ?? path_exports.resolve(targetPath, "schema.json"), headers);
|
|
76078
76077
|
}
|
|
76079
76078
|
|
|
76080
76079
|
// src/cmd/generate.ts
|
|
@@ -76107,8 +76106,8 @@ async function generate(args = {
|
|
|
76107
76106
|
}
|
|
76108
76107
|
|
|
76109
76108
|
// src/cmd/init.ts
|
|
76110
|
-
var import_child_process = require("child_process");
|
|
76111
76109
|
var import_graphql31 = __toESM(require_graphql2(), 1);
|
|
76110
|
+
var import_node_child_process = require("node:child_process");
|
|
76112
76111
|
var import_prompts = __toESM(require_prompts3(), 1);
|
|
76113
76112
|
async function init(_path, args) {
|
|
76114
76113
|
const force_remote_endpoint = args.force_remote_endpoint || false;
|
|
@@ -76140,7 +76139,7 @@ async function init(_path, args) {
|
|
|
76140
76139
|
}
|
|
76141
76140
|
} while (dir !== (dir = path_exports.dirname(dir)));
|
|
76142
76141
|
if (use_git) {
|
|
76143
|
-
const status = (0,
|
|
76142
|
+
const status = (0, import_node_child_process.execSync)("git status --porcelain", { stdio: "pipe" }).toString();
|
|
76144
76143
|
if (status) {
|
|
76145
76144
|
const message = "Your git working directory is dirty \u2014 we recommend committing your changes before running this migration.\n";
|
|
76146
76145
|
console.error(message);
|
|
@@ -76480,8 +76479,8 @@ async function updatePackageJSON(targetPath) {
|
|
|
76480
76479
|
}
|
|
76481
76480
|
packageJSON.devDependencies = {
|
|
76482
76481
|
...packageJSON.devDependencies,
|
|
76483
|
-
houdini: "^1.0.0-next.
|
|
76484
|
-
"houdini-svelte": "^1.0.0-next.
|
|
76482
|
+
houdini: "^1.0.0-next.8",
|
|
76483
|
+
"houdini-svelte": "^1.0.0-next.8"
|
|
76485
76484
|
};
|
|
76486
76485
|
await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
|
|
76487
76486
|
}
|
package/build/cmd-esm/index.js
CHANGED
|
@@ -68326,7 +68326,7 @@ function mergeSchemas(config2) {
|
|
|
68326
68326
|
// src/lib/config.ts
|
|
68327
68327
|
var graphql2 = __toESM(require_graphql2(), 1);
|
|
68328
68328
|
var import_minimatch = __toESM(require_minimatch(), 1);
|
|
68329
|
-
import { fileURLToPath, pathToFileURL } from "url";
|
|
68329
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
68330
68330
|
|
|
68331
68331
|
// src/runtime/lib/config.ts
|
|
68332
68332
|
function defaultConfigValues(file) {
|
|
@@ -68431,8 +68431,8 @@ __export(fs_exports, {
|
|
|
68431
68431
|
var import_fs_extra = __toESM(require_lib(), 1);
|
|
68432
68432
|
var import_glob = __toESM(require_glob(), 1);
|
|
68433
68433
|
var import_memfs = __toESM(require_lib2(), 1);
|
|
68434
|
-
import fs from "fs/promises";
|
|
68435
|
-
import { promisify } from "util";
|
|
68434
|
+
import fs from "node:fs/promises";
|
|
68435
|
+
import { promisify } from "node:util";
|
|
68436
68436
|
|
|
68437
68437
|
// src/lib/path.ts
|
|
68438
68438
|
var path_exports = {};
|
|
@@ -68449,8 +68449,8 @@ __export(path_exports, {
|
|
|
68449
68449
|
resolve: () => resolve,
|
|
68450
68450
|
sep: () => sep
|
|
68451
68451
|
});
|
|
68452
|
-
import os from "os";
|
|
68453
|
-
import path from "path";
|
|
68452
|
+
import os from "node:os";
|
|
68453
|
+
import path from "node:path";
|
|
68454
68454
|
var sep = "/";
|
|
68455
68455
|
function resolve(...parts) {
|
|
68456
68456
|
return posixify(path.resolve(...parts));
|
|
@@ -70441,13 +70441,16 @@ var pendingConfigPromise = null;
|
|
|
70441
70441
|
async function getConfig({
|
|
70442
70442
|
configPath = DEFAULT_CONFIG_PATH,
|
|
70443
70443
|
noSchema,
|
|
70444
|
+
forceReload,
|
|
70444
70445
|
...extraConfig
|
|
70445
70446
|
} = {}) {
|
|
70446
|
-
if (
|
|
70447
|
-
|
|
70448
|
-
|
|
70449
|
-
|
|
70450
|
-
|
|
70447
|
+
if (!forceReload) {
|
|
70448
|
+
if (_config) {
|
|
70449
|
+
return _config;
|
|
70450
|
+
}
|
|
70451
|
+
if (pendingConfigPromise) {
|
|
70452
|
+
return await pendingConfigPromise;
|
|
70453
|
+
}
|
|
70451
70454
|
}
|
|
70452
70455
|
let resolve2 = () => {
|
|
70453
70456
|
};
|
|
@@ -70643,7 +70646,7 @@ async function loadSchemaFile(schemaPath) {
|
|
|
70643
70646
|
|
|
70644
70647
|
// src/lib/graphql.ts
|
|
70645
70648
|
var graphql3 = __toESM(require_graphql2(), 1);
|
|
70646
|
-
import crypto from "crypto";
|
|
70649
|
+
import crypto from "node:crypto";
|
|
70647
70650
|
function getRootType(type) {
|
|
70648
70651
|
if (graphql3.isNonNullType(type)) {
|
|
70649
70652
|
return getRootType(type.ofType);
|
|
@@ -76075,11 +76078,7 @@ async function pullSchema_default(args) {
|
|
|
76075
76078
|
};
|
|
76076
76079
|
}, headers);
|
|
76077
76080
|
}
|
|
76078
|
-
await pullSchema(
|
|
76079
|
-
apiURL,
|
|
76080
|
-
config2.schemaPath ? config2.schemaPath : path_exports.resolve(targetPath, "schema.json"),
|
|
76081
|
-
headers
|
|
76082
|
-
);
|
|
76081
|
+
await pullSchema(apiURL, config2.schemaPath ?? path_exports.resolve(targetPath, "schema.json"), headers);
|
|
76083
76082
|
}
|
|
76084
76083
|
|
|
76085
76084
|
// src/cmd/generate.ts
|
|
@@ -76113,8 +76112,8 @@ async function generate(args = {
|
|
|
76113
76112
|
|
|
76114
76113
|
// src/cmd/init.ts
|
|
76115
76114
|
var import_graphql31 = __toESM(require_graphql2(), 1);
|
|
76116
|
-
import { execSync } from "child_process";
|
|
76117
76115
|
var import_prompts = __toESM(require_prompts3(), 1);
|
|
76116
|
+
import { execSync } from "node:child_process";
|
|
76118
76117
|
async function init(_path, args) {
|
|
76119
76118
|
const force_remote_endpoint = args.force_remote_endpoint || false;
|
|
76120
76119
|
try {
|
|
@@ -76485,8 +76484,8 @@ async function updatePackageJSON(targetPath) {
|
|
|
76485
76484
|
}
|
|
76486
76485
|
packageJSON.devDependencies = {
|
|
76487
76486
|
...packageJSON.devDependencies,
|
|
76488
|
-
houdini: "^1.0.0-next.
|
|
76489
|
-
"houdini-svelte": "^1.0.0-next.
|
|
76487
|
+
houdini: "^1.0.0-next.8",
|
|
76488
|
+
"houdini-svelte": "^1.0.0-next.8"
|
|
76490
76489
|
};
|
|
76491
76490
|
await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
|
|
76492
76491
|
}
|
|
@@ -54053,7 +54053,7 @@ async function runPipeline(config2, pipeline, target) {
|
|
|
54053
54053
|
|
|
54054
54054
|
// src/lib/config.ts
|
|
54055
54055
|
var import_minimatch = __toESM(require_minimatch(), 1);
|
|
54056
|
-
var
|
|
54056
|
+
var import_node_url = require("node:url");
|
|
54057
54057
|
|
|
54058
54058
|
// src/runtime/lib/config.ts
|
|
54059
54059
|
function keyFieldsForType(configFile, type) {
|
|
@@ -54132,10 +54132,10 @@ __export(fs_exports, {
|
|
|
54132
54132
|
writeFile: () => writeFile
|
|
54133
54133
|
});
|
|
54134
54134
|
var import_fs_extra = __toESM(require_lib(), 1);
|
|
54135
|
-
var import_promises = __toESM(require("fs/promises"), 1);
|
|
54136
54135
|
var import_glob = __toESM(require_glob(), 1);
|
|
54137
54136
|
var import_memfs = __toESM(require_lib2(), 1);
|
|
54138
|
-
var
|
|
54137
|
+
var import_promises = __toESM(require("node:fs/promises"), 1);
|
|
54138
|
+
var import_node_util = require("node:util");
|
|
54139
54139
|
|
|
54140
54140
|
// src/lib/path.ts
|
|
54141
54141
|
var path_exports = {};
|
|
@@ -54152,36 +54152,36 @@ __export(path_exports, {
|
|
|
54152
54152
|
resolve: () => resolve,
|
|
54153
54153
|
sep: () => sep
|
|
54154
54154
|
});
|
|
54155
|
-
var
|
|
54156
|
-
var
|
|
54155
|
+
var import_node_os = __toESM(require("node:os"), 1);
|
|
54156
|
+
var import_node_path = __toESM(require("node:path"), 1);
|
|
54157
54157
|
var sep = "/";
|
|
54158
54158
|
function resolve(...parts) {
|
|
54159
|
-
return posixify(
|
|
54159
|
+
return posixify(import_node_path.default.resolve(...parts));
|
|
54160
54160
|
}
|
|
54161
54161
|
function join(...parts) {
|
|
54162
|
-
return posixify(
|
|
54162
|
+
return posixify(import_node_path.default.join(...parts));
|
|
54163
54163
|
}
|
|
54164
54164
|
function extname(target) {
|
|
54165
|
-
return
|
|
54165
|
+
return import_node_path.default.extname(target);
|
|
54166
54166
|
}
|
|
54167
54167
|
function relative(from, to) {
|
|
54168
|
-
return posixify(
|
|
54168
|
+
return posixify(import_node_path.default.relative(from, to));
|
|
54169
54169
|
}
|
|
54170
54170
|
function basename(target) {
|
|
54171
|
-
return
|
|
54171
|
+
return import_node_path.default.basename(target);
|
|
54172
54172
|
}
|
|
54173
54173
|
function dirname(target) {
|
|
54174
|
-
return
|
|
54174
|
+
return import_node_path.default.dirname(target);
|
|
54175
54175
|
}
|
|
54176
54176
|
function isAbsolute(target) {
|
|
54177
|
-
return
|
|
54177
|
+
return import_node_path.default.isAbsolute(target);
|
|
54178
54178
|
}
|
|
54179
54179
|
function parse(target) {
|
|
54180
|
-
return
|
|
54180
|
+
return import_node_path.default.parse(target);
|
|
54181
54181
|
}
|
|
54182
54182
|
var posixify = (str) => str.replace(/\\/g, "/");
|
|
54183
54183
|
function importPath(target) {
|
|
54184
|
-
return ["win32", "win64"].includes(
|
|
54184
|
+
return ["win32", "win64"].includes(import_node_os.default.platform()) ? "file:///" + target : target;
|
|
54185
54185
|
}
|
|
54186
54186
|
|
|
54187
54187
|
// src/lib/fs.ts
|
|
@@ -54305,7 +54305,7 @@ async function rmdir(filepath) {
|
|
|
54305
54305
|
recursive: true
|
|
54306
54306
|
});
|
|
54307
54307
|
}
|
|
54308
|
-
return await (0,
|
|
54308
|
+
return await (0, import_node_util.promisify)(import_memfs.fs.rmdir)(filepath);
|
|
54309
54309
|
}
|
|
54310
54310
|
async function stat(filepath) {
|
|
54311
54311
|
if (!houdini_mode.is_testing) {
|
|
@@ -54383,18 +54383,18 @@ async function recursiveCopy(source, target, transforms, notRoot) {
|
|
|
54383
54383
|
}
|
|
54384
54384
|
}
|
|
54385
54385
|
async function glob(pattern) {
|
|
54386
|
-
return await (0,
|
|
54386
|
+
return await (0, import_node_util.promisify)(import_glob.glob)(posixify(pattern));
|
|
54387
54387
|
}
|
|
54388
54388
|
glob.hasMagic = import_glob.glob.hasMagic;
|
|
54389
54389
|
|
|
54390
54390
|
// src/lib/config.ts
|
|
54391
54391
|
var import_meta = {};
|
|
54392
|
-
var currentDir = global.__dirname || dirname((0,
|
|
54392
|
+
var currentDir = global.__dirname || dirname((0, import_node_url.fileURLToPath)(import_meta.url));
|
|
54393
54393
|
var DEFAULT_CONFIG_PATH = join(process.cwd(), "houdini.config.js");
|
|
54394
54394
|
|
|
54395
54395
|
// src/lib/graphql.ts
|
|
54396
|
-
var import_crypto = __toESM(require("crypto"), 1);
|
|
54397
54396
|
var graphql = __toESM(require_graphql2(), 1);
|
|
54397
|
+
var import_node_crypto = __toESM(require("node:crypto"), 1);
|
|
54398
54398
|
function getRootType(type) {
|
|
54399
54399
|
if (graphql.isNonNullType(type)) {
|
|
54400
54400
|
return getRootType(type.ofType);
|
|
@@ -54408,7 +54408,7 @@ function hashDocument({
|
|
|
54408
54408
|
document
|
|
54409
54409
|
}) {
|
|
54410
54410
|
const docString = typeof document === "string" ? document : document.artifact?.raw;
|
|
54411
|
-
return
|
|
54411
|
+
return import_node_crypto.default.createHash("sha256").update(docString ?? "").digest("hex");
|
|
54412
54412
|
}
|
|
54413
54413
|
function parentTypeFromAncestors(schema, filepath, ancestors) {
|
|
54414
54414
|
const parents = [...ancestors];
|
|
@@ -54052,7 +54052,7 @@ async function runPipeline(config2, pipeline, target) {
|
|
|
54052
54052
|
|
|
54053
54053
|
// src/lib/config.ts
|
|
54054
54054
|
var import_minimatch = __toESM(require_minimatch(), 1);
|
|
54055
|
-
import { fileURLToPath, pathToFileURL } from "url";
|
|
54055
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
54056
54056
|
|
|
54057
54057
|
// src/runtime/lib/config.ts
|
|
54058
54058
|
function keyFieldsForType(configFile, type) {
|
|
@@ -54133,8 +54133,8 @@ __export(fs_exports, {
|
|
|
54133
54133
|
var import_fs_extra = __toESM(require_lib(), 1);
|
|
54134
54134
|
var import_glob = __toESM(require_glob(), 1);
|
|
54135
54135
|
var import_memfs = __toESM(require_lib2(), 1);
|
|
54136
|
-
import fs from "fs/promises";
|
|
54137
|
-
import { promisify } from "util";
|
|
54136
|
+
import fs from "node:fs/promises";
|
|
54137
|
+
import { promisify } from "node:util";
|
|
54138
54138
|
|
|
54139
54139
|
// src/lib/path.ts
|
|
54140
54140
|
var path_exports = {};
|
|
@@ -54151,8 +54151,8 @@ __export(path_exports, {
|
|
|
54151
54151
|
resolve: () => resolve,
|
|
54152
54152
|
sep: () => sep
|
|
54153
54153
|
});
|
|
54154
|
-
import os from "os";
|
|
54155
|
-
import path from "path";
|
|
54154
|
+
import os from "node:os";
|
|
54155
|
+
import path from "node:path";
|
|
54156
54156
|
var sep = "/";
|
|
54157
54157
|
function resolve(...parts) {
|
|
54158
54158
|
return posixify(path.resolve(...parts));
|
|
@@ -54392,7 +54392,7 @@ var DEFAULT_CONFIG_PATH = join(process.cwd(), "houdini.config.js");
|
|
|
54392
54392
|
|
|
54393
54393
|
// src/lib/graphql.ts
|
|
54394
54394
|
var graphql = __toESM(require_graphql2(), 1);
|
|
54395
|
-
import crypto from "crypto";
|
|
54395
|
+
import crypto from "node:crypto";
|
|
54396
54396
|
function getRootType(type) {
|
|
54397
54397
|
if (graphql.isNonNullType(type)) {
|
|
54398
54398
|
return getRootType(type.ofType);
|
package/build/lib/config.d.ts
CHANGED
|
@@ -129,8 +129,9 @@ export declare class Config {
|
|
|
129
129
|
extractQueryDefinition(document: graphql.DocumentNode): graphql.OperationDefinitionNode;
|
|
130
130
|
variableFunctionName(name: string): string;
|
|
131
131
|
}
|
|
132
|
-
export declare function getConfig({ configPath, noSchema, ...extraConfig }?: PluginConfig & {
|
|
132
|
+
export declare function getConfig({ configPath, noSchema, forceReload, ...extraConfig }?: PluginConfig & {
|
|
133
133
|
noSchema?: boolean;
|
|
134
|
+
forceReload?: boolean;
|
|
134
135
|
}): Promise<Config>;
|
|
135
136
|
export declare function readConfigFile(configPath?: string): Promise<ConfigFile>;
|
|
136
137
|
export declare const orderedPlugins: (plugins: PluginMeta[]) => PluginMeta[];
|
package/build/lib/path.d.ts
CHANGED