houdini 1.2.12 → 1.2.13
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/init.d.ts +1 -0
- package/build/cmd-cjs/index.js +36 -31
- package/build/cmd-esm/index.js +35 -30
- package/build/codegen-cjs/index.js +7 -8
- package/build/codegen-esm/index.js +7 -8
- package/build/lib/index.d.ts +1 -1
- package/build/{router → lib/router}/conventions.d.ts +1 -1
- package/build/{router → lib/router}/index.d.ts +1 -1
- package/build/{router → lib/router}/manifest.d.ts +2 -2
- package/build/{router → lib/router}/server.d.ts +2 -2
- package/build/{router → lib/router}/types.d.ts +1 -1
- package/build/lib/types.d.ts +1 -1
- package/build/lib-cjs/index.js +8 -8
- package/build/lib-esm/index.js +6 -6
- package/build/test-cjs/index.js +11 -8
- package/build/test-esm/index.js +11 -8
- package/build/vite-cjs/index.js +15 -13
- package/build/vite-esm/index.js +14 -12
- package/package.json +1 -9
- package/build/router-cjs/index.js +0 -57736
- package/build/router-cjs/package.json +0 -1
- package/build/router-esm/index.js +0 -57726
- package/build/router-esm/package.json +0 -1
package/build/cmd/init.d.ts
CHANGED
package/build/cmd-cjs/index.js
CHANGED
|
@@ -69062,16 +69062,16 @@ async function find_graphql(config2, parsedScript, walker) {
|
|
|
69062
69062
|
});
|
|
69063
69063
|
}
|
|
69064
69064
|
|
|
69065
|
-
// src/router/manifest.ts
|
|
69065
|
+
// src/lib/router/manifest.ts
|
|
69066
69066
|
var t2 = __toESM(require_lib6(), 1);
|
|
69067
69067
|
var graphql5 = __toESM(require("graphql"), 1);
|
|
69068
69068
|
|
|
69069
|
-
// src/router/server.ts
|
|
69069
|
+
// src/lib/router/server.ts
|
|
69070
69070
|
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
69071
|
-
var import_vite = require("vite");
|
|
69072
69071
|
async function loadLocalSchema(config2) {
|
|
69072
|
+
const { build } = await import("vite");
|
|
69073
69073
|
process.env.HOUDINI_SCHEMA_BUILD = "true";
|
|
69074
|
-
await
|
|
69074
|
+
await build({
|
|
69075
69075
|
logLevel: "silent",
|
|
69076
69076
|
build: {
|
|
69077
69077
|
outDir: import_node_path2.default.join(config2.rootDir, "temp"),
|
|
@@ -70103,9 +70103,11 @@ function serializeValue(value) {
|
|
|
70103
70103
|
}
|
|
70104
70104
|
if (typeof value === "object" && value !== null) {
|
|
70105
70105
|
return AST4.objectExpression(
|
|
70106
|
-
Object.entries(value).filter(
|
|
70107
|
-
([key, value2]) =>
|
|
70108
|
-
)
|
|
70106
|
+
Object.entries(value).filter(
|
|
70107
|
+
([key, value2]) => typeof value2 !== "undefined" && key !== "prev" && key !== "next"
|
|
70108
|
+
).map(([key, val]) => {
|
|
70109
|
+
return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
|
|
70110
|
+
})
|
|
70109
70111
|
);
|
|
70110
70112
|
}
|
|
70111
70113
|
if (typeof value === "string") {
|
|
@@ -74336,7 +74338,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
|
|
|
74336
74338
|
if (missing.length > 0) {
|
|
74337
74339
|
ctx.reportError(
|
|
74338
74340
|
new graphql26.GraphQLError(
|
|
74339
|
-
|
|
74341
|
+
`The following arguments are missing from the "${fragmentName}" fragment: ` + JSON.stringify(missing)
|
|
74340
74342
|
)
|
|
74341
74343
|
);
|
|
74342
74344
|
return;
|
|
@@ -75796,20 +75798,23 @@ async function init2(_path, args) {
|
|
|
75796
75798
|
}
|
|
75797
75799
|
}
|
|
75798
75800
|
let url = "http://localhost:5173/api/graphql";
|
|
75799
|
-
|
|
75800
|
-
|
|
75801
|
-
|
|
75802
|
-
|
|
75803
|
-
|
|
75804
|
-
|
|
75805
|
-
|
|
75806
|
-
|
|
75807
|
-
|
|
75808
|
-
|
|
75809
|
-
|
|
75801
|
+
let is_remote_endpoint = true;
|
|
75802
|
+
if (!args.yes) {
|
|
75803
|
+
is_remote_endpoint = (await $e(
|
|
75804
|
+
{
|
|
75805
|
+
is_remote_endpoint: () => Q2({
|
|
75806
|
+
message: "Will you use a remote GraphQL API?",
|
|
75807
|
+
initialValue: true
|
|
75808
|
+
})
|
|
75809
|
+
},
|
|
75810
|
+
{
|
|
75811
|
+
onCancel: () => pCancel()
|
|
75812
|
+
}
|
|
75813
|
+
)).is_remote_endpoint;
|
|
75814
|
+
}
|
|
75810
75815
|
let schemaPath = is_remote_endpoint ? "./schema.graphql" : "path/to/src/lib/**/*.graphql";
|
|
75811
75816
|
let pullSchema_content = null;
|
|
75812
|
-
if (is_remote_endpoint) {
|
|
75817
|
+
if (is_remote_endpoint && !args.yes) {
|
|
75813
75818
|
let number_of_round = 0;
|
|
75814
75819
|
let url_and_headers = "";
|
|
75815
75820
|
while (pullSchema_content === null && number_of_round < 10) {
|
|
@@ -75849,7 +75854,7 @@ async function init2(_path, args) {
|
|
|
75849
75854
|
if (pullSchema_content === null) {
|
|
75850
75855
|
pCancel("We couldn't pull the schema. Please check your URL/headers and try again.");
|
|
75851
75856
|
}
|
|
75852
|
-
} else {
|
|
75857
|
+
} else if (!args.yes) {
|
|
75853
75858
|
const answers = await $e(
|
|
75854
75859
|
{
|
|
75855
75860
|
schema_path: () => J2({
|
|
@@ -75942,7 +75947,7 @@ function finale_logs(package_manager) {
|
|
|
75942
75947
|
)
|
|
75943
75948
|
);
|
|
75944
75949
|
}
|
|
75945
|
-
|
|
75950
|
+
async function houdiniConfig(configPath, schemaPath, module2, frameworkInfo, url) {
|
|
75946
75951
|
const config2 = {};
|
|
75947
75952
|
if (url !== null) {
|
|
75948
75953
|
config2.watchSchema = {
|
|
@@ -75980,8 +75985,8 @@ module.exports = config
|
|
|
75980
75985
|
`;
|
|
75981
75986
|
await fs_exports.writeFile(configPath, content);
|
|
75982
75987
|
return false;
|
|
75983
|
-
}
|
|
75984
|
-
|
|
75988
|
+
}
|
|
75989
|
+
async function houdiniClient(targetPath, typescript, frameworkInfo, url) {
|
|
75985
75990
|
const houdiniClientExt = typescript ? `ts` : `js`;
|
|
75986
75991
|
const houdiniClientPath = path_exports.join(targetPath, `client.${houdiniClientExt}`);
|
|
75987
75992
|
const content = `import { HoudiniClient } from '$houdini';
|
|
@@ -75991,8 +75996,8 @@ export default new HoudiniClient({
|
|
|
75991
75996
|
|
|
75992
75997
|
// uncomment this to configure the network call (for things like authentication)
|
|
75993
75998
|
// for more information, please visit here: https://www.houdinigraphql.com/guides/authentication
|
|
75994
|
-
// fetchParams({ session }) {
|
|
75995
|
-
// return {
|
|
75999
|
+
// fetchParams({ session }) {
|
|
76000
|
+
// return {
|
|
75996
76001
|
// headers: {
|
|
75997
76002
|
// Authentication: \`Bearer \${session.token}\`,
|
|
75998
76003
|
// }
|
|
@@ -76001,7 +76006,7 @@ export default new HoudiniClient({
|
|
|
76001
76006
|
})
|
|
76002
76007
|
`;
|
|
76003
76008
|
await fs_exports.writeFile(houdiniClientPath, content);
|
|
76004
|
-
}
|
|
76009
|
+
}
|
|
76005
76010
|
async function svelteKitConfig(targetPath, typescript) {
|
|
76006
76011
|
const svelteMainJsPath = path_exports.join(targetPath, "src", typescript ? "main.ts" : "main.js");
|
|
76007
76012
|
const newContent = `import client from "./client";
|
|
@@ -76091,7 +76096,7 @@ export default defineConfig({
|
|
|
76091
76096
|
$houdini: path.resolve('$houdini'),
|
|
76092
76097
|
},
|
|
76093
76098
|
},
|
|
76094
|
-
})
|
|
76099
|
+
})
|
|
76095
76100
|
`;
|
|
76096
76101
|
} else if (frameworkInfo.framework === "kit") {
|
|
76097
76102
|
content = `import { sveltekit } from '@sveltejs/kit/vite'
|
|
@@ -76150,12 +76155,12 @@ async function packageJSON(targetPath, frameworkInfo) {
|
|
|
76150
76155
|
}
|
|
76151
76156
|
packageJSON2.devDependencies = {
|
|
76152
76157
|
...packageJSON2.devDependencies,
|
|
76153
|
-
houdini: "^1.2.
|
|
76158
|
+
houdini: "^1.2.13"
|
|
76154
76159
|
};
|
|
76155
76160
|
if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
|
|
76156
76161
|
packageJSON2.devDependencies = {
|
|
76157
76162
|
...packageJSON2.devDependencies,
|
|
76158
|
-
"houdini-svelte": "^1.2.
|
|
76163
|
+
"houdini-svelte": "^1.2.13"
|
|
76159
76164
|
};
|
|
76160
76165
|
} else {
|
|
76161
76166
|
throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
|
|
@@ -76175,7 +76180,7 @@ program2.command("generate").description("generate the application runtime").opt
|
|
|
76175
76180
|
program2.command("init").arguments("[path]").usage("[path] [options]").description("initialize a new houdini project").option(
|
|
76176
76181
|
"-h, --headers <headers...>",
|
|
76177
76182
|
"header to use when pulling your schema. Should be passed as KEY=VALUE"
|
|
76178
|
-
).action(init2);
|
|
76183
|
+
).option("-y, --yes", "dont prompt for input. uses default values or empty strings").action(init2);
|
|
76179
76184
|
program2.command("pull-schema").usage("[options]").description("pull the latest schema from your api").option(
|
|
76180
76185
|
"-h, --headers <headers...>",
|
|
76181
76186
|
"headers to use when pulling your schema. Should be passed as KEY=VALUE"
|
package/build/cmd-esm/index.js
CHANGED
|
@@ -69067,14 +69067,14 @@ async function find_graphql(config2, parsedScript, walker) {
|
|
|
69067
69067
|
});
|
|
69068
69068
|
}
|
|
69069
69069
|
|
|
69070
|
-
// src/router/manifest.ts
|
|
69070
|
+
// src/lib/router/manifest.ts
|
|
69071
69071
|
var t2 = __toESM(require_lib6(), 1);
|
|
69072
69072
|
import * as graphql5 from "graphql";
|
|
69073
69073
|
|
|
69074
|
-
// src/router/server.ts
|
|
69074
|
+
// src/lib/router/server.ts
|
|
69075
69075
|
import path2 from "node:path";
|
|
69076
|
-
import { build } from "vite";
|
|
69077
69076
|
async function loadLocalSchema(config2) {
|
|
69077
|
+
const { build } = await import("vite");
|
|
69078
69078
|
process.env.HOUDINI_SCHEMA_BUILD = "true";
|
|
69079
69079
|
await build({
|
|
69080
69080
|
logLevel: "silent",
|
|
@@ -70108,9 +70108,11 @@ function serializeValue(value) {
|
|
|
70108
70108
|
}
|
|
70109
70109
|
if (typeof value === "object" && value !== null) {
|
|
70110
70110
|
return AST4.objectExpression(
|
|
70111
|
-
Object.entries(value).filter(
|
|
70112
|
-
([key, value2]) =>
|
|
70113
|
-
)
|
|
70111
|
+
Object.entries(value).filter(
|
|
70112
|
+
([key, value2]) => typeof value2 !== "undefined" && key !== "prev" && key !== "next"
|
|
70113
|
+
).map(([key, val]) => {
|
|
70114
|
+
return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
|
|
70115
|
+
})
|
|
70114
70116
|
);
|
|
70115
70117
|
}
|
|
70116
70118
|
if (typeof value === "string") {
|
|
@@ -74341,7 +74343,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
|
|
|
74341
74343
|
if (missing.length > 0) {
|
|
74342
74344
|
ctx.reportError(
|
|
74343
74345
|
new graphql26.GraphQLError(
|
|
74344
|
-
|
|
74346
|
+
`The following arguments are missing from the "${fragmentName}" fragment: ` + JSON.stringify(missing)
|
|
74345
74347
|
)
|
|
74346
74348
|
);
|
|
74347
74349
|
return;
|
|
@@ -75801,20 +75803,23 @@ async function init2(_path, args) {
|
|
|
75801
75803
|
}
|
|
75802
75804
|
}
|
|
75803
75805
|
let url = "http://localhost:5173/api/graphql";
|
|
75804
|
-
|
|
75805
|
-
|
|
75806
|
-
|
|
75807
|
-
|
|
75808
|
-
|
|
75809
|
-
|
|
75810
|
-
|
|
75811
|
-
|
|
75812
|
-
|
|
75813
|
-
|
|
75814
|
-
|
|
75806
|
+
let is_remote_endpoint = true;
|
|
75807
|
+
if (!args.yes) {
|
|
75808
|
+
is_remote_endpoint = (await $e(
|
|
75809
|
+
{
|
|
75810
|
+
is_remote_endpoint: () => Q2({
|
|
75811
|
+
message: "Will you use a remote GraphQL API?",
|
|
75812
|
+
initialValue: true
|
|
75813
|
+
})
|
|
75814
|
+
},
|
|
75815
|
+
{
|
|
75816
|
+
onCancel: () => pCancel()
|
|
75817
|
+
}
|
|
75818
|
+
)).is_remote_endpoint;
|
|
75819
|
+
}
|
|
75815
75820
|
let schemaPath = is_remote_endpoint ? "./schema.graphql" : "path/to/src/lib/**/*.graphql";
|
|
75816
75821
|
let pullSchema_content = null;
|
|
75817
|
-
if (is_remote_endpoint) {
|
|
75822
|
+
if (is_remote_endpoint && !args.yes) {
|
|
75818
75823
|
let number_of_round = 0;
|
|
75819
75824
|
let url_and_headers = "";
|
|
75820
75825
|
while (pullSchema_content === null && number_of_round < 10) {
|
|
@@ -75854,7 +75859,7 @@ async function init2(_path, args) {
|
|
|
75854
75859
|
if (pullSchema_content === null) {
|
|
75855
75860
|
pCancel("We couldn't pull the schema. Please check your URL/headers and try again.");
|
|
75856
75861
|
}
|
|
75857
|
-
} else {
|
|
75862
|
+
} else if (!args.yes) {
|
|
75858
75863
|
const answers = await $e(
|
|
75859
75864
|
{
|
|
75860
75865
|
schema_path: () => J2({
|
|
@@ -75947,7 +75952,7 @@ function finale_logs(package_manager) {
|
|
|
75947
75952
|
)
|
|
75948
75953
|
);
|
|
75949
75954
|
}
|
|
75950
|
-
|
|
75955
|
+
async function houdiniConfig(configPath, schemaPath, module, frameworkInfo, url) {
|
|
75951
75956
|
const config2 = {};
|
|
75952
75957
|
if (url !== null) {
|
|
75953
75958
|
config2.watchSchema = {
|
|
@@ -75985,8 +75990,8 @@ module.exports = config
|
|
|
75985
75990
|
`;
|
|
75986
75991
|
await fs_exports.writeFile(configPath, content);
|
|
75987
75992
|
return false;
|
|
75988
|
-
}
|
|
75989
|
-
|
|
75993
|
+
}
|
|
75994
|
+
async function houdiniClient(targetPath, typescript, frameworkInfo, url) {
|
|
75990
75995
|
const houdiniClientExt = typescript ? `ts` : `js`;
|
|
75991
75996
|
const houdiniClientPath = path_exports.join(targetPath, `client.${houdiniClientExt}`);
|
|
75992
75997
|
const content = `import { HoudiniClient } from '$houdini';
|
|
@@ -75996,8 +76001,8 @@ export default new HoudiniClient({
|
|
|
75996
76001
|
|
|
75997
76002
|
// uncomment this to configure the network call (for things like authentication)
|
|
75998
76003
|
// for more information, please visit here: https://www.houdinigraphql.com/guides/authentication
|
|
75999
|
-
// fetchParams({ session }) {
|
|
76000
|
-
// return {
|
|
76004
|
+
// fetchParams({ session }) {
|
|
76005
|
+
// return {
|
|
76001
76006
|
// headers: {
|
|
76002
76007
|
// Authentication: \`Bearer \${session.token}\`,
|
|
76003
76008
|
// }
|
|
@@ -76006,7 +76011,7 @@ export default new HoudiniClient({
|
|
|
76006
76011
|
})
|
|
76007
76012
|
`;
|
|
76008
76013
|
await fs_exports.writeFile(houdiniClientPath, content);
|
|
76009
|
-
}
|
|
76014
|
+
}
|
|
76010
76015
|
async function svelteKitConfig(targetPath, typescript) {
|
|
76011
76016
|
const svelteMainJsPath = path_exports.join(targetPath, "src", typescript ? "main.ts" : "main.js");
|
|
76012
76017
|
const newContent = `import client from "./client";
|
|
@@ -76096,7 +76101,7 @@ export default defineConfig({
|
|
|
76096
76101
|
$houdini: path.resolve('$houdini'),
|
|
76097
76102
|
},
|
|
76098
76103
|
},
|
|
76099
|
-
})
|
|
76104
|
+
})
|
|
76100
76105
|
`;
|
|
76101
76106
|
} else if (frameworkInfo.framework === "kit") {
|
|
76102
76107
|
content = `import { sveltekit } from '@sveltejs/kit/vite'
|
|
@@ -76155,12 +76160,12 @@ async function packageJSON(targetPath, frameworkInfo) {
|
|
|
76155
76160
|
}
|
|
76156
76161
|
packageJSON2.devDependencies = {
|
|
76157
76162
|
...packageJSON2.devDependencies,
|
|
76158
|
-
houdini: "^1.2.
|
|
76163
|
+
houdini: "^1.2.13"
|
|
76159
76164
|
};
|
|
76160
76165
|
if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
|
|
76161
76166
|
packageJSON2.devDependencies = {
|
|
76162
76167
|
...packageJSON2.devDependencies,
|
|
76163
|
-
"houdini-svelte": "^1.2.
|
|
76168
|
+
"houdini-svelte": "^1.2.13"
|
|
76164
76169
|
};
|
|
76165
76170
|
} else {
|
|
76166
76171
|
throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
|
|
@@ -76180,7 +76185,7 @@ program2.command("generate").description("generate the application runtime").opt
|
|
|
76180
76185
|
program2.command("init").arguments("[path]").usage("[path] [options]").description("initialize a new houdini project").option(
|
|
76181
76186
|
"-h, --headers <headers...>",
|
|
76182
76187
|
"header to use when pulling your schema. Should be passed as KEY=VALUE"
|
|
76183
|
-
).action(init2);
|
|
76188
|
+
).option("-y, --yes", "dont prompt for input. uses default values or empty strings").action(init2);
|
|
76184
76189
|
program2.command("pull-schema").usage("[options]").description("pull the latest schema from your api").option(
|
|
76185
76190
|
"-h, --headers <headers...>",
|
|
76186
76191
|
"headers to use when pulling your schema. Should be passed as KEY=VALUE"
|
|
@@ -57541,13 +57541,10 @@ async function find_graphql(config2, parsedScript, walker) {
|
|
|
57541
57541
|
});
|
|
57542
57542
|
}
|
|
57543
57543
|
|
|
57544
|
-
// src/router/manifest.ts
|
|
57544
|
+
// src/lib/router/manifest.ts
|
|
57545
57545
|
var t = __toESM(require_lib6(), 1);
|
|
57546
57546
|
var graphql5 = __toESM(require("graphql"), 1);
|
|
57547
57547
|
|
|
57548
|
-
// src/router/server.ts
|
|
57549
|
-
var import_vite = require("vite");
|
|
57550
|
-
|
|
57551
57548
|
// src/codegen/generators/artifacts/index.ts
|
|
57552
57549
|
var graphql15 = __toESM(require("graphql"), 1);
|
|
57553
57550
|
var recast5 = __toESM(require_main2(), 1);
|
|
@@ -58554,9 +58551,11 @@ function serializeValue(value) {
|
|
|
58554
58551
|
}
|
|
58555
58552
|
if (typeof value === "object" && value !== null) {
|
|
58556
58553
|
return AST4.objectExpression(
|
|
58557
|
-
Object.entries(value).filter(
|
|
58558
|
-
([key, value2]) =>
|
|
58559
|
-
)
|
|
58554
|
+
Object.entries(value).filter(
|
|
58555
|
+
([key, value2]) => typeof value2 !== "undefined" && key !== "prev" && key !== "next"
|
|
58556
|
+
).map(([key, val]) => {
|
|
58557
|
+
return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
|
|
58558
|
+
})
|
|
58560
58559
|
);
|
|
58561
58560
|
}
|
|
58562
58561
|
if (typeof value === "string") {
|
|
@@ -62787,7 +62786,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
|
|
|
62787
62786
|
if (missing.length > 0) {
|
|
62788
62787
|
ctx.reportError(
|
|
62789
62788
|
new graphql26.GraphQLError(
|
|
62790
|
-
|
|
62789
|
+
`The following arguments are missing from the "${fragmentName}" fragment: ` + JSON.stringify(missing)
|
|
62791
62790
|
)
|
|
62792
62791
|
);
|
|
62793
62792
|
return;
|
|
@@ -57539,13 +57539,10 @@ async function find_graphql(config2, parsedScript, walker) {
|
|
|
57539
57539
|
});
|
|
57540
57540
|
}
|
|
57541
57541
|
|
|
57542
|
-
// src/router/manifest.ts
|
|
57542
|
+
// src/lib/router/manifest.ts
|
|
57543
57543
|
var t = __toESM(require_lib6(), 1);
|
|
57544
57544
|
import * as graphql5 from "graphql";
|
|
57545
57545
|
|
|
57546
|
-
// src/router/server.ts
|
|
57547
|
-
import { build } from "vite";
|
|
57548
|
-
|
|
57549
57546
|
// src/codegen/generators/artifacts/index.ts
|
|
57550
57547
|
var recast5 = __toESM(require_main2(), 1);
|
|
57551
57548
|
import * as graphql15 from "graphql";
|
|
@@ -58552,9 +58549,11 @@ function serializeValue(value) {
|
|
|
58552
58549
|
}
|
|
58553
58550
|
if (typeof value === "object" && value !== null) {
|
|
58554
58551
|
return AST4.objectExpression(
|
|
58555
|
-
Object.entries(value).filter(
|
|
58556
|
-
([key, value2]) =>
|
|
58557
|
-
)
|
|
58552
|
+
Object.entries(value).filter(
|
|
58553
|
+
([key, value2]) => typeof value2 !== "undefined" && key !== "prev" && key !== "next"
|
|
58554
|
+
).map(([key, val]) => {
|
|
58555
|
+
return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
|
|
58556
|
+
})
|
|
58558
58557
|
);
|
|
58559
58558
|
}
|
|
58560
58559
|
if (typeof value === "string") {
|
|
@@ -62785,7 +62784,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
|
|
|
62785
62784
|
if (missing.length > 0) {
|
|
62786
62785
|
ctx.reportError(
|
|
62787
62786
|
new graphql26.GraphQLError(
|
|
62788
|
-
|
|
62787
|
+
`The following arguments are missing from the "${fragmentName}" fragment: ` + JSON.stringify(missing)
|
|
62789
62788
|
)
|
|
62790
62789
|
);
|
|
62791
62790
|
return;
|
package/build/lib/index.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export * as routerConventions from './conventions';
|
|
|
6
6
|
export * from './manifest';
|
|
7
7
|
export * from './types';
|
|
8
8
|
export * from './server';
|
|
9
|
-
export { handle_request, get_session } from '
|
|
9
|
+
export { handle_request, get_session } from '../../runtime/router/server';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Config } from '
|
|
2
|
-
import type { ProjectManifest, PageManifest, QueryManifest } from '
|
|
1
|
+
import { type Config } from '..';
|
|
2
|
+
import type { ProjectManifest, PageManifest, QueryManifest } from '../../runtime/lib/types';
|
|
3
3
|
export type { ProjectManifest, PageManifest, QueryManifest };
|
|
4
4
|
/**
|
|
5
5
|
* Walk down the routes directory and build a normalized description of the project's
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as graphql from 'graphql';
|
|
2
|
-
import type { Config } from '../
|
|
3
|
-
export declare function
|
|
2
|
+
import type { Config } from '../config';
|
|
3
|
+
export declare function isSecondaryBuild(): boolean;
|
|
4
4
|
export declare function loadLocalSchema(config: Config): Promise<graphql.GraphQLSchema>;
|
package/build/lib/types.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import type * as graphql from 'graphql';
|
|
|
2
2
|
import type * as recast from 'recast';
|
|
3
3
|
import type { CustomPluginOptions, InputOptions, LoadResult, MinimalPluginContext, NormalizedInputOptions, NullValue, ObjectHook, PluginContext, ResolveIdResult, SourceMapInput } from 'rollup';
|
|
4
4
|
import type { ConfigEnv, ResolvedConfig, UserConfig, ViteDevServer } from 'vite';
|
|
5
|
-
import type { Adapter } from '../router';
|
|
6
5
|
import type { ConfigFile } from '../runtime/lib/config';
|
|
7
6
|
import type { ArtifactKinds, BaseCompiledDocument, DocumentArtifact, ValueOf } from '../runtime/lib/types';
|
|
8
7
|
import type { TransformPage } from '../vite/houdini';
|
|
9
8
|
import type { Config } from './config';
|
|
9
|
+
import type { Adapter } from './router';
|
|
10
10
|
type Program = recast.types.namedTypes.Program;
|
|
11
11
|
export type Maybe<T> = T | null | undefined;
|
|
12
12
|
export type Script = Program;
|
package/build/lib-cjs/index.js
CHANGED
|
@@ -58626,7 +58626,7 @@ __export(lib_exports, {
|
|
|
58626
58626
|
hashRaw: () => hashRaw,
|
|
58627
58627
|
houdini_mode: () => houdini_mode,
|
|
58628
58628
|
isPending: () => isPending,
|
|
58629
|
-
|
|
58629
|
+
isSecondaryBuild: () => isSecondaryBuild,
|
|
58630
58630
|
keyFieldsForType: () => keyFieldsForType,
|
|
58631
58631
|
loadLocalSchema: () => loadLocalSchema,
|
|
58632
58632
|
load_manifest: () => load_manifest,
|
|
@@ -68232,7 +68232,7 @@ async function find_graphql(config2, parsedScript, walker) {
|
|
|
68232
68232
|
});
|
|
68233
68233
|
}
|
|
68234
68234
|
|
|
68235
|
-
// src/router/conventions.ts
|
|
68235
|
+
// src/lib/router/conventions.ts
|
|
68236
68236
|
var conventions_exports = {};
|
|
68237
68237
|
__export(conventions_exports, {
|
|
68238
68238
|
fallback_unit_path: () => fallback_unit_path,
|
|
@@ -68354,7 +68354,7 @@ function serialized_manifest_path(config2, base = base_dir(config2)) {
|
|
|
68354
68354
|
return path_exports.join(base, "manifest.json");
|
|
68355
68355
|
}
|
|
68356
68356
|
|
|
68357
|
-
// src/router/manifest.ts
|
|
68357
|
+
// src/lib/router/manifest.ts
|
|
68358
68358
|
var t2 = __toESM(require_lib6(), 1);
|
|
68359
68359
|
var graphql5 = __toESM(require("graphql"), 1);
|
|
68360
68360
|
async function load_manifest(args) {
|
|
@@ -68580,15 +68580,15 @@ async function extractQueries(source) {
|
|
|
68580
68580
|
return props.filter((p) => p !== "children");
|
|
68581
68581
|
}
|
|
68582
68582
|
|
|
68583
|
-
// src/router/server.ts
|
|
68583
|
+
// src/lib/router/server.ts
|
|
68584
68584
|
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
68585
|
-
|
|
68586
|
-
function isViteSchemaBuild() {
|
|
68585
|
+
function isSecondaryBuild() {
|
|
68587
68586
|
return process.env.HOUDINI_SCHEMA_BUILD === "true";
|
|
68588
68587
|
}
|
|
68589
68588
|
async function loadLocalSchema(config2) {
|
|
68589
|
+
const { build } = await import("vite");
|
|
68590
68590
|
process.env.HOUDINI_SCHEMA_BUILD = "true";
|
|
68591
|
-
await
|
|
68591
|
+
await build({
|
|
68592
68592
|
logLevel: "silent",
|
|
68593
68593
|
build: {
|
|
68594
68594
|
outDir: import_node_path2.default.join(config2.rootDir, "temp"),
|
|
@@ -68902,7 +68902,7 @@ async function get_session(req, secrets) {
|
|
|
68902
68902
|
hashRaw,
|
|
68903
68903
|
houdini_mode,
|
|
68904
68904
|
isPending,
|
|
68905
|
-
|
|
68905
|
+
isSecondaryBuild,
|
|
68906
68906
|
keyFieldsForType,
|
|
68907
68907
|
loadLocalSchema,
|
|
68908
68908
|
load_manifest,
|
package/build/lib-esm/index.js
CHANGED
|
@@ -68159,7 +68159,7 @@ async function find_graphql(config2, parsedScript, walker) {
|
|
|
68159
68159
|
});
|
|
68160
68160
|
}
|
|
68161
68161
|
|
|
68162
|
-
// src/router/conventions.ts
|
|
68162
|
+
// src/lib/router/conventions.ts
|
|
68163
68163
|
var conventions_exports = {};
|
|
68164
68164
|
__export(conventions_exports, {
|
|
68165
68165
|
fallback_unit_path: () => fallback_unit_path,
|
|
@@ -68281,7 +68281,7 @@ function serialized_manifest_path(config2, base = base_dir(config2)) {
|
|
|
68281
68281
|
return path_exports.join(base, "manifest.json");
|
|
68282
68282
|
}
|
|
68283
68283
|
|
|
68284
|
-
// src/router/manifest.ts
|
|
68284
|
+
// src/lib/router/manifest.ts
|
|
68285
68285
|
var t2 = __toESM(require_lib6(), 1);
|
|
68286
68286
|
import * as graphql5 from "graphql";
|
|
68287
68287
|
async function load_manifest(args) {
|
|
@@ -68507,13 +68507,13 @@ async function extractQueries(source) {
|
|
|
68507
68507
|
return props.filter((p) => p !== "children");
|
|
68508
68508
|
}
|
|
68509
68509
|
|
|
68510
|
-
// src/router/server.ts
|
|
68510
|
+
// src/lib/router/server.ts
|
|
68511
68511
|
import path2 from "node:path";
|
|
68512
|
-
|
|
68513
|
-
function isViteSchemaBuild() {
|
|
68512
|
+
function isSecondaryBuild() {
|
|
68514
68513
|
return process.env.HOUDINI_SCHEMA_BUILD === "true";
|
|
68515
68514
|
}
|
|
68516
68515
|
async function loadLocalSchema(config2) {
|
|
68516
|
+
const { build } = await import("vite");
|
|
68517
68517
|
process.env.HOUDINI_SCHEMA_BUILD = "true";
|
|
68518
68518
|
await build({
|
|
68519
68519
|
logLevel: "silent",
|
|
@@ -68828,7 +68828,7 @@ export {
|
|
|
68828
68828
|
hashRaw,
|
|
68829
68829
|
houdini_mode,
|
|
68830
68830
|
isPending,
|
|
68831
|
-
|
|
68831
|
+
isSecondaryBuild,
|
|
68832
68832
|
keyFieldsForType,
|
|
68833
68833
|
loadLocalSchema,
|
|
68834
68834
|
load_manifest,
|
package/build/test-cjs/index.js
CHANGED
|
@@ -57977,13 +57977,10 @@ async function cleanupFiles(pathFolder, listOfObj) {
|
|
|
57977
57977
|
// src/lib/walk.ts
|
|
57978
57978
|
var graphql4 = __toESM(require("graphql"), 1);
|
|
57979
57979
|
|
|
57980
|
-
// src/router/manifest.ts
|
|
57980
|
+
// src/lib/router/manifest.ts
|
|
57981
57981
|
var t = __toESM(require_lib6(), 1);
|
|
57982
57982
|
var graphql5 = __toESM(require("graphql"), 1);
|
|
57983
57983
|
|
|
57984
|
-
// src/router/server.ts
|
|
57985
|
-
var import_vite = require("vite");
|
|
57986
|
-
|
|
57987
57984
|
// src/codegen/generators/artifacts/index.ts
|
|
57988
57985
|
var graphql15 = __toESM(require("graphql"), 1);
|
|
57989
57986
|
var recast5 = __toESM(require_main2(), 1);
|
|
@@ -58990,9 +58987,11 @@ function serializeValue(value) {
|
|
|
58990
58987
|
}
|
|
58991
58988
|
if (typeof value === "object" && value !== null) {
|
|
58992
58989
|
return AST4.objectExpression(
|
|
58993
|
-
Object.entries(value).filter(
|
|
58994
|
-
([key, value2]) =>
|
|
58995
|
-
)
|
|
58990
|
+
Object.entries(value).filter(
|
|
58991
|
+
([key, value2]) => typeof value2 !== "undefined" && key !== "prev" && key !== "next"
|
|
58992
|
+
).map(([key, val]) => {
|
|
58993
|
+
return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
|
|
58994
|
+
})
|
|
58996
58995
|
);
|
|
58997
58996
|
}
|
|
58998
58997
|
if (typeof value === "string") {
|
|
@@ -63223,7 +63222,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
|
|
|
63223
63222
|
if (missing.length > 0) {
|
|
63224
63223
|
ctx.reportError(
|
|
63225
63224
|
new graphql26.GraphQLError(
|
|
63226
|
-
|
|
63225
|
+
`The following arguments are missing from the "${fragmentName}" fragment: ` + JSON.stringify(missing)
|
|
63227
63226
|
)
|
|
63228
63227
|
);
|
|
63229
63228
|
return;
|
|
@@ -63887,6 +63886,10 @@ function testConfigFile({ plugins, ...config2 } = {}) {
|
|
|
63887
63886
|
|
|
63888
63887
|
directive @live on QUERY
|
|
63889
63888
|
|
|
63889
|
+
input MyInput {
|
|
63890
|
+
string: String
|
|
63891
|
+
}
|
|
63892
|
+
|
|
63890
63893
|
type User implements Node & Friend & CatOwner {
|
|
63891
63894
|
id: ID!
|
|
63892
63895
|
name: String!
|