twenty-sdk 0.3.0-alpha → 0.3.1

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.
Files changed (28) hide show
  1. package/dist/cli.cjs +32 -31
  2. package/dist/cli.mjs +249 -250
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.mjs +2 -6
  5. package/dist/vendor/twenty-shared/{isValidCountryCode-DKpNbkXA.mjs → isValidCountryCode-E35rsxfD.mjs} +1173 -1157
  6. package/dist/vendor/twenty-shared/{isValidCountryCode-DgPRUhSL.js → isValidCountryCode-WBKj_GIR.js} +2 -2
  7. package/dist/vendor/twenty-shared/types/OrderBy.d.ts +2 -0
  8. package/dist/vendor/twenty-shared/types/OrderBy.d.ts.map +1 -0
  9. package/dist/vendor/twenty-shared/types/QueryCursorDirection.d.ts +2 -0
  10. package/dist/vendor/twenty-shared/types/QueryCursorDirection.d.ts.map +1 -0
  11. package/dist/vendor/twenty-shared/types/RecordGqlFieldsDeprecated.d.ts +2 -0
  12. package/dist/vendor/twenty-shared/types/RecordGqlFieldsDeprecated.d.ts.map +1 -0
  13. package/dist/vendor/twenty-shared/types/RecordGqlOperationGqlRecordFields.d.ts +4 -0
  14. package/dist/vendor/twenty-shared/types/RecordGqlOperationGqlRecordFields.d.ts.map +1 -0
  15. package/dist/vendor/twenty-shared/types/RecordGqlOperationOrderBy.d.ts +10 -0
  16. package/dist/vendor/twenty-shared/types/RecordGqlOperationOrderBy.d.ts.map +1 -0
  17. package/dist/vendor/twenty-shared/types/RecordGqlOperationSignature.d.ts +9 -0
  18. package/dist/vendor/twenty-shared/types/RecordGqlOperationSignature.d.ts.map +1 -0
  19. package/dist/vendor/twenty-shared/types/RecordGqlOperationVariables.d.ts +14 -0
  20. package/dist/vendor/twenty-shared/types/RecordGqlOperationVariables.d.ts.map +1 -0
  21. package/dist/vendor/twenty-shared/types/index.d.ts +7 -0
  22. package/dist/vendor/twenty-shared/types/index.d.ts.map +1 -1
  23. package/dist/vendor/twenty-shared/utils/filter/turnRecordFilterIntoGqlOperationFilter.d.ts.map +1 -1
  24. package/dist/vendor/twenty-shared/utils.cjs +1 -1
  25. package/dist/vendor/twenty-shared/utils.mjs +2 -2
  26. package/dist/vendor/twenty-shared/workflow.cjs +1 -1
  27. package/dist/vendor/twenty-shared/workflow.mjs +1 -1
  28. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -1,24 +1,25 @@
1
1
  #!/usr/bin/env node
2
2
  import F from "chalk";
3
3
  import { Command as oo, CommanderError as Q0 } from "commander";
4
+ import { inspect as z0 } from "util";
4
5
  import * as Ie from "fs-extra";
5
6
  import Ut from "inquirer";
6
7
  import * as Ys from "path";
7
- import Hn, { join as Yn, relative as ac, sep as uc, posix as z0, resolve as Y0 } from "path";
8
- import H0 from "lodash.camelcase";
8
+ import Hn, { join as Yn, relative as ac, sep as uc, posix as Y0, resolve as H0 } from "path";
9
+ import K0 from "lodash.camelcase";
9
10
  import yi from "lodash.kebabcase";
10
11
  import { v4 as _i } from "uuid";
11
12
  import { c as hi, s as zu } from "./ObjectRecordGroupByDateGranularity-CtpRADP1-Bft-VMSh.mjs";
12
13
  import Hs from "axios";
13
- import { createClient as K0 } from "graphql-sse";
14
- import * as X0 from "os";
15
- import { glob as Z0 } from "fast-glob";
16
- import { createJiti as ev } from "jiti";
17
- import { fileURLToPath as nv } from "url";
18
- import { parse as tv } from "jsonc-parser";
19
- import * as rv from "chokidar";
20
- import { generate as iv } from "@genql/cli";
21
- const vn = process.env.INIT_CWD || process.cwd(), sv = ({
14
+ import { createClient as X0 } from "graphql-sse";
15
+ import * as Z0 from "os";
16
+ import { glob as ev } from "fast-glob";
17
+ import { createJiti as nv } from "jiti";
18
+ import { fileURLToPath as tv } from "url";
19
+ import { parse as rv } from "jsonc-parser";
20
+ import * as iv from "chokidar";
21
+ import { generate as sv } from "@genql/cli";
22
+ const vn = process.env.INIT_CWD || process.cwd(), ov = ({
22
23
  data: t
23
24
  }) => `import { defineObject } from 'twenty-sdk';
24
25
 
@@ -40,7 +41,7 @@ export default defineObject({
40
41
  // },
41
42
  ],
42
43
  });
43
- `, ov = ({
44
+ `, av = ({
44
45
  name: t,
45
46
  universalIdentifier: i = _i()
46
47
  }) => {
@@ -74,6 +75,7 @@ export default defineFunction({
74
75
  // type: 'route',
75
76
  // path: '/${r}',
76
77
  // httpMethod: 'POST',
78
+ // isAuthRequired: true,
77
79
  // },
78
80
  // Cron trigger example:
79
81
  // {
@@ -90,7 +92,7 @@ export default defineFunction({
90
92
  ],
91
93
  });
92
94
  `;
93
- }, av = ({
95
+ }, uv = ({
94
96
  name: t,
95
97
  universalIdentifier: i = _i()
96
98
  }) => {
@@ -120,8 +122,8 @@ var fr = { exports: {} };
120
122
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
121
123
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
122
124
  */
123
- var uv = fr.exports, Yu;
124
- function cv() {
125
+ var cv = fr.exports, Yu;
126
+ function lv() {
125
127
  return Yu || (Yu = 1, function(t, i) {
126
128
  (function() {
127
129
  var r, a = "4.17.21", u = 200, p = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", v = "Expected a function", I = "Invalid `variable` option passed into `_.template`", N = "__lodash_hash_undefined__", R = 500, O = "__lodash_placeholder__", M = 1, Z = 2, ce = 4, W = 1, Te = 2, fe = 1, ve = 2, tt = 4, ye = 8, Ne = 16, Re = 32, Je = 64, ke = 128, rt = 256, x = 512, G = 30, Qe = "...", Si = 800, el = 16, mo = 1, nl = 2, tl = 3, it = 1 / 0, Mn = 9007199254740991, rl = 17976931348623157e292, Tr = NaN, _n = 4294967295, il = _n - 1, sl = _n >>> 1, ol = [
@@ -3781,24 +3783,24 @@ function print() { __p += __j.call(arguments, '') }
3781
3783
  }], z.prototype.clone = op, z.prototype.reverse = ap, z.prototype.value = up, l.prototype.at = $d, l.prototype.chain = Pd, l.prototype.commit = Md, l.prototype.next = Bd, l.prototype.plant = Vd, l.prototype.reverse = Wd, l.prototype.toJSON = l.prototype.valueOf = l.prototype.value = jd, l.prototype.first = l.prototype.head, Ht && (l.prototype[Ht] = Gd), l;
3782
3784
  }, xt = Mf();
3783
3785
  st ? ((st.exports = xt)._ = xt, ji._ = xt) : Se._ = xt;
3784
- }).call(uv);
3786
+ }).call(cv);
3785
3787
  }(fr, fr.exports)), fr.exports;
3786
3788
  }
3787
- var lv = cv();
3789
+ var fv = lv();
3788
3790
  const Hu = (t) => {
3789
- const i = lv.startCase(t).toLowerCase();
3791
+ const i = fv.startCase(t).toLowerCase();
3790
3792
  return i.charAt(0).toUpperCase() + i.slice(1);
3791
- }, fv = "src/app";
3793
+ }, pv = "src/app";
3792
3794
  var Ti = /* @__PURE__ */ ((t) => (t.AGENT = "agent", t.OBJECT = "object", t.FUNCTION = "function", t.ROLE = "role", t))(Ti || {});
