houdini-svelte 2.2.0-next.2 → 2.2.0-next.3
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/plugin-cjs/index.js +2 -4
- package/build/plugin-esm/index.js +2 -4
- package/build/runtime/types.d.ts +1 -1
- package/build/runtime-cjs/types.d.ts +1 -1
- package/build/runtime-esm/types.d.ts +1 -1
- package/build/test-cjs/index.js +2 -4
- package/build/test-esm/index.js +2 -4
- package/package.json +1 -1
|
@@ -161078,9 +161078,7 @@ import type { ${functionImportsToBring.join(
|
|
|
161078
161078
|
", "
|
|
161079
161079
|
)} } from '${houdiniRelative}/plugins/houdini-svelte/runtime/types';` : "";
|
|
161080
161080
|
typeImports = typeImports.concat(functionImports).concat(layoutTypeImports).concat(pageTypeImports).concat(componentQueryTypeImports);
|
|
161081
|
-
|
|
161082
|
-
const pageParams = `${pageQueries.length > 0 && !utilityTypes.includes("PageParams") ? "\ntype PageParams = PageLoadEvent['params'];" : ""}`;
|
|
161083
|
-
utilityTypes = utilityTypes.concat(layoutParams).concat(pageParams).replaceAll(/\$types\.js/gm, "$houdini");
|
|
161081
|
+
utilityTypes = utilityTypes.replaceAll(/\$types\.js/gm, "$houdini");
|
|
161084
161082
|
typeExports = typeExports.concat(append_loadInput([...layoutQueries, ...pageQueries])).concat(layout_append_beforeLoad).concat(page_append_beforeLoad).concat(layout_append_afterLoad).concat(page_append_afterLoad).concat(layout_append_onError).concat(page_append_onError).concat(layout_append_VariablesFunction).concat(page_append_VariablesFunction).concat(component_append_VariablesFunction).replace(
|
|
161085
161083
|
//regex to append our generated stores to the existing
|
|
161086
161084
|
//match all between 'LayoutData =' and ';' and combine additional types
|
|
@@ -161165,7 +161163,7 @@ function append_VariablesFunction(type, filepath, config, queries) {
|
|
|
161165
161163
|
return `
|
|
161166
161164
|
export type ${config.variableFunctionName(
|
|
161167
161165
|
name
|
|
161168
|
-
)} = VariableFunction<${type}
|
|
161166
|
+
)} = VariableFunction<${type}LoadEvent, ${input_type}>;`;
|
|
161169
161167
|
}).join("\n");
|
|
161170
161168
|
}
|
|
161171
161169
|
function append_ComponentVariablesFunction(filepath, config, queries) {
|
|
@@ -161073,9 +161073,7 @@ import type { ${functionImportsToBring.join(
|
|
|
161073
161073
|
", "
|
|
161074
161074
|
)} } from '${houdiniRelative}/plugins/houdini-svelte/runtime/types';` : "";
|
|
161075
161075
|
typeImports = typeImports.concat(functionImports).concat(layoutTypeImports).concat(pageTypeImports).concat(componentQueryTypeImports);
|
|
161076
|
-
|
|
161077
|
-
const pageParams = `${pageQueries.length > 0 && !utilityTypes.includes("PageParams") ? "\ntype PageParams = PageLoadEvent['params'];" : ""}`;
|
|
161078
|
-
utilityTypes = utilityTypes.concat(layoutParams).concat(pageParams).replaceAll(/\$types\.js/gm, "$houdini");
|
|
161076
|
+
utilityTypes = utilityTypes.replaceAll(/\$types\.js/gm, "$houdini");
|
|
161079
161077
|
typeExports = typeExports.concat(append_loadInput([...layoutQueries, ...pageQueries])).concat(layout_append_beforeLoad).concat(page_append_beforeLoad).concat(layout_append_afterLoad).concat(page_append_afterLoad).concat(layout_append_onError).concat(page_append_onError).concat(layout_append_VariablesFunction).concat(page_append_VariablesFunction).concat(component_append_VariablesFunction).replace(
|
|
161080
161078
|
//regex to append our generated stores to the existing
|
|
161081
161079
|
//match all between 'LayoutData =' and ';' and combine additional types
|
|
@@ -161160,7 +161158,7 @@ function append_VariablesFunction(type, filepath, config, queries) {
|
|
|
161160
161158
|
return `
|
|
161161
161159
|
export type ${config.variableFunctionName(
|
|
161162
161160
|
name
|
|
161163
|
-
)} = VariableFunction<${type}
|
|
161161
|
+
)} = VariableFunction<${type}LoadEvent, ${input_type}>;`;
|
|
161164
161162
|
}).join("\n");
|
|
161165
161163
|
}
|
|
161166
161164
|
function append_ComponentVariablesFunction(filepath, config, queries) {
|
package/build/runtime/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type QueryInputs<_Data> = FetchQueryResult<_Data> & {
|
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
export type VariableFunction<
|
|
10
|
+
export type VariableFunction<_Event extends LoadEvent, _Input> = (event: _Event) => _Input | Promise<_Input>;
|
|
11
11
|
export type AfterLoadFunction<_Params extends Record<string, string>, _Data, _Input, _ReturnType extends Record<string, any>> = (args: {
|
|
12
12
|
event: LoadEvent<_Params>;
|
|
13
13
|
data: _Data;
|
|
@@ -7,7 +7,7 @@ export type QueryInputs<_Data> = FetchQueryResult<_Data> & {
|
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
export type VariableFunction<
|
|
10
|
+
export type VariableFunction<_Event extends LoadEvent, _Input> = (event: _Event) => _Input | Promise<_Input>;
|
|
11
11
|
export type AfterLoadFunction<_Params extends Record<string, string>, _Data, _Input, _ReturnType extends Record<string, any>> = (args: {
|
|
12
12
|
event: LoadEvent<_Params>;
|
|
13
13
|
data: _Data;
|
|
@@ -7,7 +7,7 @@ export type QueryInputs<_Data> = FetchQueryResult<_Data> & {
|
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
export type VariableFunction<
|
|
10
|
+
export type VariableFunction<_Event extends LoadEvent, _Input> = (event: _Event) => _Input | Promise<_Input>;
|
|
11
11
|
export type AfterLoadFunction<_Params extends Record<string, string>, _Data, _Input, _ReturnType extends Record<string, any>> = (args: {
|
|
12
12
|
event: LoadEvent<_Params>;
|
|
13
13
|
data: _Data;
|
package/build/test-cjs/index.js
CHANGED
|
@@ -300745,9 +300745,7 @@ import type { ${functionImportsToBring.join(
|
|
|
300745
300745
|
", "
|
|
300746
300746
|
)} } from '${houdiniRelative}/plugins/houdini-svelte/runtime/types';` : "";
|
|
300747
300747
|
typeImports = typeImports.concat(functionImports).concat(layoutTypeImports).concat(pageTypeImports).concat(componentQueryTypeImports);
|
|
300748
|
-
|
|
300749
|
-
const pageParams = `${pageQueries.length > 0 && !utilityTypes.includes("PageParams") ? "\ntype PageParams = PageLoadEvent['params'];" : ""}`;
|
|
300750
|
-
utilityTypes = utilityTypes.concat(layoutParams).concat(pageParams).replaceAll(/\$types\.js/gm, "$houdini");
|
|
300748
|
+
utilityTypes = utilityTypes.replaceAll(/\$types\.js/gm, "$houdini");
|
|
300751
300749
|
typeExports = typeExports.concat(append_loadInput([...layoutQueries, ...pageQueries])).concat(layout_append_beforeLoad).concat(page_append_beforeLoad).concat(layout_append_afterLoad).concat(page_append_afterLoad).concat(layout_append_onError).concat(page_append_onError).concat(layout_append_VariablesFunction).concat(page_append_VariablesFunction).concat(component_append_VariablesFunction).replace(
|
|
300752
300750
|
//regex to append our generated stores to the existing
|
|
300753
300751
|
//match all between 'LayoutData =' and ';' and combine additional types
|
|
@@ -300832,7 +300830,7 @@ function append_VariablesFunction(type, filepath, config, queries) {
|
|
|
300832
300830
|
return `
|
|
300833
300831
|
export type ${config.variableFunctionName(
|
|
300834
300832
|
name
|
|
300835
|
-
)} = VariableFunction<${type}
|
|
300833
|
+
)} = VariableFunction<${type}LoadEvent, ${input_type}>;`;
|
|
300836
300834
|
}).join("\n");
|
|
300837
300835
|
}
|
|
300838
300836
|
function append_ComponentVariablesFunction(filepath, config, queries) {
|
package/build/test-esm/index.js
CHANGED
|
@@ -300734,9 +300734,7 @@ import type { ${functionImportsToBring.join(
|
|
|
300734
300734
|
", "
|
|
300735
300735
|
)} } from '${houdiniRelative}/plugins/houdini-svelte/runtime/types';` : "";
|
|
300736
300736
|
typeImports = typeImports.concat(functionImports).concat(layoutTypeImports).concat(pageTypeImports).concat(componentQueryTypeImports);
|
|
300737
|
-
|
|
300738
|
-
const pageParams = `${pageQueries.length > 0 && !utilityTypes.includes("PageParams") ? "\ntype PageParams = PageLoadEvent['params'];" : ""}`;
|
|
300739
|
-
utilityTypes = utilityTypes.concat(layoutParams).concat(pageParams).replaceAll(/\$types\.js/gm, "$houdini");
|
|
300737
|
+
utilityTypes = utilityTypes.replaceAll(/\$types\.js/gm, "$houdini");
|
|
300740
300738
|
typeExports = typeExports.concat(append_loadInput([...layoutQueries, ...pageQueries])).concat(layout_append_beforeLoad).concat(page_append_beforeLoad).concat(layout_append_afterLoad).concat(page_append_afterLoad).concat(layout_append_onError).concat(page_append_onError).concat(layout_append_VariablesFunction).concat(page_append_VariablesFunction).concat(component_append_VariablesFunction).replace(
|
|
300741
300739
|
//regex to append our generated stores to the existing
|
|
300742
300740
|
//match all between 'LayoutData =' and ';' and combine additional types
|
|
@@ -300821,7 +300819,7 @@ function append_VariablesFunction(type, filepath, config, queries) {
|
|
|
300821
300819
|
return `
|
|
300822
300820
|
export type ${config.variableFunctionName(
|
|
300823
300821
|
name
|
|
300824
|
-
)} = VariableFunction<${type}
|
|
300822
|
+
)} = VariableFunction<${type}LoadEvent, ${input_type}>;`;
|
|
300825
300823
|
}).join("\n");
|
|
300826
300824
|
}
|
|
300827
300825
|
function append_ComponentVariablesFunction(filepath, config, queries) {
|