houdini 1.0.0-next.19 → 1.0.0-next.20
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 +2220 -66
- package/build/cmd-esm/index.js +2220 -66
- package/build/codegen/generators/runtime/runtimeConfig.d.ts +7 -0
- package/build/codegen-cjs/index.js +2816 -645
- package/build/codegen-esm/index.js +2816 -645
- package/build/lib/types.d.ts +3 -3
- package/build/lib-cjs/index.js +3123 -130
- package/build/lib-esm/index.js +3116 -130
- package/build/runtime/imports/pluginConfig.d.ts +3 -0
- package/build/runtime-cjs/client/index.js +3 -0
- package/build/runtime-cjs/imports/pluginConfig.d.ts +3 -0
- package/build/runtime-cjs/imports/pluginConfig.js +27 -0
- package/build/runtime-cjs/lib/config.js +11 -1
- package/build/runtime-esm/client/index.js +3 -0
- package/build/runtime-esm/imports/pluginConfig.d.ts +3 -0
- package/build/runtime-esm/imports/pluginConfig.js +5 -0
- package/build/runtime-esm/lib/config.js +11 -1
- package/build/test-cjs/index.js +2195 -47
- package/build/test-esm/index.js +2195 -47
- package/build/vite-cjs/index.js +2218 -64
- package/build/vite-esm/index.js +2218 -64
- package/package.json +2 -2
|
@@ -82,6 +82,9 @@ class HoudiniClient {
|
|
|
82
82
|
}
|
|
83
83
|
function createPluginHooks(plugins) {
|
|
84
84
|
return plugins.reduce((hooks, plugin) => {
|
|
85
|
+
if (typeof plugin !== "function") {
|
|
86
|
+
throw new Error("Encountered client plugin that's not a function");
|
|
87
|
+
}
|
|
85
88
|
const result = plugin();
|
|
86
89
|
if (!result) {
|
|
87
90
|
return hooks;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var pluginConfig_exports = {};
|
|
20
|
+
__export(pluginConfig_exports, {
|
|
21
|
+
default: () => pluginConfig_default
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(pluginConfig_exports);
|
|
24
|
+
const configs = [];
|
|
25
|
+
var pluginConfig_default = configs;
|
|
26
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
+
0 && (module.exports = {});
|
|
@@ -33,6 +33,7 @@ __export(config_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(config_exports);
|
|
35
35
|
var import_config = __toESM(require("../imports/config"), 1);
|
|
36
|
+
var import_pluginConfig = __toESM(require("../imports/pluginConfig"), 1);
|
|
36
37
|
let mockConfig = null;
|
|
37
38
|
function getMockConfig() {
|
|
38
39
|
return mockConfig;
|
|
@@ -67,12 +68,21 @@ function computeID(configFile, type, data) {
|
|
|
67
68
|
}
|
|
68
69
|
return id.slice(0, -2);
|
|
69
70
|
}
|
|
71
|
+
let _configFile = null;
|
|
70
72
|
function getCurrentConfig() {
|
|
71
73
|
const mockConfig2 = getMockConfig();
|
|
72
74
|
if (mockConfig2) {
|
|
73
75
|
return mockConfig2;
|
|
74
76
|
}
|
|
75
|
-
|
|
77
|
+
if (_configFile) {
|
|
78
|
+
return _configFile;
|
|
79
|
+
}
|
|
80
|
+
let configFile = defaultConfigValues(import_config.default);
|
|
81
|
+
for (const pluginConfig of import_pluginConfig.default) {
|
|
82
|
+
configFile = pluginConfig(configFile);
|
|
83
|
+
}
|
|
84
|
+
_configFile = configFile;
|
|
85
|
+
return configFile;
|
|
76
86
|
}
|
|
77
87
|
// Annotate the CommonJS export names for ESM import in node:
|
|
78
88
|
0 && (module.exports = {
|
|
@@ -53,6 +53,9 @@ class HoudiniClient {
|
|
|
53
53
|
}
|
|
54
54
|
function createPluginHooks(plugins) {
|
|
55
55
|
return plugins.reduce((hooks, plugin) => {
|
|
56
|
+
if (typeof plugin !== "function") {
|
|
57
|
+
throw new Error("Encountered client plugin that's not a function");
|
|
58
|
+
}
|
|
56
59
|
const result = plugin();
|
|
57
60
|
if (!result) {
|
|
58
61
|
return hooks;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import config from "../imports/config";
|
|
2
|
+
import pluginConfigs from "../imports/pluginConfig";
|
|
2
3
|
let mockConfig = null;
|
|
3
4
|
function getMockConfig() {
|
|
4
5
|
return mockConfig;
|
|
@@ -33,12 +34,21 @@ function computeID(configFile, type, data) {
|
|
|
33
34
|
}
|
|
34
35
|
return id.slice(0, -2);
|
|
35
36
|
}
|
|
37
|
+
let _configFile = null;
|
|
36
38
|
function getCurrentConfig() {
|
|
37
39
|
const mockConfig2 = getMockConfig();
|
|
38
40
|
if (mockConfig2) {
|
|
39
41
|
return mockConfig2;
|
|
40
42
|
}
|
|
41
|
-
|
|
43
|
+
if (_configFile) {
|
|
44
|
+
return _configFile;
|
|
45
|
+
}
|
|
46
|
+
let configFile = defaultConfigValues(config);
|
|
47
|
+
for (const pluginConfig of pluginConfigs) {
|
|
48
|
+
configFile = pluginConfig(configFile);
|
|
49
|
+
}
|
|
50
|
+
_configFile = configFile;
|
|
51
|
+
return configFile;
|
|
42
52
|
}
|
|
43
53
|
export {
|
|
44
54
|
computeID,
|