3793
- const pv = (t) => Object.values(Ti).includes(t);
3794
- class hv {
3795
+ const hv = (t) => Object.values(Ti).includes(t);
3796
+ class dv {
3795
3797
  async execute(i, r) {
3796
3798
  try {
3797
- const a = r ? Yn(vn, r) : Yn(vn, fv);
3799
+ const a = r ? Yn(vn, r) : Yn(vn, pv);
3798
3800
  await Ie.ensureDir(a);
3799
3801
  const u = i ?? await this.getEntity();
3800
3802
  if (u === "object") {
3801
- const p = await this.getObjectData(), v = p.nameSingular, I = `${H0(v)}.object.ts`, N = sv({
3803
+ const p = await this.getObjectData(), v = p.nameSingular, I = `${K0(v)}.object.ts`, N = ov({
3802
3804
  data: p,
3803
3805
  name: v
3804
3806
  }), R = Yn(a, I);
@@ -3809,7 +3811,7 @@ class hv {
3809
3811
  return;
3810
3812
  }
3811
3813
  if (u === "function") {
3812
- const p = await this.getEntityName(u), v = `${yi(p)}.function.ts`, I = ov({
3814
+ const p = await this.getEntityName(u), v = `${yi(p)}.function.ts`, I = av({
3813
3815
  name: p
3814
3816
  }), N = Yn(a, v);
3815
3817
  await Ie.writeFile(N, I), console.log(
@@ -3819,7 +3821,7 @@ class hv {
3819
3821
  return;
3820
3822
  }
3821
3823
  if (u === "role") {
3822
- const p = await this.getEntityName(u), v = `${yi(p)}.role.ts`, I = av({
3824
+ const p = await this.getEntityName(u), v = `${yi(p)}.role.ts`, I = uv({
3823
3825
  name: p
3824
3826
  }), N = Yn(a, v);
3825
3827
  await Ie.writeFile(N, I), console.log(
@@ -3910,10 +3912,10 @@ function mr(t, i) {
3910
3912
  i ?? "Unexpected invariant triggered."
3911
3913
  );
3912
3914
  }
3913
- const dv = /\r\n|[\n\r]/g;
3915
+ const gv = /\r\n|[\n\r]/g;
3914
3916
  function eo(t, i) {
3915
3917
  let r = 0, a = 1;
3916
- for (const u of t.body.matchAll(dv)) {
3918
+ for (const u of t.body.matchAll(gv)) {
3917
3919
  if (typeof u.index == "number" || mr(!1), u.index >= i)
3918
3920
  break;
3919
3921
  r = u.index + u[0].length, a += 1;
@@ -3923,7 +3925,7 @@ function eo(t, i) {
3923
3925
  column: i + 1 - r
3924
3926
  };
3925
3927
  }
3926
- function gv(t) {
3928
+ function mv(t) {
3927
3929
  return cc(
3928
3930
  t.source,
3929
3931
  eo(t.source, t.start)
@@ -3956,7 +3958,7 @@ function Ku(t) {
3956
3958
  return i.map(([a, u]) => a.padStart(r) + (u ? " " + u : "")).join(`
3957
3959
  `);
3958
3960
  }
3959
- function mv(t) {
3961
+ function vv(t) {
3960
3962
  const i = t[0];
3961
3963
  return i == null || "kind" in i || "length" in i ? {
3962
3964
  nodes: i,
@@ -4008,7 +4010,7 @@ class re extends Error {
4008
4010
  */
4009
4011
  constructor(i, ...r) {
4010
4012
  var a, u, p;
4011
- const { nodes: v, source: I, positions: N, path: R, originalError: O, extensions: M } = mv(r);
4013
+ const { nodes: v, source: I, positions: N, path: R, originalError: O, extensions: M } = vv(r);
4012
4014
  super(i), this.name = "GraphQLError", this.path = R ?? void 0, this.originalError = O ?? void 0, this.nodes = Xu(
4013
4015
  Array.isArray(v) ? v : v ? [v] : void 0
4014
4016
  );
@@ -4058,7 +4060,7 @@ class re extends Error {
4058
4060
  for (const r of this.nodes)
4059
4061
  r.loc && (i += `
4060
4062
 
4061
- ` + gv(r.loc));
4063
+ ` + mv(r.loc));
4062
4064
  else if (this.source && this.locations)
4063
4065
  for (const r of this.locations)
4064
4066
  i += `
@@ -4082,7 +4084,7 @@ function Ae(t, i, r) {
4082
4084
  positions: [i]
4083
4085
  });
4084
4086
  }
4085
- class vv {
4087
+ class yv {
4086
4088
  /**
4087
4089
  * The character offset at which this Node begins.
4088
4090
  */
@@ -4227,10 +4229,10 @@ const fc = {
4227
4229
  UnionTypeExtension: ["name", "directives", "types"],
4228
4230
  EnumTypeExtension: ["name", "directives", "values"],
4229
4231
  InputObjectTypeExtension: ["name", "directives", "fields"]
4230
- }, yv = new Set(Object.keys(fc));
4232
+ }, _v = new Set(Object.keys(fc));
4231
4233
  function Zu(t) {
4232
4234
  const i = t?.kind;
4233
- return typeof i == "string" && yv.has(i);
4235
+ return typeof i == "string" && _v.has(i);
4234
4236
  }
4235
4237
  var Un;
4236
4238
  (function(t) {
@@ -4260,12 +4262,12 @@ function ao(t) {
4260
4262
  function hc(t) {
4261
4263
  return pc(t) || dr(t) || t === 95;
4262
4264
  }
4263
- function _v(t) {
4265
+ function Tv(t) {
4264
4266
  var i;
4265
4267
  let r = Number.MAX_SAFE_INTEGER, a = null, u = -1;
4266
4268
  for (let v = 0; v < t.length; ++v) {
4267
4269
  var p;
4268
- const I = t[v], N = Tv(I);
4270
+ const I = t[v], N = wv(I);
4269
4271
  N !== I.length && (a = (p = a) !== null && p !== void 0 ? p : v, u = v, v !== 0 && N < r && (r = N));
4270
4272
  }
4271
4273
  return t.map((v, I) => I === 0 ? v : v.slice(r)).slice(
@@ -4273,13 +4275,13 @@ function _v(t) {
4273
4275
  u + 1
4274
4276
  );
4275
4277
  }
4276
- function Tv(t) {
4278
+ function wv(t) {
4277
4279
  let i = 0;
4278
4280
  for (; i < t.length && no(t.charCodeAt(i)); )
4279
4281
  ++i;
4280
4282
  return i;
4281
4283
  }
4282
- function wv(t) {
4284
+ function Ev(t) {
4283
4285
  if (t === "")
4284
4286
  return !0;
4285
4287
  let i = !0, r = !1, a = !0, u = !1;
@@ -4318,7 +4320,7 @@ function wv(t) {
4318
4320
  }
4319
4321
  return !(i || a && u);
4320
4322
  }
4321
- function Ev(t, i) {
4323
+ function Iv(t, i) {
4322
4324
  const r = t.replace(/"""/g, '\\"""'), a = r.split(/\r\n|[\n\r]/g), u = a.length === 1, p = a.length > 1 && a.slice(1).every((ce) => ce.length === 0 || no(ce.charCodeAt(0))), v = r.endsWith('\\"""'), I = t.endsWith('"') && !v, N = t.endsWith("\\"), R = I || N, O = (
4323
4325
  // add leading and trailing new lines only if it improves readability
4324
4326
  !u || t.length > 70 || R || p || v
@@ -4333,7 +4335,7 @@ var E;
4333
4335
  (function(t) {
4334
4336
  t.SOF = "<SOF>", t.EOF = "<EOF>", t.BANG = "!", t.DOLLAR = "$", t.AMP = "&", t.PAREN_L = "(", t.PAREN_R = ")", t.SPREAD = "...", t.COLON = ":", t.EQUALS = "=", t.AT = "@", t.BRACKET_L = "[", t.BRACKET_R = "]", t.BRACE_L = "{", t.PIPE = "|", t.BRACE_R = "}", t.NAME = "Name", t.INT = "Int", t.FLOAT = "Float", t.STRING = "String", t.BLOCK_STRING = "BlockString", t.COMMENT = "Comment";
4335
4337
  })(E || (E = {}));
4336
- class Iv {
4338
+ class xv {
4337
4339
  /**
4338
4340
  * The previously focused non-ignored token.
4339
4341
  */
@@ -4370,14 +4372,14 @@ class Iv {
4370
4372
  if (i.next)
4371
4373
  i = i.next;
4372
4374
  else {
4373
- const r = Av(this, i.end);
4375
+ const r = Nv(this, i.end);
4374
4376
  i.next = r, r.prev = i, i = r;
4375
4377
  }
4376
4378
  while (i.kind === E.COMMENT);
4377
4379
  return i;
4378
4380
  }
4379
4381
  }
4380
- function xv(t) {
4382
+ function Av(t) {
4381
4383
  return t === E.BANG || t === E.DOLLAR || t === E.AMP || t === E.PAREN_L || t === E.PAREN_R || t === E.SPREAD || t === E.COLON || t === E.EQUALS || t === E.AT || t === E.BRACKET_L || t === E.BRACKET_R || t === E.BRACE_L || t === E.PIPE || t === E.BRACE_R;
4382
4384
  }
4383
4385
  function Pt(t) {
@@ -4406,7 +4408,7 @@ function _e(t, i, r, a, u) {
4406
4408
  const p = t.line, v = 1 + r - t.lineStart;
4407
4409
  return new lc(i, r, a, p, v, u);
4408
4410
  }
4409
- function Av(t, i) {
4411
+ function Nv(t, i) {
4410
4412
  const r = t.source.body, a = r.length;
4411
4413
  let u = i;
4412
4414
  for (; u < a; ) {
@@ -4447,7 +4449,7 @@ function Av(t, i) {
4447
4449
  continue;
4448
4450
  // Comment
4449
4451
  case 35:
4450
- return Nv(t, u);
4452
+ return Sv(t, u);
4451
4453
  // Token ::
4452
4454
  // - Punctuator
4453
4455
  // - Name
@@ -4488,12 +4490,12 @@ function Av(t, i) {
4488
4490
  return _e(t, E.BRACE_R, u, u + 1);
4489
4491
  // StringValue
4490
4492
  case 34:
4491
- return r.charCodeAt(u + 1) === 34 && r.charCodeAt(u + 2) === 34 ? Cv(t, u) : bv(t, u);
4493
+ return r.charCodeAt(u + 1) === 34 && r.charCodeAt(u + 2) === 34 ? Dv(t, u) : Ov(t, u);
4492
4494
  }
4493
4495
  if (dr(p) || p === 45)
4494
- return Sv(t, u, p);
4496
+ return bv(t, u, p);
4495
4497
  if (ao(p))
4496
- return Dv(t, u);
4498
+ return Fv(t, u);
4497
4499
  throw Ae(
4498
4500
  t.source,
4499
4501
  u,
@@ -4502,7 +4504,7 @@ function Av(t, i) {
4502
4504
  }
4503
4505
  return _e(t, E.EOF, a, a);
4504
4506
  }
4505
- function Nv(t, i) {
4507
+ function Sv(t, i) {
4506
4508
  const r = t.source.body, a = r.length;
4507
4509
  let u = i + 1;
4508
4510
  for (; u < a; ) {
@@ -4524,7 +4526,7 @@ function Nv(t, i) {
4524
4526
  r.slice(i + 1, u)
4525
4527
  );
4526
4528
  }
4527
- function Sv(t, i, r) {
4529
+ function bv(t, i, r) {
4528
4530
  const a = t.source.body;
4529
4531
  let u = i, p = r, v = !1;
4530
4532
  if (p === 45 && (p = a.charCodeAt(++u)), p === 48) {
@@ -4572,7 +4574,7 @@ function Ks(t, i, r) {
4572
4574
  ++u;
4573
4575
  return u;
4574
4576
  }
4575
- function bv(t, i) {
4577
+ function Ov(t, i) {
4576
4578
  const r = t.source.body, a = r.length;
4577
4579
  let u = i + 1, p = u, v = "";
4578
4580
  for (; u < a; ) {
@@ -4581,7 +4583,7 @@ function bv(t, i) {
4581
4583
  return v += r.slice(p, u), _e(t, E.STRING, i, u + 1, v);
4582
4584
  if (I === 92) {
4583
4585
  v += r.slice(p, u);
4584
- const N = r.charCodeAt(u + 1) === 117 ? r.charCodeAt(u + 2) === 123 ? Ov(t, u) : Lv(t, u) : Rv(t, u);
4586
+ const N = r.charCodeAt(u + 1) === 117 ? r.charCodeAt(u + 2) === 123 ? Lv(t, u) : Rv(t, u) : Cv(t, u);
4585
4587
  v += N.value, u += N.size, p = u;
4586
4588
  continue;
4587
4589
  }
@@ -4603,7 +4605,7 @@ function bv(t, i) {
4603
4605
  }
4604
4606
  throw Ae(t.source, u, "Unterminated string.");
4605
4607
  }
4606
- function Ov(t, i) {
4608
+ function Lv(t, i) {
4607
4609
  const r = t.source.body;
4608
4610
  let a = 0, u = 3;
4609
4611
  for (; u < 12; ) {
@@ -4628,7 +4630,7 @@ function Ov(t, i) {
4628
4630
  )}".`
4629
4631
  );
4630
4632
  }
4631
- function Lv(t, i) {
4633
+ function Rv(t, i) {
4632
4634
  const r = t.source.body, a = ec(r, i + 2);
4633
4635
  if (Pt(a))
4634
4636
  return {
@@ -4655,7 +4657,7 @@ function ec(t, i) {
4655
4657
  function pr(t) {
4656
4658
  return t >= 48 && t <= 57 ? t - 48 : t >= 65 && t <= 70 ? t - 55 : t >= 97 && t <= 102 ? t - 87 : -1;
4657
4659
  }
4658
- function Rv(t, i) {
4660
+ function Cv(t, i) {
4659
4661
  const r = t.source.body;
4660
4662
  switch (r.charCodeAt(i + 1)) {
4661
4663
  case 34:
@@ -4709,7 +4711,7 @@ function Rv(t, i) {
4709
4711
  )}".`
4710
4712
  );
4711
4713
  }
4712
- function Cv(t, i) {
4714
+ function Dv(t, i) {
4713
4715
  const r = t.source.body, a = r.length;
4714
4716
  let u = t.lineStart, p = i + 3, v = p, I = "";
4715
4717
  const N = [];
@@ -4723,7 +4725,7 @@ function Cv(t, i) {
4723
4725
  i,
4724
4726
  p + 3,
4725
4727
  // Return a string of the lines joined with U+000A.
4726
- _v(N).join(`
4728
+ Tv(N).join(`
4727
4729
  `)
4728
4730
  );
4729
4731
  return t.line += N.length - 1, t.lineStart = u, O;
@@ -4752,7 +4754,7 @@ function Cv(t, i) {
4752
4754
  }
4753
4755
  throw Ae(t.source, p, "Unterminated string.");
4754
4756
  }
4755
- function Dv(t, i) {
4757
+ function Fv(t, i) {
4756
4758
  const r = t.source.body, a = r.length;
4757
4759
  let u = i + 1;
4758
4760
  for (; u < a; ) {
@@ -4770,7 +4772,7 @@ function Dv(t, i) {
4770
4772
  r.slice(i, u)
4771
4773
  );
4772
4774
  }
4773
- const Fv = 10, mc = 2;
4775
+ const kv = 10, mc = 2;
4774
4776
  function P(t) {
4775
4777
  return Ii(t, []);
4776
4778
  }
@@ -4781,45 +4783,45 @@ function Ii(t, i) {
4781
4783
  case "function":
4782
4784
  return t.name ? `[function ${t.name}]` : "[function]";
4783
4785
  case "object":
4784
- return kv(t, i);
4786
+ return Uv(t, i);
4785
4787
  default:
4786
4788
  return String(t);
4787
4789
  }
4788
4790
  }
4789
- function kv(t, i) {
4791
+ function Uv(t, i) {
4790
4792
  if (t === null)
4791
4793
  return "null";
4792
4794
  if (i.includes(t))
4793
4795
  return "[Circular]";
4794
4796
  const r = [...i, t];
4795
- if (Uv(t)) {
4797
+ if ($v(t)) {
4796
4798
  const a = t.toJSON();
4797
4799
  if (a !== t)
4798
4800
  return typeof a == "string" ? a : Ii(a, r);
4799
4801
  } else if (Array.isArray(t))
4800
- return Pv(t, r);
4801
- return $v(t, r);
4802
+ return Mv(t, r);
4803
+ return Pv(t, r);
4802
4804
  }
4803
- function Uv(t) {
4805
+ function $v(t) {
4804
4806
  return typeof t.toJSON == "function";
4805
4807
  }
4806
- function $v(t, i) {
4808
+ function Pv(t, i) {
4807
4809
  const r = Object.entries(t);
4808
- return r.length === 0 ? "{}" : i.length > mc ? "[" + Mv(t) + "]" : "{ " + r.map(
4810
+ return r.length === 0 ? "{}" : i.length > mc ? "[" + Bv(t) + "]" : "{ " + r.map(
4809
4811
  ([u, p]) => u + ": " + Ii(p, i)
4810
4812
  ).join(", ") + " }";
4811
4813
  }
4812
- function Pv(t, i) {
4814
+ function Mv(t, i) {
4813
4815
  if (t.length === 0)
4814
4816
  return "[]";
4815
4817
  if (i.length > mc)
4816
4818
  return "[Array]";
4817
- const r = Math.min(Fv, t.length), a = t.length - r, u = [];
4819
+ const r = Math.min(kv, t.length), a = t.length - r, u = [];
4818
4820
  for (let p = 0; p < r; ++p)
4819
4821
  u.push(Ii(t[p], i));
4820
4822
  return a === 1 ? u.push("... 1 more item") : a > 1 && u.push(`... ${a} more items`), "[" + u.join(", ") + "]";
4821
4823
  }
4822
- function Mv(t) {
4824
+ function Bv(t) {
4823
4825
  const i = Object.prototype.toString.call(t).replace(/^\[object /, "").replace(/]$/, "");
4824
4826
  if (i === "Object" && typeof t.constructor == "function") {
4825
4827
  const r = t.constructor.name;
@@ -4878,19 +4880,19 @@ class vc {
4878
4880
  return "Source";
4879
4881
  }
4880
4882
  }
4881
- function Bv(t) {
4883
+ function Gv(t) {
4882
4884
  return An(t, vc);
4883
4885
  }
4884
- function Gv(t, i) {
4885
- const r = new Vv(t, i);
4886
+ function Vv(t, i) {
4887
+ const r = new Wv(t, i);
4886
4888
  r.expectToken(E.SOF);
4887
4889
  const a = r.parseValueLiteral(!1);
4888
4890
  return r.expectToken(E.EOF), a;
4889
4891
  }
4890
- class Vv {
4892
+ class Wv {
4891
4893
  constructor(i, r = {}) {
4892
- const a = Bv(i) ? i : new vc(i);
4893
- this._lexer = new Iv(a), this._options = r, this._tokenCounter = 0;
4894
+ const a = Gv(i) ? i : new vc(i);
4895
+ this._lexer = new xv(a), this._options = r, this._tokenCounter = 0;
4894
4896
  }
4895
4897
  /**
4896
4898
  * Converts a name lex token into a name parse node.
@@ -5857,7 +5859,7 @@ class Vv {
5857
5859
  * given parsed object.
5858
5860
  */
5859
5861
  node(i, r) {
5860
- return this._options.noLocation !== !0 && (r.loc = new vv(
5862
+ return this._options.noLocation !== !0 && (r.loc = new yv(
5861
5863
  i,
5862
5864
  this._lexer.lastToken,
5863
5865
  this._lexer.source
@@ -5993,10 +5995,10 @@ function di(t) {
5993
5995
  return yc(t.kind) + (i != null ? ` "${i}"` : "");
5994
5996
  }
5995
5997
  function yc(t) {
5996
- return xv(t) ? `"${t}"` : t;
5998
+ return Av(t) ? `"${t}"` : t;
5997
5999
  }
5998
- const Wv = 5;
5999
- function jv(t, i) {
6000
+ const jv = 5;
6001
+ function qv(t, i) {
6000
6002
  const [r, a] = i ? [t, i] : [void 0, t];
6001
6003
  let u = " Did you mean ";
6002
6004
  r && (u += r + " ");
@@ -6009,7 +6011,7 @@ function jv(t, i) {
6009
6011
  case 2:
6010
6012
  return u + p[0] + " or " + p[1] + "?";
6011
6013
  }
6012
- const v = p.slice(0, Wv), I = v.pop();
6014
+ const v = p.slice(0, jv), I = v.pop();
6013
6015
  return u + v.join(", ") + ", or " + I + "?";
6014
6016
  }
6015
6017
  function nc(t) {
@@ -6033,7 +6035,7 @@ function xi(t, i) {
6033
6035
  r[a] = i(t[a], a);
6034
6036
  return r;
6035
6037
  }
6036
- function qv(t, i) {
6038
+ function Jv(t, i) {
6037
6039
  let r = 0, a = 0;
6038
6040
  for (; r < t.length && a < i.length; ) {
6039
6041
  let u = t.charCodeAt(r), p = i.charCodeAt(a);
@@ -6060,22 +6062,22 @@ function qv(t, i) {
6060
6062
  }
6061
6063
  return t.length - i.length;
6062
6064
  }
6063
- const to = 48, Jv = 57;
6065
+ const to = 48, Qv = 57;
6064
6066
  function gi(t) {
6065
- return !isNaN(t) && to <= t && t <= Jv;
6067
+ return !isNaN(t) && to <= t && t <= Qv;
6066
6068
  }
6067
- function Qv(t, i) {
6068
- const r = /* @__PURE__ */ Object.create(null), a = new zv(t), u = Math.floor(t.length * 0.4) + 1;
6069
+ function zv(t, i) {
6070
+ const r = /* @__PURE__ */ Object.create(null), a = new Yv(t), u = Math.floor(t.length * 0.4) + 1;
6069
6071
  for (const p of i) {
6070
6072
  const v = a.measure(p, u);
6071
6073
  v !== void 0 && (r[p] = v);
6072
6074
  }
6073
6075
  return Object.keys(r).sort((p, v) => {
6074
6076
  const I = r[p] - r[v];
6075
- return I !== 0 ? I : qv(p, v);
6077
+ return I !== 0 ? I : Jv(p, v);
6076
6078
  });
6077
6079
  }
6078
- class zv {
6080
+ class Yv {
6079
6081
  constructor(i) {
6080
6082
  this._input = i, this._inputLowerCase = i.toLowerCase(), this._inputArray = tc(this._inputLowerCase), this._rows = [
6081
6083
  new Array(i.length + 1).fill(0),
@@ -6142,14 +6144,14 @@ function un(t) {
6142
6144
  i[r] = a;
6143
6145
  return i;
6144
6146
  }
6145
- function Yv(t) {
6146
- return `"${t.replace(Hv, Kv)}"`;
6147
+ function Hv(t) {
6148
+ return `"${t.replace(Kv, Xv)}"`;
6147
6149
  }
6148
- const Hv = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
6149
- function Kv(t) {
6150
- return Xv[t.charCodeAt(0)];
6150
+ const Kv = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
6151
+ function Xv(t) {
6152
+ return Zv[t.charCodeAt(0)];
6151
6153
  }
6152
- const Xv = [
6154
+ const Zv = [
6153
6155
  "\\u0000",
6154
6156
  "\\u0001",
6155
6157
  "\\u0002",
@@ -6315,11 +6317,11 @@ const Xv = [
6315
6317
  "\\u009D",
6316
6318
  "\\u009E",
6317
6319
  "\\u009F"
6318
- ], Zv = Object.freeze({});
6319
- function ey(t, i, r = fc) {
6320
+ ], ey = Object.freeze({});
6321
+ function ny(t, i, r = fc) {
6320
6322
  const a = /* @__PURE__ */ new Map();
6321
6323
  for (const ve of Object.values(S))
6322
- a.set(ve, ny(i, ve));
6324
+ a.set(ve, ty(i, ve));
6323
6325
  let u, p = Array.isArray(t), v = [t], I = -1, N = [], R = t, O, M;
6324
6326
  const Z = [], ce = [];
6325
6327
  do {
@@ -6353,7 +6355,7 @@ function ey(t, i, r = fc) {
6353
6355
  var W, Te;
6354
6356
  Zu(R) || ne(!1, `Invalid AST Node: ${P(R)}.`);
6355
6357
  const Ne = ve ? (W = a.get(R.kind)) === null || W === void 0 ? void 0 : W.leave : (Te = a.get(R.kind)) === null || Te === void 0 ? void 0 : Te.enter;
6356
- if (ye = Ne?.call(i, R, O, M, Z, ce), ye === Zv)
6358
+ if (ye = Ne?.call(i, R, O, M, Z, ce), ye === ey)
6357
6359
  break;
6358
6360
  if (ye === !1) {
6359
6361
  if (!ve) {
@@ -6383,7 +6385,7 @@ function ey(t, i, r = fc) {
6383
6385
  } while (u !== void 0);
6384
6386
  return N.length !== 0 ? N[N.length - 1][1] : t;
6385
6387
  }
6386
- function ny(t, i) {
6388
+ function ty(t, i) {
6387
6389
  const r = t[i];
6388
6390
  return typeof r == "object" ? r : typeof r == "function" ? {
6389
6391
  enter: r,
@@ -6394,9 +6396,9 @@ function ny(t, i) {
6394
6396
  };
6395
6397
  }
6396
6398
  function on(t) {
6397
- return ey(t, ry);
6399
+ return ny(t, iy);
6398
6400
  }
6399
- const ty = 80, ry = {
6401
+ const ry = 80, iy = {
6400
6402
  Name: {
6401
6403
  leave: (t) => t.value
6402
6404
  },
@@ -6432,7 +6434,7 @@ const ty = 80, ry = {
6432
6434
  leave({ alias: t, name: i, arguments: r, directives: a, selectionSet: u }) {
6433
6435
  const p = Y("", t, ": ") + i;
6434
6436
  let v = p + Y("(", C(r, ", "), ")");
6435
- return v.length > ty && (v = p + Y(`(
6437
+ return v.length > ry && (v = p + Y(`(
6436
6438
  `, vi(C(r, `
6437
6439
  `)), `
6438
6440
  )`)), C([v, C(a, " "), u], " ");
@@ -6470,7 +6472,7 @@ const ty = 80, ry = {
6470
6472
  leave: ({ value: t }) => t
6471
6473
  },
6472
6474
  StringValue: {
6473
- leave: ({ value: t, block: i }) => i ? Ev(t) : Yv(t)
6475
+ leave: ({ value: t, block: i }) => i ? Iv(t) : Hv(t)
6474
6476
  },
6475
6477
  BooleanValue: {
6476
6478
  leave: ({ value: t }) => t ? "true" : "false"
@@ -6695,7 +6697,7 @@ function yn(t) {
6695
6697
  );
6696
6698
  return t;
6697
6699
  }
6698
- function iy(t) {
6700
+ function sy(t) {
6699
6701
  if (t === "true" || t === "false" || t === "null")
6700
6702
  throw new re(`Enum values cannot be named: ${t}`);
6701
6703
  return yn(t);
@@ -6709,7 +6711,7 @@ function Mt(t) {
6709
6711
  function $n(t) {
6710
6712
  return An(t, nt);
6711
6713
  }
6712
- function sy(t) {
6714
+ function oy(t) {
6713
6715
  if (!$n(t))
6714
6716
  throw new Error(`Expected ${P(t)} to be a GraphQL Object type.`);
6715
6717
  return t;
@@ -6717,7 +6719,7 @@ function sy(t) {
6717
6719
  function rn(t) {
6718
6720
  return An(t, Cc);
6719
6721
  }
6720
- function oy(t) {
6722
+ function ay(t) {
6721
6723
  if (!rn(t))
6722
6724
  throw new Error(
6723
6725
  `Expected ${P(t)} to be a GraphQL Interface type.`
@@ -6748,7 +6750,7 @@ function Ec(t) {
6748
6750
  function Ic(t) {
6749
6751
  return Mt(t) || Zn(t);
6750
6752
  }
6751
- function ay(t) {
6753
+ function uy(t) {
6752
6754
  return rn(t) || Xn(t);
6753
6755
  }
6754
6756
  class tn {
@@ -6788,12 +6790,12 @@ function uo(t) {
6788
6790
  function xc(t) {
6789
6791
  return Tc(t) && !Kn(t);
6790
6792
  }
6791
- function uy(t) {
6793
+ function cy(t) {
6792
6794
  if (!xc(t))
6793
6795
  throw new Error(`Expected ${P(t)} to be a GraphQL nullable type.`);
6794
6796
  return t;
6795
6797
  }
6796
- function cy(t) {
6798
+ function ly(t) {
6797
6799
  if (t) {
6798
6800
  let i = t;
6799
6801
  for (; uo(i); )
@@ -7001,7 +7003,7 @@ class Cc {
7001
7003
  class Dc {
7002
7004
  constructor(i) {
7003
7005
  var r;
7004
- this.name = yn(i.name), this.description = i.description, this.resolveType = i.resolveType, this.extensions = un(i.extensions), this.astNode = i.astNode, this.extensionASTNodes = (r = i.extensionASTNodes) !== null && r !== void 0 ? r : [], this._types = ly.bind(void 0, i), i.resolveType == null || typeof i.resolveType == "function" || ne(
7006
+ this.name = yn(i.name), this.description = i.description, this.resolveType = i.resolveType, this.extensions = un(i.extensions), this.astNode = i.astNode, this.extensionASTNodes = (r = i.extensionASTNodes) !== null && r !== void 0 ? r : [], this._types = fy.bind(void 0, i), i.resolveType == null || typeof i.resolveType == "function" || ne(
7005
7007
  !1,
7006
7008
  `${this.name} must provide "resolveType" as a function, but got: ${P(i.resolveType)}.`
7007
7009
  );
@@ -7030,7 +7032,7 @@ class Dc {
7030
7032
  return this.toString();
7031
7033
  }
7032
7034
  }
7033
- function ly(t) {
7035
+ function fy(t) {
7034
7036
  const i = Ac(t.types);
7035
7037
  return Array.isArray(i) || ne(
7036
7038
  !1,
@@ -7041,7 +7043,7 @@ class Ai {
7041
7043
  /* <T> */
7042
7044
  constructor(i) {
7043
7045
  var r;
7044
- this.name = yn(i.name), this.description = i.description, this.extensions = un(i.extensions), this.astNode = i.astNode, this.extensionASTNodes = (r = i.extensionASTNodes) !== null && r !== void 0 ? r : [], this._values = fy(this.name, i.values), this._valueLookup = new Map(
7046
+ this.name = yn(i.name), this.description = i.description, this.extensions = un(i.extensions), this.astNode = i.astNode, this.extensionASTNodes = (r = i.extensionASTNodes) !== null && r !== void 0 ? r : [], this._values = py(this.name, i.values), this._valueLookup = new Map(
7045
7047
  this._values.map((a) => [a.value, a])
7046
7048
  ), this._nameLookup = _c(this._values, (a) => a.name);
7047
7049
  }
@@ -7127,10 +7129,10 @@ class Ai {
7127
7129
  }
7128
7130
  }
7129
7131
  function mi(t, i) {
7130
- const r = t.getValues().map((u) => u.name), a = Qv(i, r);
7131
- return jv("the enum value", a);
7132
+ const r = t.getValues().map((u) => u.name), a = zv(i, r);
7133
+ return qv("the enum value", a);
7132
7134
  }
7133
- function fy(t, i) {
7135
+ function py(t, i) {
7134
7136
  return $t(i) || ne(
7135
7137
  !1,
7136
7138
  `${t} values must be an object with value names as keys.`
@@ -7138,7 +7140,7 @@ function fy(t, i) {
7138
7140
  !1,
7139
7141
  `${t}.${r} must refer to an object with a "value" key representing an internal value but got: ${P(a)}.`
7140
7142
  ), {
7141
- name: iy(r),
7143
+ name: sy(r),
7142
7144
  description: a.description,
7143
7145
  value: a.value !== void 0 ? a.value : r,
7144
7146
  deprecationReason: a.deprecationReason,
@@ -7149,7 +7151,7 @@ function fy(t, i) {
7149
7151
  class Fc {
7150
7152
  constructor(i) {
7151
7153
  var r;
7152
- this.name = yn(i.name), this.description = i.description, this.extensions = un(i.extensions), this.astNode = i.astNode, this.extensionASTNodes = (r = i.extensionASTNodes) !== null && r !== void 0 ? r : [], this._fields = py.bind(void 0, i);
7154
+ this.name = yn(i.name), this.description = i.description, this.extensions = un(i.extensions), this.astNode = i.astNode, this.extensionASTNodes = (r = i.extensionASTNodes) !== null && r !== void 0 ? r : [], this._fields = hy.bind(void 0, i);
7153
7155
  }
7154
7156
  get [Symbol.toStringTag]() {
7155
7157
  return "GraphQLInputObjectType";
@@ -7182,7 +7184,7 @@ class Fc {
7182
7184
  return this.toString();
7183
7185
  }
7184
7186
  }
7185
- function py(t) {
7187
+ function hy(t) {
7186
7188
  const i = Nc(t.fields);
7187
7189
  return $t(i) || ne(
7188
7190
  !1,
@@ -7200,7 +7202,7 @@ function py(t) {
7200
7202
  astNode: r.astNode
7201
7203
  }));
7202
7204
  }
7203
- const Xs = 2147483647, Zs = -2147483648, hy = new mt({
7205
+ const Xs = 2147483647, Zs = -2147483648, dy = new mt({
7204
7206
  name: "Int",
7205
7207
  description: "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",
7206
7208
  serialize(t) {
@@ -7247,7 +7249,7 @@ const Xs = 2147483647, Zs = -2147483648, hy = new mt({
7247
7249
  );
7248
7250
  return i;
7249
7251
  }
7250
- }), dy = new mt({
7252
+ }), gy = new mt({
7251
7253
  name: "Float",
7252
7254
  description: "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",
7253
7255
  serialize(t) {
@@ -7370,12 +7372,12 @@ const Xs = 2147483647, Zs = -2147483648, hy = new mt({
7370
7372
  }
7371
7373
  }), Uc = Object.freeze([
7372
7374
  me,
7373
- hy,
7374
7375
  dy,
7376
+ gy,
7375
7377
  sn,
7376
7378
  kc
7377
7379
  ]);
7378
- function gy(t) {
7380
+ function my(t) {
7379
7381
  return Uc.some(({ name: i }) => t.name === i);
7380
7382
  }
7381
7383
  function yr(t) {
@@ -7390,7 +7392,7 @@ function yr(t) {
7390
7392
  }
7391
7393
  return t;
7392
7394
  }
7393
- function my(t) {
7395
+ function vy(t) {
7394
7396
  return An(t, Bt);
7395
7397
  }
7396
7398
  class Bt {
@@ -7424,7 +7426,7 @@ class Bt {
7424
7426
  return this.toString();
7425
7427
  }
7426
7428
  }
7427
- const vy = new Bt({
7429
+ const yy = new Bt({
7428
7430
  name: "include",
7429
7431
  description: "Directs the executor to include this field or fragment only when the `if` argument is true.",
7430
7432
  locations: [
@@ -7438,7 +7440,7 @@ const vy = new Bt({
7438
7440
  description: "Included when true."
7439
7441
  }
7440
7442
  }
7441
- }), yy = new Bt({
7443
+ }), _y = new Bt({
7442
7444
  name: "skip",
7443
7445
  description: "Directs the executor to skip this field or fragment when the `if` argument is true.",
7444
7446
  locations: [
@@ -7452,7 +7454,7 @@ const vy = new Bt({
7452
7454
  description: "Skipped when true."
7453
7455
  }
7454
7456
  }
7455
- }), $c = "No longer supported", _y = new Bt({
7457
+ }), $c = "No longer supported", Ty = new Bt({
7456
7458
  name: "deprecated",
7457
7459
  description: "Marks an element of a GraphQL schema as no longer supported.",
7458
7460
  locations: [
@@ -7468,7 +7470,7 @@ const vy = new Bt({
7468
7470
  defaultValue: $c
7469
7471
  }
7470
7472
  }
7471
- }), Ty = new Bt({
7473
+ }), wy = new Bt({
7472
7474
  name: "specifiedBy",
7473
7475
  description: "Exposes a URL that specifies the behavior of this scalar.",
7474
7476
  locations: [X.SCALAR],
@@ -7479,15 +7481,15 @@ const vy = new Bt({
7479
7481
  }
7480
7482
  }
7481
7483
  }), Pc = Object.freeze([
7482
- vy,
7483
7484
  yy,
7484
7485
  _y,
7485
- Ty
7486
+ Ty,
7487
+ wy
7486
7488
  ]);
7487
- function wy(t) {
7489
+ function Ey(t) {
7488
7490
  return Pc.some(({ name: i }) => i === t.name);
7489
7491
  }
7490
- function Ey(t) {
7492
+ function Iy(t) {
7491
7493
  return typeof t == "object" && typeof t?.[Symbol.iterator] == "function";
7492
7494
  }
7493
7495
  function kt(t, i) {
@@ -7503,7 +7505,7 @@ function kt(t, i) {
7503
7505
  return null;
7504
7506
  if (vr(i)) {
7505
7507
  const r = i.ofType;
7506
- if (Ey(t)) {
7508
+ if (Iy(t)) {
7507
7509
  const a = [];
7508
7510
  for (const u of t) {
7509
7511
  const p = kt(u, r);
@@ -7794,7 +7796,7 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
7794
7796
  possibleTypes: {
7795
7797
  type: new tn(new K(In)),
7796
7798
  resolve(t, i, r, { schema: a }) {
7797
- if (ay(t))
7799
+ if (uy(t))
7798
7800
  return a.getPossibleTypes(t);
7799
7801
  }
7800
7802
  },
@@ -7982,10 +7984,10 @@ const jc = Object.freeze([
7982
7984
  Vc,
7983
7985
  Wc
7984
7986
  ]);
7985
- function Iy(t) {
7987
+ function xy(t) {
7986
7988
  return jc.some(({ name: i }) => t.name === i);
7987
7989
  }
7988
- class xy {
7990
+ class Ay {
7989
7991
  // Used as a cache for validateSchema().
7990
7992
  constructor(i) {
7991
7993
  var r, a;
@@ -8002,7 +8004,7 @@ class xy {
8002
8004
  u.delete(p), mn(p, u);
8003
8005
  this._queryType != null && mn(this._queryType, u), this._mutationType != null && mn(this._mutationType, u), this._subscriptionType != null && mn(this._subscriptionType, u);
8004
8006
  for (const p of this._directives)
8005
- if (my(p))
8007
+ if (vy(p))
8006
8008
  for (const v of p.args)
8007
8009
  mn(v.type, u);
8008
8010
  mn(co, u), this._typeMap = /* @__PURE__ */ Object.create(null), this._subTypeMap = /* @__PURE__ */ Object.create(null), this._implementationsMap = /* @__PURE__ */ Object.create(null);
@@ -8115,7 +8117,7 @@ class xy {
8115
8117
  }
8116
8118
  }
8117
8119
  function mn(t, i) {
8118
- const r = cy(t);
8120
+ const r = ly(t);
8119
8121
  if (!i.has(r)) {
8120
8122
  if (i.add(r), Xn(r))
8121
8123
  for (const a of r.getTypes())
@@ -8199,7 +8201,7 @@ function hr(t, i, r) {
8199
8201
  function sc(t, i) {
8200
8202
  return t.kind === S.VARIABLE && i == null;
8201
8203
  }
8202
- function Ay(t) {
8204
+ function Ny(t) {
8203
8205
  const i = {
8204
8206
  descriptions: !0,
8205
8207
  specifiedByUrl: !1,
@@ -8318,7 +8320,7 @@ function Ay(t) {
8318
8320
  }
8319
8321
  `;
8320
8322
  }
8321
- function Ny(t, i) {
8323
+ function Sy(t, i) {
8322
8324
  Pn(t) && Pn(t.__schema) || ne(
8323
8325
  !1,
8324
8326
  `Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${P(
@@ -8333,7 +8335,7 @@ function Ny(t, i) {
8333
8335
  for (const x of [...Uc, ...jc])
8334
8336
  a[x.name] && (a[x.name] = x);
8335
8337
  const u = r.queryType ? O(r.queryType) : null, p = r.mutationType ? O(r.mutationType) : null, v = r.subscriptionType ? O(r.subscriptionType) : null, I = r.directives ? r.directives.map(rt) : [];
8336
- return new xy({
8338
+ return new Ay({
8337
8339
  description: r.description,
8338
8340
  query: u,
8339
8341
  mutation: p,
@@ -8354,7 +8356,7 @@ function Ny(t, i) {
8354
8356
  if (!G)
8355
8357
  throw new Error("Decorated type deeper than introspection query.");
8356
8358
  const Qe = N(G);
8357
- return new K(uy(Qe));
8359
+ return new K(cy(Qe));
8358
8360
  }
8359
8361
  return R(x);
8360
8362
  }
@@ -8370,10 +8372,10 @@ function Ny(t, i) {
8370
8372
  return Qe;
8371
8373
  }
8372
8374
  function O(x) {
8373
- return sy(R(x));
8375
+ return oy(R(x));
8374
8376
  }
8375
8377
  function M(x) {
8376
- return oy(R(x));
8378
+ return ay(R(x));
8377
8379
  }
8378
8380
  function Z(x) {
8379
8381
  if (x != null && x.name != null && x.kind != null)
@@ -8523,7 +8525,7 @@ function Ny(t, i) {
8523
8525
  `Introspection must provide input type for arguments, but received: ${Si}.`
8524
8526
  );
8525
8527
  }
8526
- const Qe = x.defaultValue != null ? hr(Gv(x.defaultValue), G) : void 0;
8528
+ const Qe = x.defaultValue != null ? hr(Vv(x.defaultValue), G) : void 0;
8527
8529
  return {
8528
8530
  description: x.description,
8529
8531
  type: G,
@@ -8553,28 +8555,28 @@ function Ny(t, i) {
8553
8555
  });
8554
8556
  }
8555
8557
  }
8556
- function Sy(t) {
8557
- return Oy(
8558
+ function by(t) {
8559
+ return Ly(
8558
8560
  t,
8559
- (i) => !wy(i),
8560
- by
8561
+ (i) => !Ey(i),
8562
+ Oy
8561
8563
  );
8562
8564
  }
8563
- function by(t) {
8564
- return !gy(t) && !Iy(t);
8565
+ function Oy(t) {
8566
+ return !my(t) && !xy(t);
8565
8567
  }
8566
- function Oy(t, i, r) {
8568
+ function Ly(t, i, r) {
8567
8569
  const a = t.getDirectives().filter(i), u = Object.values(t.getTypeMap()).filter(r);
8568
8570
  return [
8569
- Ly(t),
8570
- ...a.map((p) => My(p)),
8571
- ...u.map((p) => Cy(p))
8571
+ Ry(t),
8572
+ ...a.map((p) => By(p)),
8573
+ ...u.map((p) => Dy(p))
8572
8574
  ].filter(Boolean).join(`
8573
8575
 
8574
8576
  `);
8575
8577
  }
8576
- function Ly(t) {
8577
- if (t.description == null && Ry(t))
8578
+ function Ry(t) {
8579
+ if (t.description == null && Cy(t))
8578
8580
  return;
8579
8581
  const i = [], r = t.getQueryType();
8580
8582
  r && i.push(` query: ${r.name}`);
@@ -8586,7 +8588,7 @@ ${i.join(`
8586
8588
  `)}
8587
8589
  }`;
8588
8590
  }
8589
- function Ry(t) {
8591
+ function Cy(t) {
8590
8592
  const i = t.getQueryType();
8591
8593
  if (i && i.name !== "Query")
8592
8594
  return !1;
@@ -8596,45 +8598,45 @@ function Ry(t) {
8596
8598
  const a = t.getSubscriptionType();
8597
8599
  return !(a && a.name !== "Subscription");
8598
8600
  }
8599
- function Cy(t) {
8601
+ function Dy(t) {
8600
8602
  if (Mt(t))
8601
- return Dy(t);
8602
- if ($n(t))
8603
8603
  return Fy(t);
8604
- if (rn(t))
8604
+ if ($n(t))
8605
8605
  return ky(t);
8606
- if (Xn(t))
8606
+ if (rn(t))
8607
8607
  return Uy(t);
8608
- if (Zn(t))
8608
+ if (Xn(t))
8609
8609
  return $y(t);
8610
- if (et(t))
8610
+ if (Zn(t))
8611
8611
  return Py(t);
8612
+ if (et(t))
8613
+ return My(t);
8612
8614
  mr(!1, "Unexpected type: " + P(t));
8613
8615
  }
8614
- function Dy(t) {
8615
- return an(t) + `scalar ${t.name}` + By(t);
8616
+ function Fy(t) {
8617
+ return an(t) + `scalar ${t.name}` + Gy(t);
8616
8618
  }
8617
8619
  function qc(t) {
8618
8620
  const i = t.getInterfaces();
8619
8621
  return i.length ? " implements " + i.map((r) => r.name).join(" & ") : "";
8620
8622
  }
8621
- function Fy(t) {
8623
+ function ky(t) {
8622
8624
  return an(t) + `type ${t.name}` + qc(t) + Jc(t);
8623
8625
  }
8624
- function ky(t) {
8626
+ function Uy(t) {
8625
8627
  return an(t) + `interface ${t.name}` + qc(t) + Jc(t);
8626
8628
  }
8627
- function Uy(t) {
8629
+ function $y(t) {
8628
8630
  const i = t.getTypes(), r = i.length ? " = " + i.join(" | ") : "";
8629
8631
  return an(t) + "union " + t.name + r;
8630
8632
  }
8631
- function $y(t) {
8633
+ function Py(t) {
8632
8634
  const i = t.getValues().map(
8633
8635
  (r, a) => an(r, " ", !a) + " " + r.name + fo(r.deprecationReason)
8634
8636
  );
8635
8637
  return an(t) + `enum ${t.name}` + lo(i);
8636
8638
  }
8637
- function Py(t) {
8639
+ function My(t) {
8638
8640
  const i = Object.values(t.getFields()).map(
8639
8641
  (r, a) => an(r, " ", !a) + " " + io(r)
8640
8642
  );
@@ -8665,7 +8667,7 @@ function io(t) {
8665
8667
  let r = t.name + ": " + String(t.type);
8666
8668
  return i && (r += ` = ${on(i)}`), r + fo(t.deprecationReason);
8667
8669
  }
8668
- function My(t) {
8670
+ function By(t) {
8669
8671
  return an(t) + "directive @" + t.name + Qc(t.args) + (t.isRepeatable ? " repeatable" : "") + " on " + t.locations.join(" | ");
8670
8672
  }
8671
8673
  function fo(t) {
@@ -8674,7 +8676,7 @@ function fo(t) {
8674
8676
  value: t
8675
8677
  })})` : " @deprecated";
8676
8678
  }
8677
- function By(t) {
8679
+ function Gy(t) {
8678
8680
  return t.specifiedByURL == null ? "" : ` @specifiedBy(url: ${on({
8679
8681
  kind: S.STRING,
8680
8682
  value: t.specifiedByURL
@@ -8687,7 +8689,7 @@ function an(t, i = "", r = !0) {
8687
8689
  const u = on({
8688
8690
  kind: S.STRING,
8689
8691
  value: a,
8690
- block: wv(a)
8692
+ block: Ev(a)
8691
8693
  });
8692
8694
  return (i && !r ? `
8693
8695
  ` + i : i) + u.replace(/\n/g, `
@@ -8696,7 +8698,7 @@ function an(t, i = "", r = !0) {
8696
8698
  }
8697
8699
  const lr = "default", wi = class wi {
8698
8700
  constructor() {
8699
- this.configPath = Ys.join(X0.homedir(), ".twenty", "config.json");
8701
+ this.configPath = Ys.join(Z0.homedir(), ".twenty", "config.json");
8700
8702
  }
8701
8703
  static setActiveWorkspace(i) {
8702
8704
  this.activeWorkspace = i ?? lr;
@@ -8873,7 +8875,7 @@ class Gt {
8873
8875
  }
8874
8876
  async getSchema() {
8875
8877
  try {
8876
- const i = Ay(), r = await this.client.post(
8878
+ const i = Ny(), r = await this.client.post(
8877
8879
  "/graphql",
8878
8880
  {
8879
8881
  query: i
@@ -8890,10 +8892,10 @@ class Gt {
8890
8892
  success: !1,
8891
8893
  error: `GraphQL introspection errors: ${JSON.stringify(r.data.errors)}`
8892
8894
  };
8893
- const a = Ny(r.data.data);
8895
+ const a = Sy(r.data.data);
8894
8896
  return {
8895
8897
  success: !0,
8896
- data: Sy(a),
8898
+ data: by(a),
8897
8899
  message: "Successfully load schema"
8898
8900
  };
8899
8901
  } catch (i) {
@@ -8910,7 +8912,7 @@ class Gt {
8910
8912
  functionUniversalIdentifier: r,
8911
8913
  functionName: a
8912
8914
  }) {
8913
- const u = await this.configService.getConfig(), p = K0({
8915
+ const u = await this.configService.getConfig(), p = X0({
8914
8916
  url: u.apiUrl + "/graphql",
8915
8917
  headers: {
8916
8918
  Authorization: `Bearer ${u.apiKey}`,
@@ -8943,7 +8945,7 @@ class Gt {
8943
8945
  );
8944
8946
  }
8945
8947
  }
8946
- const zc = () => ev(nv(import.meta.url), {
8948
+ const zc = () => nv(tv(import.meta.url), {
8947
8949
  moduleCache: !1,
8948
8950
  // Don't cache during dev for hot reload
8949
8951
  fsCache: !1,
@@ -8968,8 +8970,8 @@ const zc = () => ev(nv(import.meta.url), {
8968
8970
  `Failed to load config from ${t}: ${r.message}`
8969
8971
  ) : r;
8970
8972
  }
8971
- }, Gy = (t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Vy = (t, i, r, a) => {
8972
- const u = Gy(i), p = [
8973
+ }, Vy = (t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Wy = (t, i, r, a) => {
8974
+ const u = Vy(i), p = [
8973
8975
  // Named import: import { foo } from 'path' or import { foo, bar } from 'path'
8974
8976
  new RegExp(
8975
8977
  `import\\s*\\{[^}]*\\b${u}\\b[^}]*\\}\\s*from\\s*['"]([^'"]+)['"]`
@@ -8989,7 +8991,7 @@ const zc = () => ev(nv(import.meta.url), {
8989
8991
  }
8990
8992
  }
8991
8993
  return null;
8992
- }, Wy = async (t, i) => {
8994
+ }, jy = async (t, i) => {
8993
8995
  const r = zc();
8994
8996
  try {
8995
8997
  const a = await r.import(t), p = Yc(a, (O) => typeof O == "object" && O !== null && "handler" in O && typeof O.handler == "function");
@@ -9002,7 +9004,7 @@ const zc = () => ev(nv(import.meta.url), {
9002
9004
  throw new Error(
9003
9005
  `Handler function in ${t} must be a named function`
9004
9006
  );
9005
- const I = await Ie.readFile(t, "utf8"), R = Vy(
9007
+ const I = await Ie.readFile(t, "utf8"), R = Wy(
9006
9008
  I,
9007
9009
  v,
9008
9010
  t,
@@ -9025,8 +9027,8 @@ class so extends Error {
9025
9027
  super(i), this.parseErrors = r, this.filePath = a, this.name = "JsoncParseError";
9026
9028
  }
9027
9029
  }
9028
- const jy = (t, i = {}) => {
9029
- const r = [], a = tv(t, r, {
9030
+ const qy = (t, i = {}) => {
9031
+ const r = [], a = rv(t, r, {
9030
9032
  allowTrailingComma: i.allowTrailingComma ?? !0,
9031
9033
  disallowComments: i.disallowComments ?? !1,
9032
9034
  allowEmptyContent: i.allowEmptyContent ?? !1
@@ -9043,10 +9045,10 @@ ${u.join(`
9043
9045
  );
9044
9046
  }
9045
9047
  return a;
9046
- }, qy = async (t) => await Ie.readFile(t, "utf8"), Jy = async (t, i = {}) => {
9048
+ }, Jy = async (t) => await Ie.readFile(t, "utf8"), Qy = async (t, i = {}) => {
9047
9049
  try {
9048
9050
  const r = await Ie.readFile(t, "utf8");
9049
- return jy(r, i);
9051
+ return qy(r, i);
9050
9052
  } catch (r) {
9051
9053
  throw r instanceof so ? new so(r.message, r.parseErrors, t) : new Error(`Failed to read file ${t}: ${r}`);
9052
9054
  }
@@ -9059,7 +9061,7 @@ class ho extends Error {
9059
9061
  ${r}`), this.errors = i, this.name = "ManifestValidationError";
9060
9062
  }
9061
9063
  }
9062
- const Qy = (t) => {
9064
+ const zy = (t) => {
9063
9065
  const i = [];
9064
9066
  if (t.application?.universalIdentifier && i.push({
9065
9067
  id: t.application.universalIdentifier,
@@ -9100,14 +9102,14 @@ const Qy = (t) => {
9100
9102
  location: `roles/${r.label}`
9101
9103
  });
9102
9104
  return i;
9103
- }, zy = (t) => {
9105
+ }, Yy = (t) => {
9104
9106
  const i = /* @__PURE__ */ new Map();
9105
9107
  for (const { id: r, location: a } of t) {
9106
9108
  const u = i.get(r) ?? [];
9107
9109
  u.push(a), i.set(r, u);
9108
9110
  }
9109
9111
  return Array.from(i.entries()).filter(([r, a]) => a.length > 1).map(([r, a]) => ({ id: r, locations: a }));
9110
- }, Yy = (t, i) => {
9112
+ }, Hy = (t, i) => {
9111
9113
  if (!t) {
9112
9114
  i.push({
9113
9115
  path: "application",
@@ -9119,7 +9121,7 @@ const Qy = (t) => {
9119
9121
  path: "application",
9120
9122
  message: "Application must have a universalIdentifier"
9121
9123
  });
9122
- }, Hy = (t, i) => {
9124
+ }, Ky = (t, i) => {
9123
9125
  for (const r of t) {
9124
9126
  const a = `objects/${r.nameSingular ?? "unknown"}`;
9125
9127
  r.universalIdentifier || i.push({
@@ -9149,15 +9151,12 @@ const Qy = (t) => {
9149
9151
  });
9150
9152
  }
9151
9153
  }
9152
- }, Ky = (t, i) => {
9154
+ }, Xy = (t, i) => {
9153
9155
  for (const r of t) {
9154
9156
  const a = `functions/${r.name ?? r.handlerName ?? "unknown"}`;
9155
9157
  r.universalIdentifier || i.push({
9156
9158
  path: a,
9157
9159
  message: "Function must have a universalIdentifier"
9158
- }), (!r.triggers || r.triggers.length === 0) && i.push({
9159
- path: a,
9160
- message: "Function must have at least one trigger"
9161
9160
  });
9162
9161
  for (const u of r.triggers ?? []) {
9163
9162
  const p = `${a}.triggers.${u.type ?? "unknown"}`;
@@ -9196,7 +9195,7 @@ const Qy = (t) => {
9196
9195
  }
9197
9196
  }
9198
9197
  }
9199
- }, Xy = (t, i) => {
9198
+ }, Zy = (t, i) => {
9200
9199
  for (const r of t) {
9201
9200
  const a = `roles/${r.label ?? "unknown"}`;
9202
9201
  r.universalIdentifier || i.push({
@@ -9207,10 +9206,10 @@ const Qy = (t) => {
9207
9206
  message: "Role must have a label"
9208
9207
  });
9209
9208
  }
9210
- }, Zy = (t) => {
9209
+ }, e_ = (t) => {
9211
9210
  const i = [], r = [];
9212
- Yy(t.application, i), Hy(t.objects ?? [], i), Ky(t.serverlessFunctions ?? [], i), Xy(t.roles ?? [], i);
9213
- const a = Qy(t), u = zy(a);
9211
+ Hy(t.application, i), Ky(t.objects ?? [], i), Xy(t.serverlessFunctions ?? [], i), Zy(t.roles ?? [], i);
9212
+ const a = zy(t), u = Yy(a);
9214
9213
  for (const p of u)
9215
9214
  i.push({
9216
9215
  path: p.locations.join(", "),
@@ -9225,7 +9224,7 @@ const Qy = (t) => {
9225
9224
  errors: i,
9226
9225
  warnings: r
9227
9226
  };
9228
- }, e_ = async (t) => {
9227
+ }, n_ = async (t) => {
9229
9228
  const i = Hn.join(t, "src", "app");
9230
9229
  if (!await Ie.pathExists(i))
9231
9230
  throw new Error(
@@ -9235,11 +9234,11 @@ Create it with: mkdir -p src/app`
9235
9234
  const r = Hn.join(t, "src", "app", "application.config.ts");
9236
9235
  if (!await Ie.pathExists(r))
9237
9236
  throw new Error("Missing src/app/application.config.ts");
9238
- }, go = (t, i) => ac(i, t).split(uc).join(z0.sep), _r = async (t, i) => Z0(t, {
9237
+ }, go = (t, i) => ac(i, t).split(uc).join(Y0.sep), _r = async (t, i) => ev(t, {
9239
9238
  cwd: i,
9240
9239
  absolute: !0,
9241
9240
  ignore: ["**/node_modules/**", "**/*.d.ts", "**/dist/**"]
9242
- }), n_ = async (t) => {
9241
+ }), t_ = async (t) => {
9243
9242
  const i = await _r(["src/app/**/*.object.ts"], t), r = [];
9244
9243
  for (const a of i)
9245
9244
  try {
@@ -9252,11 +9251,11 @@ Create it with: mkdir -p src/app`
9252
9251
  );
9253
9252
  }
9254
9253
  return r;
9255
- }, t_ = async (t) => {
9254
+ }, r_ = async (t) => {
9256
9255
  const i = await _r(["src/app/**/*.function.ts"], t), r = [];
9257
9256
  for (const a of i)
9258
9257
  try {
9259
- const { config: u, handlerName: p, handlerPath: v } = await Wy(
9258
+ const { config: u, handlerName: p, handlerPath: v } = await jy(
9260
9259
  a,
9261
9260
  t
9262
9261
  ), I = u, N = {
@@ -9276,7 +9275,7 @@ Create it with: mkdir -p src/app`
9276
9275
  );
9277
9276
  }
9278
9277
  return r;
9279
- }, r_ = async (t) => {
9278
+ }, i_ = async (t) => {
9280
9279
  const i = await _r(["src/app/**/*.role.ts"], t), r = [];
9281
9280
  for (const a of i)
9282
9281
  try {
@@ -9289,8 +9288,11 @@ Create it with: mkdir -p src/app`
9289
9288
  );
9290
9289
  }
9291
9290
  return r;
9292
- }, i_ = async (t) => {
9293
- const i = {}, r = await _r(["src/**/*.ts"], t);
9291
+ }, s_ = async (t) => {
9292
+ const i = {}, r = await _r(
9293
+ ["src/**/*.ts", "generated/**/*.ts"],
9294
+ t
9295
+ );
9294
9296
  for (const a of r) {
9295
9297
  const p = ac(t, a).split(uc), v = await Ie.readFile(a, "utf8");
9296
9298
  let I = i;
@@ -9300,19 +9302,19 @@ Create it with: mkdir -p src/app`
9300
9302
  }
9301
9303
  }
9302
9304
  return i;
9303
- }, s_ = async (t) => {
9304
- const i = await _r(["src/**/*.ts"], t), r = /from\s+['"][^'"]*\/generated(?:\/[^'"]*)?['"]|from\s+['"]generated['"]/;
9305
- for (const a of i) {
9306
- const u = await Ie.readFile(a, "utf8");
9307
- if (r.test(u))
9305
+ }, o_ = async (t) => {
9306
+ const i = await _r(["src/**/*.ts"], t), r = /from\s+['"][^'"]*\/generated(?:\/[^'"]*)?['"]|from\s+['"]generated['"]/, a = /require\s*\(\s*['"][^'"]*\/generated(?:\/[^'"]*)?['"]\s*\)|require\s*\(\s*['"]generated['"]\s*\)/;
9307
+ for (const u of i) {
9308
+ const p = await Ie.readFile(u, "utf8");
9309
+ if (r.test(p) || a.test(p))
9308
9310
  return !0;
9309
9311
  }
9310
9312
  return !1;
9311
9313
  }, gr = async (t) => {
9312
- await e_(t);
9313
- const i = await Jy(
9314
+ await n_(t);
9315
+ const i = await Qy(
9314
9316
  await oc(t, "package.json")
9315
- ), r = await qy(
9317
+ ), r = await Jy(
9316
9318
  await oc(t, "yarn.lock")
9317
9319
  ), a = Hn.join(
9318
9320
  t,
@@ -9320,18 +9322,18 @@ Create it with: mkdir -p src/app`
9320
9322
  "app",
9321
9323
  "application.config.ts"
9322
9324
  ), u = await po(a), [p, v, I, N, R] = await Promise.all([
9323
- n_(t),
9324
9325
  t_(t),
9325
9326
  r_(t),
9326
9327
  i_(t),
9327
- s_(t)
9328
+ s_(t),
9329
+ o_(t)
9328
9330
  ]), O = {
9329
9331
  application: u,
9330
9332
  objects: p,
9331
9333
  serverlessFunctions: v,
9332
9334
  roles: I,
9333
9335
  sources: N
9334
- }, M = Zy({
9336
+ }, M = e_({
9335
9337
  application: u,
9336
9338
  objects: p,
9337
9339
  serverlessFunctions: v,
@@ -9347,7 +9349,7 @@ Create it with: mkdir -p src/app`
9347
9349
  warnings: M.warnings
9348
9350
  };
9349
9351
  };
9350
- class o_ {
9352
+ class a_ {
9351
9353
  constructor() {
9352
9354
  this.apiService = new Gt();
9353
9355
  }
@@ -9403,22 +9405,15 @@ const Hc = (t) => {
9403
9405
  console.log(F.red(` • ${i.path}: ${i.message}`));
9404
9406
  console.log("");
9405
9407
  };
9406
- class a_ {
9408
+ class u_ {
9407
9409
  constructor() {
9408
9410
  this.apiService = new Gt();
9409
9411
  }
9410
9412
  async execute(i) {
9411
- try {
9412
- const r = i.appPath ?? vn, a = parseInt(i.debounce, 10);
9413
- this.logStartupInfo(r, a), await this.synchronize(r);
9414
- const u = this.setupFileWatcher(r, a);
9415
- this.setupGracefulShutdown(u);
9416
- } catch (r) {
9417
- console.error(
9418
- F.red("Development mode failed:"),
9419
- r instanceof Error ? r.message : r
9420
- ), process.exit(1);
9421
- }
9413
+ const r = i.appPath ?? vn, a = parseInt(i.debounce, 10);
9414
+ this.logStartupInfo(r, a), await this.synchronize(r);
9415
+ const u = this.setupFileWatcher(r, a);
9416
+ this.setupGracefulShutdown(u);
9422
9417
  }
9423
9418
  async synchronize(i) {
9424
9419
  try {
@@ -9429,14 +9424,17 @@ class a_ {
9429
9424
  yarnLock: u
9430
9425
  }), console.log(F.green(" ✓ Synced with server"));
9431
9426
  } catch (r) {
9432
- throw r instanceof ho && Xc(r), r;
9427
+ r instanceof ho ? Xc(r) : console.error(
9428
+ F.red(" ✗ Sync failed:"),
9429
+ r instanceof Error ? r.message : r
9430
+ );
9433
9431
  }
9434
9432
  }
9435
9433
  logStartupInfo(i, r) {
9436
9434
  console.log(F.blue("🚀 Starting Twenty Application Development Mode")), console.log(F.gray(`📁 App Path: ${i}`)), console.log(F.gray(`⏱️ Debounce: ${r}ms`)), console.log("");
9437
9435
  }
9438
9436
  setupFileWatcher(i, r) {
9439
- const a = rv.watch(i, {
9437
+ const a = iv.watch(i, {
9440
9438
  ignored: /node_modules|\.git/,
9441
9439
  persistent: !0
9442
9440
  });
@@ -9461,13 +9459,13 @@ class a_ {
9461
9459
  });
9462
9460
  }
9463
9461
  }
9464
- const u_ = "TWENTY_API_KEY", c_ = "TWENTY_API_URL", l_ = "generated";
9462
+ const c_ = "TWENTY_API_KEY", l_ = "TWENTY_API_URL", f_ = "generated";
9465
9463
  class Zc {
9466
9464
  constructor() {
9467
9465
  this.configService = new xn(), this.apiService = new Gt();
9468
9466
  }
9469
9467
  async generateClient(i) {
9470
- const r = Yn(i, l_);
9468
+ const r = Yn(i, f_);
9471
9469
  console.log(F.blue("📦 Generating Twenty client...")), console.log(F.gray(`📁 Output Path: ${r}`)), console.log("");
9472
9470
  const a = await this.configService.getConfig(), u = a.apiUrl, p = a.apiKey;
9473
9471
  if (!u || !p) {
@@ -9482,8 +9480,8 @@ class Zc {
9482
9480
  const v = await this.apiService.getSchema();
9483
9481
  if (!v.success)
9484
9482
  return;
9485
- const { data: I } = v, N = Y0(r);
9486
- await iv({
9483
+ const { data: I } = v, N = H0(r);
9484
+ await sv({
9487
9485
  schema: I,
9488
9486
  output: N,
9489
9487
  scalarTypes: {
@@ -9501,10 +9499,10 @@ class Zc {
9501
9499
  // ----------------------------------------------------
9502
9500
 
9503
9501
  const defaultOptions: ClientOptions = {
9504
- url: \`\${process.env.${c_}}/graphql\`,
9502
+ url: \`\${process.env.${l_}}/graphql\`,
9505
9503
  headers: {
9506
9504
  'Content-Type': 'application/json',
9507
- Authorization: \`Bearer \${process.env.${u_}}\`,
9505
+ Authorization: \`Bearer \${process.env.${c_}}\`,
9508
9506
  },
9509
9507
  }
9510
9508
 
@@ -9537,7 +9535,7 @@ export default class Twenty {
9537
9535
  await Ie.appendFile(Yn(i, "index.ts"), r);
9538
9536
  }
9539
9537
  }
9540
- class f_ {
9538
+ class p_ {
9541
9539
  constructor() {
9542
9540
  this.apiService = new Gt(), this.generateService = new Zc();
9543
9541
  }
@@ -9579,7 +9577,7 @@ class f_ {
9579
9577
  }
9580
9578
  }
9581
9579
  const Ft = (t) => t && !t?.startsWith("/") ? Yn(vn, t) : t;
9582
- class p_ {
9580
+ class h_ {
9583
9581
  constructor() {
9584
9582
  this.generateService = new Zc();
9585
9583
  }
@@ -9594,7 +9592,7 @@ class p_ {
9594
9592
  }
9595
9593
  }
9596
9594
  }
9597
- class h_ {
9595
+ class d_ {
9598
9596
  constructor() {
9599
9597
  this.apiService = new Gt();
9600
9598
  }
@@ -9632,9 +9630,10 @@ class h_ {
9632
9630
  ), console.log("");
9633
9631
  }
9634
9632
  }
9635
- class d_ {
9633
+ z0.defaultOptions.depth = 10;
9634
+ class g_ {
9636
9635
  constructor() {
9637
- this.devCommand = new a_(), this.syncCommand = new f_(), this.uninstallCommand = new o_(), this.addCommand = new hv(), this.generateCommand = new p_(), this.logsCommand = new h_();
9636
+ this.devCommand = new u_(), this.syncCommand = new p_(), this.uninstallCommand = new a_(), this.addCommand = new dv(), this.generateCommand = new h_(), this.logsCommand = new d_();
9638
9637
  }
9639
9638
  getCommand() {
9640
9639
  const i = new oo("app");
@@ -9670,7 +9669,7 @@ class d_ {
9670
9669
  }), i.command("add [entityType]").option("--path <path>", "Path in which the entity should be created.").description(
9671
9670
  `Add a new entity to your application (${Object.values(Ti).join("|")})`
9672
9671
  ).action(async (r, a) => {
9673
- r && !pv(r) && (console.error(
9672
+ r && !hv(r) && (console.error(
9674
9673
  F.red(
9675
9674
  `Invalid entity type "${r}". Must be one of: ${Object.values(Ti).join("|")}`
9676
9675
  )
@@ -9696,7 +9695,7 @@ class d_ {
9696
9695
  ), i;
9697
9696
  }
9698
9697
  }
9699
- class g_ {
9698
+ class m_ {
9700
9699
  constructor() {
9701
9700
  this.configService = new xn(), this.apiService = new Gt();
9702
9701
  }
@@ -9793,10 +9792,10 @@ class g_ {
9793
9792
  }
9794
9793
  }
9795
9794
  }
9796
- const m_ = "0.3.0-alpha", v_ = {
9797
- version: m_
9795
+ const v_ = "0.3.1", y_ = {
9796
+ version: v_
9798
9797
  }, vt = new oo();
9799
- vt.name("twenty").description("CLI for Twenty application development").version(v_.version);
9798
+ vt.name("twenty").description("CLI for Twenty application development").version(y_.version);
9800
9799
  vt.option(
9801
9800
  "--workspace <name>",
9802
9801
  "Use a specific workspace configuration",
@@ -9808,8 +9807,8 @@ vt.hook("preAction", (t) => {
9808
9807
  F.gray(`👩‍💻 Workspace - ${xn.getActiveWorkspace()}`)
9809
9808
  );
9810
9809
  });
9810
+ vt.addCommand(new m_().getCommand());
9811
9811
  vt.addCommand(new g_().getCommand());
9812
- vt.addCommand(new d_().getCommand());
9813
9812
  vt.exitOverride();
9814
9813
  try {
9815
9814
  vt.parse();