houdini 1.0.0-next.7 → 1.0.0-next.9
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 +93 -66
- package/build/cmd-esm/index.js +66 -39
- package/build/codegen/generators/typescript/typeReference.d.ts +4 -2
- package/build/codegen/generators/typescript/types.d.ts +0 -1
- package/build/codegen-cjs/index.js +67 -39
- package/build/codegen-esm/index.js +54 -26
- 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 +6 -5
- package/build/runtime/client/plugins/cache.d.ts +1 -1
- package/build/runtime/client/plugins/fetch.d.ts +1 -1
- package/build/runtime/client/plugins/fetchParams.d.ts +1 -1
- package/build/runtime/client/plugins/injectedPlugins.d.ts +2 -1
- package/build/runtime/client/plugins/mutation.d.ts +1 -1
- package/build/runtime/client/plugins/query.d.ts +1 -1
- package/build/runtime/client/plugins/subscription.d.ts +1 -1
- package/build/runtime/client/plugins/throwOnError.d.ts +1 -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 +2 -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 +4 -4
- package/build/runtime-cjs/client/index.d.ts +6 -5
- package/build/runtime-cjs/client/index.js +45 -19
- package/build/runtime-cjs/client/plugins/cache.d.ts +1 -1
- package/build/runtime-cjs/client/plugins/cache.js +3 -3
- package/build/runtime-cjs/client/plugins/fetch.d.ts +1 -1
- package/build/runtime-cjs/client/plugins/fetch.js +7 -7
- package/build/runtime-cjs/client/plugins/fetchParams.d.ts +1 -1
- package/build/runtime-cjs/client/plugins/fetchParams.js +3 -3
- package/build/runtime-cjs/client/plugins/injectedPlugins.d.ts +2 -1
- package/build/runtime-cjs/client/plugins/mutation.d.ts +1 -1
- package/build/runtime-cjs/client/plugins/mutation.js +3 -3
- package/build/runtime-cjs/client/plugins/query.d.ts +1 -1
- package/build/runtime-cjs/client/plugins/query.js +3 -3
- package/build/runtime-cjs/client/plugins/subscription.d.ts +1 -1
- package/build/runtime-cjs/client/plugins/subscription.js +3 -3
- package/build/runtime-cjs/client/plugins/throwOnError.d.ts +1 -1
- package/build/runtime-cjs/client/plugins/throwOnError.js +3 -3
- 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 +2 -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 +5 -5
- package/build/runtime-esm/client/index.d.ts +6 -5
- package/build/runtime-esm/client/index.js +46 -21
- package/build/runtime-esm/client/plugins/cache.d.ts +1 -1
- package/build/runtime-esm/client/plugins/cache.js +2 -2
- package/build/runtime-esm/client/plugins/fetch.d.ts +1 -1
- package/build/runtime-esm/client/plugins/fetch.js +6 -6
- package/build/runtime-esm/client/plugins/fetchParams.d.ts +1 -1
- package/build/runtime-esm/client/plugins/fetchParams.js +2 -2
- package/build/runtime-esm/client/plugins/injectedPlugins.d.ts +2 -1
- package/build/runtime-esm/client/plugins/mutation.d.ts +1 -1
- package/build/runtime-esm/client/plugins/mutation.js +2 -2
- package/build/runtime-esm/client/plugins/query.d.ts +1 -1
- package/build/runtime-esm/client/plugins/query.js +2 -2
- package/build/runtime-esm/client/plugins/subscription.d.ts +1 -1
- package/build/runtime-esm/client/plugins/subscription.js +2 -2
- package/build/runtime-esm/client/plugins/throwOnError.d.ts +1 -1
- package/build/runtime-esm/client/plugins/throwOnError.js +2 -2
- 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 +2 -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 +67 -39
- package/build/test-esm/index.js +54 -26
- package/build/vite-cjs/index.js +90 -58
- package/build/vite-esm/index.js +64 -32
- package/package.json +4 -4
|
@@ -3352,7 +3352,7 @@ var require_definition = __commonJS({
|
|
|
3352
3352
|
exports.assertInterfaceType = assertInterfaceType;
|
|
3353
3353
|
exports.isUnionType = isUnionType7;
|
|
3354
3354
|
exports.assertUnionType = assertUnionType;
|
|
3355
|
-
exports.isEnumType =
|
|
3355
|
+
exports.isEnumType = isEnumType6;
|
|
3356
3356
|
exports.assertEnumType = assertEnumType;
|
|
3357
3357
|
exports.isInputObjectType = isInputObjectType2;
|
|
3358
3358
|
exports.assertInputObjectType = assertInputObjectType;
|
|
@@ -3423,7 +3423,7 @@ var require_definition = __commonJS({
|
|
|
3423
3423
|
return Constructor;
|
|
3424
3424
|
}
|
|
3425
3425
|
function isType(type) {
|
|
3426
|
-
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) ||
|
|
3426
|
+
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) || isEnumType6(type) || isInputObjectType2(type) || isListType3(type) || isNonNullType6(type);
|
|
3427
3427
|
}
|
|
3428
3428
|
function assertType(type) {
|
|
3429
3429
|
if (!isType(type)) {
|
|
@@ -3467,11 +3467,11 @@ var require_definition = __commonJS({
|
|
|
3467
3467
|
}
|
|
3468
3468
|
return type;
|
|
3469
3469
|
}
|
|
3470
|
-
function
|
|
3470
|
+
function isEnumType6(type) {
|
|
3471
3471
|
return (0, _instanceOf.default)(type, GraphQLEnumType);
|
|
3472
3472
|
}
|
|
3473
3473
|
function assertEnumType(type) {
|
|
3474
|
-
if (!
|
|
3474
|
+
if (!isEnumType6(type)) {
|
|
3475
3475
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
|
|
3476
3476
|
}
|
|
3477
3477
|
return type;
|
|
@@ -3504,7 +3504,7 @@ var require_definition = __commonJS({
|
|
|
3504
3504
|
return type;
|
|
3505
3505
|
}
|
|
3506
3506
|
function isInputType(type) {
|
|
3507
|
-
return isScalarType7(type) ||
|
|
3507
|
+
return isScalarType7(type) || isEnumType6(type) || isInputObjectType2(type) || isWrappingType(type) && isInputType(type.ofType);
|
|
3508
3508
|
}
|
|
3509
3509
|
function assertInputType(type) {
|
|
3510
3510
|
if (!isInputType(type)) {
|
|
@@ -3513,7 +3513,7 @@ var require_definition = __commonJS({
|
|
|
3513
3513
|
return type;
|
|
3514
3514
|
}
|
|
3515
3515
|
function isOutputType(type) {
|
|
3516
|
-
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) ||
|
|
3516
|
+
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) || isEnumType6(type) || isWrappingType(type) && isOutputType(type.ofType);
|
|
3517
3517
|
}
|
|
3518
3518
|
function assertOutputType(type) {
|
|
3519
3519
|
if (!isOutputType(type)) {
|
|
@@ -3522,7 +3522,7 @@ var require_definition = __commonJS({
|
|
|
3522
3522
|
return type;
|
|
3523
3523
|
}
|
|
3524
3524
|
function isLeafType(type) {
|
|
3525
|
-
return isScalarType7(type) ||
|
|
3525
|
+
return isScalarType7(type) || isEnumType6(type);
|
|
3526
3526
|
}
|
|
3527
3527
|
function assertLeafType(type) {
|
|
3528
3528
|
if (!isLeafType(type)) {
|
|
@@ -3610,7 +3610,7 @@ var require_definition = __commonJS({
|
|
|
3610
3610
|
}
|
|
3611
3611
|
}
|
|
3612
3612
|
function isNamedType(type) {
|
|
3613
|
-
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) ||
|
|
3613
|
+
return isScalarType7(type) || isObjectType3(type) || isInterfaceType6(type) || isUnionType7(type) || isEnumType6(type) || isInputObjectType2(type);
|
|
3614
3614
|
}
|
|
3615
3615
|
function assertNamedType(type) {
|
|
3616
3616
|
if (!isNamedType(type)) {
|
|
@@ -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);
|
|
@@ -57329,11 +57329,13 @@ function scalarPropertyValue(config2, missingScalars, target) {
|
|
|
57329
57329
|
|
|
57330
57330
|
// src/codegen/generators/typescript/typeReference.ts
|
|
57331
57331
|
var AST8 = recast8.types.builders;
|
|
57332
|
-
function tsTypeReference(config2, missingScalars, definition) {
|
|
57332
|
+
function tsTypeReference(config2, missingScalars, definition, body) {
|
|
57333
57333
|
const { type, wrappers } = unwrapType(config2, definition.type);
|
|
57334
57334
|
let result;
|
|
57335
57335
|
if (graphql14.isScalarType(type)) {
|
|
57336
57336
|
result = scalarPropertyValue(config2, missingScalars, type);
|
|
57337
|
+
} else if (graphql14.isEnumType(type)) {
|
|
57338
|
+
result = enumReference(config2, body, type.name);
|
|
57337
57339
|
} else {
|
|
57338
57340
|
result = AST8.tsTypeReference(AST8.identifier(type.name));
|
|
57339
57341
|
}
|
|
@@ -57348,6 +57350,19 @@ function tsTypeReference(config2, missingScalars, definition) {
|
|
|
57348
57350
|
}
|
|
57349
57351
|
return result;
|
|
57350
57352
|
}
|
|
57353
|
+
function enumReference(config2, body, name) {
|
|
57354
|
+
ensureImports({
|
|
57355
|
+
config: config2,
|
|
57356
|
+
body,
|
|
57357
|
+
import: ["ValueOf"],
|
|
57358
|
+
importKind: "type",
|
|
57359
|
+
sourceModule: "$houdini/runtime/lib/types"
|
|
57360
|
+
});
|
|
57361
|
+
return AST8.tsTypeReference(
|
|
57362
|
+
AST8.identifier("ValueOf"),
|
|
57363
|
+
AST8.tsTypeParameterInstantiation([AST8.tsTypeQuery(AST8.identifier(name))])
|
|
57364
|
+
);
|
|
57365
|
+
}
|
|
57351
57366
|
|
|
57352
57367
|
// src/codegen/generators/typescript/addReferencedInputTypes.ts
|
|
57353
57368
|
var AST9 = recast9.types.builders;
|
|
@@ -57379,7 +57394,7 @@ function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingS
|
|
|
57379
57394
|
members.push(
|
|
57380
57395
|
AST9.tsPropertySignature(
|
|
57381
57396
|
AST9.identifier(field.name),
|
|
57382
|
-
AST9.tsTypeAnnotation(tsTypeReference(config2, missingScalars, field)),
|
|
57397
|
+
AST9.tsTypeAnnotation(tsTypeReference(config2, missingScalars, field, body)),
|
|
57383
57398
|
graphql15.isNullableType(field.type)
|
|
57384
57399
|
)
|
|
57385
57400
|
);
|
|
@@ -57410,6 +57425,13 @@ function inlineType({
|
|
|
57410
57425
|
if (graphql16.isScalarType(type)) {
|
|
57411
57426
|
result = scalarPropertyValue(config2, missingScalars, type);
|
|
57412
57427
|
} else if (graphql16.isEnumType(type)) {
|
|
57428
|
+
ensureImports({
|
|
57429
|
+
config: config2,
|
|
57430
|
+
body,
|
|
57431
|
+
importKind: "type",
|
|
57432
|
+
import: ["ValueOf"],
|
|
57433
|
+
sourceModule: "$houdini/runtime/lib/types"
|
|
57434
|
+
});
|
|
57413
57435
|
if (!visitedTypes.has(type.name)) {
|
|
57414
57436
|
ensureImports({
|
|
57415
57437
|
config: config2,
|
|
@@ -57419,7 +57441,7 @@ function inlineType({
|
|
|
57419
57441
|
});
|
|
57420
57442
|
visitedTypes.add(type.name);
|
|
57421
57443
|
}
|
|
57422
|
-
result =
|
|
57444
|
+
result = enumReference(config2, body, type.name);
|
|
57423
57445
|
} else if (selections) {
|
|
57424
57446
|
const rootObj = type;
|
|
57425
57447
|
const inlineFragments = {};
|
|
@@ -57852,7 +57874,7 @@ async function generateOperationTypeDefs(config2, filepath, body, definition, se
|
|
|
57852
57874
|
return AST11.tsPropertySignature(
|
|
57853
57875
|
AST11.identifier(definition2.variable.name.value),
|
|
57854
57876
|
AST11.tsTypeAnnotation(
|
|
57855
|
-
tsTypeReference(config2, missingScalars, definition2)
|
|
57877
|
+
tsTypeReference(config2, missingScalars, definition2, body)
|
|
57856
57878
|
),
|
|
57857
57879
|
definition2.type.kind !== "NonNullType"
|
|
57858
57880
|
);
|
|
@@ -57919,7 +57941,12 @@ async function generateFragmentTypeDefs(config2, filepath, body, selections, def
|
|
|
57919
57941
|
return AST11.tsPropertySignature(
|
|
57920
57942
|
AST11.identifier(definition2.variable.name.value),
|
|
57921
57943
|
AST11.tsTypeAnnotation(
|
|
57922
|
-
tsTypeReference(
|
|
57944
|
+
tsTypeReference(
|
|
57945
|
+
config2,
|
|
57946
|
+
missingScalars,
|
|
57947
|
+
definition2,
|
|
57948
|
+
body
|
|
57949
|
+
)
|
|
57923
57950
|
),
|
|
57924
57951
|
definition2.type.kind !== "NonNullType"
|
|
57925
57952
|
);
|
|
@@ -58012,7 +58039,7 @@ async function imperativeCacheTypef(config2, docs) {
|
|
|
58012
58039
|
),
|
|
58013
58040
|
AST12.tsPropertySignature(
|
|
58014
58041
|
AST12.identifier("lists"),
|
|
58015
|
-
AST12.tsTypeAnnotation(listDefinitions(config2, docs))
|
|
58042
|
+
AST12.tsTypeAnnotation(listDefinitions(config2, body, docs))
|
|
58016
58043
|
),
|
|
58017
58044
|
AST12.tsPropertySignature(
|
|
58018
58045
|
AST12.identifier("queries"),
|
|
@@ -58121,7 +58148,7 @@ function typeDefinitions(config2, body, docs, returnType) {
|
|
|
58121
58148
|
const prop = AST12.tsPropertySignature(
|
|
58122
58149
|
AST12.identifier(arg.name),
|
|
58123
58150
|
AST12.tsTypeAnnotation(
|
|
58124
|
-
tsTypeReference(config2, /* @__PURE__ */ new Set(), arg)
|
|
58151
|
+
tsTypeReference(config2, /* @__PURE__ */ new Set(), arg, body)
|
|
58125
58152
|
)
|
|
58126
58153
|
);
|
|
58127
58154
|
const unwrapped2 = unwrapType(config2, arg.type);
|
|
@@ -58171,7 +58198,7 @@ function typeDefinitions(config2, body, docs, returnType) {
|
|
|
58171
58198
|
})
|
|
58172
58199
|
);
|
|
58173
58200
|
}
|
|
58174
|
-
function listDefinitions(config2, docs) {
|
|
58201
|
+
function listDefinitions(config2, body, docs) {
|
|
58175
58202
|
const lists = [];
|
|
58176
58203
|
const visitedLists = /* @__PURE__ */ new Set();
|
|
58177
58204
|
for (const doc of docs) {
|
|
@@ -58228,7 +58255,8 @@ function listDefinitions(config2, docs) {
|
|
|
58228
58255
|
tsTypeReference(
|
|
58229
58256
|
config2,
|
|
58230
58257
|
/* @__PURE__ */ new Set(),
|
|
58231
|
-
arg
|
|
58258
|
+
arg,
|
|
58259
|
+
body
|
|
58232
58260
|
)
|
|
58233
58261
|
)
|
|
58234
58262
|
);
|
|
@@ -58422,9 +58450,9 @@ async function definitionsGenerator(config2) {
|
|
|
58422
58450
|
).code;
|
|
58423
58451
|
const typeDefinitions2 = enums.sort((a, b) => a.name.value.localeCompare(b.name.value)).map(
|
|
58424
58452
|
(definition) => `
|
|
58425
|
-
export
|
|
58426
|
-
${definition.values?.map((value) => ` ${value.name.value}
|
|
58427
|
-
}
|
|
58453
|
+
export const ${definition.name.value} = {
|
|
58454
|
+
${definition.values?.map((value) => ` ${value.name.value}: "${value.name.value}"`).join(",\n")}
|
|
58455
|
+
} as const
|
|
58428
58456
|
`
|
|
58429
58457
|
).join("");
|
|
58430
58458
|
const definitionsIndex = `
|
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
package/build/lib-cjs/index.js
CHANGED
|
@@ -61562,7 +61562,7 @@ function mergeSchemas(config) {
|
|
|
61562
61562
|
// src/lib/config.ts
|
|
61563
61563
|
var graphql2 = __toESM(require_graphql2(), 1);
|
|
61564
61564
|
var import_minimatch = __toESM(require_minimatch(), 1);
|
|
61565
|
-
var
|
|
61565
|
+
var import_node_url2 = require("node:url");
|
|
61566
61566
|
|
|
61567
61567
|
// src/runtime/imports/config.ts
|
|
61568
61568
|
var config_default = {};
|
|
@@ -61708,10 +61708,10 @@ __export(fs_exports, {
|
|
|
61708
61708
|
writeFile: () => writeFile
|
|
61709
61709
|
});
|
|
61710
61710
|
var import_fs_extra = __toESM(require_lib(), 1);
|
|
61711
|
-
var import_promises = __toESM(require("fs/promises"), 1);
|
|
61712
61711
|
var import_glob = __toESM(require_glob(), 1);
|
|
61713
61712
|
var import_memfs = __toESM(require_lib2(), 1);
|
|
61714
|
-
var
|
|
61713
|
+
var import_promises = __toESM(require("node:fs/promises"), 1);
|
|
61714
|
+
var import_node_util = require("node:util");
|
|
61715
61715
|
|
|
61716
61716
|
// src/lib/path.ts
|
|
61717
61717
|
var path_exports = {};
|
|
@@ -61728,36 +61728,36 @@ __export(path_exports, {
|
|
|
61728
61728
|
resolve: () => resolve,
|
|
61729
61729
|
sep: () => sep
|
|
61730
61730
|
});
|
|
61731
|
-
var
|
|
61732
|
-
var
|
|
61731
|
+
var import_node_os = __toESM(require("node:os"), 1);
|
|
61732
|
+
var import_node_path = __toESM(require("node:path"), 1);
|
|
61733
61733
|
var sep = "/";
|
|
61734
61734
|
function resolve(...parts) {
|
|
61735
|
-
return posixify(
|
|
61735
|
+
return posixify(import_node_path.default.resolve(...parts));
|
|
61736
61736
|
}
|
|
61737
61737
|
function join2(...parts) {
|
|
61738
|
-
return posixify(
|
|
61738
|
+
return posixify(import_node_path.default.join(...parts));
|
|
61739
61739
|
}
|
|
61740
61740
|
function extname(target) {
|
|
61741
|
-
return
|
|
61741
|
+
return import_node_path.default.extname(target);
|
|
61742
61742
|
}
|
|
61743
61743
|
function relative(from, to) {
|
|
61744
|
-
return posixify(
|
|
61744
|
+
return posixify(import_node_path.default.relative(from, to));
|
|
61745
61745
|
}
|
|
61746
61746
|
function basename(target) {
|
|
61747
|
-
return
|
|
61747
|
+
return import_node_path.default.basename(target);
|
|
61748
61748
|
}
|
|
61749
61749
|
function dirname(target) {
|
|
61750
|
-
return
|
|
61750
|
+
return import_node_path.default.dirname(target);
|
|
61751
61751
|
}
|
|
61752
61752
|
function isAbsolute(target) {
|
|
61753
|
-
return
|
|
61753
|
+
return import_node_path.default.isAbsolute(target);
|
|
61754
61754
|
}
|
|
61755
61755
|
function parse2(target) {
|
|
61756
|
-
return
|
|
61756
|
+
return import_node_path.default.parse(target);
|
|
61757
61757
|
}
|
|
61758
61758
|
var posixify = (str) => str.replace(/\\/g, "/");
|
|
61759
61759
|
function importPath(target) {
|
|
61760
|
-
return ["win32", "win64"].includes(
|
|
61760
|
+
return ["win32", "win64"].includes(import_node_os.default.platform()) ? "file:///" + target : target;
|
|
61761
61761
|
}
|
|
61762
61762
|
|
|
61763
61763
|
// src/lib/fs.ts
|
|
@@ -61881,7 +61881,7 @@ async function rmdir(filepath) {
|
|
|
61881
61881
|
recursive: true
|
|
61882
61882
|
});
|
|
61883
61883
|
}
|
|
61884
|
-
return await (0,
|
|
61884
|
+
return await (0, import_node_util.promisify)(import_memfs.fs.rmdir)(filepath);
|
|
61885
61885
|
}
|
|
61886
61886
|
async function stat(filepath) {
|
|
61887
61887
|
if (!houdini_mode.is_testing) {
|
|
@@ -61959,7 +61959,7 @@ async function recursiveCopy(source, target, transforms, notRoot) {
|
|
|
61959
61959
|
}
|
|
61960
61960
|
}
|
|
61961
61961
|
async function glob(pattern) {
|
|
61962
|
-
return await (0,
|
|
61962
|
+
return await (0, import_node_util.promisify)(import_glob.glob)(posixify(pattern));
|
|
61963
61963
|
}
|
|
61964
61964
|
glob.hasMagic = import_glob.glob.hasMagic;
|
|
61965
61965
|
|
|
@@ -62014,7 +62014,7 @@ var dist_default = dataUriToBuffer;
|
|
|
62014
62014
|
|
|
62015
62015
|
// ../../node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/body.js
|
|
62016
62016
|
var import_node_stream = __toESM(require("node:stream"), 1);
|
|
62017
|
-
var
|
|
62017
|
+
var import_node_util2 = require("node:util");
|
|
62018
62018
|
var import_node_buffer = require("node:buffer");
|
|
62019
62019
|
init_fetch_blob();
|
|
62020
62020
|
init_esm_min();
|
|
@@ -62068,7 +62068,7 @@ var isSameProtocol = (destination, original) => {
|
|
|
62068
62068
|
};
|
|
62069
62069
|
|
|
62070
62070
|
// ../../node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/body.js
|
|
62071
|
-
var pipeline = (0,
|
|
62071
|
+
var pipeline = (0, import_node_util2.promisify)(import_node_stream.default.pipeline);
|
|
62072
62072
|
var INTERNALS = Symbol("Body internals");
|
|
62073
62073
|
var Body = class {
|
|
62074
62074
|
constructor(body, {
|
|
@@ -62081,7 +62081,7 @@ var Body = class {
|
|
|
62081
62081
|
body = import_node_buffer.Buffer.from(body.toString());
|
|
62082
62082
|
} else if (isBlob(body)) {
|
|
62083
62083
|
} else if (import_node_buffer.Buffer.isBuffer(body)) {
|
|
62084
|
-
} else if (
|
|
62084
|
+
} else if (import_node_util2.types.isAnyArrayBuffer(body)) {
|
|
62085
62085
|
body = import_node_buffer.Buffer.from(body);
|
|
62086
62086
|
} else if (ArrayBuffer.isView(body)) {
|
|
62087
62087
|
body = import_node_buffer.Buffer.from(body.buffer, body.byteOffset, body.byteLength);
|
|
@@ -62155,7 +62155,7 @@ var Body = class {
|
|
|
62155
62155
|
return consumeBody(this);
|
|
62156
62156
|
}
|
|
62157
62157
|
};
|
|
62158
|
-
Body.prototype.buffer = (0,
|
|
62158
|
+
Body.prototype.buffer = (0, import_node_util2.deprecate)(Body.prototype.buffer, "Please use 'response.arrayBuffer()' instead of 'response.buffer()'", "node-fetch#buffer");
|
|
62159
62159
|
Object.defineProperties(Body.prototype, {
|
|
62160
62160
|
body: { enumerable: true },
|
|
62161
62161
|
bodyUsed: { enumerable: true },
|
|
@@ -62163,7 +62163,7 @@ Object.defineProperties(Body.prototype, {
|
|
|
62163
62163
|
blob: { enumerable: true },
|
|
62164
62164
|
json: { enumerable: true },
|
|
62165
62165
|
text: { enumerable: true },
|
|
62166
|
-
data: { get: (0,
|
|
62166
|
+
data: { get: (0, import_node_util2.deprecate)(
|
|
62167
62167
|
() => {
|
|
62168
62168
|
},
|
|
62169
62169
|
"data doesn't exist, use json(), text(), arrayBuffer(), or body instead",
|
|
@@ -62231,7 +62231,7 @@ var clone = (instance, highWaterMark) => {
|
|
|
62231
62231
|
}
|
|
62232
62232
|
return body;
|
|
62233
62233
|
};
|
|
62234
|
-
var getNonSpecFormDataBoundary = (0,
|
|
62234
|
+
var getNonSpecFormDataBoundary = (0, import_node_util2.deprecate)(
|
|
62235
62235
|
(body) => body.getBoundary(),
|
|
62236
62236
|
"form-data doesn't follow the spec and requires special treatment. Use alternative package",
|
|
62237
62237
|
"https://github.com/node-fetch/node-fetch/issues/1167"
|
|
@@ -62249,7 +62249,7 @@ var extractContentType = (body, request) => {
|
|
|
62249
62249
|
if (isBlob(body)) {
|
|
62250
62250
|
return body.type || null;
|
|
62251
62251
|
}
|
|
62252
|
-
if (import_node_buffer.Buffer.isBuffer(body) ||
|
|
62252
|
+
if (import_node_buffer.Buffer.isBuffer(body) || import_node_util2.types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) {
|
|
62253
62253
|
return null;
|
|
62254
62254
|
}
|
|
62255
62255
|
if (body instanceof FormData) {
|
|
@@ -62288,7 +62288,7 @@ var writeToStream = async (dest, { body }) => {
|
|
|
62288
62288
|
};
|
|
62289
62289
|
|
|
62290
62290
|
// ../../node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/headers.js
|
|
62291
|
-
var
|
|
62291
|
+
var import_node_util3 = require("node:util");
|
|
62292
62292
|
var import_node_http = __toESM(require("node:http"), 1);
|
|
62293
62293
|
var validateHeaderName = typeof import_node_http.default.validateHeaderName === "function" ? import_node_http.default.validateHeaderName : (name) => {
|
|
62294
62294
|
if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(name)) {
|
|
@@ -62313,7 +62313,7 @@ var Headers = class extends URLSearchParams {
|
|
|
62313
62313
|
result.push(...values.map((value) => [name, value]));
|
|
62314
62314
|
}
|
|
62315
62315
|
} else if (init == null) {
|
|
62316
|
-
} else if (typeof init === "object" && !
|
|
62316
|
+
} else if (typeof init === "object" && !import_node_util3.types.isBoxedPrimitive(init)) {
|
|
62317
62317
|
const method = init[Symbol.iterator];
|
|
62318
62318
|
if (method == null) {
|
|
62319
62319
|
result.push(...Object.entries(init));
|
|
@@ -62322,7 +62322,7 @@ var Headers = class extends URLSearchParams {
|
|
|
62322
62322
|
throw new TypeError("Header pairs must be iterable");
|
|
62323
62323
|
}
|
|
62324
62324
|
result = [...init].map((pair) => {
|
|
62325
|
-
if (typeof pair !== "object" ||
|
|
62325
|
+
if (typeof pair !== "object" || import_node_util3.types.isBoxedPrimitive(pair)) {
|
|
62326
62326
|
throw new TypeError("Each header pair must be an iterable object");
|
|
62327
62327
|
}
|
|
62328
62328
|
return [...pair];
|
|
@@ -62569,7 +62569,7 @@ Object.defineProperties(Response.prototype, {
|
|
|
62569
62569
|
|
|
62570
62570
|
// ../../node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/request.js
|
|
62571
62571
|
var import_node_url = require("node:url");
|
|
62572
|
-
var
|
|
62572
|
+
var import_node_util4 = require("node:util");
|
|
62573
62573
|
|
|
62574
62574
|
// ../../node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/utils/get-search.js
|
|
62575
62575
|
var getSearch = (parsedURL) => {
|
|
@@ -62726,7 +62726,7 @@ var INTERNALS3 = Symbol("Request internals");
|
|
|
62726
62726
|
var isRequest = (object) => {
|
|
62727
62727
|
return typeof object === "object" && typeof object[INTERNALS3] === "object";
|
|
62728
62728
|
};
|
|
62729
|
-
var doBadDataWarn = (0,
|
|
62729
|
+
var doBadDataWarn = (0, import_node_util4.deprecate)(
|
|
62730
62730
|
() => {
|
|
62731
62731
|
},
|
|
62732
62732
|
".data is not a valid RequestInit property, use .body instead",
|
|
@@ -63230,7 +63230,7 @@ var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
|
|
|
63230
63230
|
|
|
63231
63231
|
// src/lib/config.ts
|
|
63232
63232
|
var import_meta = {};
|
|
63233
|
-
var currentDir = global.__dirname || dirname((0,
|
|
63233
|
+
var currentDir = global.__dirname || dirname((0, import_node_url2.fileURLToPath)(import_meta.url));
|
|
63234
63234
|
var Config = class {
|
|
63235
63235
|
filepath;
|
|
63236
63236
|
rootDir;
|
|
@@ -63721,13 +63721,16 @@ var pendingConfigPromise = null;
|
|
|
63721
63721
|
async function getConfig({
|
|
63722
63722
|
configPath = DEFAULT_CONFIG_PATH,
|
|
63723
63723
|
noSchema,
|
|
63724
|
+
forceReload,
|
|
63724
63725
|
...extraConfig
|
|
63725
63726
|
} = {}) {
|
|
63726
|
-
if (
|
|
63727
|
-
|
|
63728
|
-
|
|
63729
|
-
|
|
63730
|
-
|
|
63727
|
+
if (!forceReload) {
|
|
63728
|
+
if (_config) {
|
|
63729
|
+
return _config;
|
|
63730
|
+
}
|
|
63731
|
+
if (pendingConfigPromise) {
|
|
63732
|
+
return await pendingConfigPromise;
|
|
63733
|
+
}
|
|
63731
63734
|
}
|
|
63732
63735
|
let resolve2 = () => {
|
|
63733
63736
|
};
|
|
@@ -63745,7 +63748,7 @@ async function getConfig({
|
|
|
63745
63748
|
if (!pluginName.startsWith(".")) {
|
|
63746
63749
|
pluginFile = await pluginPath(pluginName, configPath);
|
|
63747
63750
|
}
|
|
63748
|
-
const { default: pluginInit } = await import((0,
|
|
63751
|
+
const { default: pluginInit } = await import((0, import_node_url2.pathToFileURL)(pluginFile).toString());
|
|
63749
63752
|
if (!pluginInit.plugin || !pluginInit.name) {
|
|
63750
63753
|
throw new HoudiniError({
|
|
63751
63754
|
filepath: pluginFile,
|
|
@@ -63922,8 +63925,8 @@ async function loadSchemaFile(schemaPath) {
|
|
|
63922
63925
|
}
|
|
63923
63926
|
|
|
63924
63927
|
// src/lib/graphql.ts
|
|
63925
|
-
var import_crypto = __toESM(require("crypto"), 1);
|
|
63926
63928
|
var graphql3 = __toESM(require_graphql2(), 1);
|
|
63929
|
+
var import_node_crypto = __toESM(require("node:crypto"), 1);
|
|
63927
63930
|
function getRootType(type) {
|
|
63928
63931
|
if (graphql3.isNonNullType(type)) {
|
|
63929
63932
|
return getRootType(type.ofType);
|
|
@@ -63937,7 +63940,7 @@ function hashDocument({
|
|
|
63937
63940
|
document
|
|
63938
63941
|
}) {
|
|
63939
63942
|
const docString = typeof document === "string" ? document : document.artifact?.raw;
|
|
63940
|
-
return
|
|
63943
|
+
return import_node_crypto.default.createHash("sha256").update(docString ?? "").digest("hex");
|
|
63941
63944
|
}
|
|
63942
63945
|
function parentTypeFromAncestors(schema, filepath, ancestors) {
|
|
63943
63946
|
const parents = [...ancestors];
|
package/build/lib-esm/index.js
CHANGED
|
@@ -61518,7 +61518,7 @@ function mergeSchemas(config) {
|
|
|
61518
61518
|
// src/lib/config.ts
|
|
61519
61519
|
var graphql2 = __toESM(require_graphql2(), 1);
|
|
61520
61520
|
var import_minimatch = __toESM(require_minimatch(), 1);
|
|
61521
|
-
import { fileURLToPath, pathToFileURL } from "url";
|
|
61521
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
61522
61522
|
|
|
61523
61523
|
// src/runtime/imports/config.ts
|
|
61524
61524
|
var config_default = {};
|
|
@@ -61666,8 +61666,8 @@ __export(fs_exports, {
|
|
|
61666
61666
|
var import_fs_extra = __toESM(require_lib(), 1);
|
|
61667
61667
|
var import_glob = __toESM(require_glob(), 1);
|
|
61668
61668
|
var import_memfs = __toESM(require_lib2(), 1);
|
|
61669
|
-
import fs from "fs/promises";
|
|
61670
|
-
import { promisify } from "util";
|
|
61669
|
+
import fs from "node:fs/promises";
|
|
61670
|
+
import { promisify } from "node:util";
|
|
61671
61671
|
|
|
61672
61672
|
// src/lib/path.ts
|
|
61673
61673
|
var path_exports = {};
|
|
@@ -61684,8 +61684,8 @@ __export(path_exports, {
|
|
|
61684
61684
|
resolve: () => resolve,
|
|
61685
61685
|
sep: () => sep
|
|
61686
61686
|
});
|
|
61687
|
-
import os from "os";
|
|
61688
|
-
import path from "path";
|
|
61687
|
+
import os from "node:os";
|
|
61688
|
+
import path from "node:path";
|
|
61689
61689
|
var sep = "/";
|
|
61690
61690
|
function resolve(...parts) {
|
|
61691
61691
|
return posixify(path.resolve(...parts));
|
|
@@ -63676,13 +63676,16 @@ var pendingConfigPromise = null;
|
|
|
63676
63676
|
async function getConfig({
|
|
63677
63677
|
configPath = DEFAULT_CONFIG_PATH,
|
|
63678
63678
|
noSchema,
|
|
63679
|
+
forceReload,
|
|
63679
63680
|
...extraConfig
|
|
63680
63681
|
} = {}) {
|
|
63681
|
-
if (
|
|
63682
|
-
|
|
63683
|
-
|
|
63684
|
-
|
|
63685
|
-
|
|
63682
|
+
if (!forceReload) {
|
|
63683
|
+
if (_config) {
|
|
63684
|
+
return _config;
|
|
63685
|
+
}
|
|
63686
|
+
if (pendingConfigPromise) {
|
|
63687
|
+
return await pendingConfigPromise;
|
|
63688
|
+
}
|
|
63686
63689
|
}
|
|
63687
63690
|
let resolve2 = () => {
|
|
63688
63691
|
};
|
|
@@ -63878,7 +63881,7 @@ async function loadSchemaFile(schemaPath) {
|
|
|
63878
63881
|
|
|
63879
63882
|
// src/lib/graphql.ts
|
|
63880
63883
|
var graphql3 = __toESM(require_graphql2(), 1);
|
|
63881
|
-
import crypto from "crypto";
|
|
63884
|
+
import crypto from "node:crypto";
|
|
63882
63885
|
function getRootType(type) {
|
|
63883
63886
|
if (graphql3.isNonNullType(type)) {
|
|
63884
63887
|
return getRootType(type.ofType);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ConfigFile } from '../lib/config';
|
|
2
|
-
import type { GraphQLObject, GraphQLValue, SubscriptionSelection, SubscriptionSpec } from '../lib/types';
|
|
2
|
+
import type { GraphQLObject, GraphQLValue, NestedList, SubscriptionSelection, SubscriptionSpec } from '../lib/types';
|
|
3
3
|
import { GarbageCollector } from './gc';
|
|
4
4
|
import type { ListCollection } from './lists';
|
|
5
5
|
import { ListManager } from './lists';
|
|
@@ -34,7 +34,8 @@ export declare class Cache {
|
|
|
34
34
|
list(name: string, parentID?: string, allLists?: boolean): ListCollection;
|
|
35
35
|
delete(id: string): void;
|
|
36
36
|
setConfig(config: ConfigFile): void;
|
|
37
|
-
markTypeStale(
|
|
37
|
+
markTypeStale(options?: {
|
|
38
|
+
type: string;
|
|
38
39
|
field?: string;
|
|
39
40
|
when?: {};
|
|
40
41
|
}): void;
|
|
@@ -98,10 +99,10 @@ declare class CacheInternal {
|
|
|
98
99
|
hydrateNestedList({ fields, variables, linkedList, stepsFromConnection, }: {
|
|
99
100
|
fields: SubscriptionSelection;
|
|
100
101
|
variables?: {};
|
|
101
|
-
linkedList:
|
|
102
|
+
linkedList: NestedList;
|
|
102
103
|
stepsFromConnection: number | null;
|
|
103
104
|
}): {
|
|
104
|
-
data:
|
|
105
|
+
data: NestedList<GraphQLValue>;
|
|
105
106
|
partial: boolean;
|
|
106
107
|
stale: boolean;
|
|
107
108
|
hasData: boolean;
|
|
@@ -119,11 +120,10 @@ declare class CacheInternal {
|
|
|
119
120
|
layer: Layer;
|
|
120
121
|
forceNotify?: boolean;
|
|
121
122
|
}): {
|
|
122
|
-
nestedIDs:
|
|
123
|
+
nestedIDs: NestedList;
|
|
123
124
|
newIDs: (string | null)[];
|
|
124
125
|
};
|
|
125
126
|
collectGarbage(): void;
|
|
126
127
|
}
|
|
127
128
|
export declare const rootID = "_ROOT_";
|
|
128
|
-
export type LinkedList<_Result = string> = (_Result | null | LinkedList<_Result>)[];
|
|
129
129
|
export {};
|
|
@@ -21,7 +21,7 @@ export declare class InMemoryStorage {
|
|
|
21
21
|
kind: 'link' | 'scalar' | 'unknown';
|
|
22
22
|
displayLayers: number[];
|
|
23
23
|
};
|
|
24
|
-
writeLink(id: string, field: string, value: string |
|
|
24
|
+
writeLink(id: string, field: string, value: string | NestedList): number;
|
|
25
25
|
writeField(id: string, field: string, value: GraphQLValue): number;
|
|
26
26
|
resolveLayer(id: number): void;
|
|
27
27
|
get topLayer(): Layer;
|
|
@@ -37,7 +37,7 @@ export declare class Layer {
|
|
|
37
37
|
get(id: string, field: string): [GraphQLField, 'link' | 'scalar'];
|
|
38
38
|
getOperations(id: string, field: string): Operation[] | undefined;
|
|
39
39
|
writeField(id: string, field: string, value: GraphQLField): LayerID;
|
|
40
|
-
writeLink(id: string, field: string, value: null | string |
|
|
40
|
+
writeLink(id: string, field: string, value: null | string | NestedList): LayerID;
|
|
41
41
|
isDisplayLayer(displayLayers: number[]): boolean;
|
|
42
42
|
clear(): void;
|
|
43
43
|
replaceID({ from, to }: {
|
|
@@ -52,14 +52,14 @@ export declare class Layer {
|
|
|
52
52
|
writeLayer(layer: Layer): void;
|
|
53
53
|
private addFieldOperation;
|
|
54
54
|
}
|
|
55
|
-
type GraphQLField = GraphQLValue |
|
|
55
|
+
type GraphQLField = GraphQLValue | NestedList;
|
|
56
56
|
type EntityMap<_Value> = {
|
|
57
57
|
[id: string]: {
|
|
58
58
|
[field: string]: _Value;
|
|
59
59
|
};
|
|
60
60
|
};
|
|
61
61
|
type EntityFieldMap = EntityMap<GraphQLField>;
|
|
62
|
-
type LinkMap = EntityMap<string | null |
|
|
62
|
+
type LinkMap = EntityMap<string | null | NestedList>;
|
|
63
63
|
type OperationMap = {
|
|
64
64
|
[id: string]: {
|
|
65
65
|
deleted?: boolean;
|
|
@@ -69,7 +69,7 @@ type OperationMap = {
|
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
|
-
type
|
|
72
|
+
type NestedList<_Result = string> = (_Result | null | NestedList<_Result>)[];
|
|
73
73
|
type InsertOperation = {
|
|
74
74
|
kind: OperationKind.insert;
|
|
75
75
|
location: OperationLocation;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { GraphQLValue } from '../lib/types';
|
|
2
|
-
import type { LinkedList } from './cache';
|
|
3
|
-
export declare function flattenList<T>(source: LinkedList<T>): T[];
|
|
4
2
|
export declare function evaluateKey(key: string, variables?: {
|
|
5
3
|
[key: string]: GraphQLValue;
|
|
6
4
|
}): string;
|