twenty-sdk 0.4.2 → 0.4.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/dist/cli/index.cjs +31 -31
- package/dist/cli/index.mjs +293 -288
- package/dist/cli/utilities/build/common/esbuild-watcher.d.ts +0 -1
- package/dist/cli/utilities/build/common/front-component-build/constants/front-component-external-modules.d.ts +1 -0
- package/dist/cli/utilities/build/common/front-component-build/utils/create-front-component-build-options.d.ts +14 -0
- package/dist/cli/utilities/build/common/front-component-build/utils/get-front-component-build-plugins.d.ts +2 -0
- package/dist/front-component/__stories__/FrontComponentRenderer.stories.d.ts +9 -0
- package/dist/front-component/__stories__/mocks/interactive.front-component.d.ts +7 -0
- package/dist/front-component/__stories__/mocks/lifecycle.front-component.d.ts +7 -0
- package/dist/front-component/__stories__/mocks/static.front-component.d.ts +7 -0
- package/dist/front-component/__stories__/utils/buildMockComponents.d.ts +1 -0
- package/dist/front-component/__stories__/utils/loadBuiltComponent.d.ts +1 -0
- package/dist/front-component/index.cjs +1 -1
- package/dist/front-component/index.mjs +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{types-DqLnNRPE.js → types-BhI-EY61.js} +1 -1
- package/dist/{types-BSOjxfFi.mjs → types-DBujFsE7.mjs} +3 -3
- package/dist/vendor/twenty-shared/database-events/object-record.base.event.d.ts +1 -0
- package/dist/vendor/twenty-shared/database-events/object-record.base.event.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types/EventLogTable.d.ts +6 -0
- package/dist/vendor/twenty-shared/types/EventLogTable.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/SettingsPath.d.ts +1 -0
- package/dist/vendor/twenty-shared/types/SettingsPath.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types/index.d.ts +1 -0
- package/dist/vendor/twenty-shared/types/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types.cjs +1 -1
- package/dist/vendor/twenty-shared/types.mjs +57 -56
- package/package.json +4 -20
- package/dist/README.md +0 -282
- package/dist/package.json +0 -87
package/dist/cli/index.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import { s as mc } from "../RatingValues-CT-y6O0b-CsGZSJKO.mjs";
|
|
|
13
13
|
import { H as Pc } from "../HtmlTagToRemoteComponent-DlsAI7JU.mjs";
|
|
14
14
|
import * as vy from "fs/promises";
|
|
15
15
|
import * as kc from "esbuild";
|
|
16
|
-
import {
|
|
16
|
+
import { N as mn } from "../types-DBujFsE7.mjs";
|
|
17
17
|
import Uc from "chokidar";
|
|
18
18
|
import * as _y from "os";
|
|
19
19
|
import xy from "os";
|
|
@@ -54,7 +54,13 @@ const Yt = process.env.INIT_CWD || process.cwd(), Pi = (n) => n && !n?.startsWit
|
|
|
54
54
|
checksum: P
|
|
55
55
|
}));
|
|
56
56
|
}
|
|
57
|
-
}, Cy =
|
|
57
|
+
}, Cy = [
|
|
58
|
+
"react-dom",
|
|
59
|
+
"twenty-sdk",
|
|
60
|
+
"twenty-sdk/*",
|
|
61
|
+
"twenty-shared",
|
|
62
|
+
"twenty-shared/*"
|
|
63
|
+
], Ly = (n) => my(n) ? n[0].toUpperCase() + n.slice(1) : "", Ry = (n) => Ly(yy(n)), Fy = (n) => typeof n == "object" && n !== null && !Array.isArray(n), Dy = "RemoteComponents", Py = () => {
|
|
58
64
|
const n = Object.keys(Pc).join(
|
|
59
65
|
"|"
|
|
60
66
|
);
|
|
@@ -62,15 +68,15 @@ const Yt = process.env.INIT_CWD || process.cwd(), Pi = (n) => n && !n?.startsWit
|
|
|
62
68
|
`(<\\/?)\\b(${n})\\b(?=[\\s>\\/>])`,
|
|
63
69
|
"g"
|
|
64
70
|
);
|
|
65
|
-
},
|
|
66
|
-
|
|
71
|
+
}, ky = Py(), Uy = (n) => n.replace(
|
|
72
|
+
ky,
|
|
67
73
|
(r, i, o) => {
|
|
68
74
|
const u = Pc[o];
|
|
69
|
-
return ji(u) ? `${i}${
|
|
75
|
+
return ji(u) ? `${i}${Dy}.${u}` : r;
|
|
70
76
|
}
|
|
71
|
-
),
|
|
77
|
+
), My = /import\s*\{\s*defineFrontComponent\s*\}\s*from\s*['"][^'"]+['"];?\n?/g, vc = /export\s+default\s+defineFrontComponent\s*\(\s*\{[^}]*component\s*:\s*(\w+)[^}]*\}\s*\)\s*;?/s, $y = (n) => {
|
|
72
78
|
let r = n.replace(
|
|
73
|
-
|
|
79
|
+
My,
|
|
74
80
|
""
|
|
75
81
|
);
|
|
76
82
|
const i = r.match(
|
|
@@ -89,16 +95,16 @@ const Yt = process.env.INIT_CWD || process.cwd(), Pi = (n) => n && !n?.startsWit
|
|
|
89
95
|
);
|
|
90
96
|
}
|
|
91
97
|
return r;
|
|
92
|
-
},
|
|
98
|
+
}, By = {
|
|
93
99
|
name: "jsx-transform-to-remote-dom-worker-format-plugin",
|
|
94
100
|
setup: (n) => {
|
|
95
101
|
n.onLoad(
|
|
96
102
|
{ filter: /\.tsx$/ },
|
|
97
103
|
async ({ path: r }) => {
|
|
98
104
|
try {
|
|
99
|
-
const i = await gy.readFile(r, "utf8"), o =
|
|
105
|
+
const i = await gy.readFile(r, "utf8"), o = Uy(i);
|
|
100
106
|
return { contents: `var RemoteComponents = globalThis.RemoteComponents;
|
|
101
|
-
${
|
|
107
|
+
${$y(
|
|
102
108
|
o
|
|
103
109
|
)}`, loader: "tsx" };
|
|
104
110
|
} catch (i) {
|
|
@@ -114,29 +120,29 @@ ${My(
|
|
|
114
120
|
}
|
|
115
121
|
);
|
|
116
122
|
}
|
|
117
|
-
},
|
|
118
|
-
const r = n.trim(), i = r.match(
|
|
123
|
+
}, jy = /^(\w+)\s+as\s+(\w+)$/, Wy = (n) => {
|
|
124
|
+
const r = n.trim(), i = r.match(jy);
|
|
119
125
|
if (ji(i)) {
|
|
120
126
|
const [, o, u] = i;
|
|
121
127
|
return { originalName: o, aliasName: u };
|
|
122
128
|
}
|
|
123
129
|
return { originalName: r, aliasName: r };
|
|
124
|
-
}, _c = /import\s+(?:(\w+)\s*,?\s*)?(?:\{([^}]*)\})?\s*from\s*['"]react['"];?/g,
|
|
130
|
+
}, _c = /import\s+(?:(\w+)\s*,?\s*)?(?:\{([^}]*)\})?\s*from\s*['"]react['"];?/g, Gy = /^react(\/jsx-runtime)?$/, Vy = `
|
|
125
131
|
export var jsx = globalThis.jsx;
|
|
126
132
|
export var jsxs = globalThis.jsxs;
|
|
127
133
|
export var Fragment = globalThis.React.Fragment;
|
|
128
|
-
`.trim(),
|
|
134
|
+
`.trim(), qy = (n) => {
|
|
129
135
|
const r = /* @__PURE__ */ new Set();
|
|
130
136
|
let i;
|
|
131
137
|
for (; ji(i = _c.exec(n)); ) {
|
|
132
138
|
const o = i[1], u = i[2];
|
|
133
139
|
o && r.add("default"), u && u.split(",").filter((f) => f.trim()).forEach((f) => {
|
|
134
|
-
const { originalName: g } =
|
|
140
|
+
const { originalName: g } = Wy(f);
|
|
135
141
|
r.add(g);
|
|
136
142
|
});
|
|
137
143
|
}
|
|
138
144
|
return _c.lastIndex = 0, r;
|
|
139
|
-
},
|
|
145
|
+
}, Jy = (n) => {
|
|
140
146
|
const r = [];
|
|
141
147
|
for (const i of n)
|
|
142
148
|
i === "default" ? r.push("export default globalThis.React;") : r.push(
|
|
@@ -144,48 +150,56 @@ export var Fragment = globalThis.React.Fragment;
|
|
|
144
150
|
);
|
|
145
151
|
return r.join(`
|
|
146
152
|
`);
|
|
147
|
-
},
|
|
153
|
+
}, zy = {
|
|
148
154
|
name: "react-globals",
|
|
149
155
|
setup: async (n) => {
|
|
150
156
|
const r = /* @__PURE__ */ new Map();
|
|
151
157
|
n.onStart(() => {
|
|
152
158
|
r.clear();
|
|
153
159
|
}), n.onResolve(
|
|
154
|
-
{ filter:
|
|
160
|
+
{ filter: Gy },
|
|
155
161
|
async ({ importer: i, path: o }) => {
|
|
156
162
|
if (i && !r.has(i))
|
|
157
163
|
try {
|
|
158
164
|
const u = await vy.readFile(i, "utf-8");
|
|
159
165
|
r.set(
|
|
160
166
|
i,
|
|
161
|
-
|
|
167
|
+
qy(u)
|
|
162
168
|
);
|
|
163
169
|
} catch {
|
|
164
170
|
r.set(i, /* @__PURE__ */ new Set());
|
|
165
171
|
}
|
|
166
172
|
return {
|
|
167
|
-
path: o,
|
|
173
|
+
path: o === "react" && i ? `react?importer=${encodeURIComponent(i)}` : o,
|
|
168
174
|
namespace: "react-globals",
|
|
169
175
|
pluginData: { importer: i }
|
|
170
176
|
};
|
|
171
177
|
}
|
|
172
178
|
), n.onLoad(
|
|
173
179
|
{ filter: /.*/, namespace: "react-globals" },
|
|
174
|
-
({
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
180
|
+
({ path: i, pluginData: o }) => {
|
|
181
|
+
if (i === "react/jsx-runtime")
|
|
182
|
+
return {
|
|
183
|
+
contents: Vy,
|
|
184
|
+
loader: "js"
|
|
185
|
+
};
|
|
186
|
+
if (i === "react" || i.startsWith("react?importer=")) {
|
|
187
|
+
const u = o?.importer || decodeURIComponent(i.split("react?importer=")[1] || ""), f = r.get(u) || /* @__PURE__ */ new Set();
|
|
188
|
+
return {
|
|
189
|
+
contents: Jy(f),
|
|
190
|
+
loader: "js"
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
return null;
|
|
183
194
|
}
|
|
184
195
|
);
|
|
185
196
|
}
|
|
186
|
-
},
|
|
197
|
+
}, Qy = () => [
|
|
198
|
+
zy,
|
|
199
|
+
By
|
|
200
|
+
], Da = "public", Hy = "TWENTY_API_KEY", Yy = "TWENTY_API_URL", _n = ".twenty/output";
|
|
187
201
|
var Re = /* @__PURE__ */ ((n) => (n.Object = "object", n.Field = "field", n.LogicFunction = "logicFunction", n.FrontComponent = "frontComponent", n.Role = "role", n))(Re || {});
|
|
188
|
-
const
|
|
202
|
+
const Xy = [
|
|
189
203
|
"path",
|
|
190
204
|
"fs",
|
|
191
205
|
"crypto",
|
|
@@ -208,12 +222,6 @@ const Hy = [
|
|
|
208
222
|
"twenty-sdk/*",
|
|
209
223
|
"twenty-shared",
|
|
210
224
|
"twenty-shared/*"
|
|
211
|
-
], Yy = [
|
|
212
|
-
"react-dom",
|
|
213
|
-
"twenty-sdk",
|
|
214
|
-
"twenty-sdk/*",
|
|
215
|
-
"twenty-shared",
|
|
216
|
-
"twenty-shared/*"
|
|
217
225
|
];
|
|
218
226
|
class $c {
|
|
219
227
|
constructor(r) {
|
|
@@ -298,7 +306,7 @@ class $c {
|
|
|
298
306
|
}), await this.esBuildContext.rebuild(), await this.buildCompletePromise, this.watchMode && await this.esBuildContext.watch();
|
|
299
307
|
}
|
|
300
308
|
}
|
|
301
|
-
const
|
|
309
|
+
const Ky = {
|
|
302
310
|
name: "external-patterns",
|
|
303
311
|
setup: (n) => {
|
|
304
312
|
n.onResolve({ filter: /(?:^|\/)generated(?:\/|$)/ }, (r) => ({
|
|
@@ -306,27 +314,24 @@ const Xy = {
|
|
|
306
314
|
external: !0
|
|
307
315
|
}));
|
|
308
316
|
}
|
|
309
|
-
},
|
|
317
|
+
}, Zy = (n) => new $c({
|
|
310
318
|
...n,
|
|
311
319
|
config: {
|
|
312
|
-
externalModules:
|
|
320
|
+
externalModules: Xy,
|
|
313
321
|
fileFolder: mn.BuiltLogicFunction,
|
|
314
322
|
platform: "node",
|
|
315
|
-
extraPlugins: [
|
|
323
|
+
extraPlugins: [Ky]
|
|
316
324
|
}
|
|
317
|
-
}),
|
|
325
|
+
}), ev = (n) => new $c({
|
|
318
326
|
...n,
|
|
319
327
|
config: {
|
|
320
|
-
externalModules:
|
|
328
|
+
externalModules: Cy,
|
|
321
329
|
fileFolder: mn.BuiltFrontComponent,
|
|
322
330
|
jsx: "automatic",
|
|
323
|
-
extraPlugins:
|
|
324
|
-
Jy,
|
|
325
|
-
$y
|
|
326
|
-
]
|
|
331
|
+
extraPlugins: Qy()
|
|
327
332
|
}
|
|
328
333
|
});
|
|
329
|
-
class
|
|
334
|
+
class tv {
|
|
330
335
|
constructor(r) {
|
|
331
336
|
this.watcher = null, this.appPath = r.appPath, this.handleChangeDetected = r.handleChangeDetected;
|
|
332
337
|
}
|
|
@@ -350,7 +355,7 @@ class ev {
|
|
|
350
355
|
await this.watcher?.close();
|
|
351
356
|
}
|
|
352
357
|
}
|
|
353
|
-
const
|
|
358
|
+
const nv = ({
|
|
354
359
|
manifest: n,
|
|
355
360
|
builtFileInfos: r
|
|
356
361
|
}) => {
|
|
@@ -401,7 +406,7 @@ const tv = ({
|
|
|
401
406
|
u === mn.Source && (g === "package.json" && (i.application.packageJsonChecksum = f), g === "yarn.lock" && (i.application.yarnLockChecksum = f));
|
|
402
407
|
}
|
|
403
408
|
return i;
|
|
404
|
-
},
|
|
409
|
+
}, iv = async (n, r) => {
|
|
405
410
|
const i = Pe.join(n, _n);
|
|
406
411
|
await he.ensureDir(i);
|
|
407
412
|
const o = Pe.join(i, "manifest.json");
|
|
@@ -493,10 +498,10 @@ function Wi(n, r) {
|
|
|
493
498
|
r ?? "Unexpected invariant triggered."
|
|
494
499
|
);
|
|
495
500
|
}
|
|
496
|
-
const
|
|
501
|
+
const rv = /\r\n|[\n\r]/g;
|
|
497
502
|
function Oa(n, r) {
|
|
498
503
|
let i = 0, o = 1;
|
|
499
|
-
for (const u of n.body.matchAll(
|
|
504
|
+
for (const u of n.body.matchAll(rv)) {
|
|
500
505
|
if (typeof u.index == "number" || Wi(!1), u.index >= r)
|
|
501
506
|
break;
|
|
502
507
|
i = u.index + u[0].length, o += 1;
|
|
@@ -506,7 +511,7 @@ function Oa(n, r) {
|
|
|
506
511
|
column: r + 1 - i
|
|
507
512
|
};
|
|
508
513
|
}
|
|
509
|
-
function
|
|
514
|
+
function sv(n) {
|
|
510
515
|
return Bc(
|
|
511
516
|
n.source,
|
|
512
517
|
Oa(n.source, n.start)
|
|
@@ -539,7 +544,7 @@ function xc(n) {
|
|
|
539
544
|
return r.map(([o, u]) => o.padStart(i) + (u ? " " + u : "")).join(`
|
|
540
545
|
`);
|
|
541
546
|
}
|
|
542
|
-
function
|
|
547
|
+
function av(n) {
|
|
543
548
|
const r = n[0];
|
|
544
549
|
return r == null || "kind" in r || "length" in r ? {
|
|
545
550
|
nodes: r,
|
|
@@ -591,7 +596,7 @@ class fe extends Error {
|
|
|
591
596
|
*/
|
|
592
597
|
constructor(r, ...i) {
|
|
593
598
|
var o, u, f;
|
|
594
|
-
const { nodes: g, source: v, positions: w, path: b, originalError: O, extensions: D } =
|
|
599
|
+
const { nodes: g, source: v, positions: w, path: b, originalError: O, extensions: D } = av(i);
|
|
595
600
|
super(r), this.name = "GraphQLError", this.path = b ?? void 0, this.originalError = O ?? void 0, this.nodes = Tc(
|
|
596
601
|
Array.isArray(g) ? g : g ? [g] : void 0
|
|
597
602
|
);
|
|
@@ -641,7 +646,7 @@ class fe extends Error {
|
|
|
641
646
|
for (const i of this.nodes)
|
|
642
647
|
i.loc && (r += `
|
|
643
648
|
|
|
644
|
-
` +
|
|
649
|
+
` + sv(i.loc));
|
|
645
650
|
else if (this.source && this.locations)
|
|
646
651
|
for (const i of this.locations)
|
|
647
652
|
r += `
|
|
@@ -665,7 +670,7 @@ function De(n, r, i) {
|
|
|
665
670
|
positions: [r]
|
|
666
671
|
});
|
|
667
672
|
}
|
|
668
|
-
class
|
|
673
|
+
class ov {
|
|
669
674
|
/**
|
|
670
675
|
* The character offset at which this Node begins.
|
|
671
676
|
*/
|
|
@@ -810,10 +815,10 @@ const Wc = {
|
|
|
810
815
|
UnionTypeExtension: ["name", "directives", "types"],
|
|
811
816
|
EnumTypeExtension: ["name", "directives", "values"],
|
|
812
817
|
InputObjectTypeExtension: ["name", "directives", "fields"]
|
|
813
|
-
},
|
|
818
|
+
}, uv = new Set(Object.keys(Wc));
|
|
814
819
|
function wc(n) {
|
|
815
820
|
const r = n?.kind;
|
|
816
|
-
return typeof r == "string" &&
|
|
821
|
+
return typeof r == "string" && uv.has(r);
|
|
817
822
|
}
|
|
818
823
|
var Ht;
|
|
819
824
|
(function(n) {
|
|
@@ -843,12 +848,12 @@ function Pa(n) {
|
|
|
843
848
|
function Vc(n) {
|
|
844
849
|
return Gc(n) || Bi(n) || n === 95;
|
|
845
850
|
}
|
|
846
|
-
function
|
|
851
|
+
function cv(n) {
|
|
847
852
|
var r;
|
|
848
853
|
let i = Number.MAX_SAFE_INTEGER, o = null, u = -1;
|
|
849
854
|
for (let g = 0; g < n.length; ++g) {
|
|
850
855
|
var f;
|
|
851
|
-
const v = n[g], w =
|
|
856
|
+
const v = n[g], w = lv(v);
|
|
852
857
|
w !== v.length && (o = (f = o) !== null && f !== void 0 ? f : g, u = g, g !== 0 && w < i && (i = w));
|
|
853
858
|
}
|
|
854
859
|
return n.map((g, v) => v === 0 ? g : g.slice(i)).slice(
|
|
@@ -856,13 +861,13 @@ function uv(n) {
|
|
|
856
861
|
u + 1
|
|
857
862
|
);
|
|
858
863
|
}
|
|
859
|
-
function
|
|
864
|
+
function lv(n) {
|
|
860
865
|
let r = 0;
|
|
861
866
|
for (; r < n.length && Ca(n.charCodeAt(r)); )
|
|
862
867
|
++r;
|
|
863
868
|
return r;
|
|
864
869
|
}
|
|
865
|
-
function
|
|
870
|
+
function fv(n) {
|
|
866
871
|
if (n === "")
|
|
867
872
|
return !0;
|
|
868
873
|
let r = !0, i = !1, o = !0, u = !1;
|
|
@@ -901,7 +906,7 @@ function lv(n) {
|
|
|
901
906
|
}
|
|
902
907
|
return !(r || o && u);
|
|
903
908
|
}
|
|
904
|
-
function
|
|
909
|
+
function pv(n, r) {
|
|
905
910
|
const i = n.replace(/"""/g, '\\"""'), o = i.split(/\r\n|[\n\r]/g), u = o.length === 1, f = o.length > 1 && o.slice(1).every((M) => M.length === 0 || Ca(M.charCodeAt(0))), g = i.endsWith('\\"""'), v = n.endsWith('"') && !g, w = n.endsWith("\\"), b = v || w, O = (
|
|
906
911
|
// add leading and trailing new lines only if it improves readability
|
|
907
912
|
!u || n.length > 70 || b || f || g
|
|
@@ -916,7 +921,7 @@ var A;
|
|
|
916
921
|
(function(n) {
|
|
917
922
|
n.SOF = "<SOF>", n.EOF = "<EOF>", n.BANG = "!", n.DOLLAR = "$", n.AMP = "&", n.PAREN_L = "(", n.PAREN_R = ")", n.SPREAD = "...", n.COLON = ":", n.EQUALS = "=", n.AT = "@", n.BRACKET_L = "[", n.BRACKET_R = "]", n.BRACE_L = "{", n.PIPE = "|", n.BRACE_R = "}", n.NAME = "Name", n.INT = "Int", n.FLOAT = "Float", n.STRING = "String", n.BLOCK_STRING = "BlockString", n.COMMENT = "Comment";
|
|
918
923
|
})(A || (A = {}));
|
|
919
|
-
class
|
|
924
|
+
class hv {
|
|
920
925
|
/**
|
|
921
926
|
* The previously focused non-ignored token.
|
|
922
927
|
*/
|
|
@@ -953,14 +958,14 @@ class pv {
|
|
|
953
958
|
if (r.next)
|
|
954
959
|
r = r.next;
|
|
955
960
|
else {
|
|
956
|
-
const i =
|
|
961
|
+
const i = gv(this, r.end);
|
|
957
962
|
r.next = i, i.prev = r, r = i;
|
|
958
963
|
}
|
|
959
964
|
while (r.kind === A.COMMENT);
|
|
960
965
|
return r;
|
|
961
966
|
}
|
|
962
967
|
}
|
|
963
|
-
function
|
|
968
|
+
function dv(n) {
|
|
964
969
|
return n === A.BANG || n === A.DOLLAR || n === A.AMP || n === A.PAREN_L || n === A.PAREN_R || n === A.SPREAD || n === A.COLON || n === A.EQUALS || n === A.AT || n === A.BRACKET_L || n === A.BRACKET_R || n === A.BRACE_L || n === A.PIPE || n === A.BRACE_R;
|
|
965
970
|
}
|
|
966
971
|
function di(n) {
|
|
@@ -989,7 +994,7 @@ function Ne(n, r, i, o, u) {
|
|
|
989
994
|
const f = n.line, g = 1 + i - n.lineStart;
|
|
990
995
|
return new jc(r, i, o, f, g, u);
|
|
991
996
|
}
|
|
992
|
-
function
|
|
997
|
+
function gv(n, r) {
|
|
993
998
|
const i = n.source.body, o = i.length;
|
|
994
999
|
let u = r;
|
|
995
1000
|
for (; u < o; ) {
|
|
@@ -1030,7 +1035,7 @@ function dv(n, r) {
|
|
|
1030
1035
|
continue;
|
|
1031
1036
|
// Comment
|
|
1032
1037
|
case 35:
|
|
1033
|
-
return
|
|
1038
|
+
return mv(n, u);
|
|
1034
1039
|
// Token ::
|
|
1035
1040
|
// - Punctuator
|
|
1036
1041
|
// - Name
|
|
@@ -1071,12 +1076,12 @@ function dv(n, r) {
|
|
|
1071
1076
|
return Ne(n, A.BRACE_R, u, u + 1);
|
|
1072
1077
|
// StringValue
|
|
1073
1078
|
case 34:
|
|
1074
|
-
return i.charCodeAt(u + 1) === 34 && i.charCodeAt(u + 2) === 34 ?
|
|
1079
|
+
return i.charCodeAt(u + 1) === 34 && i.charCodeAt(u + 2) === 34 ? wv(n, u) : vv(n, u);
|
|
1075
1080
|
}
|
|
1076
1081
|
if (Bi(f) || f === 45)
|
|
1077
|
-
return
|
|
1082
|
+
return yv(n, u, f);
|
|
1078
1083
|
if (Pa(f))
|
|
1079
|
-
return
|
|
1084
|
+
return Ev(n, u);
|
|
1080
1085
|
throw De(
|
|
1081
1086
|
n.source,
|
|
1082
1087
|
u,
|
|
@@ -1085,7 +1090,7 @@ function dv(n, r) {
|
|
|
1085
1090
|
}
|
|
1086
1091
|
return Ne(n, A.EOF, o, o);
|
|
1087
1092
|
}
|
|
1088
|
-
function
|
|
1093
|
+
function mv(n, r) {
|
|
1089
1094
|
const i = n.source.body, o = i.length;
|
|
1090
1095
|
let u = r + 1;
|
|
1091
1096
|
for (; u < o; ) {
|
|
@@ -1107,7 +1112,7 @@ function gv(n, r) {
|
|
|
1107
1112
|
i.slice(r + 1, u)
|
|
1108
1113
|
);
|
|
1109
1114
|
}
|
|
1110
|
-
function
|
|
1115
|
+
function yv(n, r, i) {
|
|
1111
1116
|
const o = n.source.body;
|
|
1112
1117
|
let u = r, f = i, g = !1;
|
|
1113
1118
|
if (f === 45 && (f = o.charCodeAt(++u)), f === 48) {
|
|
@@ -1155,7 +1160,7 @@ function Ea(n, r, i) {
|
|
|
1155
1160
|
++u;
|
|
1156
1161
|
return u;
|
|
1157
1162
|
}
|
|
1158
|
-
function
|
|
1163
|
+
function vv(n, r) {
|
|
1159
1164
|
const i = n.source.body, o = i.length;
|
|
1160
1165
|
let u = r + 1, f = u, g = "";
|
|
1161
1166
|
for (; u < o; ) {
|
|
@@ -1164,7 +1169,7 @@ function yv(n, r) {
|
|
|
1164
1169
|
return g += i.slice(f, u), Ne(n, A.STRING, r, u + 1, g);
|
|
1165
1170
|
if (v === 92) {
|
|
1166
1171
|
g += i.slice(f, u);
|
|
1167
|
-
const w = i.charCodeAt(u + 1) === 117 ? i.charCodeAt(u + 2) === 123 ?
|
|
1172
|
+
const w = i.charCodeAt(u + 1) === 117 ? i.charCodeAt(u + 2) === 123 ? _v(n, u) : xv(n, u) : Tv(n, u);
|
|
1168
1173
|
g += w.value, u += w.size, f = u;
|
|
1169
1174
|
continue;
|
|
1170
1175
|
}
|
|
@@ -1186,7 +1191,7 @@ function yv(n, r) {
|
|
|
1186
1191
|
}
|
|
1187
1192
|
throw De(n.source, u, "Unterminated string.");
|
|
1188
1193
|
}
|
|
1189
|
-
function
|
|
1194
|
+
function _v(n, r) {
|
|
1190
1195
|
const i = n.source.body;
|
|
1191
1196
|
let o = 0, u = 3;
|
|
1192
1197
|
for (; u < 12; ) {
|
|
@@ -1211,7 +1216,7 @@ function vv(n, r) {
|
|
|
1211
1216
|
)}".`
|
|
1212
1217
|
);
|
|
1213
1218
|
}
|
|
1214
|
-
function
|
|
1219
|
+
function xv(n, r) {
|
|
1215
1220
|
const i = n.source.body, o = Ec(i, r + 2);
|
|
1216
1221
|
if (di(o))
|
|
1217
1222
|
return {
|
|
@@ -1238,7 +1243,7 @@ function Ec(n, r) {
|
|
|
1238
1243
|
function Ui(n) {
|
|
1239
1244
|
return n >= 48 && n <= 57 ? n - 48 : n >= 65 && n <= 70 ? n - 55 : n >= 97 && n <= 102 ? n - 87 : -1;
|
|
1240
1245
|
}
|
|
1241
|
-
function
|
|
1246
|
+
function Tv(n, r) {
|
|
1242
1247
|
const i = n.source.body;
|
|
1243
1248
|
switch (i.charCodeAt(r + 1)) {
|
|
1244
1249
|
case 34:
|
|
@@ -1292,7 +1297,7 @@ function xv(n, r) {
|
|
|
1292
1297
|
)}".`
|
|
1293
1298
|
);
|
|
1294
1299
|
}
|
|
1295
|
-
function
|
|
1300
|
+
function wv(n, r) {
|
|
1296
1301
|
const i = n.source.body, o = i.length;
|
|
1297
1302
|
let u = n.lineStart, f = r + 3, g = f, v = "";
|
|
1298
1303
|
const w = [];
|
|
@@ -1306,7 +1311,7 @@ function Tv(n, r) {
|
|
|
1306
1311
|
r,
|
|
1307
1312
|
f + 3,
|
|
1308
1313
|
// Return a string of the lines joined with U+000A.
|
|
1309
|
-
|
|
1314
|
+
cv(w).join(`
|
|
1310
1315
|
`)
|
|
1311
1316
|
);
|
|
1312
1317
|
return n.line += w.length - 1, n.lineStart = u, O;
|
|
@@ -1335,7 +1340,7 @@ function Tv(n, r) {
|
|
|
1335
1340
|
}
|
|
1336
1341
|
throw De(n.source, f, "Unterminated string.");
|
|
1337
1342
|
}
|
|
1338
|
-
function
|
|
1343
|
+
function Ev(n, r) {
|
|
1339
1344
|
const i = n.source.body, o = i.length;
|
|
1340
1345
|
let u = r + 1;
|
|
1341
1346
|
for (; u < o; ) {
|
|
@@ -1353,7 +1358,7 @@ function wv(n, r) {
|
|
|
1353
1358
|
i.slice(r, u)
|
|
1354
1359
|
);
|
|
1355
1360
|
}
|
|
1356
|
-
const
|
|
1361
|
+
const Sv = 10, zc = 2;
|
|
1357
1362
|
function q(n) {
|
|
1358
1363
|
return zr(n, []);
|
|
1359
1364
|
}
|
|
@@ -1364,45 +1369,45 @@ function zr(n, r) {
|
|
|
1364
1369
|
case "function":
|
|
1365
1370
|
return n.name ? `[function ${n.name}]` : "[function]";
|
|
1366
1371
|
case "object":
|
|
1367
|
-
return
|
|
1372
|
+
return Av(n, r);
|
|
1368
1373
|
default:
|
|
1369
1374
|
return String(n);
|
|
1370
1375
|
}
|
|
1371
1376
|
}
|
|
1372
|
-
function
|
|
1377
|
+
function Av(n, r) {
|
|
1373
1378
|
if (n === null)
|
|
1374
1379
|
return "null";
|
|
1375
1380
|
if (r.includes(n))
|
|
1376
1381
|
return "[Circular]";
|
|
1377
1382
|
const i = [...r, n];
|
|
1378
|
-
if (
|
|
1383
|
+
if (Iv(n)) {
|
|
1379
1384
|
const o = n.toJSON();
|
|
1380
1385
|
if (o !== n)
|
|
1381
1386
|
return typeof o == "string" ? o : zr(o, i);
|
|
1382
1387
|
} else if (Array.isArray(n))
|
|
1383
|
-
return
|
|
1384
|
-
return
|
|
1388
|
+
return Nv(n, i);
|
|
1389
|
+
return bv(n, i);
|
|
1385
1390
|
}
|
|
1386
|
-
function
|
|
1391
|
+
function Iv(n) {
|
|
1387
1392
|
return typeof n.toJSON == "function";
|
|
1388
1393
|
}
|
|
1389
|
-
function
|
|
1394
|
+
function bv(n, r) {
|
|
1390
1395
|
const i = Object.entries(n);
|
|
1391
|
-
return i.length === 0 ? "{}" : r.length > zc ? "[" +
|
|
1396
|
+
return i.length === 0 ? "{}" : r.length > zc ? "[" + Ov(n) + "]" : "{ " + i.map(
|
|
1392
1397
|
([u, f]) => u + ": " + zr(f, r)
|
|
1393
1398
|
).join(", ") + " }";
|
|
1394
1399
|
}
|
|
1395
|
-
function
|
|
1400
|
+
function Nv(n, r) {
|
|
1396
1401
|
if (n.length === 0)
|
|
1397
1402
|
return "[]";
|
|
1398
1403
|
if (r.length > zc)
|
|
1399
1404
|
return "[Array]";
|
|
1400
|
-
const i = Math.min(
|
|
1405
|
+
const i = Math.min(Sv, n.length), o = n.length - i, u = [];
|
|
1401
1406
|
for (let f = 0; f < i; ++f)
|
|
1402
1407
|
u.push(zr(n[f], r));
|
|
1403
1408
|
return o === 1 ? u.push("... 1 more item") : o > 1 && u.push(`... ${o} more items`), "[" + u.join(", ") + "]";
|
|
1404
1409
|
}
|
|
1405
|
-
function
|
|
1410
|
+
function Ov(n) {
|
|
1406
1411
|
const r = Object.prototype.toString.call(n).replace(/^\[object /, "").replace(/]$/, "");
|
|
1407
1412
|
if (r === "Object" && typeof n.constructor == "function") {
|
|
1408
1413
|
const i = n.constructor.name;
|
|
@@ -1461,19 +1466,19 @@ class Qc {
|
|
|
1461
1466
|
return "Source";
|
|
1462
1467
|
}
|
|
1463
1468
|
}
|
|
1464
|
-
function
|
|
1469
|
+
function Cv(n) {
|
|
1465
1470
|
return Ut(n, Qc);
|
|
1466
1471
|
}
|
|
1467
|
-
function
|
|
1468
|
-
const i = new
|
|
1472
|
+
function Lv(n, r) {
|
|
1473
|
+
const i = new Rv(n, r);
|
|
1469
1474
|
i.expectToken(A.SOF);
|
|
1470
1475
|
const o = i.parseValueLiteral(!1);
|
|
1471
1476
|
return i.expectToken(A.EOF), o;
|
|
1472
1477
|
}
|
|
1473
|
-
class
|
|
1478
|
+
class Rv {
|
|
1474
1479
|
constructor(r, i = {}) {
|
|
1475
|
-
const o =
|
|
1476
|
-
this._lexer = new
|
|
1480
|
+
const o = Cv(r) ? r : new Qc(r);
|
|
1481
|
+
this._lexer = new hv(o), this._options = i, this._tokenCounter = 0;
|
|
1477
1482
|
}
|
|
1478
1483
|
/**
|
|
1479
1484
|
* Converts a name lex token into a name parse node.
|
|
@@ -2440,7 +2445,7 @@ class Lv {
|
|
|
2440
2445
|
* given parsed object.
|
|
2441
2446
|
*/
|
|
2442
2447
|
node(r, i) {
|
|
2443
|
-
return this._options.noLocation !== !0 && (i.loc = new
|
|
2448
|
+
return this._options.noLocation !== !0 && (i.loc = new ov(
|
|
2444
2449
|
r,
|
|
2445
2450
|
this._lexer.lastToken,
|
|
2446
2451
|
this._lexer.source
|
|
@@ -2576,10 +2581,10 @@ function Br(n) {
|
|
|
2576
2581
|
return Hc(n.kind) + (r != null ? ` "${r}"` : "");
|
|
2577
2582
|
}
|
|
2578
2583
|
function Hc(n) {
|
|
2579
|
-
return
|
|
2584
|
+
return dv(n) ? `"${n}"` : n;
|
|
2580
2585
|
}
|
|
2581
|
-
const
|
|
2582
|
-
function
|
|
2586
|
+
const Fv = 5;
|
|
2587
|
+
function Dv(n, r) {
|
|
2583
2588
|
const [i, o] = r ? [n, r] : [void 0, n];
|
|
2584
2589
|
let u = " Did you mean ";
|
|
2585
2590
|
i && (u += i + " ");
|
|
@@ -2592,7 +2597,7 @@ function Fv(n, r) {
|
|
|
2592
2597
|
case 2:
|
|
2593
2598
|
return u + f[0] + " or " + f[1] + "?";
|
|
2594
2599
|
}
|
|
2595
|
-
const g = f.slice(0,
|
|
2600
|
+
const g = f.slice(0, Fv), v = g.pop();
|
|
2596
2601
|
return u + g.join(", ") + ", or " + v + "?";
|
|
2597
2602
|
}
|
|
2598
2603
|
function Sc(n) {
|
|
@@ -2616,7 +2621,7 @@ function Qr(n, r) {
|
|
|
2616
2621
|
i[o] = r(n[o], o);
|
|
2617
2622
|
return i;
|
|
2618
2623
|
}
|
|
2619
|
-
function
|
|
2624
|
+
function Pv(n, r) {
|
|
2620
2625
|
let i = 0, o = 0;
|
|
2621
2626
|
for (; i < n.length && o < r.length; ) {
|
|
2622
2627
|
let u = n.charCodeAt(i), f = r.charCodeAt(o);
|
|
@@ -2643,22 +2648,22 @@ function Dv(n, r) {
|
|
|
2643
2648
|
}
|
|
2644
2649
|
return n.length - r.length;
|
|
2645
2650
|
}
|
|
2646
|
-
const La = 48,
|
|
2651
|
+
const La = 48, kv = 57;
|
|
2647
2652
|
function jr(n) {
|
|
2648
|
-
return !isNaN(n) && La <= n && n <=
|
|
2653
|
+
return !isNaN(n) && La <= n && n <= kv;
|
|
2649
2654
|
}
|
|
2650
|
-
function
|
|
2651
|
-
const i = /* @__PURE__ */ Object.create(null), o = new
|
|
2655
|
+
function Uv(n, r) {
|
|
2656
|
+
const i = /* @__PURE__ */ Object.create(null), o = new Mv(n), u = Math.floor(n.length * 0.4) + 1;
|
|
2652
2657
|
for (const f of r) {
|
|
2653
2658
|
const g = o.measure(f, u);
|
|
2654
2659
|
g !== void 0 && (i[f] = g);
|
|
2655
2660
|
}
|
|
2656
2661
|
return Object.keys(i).sort((f, g) => {
|
|
2657
2662
|
const v = i[f] - i[g];
|
|
2658
|
-
return v !== 0 ? v :
|
|
2663
|
+
return v !== 0 ? v : Pv(f, g);
|
|
2659
2664
|
});
|
|
2660
2665
|
}
|
|
2661
|
-
class
|
|
2666
|
+
class Mv {
|
|
2662
2667
|
constructor(r) {
|
|
2663
2668
|
this._input = r, this._inputLowerCase = r.toLowerCase(), this._inputArray = Ac(this._inputLowerCase), this._rows = [
|
|
2664
2669
|
new Array(r.length + 1).fill(0),
|
|
@@ -2725,14 +2730,14 @@ function vt(n) {
|
|
|
2725
2730
|
r[i] = o;
|
|
2726
2731
|
return r;
|
|
2727
2732
|
}
|
|
2728
|
-
function
|
|
2729
|
-
return `"${n.replace(
|
|
2733
|
+
function $v(n) {
|
|
2734
|
+
return `"${n.replace(Bv, jv)}"`;
|
|
2730
2735
|
}
|
|
2731
|
-
const
|
|
2732
|
-
function
|
|
2733
|
-
return
|
|
2736
|
+
const Bv = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
|
|
2737
|
+
function jv(n) {
|
|
2738
|
+
return Wv[n.charCodeAt(0)];
|
|
2734
2739
|
}
|
|
2735
|
-
const
|
|
2740
|
+
const Wv = [
|
|
2736
2741
|
"\\u0000",
|
|
2737
2742
|
"\\u0001",
|
|
2738
2743
|
"\\u0002",
|
|
@@ -2898,11 +2903,11 @@ const jv = [
|
|
|
2898
2903
|
"\\u009D",
|
|
2899
2904
|
"\\u009E",
|
|
2900
2905
|
"\\u009F"
|
|
2901
|
-
],
|
|
2902
|
-
function
|
|
2906
|
+
], Gv = Object.freeze({});
|
|
2907
|
+
function Vv(n, r, i = Wc) {
|
|
2903
2908
|
const o = /* @__PURE__ */ new Map();
|
|
2904
2909
|
for (const ge of Object.values(N))
|
|
2905
|
-
o.set(ge,
|
|
2910
|
+
o.set(ge, qv(r, ge));
|
|
2906
2911
|
let u, f = Array.isArray(n), g = [n], v = -1, w = [], b = n, O, D;
|
|
2907
2912
|
const P = [], M = [];
|
|
2908
2913
|
do {
|
|
@@ -2936,7 +2941,7 @@ function Gv(n, r, i = Wc) {
|
|
|
2936
2941
|
var $, de;
|
|
2937
2942
|
wc(b) || ue(!1, `Invalid AST Node: ${q(b)}.`);
|
|
2938
2943
|
const R = ge ? ($ = o.get(b.kind)) === null || $ === void 0 ? void 0 : $.leave : (de = o.get(b.kind)) === null || de === void 0 ? void 0 : de.enter;
|
|
2939
|
-
if (_e = R?.call(r, b, O, D, P, M), _e ===
|
|
2944
|
+
if (_e = R?.call(r, b, O, D, P, M), _e === Gv)
|
|
2940
2945
|
break;
|
|
2941
2946
|
if (_e === !1) {
|
|
2942
2947
|
if (!ge) {
|
|
@@ -2966,7 +2971,7 @@ function Gv(n, r, i = Wc) {
|
|
|
2966
2971
|
} while (u !== void 0);
|
|
2967
2972
|
return w.length !== 0 ? w[w.length - 1][1] : n;
|
|
2968
2973
|
}
|
|
2969
|
-
function
|
|
2974
|
+
function qv(n, r) {
|
|
2970
2975
|
const i = n[r];
|
|
2971
2976
|
return typeof i == "object" ? i : typeof i == "function" ? {
|
|
2972
2977
|
enter: i,
|
|
@@ -2977,9 +2982,9 @@ function Vv(n, r) {
|
|
|
2977
2982
|
};
|
|
2978
2983
|
}
|
|
2979
2984
|
function mt(n) {
|
|
2980
|
-
return
|
|
2985
|
+
return Vv(n, zv);
|
|
2981
2986
|
}
|
|
2982
|
-
const
|
|
2987
|
+
const Jv = 80, zv = {
|
|
2983
2988
|
Name: {
|
|
2984
2989
|
leave: (n) => n.value
|
|
2985
2990
|
},
|
|
@@ -3015,7 +3020,7 @@ const qv = 80, Jv = {
|
|
|
3015
3020
|
leave({ alias: n, name: r, arguments: i, directives: o, selectionSet: u }) {
|
|
3016
3021
|
const f = ne("", n, ": ") + r;
|
|
3017
3022
|
let g = f + ne("(", k(i, ", "), ")");
|
|
3018
|
-
return g.length >
|
|
3023
|
+
return g.length > Jv && (g = f + ne(`(
|
|
3019
3024
|
`, Vr(k(i, `
|
|
3020
3025
|
`)), `
|
|
3021
3026
|
)`)), k([g, k(o, " "), u], " ");
|
|
@@ -3053,7 +3058,7 @@ const qv = 80, Jv = {
|
|
|
3053
3058
|
leave: ({ value: n }) => n
|
|
3054
3059
|
},
|
|
3055
3060
|
StringValue: {
|
|
3056
|
-
leave: ({ value: n, block: r }) => r ?
|
|
3061
|
+
leave: ({ value: n, block: r }) => r ? pv(n) : $v(n)
|
|
3057
3062
|
},
|
|
3058
3063
|
BooleanValue: {
|
|
3059
3064
|
leave: ({ value: n }) => n ? "true" : "false"
|
|
@@ -3278,7 +3283,7 @@ function Ct(n) {
|
|
|
3278
3283
|
);
|
|
3279
3284
|
return n;
|
|
3280
3285
|
}
|
|
3281
|
-
function
|
|
3286
|
+
function Qv(n) {
|
|
3282
3287
|
if (n === "true" || n === "false" || n === "null")
|
|
3283
3288
|
throw new fe(`Enum values cannot be named: ${n}`);
|
|
3284
3289
|
return Ct(n);
|
|
@@ -3292,7 +3297,7 @@ function gi(n) {
|
|
|
3292
3297
|
function Xt(n) {
|
|
3293
3298
|
return Ut(n, En);
|
|
3294
3299
|
}
|
|
3295
|
-
function
|
|
3300
|
+
function Hv(n) {
|
|
3296
3301
|
if (!Xt(n))
|
|
3297
3302
|
throw new Error(`Expected ${q(n)} to be a GraphQL Object type.`);
|
|
3298
3303
|
return n;
|
|
@@ -3300,7 +3305,7 @@ function Qv(n) {
|
|
|
3300
3305
|
function dt(n) {
|
|
3301
3306
|
return Ut(n, cl);
|
|
3302
3307
|
}
|
|
3303
|
-
function
|
|
3308
|
+
function Yv(n) {
|
|
3304
3309
|
if (!dt(n))
|
|
3305
3310
|
throw new Error(
|
|
3306
3311
|
`Expected ${q(n)} to be a GraphQL Interface type.`
|
|
@@ -3331,7 +3336,7 @@ function Zc(n) {
|
|
|
3331
3336
|
function el(n) {
|
|
3332
3337
|
return gi(n) || Tn(n);
|
|
3333
3338
|
}
|
|
3334
|
-
function
|
|
3339
|
+
function Xv(n) {
|
|
3335
3340
|
return dt(n) || xn(n);
|
|
3336
3341
|
}
|
|
3337
3342
|
class ht {
|
|
@@ -3371,12 +3376,12 @@ function ka(n) {
|
|
|
3371
3376
|
function tl(n) {
|
|
3372
3377
|
return Xc(n) && !vn(n);
|
|
3373
3378
|
}
|
|
3374
|
-
function
|
|
3379
|
+
function Kv(n) {
|
|
3375
3380
|
if (!tl(n))
|
|
3376
3381
|
throw new Error(`Expected ${q(n)} to be a GraphQL nullable type.`);
|
|
3377
3382
|
return n;
|
|
3378
3383
|
}
|
|
3379
|
-
function
|
|
3384
|
+
function Zv(n) {
|
|
3380
3385
|
if (n) {
|
|
3381
3386
|
let r = n;
|
|
3382
3387
|
for (; ka(r); )
|
|
@@ -3584,7 +3589,7 @@ class cl {
|
|
|
3584
3589
|
class ll {
|
|
3585
3590
|
constructor(r) {
|
|
3586
3591
|
var i;
|
|
3587
|
-
this.name = Ct(r.name), this.description = r.description, this.resolveType = r.resolveType, this.extensions = vt(r.extensions), this.astNode = r.astNode, this.extensionASTNodes = (i = r.extensionASTNodes) !== null && i !== void 0 ? i : [], this._types =
|
|
3592
|
+
this.name = Ct(r.name), this.description = r.description, this.resolveType = r.resolveType, this.extensions = vt(r.extensions), this.astNode = r.astNode, this.extensionASTNodes = (i = r.extensionASTNodes) !== null && i !== void 0 ? i : [], this._types = e_.bind(void 0, r), r.resolveType == null || typeof r.resolveType == "function" || ue(
|
|
3588
3593
|
!1,
|
|
3589
3594
|
`${this.name} must provide "resolveType" as a function, but got: ${q(r.resolveType)}.`
|
|
3590
3595
|
);
|
|
@@ -3613,7 +3618,7 @@ class ll {
|
|
|
3613
3618
|
return this.toString();
|
|
3614
3619
|
}
|
|
3615
3620
|
}
|
|
3616
|
-
function
|
|
3621
|
+
function e_(n) {
|
|
3617
3622
|
const r = nl(n.types);
|
|
3618
3623
|
return Array.isArray(r) || ue(
|
|
3619
3624
|
!1,
|
|
@@ -3624,7 +3629,7 @@ class Hr {
|
|
|
3624
3629
|
/* <T> */
|
|
3625
3630
|
constructor(r) {
|
|
3626
3631
|
var i;
|
|
3627
|
-
this.name = Ct(r.name), this.description = r.description, this.extensions = vt(r.extensions), this.astNode = r.astNode, this.extensionASTNodes = (i = r.extensionASTNodes) !== null && i !== void 0 ? i : [], this._values =
|
|
3632
|
+
this.name = Ct(r.name), this.description = r.description, this.extensions = vt(r.extensions), this.astNode = r.astNode, this.extensionASTNodes = (i = r.extensionASTNodes) !== null && i !== void 0 ? i : [], this._values = t_(this.name, r.values), this._valueLookup = new Map(
|
|
3628
3633
|
this._values.map((o) => [o.value, o])
|
|
3629
3634
|
), this._nameLookup = Yc(this._values, (o) => o.name);
|
|
3630
3635
|
}
|
|
@@ -3710,10 +3715,10 @@ class Hr {
|
|
|
3710
3715
|
}
|
|
3711
3716
|
}
|
|
3712
3717
|
function Wr(n, r) {
|
|
3713
|
-
const i = n.getValues().map((u) => u.name), o =
|
|
3714
|
-
return
|
|
3718
|
+
const i = n.getValues().map((u) => u.name), o = Uv(r, i);
|
|
3719
|
+
return Dv("the enum value", o);
|
|
3715
3720
|
}
|
|
3716
|
-
function
|
|
3721
|
+
function t_(n, r) {
|
|
3717
3722
|
return fi(r) || ue(
|
|
3718
3723
|
!1,
|
|
3719
3724
|
`${n} values must be an object with value names as keys.`
|
|
@@ -3721,7 +3726,7 @@ function e_(n, r) {
|
|
|
3721
3726
|
!1,
|
|
3722
3727
|
`${n}.${i} must refer to an object with a "value" key representing an internal value but got: ${q(o)}.`
|
|
3723
3728
|
), {
|
|
3724
|
-
name:
|
|
3729
|
+
name: Qv(i),
|
|
3725
3730
|
description: o.description,
|
|
3726
3731
|
value: o.value !== void 0 ? o.value : i,
|
|
3727
3732
|
deprecationReason: o.deprecationReason,
|
|
@@ -3732,7 +3737,7 @@ function e_(n, r) {
|
|
|
3732
3737
|
class fl {
|
|
3733
3738
|
constructor(r) {
|
|
3734
3739
|
var i;
|
|
3735
|
-
this.name = Ct(r.name), this.description = r.description, this.extensions = vt(r.extensions), this.astNode = r.astNode, this.extensionASTNodes = (i = r.extensionASTNodes) !== null && i !== void 0 ? i : [], this._fields =
|
|
3740
|
+
this.name = Ct(r.name), this.description = r.description, this.extensions = vt(r.extensions), this.astNode = r.astNode, this.extensionASTNodes = (i = r.extensionASTNodes) !== null && i !== void 0 ? i : [], this._fields = n_.bind(void 0, r);
|
|
3736
3741
|
}
|
|
3737
3742
|
get [Symbol.toStringTag]() {
|
|
3738
3743
|
return "GraphQLInputObjectType";
|
|
@@ -3765,7 +3770,7 @@ class fl {
|
|
|
3765
3770
|
return this.toString();
|
|
3766
3771
|
}
|
|
3767
3772
|
}
|
|
3768
|
-
function
|
|
3773
|
+
function n_(n) {
|
|
3769
3774
|
const r = il(n.fields);
|
|
3770
3775
|
return fi(r) || ue(
|
|
3771
3776
|
!1,
|
|
@@ -3783,7 +3788,7 @@ function t_(n) {
|
|
|
3783
3788
|
astNode: i.astNode
|
|
3784
3789
|
}));
|
|
3785
3790
|
}
|
|
3786
|
-
const Sa = 2147483647, Aa = -2147483648,
|
|
3791
|
+
const Sa = 2147483647, Aa = -2147483648, i_ = new Wn({
|
|
3787
3792
|
name: "Int",
|
|
3788
3793
|
description: "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",
|
|
3789
3794
|
serialize(n) {
|
|
@@ -3830,7 +3835,7 @@ const Sa = 2147483647, Aa = -2147483648, n_ = new Wn({
|
|
|
3830
3835
|
);
|
|
3831
3836
|
return r;
|
|
3832
3837
|
}
|
|
3833
|
-
}),
|
|
3838
|
+
}), r_ = new Wn({
|
|
3834
3839
|
name: "Float",
|
|
3835
3840
|
description: "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",
|
|
3836
3841
|
serialize(n) {
|
|
@@ -3953,12 +3958,12 @@ const Sa = 2147483647, Aa = -2147483648, n_ = new Wn({
|
|
|
3953
3958
|
}
|
|
3954
3959
|
}), hl = Object.freeze([
|
|
3955
3960
|
be,
|
|
3956
|
-
n_,
|
|
3957
3961
|
i_,
|
|
3962
|
+
r_,
|
|
3958
3963
|
gt,
|
|
3959
3964
|
pl
|
|
3960
3965
|
]);
|
|
3961
|
-
function
|
|
3966
|
+
function s_(n) {
|
|
3962
3967
|
return hl.some(({ name: r }) => n.name === r);
|
|
3963
3968
|
}
|
|
3964
3969
|
function Vi(n) {
|
|
@@ -3973,7 +3978,7 @@ function Vi(n) {
|
|
|
3973
3978
|
}
|
|
3974
3979
|
return n;
|
|
3975
3980
|
}
|
|
3976
|
-
function
|
|
3981
|
+
function a_(n) {
|
|
3977
3982
|
return Ut(n, mi);
|
|
3978
3983
|
}
|
|
3979
3984
|
class mi {
|
|
@@ -4007,7 +4012,7 @@ class mi {
|
|
|
4007
4012
|
return this.toString();
|
|
4008
4013
|
}
|
|
4009
4014
|
}
|
|
4010
|
-
const
|
|
4015
|
+
const o_ = new mi({
|
|
4011
4016
|
name: "include",
|
|
4012
4017
|
description: "Directs the executor to include this field or fragment only when the `if` argument is true.",
|
|
4013
4018
|
locations: [
|
|
@@ -4021,7 +4026,7 @@ const a_ = new mi({
|
|
|
4021
4026
|
description: "Included when true."
|
|
4022
4027
|
}
|
|
4023
4028
|
}
|
|
4024
|
-
}),
|
|
4029
|
+
}), u_ = new mi({
|
|
4025
4030
|
name: "skip",
|
|
4026
4031
|
description: "Directs the executor to skip this field or fragment when the `if` argument is true.",
|
|
4027
4032
|
locations: [
|
|
@@ -4035,7 +4040,7 @@ const a_ = new mi({
|
|
|
4035
4040
|
description: "Skipped when true."
|
|
4036
4041
|
}
|
|
4037
4042
|
}
|
|
4038
|
-
}), dl = "No longer supported",
|
|
4043
|
+
}), dl = "No longer supported", c_ = new mi({
|
|
4039
4044
|
name: "deprecated",
|
|
4040
4045
|
description: "Marks an element of a GraphQL schema as no longer supported.",
|
|
4041
4046
|
locations: [
|
|
@@ -4051,7 +4056,7 @@ const a_ = new mi({
|
|
|
4051
4056
|
defaultValue: dl
|
|
4052
4057
|
}
|
|
4053
4058
|
}
|
|
4054
|
-
}),
|
|
4059
|
+
}), l_ = new mi({
|
|
4055
4060
|
name: "specifiedBy",
|
|
4056
4061
|
description: "Exposes a URL that specifies the behavior of this scalar.",
|
|
4057
4062
|
locations: [se.SCALAR],
|
|
@@ -4062,15 +4067,15 @@ const a_ = new mi({
|
|
|
4062
4067
|
}
|
|
4063
4068
|
}
|
|
4064
4069
|
}), gl = Object.freeze([
|
|
4065
|
-
a_,
|
|
4066
4070
|
o_,
|
|
4067
4071
|
u_,
|
|
4068
|
-
c_
|
|
4072
|
+
c_,
|
|
4073
|
+
l_
|
|
4069
4074
|
]);
|
|
4070
|
-
function
|
|
4075
|
+
function f_(n) {
|
|
4071
4076
|
return gl.some(({ name: r }) => r === n.name);
|
|
4072
4077
|
}
|
|
4073
|
-
function
|
|
4078
|
+
function p_(n) {
|
|
4074
4079
|
return typeof n == "object" && typeof n?.[Symbol.iterator] == "function";
|
|
4075
4080
|
}
|
|
4076
4081
|
function li(n, r) {
|
|
@@ -4086,7 +4091,7 @@ function li(n, r) {
|
|
|
4086
4091
|
return null;
|
|
4087
4092
|
if (Gi(r)) {
|
|
4088
4093
|
const i = r.ofType;
|
|
4089
|
-
if (
|
|
4094
|
+
if (p_(n)) {
|
|
4090
4095
|
const o = [];
|
|
4091
4096
|
for (const u of n) {
|
|
4092
4097
|
const f = li(u, i);
|
|
@@ -4377,7 +4382,7 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
|
|
|
4377
4382
|
possibleTypes: {
|
|
4378
4383
|
type: new ht(new re(kt)),
|
|
4379
4384
|
resolve(n, r, i, { schema: o }) {
|
|
4380
|
-
if (
|
|
4385
|
+
if (Xv(n))
|
|
4381
4386
|
return o.getPossibleTypes(n);
|
|
4382
4387
|
}
|
|
4383
4388
|
},
|
|
@@ -4565,10 +4570,10 @@ const Tl = Object.freeze([
|
|
|
4565
4570
|
_l,
|
|
4566
4571
|
xl
|
|
4567
4572
|
]);
|
|
4568
|
-
function
|
|
4573
|
+
function h_(n) {
|
|
4569
4574
|
return Tl.some(({ name: r }) => n.name === r);
|
|
4570
4575
|
}
|
|
4571
|
-
class
|
|
4576
|
+
class d_ {
|
|
4572
4577
|
// Used as a cache for validateSchema().
|
|
4573
4578
|
constructor(r) {
|
|
4574
4579
|
var i, o;
|
|
@@ -4585,7 +4590,7 @@ class h_ {
|
|
|
4585
4590
|
u.delete(f), bt(f, u);
|
|
4586
4591
|
this._queryType != null && bt(this._queryType, u), this._mutationType != null && bt(this._mutationType, u), this._subscriptionType != null && bt(this._subscriptionType, u);
|
|
4587
4592
|
for (const f of this._directives)
|
|
4588
|
-
if (
|
|
4593
|
+
if (a_(f))
|
|
4589
4594
|
for (const g of f.args)
|
|
4590
4595
|
bt(g.type, u);
|
|
4591
4596
|
bt(Ua, u), this._typeMap = /* @__PURE__ */ Object.create(null), this._subTypeMap = /* @__PURE__ */ Object.create(null), this._implementationsMap = /* @__PURE__ */ Object.create(null);
|
|
@@ -4698,7 +4703,7 @@ class h_ {
|
|
|
4698
4703
|
}
|
|
4699
4704
|
}
|
|
4700
4705
|
function bt(n, r) {
|
|
4701
|
-
const i =
|
|
4706
|
+
const i = Zv(n);
|
|
4702
4707
|
if (!r.has(i)) {
|
|
4703
4708
|
if (r.add(i), xn(i))
|
|
4704
4709
|
for (const o of i.getTypes())
|
|
@@ -4782,7 +4787,7 @@ function Mi(n, r, i) {
|
|
|
4782
4787
|
function Nc(n, r) {
|
|
4783
4788
|
return n.kind === N.VARIABLE && r == null;
|
|
4784
4789
|
}
|
|
4785
|
-
function
|
|
4790
|
+
function g_(n) {
|
|
4786
4791
|
const r = {
|
|
4787
4792
|
descriptions: !0,
|
|
4788
4793
|
specifiedByUrl: !1,
|
|
@@ -4901,7 +4906,7 @@ function d_(n) {
|
|
|
4901
4906
|
}
|
|
4902
4907
|
`;
|
|
4903
4908
|
}
|
|
4904
|
-
function
|
|
4909
|
+
function m_(n, r) {
|
|
4905
4910
|
Kt(n) && Kt(n.__schema) || ue(
|
|
4906
4911
|
!1,
|
|
4907
4912
|
`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${q(
|
|
@@ -4916,7 +4921,7 @@ function g_(n, r) {
|
|
|
4916
4921
|
for (const x of [...hl, ...Tl])
|
|
4917
4922
|
o[x.name] && (o[x.name] = x);
|
|
4918
4923
|
const u = i.queryType ? O(i.queryType) : null, f = i.mutationType ? O(i.mutationType) : null, g = i.subscriptionType ? O(i.subscriptionType) : null, v = i.directives ? i.directives.map(Ve) : [];
|
|
4919
|
-
return new
|
|
4924
|
+
return new d_({
|
|
4920
4925
|
description: i.description,
|
|
4921
4926
|
query: u,
|
|
4922
4927
|
mutation: f,
|
|
@@ -4937,7 +4942,7 @@ function g_(n, r) {
|
|
|
4937
4942
|
if (!V)
|
|
4938
4943
|
throw new Error("Decorated type deeper than introspection query.");
|
|
4939
4944
|
const we = w(V);
|
|
4940
|
-
return new re(
|
|
4945
|
+
return new re(Kv(we));
|
|
4941
4946
|
}
|
|
4942
4947
|
return b(x);
|
|
4943
4948
|
}
|
|
@@ -4953,10 +4958,10 @@ function g_(n, r) {
|
|
|
4953
4958
|
return we;
|
|
4954
4959
|
}
|
|
4955
4960
|
function O(x) {
|
|
4956
|
-
return
|
|
4961
|
+
return Hv(b(x));
|
|
4957
4962
|
}
|
|
4958
4963
|
function D(x) {
|
|
4959
|
-
return
|
|
4964
|
+
return Yv(b(x));
|
|
4960
4965
|
}
|
|
4961
4966
|
function P(x) {
|
|
4962
4967
|
if (x != null && x.name != null && x.kind != null)
|
|
@@ -5106,7 +5111,7 @@ function g_(n, r) {
|
|
|
5106
5111
|
`Introspection must provide input type for arguments, but received: ${_t}.`
|
|
5107
5112
|
);
|
|
5108
5113
|
}
|
|
5109
|
-
const we = x.defaultValue != null ? Mi(
|
|
5114
|
+
const we = x.defaultValue != null ? Mi(Lv(x.defaultValue), V) : void 0;
|
|
5110
5115
|
return {
|
|
5111
5116
|
description: x.description,
|
|
5112
5117
|
type: V,
|
|
@@ -5136,28 +5141,28 @@ function g_(n, r) {
|
|
|
5136
5141
|
});
|
|
5137
5142
|
}
|
|
5138
5143
|
}
|
|
5139
|
-
function
|
|
5140
|
-
return
|
|
5144
|
+
function y_(n) {
|
|
5145
|
+
return __(
|
|
5141
5146
|
n,
|
|
5142
|
-
(r) => !
|
|
5143
|
-
|
|
5147
|
+
(r) => !f_(r),
|
|
5148
|
+
v_
|
|
5144
5149
|
);
|
|
5145
5150
|
}
|
|
5146
|
-
function
|
|
5147
|
-
return !
|
|
5151
|
+
function v_(n) {
|
|
5152
|
+
return !s_(n) && !h_(n);
|
|
5148
5153
|
}
|
|
5149
|
-
function
|
|
5154
|
+
function __(n, r, i) {
|
|
5150
5155
|
const o = n.getDirectives().filter(r), u = Object.values(n.getTypeMap()).filter(i);
|
|
5151
5156
|
return [
|
|
5152
|
-
|
|
5153
|
-
...o.map((f) =>
|
|
5154
|
-
...u.map((f) =>
|
|
5157
|
+
x_(n),
|
|
5158
|
+
...o.map((f) => O_(f)),
|
|
5159
|
+
...u.map((f) => w_(f))
|
|
5155
5160
|
].filter(Boolean).join(`
|
|
5156
5161
|
|
|
5157
5162
|
`);
|
|
5158
5163
|
}
|
|
5159
|
-
function
|
|
5160
|
-
if (n.description == null &&
|
|
5164
|
+
function x_(n) {
|
|
5165
|
+
if (n.description == null && T_(n))
|
|
5161
5166
|
return;
|
|
5162
5167
|
const r = [], i = n.getQueryType();
|
|
5163
5168
|
i && r.push(` query: ${i.name}`);
|
|
@@ -5169,7 +5174,7 @@ ${r.join(`
|
|
|
5169
5174
|
`)}
|
|
5170
5175
|
}`;
|
|
5171
5176
|
}
|
|
5172
|
-
function
|
|
5177
|
+
function T_(n) {
|
|
5173
5178
|
const r = n.getQueryType();
|
|
5174
5179
|
if (r && r.name !== "Query")
|
|
5175
5180
|
return !1;
|
|
@@ -5179,45 +5184,45 @@ function x_(n) {
|
|
|
5179
5184
|
const o = n.getSubscriptionType();
|
|
5180
5185
|
return !(o && o.name !== "Subscription");
|
|
5181
5186
|
}
|
|
5182
|
-
function
|
|
5187
|
+
function w_(n) {
|
|
5183
5188
|
if (gi(n))
|
|
5184
|
-
return w_(n);
|
|
5185
|
-
if (Xt(n))
|
|
5186
5189
|
return E_(n);
|
|
5187
|
-
if (
|
|
5190
|
+
if (Xt(n))
|
|
5188
5191
|
return S_(n);
|
|
5189
|
-
if (
|
|
5192
|
+
if (dt(n))
|
|
5190
5193
|
return A_(n);
|
|
5191
|
-
if (
|
|
5194
|
+
if (xn(n))
|
|
5192
5195
|
return I_(n);
|
|
5193
|
-
if (
|
|
5196
|
+
if (Tn(n))
|
|
5194
5197
|
return b_(n);
|
|
5198
|
+
if (wn(n))
|
|
5199
|
+
return N_(n);
|
|
5195
5200
|
Wi(!1, "Unexpected type: " + q(n));
|
|
5196
5201
|
}
|
|
5197
|
-
function
|
|
5198
|
-
return yt(n) + `scalar ${n.name}` +
|
|
5202
|
+
function E_(n) {
|
|
5203
|
+
return yt(n) + `scalar ${n.name}` + C_(n);
|
|
5199
5204
|
}
|
|
5200
5205
|
function wl(n) {
|
|
5201
5206
|
const r = n.getInterfaces();
|
|
5202
5207
|
return r.length ? " implements " + r.map((i) => i.name).join(" & ") : "";
|
|
5203
5208
|
}
|
|
5204
|
-
function
|
|
5209
|
+
function S_(n) {
|
|
5205
5210
|
return yt(n) + `type ${n.name}` + wl(n) + El(n);
|
|
5206
5211
|
}
|
|
5207
|
-
function
|
|
5212
|
+
function A_(n) {
|
|
5208
5213
|
return yt(n) + `interface ${n.name}` + wl(n) + El(n);
|
|
5209
5214
|
}
|
|
5210
|
-
function
|
|
5215
|
+
function I_(n) {
|
|
5211
5216
|
const r = n.getTypes(), i = r.length ? " = " + r.join(" | ") : "";
|
|
5212
5217
|
return yt(n) + "union " + n.name + i;
|
|
5213
5218
|
}
|
|
5214
|
-
function
|
|
5219
|
+
function b_(n) {
|
|
5215
5220
|
const r = n.getValues().map(
|
|
5216
5221
|
(i, o) => yt(i, " ", !o) + " " + i.name + $a(i.deprecationReason)
|
|
5217
5222
|
);
|
|
5218
5223
|
return yt(n) + `enum ${n.name}` + Ma(r);
|
|
5219
5224
|
}
|
|
5220
|
-
function
|
|
5225
|
+
function N_(n) {
|
|
5221
5226
|
const r = Object.values(n.getFields()).map(
|
|
5222
5227
|
(i, o) => yt(i, " ", !o) + " " + Fa(i)
|
|
5223
5228
|
);
|
|
@@ -5248,7 +5253,7 @@ function Fa(n) {
|
|
|
5248
5253
|
let i = n.name + ": " + String(n.type);
|
|
5249
5254
|
return r && (i += ` = ${mt(r)}`), i + $a(n.deprecationReason);
|
|
5250
5255
|
}
|
|
5251
|
-
function
|
|
5256
|
+
function O_(n) {
|
|
5252
5257
|
return yt(n) + "directive @" + n.name + Sl(n.args) + (n.isRepeatable ? " repeatable" : "") + " on " + n.locations.join(" | ");
|
|
5253
5258
|
}
|
|
5254
5259
|
function $a(n) {
|
|
@@ -5257,7 +5262,7 @@ function $a(n) {
|
|
|
5257
5262
|
value: n
|
|
5258
5263
|
})})` : " @deprecated";
|
|
5259
5264
|
}
|
|
5260
|
-
function
|
|
5265
|
+
function C_(n) {
|
|
5261
5266
|
return n.specifiedByURL == null ? "" : ` @specifiedBy(url: ${mt({
|
|
5262
5267
|
kind: N.STRING,
|
|
5263
5268
|
value: n.specifiedByURL
|
|
@@ -5270,7 +5275,7 @@ function yt(n, r = "", i = !0) {
|
|
|
5270
5275
|
const u = mt({
|
|
5271
5276
|
kind: N.STRING,
|
|
5272
5277
|
value: o,
|
|
5273
|
-
block:
|
|
5278
|
+
block: fv(o)
|
|
5274
5279
|
});
|
|
5275
5280
|
return (r && !i ? `
|
|
5276
5281
|
` + r : r) + u.replace(/\n/g, `
|
|
@@ -5481,7 +5486,7 @@ class Zt {
|
|
|
5481
5486
|
}
|
|
5482
5487
|
async getSchema() {
|
|
5483
5488
|
try {
|
|
5484
|
-
const r =
|
|
5489
|
+
const r = g_(), i = await this.client.post(
|
|
5485
5490
|
"/graphql",
|
|
5486
5491
|
{
|
|
5487
5492
|
query: r
|
|
@@ -5498,10 +5503,10 @@ class Zt {
|
|
|
5498
5503
|
success: !1,
|
|
5499
5504
|
error: `GraphQL introspection errors: ${JSON.stringify(i.data.errors)}`
|
|
5500
5505
|
};
|
|
5501
|
-
const o =
|
|
5506
|
+
const o = m_(i.data.data);
|
|
5502
5507
|
return {
|
|
5503
5508
|
success: !0,
|
|
5504
|
-
data:
|
|
5509
|
+
data: y_(o),
|
|
5505
5510
|
message: "Successfully load schema"
|
|
5506
5511
|
};
|
|
5507
5512
|
} catch (r) {
|
|
@@ -5650,7 +5655,7 @@ class Zt {
|
|
|
5650
5655
|
uploadApplicationFile(file: $file, applicationUniversalIdentifier: $applicationUniversalIdentifier, fileFolder: $fileFolder, filePath: $filePath)
|
|
5651
5656
|
{ path }
|
|
5652
5657
|
}
|
|
5653
|
-
`, O =
|
|
5658
|
+
`, O = Ry(o), D = JSON.stringify({
|
|
5654
5659
|
query: b,
|
|
5655
5660
|
variables: {
|
|
5656
5661
|
file: null,
|
|
@@ -5726,7 +5731,7 @@ class Zt {
|
|
|
5726
5731
|
}[i] || "application/octet-stream";
|
|
5727
5732
|
}
|
|
5728
5733
|
}
|
|
5729
|
-
class
|
|
5734
|
+
class L_ {
|
|
5730
5735
|
constructor(r) {
|
|
5731
5736
|
this.apiService = new Zt(), this.applicationUniversalIdentifier = r.applicationUniversalIdentifier, this.appPath = r.appPath;
|
|
5732
5737
|
}
|
|
@@ -5744,7 +5749,7 @@ class C_ {
|
|
|
5744
5749
|
}
|
|
5745
5750
|
}
|
|
5746
5751
|
var Al = /* @__PURE__ */ ((n) => (n.DefineApplication = "defineApplication", n.DefineField = "defineField", n.DefineLogicFunction = "defineLogicFunction", n.DefineObject = "defineObject", n.DefineRole = "defineRole", n.DefineFrontComponent = "defineFrontComponent", n))(Al || {}), gn = /* @__PURE__ */ ((n) => (n.Application = "application", n.Fields = "fields", n.LogicFunctions = "logicFunctions", n.Objects = "objects", n.Roles = "roles", n.FrontComponents = "frontComponents", n.PublicAssets = "publicAssets", n))(gn || {});
|
|
5747
|
-
const
|
|
5752
|
+
const R_ = {
|
|
5748
5753
|
defineApplication: "application",
|
|
5749
5754
|
defineField: "fields",
|
|
5750
5755
|
defineLogicFunction: "logicFunctions",
|
|
@@ -5752,13 +5757,13 @@ const L_ = {
|
|
|
5752
5757
|
defineRole: "roles",
|
|
5753
5758
|
defineFrontComponent: "frontComponents"
|
|
5754
5759
|
/* FrontComponents */
|
|
5755
|
-
},
|
|
5760
|
+
}, F_ = (n) => {
|
|
5756
5761
|
if (!ci.isCallExpression(n))
|
|
5757
5762
|
return;
|
|
5758
5763
|
const r = n.expression;
|
|
5759
5764
|
if (ci.isIdentifier(r) && Object.values(Al).includes(r.text))
|
|
5760
5765
|
return r.text;
|
|
5761
|
-
},
|
|
5766
|
+
}, D_ = (n) => {
|
|
5762
5767
|
const r = ci.createSourceFile(
|
|
5763
5768
|
"temp.ts",
|
|
5764
5769
|
n,
|
|
@@ -5772,7 +5777,7 @@ const L_ = {
|
|
|
5772
5777
|
if (ci.isExportAssignment(o)) {
|
|
5773
5778
|
if (o.isExportEquals || !o.expression)
|
|
5774
5779
|
return;
|
|
5775
|
-
const u =
|
|
5780
|
+
const u = F_(o.expression);
|
|
5776
5781
|
if (u)
|
|
5777
5782
|
return u;
|
|
5778
5783
|
}
|
|
@@ -5780,9 +5785,9 @@ const L_ = {
|
|
|
5780
5785
|
filePath: n,
|
|
5781
5786
|
appPath: r
|
|
5782
5787
|
}) => {
|
|
5783
|
-
const i = await
|
|
5784
|
-
return
|
|
5785
|
-
},
|
|
5788
|
+
const i = await P_({ filePath: n, appPath: r });
|
|
5789
|
+
return k_(i, n);
|
|
5790
|
+
}, P_ = async ({
|
|
5786
5791
|
filePath: n,
|
|
5787
5792
|
appPath: r
|
|
5788
5793
|
}) => {
|
|
@@ -5812,21 +5817,21 @@ const L_ = {
|
|
|
5812
5817
|
} finally {
|
|
5813
5818
|
await he.remove(b);
|
|
5814
5819
|
}
|
|
5815
|
-
},
|
|
5816
|
-
if (ji(n.default) &&
|
|
5820
|
+
}, k_ = (n, r) => {
|
|
5821
|
+
if (ji(n.default) && Fy(n.default))
|
|
5817
5822
|
return n.default;
|
|
5818
5823
|
throw new Error(
|
|
5819
5824
|
`Config file ${r} must export a config object default export`
|
|
5820
5825
|
);
|
|
5821
|
-
},
|
|
5826
|
+
}, U_ = async (n) => await Mc(["**/*.ts", "**/*.tsx"], {
|
|
5822
5827
|
cwd: n,
|
|
5823
5828
|
absolute: !0,
|
|
5824
5829
|
ignore: ["**/node_modules/**", "**/*.d.ts", "**/dist/**", "**/.twenty/**"],
|
|
5825
5830
|
onlyFiles: !0
|
|
5826
|
-
}),
|
|
5831
|
+
}), M_ = async (n) => await Mc([`${Da}/**/*`], {
|
|
5827
5832
|
cwd: n,
|
|
5828
5833
|
onlyFiles: !0
|
|
5829
|
-
}),
|
|
5834
|
+
}), $_ = async (n, r) => {
|
|
5830
5835
|
const i = {};
|
|
5831
5836
|
for (const o of r) {
|
|
5832
5837
|
const f = Ot(n, o).split(fy), g = await he.readFile(o, "utf8");
|
|
@@ -5838,14 +5843,14 @@ const L_ = {
|
|
|
5838
5843
|
}
|
|
5839
5844
|
return i;
|
|
5840
5845
|
}, Xr = async (n) => {
|
|
5841
|
-
const r = await
|
|
5846
|
+
const r = await U_(n), i = [];
|
|
5842
5847
|
let o;
|
|
5843
5848
|
const u = [], f = [], g = [], v = [], w = [], b = [], O = [], D = [], P = [], M = [], $ = [], de = [], ae = [];
|
|
5844
5849
|
for (const R of r) {
|
|
5845
|
-
const ee = await dy(R, "utf-8"), H = Ot(n, R), ce =
|
|
5850
|
+
const ee = await dy(R, "utf-8"), H = Ot(n, R), ce = D_(ee);
|
|
5846
5851
|
if (!ce)
|
|
5847
5852
|
continue;
|
|
5848
|
-
switch (
|
|
5853
|
+
switch (R_[ce]) {
|
|
5849
5854
|
case gn.Application: {
|
|
5850
5855
|
const x = await ui({
|
|
5851
5856
|
appPath: n,
|
|
@@ -5920,7 +5925,7 @@ const L_ = {
|
|
|
5920
5925
|
Dc();
|
|
5921
5926
|
}
|
|
5922
5927
|
}
|
|
5923
|
-
const ge = await
|
|
5928
|
+
const ge = await M_(n);
|
|
5924
5929
|
for (const R of ge)
|
|
5925
5930
|
b.push({
|
|
5926
5931
|
filePath: R,
|
|
@@ -5938,7 +5943,7 @@ const L_ = {
|
|
|
5938
5943
|
logicFunctions: v,
|
|
5939
5944
|
frontComponents: w,
|
|
5940
5945
|
publicAssets: b,
|
|
5941
|
-
sources: await
|
|
5946
|
+
sources: await $_(n, r)
|
|
5942
5947
|
} : null, filePaths: {
|
|
5943
5948
|
application: O,
|
|
5944
5949
|
objects: D,
|
|
@@ -5948,7 +5953,7 @@ const L_ = {
|
|
|
5948
5953
|
frontComponents: de,
|
|
5949
5954
|
publicAssets: ae
|
|
5950
5955
|
}, errors: i };
|
|
5951
|
-
},
|
|
5956
|
+
}, B_ = (n) => {
|
|
5952
5957
|
const r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
5953
5958
|
for (const o of n)
|
|
5954
5959
|
r.has(o) ? i.add(o) : r.add(o);
|
|
@@ -5960,11 +5965,11 @@ const L_ = {
|
|
|
5960
5965
|
for (const [i, o] of Object.entries(n))
|
|
5961
5966
|
i === "universalIdentifier" && typeof o == "string" && r.push(o), typeof o == "object" && r.push(...Il(o));
|
|
5962
5967
|
return r;
|
|
5963
|
-
},
|
|
5964
|
-
const r = [], i = [], o =
|
|
5968
|
+
}, j_ = (n) => {
|
|
5969
|
+
const r = [], i = [], o = B_(Il(n));
|
|
5965
5970
|
return o.length > 0 && r.push(`Duplicate universal identifiers: ${o.join(", ")}`), wa(n.objects) || i.push("No object defined"), wa(n.logicFunctions) || i.push("No logic function defined"), wa(n.frontComponents) || i.push("No front component defined"), { errors: r, warnings: i, isValid: r.length === 0 };
|
|
5966
5971
|
};
|
|
5967
|
-
class
|
|
5972
|
+
class W_ {
|
|
5968
5973
|
constructor(r) {
|
|
5969
5974
|
this.builtFileInfos = /* @__PURE__ */ new Map(), this.fileUploader = null, this.apiService = new Zt({ disableInterceptors: !0 }), this.activeUploads = /* @__PURE__ */ new Set(), this.syncTimer = null, this.isSyncing = !1, this.serverReady = !1, this.serverErrorLogged = !1, this.appPath = r.appPath, this.debounceMs = r.debounceMs ?? 200, this.handleManifestBuilt = r.handleManifestBuilt, this.uiStateManager = r.uiStateManager;
|
|
5970
5975
|
}
|
|
@@ -6082,7 +6087,7 @@ class j_ {
|
|
|
6082
6087
|
});
|
|
6083
6088
|
return;
|
|
6084
6089
|
}
|
|
6085
|
-
const i =
|
|
6090
|
+
const i = j_(r.manifest);
|
|
6086
6091
|
if (!i.isValid) {
|
|
6087
6092
|
for (const f of i.errors)
|
|
6088
6093
|
this.uiStateManager.addEvent({
|
|
@@ -6143,7 +6148,7 @@ class j_ {
|
|
|
6143
6148
|
return;
|
|
6144
6149
|
}
|
|
6145
6150
|
}
|
|
6146
|
-
this.fileUploader = new
|
|
6151
|
+
this.fileUploader = new L_({
|
|
6147
6152
|
appPath: this.appPath,
|
|
6148
6153
|
applicationUniversalIdentifier: r.manifest.application.universalIdentifier
|
|
6149
6154
|
});
|
|
@@ -6155,14 +6160,14 @@ class j_ {
|
|
|
6155
6160
|
}
|
|
6156
6161
|
for (; this.activeUploads.size > 0; )
|
|
6157
6162
|
await Promise.all(this.activeUploads);
|
|
6158
|
-
const o =
|
|
6163
|
+
const o = nv({
|
|
6159
6164
|
manifest: r.manifest,
|
|
6160
6165
|
builtFileInfos: this.builtFileInfos
|
|
6161
6166
|
});
|
|
6162
6167
|
this.uiStateManager.addEvent({
|
|
6163
6168
|
message: "Manifest checksums set",
|
|
6164
6169
|
status: "info"
|
|
6165
|
-
}), await
|
|
6170
|
+
}), await iv(this.appPath, o), this.uiStateManager.addEvent({
|
|
6166
6171
|
message: "Manifest saved to output directory",
|
|
6167
6172
|
status: "info"
|
|
6168
6173
|
}), this.uiStateManager.addEvent({
|
|
@@ -6196,13 +6201,13 @@ class j_ {
|
|
|
6196
6201
|
}
|
|
6197
6202
|
}
|
|
6198
6203
|
}
|
|
6199
|
-
const
|
|
6204
|
+
const G_ = {
|
|
6200
6205
|
pending: ["building", "uploading", "success"],
|
|
6201
6206
|
building: ["pending", "uploading", "success"],
|
|
6202
6207
|
uploading: ["pending", "success"],
|
|
6203
6208
|
success: ["pending", "building", "uploading"]
|
|
6204
6209
|
};
|
|
6205
|
-
class
|
|
6210
|
+
class V_ {
|
|
6206
6211
|
constructor({
|
|
6207
6212
|
appPath: r,
|
|
6208
6213
|
frontendUrl: i
|
|
@@ -6306,7 +6311,7 @@ class G_ {
|
|
|
6306
6311
|
}
|
|
6307
6312
|
updateFileStatus(r, i) {
|
|
6308
6313
|
const o = new Map(this.state.entities), u = o.get(r);
|
|
6309
|
-
u?.status && !
|
|
6314
|
+
u?.status && !G_[u.status].find(
|
|
6310
6315
|
(f) => f === i
|
|
6311
6316
|
) || (o.set(
|
|
6312
6317
|
r,
|
|
@@ -6332,12 +6337,12 @@ const Ia = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"
|
|
|
6332
6337
|
[Re.LogicFunction]: "Logic functions",
|
|
6333
6338
|
[Re.FrontComponent]: "Front components",
|
|
6334
6339
|
[Re.Role]: "Roles"
|
|
6335
|
-
}, Nl = Object.keys(bl),
|
|
6340
|
+
}, Nl = Object.keys(bl), q_ = {
|
|
6336
6341
|
info: "gray",
|
|
6337
6342
|
success: "green",
|
|
6338
6343
|
error: "red",
|
|
6339
6344
|
warning: "yellow"
|
|
6340
|
-
},
|
|
6345
|
+
}, J_ = (n) => {
|
|
6341
6346
|
const r = /* @__PURE__ */ new Map();
|
|
6342
6347
|
for (const i of Nl)
|
|
6343
6348
|
r.set(i, []);
|
|
@@ -6348,16 +6353,16 @@ const Ia = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"
|
|
|
6348
6353
|
o.push(i), r.set(i.type, o);
|
|
6349
6354
|
}
|
|
6350
6355
|
return r;
|
|
6351
|
-
},
|
|
6356
|
+
}, z_ = (n) => n.toLocaleTimeString("en-US", {
|
|
6352
6357
|
hour12: !1,
|
|
6353
6358
|
hour: "2-digit",
|
|
6354
6359
|
minute: "2-digit",
|
|
6355
6360
|
second: "2-digit"
|
|
6356
|
-
}),
|
|
6361
|
+
}), Q_ = (n, r = 40) => {
|
|
6357
6362
|
if (n.length <= r) return n;
|
|
6358
6363
|
const i = n.split("/");
|
|
6359
6364
|
return i.length <= 2 ? n : `.../${i.slice(-2).join("/")}`;
|
|
6360
|
-
},
|
|
6365
|
+
}, H_ = (n) => !n.frontendUrl || !n.appUniversalIdentifier ? null : `${n.frontendUrl}/settings/applications`, Y_ = async (n) => {
|
|
6361
6366
|
const [r, i] = await Promise.all([import("react"), import("ink")]), { useState: o, useEffect: u } = r, { render: f, Box: g, Text: v, Static: w } = i, b = (R, ee = 80) => {
|
|
6362
6367
|
const [H, ce] = o(0);
|
|
6363
6368
|
return u(() => {
|
|
@@ -6367,7 +6372,7 @@ const Ia = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"
|
|
|
6367
6372
|
return () => clearInterval(Ve);
|
|
6368
6373
|
}, [R.length, ee]), R[H];
|
|
6369
6374
|
}, O = ({ event: R }) => {
|
|
6370
|
-
const ee =
|
|
6375
|
+
const ee = q_[R.status], H = z_(R.timestamp);
|
|
6371
6376
|
return /* @__PURE__ */ Q.jsxs(g, { children: [
|
|
6372
6377
|
/* @__PURE__ */ Q.jsxs(v, { dimColor: !0, children: [
|
|
6373
6378
|
H,
|
|
@@ -6395,7 +6400,7 @@ const Ia = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"
|
|
|
6395
6400
|
/* @__PURE__ */ Q.jsx(v, { children: R.name }),
|
|
6396
6401
|
R.path !== R.name && /* @__PURE__ */ Q.jsxs(v, { dimColor: !0, children: [
|
|
6397
6402
|
" (",
|
|
6398
|
-
|
|
6403
|
+
Q_(R.path),
|
|
6399
6404
|
")"
|
|
6400
6405
|
] })
|
|
6401
6406
|
] }), M = ({
|
|
@@ -6422,7 +6427,7 @@ const Ia = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"
|
|
|
6422
6427
|
}, ae = ({
|
|
6423
6428
|
snapshot: R
|
|
6424
6429
|
}) => {
|
|
6425
|
-
const ee =
|
|
6430
|
+
const ee = J_(R.entities), H = H_(R);
|
|
6426
6431
|
return /* @__PURE__ */ Q.jsxs(
|
|
6427
6432
|
g,
|
|
6428
6433
|
{
|
|
@@ -6528,17 +6533,17 @@ class Cc {
|
|
|
6528
6533
|
await he.remove(u);
|
|
6529
6534
|
}
|
|
6530
6535
|
}
|
|
6531
|
-
class
|
|
6536
|
+
class X_ {
|
|
6532
6537
|
constructor() {
|
|
6533
6538
|
this.appPath = "", this.orchestrator = null, this.manifestWatcher = null, this.logicFunctionsWatcher = null, this.frontComponentsWatcher = null, this.assetWatcher = null, this.dependencyWatcher = null, this.watchersStarted = !1, this.uiStateManager = null, this.unmountUI = null;
|
|
6534
6539
|
}
|
|
6535
6540
|
async execute(r) {
|
|
6536
|
-
this.appPath = r.appPath ?? Yt, await this.cleanOutputDir(), this.uiStateManager = new
|
|
6541
|
+
this.appPath = r.appPath ?? Yt, await this.cleanOutputDir(), this.uiStateManager = new V_({
|
|
6537
6542
|
appPath: this.appPath,
|
|
6538
6543
|
frontendUrl: process.env.FRONTEND_URL
|
|
6539
6544
|
});
|
|
6540
|
-
const { unmount: i } = await
|
|
6541
|
-
this.unmountUI = i, this.orchestrator = new
|
|
6545
|
+
const { unmount: i } = await Y_(this.uiStateManager);
|
|
6546
|
+
this.unmountUI = i, this.orchestrator = new W_({
|
|
6542
6547
|
appPath: this.appPath,
|
|
6543
6548
|
handleManifestBuilt: this.handleWatcherRestarts.bind(this),
|
|
6544
6549
|
uiStateManager: this.uiStateManager
|
|
@@ -6549,7 +6554,7 @@ class Y_ {
|
|
|
6549
6554
|
await he.ensureDir(r), await he.emptyDir(r);
|
|
6550
6555
|
}
|
|
6551
6556
|
async startManifestWatcher() {
|
|
6552
|
-
this.manifestWatcher = new
|
|
6557
|
+
this.manifestWatcher = new tv({
|
|
6553
6558
|
appPath: this.appPath,
|
|
6554
6559
|
handleChangeDetected: this.orchestrator.handleChangeDetected.bind(
|
|
6555
6560
|
this.orchestrator
|
|
@@ -6573,7 +6578,7 @@ class Y_ {
|
|
|
6573
6578
|
]);
|
|
6574
6579
|
}
|
|
6575
6580
|
async startLogicFunctionsWatcher(r) {
|
|
6576
|
-
this.logicFunctionsWatcher =
|
|
6581
|
+
this.logicFunctionsWatcher = Zy({
|
|
6577
6582
|
appPath: this.appPath,
|
|
6578
6583
|
sourcePaths: r,
|
|
6579
6584
|
handleBuildError: this.orchestrator.handleFileBuildError.bind(
|
|
@@ -6585,7 +6590,7 @@ class Y_ {
|
|
|
6585
6590
|
}), await this.logicFunctionsWatcher.start();
|
|
6586
6591
|
}
|
|
6587
6592
|
async startFrontComponentsWatcher(r) {
|
|
6588
|
-
this.frontComponentsWatcher =
|
|
6593
|
+
this.frontComponentsWatcher = ev({
|
|
6589
6594
|
appPath: this.appPath,
|
|
6590
6595
|
sourcePaths: r,
|
|
6591
6596
|
handleBuildError: this.orchestrator.handleFileBuildError.bind(
|
|
@@ -6629,13 +6634,13 @@ class Y_ {
|
|
|
6629
6634
|
process.on("SIGINT", () => void r()), process.on("SIGTERM", () => void r());
|
|
6630
6635
|
}
|
|
6631
6636
|
}
|
|
6632
|
-
const
|
|
6633
|
-
class
|
|
6637
|
+
const K_ = "generated";
|
|
6638
|
+
class Z_ {
|
|
6634
6639
|
constructor() {
|
|
6635
6640
|
this.configService = new Be(), this.apiService = new Zt();
|
|
6636
6641
|
}
|
|
6637
6642
|
async generate(r) {
|
|
6638
|
-
const i = Nt(r,
|
|
6643
|
+
const i = Nt(r, K_);
|
|
6639
6644
|
console.log(C.blue("📦 Generating Twenty client...")), console.log(C.gray(`📁 Output Path: ${i}`)), console.log("");
|
|
6640
6645
|
const o = await this.configService.getConfig(), u = o.apiUrl, f = o.apiKey;
|
|
6641
6646
|
if (!u || !f) {
|
|
@@ -6669,10 +6674,10 @@ class K_ {
|
|
|
6669
6674
|
// ----------------------------------------------------
|
|
6670
6675
|
|
|
6671
6676
|
const defaultOptions: ClientOptions = {
|
|
6672
|
-
url: \`\${process.env.${
|
|
6677
|
+
url: \`\${process.env.${Yy}}/graphql\`,
|
|
6673
6678
|
headers: {
|
|
6674
6679
|
'Content-Type': 'application/json',
|
|
6675
|
-
Authorization: \`Bearer \${process.env.${
|
|
6680
|
+
Authorization: \`Bearer \${process.env.${Hy}}\`,
|
|
6676
6681
|
},
|
|
6677
6682
|
}
|
|
6678
6683
|
|
|
@@ -6744,9 +6749,9 @@ export default class Twenty {
|
|
|
6744
6749
|
await he.appendFile(Nt(r, "index.ts"), i);
|
|
6745
6750
|
}
|
|
6746
6751
|
}
|
|
6747
|
-
class
|
|
6752
|
+
class ex {
|
|
6748
6753
|
constructor() {
|
|
6749
|
-
this.clientService = new
|
|
6754
|
+
this.clientService = new Z_();
|
|
6750
6755
|
}
|
|
6751
6756
|
async execute(r = Yt) {
|
|
6752
6757
|
try {
|
|
@@ -6759,7 +6764,7 @@ class Z_ {
|
|
|
6759
6764
|
}
|
|
6760
6765
|
}
|
|
6761
6766
|
}
|
|
6762
|
-
class
|
|
6767
|
+
class tx {
|
|
6763
6768
|
constructor() {
|
|
6764
6769
|
this.apiService = new Zt();
|
|
6765
6770
|
}
|
|
@@ -6795,7 +6800,7 @@ class ex {
|
|
|
6795
6800
|
return r;
|
|
6796
6801
|
}
|
|
6797
6802
|
}
|
|
6798
|
-
class
|
|
6803
|
+
class nx {
|
|
6799
6804
|
constructor() {
|
|
6800
6805
|
this.configService = new Be();
|
|
6801
6806
|
}
|
|
@@ -6827,7 +6832,7 @@ class tx {
|
|
|
6827
6832
|
}
|
|
6828
6833
|
}
|
|
6829
6834
|
}
|
|
6830
|
-
class
|
|
6835
|
+
class ix {
|
|
6831
6836
|
constructor() {
|
|
6832
6837
|
this.configService = new Be(), this.apiService = new Zt();
|
|
6833
6838
|
}
|
|
@@ -6879,7 +6884,7 @@ class nx {
|
|
|
6879
6884
|
}
|
|
6880
6885
|
}
|
|
6881
6886
|
}
|
|
6882
|
-
class
|
|
6887
|
+
class rx {
|
|
6883
6888
|
constructor() {
|
|
6884
6889
|
this.configService = new Be();
|
|
6885
6890
|
}
|
|
@@ -6900,7 +6905,7 @@ class ix {
|
|
|
6900
6905
|
}
|
|
6901
6906
|
}
|
|
6902
6907
|
}
|
|
6903
|
-
class
|
|
6908
|
+
class sx {
|
|
6904
6909
|
constructor() {
|
|
6905
6910
|
this.configService = new Be(), this.apiService = new Zt();
|
|
6906
6911
|
}
|
|
@@ -6924,7 +6929,7 @@ class rx {
|
|
|
6924
6929
|
}
|
|
6925
6930
|
}
|
|
6926
6931
|
}
|
|
6927
|
-
class
|
|
6932
|
+
class ax {
|
|
6928
6933
|
constructor() {
|
|
6929
6934
|
this.apiService = new Zt();
|
|
6930
6935
|
}
|
|
@@ -6999,7 +7004,7 @@ class sx {
|
|
|
6999
7004
|
);
|
|
7000
7005
|
}
|
|
7001
7006
|
}
|
|
7002
|
-
class
|
|
7007
|
+
class ox {
|
|
7003
7008
|
constructor() {
|
|
7004
7009
|
this.apiService = new Zt();
|
|
7005
7010
|
}
|
|
@@ -7037,7 +7042,7 @@ class ax {
|
|
|
7037
7042
|
), console.log("");
|
|
7038
7043
|
}
|
|
7039
7044
|
}
|
|
7040
|
-
class
|
|
7045
|
+
class ux {
|
|
7041
7046
|
constructor() {
|
|
7042
7047
|
this.configService = new Be(), this.apiService = new Zt();
|
|
7043
7048
|
}
|
|
@@ -7100,7 +7105,7 @@ class ox {
|
|
|
7100
7105
|
}
|
|
7101
7106
|
}
|
|
7102
7107
|
var ba, Lc;
|
|
7103
|
-
function
|
|
7108
|
+
function cx() {
|
|
7104
7109
|
if (Lc) return ba;
|
|
7105
7110
|
Lc = 1;
|
|
7106
7111
|
var n = "[object Symbol]", r = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, i = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, o = "\\ud800-\\udfff", u = "\\u0300-\\u036f\\ufe20-\\ufe23", f = "\\u20d0-\\u20f0", g = "\\u2700-\\u27bf", v = "a-z\\xdf-\\xf6\\xf8-\\xff", w = "\\xac\\xb1\\xd7\\xf7", b = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", O = "\\u2000-\\u206f", D = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", P = "A-Z\\xc0-\\xd6\\xd8-\\xde", M = "\\ufe0e\\ufe0f", $ = w + b + O + D, de = "['’]", ae = "[" + $ + "]", ge = "[" + u + f + "]", He = "\\d+", _e = "[" + g + "]", R = "[" + v + "]", ee = "[^" + o + $ + He + g + v + P + "]", H = "\\ud83c[\\udffb-\\udfff]", ce = "(?:" + ge + "|" + H + ")", Ve = "[^" + o + "]", x = "(?:\\ud83c[\\udde6-\\uddff]){2}", V = "[\\ud800-\\udbff][\\udc00-\\udfff]", we = "[" + P + "]", _t = "\\u200d", en = "(?:" + R + "|" + ee + ")", qi = "(?:" + we + "|" + ee + ")", Ji = "(?:" + de + "(?:d|ll|m|re|s|t|ve))?", zi = "(?:" + de + "(?:D|LL|M|RE|S|T|VE))?", Lt = ce + "?", xt = "[" + M + "]?", Kr = "(?:" + _t + "(?:" + [Ve, x, V].join("|") + ")" + xt + Lt + ")*", Gn = xt + Lt + Kr, rt = "(?:" + [_e, x, V].join("|") + ")" + Gn, Zr = RegExp(de, "g"), es = RegExp(ge, "g"), ts = RegExp([
|
|
@@ -7358,8 +7363,8 @@ function ux() {
|
|
|
7358
7363
|
}
|
|
7359
7364
|
return ba = Nn, ba;
|
|
7360
7365
|
}
|
|
7361
|
-
var
|
|
7362
|
-
const pi = /* @__PURE__ */ Ey(
|
|
7366
|
+
var lx = cx();
|
|
7367
|
+
const pi = /* @__PURE__ */ Ey(lx), fx = ({
|
|
7363
7368
|
name: n,
|
|
7364
7369
|
universalIdentifier: r = hi()
|
|
7365
7370
|
}) => {
|
|
@@ -7383,7 +7388,7 @@ export default defineFrontComponent({
|
|
|
7383
7388
|
component: Component,
|
|
7384
7389
|
});
|
|
7385
7390
|
`;
|
|
7386
|
-
},
|
|
7391
|
+
}, px = ({
|
|
7387
7392
|
name: n,
|
|
7388
7393
|
universalIdentifier: r = hi()
|
|
7389
7394
|
}) => {
|
|
@@ -7444,8 +7449,8 @@ var $i = { exports: {} };
|
|
|
7444
7449
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
7445
7450
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
7446
7451
|
*/
|
|
7447
|
-
var
|
|
7448
|
-
function
|
|
7452
|
+
var hx = $i.exports, Rc;
|
|
7453
|
+
function dx() {
|
|
7449
7454
|
return Rc || (Rc = 1, function(n, r) {
|
|
7450
7455
|
(function() {
|
|
7451
7456
|
var i, o = "4.17.21", u = 200, f = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", g = "Expected a function", v = "Invalid `variable` option passed into `_.template`", w = "__lodash_hash_undefined__", b = 500, O = "__lodash_placeholder__", D = 1, P = 2, M = 4, $ = 1, de = 2, ae = 1, ge = 2, He = 4, _e = 8, R = 16, ee = 32, H = 64, ce = 128, Ve = 256, x = 512, V = 30, we = "...", _t = 800, en = 16, qi = 1, Ji = 2, zi = 3, Lt = 1 / 0, xt = 9007199254740991, Kr = 17976931348623157e292, Gn = NaN, rt = 4294967295, Zr = rt - 1, es = rt >>> 1, ts = [
|
|
@@ -11105,14 +11110,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
11105
11110
|
}], te.prototype.clone = wp, te.prototype.reverse = Ep, te.prototype.value = Sp, l.prototype.at = Zd, l.prototype.chain = eg, l.prototype.commit = tg, l.prototype.next = ng, l.prototype.plant = rg, l.prototype.reverse = sg, l.prototype.toJSON = l.prototype.valueOf = l.prototype.value = ag, l.prototype.first = l.prototype.head, Ti && (l.prototype[Ti] = ig), l;
|
|
11106
11111
|
}, Kn = tp();
|
|
11107
11112
|
Cn ? ((Cn.exports = Kn)._ = Kn, ys._ = Kn) : ke._ = Kn;
|
|
11108
|
-
}).call(
|
|
11113
|
+
}).call(hx);
|
|
11109
11114
|
}($i, $i.exports)), $i.exports;
|
|
11110
11115
|
}
|
|
11111
|
-
var
|
|
11116
|
+
var gx = dx();
|
|
11112
11117
|
const Na = (n) => {
|
|
11113
|
-
const r =
|
|
11118
|
+
const r = gx.startCase(n).toLowerCase();
|
|
11114
11119
|
return r.charAt(0).toUpperCase() + r.slice(1);
|
|
11115
|
-
},
|
|
11120
|
+
}, mx = ({
|
|
11116
11121
|
data: n
|
|
11117
11122
|
}) => `import { defineObject } from 'twenty-sdk';
|
|
11118
11123
|
|
|
@@ -11134,7 +11139,7 @@ export default defineObject({
|
|
|
11134
11139
|
// },
|
|
11135
11140
|
],
|
|
11136
11141
|
});
|
|
11137
|
-
`,
|
|
11142
|
+
`, yx = ({
|
|
11138
11143
|
name: n,
|
|
11139
11144
|
universalIdentifier: r = hi()
|
|
11140
11145
|
}) => {
|
|
@@ -11154,7 +11159,7 @@ export default defineRole({
|
|
|
11154
11159
|
canDestroyAllObjectRecords: false,
|
|
11155
11160
|
});
|
|
11156
11161
|
`;
|
|
11157
|
-
},
|
|
11162
|
+
}, vx = ({
|
|
11158
11163
|
data: n
|
|
11159
11164
|
}) => {
|
|
11160
11165
|
const r = hi(), i = n.description ? `
|
|
@@ -11169,11 +11174,11 @@ export default defineField({
|
|
|
11169
11174
|
objectUniversalIdentifier: '${n.objectUniversalIdentifier}',${i}
|
|
11170
11175
|
});
|
|
11171
11176
|
`;
|
|
11172
|
-
},
|
|
11173
|
-
class
|
|
11177
|
+
}, _x = "src";
|
|
11178
|
+
class xx {
|
|
11174
11179
|
async execute(r, i) {
|
|
11175
11180
|
try {
|
|
11176
|
-
const o = r ?? await this.getEntity(), u = this.getFolderName(o), f = i ? Nt(Yt, i) : Nt(Yt,
|
|
11181
|
+
const o = r ?? await this.getEntity(), u = this.getFolderName(o), f = i ? Nt(Yt, i) : Nt(Yt, _x, u);
|
|
11177
11182
|
await he.ensureDir(f);
|
|
11178
11183
|
const { name: g, file: v } = await this.getEntityData(o), w = Nt(f, this.getFileName(g, o));
|
|
11179
11184
|
if (await he.pathExists(w)) {
|
|
@@ -11195,31 +11200,31 @@ class _x {
|
|
|
11195
11200
|
async getEntityData(r) {
|
|
11196
11201
|
switch (r) {
|
|
11197
11202
|
case Re.Object: {
|
|
11198
|
-
const i = await this.getObjectData(), o = i.nameSingular, u =
|
|
11203
|
+
const i = await this.getObjectData(), o = i.nameSingular, u = mx({
|
|
11199
11204
|
data: i
|
|
11200
11205
|
});
|
|
11201
11206
|
return { name: o, file: u };
|
|
11202
11207
|
}
|
|
11203
11208
|
case Re.Field: {
|
|
11204
|
-
const i = await this.getFieldData(), o = i.name, u =
|
|
11209
|
+
const i = await this.getFieldData(), o = i.name, u = vx({
|
|
11205
11210
|
data: i
|
|
11206
11211
|
});
|
|
11207
11212
|
return { name: o, file: u };
|
|
11208
11213
|
}
|
|
11209
11214
|
case Re.LogicFunction: {
|
|
11210
|
-
const i = await this.getEntityName(r), o =
|
|
11215
|
+
const i = await this.getEntityName(r), o = px({
|
|
11211
11216
|
name: i
|
|
11212
11217
|
});
|
|
11213
11218
|
return { name: i, file: o };
|
|
11214
11219
|
}
|
|
11215
11220
|
case Re.FrontComponent: {
|
|
11216
|
-
const i = await this.getEntityName(r), o =
|
|
11221
|
+
const i = await this.getEntityName(r), o = fx({
|
|
11217
11222
|
name: i
|
|
11218
11223
|
});
|
|
11219
11224
|
return { name: i, file: o };
|
|
11220
11225
|
}
|
|
11221
11226
|
case Re.Role: {
|
|
11222
|
-
const i = await this.getEntityName(r), o =
|
|
11227
|
+
const i = await this.getEntityName(r), o = yx({
|
|
11223
11228
|
name: i
|
|
11224
11229
|
});
|
|
11225
11230
|
return { name: i, file: o };
|
|
@@ -11344,8 +11349,8 @@ class _x {
|
|
|
11344
11349
|
}
|
|
11345
11350
|
}
|
|
11346
11351
|
}
|
|
11347
|
-
const
|
|
11348
|
-
const r = new
|
|
11352
|
+
const Tx = (n) => {
|
|
11353
|
+
const r = new nx(), i = new ix(), o = new rx(), u = new sx(), f = new ux();
|
|
11349
11354
|
n.command("auth:login").description("Authenticate with Twenty").option("--api-key <key>", "API key for authentication").option("--api-url <url>", "Twenty API URL").action(async (P) => {
|
|
11350
11355
|
await i.execute(P);
|
|
11351
11356
|
}), n.command("auth:logout").description("Remove authentication credentials").action(async () => {
|
|
@@ -11357,7 +11362,7 @@ const xx = (n) => {
|
|
|
11357
11362
|
}), n.command("auth:list").description("List all configured workspaces").action(async () => {
|
|
11358
11363
|
await r.execute();
|
|
11359
11364
|
});
|
|
11360
|
-
const g = new
|
|
11365
|
+
const g = new X_(), v = new tx(), w = new xx(), b = new ex(), O = new ox(), D = new ax();
|
|
11361
11366
|
n.command("app:dev [appPath]").description("Watch and sync local application changes").action(async (P) => {
|
|
11362
11367
|
await g.execute({
|
|
11363
11368
|
appPath: Pi(P)
|
|
@@ -11414,12 +11419,12 @@ const xx = (n) => {
|
|
|
11414
11419
|
});
|
|
11415
11420
|
}
|
|
11416
11421
|
);
|
|
11417
|
-
},
|
|
11418
|
-
version:
|
|
11422
|
+
}, wx = "0.4.3", Ex = {
|
|
11423
|
+
version: wx
|
|
11419
11424
|
};
|
|
11420
11425
|
by.defaultOptions.depth = 10;
|
|
11421
11426
|
const yi = new Ay();
|
|
11422
|
-
yi.name("twenty").description("CLI for Twenty application development").version(
|
|
11427
|
+
yi.name("twenty").description("CLI for Twenty application development").version(Ex.version);
|
|
11423
11428
|
yi.option(
|
|
11424
11429
|
"--workspace <name>",
|
|
11425
11430
|
"Use a specific workspace configuration (overrides the default set by auth:switch)"
|
|
@@ -11430,7 +11435,7 @@ yi.hook("preAction", async (n) => {
|
|
|
11430
11435
|
C.gray(`👩💻 Workspace - ${Be.getActiveWorkspace()}`)
|
|
11431
11436
|
);
|
|
11432
11437
|
});
|
|
11433
|
-
|
|
11438
|
+
Tx(yi);
|
|
11434
11439
|
yi.exitOverride();
|
|
11435
11440
|
try {
|
|
11436
11441
|
yi.parse();
|