houdini-react 1.2.50 → 1.2.52
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.
|
@@ -75642,6 +75642,7 @@ __export2(conventions_exports, {
|
|
|
75642
75642
|
router_path: () => router_path,
|
|
75643
75643
|
serialized_manifest_path: () => serialized_manifest_path,
|
|
75644
75644
|
server_adapter_path: () => server_adapter_path,
|
|
75645
|
+
temp_dir: () => temp_dir,
|
|
75645
75646
|
units_dir: () => units_dir,
|
|
75646
75647
|
vite_render_path: () => vite_render_path
|
|
75647
75648
|
});
|
|
@@ -75703,6 +75704,9 @@ async function read_layoutView(base) {
|
|
|
75703
75704
|
}
|
|
75704
75705
|
return [null, null];
|
|
75705
75706
|
}
|
|
75707
|
+
function temp_dir(config, key) {
|
|
75708
|
+
return path_exports.join(config.rootDir, "temp", key);
|
|
75709
|
+
}
|
|
75706
75710
|
function router_index_path(config) {
|
|
75707
75711
|
return path_exports.join(config.routesDir, "..", "+index.jsx");
|
|
75708
75712
|
}
|
|
@@ -78918,7 +78922,7 @@ async function generate_query_wrapper(args) {
|
|
|
78918
78922
|
const unit_path = layout ? conventions_exports.layout_unit_path(args.config, args.id) : conventions_exports.page_unit_path(args.config, args.id);
|
|
78919
78923
|
await fs_exports.mkdirp(path_exports.dirname(unit_path));
|
|
78920
78924
|
const page_path = path_exports.join(
|
|
78921
|
-
args.config.pluginDirectory("houdini-
|
|
78925
|
+
args.config.pluginDirectory("houdini-react"),
|
|
78922
78926
|
"..",
|
|
78923
78927
|
"..",
|
|
78924
78928
|
"..",
|
|
@@ -79040,7 +79044,7 @@ async function generate_fallbacks({
|
|
|
79040
79044
|
);
|
|
79041
79045
|
const fallback_path = conventions_exports.fallback_unit_path(config, which, id);
|
|
79042
79046
|
const page_path = path_exports.join(
|
|
79043
|
-
config.pluginDirectory("houdini-
|
|
79047
|
+
config.pluginDirectory("houdini-react"),
|
|
79044
79048
|
"..",
|
|
79045
79049
|
"..",
|
|
79046
79050
|
"..",
|
|
@@ -79575,7 +79579,7 @@ function format_router_manifest({
|
|
|
79575
79579
|
manifest: manifest2,
|
|
79576
79580
|
exportDefaultStatement
|
|
79577
79581
|
}) {
|
|
79578
|
-
const from = "$houdini/plugins/houdini-
|
|
79582
|
+
const from = "$houdini/plugins/houdini-react/runtime";
|
|
79579
79583
|
return exportDefaultStatement(
|
|
79580
79584
|
`{
|
|
79581
79585
|
pages: {
|
|
@@ -79759,6 +79763,9 @@ var vite_default = {
|
|
|
79759
79763
|
"entries/app": conventions_exports.app_component_path(config),
|
|
79760
79764
|
"entries/adapter": conventions_exports.adapter_config_path(config)
|
|
79761
79765
|
};
|
|
79766
|
+
if (env.command === "build" && config.adapter && config.adapter?.includePaths) {
|
|
79767
|
+
Object.assign(conf.build.rollupOptions.input, config.adapter?.includePaths);
|
|
79768
|
+
}
|
|
79762
79769
|
for (const [id, page] of Object.entries(manifest2.pages)) {
|
|
79763
79770
|
conf.build.rollupOptions.input[`pages/${id}`] = `virtual:houdini/pages/${page.id}.jsx`;
|
|
79764
79771
|
}
|
|
@@ -79775,6 +79782,7 @@ var vite_default = {
|
|
|
79775
79782
|
"~/*": path_exports.join(config.projectRoot, "src", "*")
|
|
79776
79783
|
}
|
|
79777
79784
|
},
|
|
79785
|
+
type: "custom",
|
|
79778
79786
|
...conf
|
|
79779
79787
|
};
|
|
79780
79788
|
},
|
|
@@ -79791,6 +79799,9 @@ var vite_default = {
|
|
|
79791
79799
|
if (isSecondaryBuild() || viteEnv.mode !== "production" || devServer) {
|
|
79792
79800
|
return;
|
|
79793
79801
|
}
|
|
79802
|
+
if (config.adapter?.disableServer) {
|
|
79803
|
+
return;
|
|
79804
|
+
}
|
|
79794
79805
|
console.log("\u{1F3A9} Generating Server Assets...");
|
|
79795
79806
|
process.env.HOUDINI_SECONDARY_BUILD = "ssr";
|
|
79796
79807
|
await (0, import_vite.build)({
|
|
@@ -79833,8 +79844,8 @@ var vite_default = {
|
|
|
79833
79844
|
return;
|
|
79834
79845
|
}
|
|
79835
79846
|
let [, which, arg] = id.split("/");
|
|
79836
|
-
const parsedPath = path_exports.parse(arg);
|
|
79837
|
-
const pageName = parsedPath.name;
|
|
79847
|
+
const parsedPath = arg ? path_exports.parse(arg) : "";
|
|
79848
|
+
const pageName = parsedPath ? parsedPath.name : "";
|
|
79838
79849
|
if (which === "pages") {
|
|
79839
79850
|
const page = manifest.pages[pageName];
|
|
79840
79851
|
if (!page) {
|
|
@@ -79960,6 +79971,30 @@ var vite_default = {
|
|
|
79960
79971
|
if (window.__houdini__nav_caches__ && window.__houdini__nav_caches__.artifact_cache && !window.__houdini__nav_caches__.artifact_cache.has("${pageName}")) {
|
|
79961
79972
|
window.__houdini__nav_caches__.artifact_cache.set(${JSON.stringify(pageName)}, artifact)
|
|
79962
79973
|
}
|
|
79974
|
+
`;
|
|
79975
|
+
}
|
|
79976
|
+
if (which === "static-entry") {
|
|
79977
|
+
return `
|
|
79978
|
+
import App from '$houdini/plugins/houdini-react/units/render/App'
|
|
79979
|
+
import { Cache } from '$houdini/runtime/cache/cache'
|
|
79980
|
+
import { router_cache } from '$houdini/plugins/houdini-react/runtime/routing'
|
|
79981
|
+
import manifest from '$houdini/plugins/houdini-react/runtime/manifest'
|
|
79982
|
+
import React from 'react'
|
|
79983
|
+
import { createRoot } from 'react-dom/client'
|
|
79984
|
+
|
|
79985
|
+
const domNode = document.getElementById('app')
|
|
79986
|
+
const root = createRoot(domNode)
|
|
79987
|
+
|
|
79988
|
+
const cache = new Cache()
|
|
79989
|
+
|
|
79990
|
+
root.render(React.createElement(App, {
|
|
79991
|
+
initialURL: window.location.pathname,
|
|
79992
|
+
cache: cache,
|
|
79993
|
+
session: null,
|
|
79994
|
+
manifest: manifest,
|
|
79995
|
+
|
|
79996
|
+
...router_cache()
|
|
79997
|
+
}))
|
|
79963
79998
|
`;
|
|
79964
79999
|
}
|
|
79965
80000
|
},
|
|
@@ -80101,7 +80136,7 @@ var hooks = async () => ({
|
|
|
80101
80136
|
return {
|
|
80102
80137
|
"client.js": ({ config: config2, exportDefaultStatement, importStatement }) => {
|
|
80103
80138
|
const runtimeFilePath = import_node_path2.default.join(
|
|
80104
|
-
config2.pluginRuntimeDirectory("houdini-
|
|
80139
|
+
config2.pluginRuntimeDirectory("houdini-react"),
|
|
80105
80140
|
"config.js"
|
|
80106
80141
|
);
|
|
80107
80142
|
const relativePath = import_node_path2.default.relative(
|
|
@@ -75632,6 +75632,7 @@ __export(conventions_exports, {
|
|
|
75632
75632
|
router_path: () => router_path,
|
|
75633
75633
|
serialized_manifest_path: () => serialized_manifest_path,
|
|
75634
75634
|
server_adapter_path: () => server_adapter_path,
|
|
75635
|
+
temp_dir: () => temp_dir,
|
|
75635
75636
|
units_dir: () => units_dir,
|
|
75636
75637
|
vite_render_path: () => vite_render_path
|
|
75637
75638
|
});
|
|
@@ -75693,6 +75694,9 @@ async function read_layoutView(base) {
|
|
|
75693
75694
|
}
|
|
75694
75695
|
return [null, null];
|
|
75695
75696
|
}
|
|
75697
|
+
function temp_dir(config, key) {
|
|
75698
|
+
return path_exports.join(config.rootDir, "temp", key);
|
|
75699
|
+
}
|
|
75696
75700
|
function router_index_path(config) {
|
|
75697
75701
|
return path_exports.join(config.routesDir, "..", "+index.jsx");
|
|
75698
75702
|
}
|
|
@@ -78908,7 +78912,7 @@ async function generate_query_wrapper(args) {
|
|
|
78908
78912
|
const unit_path = layout ? conventions_exports.layout_unit_path(args.config, args.id) : conventions_exports.page_unit_path(args.config, args.id);
|
|
78909
78913
|
await fs_exports.mkdirp(path_exports.dirname(unit_path));
|
|
78910
78914
|
const page_path = path_exports.join(
|
|
78911
|
-
args.config.pluginDirectory("houdini-
|
|
78915
|
+
args.config.pluginDirectory("houdini-react"),
|
|
78912
78916
|
"..",
|
|
78913
78917
|
"..",
|
|
78914
78918
|
"..",
|
|
@@ -79030,7 +79034,7 @@ async function generate_fallbacks({
|
|
|
79030
79034
|
);
|
|
79031
79035
|
const fallback_path = conventions_exports.fallback_unit_path(config, which, id);
|
|
79032
79036
|
const page_path = path_exports.join(
|
|
79033
|
-
config.pluginDirectory("houdini-
|
|
79037
|
+
config.pluginDirectory("houdini-react"),
|
|
79034
79038
|
"..",
|
|
79035
79039
|
"..",
|
|
79036
79040
|
"..",
|
|
@@ -79565,7 +79569,7 @@ function format_router_manifest({
|
|
|
79565
79569
|
manifest: manifest2,
|
|
79566
79570
|
exportDefaultStatement
|
|
79567
79571
|
}) {
|
|
79568
|
-
const from = "$houdini/plugins/houdini-
|
|
79572
|
+
const from = "$houdini/plugins/houdini-react/runtime";
|
|
79569
79573
|
return exportDefaultStatement(
|
|
79570
79574
|
`{
|
|
79571
79575
|
pages: {
|
|
@@ -79749,6 +79753,9 @@ var vite_default = {
|
|
|
79749
79753
|
"entries/app": conventions_exports.app_component_path(config),
|
|
79750
79754
|
"entries/adapter": conventions_exports.adapter_config_path(config)
|
|
79751
79755
|
};
|
|
79756
|
+
if (env.command === "build" && config.adapter && config.adapter?.includePaths) {
|
|
79757
|
+
Object.assign(conf.build.rollupOptions.input, config.adapter?.includePaths);
|
|
79758
|
+
}
|
|
79752
79759
|
for (const [id, page] of Object.entries(manifest2.pages)) {
|
|
79753
79760
|
conf.build.rollupOptions.input[`pages/${id}`] = `virtual:houdini/pages/${page.id}.jsx`;
|
|
79754
79761
|
}
|
|
@@ -79765,6 +79772,7 @@ var vite_default = {
|
|
|
79765
79772
|
"~/*": path_exports.join(config.projectRoot, "src", "*")
|
|
79766
79773
|
}
|
|
79767
79774
|
},
|
|
79775
|
+
type: "custom",
|
|
79768
79776
|
...conf
|
|
79769
79777
|
};
|
|
79770
79778
|
},
|
|
@@ -79781,6 +79789,9 @@ var vite_default = {
|
|
|
79781
79789
|
if (isSecondaryBuild() || viteEnv.mode !== "production" || devServer) {
|
|
79782
79790
|
return;
|
|
79783
79791
|
}
|
|
79792
|
+
if (config.adapter?.disableServer) {
|
|
79793
|
+
return;
|
|
79794
|
+
}
|
|
79784
79795
|
console.log("\u{1F3A9} Generating Server Assets...");
|
|
79785
79796
|
process.env.HOUDINI_SECONDARY_BUILD = "ssr";
|
|
79786
79797
|
await build({
|
|
@@ -79823,8 +79834,8 @@ var vite_default = {
|
|
|
79823
79834
|
return;
|
|
79824
79835
|
}
|
|
79825
79836
|
let [, which, arg] = id.split("/");
|
|
79826
|
-
const parsedPath = path_exports.parse(arg);
|
|
79827
|
-
const pageName = parsedPath.name;
|
|
79837
|
+
const parsedPath = arg ? path_exports.parse(arg) : "";
|
|
79838
|
+
const pageName = parsedPath ? parsedPath.name : "";
|
|
79828
79839
|
if (which === "pages") {
|
|
79829
79840
|
const page = manifest.pages[pageName];
|
|
79830
79841
|
if (!page) {
|
|
@@ -79950,6 +79961,30 @@ var vite_default = {
|
|
|
79950
79961
|
if (window.__houdini__nav_caches__ && window.__houdini__nav_caches__.artifact_cache && !window.__houdini__nav_caches__.artifact_cache.has("${pageName}")) {
|
|
79951
79962
|
window.__houdini__nav_caches__.artifact_cache.set(${JSON.stringify(pageName)}, artifact)
|
|
79952
79963
|
}
|
|
79964
|
+
`;
|
|
79965
|
+
}
|
|
79966
|
+
if (which === "static-entry") {
|
|
79967
|
+
return `
|
|
79968
|
+
import App from '$houdini/plugins/houdini-react/units/render/App'
|
|
79969
|
+
import { Cache } from '$houdini/runtime/cache/cache'
|
|
79970
|
+
import { router_cache } from '$houdini/plugins/houdini-react/runtime/routing'
|
|
79971
|
+
import manifest from '$houdini/plugins/houdini-react/runtime/manifest'
|
|
79972
|
+
import React from 'react'
|
|
79973
|
+
import { createRoot } from 'react-dom/client'
|
|
79974
|
+
|
|
79975
|
+
const domNode = document.getElementById('app')
|
|
79976
|
+
const root = createRoot(domNode)
|
|
79977
|
+
|
|
79978
|
+
const cache = new Cache()
|
|
79979
|
+
|
|
79980
|
+
root.render(React.createElement(App, {
|
|
79981
|
+
initialURL: window.location.pathname,
|
|
79982
|
+
cache: cache,
|
|
79983
|
+
session: null,
|
|
79984
|
+
manifest: manifest,
|
|
79985
|
+
|
|
79986
|
+
...router_cache()
|
|
79987
|
+
}))
|
|
79953
79988
|
`;
|
|
79954
79989
|
}
|
|
79955
79990
|
},
|
|
@@ -80091,7 +80126,7 @@ var hooks = async () => ({
|
|
|
80091
80126
|
return {
|
|
80092
80127
|
"client.js": ({ config: config2, exportDefaultStatement, importStatement }) => {
|
|
80093
80128
|
const runtimeFilePath = path2.join(
|
|
80094
|
-
config2.pluginRuntimeDirectory("houdini-
|
|
80129
|
+
config2.pluginRuntimeDirectory("houdini-react"),
|
|
80095
80130
|
"config.js"
|
|
80096
80131
|
);
|
|
80097
80132
|
const relativePath = path2.relative(
|
|
@@ -25,7 +25,7 @@ export declare const useLocation: () => {
|
|
|
25
25
|
goto: (url: string) => void;
|
|
26
26
|
};
|
|
27
27
|
export declare function RouterContextProvider({ children, client, cache, artifact_cache, component_cache, data_cache, ssr_signals, last_variables, session: ssrSession, }: {
|
|
28
|
-
children: React.
|
|
28
|
+
children: React.ReactNode;
|
|
29
29
|
client: HoudiniClient;
|
|
30
30
|
cache: Cache;
|
|
31
31
|
artifact_cache: SuspenseCache<QueryArtifact>;
|
|
@@ -25,7 +25,7 @@ export declare const useLocation: () => {
|
|
|
25
25
|
goto: (url: string) => void;
|
|
26
26
|
};
|
|
27
27
|
export declare function RouterContextProvider({ children, client, cache, artifact_cache, component_cache, data_cache, ssr_signals, last_variables, session: ssrSession, }: {
|
|
28
|
-
children: React.
|
|
28
|
+
children: React.ReactNode;
|
|
29
29
|
client: HoudiniClient;
|
|
30
30
|
cache: Cache;
|
|
31
31
|
artifact_cache: SuspenseCache<QueryArtifact>;
|
|
@@ -25,7 +25,7 @@ export declare const useLocation: () => {
|
|
|
25
25
|
goto: (url: string) => void;
|
|
26
26
|
};
|
|
27
27
|
export declare function RouterContextProvider({ children, client, cache, artifact_cache, component_cache, data_cache, ssr_signals, last_variables, session: ssrSession, }: {
|
|
28
|
-
children: React.
|
|
28
|
+
children: React.ReactNode;
|
|
29
29
|
client: HoudiniClient;
|
|
30
30
|
cache: Cache;
|
|
31
31
|
artifact_cache: SuspenseCache<QueryArtifact>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-react",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.52",
|
|
4
4
|
"description": "The React plugin for houdini",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"recast": "^0.23.1",
|
|
44
44
|
"rollup": "^3.7.4",
|
|
45
45
|
"use-deep-compare-effect": "^1.8.1",
|
|
46
|
-
"houdini": "^1.2.
|
|
46
|
+
"houdini": "^1.2.52"
|
|
47
47
|
},
|
|
48
48
|
"files": [
|
|
49
49
|
"build"
|