twenty-sdk 2.33.0 → 2.35.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.
- package/CHANGELOG.md +17 -0
- package/dist/billing/index.cjs.map +1 -1
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{catalog-sync-DoEI8JO8.js → catalog-sync-Bs-X2ChV.js} +1 -1
- package/dist/{catalog-sync-DUp5hpKi.mjs → catalog-sync-C82Xfr2f.mjs} +1 -1
- package/dist/cli/utilities/build/manifest/manifest-extract-config.d.ts +4 -2
- package/dist/cli/utilities/build/manifest/utils/manifest-validation-helpers.d.ts +10 -0
- package/dist/cli/utilities/build/manifest/utils/validate-timeline-activity-types.d.ts +2 -0
- package/dist/cli/utilities/entity/entity-timeline-activity-type-template.d.ts +3 -0
- package/dist/cli.cjs +27 -20
- package/dist/cli.mjs +302 -285
- package/dist/define/index.cjs +2 -2
- package/dist/define/index.cjs.map +1 -1
- package/dist/define/index.d.ts +30 -9
- package/dist/define/index.mjs +152 -130
- package/dist/define/index.mjs.map +1 -1
- package/dist/front-component/index.cjs +1 -1
- package/dist/front-component/index.cjs.map +1 -1
- package/dist/front-component/index.d.ts +7 -1
- package/dist/front-component/index.mjs +7 -7
- package/dist/front-component/index.mjs.map +1 -1
- package/dist/front-component-renderer/build.cjs +1 -1
- package/dist/front-component-renderer/build.mjs +1 -1
- package/dist/{get-front-component-build-plugins-DsfkhD6M.js → get-front-component-build-plugins-CcV3Cown.js} +1 -1
- package/dist/{get-front-component-build-plugins-Cn-MWltl.mjs → get-front-component-build-plugins-D9VJQHw7.mjs} +2 -2
- package/dist/{get-function-input-schema-GNk3NRLJ-B8zXGirB.js → get-function-input-schema-GNk3NRLJ-Byssjp8I.js} +1 -1
- package/dist/{get-function-input-schema-GNk3NRLJ-CwF3VRY5.mjs → get-function-input-schema-GNk3NRLJ-Dm0Ljlg4.mjs} +1 -1
- package/dist/logic-function/index.cjs +9 -9
- package/dist/logic-function/index.cjs.map +1 -1
- package/dist/logic-function/index.d.ts +52 -2
- package/dist/logic-function/index.mjs +622 -582
- package/dist/logic-function/index.mjs.map +1 -1
- package/dist/{login-153niBFr.mjs → login-BsiMC4oB.mjs} +954 -891
- package/dist/{login-Cl5xmujh.js → login-cG7hCrTK.js} +44 -44
- package/dist/operations.cjs +1 -1
- package/dist/operations.mjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { fileURLToPath as t } from "node:url";
|
|
|
4
4
|
import { dirname as n } from "node:path";
|
|
5
5
|
e(import.meta.url);
|
|
6
6
|
const r = t(import.meta.url), i = n(r);
|
|
7
|
-
import { B as a, M as o, St as s, V as c, X as l, Y as u, bt as d, c as f, i as p, j as m, m as h, s as g, t as _, yt as v, z as y } from "./get-front-component-build-plugins-
|
|
8
|
-
import { $ as b, B as x, C as S, Ct as C, Dt as w, E as T, Et as E, F as D, G as O, H as k, I as A, J as ee, K as j, L as M, M as te, N as ne, O as N, P, Q as F, R as re, S as ie, St as ae, Tt as oe, U as se, V as ce, W as le, Z as ue, _ as de, _t as fe, a as I, at as pe, b as me, bt as he, c as ge, ct as _e, d as ve, dt as ye, et as be, f as xe, ft as Se, g as Ce, gt as we, h as Te, ht as Ee, i as De, it as Oe, k as ke, l as Ae, lt as je, m as Me, mt as Ne, n as Pe, nt as Fe, o as Ie, ot as Le, p as Re, pt as ze, rt as Be, s as Ve, st as He, t as Ue, u as We, ut as Ge, v as Ke, vt as qe, w as Je, wt as Ye, x as Xe, xt as Ze, y as Qe, yt as $e, z as et } from "./login-
|
|
7
|
+
import { B as a, M as o, St as s, V as c, X as l, Y as u, bt as d, c as f, i as p, j as m, m as h, s as g, t as _, yt as v, z as y } from "./get-front-component-build-plugins-D9VJQHw7.mjs";
|
|
8
|
+
import { $ as b, B as x, C as S, Ct as C, Dt as w, E as T, Et as E, F as D, G as O, H as k, I as A, J as ee, K as j, L as M, M as te, N as ne, O as N, P, Q as F, R as re, S as ie, St as ae, Tt as oe, U as se, V as ce, W as le, Z as ue, _ as de, _t as fe, a as I, at as pe, b as me, bt as he, c as ge, ct as _e, d as ve, dt as ye, et as be, f as xe, ft as Se, g as Ce, gt as we, h as Te, ht as Ee, i as De, it as Oe, k as ke, l as Ae, lt as je, m as Me, mt as Ne, n as Pe, nt as Fe, o as Ie, ot as Le, p as Re, pt as ze, rt as Be, s as Ve, st as He, t as Ue, u as We, ut as Ge, v as Ke, vt as qe, w as Je, wt as Ye, x as Xe, xt as Ze, y as Qe, yt as $e, z as et } from "./login-BsiMC4oB.mjs";
|
|
9
9
|
import tt, { dirname as nt, join as rt, relative as it } from "path";
|
|
10
10
|
import { readFile as at, readdir as ot, writeFile as st } from "node:fs/promises";
|
|
11
11
|
import { isNonEmptyArray as ct } from "@sniptt/guards";
|
|
@@ -3819,10 +3819,17 @@ export default defineViewField({
|
|
|
3819
3819
|
isVisible: true,
|
|
3820
3820
|
size: 150,
|
|
3821
3821
|
});
|
|
3822
|
-
`, sn =
|
|
3822
|
+
`, sn = ({ name: e }) => `import { defineTimelineActivityType } from 'twenty-sdk/define';
|
|
3823
|
+
|
|
3824
|
+
export default defineTimelineActivityType({
|
|
3825
|
+
universalIdentifier: '${lt()}',
|
|
3826
|
+
name: '${e}',
|
|
3827
|
+
label: '${e}',
|
|
3828
|
+
});
|
|
3829
|
+
`, cn = "src/application.config.ts", ln = "src", un = class {
|
|
3823
3830
|
async execute(e, t) {
|
|
3824
3831
|
try {
|
|
3825
|
-
let n = await It(w), r = e ?? await this.getEntity(), i = this.getFolderName(r), a = t ? rt(w, t) : rt(w,
|
|
3832
|
+
let n = await It(w), r = e ?? await this.getEntity(), i = this.getFolderName(r), a = t ? rt(w, t) : rt(w, ln, i);
|
|
3826
3833
|
await qe(a);
|
|
3827
3834
|
let { name: o, file: s } = await this.getEntityData(r, n), c = rt(a, this.getFileName(o, r));
|
|
3828
3835
|
if (await $e(c)) {
|
|
@@ -3954,7 +3961,14 @@ export default defineViewField({
|
|
|
3954
3961
|
file: Xt({ name: t })
|
|
3955
3962
|
};
|
|
3956
3963
|
}
|
|
3957
|
-
|
|
3964
|
+
case f.TimelineActivityType: {
|
|
3965
|
+
let t = await this.getEntityName(e);
|
|
3966
|
+
return {
|
|
3967
|
+
name: t,
|
|
3968
|
+
file: sn({ name: t })
|
|
3969
|
+
};
|
|
3970
|
+
}
|
|
3971
|
+
default: C(e);
|
|
3958
3972
|
}
|
|
3959
3973
|
}
|
|
3960
3974
|
async promptAndCreateObjectCompanions({ objectName: e, applicationUniversalIdentifier: t, customPath: n }) {
|
|
@@ -3976,7 +3990,7 @@ export default defineViewField({
|
|
|
3976
3990
|
isVisible: !0,
|
|
3977
3991
|
size: 200
|
|
3978
3992
|
}] : []
|
|
3979
|
-
}), s = n ? rt(w, n) : rt(w,
|
|
3993
|
+
}), s = n ? rt(w, n) : rt(w, ln, this.getFolderName(f.View));
|
|
3980
3994
|
await qe(s);
|
|
3981
3995
|
let c = rt(s, `all-${Gt(e)}.ts`);
|
|
3982
3996
|
if (await $e(c)) {
|
|
@@ -4001,7 +4015,7 @@ export default defineViewField({
|
|
|
4001
4015
|
name: e,
|
|
4002
4016
|
type: "OBJECT",
|
|
4003
4017
|
targetObjectUniversalIdentifier: this.lastObjectUniversalIdentifier
|
|
4004
|
-
}), h = n ? rt(w, n) : rt(w,
|
|
4018
|
+
}), h = n ? rt(w, n) : rt(w, ln, this.getFolderName(f.NavigationMenuItem));
|
|
4005
4019
|
await qe(h);
|
|
4006
4020
|
let g = rt(h, `${Gt(e)}.ts`);
|
|
4007
4021
|
if (await $e(g)) {
|
|
@@ -4013,7 +4027,7 @@ export default defineViewField({
|
|
|
4013
4027
|
objectLabelSingular: this.lastObjectLabelSingular ?? e,
|
|
4014
4028
|
objectUniversalIdentifier: this.lastObjectUniversalIdentifier,
|
|
4015
4029
|
fieldsWidgetViewUniversalIdentifier: a
|
|
4016
|
-
}), v = n ? rt(w, n) : rt(w,
|
|
4030
|
+
}), v = n ? rt(w, n) : rt(w, ln, this.getFolderName(f.PageLayout));
|
|
4017
4031
|
await qe(v);
|
|
4018
4032
|
let y = rt(v, `${Gt(e)}-record-page-layout.ts`);
|
|
4019
4033
|
if (await $e(y)) {
|
|
@@ -4045,7 +4059,7 @@ export default defineViewField({
|
|
|
4045
4059
|
break;
|
|
4046
4060
|
case "skipped-no-config":
|
|
4047
4061
|
case "skipped-no-app-call":
|
|
4048
|
-
console.log(vt.yellow(`! Couldn't auto-update ${
|
|
4062
|
+
console.log(vt.yellow(`! Couldn't auto-update ${cn}. Add these manually to defineApplication.serverVariables:\n` + n.map((e) => ` ${e.name}: { description: '...', isSecret: ${e.isSecret}, isRequired: true },`).join("\n")));
|
|
4049
4063
|
break;
|
|
4050
4064
|
}
|
|
4051
4065
|
}
|
|
@@ -4224,7 +4238,7 @@ export default defineViewField({
|
|
|
4224
4238
|
default: return `${Gt(e)}.ts`;
|
|
4225
4239
|
}
|
|
4226
4240
|
}
|
|
4227
|
-
},
|
|
4241
|
+
}, dn = class {
|
|
4228
4242
|
async execute(e) {
|
|
4229
4243
|
let t = e.appPath ?? w;
|
|
4230
4244
|
await At(t), console.log(vt.blue("Building application...")), console.log(vt.gray(`App path: ${t}\n`));
|
|
@@ -4235,7 +4249,7 @@ export default defineViewField({
|
|
|
4235
4249
|
});
|
|
4236
4250
|
n.success || (console.error(vt.red(n.error.message)), process.exit(1)), console.log(vt.green(`✓ Build succeeded (${n.data.fileCount} file${n.data.fileCount === 1 ? "" : "s"})`)), console.log(vt.gray(`Output: ${n.data.outputDir}`)), n.data.tarballPath && console.log(vt.gray(`Tarball: ${n.data.tarballPath}`));
|
|
4237
4251
|
}
|
|
4238
|
-
},
|
|
4252
|
+
}, V = class {
|
|
4239
4253
|
async execute({ appPath: e = w, postInstall: t = !1, preInstall: n = !1, uninstall: r = !1, functionUniversalIdentifier: i, functionName: a, payload: o = "{}" }) {
|
|
4240
4254
|
let s;
|
|
4241
4255
|
try {
|
|
@@ -4294,7 +4308,7 @@ export default defineViewField({
|
|
|
4294
4308
|
let f = d.status === "SUCCESS" ? vt.green : vt.red;
|
|
4295
4309
|
console.log(`${vt.bold("Status:")} ${f(d.status)}`), console.log(`${vt.bold("Duration:")} ${d.duration}ms\n`), v(d.data) && (console.log(vt.bold("Data:")), console.log(vt.white(JSON.stringify(d.data, null, 2)))), d.error && (console.log(vt.bold.red("Error:")), console.log(vt.red(` Type: ${d.error.errorType}`)), console.log(vt.red(` Message: ${d.error.errorMessage}\n`)), d.error.stackTrace && (console.log(vt.gray("Stack trace:")), console.log(vt.gray(d.error.stackTrace)))), d.logs && (console.log(vt.bold("Logs:")), console.log(vt.gray(d.logs))), console.log(vt.cyan("─".repeat(60))), d.status !== "SUCCESS" && process.exit(1);
|
|
4296
4310
|
}
|
|
4297
|
-
},
|
|
4311
|
+
}, fn = class {
|
|
4298
4312
|
constructor() {
|
|
4299
4313
|
this.apiService = new et();
|
|
4300
4314
|
}
|
|
@@ -4318,55 +4332,55 @@ export default defineViewField({
|
|
|
4318
4332
|
let r = e ?? "Twenty Application", i = t || n ? `function "${t || n}"` : "functions", a = se.getActiveRemote();
|
|
4319
4333
|
console.log(vt.blue(`🚀 Watching ${r} ${i} logs on ${a}:\n`));
|
|
4320
4334
|
}
|
|
4321
|
-
},
|
|
4335
|
+
}, pn = (e) => `${vt.cyan(e.file)}:${vt.yellow(String(e.line))}:${vt.yellow(String(e.column + 1))} - ${vt.red("error")} ${e.text}`, mn = class {
|
|
4322
4336
|
async execute(e) {
|
|
4323
4337
|
let t = e.appPath ?? w;
|
|
4324
4338
|
console.log(vt.blue("Running type check...")), console.log(vt.gray(`App path: ${t}\n`));
|
|
4325
4339
|
let n = await Ne(t);
|
|
4326
4340
|
n.length === 0 && (console.log(vt.green("✓ No type errors found")), process.exit(0));
|
|
4327
|
-
for (let e of n) console.log(
|
|
4341
|
+
for (let e of n) console.log(pn(e));
|
|
4328
4342
|
console.log("\n", vt.red(`✗ Found ${n.length} type error${n.length === 1 ? "" : "s"}`)), process.exit(1);
|
|
4329
4343
|
}
|
|
4330
|
-
},
|
|
4331
|
-
let t = new
|
|
4344
|
+
}, hn = (e, t) => console.warn(vt.yellow(`⚠ \`twenty ${e}\` is deprecated. Use \`twenty ${t}\` instead.`)), gn = (e) => {
|
|
4345
|
+
let t = new dn(), n = new mn(), r = new fn(), i = new V(), a = new un(), o = new jt(), s = new Mt(), c = new Nt();
|
|
4332
4346
|
e.command("build [appPath]", { hidden: !0 }).option("--tarball", "Also pack into a .tgz tarball").action(async (e, n) => {
|
|
4333
|
-
|
|
4347
|
+
hn("build", "dev:build"), await t.execute({
|
|
4334
4348
|
appPath: Dt(e),
|
|
4335
4349
|
tarball: n.tarball
|
|
4336
4350
|
});
|
|
4337
4351
|
}), e.command("typecheck [appPath]", { hidden: !0 }).action(async (e) => {
|
|
4338
|
-
|
|
4352
|
+
hn("typecheck", "dev:typecheck"), await n.execute({ appPath: Dt(e) });
|
|
4339
4353
|
}), e.command("logs [appPath]", { hidden: !0 }).option("-u, --functionUniversalIdentifier <functionUniversalIdentifier>", "Only show logs for the function with this universal ID").option("-n, --functionName <functionName>", "Only show logs for the function with this name").action(async (e, t) => {
|
|
4340
|
-
|
|
4354
|
+
hn("logs", "dev:function:logs"), await r.execute({
|
|
4341
4355
|
...t,
|
|
4342
4356
|
appPath: Dt(e)
|
|
4343
4357
|
});
|
|
4344
4358
|
}), e.command("exec [appPath]", { hidden: !0 }).option("--postInstall", "Execute post-install logic function if defined").option("--preInstall", "Execute pre-install logic function if defined").option("-p, --payload <payload>", "JSON payload to send to the function", "{}").option("-u, --functionUniversalIdentifier <functionUniversalIdentifier>", "Universal ID of the function to execute").option("-n, --functionName <functionName>", "Name of the function to execute").action(async (e, t) => {
|
|
4345
|
-
|
|
4359
|
+
hn("exec", "dev:function:exec"), !t?.postInstall && !t?.preInstall && !t?.functionUniversalIdentifier && !t?.functionName && (console.error(vt.red("Error: Either --postInstall, --preInstall, --functionName (-n), or --functionUniversalIdentifier (-u) is required.")), process.exit(1)), await i.execute({
|
|
4346
4360
|
...t,
|
|
4347
4361
|
payload: t?.payload ?? "{}",
|
|
4348
4362
|
appPath: Dt(e)
|
|
4349
4363
|
});
|
|
4350
4364
|
}), e.command("add [entityType]", { hidden: !0 }).option("--path <path>", "Path in which the entity should be created.").action(async (e, t) => {
|
|
4351
|
-
|
|
4365
|
+
hn("add", "dev:add"), await a.execute(e, t?.path);
|
|
4352
4366
|
}), e.command("publish [appPath]", { hidden: !0 }).option("--tag <tag>", "npm dist-tag (e.g. beta, next)").action(async (e, t) => {
|
|
4353
|
-
|
|
4367
|
+
hn("publish", "app:publish"), await o.execute({
|
|
4354
4368
|
appPath: Dt(e),
|
|
4355
4369
|
tag: t.tag
|
|
4356
4370
|
});
|
|
4357
4371
|
}), e.command("deploy [appPath]", { hidden: !0 }).option("-r, --remote <name>", "Deploy to a specific remote").action(async (e, t) => {
|
|
4358
|
-
|
|
4372
|
+
hn("deploy", "app:publish --private"), await o.execute({
|
|
4359
4373
|
appPath: Dt(e),
|
|
4360
4374
|
private: !0,
|
|
4361
4375
|
remote: t.remote
|
|
4362
4376
|
});
|
|
4363
4377
|
}), e.command("install [appPath]", { hidden: !0 }).option("-r, --remote <name>", "Install on a specific remote").action(async (e, t) => {
|
|
4364
|
-
|
|
4378
|
+
hn("install", "app:install"), await s.execute({
|
|
4365
4379
|
appPath: Dt(e),
|
|
4366
4380
|
remote: t.remote
|
|
4367
4381
|
});
|
|
4368
4382
|
}), e.command("uninstall [appPath]", { hidden: !0 }).option("-y, --yes", "Skip confirmation prompt").action(async (e, t) => {
|
|
4369
|
-
|
|
4383
|
+
hn("uninstall", "app:uninstall");
|
|
4370
4384
|
try {
|
|
4371
4385
|
let n = await c.execute({
|
|
4372
4386
|
appPath: Dt(e),
|
|
@@ -4377,11 +4391,11 @@ export default defineViewField({
|
|
|
4377
4391
|
process.exit(1);
|
|
4378
4392
|
}
|
|
4379
4393
|
}), e.command("catalog-sync", { hidden: !0 }).option("-r, --remote <name>", "Sync on a specific remote").action(async (e) => {
|
|
4380
|
-
|
|
4381
|
-
let { CatalogSyncCommand: t } = await import("./catalog-sync-
|
|
4394
|
+
hn("catalog-sync", "dev:catalog-sync");
|
|
4395
|
+
let { CatalogSyncCommand: t } = await import("./catalog-sync-C82Xfr2f.mjs");
|
|
4382
4396
|
await new t().execute({ remote: e.remote });
|
|
4383
4397
|
});
|
|
4384
|
-
},
|
|
4398
|
+
}, _n = class {
|
|
4385
4399
|
constructor({ state: e, notify: t }) {
|
|
4386
4400
|
this.state = e, this.notify = t;
|
|
4387
4401
|
}
|
|
@@ -4413,7 +4427,7 @@ export default defineViewField({
|
|
|
4413
4427
|
};
|
|
4414
4428
|
return t.output = { result: i }, t.status = "done", this.state.updatePipeline({ appName: r.manifest.application.displayName }), this.state.updateEntitiesFromManifest(r.filePaths), this.state.applyStepEvents(n), i;
|
|
4415
4429
|
}
|
|
4416
|
-
},
|
|
4430
|
+
}, vn = class {
|
|
4417
4431
|
constructor({ apiService: e, state: t, notify: n }) {
|
|
4418
4432
|
this.hasRetried = !1, this.apiService = e, this.state = t, this.notify = n;
|
|
4419
4433
|
}
|
|
@@ -4446,7 +4460,7 @@ export default defineViewField({
|
|
|
4446
4460
|
}
|
|
4447
4461
|
return n || this.notify(), !0;
|
|
4448
4462
|
}
|
|
4449
|
-
},
|
|
4463
|
+
}, yn = class {
|
|
4450
4464
|
constructor({ clientService: e, configService: t, state: n, notify: r }) {
|
|
4451
4465
|
this.clientService = e, this.configService = t, this.state = n, this.notify = r;
|
|
4452
4466
|
}
|
|
@@ -4467,7 +4481,7 @@ export default defineViewField({
|
|
|
4467
4481
|
}
|
|
4468
4482
|
this.notify();
|
|
4469
4483
|
}
|
|
4470
|
-
},
|
|
4484
|
+
}, bn = class {
|
|
4471
4485
|
constructor({ apiService: e, configService: t, state: n, notify: r }) {
|
|
4472
4486
|
this.apiService = e, this.configService = t, this.state = n, this.notify = r;
|
|
4473
4487
|
}
|
|
@@ -4495,7 +4509,7 @@ export default defineViewField({
|
|
|
4495
4509
|
}
|
|
4496
4510
|
this.notify();
|
|
4497
4511
|
}
|
|
4498
|
-
},
|
|
4512
|
+
}, xn = class {
|
|
4499
4513
|
constructor(e) {
|
|
4500
4514
|
this.watcher = null, this.appPath = e.appPath, this.fileFolder = e.fileFolder, this.watchPaths = e.watchPaths, this.handleFileBuilt = e.handleFileBuilt;
|
|
4501
4515
|
}
|
|
@@ -4529,7 +4543,7 @@ export default defineViewField({
|
|
|
4529
4543
|
let t = rt(p, it(this.appPath, e));
|
|
4530
4544
|
await Ze(rt(this.appPath, t));
|
|
4531
4545
|
}
|
|
4532
|
-
},
|
|
4546
|
+
}, Sn = ["package.json", "yarn.lock"], Cn = class {
|
|
4533
4547
|
constructor(e) {
|
|
4534
4548
|
this.componentsWatcher = null, this.sharedDependenciesBuildContext = null, this.lastSharedDependenciesChecksum = null, this.installedDependenciesWatcher = null, this.isClosed = !1, this.isApplyingRestart = !1, this.sharedDependenciesBuildGeneration = 0, this.inFlightSharedDependenciesBuildPromise = null, this.hasSharedDependenciesBuildRequestedDuringInFlightBuild = !1, this.appPath = e.appPath, this.sourcePaths = e.sourcePaths, this.sharedDependencies = e.sharedDependencies, this.watchMode = e.watch ?? !0, this.shouldSkipTypecheck = e.shouldSkipTypecheck, this.handleFileBuilt = e.handleFileBuilt, this.handleBuildError = e.handleBuildError;
|
|
4535
4549
|
}
|
|
@@ -4608,7 +4622,7 @@ export default defineViewField({
|
|
|
4608
4622
|
}
|
|
4609
4623
|
}
|
|
4610
4624
|
async startInstalledDependenciesWatcher() {
|
|
4611
|
-
let e = (await Promise.all(
|
|
4625
|
+
let e = (await Promise.all(Sn.map(async (e) => {
|
|
4612
4626
|
let t = rt(this.appPath, e);
|
|
4613
4627
|
return await $e(t) ? t : null;
|
|
4614
4628
|
}))).filter(v);
|
|
@@ -4622,7 +4636,7 @@ export default defineViewField({
|
|
|
4622
4636
|
(e === "add" || e === "change") && this.requestSharedDependenciesBuild();
|
|
4623
4637
|
}));
|
|
4624
4638
|
}
|
|
4625
|
-
},
|
|
4639
|
+
}, wn = class {
|
|
4626
4640
|
constructor(e) {
|
|
4627
4641
|
this.process = null, this.pendingErrors = [], this.buffer = "", this.hasErrors = !1, this.appPath = e.appPath, this.onErrors = e.onErrors;
|
|
4628
4642
|
}
|
|
@@ -4674,11 +4688,11 @@ export default defineViewField({
|
|
|
4674
4688
|
let t = ze(e);
|
|
4675
4689
|
t && this.pendingErrors.push(t);
|
|
4676
4690
|
}
|
|
4677
|
-
},
|
|
4691
|
+
}, Tn = new Set([
|
|
4678
4692
|
"node_modules",
|
|
4679
4693
|
"dist",
|
|
4680
4694
|
".twenty"
|
|
4681
|
-
]),
|
|
4695
|
+
]), En = class {
|
|
4682
4696
|
constructor(e) {
|
|
4683
4697
|
this.watcher = null, this.appPath = e.appPath, this.handleChangeDetected = e.handleChangeDetected, this.verbose = e.verbose ?? !1;
|
|
4684
4698
|
}
|
|
@@ -4690,7 +4704,7 @@ export default defineViewField({
|
|
|
4690
4704
|
let n = it(e, t);
|
|
4691
4705
|
if (n === "") return !1;
|
|
4692
4706
|
let r = n.split(tt.sep)[0];
|
|
4693
|
-
return
|
|
4707
|
+
return Tn.has(r) || r.startsWith(".");
|
|
4694
4708
|
},
|
|
4695
4709
|
awaitWriteFinish: {
|
|
4696
4710
|
stabilityThreshold: 100,
|
|
@@ -4705,12 +4719,12 @@ export default defineViewField({
|
|
|
4705
4719
|
async close() {
|
|
4706
4720
|
await this.watcher?.close();
|
|
4707
4721
|
}
|
|
4708
|
-
},
|
|
4722
|
+
}, Dn = class {
|
|
4709
4723
|
constructor(e) {
|
|
4710
4724
|
this.manifestWatcher = null, this.logicFunctionsWatcher = null, this.frontComponentsWatcher = null, this.assetWatcher = null, this.dependencyWatcher = null, this.tscWatcher = null, this.state = e.state, this.scheduleSync = e.scheduleSync, this.notify = e.notify, this.onFileBuilt = e.onFileBuilt, this.shouldSkipTypecheck = e.shouldSkipTypecheck, this.verbose = e.verbose ?? !1;
|
|
4711
4725
|
}
|
|
4712
4726
|
async start() {
|
|
4713
|
-
this.state.steps.startWatchers.status = "in_progress", this.notify(), this.manifestWatcher = new
|
|
4727
|
+
this.state.steps.startWatchers.status = "in_progress", this.notify(), this.manifestWatcher = new En({
|
|
4714
4728
|
appPath: this.state.appPath,
|
|
4715
4729
|
handleChangeDetected: this.handleChangeDetected.bind(this),
|
|
4716
4730
|
verbose: this.verbose
|
|
@@ -4782,7 +4796,7 @@ export default defineViewField({
|
|
|
4782
4796
|
}), await this.logicFunctionsWatcher.start();
|
|
4783
4797
|
}
|
|
4784
4798
|
async startFrontComponentsWatcher(e, t) {
|
|
4785
|
-
this.frontComponentsWatcher = new
|
|
4799
|
+
this.frontComponentsWatcher = new Cn({
|
|
4786
4800
|
appPath: this.state.appPath,
|
|
4787
4801
|
sourcePaths: e,
|
|
4788
4802
|
sharedDependencies: t,
|
|
@@ -4792,7 +4806,7 @@ export default defineViewField({
|
|
|
4792
4806
|
}), await this.frontComponentsWatcher.start();
|
|
4793
4807
|
}
|
|
4794
4808
|
async startAssetWatcher() {
|
|
4795
|
-
this.assetWatcher = new
|
|
4809
|
+
this.assetWatcher = new xn({
|
|
4796
4810
|
appPath: this.state.appPath,
|
|
4797
4811
|
fileFolder: o.PublicAsset,
|
|
4798
4812
|
watchPaths: [g],
|
|
@@ -4800,7 +4814,7 @@ export default defineViewField({
|
|
|
4800
4814
|
}), await this.assetWatcher.start();
|
|
4801
4815
|
}
|
|
4802
4816
|
async startDependencyWatcher() {
|
|
4803
|
-
this.dependencyWatcher = new
|
|
4817
|
+
this.dependencyWatcher = new xn({
|
|
4804
4818
|
appPath: this.state.appPath,
|
|
4805
4819
|
fileFolder: o.Dependencies,
|
|
4806
4820
|
watchPaths: ["package.json", "yarn.lock"],
|
|
@@ -4808,7 +4822,7 @@ export default defineViewField({
|
|
|
4808
4822
|
}), this.dependencyWatcher.start();
|
|
4809
4823
|
}
|
|
4810
4824
|
async startTscWatcher() {
|
|
4811
|
-
this.tscWatcher = new
|
|
4825
|
+
this.tscWatcher = new wn({
|
|
4812
4826
|
appPath: this.state.appPath,
|
|
4813
4827
|
onErrors: this.handleTypecheckErrors.bind(this)
|
|
4814
4828
|
}), await this.tscWatcher.start();
|
|
@@ -4822,19 +4836,19 @@ export default defineViewField({
|
|
|
4822
4836
|
status: "error"
|
|
4823
4837
|
}))), this.notify();
|
|
4824
4838
|
}
|
|
4825
|
-
},
|
|
4839
|
+
}, On = 50, kn = {
|
|
4826
4840
|
create: "created",
|
|
4827
4841
|
update: "updated",
|
|
4828
4842
|
delete: "deleted"
|
|
4829
|
-
},
|
|
4843
|
+
}, An = (e) => {
|
|
4830
4844
|
if (e.type === "create") return We(e.flatEntity) ?? "unknown";
|
|
4831
4845
|
let t = We(e.flatEntity);
|
|
4832
4846
|
return t && t !== e.universalIdentifier ? `${t} (${e.universalIdentifier})` : e.universalIdentifier;
|
|
4833
|
-
},
|
|
4847
|
+
}, jn = (e) => {
|
|
4834
4848
|
if (e.type !== "update" || !v(e.diff)) return "";
|
|
4835
4849
|
let t = Object.keys(e.diff);
|
|
4836
4850
|
return t.length === 0 ? "" : ` [${t.join(", ")}] changed`;
|
|
4837
|
-
},
|
|
4851
|
+
}, H = (e) => {
|
|
4838
4852
|
let t = e ?? [];
|
|
4839
4853
|
if (t.length === 0) return [{
|
|
4840
4854
|
message: "No metadata changes",
|
|
@@ -4853,11 +4867,11 @@ export default defineViewField({
|
|
|
4853
4867
|
n.delete > 0 ? `${n.delete} deleted` : null
|
|
4854
4868
|
].filter(v).join(", ")}`,
|
|
4855
4869
|
status: "info"
|
|
4856
|
-
}], i = t.slice(0,
|
|
4870
|
+
}], i = t.slice(0, On);
|
|
4857
4871
|
for (let e of i) {
|
|
4858
|
-
let t =
|
|
4872
|
+
let t = An(e), n = jn(e);
|
|
4859
4873
|
r.push({
|
|
4860
|
-
message: ` ${
|
|
4874
|
+
message: ` ${kn[e.type]} ${e.metadataName} ${t}${n}`,
|
|
4861
4875
|
status: "info"
|
|
4862
4876
|
});
|
|
4863
4877
|
}
|
|
@@ -4866,7 +4880,7 @@ export default defineViewField({
|
|
|
4866
4880
|
message: ` …and ${a} more change(s)`,
|
|
4867
4881
|
status: "info"
|
|
4868
4882
|
}), r;
|
|
4869
|
-
},
|
|
4883
|
+
}, Mn = class {
|
|
4870
4884
|
constructor({ apiService: e, state: t, notify: n, verbose: r, force: i, interactive: a, onExit: o }) {
|
|
4871
4885
|
this.apiService = e, this.state = t, this.notify = n, this.verbose = r ?? !1, this.force = i ?? !1, this.interactive = a ?? !1, this.onExit = o;
|
|
4872
4886
|
}
|
|
@@ -4904,7 +4918,7 @@ export default defineViewField({
|
|
|
4904
4918
|
});
|
|
4905
4919
|
let i = await this.apiService.syncApplication(r);
|
|
4906
4920
|
if (i.success) {
|
|
4907
|
-
n.push(...
|
|
4921
|
+
n.push(...H(i.data.actions)), n.push({
|
|
4908
4922
|
message: "✓ Synced",
|
|
4909
4923
|
status: "success"
|
|
4910
4924
|
}), t.output = {
|
|
@@ -4959,7 +4973,7 @@ export default defineViewField({
|
|
|
4959
4973
|
error: a
|
|
4960
4974
|
}), this.state.updateAllEntitiesStatus("error"), this.state.applyStepEvents(t);
|
|
4961
4975
|
}
|
|
4962
|
-
},
|
|
4976
|
+
}, Nn = class {
|
|
4963
4977
|
constructor({ state: e, notify: t, verbose: n }) {
|
|
4964
4978
|
this.uploadedCount = 0, this.failedCount = 0, this.totalQueued = 0, this.state = e, this.notify = t, this.verbose = n ?? !1;
|
|
4965
4979
|
}
|
|
@@ -5028,7 +5042,7 @@ export default defineViewField({
|
|
|
5028
5042
|
uploadPendingFiles() {
|
|
5029
5043
|
for (let [e, { fileFolder: t, sourcePath: n }] of this.state.steps.uploadFiles.output.builtFileInfos.entries()) this.uploadFile(e, n, t);
|
|
5030
5044
|
}
|
|
5031
|
-
},
|
|
5045
|
+
}, Pn = class {
|
|
5032
5046
|
constructor(e) {
|
|
5033
5047
|
this.syncTimer = null, this.serverCheckInterval = null, this.syncRequestedWhileRunning = !1, this.isClosed = !1, this.skipTypecheck = !0, this.debounceMs = e.debounceMs ?? 1e3, this.state = e.state, this.verbose = e.verbose ?? !1, this.apiService = new et({ disableInterceptors: !0 });
|
|
5034
5048
|
let t = this.apiService, n = new se();
|
|
@@ -5037,28 +5051,28 @@ export default defineViewField({
|
|
|
5037
5051
|
state: this.state,
|
|
5038
5052
|
notify: () => this.state.notify()
|
|
5039
5053
|
};
|
|
5040
|
-
this.checkServerStep = new
|
|
5054
|
+
this.checkServerStep = new vn({
|
|
5041
5055
|
...r,
|
|
5042
5056
|
apiService: t
|
|
5043
|
-
}), this.buildManifestStep = new
|
|
5057
|
+
}), this.buildManifestStep = new _n(r), this.registerAppStep = new bn({
|
|
5044
5058
|
...r,
|
|
5045
5059
|
apiService: t,
|
|
5046
5060
|
configService: n
|
|
5047
|
-
}), this.uploadFilesStep = new
|
|
5061
|
+
}), this.uploadFilesStep = new Nn({
|
|
5048
5062
|
...r,
|
|
5049
5063
|
verbose: this.verbose
|
|
5050
|
-
}), this.generateApiClientStep = new
|
|
5064
|
+
}), this.generateApiClientStep = new yn({
|
|
5051
5065
|
...r,
|
|
5052
5066
|
clientService: this.clientService,
|
|
5053
5067
|
configService: n
|
|
5054
|
-
}), this.syncApplicationStep = new
|
|
5068
|
+
}), this.syncApplicationStep = new Mn({
|
|
5055
5069
|
...r,
|
|
5056
5070
|
apiService: t,
|
|
5057
5071
|
verbose: this.verbose,
|
|
5058
5072
|
force: e.force ?? !1,
|
|
5059
5073
|
interactive: e.interactive ?? !1,
|
|
5060
5074
|
onExit: e.onExit
|
|
5061
|
-
}), this.startWatchersStep = new
|
|
5075
|
+
}), this.startWatchersStep = new Dn({
|
|
5062
5076
|
...r,
|
|
5063
5077
|
scheduleSync: this.scheduleSync.bind(this),
|
|
5064
5078
|
onFileBuilt: this.handleFileBuilt.bind(this),
|
|
@@ -5162,7 +5176,7 @@ export default defineViewField({
|
|
|
5162
5176
|
universalIdentifier: e.application.universalIdentifier
|
|
5163
5177
|
}), !0);
|
|
5164
5178
|
}
|
|
5165
|
-
},
|
|
5179
|
+
}, Fn = {
|
|
5166
5180
|
objects: f.Object,
|
|
5167
5181
|
fields: f.Field,
|
|
5168
5182
|
logicFunctions: f.LogicFunction,
|
|
@@ -5175,8 +5189,9 @@ export default defineViewField({
|
|
|
5175
5189
|
navigationMenuItems: f.NavigationMenuItem,
|
|
5176
5190
|
pageLayouts: f.PageLayout,
|
|
5177
5191
|
pageLayoutTabs: f.PageLayoutTab,
|
|
5178
|
-
commandMenuItems: f.CommandMenuItem
|
|
5179
|
-
|
|
5192
|
+
commandMenuItems: f.CommandMenuItem,
|
|
5193
|
+
timelineActivityTypes: f.TimelineActivityType
|
|
5194
|
+
}, In = 200, Ln = {
|
|
5180
5195
|
pending: [
|
|
5181
5196
|
"building",
|
|
5182
5197
|
"uploading",
|
|
@@ -5206,7 +5221,7 @@ export default defineViewField({
|
|
|
5206
5221
|
"uploading",
|
|
5207
5222
|
"success"
|
|
5208
5223
|
]
|
|
5209
|
-
},
|
|
5224
|
+
}, Rn = class {
|
|
5210
5225
|
constructor(e) {
|
|
5211
5226
|
this.confirmationResolver = null, this.eventIdCounter = 0, this.appPath = e.appPath, this.previousObjectsFieldsFingerprint = null, this.pendingConfirmation = null, this.steps = {
|
|
5212
5227
|
checkServer: {
|
|
@@ -5286,14 +5301,14 @@ export default defineViewField({
|
|
|
5286
5301
|
timestamp: /* @__PURE__ */ new Date(),
|
|
5287
5302
|
message: e.message.slice(0, 5e3)
|
|
5288
5303
|
}));
|
|
5289
|
-
this.events = [...this.events.slice(-(
|
|
5304
|
+
this.events = [...this.events.slice(-(In - t.length)), ...t];
|
|
5290
5305
|
}
|
|
5291
5306
|
addEvent(e) {
|
|
5292
5307
|
this.applyStepEvents([e]);
|
|
5293
5308
|
}
|
|
5294
5309
|
updateEntityStatus(e, t) {
|
|
5295
5310
|
let n = new Map(this.entities), r = n.get(e);
|
|
5296
|
-
r?.status && !
|
|
5311
|
+
r?.status && !Ln[r.status].includes(t) || (n.set(e, r ? {
|
|
5297
5312
|
...r,
|
|
5298
5313
|
status: t
|
|
5299
5314
|
} : {
|
|
@@ -5317,7 +5332,7 @@ export default defineViewField({
|
|
|
5317
5332
|
updateEntitiesFromManifest(e) {
|
|
5318
5333
|
let t = /* @__PURE__ */ new Map();
|
|
5319
5334
|
for (let [n, r] of Object.entries(e)) {
|
|
5320
|
-
let e =
|
|
5335
|
+
let e = Fn[n];
|
|
5321
5336
|
if (e) for (let n of r) t.set(n, e);
|
|
5322
5337
|
}
|
|
5323
5338
|
let n = new Map(this.entities);
|
|
@@ -5340,7 +5355,7 @@ export default defineViewField({
|
|
|
5340
5355
|
}), n = t !== this.previousObjectsFieldsFingerprint;
|
|
5341
5356
|
return this.previousObjectsFieldsFingerprint = t, n;
|
|
5342
5357
|
}
|
|
5343
|
-
},
|
|
5358
|
+
}, zn = {
|
|
5344
5359
|
idle: {
|
|
5345
5360
|
color: "gray",
|
|
5346
5361
|
icon: "○"
|
|
@@ -5361,40 +5376,40 @@ export default defineViewField({
|
|
|
5361
5376
|
color: "red",
|
|
5362
5377
|
icon: "✗"
|
|
5363
5378
|
}
|
|
5364
|
-
},
|
|
5379
|
+
}, Bn = (e) => ({
|
|
5365
5380
|
idle: "idle",
|
|
5366
5381
|
in_progress: "in_progress",
|
|
5367
5382
|
done: "done",
|
|
5368
5383
|
error: "error"
|
|
5369
|
-
})[e],
|
|
5384
|
+
})[e], Vn = (e) => ({
|
|
5370
5385
|
pending: "idle",
|
|
5371
5386
|
building: "in_progress",
|
|
5372
5387
|
uploading: "uploading",
|
|
5373
5388
|
success: "done",
|
|
5374
5389
|
error: "error"
|
|
5375
|
-
})[e],
|
|
5390
|
+
})[e], Hn = (e) => ({
|
|
5376
5391
|
idle: "idle",
|
|
5377
5392
|
building: "in_progress",
|
|
5378
5393
|
syncing: "in_progress",
|
|
5379
5394
|
synced: "done",
|
|
5380
5395
|
error: "error"
|
|
5381
|
-
})[e],
|
|
5396
|
+
})[e], Un = {
|
|
5382
5397
|
idle: "Idle",
|
|
5383
5398
|
building: "Building...",
|
|
5384
5399
|
syncing: "Syncing...",
|
|
5385
5400
|
synced: "Synced",
|
|
5386
5401
|
error: "Error"
|
|
5387
|
-
},
|
|
5402
|
+
}, Wn = [
|
|
5388
5403
|
"◐",
|
|
5389
5404
|
"◓",
|
|
5390
5405
|
"◑",
|
|
5391
5406
|
"◒"
|
|
5392
|
-
],
|
|
5407
|
+
], Gn = [
|
|
5393
5408
|
"↑",
|
|
5394
5409
|
"⇡",
|
|
5395
5410
|
"↑",
|
|
5396
5411
|
"⇡"
|
|
5397
|
-
],
|
|
5412
|
+
], Kn = {
|
|
5398
5413
|
[f.Object]: "Objects",
|
|
5399
5414
|
[f.Field]: "Fields",
|
|
5400
5415
|
[f.LogicFunction]: "Logic functions",
|
|
@@ -5408,31 +5423,32 @@ export default defineViewField({
|
|
|
5408
5423
|
[f.PageLayout]: "Page layouts",
|
|
5409
5424
|
[f.PageLayoutTab]: "Page layout tabs",
|
|
5410
5425
|
[f.Agent]: "Agents",
|
|
5411
|
-
[f.ConnectionProvider]: "Connection providers"
|
|
5412
|
-
|
|
5426
|
+
[f.ConnectionProvider]: "Connection providers",
|
|
5427
|
+
[f.TimelineActivityType]: "Timeline activity types"
|
|
5428
|
+
}, qn = Object.keys(Kn), Jn = {
|
|
5413
5429
|
info: "gray",
|
|
5414
5430
|
success: "green",
|
|
5415
5431
|
error: "red",
|
|
5416
5432
|
warning: "yellow"
|
|
5417
|
-
},
|
|
5433
|
+
}, Yn = (e) => e.toLocaleTimeString("en-US", {
|
|
5418
5434
|
hour12: !1,
|
|
5419
5435
|
hour: "2-digit",
|
|
5420
5436
|
minute: "2-digit",
|
|
5421
5437
|
second: "2-digit"
|
|
5422
|
-
}),
|
|
5438
|
+
}), Xn = (e, t = 40) => {
|
|
5423
5439
|
if (e.length <= t) return e;
|
|
5424
5440
|
let n = e.split("/");
|
|
5425
5441
|
return n.length <= 2 ? e : `.../${n.slice(-2).join("/")}`;
|
|
5426
|
-
},
|
|
5442
|
+
}, Zn = (e) => {
|
|
5427
5443
|
let t = /* @__PURE__ */ new Map();
|
|
5428
|
-
for (let e of
|
|
5444
|
+
for (let e of qn) t.set(e, []);
|
|
5429
5445
|
for (let n of e.values()) {
|
|
5430
5446
|
if (!n.type) continue;
|
|
5431
5447
|
let e = t.get(n.type) ?? [];
|
|
5432
5448
|
e.push(n), t.set(n.type, e);
|
|
5433
5449
|
}
|
|
5434
5450
|
return t;
|
|
5435
|
-
},
|
|
5451
|
+
}, Qn = [
|
|
5436
5452
|
{
|
|
5437
5453
|
status: "success",
|
|
5438
5454
|
label: "synced"
|
|
@@ -5453,7 +5469,7 @@ export default defineViewField({
|
|
|
5453
5469
|
status: "error",
|
|
5454
5470
|
label: "error"
|
|
5455
5471
|
}
|
|
5456
|
-
],
|
|
5472
|
+
], $n = (e) => {
|
|
5457
5473
|
let t = {
|
|
5458
5474
|
pending: 0,
|
|
5459
5475
|
building: 0,
|
|
@@ -5462,20 +5478,20 @@ export default defineViewField({
|
|
|
5462
5478
|
error: 0
|
|
5463
5479
|
};
|
|
5464
5480
|
for (let n of e) t[n.status] += 1;
|
|
5465
|
-
return
|
|
5481
|
+
return Qn.filter(({ status: e }) => t[e] > 0).map(({ status: e, label: n }) => ({
|
|
5466
5482
|
status: e,
|
|
5467
5483
|
count: t[e],
|
|
5468
5484
|
label: n
|
|
5469
5485
|
}));
|
|
5470
|
-
},
|
|
5486
|
+
}, er = (e) => {
|
|
5471
5487
|
let t = e.steps.resolveApplication.output.applicationId;
|
|
5472
5488
|
return !v(e.frontendUrl) || !v(t) ? null : `${e.frontendUrl}/settings/applications/${t}`;
|
|
5473
|
-
},
|
|
5489
|
+
}, tr = (e) => e.some((e) => e === "error") ? "error" : e.some((e) => e === "in_progress") ? "in_progress" : e.every((e) => e === "done") ? "done" : "idle", nr = (e) => {
|
|
5474
5490
|
let t = [...e.entities.values()], n = t.some((e) => e.status === "error"), r = t.some((e) => e.status === "building"), i = t.length > 0 && t.every((e) => e.status === "uploading" || e.status === "success"), a = n ? "error" : r ? "in_progress" : i ? "done" : "idle";
|
|
5475
5491
|
return [
|
|
5476
5492
|
{
|
|
5477
5493
|
label: "Application Initialization",
|
|
5478
|
-
status:
|
|
5494
|
+
status: tr([
|
|
5479
5495
|
e.steps.checkServer.status,
|
|
5480
5496
|
e.steps.ensureValidTokens.status,
|
|
5481
5497
|
e.steps.resolveApplication.status
|
|
@@ -5502,54 +5518,54 @@ export default defineViewField({
|
|
|
5502
5518
|
status: e.steps.generateApiClient.status
|
|
5503
5519
|
}
|
|
5504
5520
|
];
|
|
5505
|
-
},
|
|
5506
|
-
let e = Math.floor(Date.now() /
|
|
5521
|
+
}, rr = 120, ir = Math.round(200 / rr), ar = () => {
|
|
5522
|
+
let e = Math.floor(Date.now() / rr);
|
|
5507
5523
|
return {
|
|
5508
|
-
spinnerFrame:
|
|
5509
|
-
uploadFrame:
|
|
5524
|
+
spinnerFrame: Wn[e % Wn.length],
|
|
5525
|
+
uploadFrame: Gn[Math.floor(e / ir) % Gn.length]
|
|
5510
5526
|
};
|
|
5511
|
-
},
|
|
5512
|
-
let t =
|
|
5513
|
-
return t.icon === "spinner" ?
|
|
5514
|
-
},
|
|
5515
|
-
let e = ut.useContext(
|
|
5527
|
+
}, or = (e) => {
|
|
5528
|
+
let t = zn[e];
|
|
5529
|
+
return t.icon === "spinner" ? ar().spinnerFrame : t.icon === "upload" ? ar().uploadFrame : t.icon;
|
|
5530
|
+
}, sr = ut.createContext(null), cr = sr.Provider, lr = () => {
|
|
5531
|
+
let e = ut.useContext(sr);
|
|
5516
5532
|
if (!e) throw Error("useInk must be used within InkProvider");
|
|
5517
5533
|
return e;
|
|
5518
|
-
},
|
|
5519
|
-
let { Text: t } =
|
|
5534
|
+
}, ur = ({ uiStatus: e }) => {
|
|
5535
|
+
let { Text: t } = lr(), n = or(e), r = zn[e];
|
|
5520
5536
|
return /* @__PURE__ */ Ct(t, {
|
|
5521
5537
|
color: r.color,
|
|
5522
5538
|
children: [n, " "]
|
|
5523
5539
|
});
|
|
5524
|
-
},
|
|
5525
|
-
let { Box: t, Text: n } =
|
|
5540
|
+
}, dr = ({ entity: e }) => {
|
|
5541
|
+
let { Box: t, Text: n } = lr();
|
|
5526
5542
|
return /* @__PURE__ */ Ct(t, { children: [
|
|
5527
|
-
/* @__PURE__ */ St(
|
|
5543
|
+
/* @__PURE__ */ St(ur, { uiStatus: Vn(e.status) }),
|
|
5528
5544
|
/* @__PURE__ */ St(n, { children: e.name }),
|
|
5529
5545
|
e.path !== e.name && /* @__PURE__ */ Ct(n, {
|
|
5530
5546
|
dimColor: !0,
|
|
5531
5547
|
children: [
|
|
5532
5548
|
" (",
|
|
5533
|
-
|
|
5549
|
+
Xn(e.path),
|
|
5534
5550
|
")"
|
|
5535
5551
|
]
|
|
5536
5552
|
})
|
|
5537
5553
|
] });
|
|
5538
|
-
},
|
|
5539
|
-
let { Box: n, Text: r } =
|
|
5554
|
+
}, fr = ({ type: e, entities: t }) => {
|
|
5555
|
+
let { Box: n, Text: r } = lr();
|
|
5540
5556
|
return t.length === 0 ? null : /* @__PURE__ */ Ct(n, {
|
|
5541
5557
|
flexDirection: "column",
|
|
5542
5558
|
marginTop: 1,
|
|
5543
5559
|
children: [/* @__PURE__ */ St(r, {
|
|
5544
5560
|
bold: !0,
|
|
5545
5561
|
dimColor: !0,
|
|
5546
|
-
children:
|
|
5547
|
-
}), t.map((e) => /* @__PURE__ */ St(
|
|
5562
|
+
children: Kn[e]
|
|
5563
|
+
}), t.map((e) => /* @__PURE__ */ St(dr, { entity: e }, e.path))]
|
|
5548
5564
|
});
|
|
5549
|
-
},
|
|
5550
|
-
let { Box: t, Text: n } =
|
|
5565
|
+
}, pr = ({ entities: e }) => {
|
|
5566
|
+
let { Box: t, Text: n } = lr();
|
|
5551
5567
|
if (e.length === 0) return null;
|
|
5552
|
-
let r =
|
|
5568
|
+
let r = $n(e);
|
|
5553
5569
|
return /* @__PURE__ */ Ct(t, {
|
|
5554
5570
|
marginTop: 1,
|
|
5555
5571
|
children: [/* @__PURE__ */ Ct(n, {
|
|
@@ -5561,7 +5577,7 @@ export default defineViewField({
|
|
|
5561
5577
|
dimColor: !0,
|
|
5562
5578
|
children: " · "
|
|
5563
5579
|
}),
|
|
5564
|
-
/* @__PURE__ */ St(
|
|
5580
|
+
/* @__PURE__ */ St(ur, { uiStatus: Vn(e.status) }),
|
|
5565
5581
|
/* @__PURE__ */ Ct(n, { children: [
|
|
5566
5582
|
e.count,
|
|
5567
5583
|
" ",
|
|
@@ -5569,54 +5585,54 @@ export default defineViewField({
|
|
|
5569
5585
|
] })
|
|
5570
5586
|
] }, e.status))]
|
|
5571
5587
|
});
|
|
5572
|
-
},
|
|
5573
|
-
let { Box: e, Text: t } =
|
|
5588
|
+
}, mr = () => {
|
|
5589
|
+
let { Box: e, Text: t } = lr();
|
|
5574
5590
|
return /* @__PURE__ */ St(e, {
|
|
5575
5591
|
marginTop: 1,
|
|
5576
5592
|
children: /* @__PURE__ */ Ct(t, {
|
|
5577
5593
|
dimColor: !0,
|
|
5578
5594
|
children: [
|
|
5579
5595
|
/* @__PURE__ */ St(t, {
|
|
5580
|
-
color:
|
|
5581
|
-
children:
|
|
5596
|
+
color: zn.idle.color,
|
|
5597
|
+
children: zn.idle.icon
|
|
5582
5598
|
}),
|
|
5583
5599
|
" ",
|
|
5584
5600
|
"pending",
|
|
5585
5601
|
" ",
|
|
5586
5602
|
/* @__PURE__ */ St(t, {
|
|
5587
|
-
color:
|
|
5588
|
-
children:
|
|
5603
|
+
color: zn.in_progress.color,
|
|
5604
|
+
children: Wn[0]
|
|
5589
5605
|
}),
|
|
5590
5606
|
" ",
|
|
5591
5607
|
"building",
|
|
5592
5608
|
" ",
|
|
5593
5609
|
/* @__PURE__ */ St(t, {
|
|
5594
|
-
color:
|
|
5595
|
-
children:
|
|
5610
|
+
color: zn.uploading.color,
|
|
5611
|
+
children: Gn[0]
|
|
5596
5612
|
}),
|
|
5597
5613
|
" ",
|
|
5598
5614
|
"uploading",
|
|
5599
5615
|
" ",
|
|
5600
5616
|
/* @__PURE__ */ St(t, {
|
|
5601
|
-
color:
|
|
5602
|
-
children:
|
|
5617
|
+
color: zn.done.color,
|
|
5618
|
+
children: zn.done.icon
|
|
5603
5619
|
}),
|
|
5604
5620
|
" ",
|
|
5605
5621
|
"success",
|
|
5606
5622
|
" ",
|
|
5607
5623
|
/* @__PURE__ */ St(t, {
|
|
5608
|
-
color:
|
|
5609
|
-
children:
|
|
5624
|
+
color: zn.error.color,
|
|
5625
|
+
children: zn.error.icon
|
|
5610
5626
|
}),
|
|
5611
5627
|
" ",
|
|
5612
5628
|
"error"
|
|
5613
5629
|
]
|
|
5614
5630
|
})
|
|
5615
5631
|
});
|
|
5616
|
-
},
|
|
5617
|
-
let { Box: t, Text: n } =
|
|
5632
|
+
}, hr = 7, gr = ({ versionInfo: e }) => {
|
|
5633
|
+
let { Box: t, Text: n } = lr();
|
|
5618
5634
|
if (e === null) return null;
|
|
5619
|
-
let { cliVersion: r, localServerVersion: i, latestServerVersion: a, isMinorOrMajorBehind: o, daysBehind: s } = e, c = o && s !== null && s >
|
|
5635
|
+
let { cliVersion: r, localServerVersion: i, latestServerVersion: a, isMinorOrMajorBehind: o, daysBehind: s } = e, c = o && s !== null && s > hr;
|
|
5620
5636
|
return /* @__PURE__ */ Ct(t, { children: [
|
|
5621
5637
|
/* @__PURE__ */ St(n, {
|
|
5622
5638
|
dimColor: !0,
|
|
@@ -5653,8 +5669,8 @@ export default defineViewField({
|
|
|
5653
5669
|
})] })
|
|
5654
5670
|
] })
|
|
5655
5671
|
] });
|
|
5656
|
-
},
|
|
5657
|
-
let { Text: t } =
|
|
5672
|
+
}, _r = ({ state: e }) => {
|
|
5673
|
+
let { Text: t } = lr(), n = Hn(e.pipeline.status), r = or(n), i = zn[n], a = Un[e.pipeline.status];
|
|
5658
5674
|
return /* @__PURE__ */ Ct(t, {
|
|
5659
5675
|
color: i.color,
|
|
5660
5676
|
children: [
|
|
@@ -5663,8 +5679,8 @@ export default defineViewField({
|
|
|
5663
5679
|
a
|
|
5664
5680
|
]
|
|
5665
5681
|
});
|
|
5666
|
-
},
|
|
5667
|
-
let { Box: n, Text: r } =
|
|
5682
|
+
}, vr = ({ label: e, status: t }) => {
|
|
5683
|
+
let { Box: n, Text: r } = lr(), i = Bn(t), a = or(i), o = zn[i];
|
|
5668
5684
|
return /* @__PURE__ */ Ct(n, { children: [/* @__PURE__ */ Ct(r, {
|
|
5669
5685
|
dimColor: !0,
|
|
5670
5686
|
children: [e, ": "]
|
|
@@ -5676,8 +5692,8 @@ export default defineViewField({
|
|
|
5676
5692
|
t.replace("_", " ")
|
|
5677
5693
|
]
|
|
5678
5694
|
})] });
|
|
5679
|
-
},
|
|
5680
|
-
let { Box: n, Text: r } =
|
|
5695
|
+
}, yr = ({ state: e, verbose: t = !1 }) => {
|
|
5696
|
+
let { Box: n, Text: r } = lr(), i = Zn(e.entities), a = er(e);
|
|
5681
5697
|
return /* @__PURE__ */ Ct(n, {
|
|
5682
5698
|
flexDirection: "column",
|
|
5683
5699
|
borderStyle: "classic",
|
|
@@ -5703,7 +5719,7 @@ export default defineViewField({
|
|
|
5703
5719
|
/* @__PURE__ */ Ct(n, { children: [/* @__PURE__ */ St(r, {
|
|
5704
5720
|
dimColor: !0,
|
|
5705
5721
|
children: "Overall Status: "
|
|
5706
|
-
}), /* @__PURE__ */ St(
|
|
5722
|
+
}), /* @__PURE__ */ St(_r, { state: e })] }),
|
|
5707
5723
|
a && /* @__PURE__ */ Ct(n, { children: [/* @__PURE__ */ St(r, {
|
|
5708
5724
|
dimColor: !0,
|
|
5709
5725
|
children: "Open:"
|
|
@@ -5712,14 +5728,14 @@ export default defineViewField({
|
|
|
5712
5728
|
color: "cyan",
|
|
5713
5729
|
children: [" ", a]
|
|
5714
5730
|
})] }),
|
|
5715
|
-
/* @__PURE__ */ St(
|
|
5731
|
+
/* @__PURE__ */ St(gr, { versionInfo: e.versionInfo })
|
|
5716
5732
|
]
|
|
5717
5733
|
}),
|
|
5718
5734
|
/* @__PURE__ */ St(n, {
|
|
5719
5735
|
marginLeft: 2,
|
|
5720
5736
|
flexDirection: "column",
|
|
5721
5737
|
marginTop: 1,
|
|
5722
|
-
children:
|
|
5738
|
+
children: nr(e).map((e) => /* @__PURE__ */ St(vr, {
|
|
5723
5739
|
label: e.label,
|
|
5724
5740
|
status: e.status
|
|
5725
5741
|
}, e.label))
|
|
@@ -5727,15 +5743,15 @@ export default defineViewField({
|
|
|
5727
5743
|
/* @__PURE__ */ St(n, {
|
|
5728
5744
|
marginLeft: 2,
|
|
5729
5745
|
flexDirection: "column",
|
|
5730
|
-
children: t ?
|
|
5746
|
+
children: t ? qn.map((e) => /* @__PURE__ */ St(fr, {
|
|
5731
5747
|
type: e,
|
|
5732
5748
|
entities: i.get(e) ?? []
|
|
5733
|
-
}, e)) : /* @__PURE__ */ St(
|
|
5749
|
+
}, e)) : /* @__PURE__ */ St(pr, { entities: Array.from(e.entities.values()) })
|
|
5734
5750
|
})
|
|
5735
5751
|
]
|
|
5736
5752
|
});
|
|
5737
|
-
},
|
|
5738
|
-
let { Box: t, Text: n, useInput: r } =
|
|
5753
|
+
}, br = ({ state: e }) => {
|
|
5754
|
+
let { Box: t, Text: n, useInput: r } = lr(), i = e.pendingConfirmation;
|
|
5739
5755
|
return r((t, n) => {
|
|
5740
5756
|
if (e.pendingConfirmation) {
|
|
5741
5757
|
if (t.toLowerCase() === "y") {
|
|
@@ -5780,8 +5796,8 @@ export default defineViewField({
|
|
|
5780
5796
|
"to cancel and stop watching."
|
|
5781
5797
|
] })]
|
|
5782
5798
|
}) : null;
|
|
5783
|
-
},
|
|
5784
|
-
let { Box: t, Text: n } =
|
|
5799
|
+
}, xr = ({ event: e }) => {
|
|
5800
|
+
let { Box: t, Text: n } = lr(), r = Jn[e.status], i = Yn(e.timestamp);
|
|
5785
5801
|
return /* @__PURE__ */ Ct(t, {
|
|
5786
5802
|
marginTop: +!!e.spacingBefore,
|
|
5787
5803
|
children: [/* @__PURE__ */ Ct(n, {
|
|
@@ -5792,19 +5808,19 @@ export default defineViewField({
|
|
|
5792
5808
|
children: e.message
|
|
5793
5809
|
})]
|
|
5794
5810
|
});
|
|
5795
|
-
},
|
|
5796
|
-
let { Box: n, Static: r } =
|
|
5811
|
+
}, Sr = new Set(["building", "syncing"]), Cr = 120, wr = 80, Tr = ({ uiStateManager: e, verbose: t }) => {
|
|
5812
|
+
let { Box: n, Static: r } = lr(), [, i] = ft((e) => e + 1, 0), a = R(null), o = R(0), s = dt(() => {
|
|
5797
5813
|
a.current && clearTimeout(a.current), a.current = setTimeout(() => {
|
|
5798
5814
|
a.current = null, o.current = Date.now(), i();
|
|
5799
|
-
},
|
|
5815
|
+
}, wr);
|
|
5800
5816
|
}, []);
|
|
5801
5817
|
L(() => e.subscribe(() => {
|
|
5802
5818
|
s();
|
|
5803
5819
|
}), [e, s]), L(() => {
|
|
5804
5820
|
let t = setInterval(() => {
|
|
5805
5821
|
let t = e.getSnapshot();
|
|
5806
|
-
|
|
5807
|
-
},
|
|
5822
|
+
Sr.has(t.pipeline.status) && (Date.now() - o.current < Cr || i());
|
|
5823
|
+
}, Cr);
|
|
5808
5824
|
return () => clearInterval(t);
|
|
5809
5825
|
}, [e]), L(() => () => {
|
|
5810
5826
|
a.current && clearTimeout(a.current);
|
|
@@ -5813,33 +5829,33 @@ export default defineViewField({
|
|
|
5813
5829
|
return /* @__PURE__ */ Ct(xt, { children: [
|
|
5814
5830
|
/* @__PURE__ */ St(r, {
|
|
5815
5831
|
items: c.events,
|
|
5816
|
-
children: (e) => /* @__PURE__ */ St(
|
|
5832
|
+
children: (e) => /* @__PURE__ */ St(xr, { event: e }, e.id)
|
|
5817
5833
|
}),
|
|
5818
5834
|
/* @__PURE__ */ Ct(n, {
|
|
5819
5835
|
marginTop: 1,
|
|
5820
5836
|
flexDirection: "column",
|
|
5821
|
-
children: [/* @__PURE__ */ St(
|
|
5837
|
+
children: [/* @__PURE__ */ St(yr, {
|
|
5822
5838
|
state: c,
|
|
5823
5839
|
verbose: t
|
|
5824
|
-
}), t && /* @__PURE__ */ St(
|
|
5840
|
+
}), t && /* @__PURE__ */ St(mr, {})]
|
|
5825
5841
|
}),
|
|
5826
|
-
c.pendingConfirmation && /* @__PURE__ */ St(
|
|
5842
|
+
c.pendingConfirmation && /* @__PURE__ */ St(br, { state: c })
|
|
5827
5843
|
] });
|
|
5828
|
-
},
|
|
5829
|
-
let { render: n, Box: r, Text: i, Static: a, useInput: o } = await import("ink"), { unmount: s } = n(/* @__PURE__ */ St(
|
|
5844
|
+
}, Er = async (e, t = !1) => {
|
|
5845
|
+
let { render: n, Box: r, Text: i, Static: a, useInput: o } = await import("ink"), { unmount: s } = n(/* @__PURE__ */ St(cr, {
|
|
5830
5846
|
value: {
|
|
5831
5847
|
Box: r,
|
|
5832
5848
|
Text: i,
|
|
5833
5849
|
Static: a,
|
|
5834
5850
|
useInput: o
|
|
5835
5851
|
},
|
|
5836
|
-
children: /* @__PURE__ */ St(
|
|
5852
|
+
children: /* @__PURE__ */ St(Tr, {
|
|
5837
5853
|
uiStateManager: e,
|
|
5838
5854
|
verbose: t
|
|
5839
5855
|
})
|
|
5840
5856
|
}));
|
|
5841
5857
|
return { unmount: s };
|
|
5842
|
-
},
|
|
5858
|
+
}, Dr = class {
|
|
5843
5859
|
constructor(e) {
|
|
5844
5860
|
this.listeners = /* @__PURE__ */ new Set(), this.pendingNotify = !1, this.orchestratorState = e;
|
|
5845
5861
|
}
|
|
@@ -5855,7 +5871,7 @@ export default defineViewField({
|
|
|
5855
5871
|
for (let e of this.listeners) e(this.orchestratorState);
|
|
5856
5872
|
}));
|
|
5857
5873
|
}
|
|
5858
|
-
},
|
|
5874
|
+
}, Or = class {
|
|
5859
5875
|
constructor() {
|
|
5860
5876
|
this.orchestrator = null, this.unmountUI = null;
|
|
5861
5877
|
}
|
|
@@ -5872,14 +5888,14 @@ export default defineViewField({
|
|
|
5872
5888
|
async execute(e) {
|
|
5873
5889
|
let t = e.appPath ?? w;
|
|
5874
5890
|
await At(t), e.headless && await Qe(), await this.ensureAuthenticatedBeforeLaunch();
|
|
5875
|
-
let n = new
|
|
5891
|
+
let n = new Rn({ appPath: t });
|
|
5876
5892
|
if (!e.headless) {
|
|
5877
|
-
let t = new
|
|
5893
|
+
let t = new Dr(n);
|
|
5878
5894
|
n.onChange = () => t.notify();
|
|
5879
|
-
let { unmount: r } = await
|
|
5895
|
+
let { unmount: r } = await Er(t, e.verbose);
|
|
5880
5896
|
this.unmountUI = r, me().then((e) => n.setVersionInfo(e));
|
|
5881
5897
|
}
|
|
5882
|
-
this.orchestrator = new
|
|
5898
|
+
this.orchestrator = new Pn({
|
|
5883
5899
|
state: n,
|
|
5884
5900
|
verbose: e.verbose,
|
|
5885
5901
|
debounceMs: e.debounceMs,
|
|
@@ -5896,7 +5912,7 @@ export default defineViewField({
|
|
|
5896
5912
|
let e = () => void this.close().then(() => process.exit(0));
|
|
5897
5913
|
process.on("SIGINT", e), process.on("SIGTERM", e);
|
|
5898
5914
|
}
|
|
5899
|
-
},
|
|
5915
|
+
}, kr = async (e, { force: t }) => {
|
|
5900
5916
|
if (t) return !0;
|
|
5901
5917
|
if (!process.stdout.isTTY) return console.error(vt.red(`${e} destructive change(s) detected. Run \`yarn twenty plan\` to review them, or re-run with --force to apply non-interactively.`)), !1;
|
|
5902
5918
|
let { confirmed: n } = await yt.prompt([{
|
|
@@ -5906,7 +5922,7 @@ export default defineViewField({
|
|
|
5906
5922
|
default: !1
|
|
5907
5923
|
}]);
|
|
5908
5924
|
return n;
|
|
5909
|
-
},
|
|
5925
|
+
}, Ar = class {
|
|
5910
5926
|
async execute(e) {
|
|
5911
5927
|
let t = e.appPath ?? w, n = e.apply ?? !1;
|
|
5912
5928
|
await At(t);
|
|
@@ -5919,7 +5935,7 @@ export default defineViewField({
|
|
|
5919
5935
|
force: e.force,
|
|
5920
5936
|
onProgress: (e) => console.log(vt.gray(e)),
|
|
5921
5937
|
onPlan: (e) => console.log(`\n${e}\n`),
|
|
5922
|
-
confirmApply: (t) =>
|
|
5938
|
+
confirmApply: (t) => kr(t, { force: e.force })
|
|
5923
5939
|
});
|
|
5924
5940
|
if (i.success || (i.error.code === j.APPLY_ABORTED && (console.log(vt.yellow(i.error.message)), process.exit(1)), console.error(vt.red(i.error.message)), process.exit(1)), !n) {
|
|
5925
5941
|
console.log(vt.green(`\n✓ Plan complete for ${i.data.applicationDisplayName} — no changes were applied`));
|
|
@@ -5927,8 +5943,8 @@ export default defineViewField({
|
|
|
5927
5943
|
}
|
|
5928
5944
|
console.log(vt.green(`\n✓ Synced ${i.data.applicationDisplayName} (${i.data.fileCount} file${i.data.fileCount === 1 ? "" : "s"})`)), console.log(vt.gray(`Output: ${i.data.outputDir}`));
|
|
5929
5945
|
}
|
|
5930
|
-
},
|
|
5931
|
-
let t = new
|
|
5946
|
+
}, jr = (e) => {
|
|
5947
|
+
let t = new fn(), n = new V();
|
|
5932
5948
|
e.command("dev:function:logs [appPath]").description("Stream logic function logs").option("-u, --functionUniversalIdentifier <functionUniversalIdentifier>", "Only show logs for the function with this universal ID").option("-n, --functionName <functionName>", "Only show logs for the function with this name").action(async (e, n) => {
|
|
5933
5949
|
await t.execute({
|
|
5934
5950
|
...n,
|
|
@@ -5941,7 +5957,7 @@ export default defineViewField({
|
|
|
5941
5957
|
appPath: Dt(e)
|
|
5942
5958
|
});
|
|
5943
5959
|
});
|
|
5944
|
-
},
|
|
5960
|
+
}, Mr = class {
|
|
5945
5961
|
async execute(e) {
|
|
5946
5962
|
let t = e.appPath ?? w, n = rt(t, "node_modules", "twenty-client-sdk");
|
|
5947
5963
|
await $e(n) || (console.error(vt.red(`Cannot find twenty-client-sdk in ${t}.\n\n Install it first:
|
|
@@ -5955,7 +5971,7 @@ export default defineViewField({
|
|
|
5955
5971
|
}
|
|
5956
5972
|
console.log(vt.green("✓ API client generated")), console.log(vt.gray(`Output: ${rt(n, "dist", "core", "generated")}`));
|
|
5957
5973
|
}
|
|
5958
|
-
},
|
|
5974
|
+
}, Nr = (e, t) => t !== void 0 && t.length > 0 ? `${t}${e}` : e, Pr = (e) => e.replace(/\s+/g, " ").trim(), U = /* @__PURE__ */ d(((e, t) => {
|
|
5959
5975
|
var n = {};
|
|
5960
5976
|
((e) => {
|
|
5961
5977
|
var t = Object.defineProperty, n = (e, n) => {
|
|
@@ -117360,7 +117376,7 @@ ${t.message}`), t;
|
|
|
117360
117376
|
n = e, t !== void 0 && t.exports && (t.exports = e);
|
|
117361
117377
|
}
|
|
117362
117378
|
});
|
|
117363
|
-
})),
|
|
117379
|
+
})), Fr = /* @__PURE__ */ d(((e, t) => {
|
|
117364
117380
|
t.exports = n;
|
|
117365
117381
|
function n(e, t, n) {
|
|
117366
117382
|
e instanceof RegExp && (e = r(e, n)), t instanceof RegExp && (t = r(t, n));
|
|
@@ -117387,8 +117403,8 @@ ${t.message}`), t;
|
|
|
117387
117403
|
}
|
|
117388
117404
|
return s;
|
|
117389
117405
|
}
|
|
117390
|
-
})),
|
|
117391
|
-
var n =
|
|
117406
|
+
})), Ir = /* @__PURE__ */ d(((e, t) => {
|
|
117407
|
+
var n = Fr();
|
|
117392
117408
|
t.exports = m;
|
|
117393
117409
|
var r = "\0SLASH" + Math.random() + "\0", i = "\0OPEN" + Math.random() + "\0", a = "\0CLOSE" + Math.random() + "\0", o = "\0COMMA" + Math.random() + "\0", s = "\0PERIOD" + Math.random() + "\0", c = 1e5, l = 4e6;
|
|
117394
117410
|
function u(e) {
|
|
@@ -117504,14 +117520,14 @@ ${t.message}`), t;
|
|
|
117504
117520
|
}
|
|
117505
117521
|
return o;
|
|
117506
117522
|
}
|
|
117507
|
-
})),
|
|
117523
|
+
})), Lr = /* @__PURE__ */ d(((e) => {
|
|
117508
117524
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.assertValidPattern = void 0;
|
|
117509
117525
|
var t = 1024 * 64;
|
|
117510
117526
|
e.assertValidPattern = (e) => {
|
|
117511
117527
|
if (typeof e != "string") throw TypeError("invalid pattern");
|
|
117512
117528
|
if (e.length > t) throw TypeError("pattern is too long");
|
|
117513
117529
|
};
|
|
117514
|
-
})),
|
|
117530
|
+
})), Rr = /* @__PURE__ */ d(((e) => {
|
|
117515
117531
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.parseClass = void 0;
|
|
117516
117532
|
var t = {
|
|
117517
117533
|
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
|
|
@@ -117605,12 +117621,12 @@ ${t.message}`), t;
|
|
|
117605
117621
|
!0
|
|
117606
117622
|
];
|
|
117607
117623
|
};
|
|
117608
|
-
})), Rr = /* @__PURE__ */ d(((e) => {
|
|
117609
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.unescape = void 0, e.unescape = (e, { windowsPathsNoEscape: t = !1 } = {}) => t ? e.replace(/\[([^\/\\])\]/g, "$1") : e.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
117610
117624
|
})), zr = /* @__PURE__ */ d(((e) => {
|
|
117625
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.unescape = void 0, e.unescape = (e, { windowsPathsNoEscape: t = !1 } = {}) => t ? e.replace(/\[([^\/\\])\]/g, "$1") : e.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
117626
|
+
})), Br = /* @__PURE__ */ d(((e) => {
|
|
117611
117627
|
var t;
|
|
117612
117628
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.AST = void 0;
|
|
117613
|
-
var n =
|
|
117629
|
+
var n = Rr(), r = zr(), i = new Set([
|
|
117614
117630
|
"!",
|
|
117615
117631
|
"?",
|
|
117616
117632
|
"+",
|
|
@@ -117965,14 +117981,14 @@ ${t.message}`), t;
|
|
|
117965
117981
|
}
|
|
117966
117982
|
};
|
|
117967
117983
|
e.AST = b, t = b;
|
|
117968
|
-
})), Br = /* @__PURE__ */ d(((e) => {
|
|
117969
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.escape = void 0, e.escape = (e, { windowsPathsNoEscape: t = !1 } = {}) => t ? e.replace(/[?*()[\]]/g, "[$&]") : e.replace(/[?*()[\]\\]/g, "\\$&");
|
|
117970
117984
|
})), Vr = /* @__PURE__ */ d(((e) => {
|
|
117985
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.escape = void 0, e.escape = (e, { windowsPathsNoEscape: t = !1 } = {}) => t ? e.replace(/[?*()[\]]/g, "[$&]") : e.replace(/[?*()[\]\\]/g, "\\$&");
|
|
117986
|
+
})), Hr = /* @__PURE__ */ d(((e) => {
|
|
117971
117987
|
var t = e && e.__importDefault || function(e) {
|
|
117972
117988
|
return e && e.__esModule ? e : { default: e };
|
|
117973
117989
|
};
|
|
117974
117990
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.unescape = e.escape = e.AST = e.Minimatch = e.match = e.makeRe = e.braceExpand = e.defaults = e.filter = e.GLOBSTAR = e.sep = e.minimatch = void 0;
|
|
117975
|
-
var n = t(
|
|
117991
|
+
var n = t(Ir()), r = Lr(), i = Br(), a = Vr(), o = zr();
|
|
117976
117992
|
e.minimatch = (e, t, n = {}) => ((0, r.assertValidPattern)(t), !n.nocomment && t.charAt(0) === "#" ? !1 : new ne(t, n).match(e));
|
|
117977
117993
|
var s = /^\*+([^+@!?\*\[\(]*)$/, c = (e) => (t) => !t.startsWith(".") && t.endsWith(e), l = (e) => (t) => t.endsWith(e), u = (e) => (e = e.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(e)), d = (e) => (e = e.toLowerCase(), (t) => t.toLowerCase().endsWith(e)), f = /^\*+\.\*+$/, p = (e) => !e.startsWith(".") && e.includes("."), m = (e) => e !== "." && e !== ".." && e.includes("."), h = /^\.\*+$/, g = (e) => e !== "." && e !== ".." && e.startsWith("."), _ = /^\*+$/, v = (e) => e.length !== 0 && !e.startsWith("."), y = (e) => e.length !== 0 && e !== "." && e !== "..", b = /^\?+([^+@!?\*\[\(]*)?$/, x = ([e, t = ""]) => {
|
|
117978
117994
|
let n = T([e]);
|
|
@@ -118351,28 +118367,28 @@ ${t.message}`), t;
|
|
|
118351
118367
|
};
|
|
118352
118368
|
e.Minimatch = ne;
|
|
118353
118369
|
/* c8 ignore start */
|
|
118354
|
-
var N =
|
|
118370
|
+
var N = Br();
|
|
118355
118371
|
Object.defineProperty(e, "AST", {
|
|
118356
118372
|
enumerable: !0,
|
|
118357
118373
|
get: function() {
|
|
118358
118374
|
return N.AST;
|
|
118359
118375
|
}
|
|
118360
118376
|
});
|
|
118361
|
-
var P =
|
|
118377
|
+
var P = Vr();
|
|
118362
118378
|
Object.defineProperty(e, "escape", {
|
|
118363
118379
|
enumerable: !0,
|
|
118364
118380
|
get: function() {
|
|
118365
118381
|
return P.escape;
|
|
118366
118382
|
}
|
|
118367
118383
|
});
|
|
118368
|
-
var F =
|
|
118384
|
+
var F = zr();
|
|
118369
118385
|
Object.defineProperty(e, "unescape", {
|
|
118370
118386
|
enumerable: !0,
|
|
118371
118387
|
get: function() {
|
|
118372
118388
|
return F.unescape;
|
|
118373
118389
|
}
|
|
118374
118390
|
}), e.minimatch.AST = i.AST, e.minimatch.Minimatch = ne, e.minimatch.escape = a.escape, e.minimatch.unescape = o.unescape;
|
|
118375
|
-
})),
|
|
118391
|
+
})), Ur = /* @__PURE__ */ d(((e, t) => {
|
|
118376
118392
|
function n(e) {
|
|
118377
118393
|
if (typeof e != "string") throw TypeError("Path must be a string. Received " + JSON.stringify(e));
|
|
118378
118394
|
}
|
|
@@ -118539,8 +118555,8 @@ ${t.message}`), t;
|
|
|
118539
118555
|
posix: null
|
|
118540
118556
|
};
|
|
118541
118557
|
a.posix = a, t.exports = a;
|
|
118542
|
-
})),
|
|
118543
|
-
var t =
|
|
118558
|
+
})), Wr = /* @__PURE__ */ d(((e) => {
|
|
118559
|
+
var t = U(), n = Hr(), r = oe(), i = s("fs"), a = s("fs/promises"), o = s("os"), c = s("path");
|
|
118544
118560
|
function l(e) {
|
|
118545
118561
|
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
118546
118562
|
}
|
|
@@ -119537,7 +119553,7 @@ ${t.message}`), t;
|
|
|
119537
119553
|
}
|
|
119538
119554
|
return pe;
|
|
119539
119555
|
}
|
|
119540
|
-
var he =
|
|
119556
|
+
var he = Ur(), ge = class {
|
|
119541
119557
|
fs = new ve();
|
|
119542
119558
|
path = new _e();
|
|
119543
119559
|
getEnvVar(e) {}
|
|
@@ -121050,7 +121066,7 @@ ${t.message}`), t;
|
|
|
121050
121066
|
return t.TypeFormatFlags;
|
|
121051
121067
|
}
|
|
121052
121068
|
}), e.ts = d, e.ArrayUtils = C, e.ComparerToStoredComparer = y, e.CompilerOptionsContainer = tt, e.DocumentRegistry = Je, e.EventContainer = T, e.FileUtils = Oe, e.InMemoryFileSystemHost = ze, e.IterableUtils = E, e.KeyValueCache = v, e.LocaleStringComparer = b, e.Memoize = Xe, e.ObjectUtils = O, e.PropertyComparer = x, e.PropertyStoredComparer = S, e.RealFileSystemHost = He, e.ResolutionHosts = Ye, e.SettingsContainer = et, e.SortedKeyValueArray = ae, e.StringUtils = ie, e.TransactionalFileSystem = Ge, e.TsConfigResolver = ot, e.WeakCache = se, e.createDocumentCache = le, e.createHosts = Te, e.createModuleResolutionHost = qe, e.deepClone = w, e.getCompilerOptionsFromTsConfig = st, e.getEmitModuleResolutionKind = ee, e.getFileMatcherPatterns = A, e.getLibFiles = I, e.getLibFolderPath = me, e.getSyntaxKindName = j, e.libFolderInMemoryPath = pe, e.matchFiles = k, e.matchGlobs = Ie, e.nameof = D, e.runtime = Se;
|
|
121053
|
-
})),
|
|
121069
|
+
})), Gr = /* @__PURE__ */ d(((e) => {
|
|
121054
121070
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getStringFromStrOrFunc = e.escapeForWithinString = void 0;
|
|
121055
121071
|
function t(e, t) {
|
|
121056
121072
|
let n = "";
|
|
@@ -121062,9 +121078,9 @@ ${t.message}`), t;
|
|
|
121062
121078
|
return e instanceof Function ? e() : e;
|
|
121063
121079
|
}
|
|
121064
121080
|
e.getStringFromStrOrFunc = n;
|
|
121065
|
-
})),
|
|
121081
|
+
})), Kr = /* @__PURE__ */ d(((e) => {
|
|
121066
121082
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
121067
|
-
var t =
|
|
121083
|
+
var t = Gr(), n;
|
|
121068
121084
|
(function(e) {
|
|
121069
121085
|
e[e.Line = 0] = "Line", e[e.Star = 1] = "Star";
|
|
121070
121086
|
})(n ||= {});
|
|
@@ -121513,8 +121529,8 @@ ${t.message}`), t;
|
|
|
121513
121529
|
tabsCount: n
|
|
121514
121530
|
};
|
|
121515
121531
|
}
|
|
121516
|
-
})),
|
|
121517
|
-
var t =
|
|
121532
|
+
})), qr = (/* @__PURE__ */ d(((e) => {
|
|
121533
|
+
var t = Wr(), n = Kr();
|
|
121518
121534
|
function r(e) {
|
|
121519
121535
|
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
121520
121536
|
}
|
|
@@ -126992,7 +127008,7 @@ ${t.message}`), t;
|
|
|
126992
127008
|
#n(e, t) {
|
|
126993
127009
|
this.factory.forJSDoc().printDocs(e, t.docs), this.factory.forModifierableNode().printText(e, t), e.write("constructor"), this.factory.forTypeParameterDeclaration().printTextsWithBrackets(e, t.typeParameters), this.factory.forParameterDeclaration().printTextsWithParenthesis(e, t.parameters);
|
|
126994
127010
|
}
|
|
126995
|
-
},
|
|
127011
|
+
}, Ur = class extends Wn {
|
|
126996
127012
|
#e;
|
|
126997
127013
|
#t;
|
|
126998
127014
|
constructor(e, t) {
|
|
@@ -127006,7 +127022,7 @@ ${t.message}`), t;
|
|
|
127006
127022
|
this.factory.forStatementedNode(this.#e).printText(e, t);
|
|
127007
127023
|
});
|
|
127008
127024
|
}
|
|
127009
|
-
},
|
|
127025
|
+
}, Gr = class extends Wn {
|
|
127010
127026
|
#e;
|
|
127011
127027
|
constructor(e, t) {
|
|
127012
127028
|
super(e), this.#e = t;
|
|
@@ -135525,10 +135541,10 @@ ${t.message}`), t;
|
|
|
135525
135541
|
return new Hr(this, e);
|
|
135526
135542
|
}
|
|
135527
135543
|
forGetAccessorDeclaration(e) {
|
|
135528
|
-
return new
|
|
135544
|
+
return new Ur(this, e);
|
|
135529
135545
|
}
|
|
135530
135546
|
forMethodDeclaration(e) {
|
|
135531
|
-
return new
|
|
135547
|
+
return new Gr(this, e);
|
|
135532
135548
|
}
|
|
135533
135549
|
forPropertyDeclaration() {
|
|
135534
135550
|
return new qr(this);
|
|
@@ -136198,42 +136214,42 @@ ${t.message}`), t;
|
|
|
136198
136214
|
return i.default;
|
|
136199
136215
|
}
|
|
136200
136216
|
}), e.AbstractableNode = Ma, e.AmbientableNode = _e, e.ArgumentError = xm, e.ArgumentNullOrWhitespaceError = Sm, e.ArgumentOutOfRangeError = Cm, e.ArgumentTypeError = wm, e.ArgumentedNode = rn, e.ArrayBindingPattern = Oa, e.ArrayDestructuringAssignment = za, e.ArrayDestructuringAssignmentBase = Ra, e.ArrayLiteralExpression = Wa, e.ArrayTypeNode = iu, e.ArrowFunction = el, e.ArrowFunctionBase = $c, e.AsExpression = $a, e.AsExpressionBase = Qa, e.AssignmentExpression = La, e.AssignmentExpressionBase = Ia, e.AsyncableNode = an, e.AwaitExpression = to, e.AwaitExpressionBase = eo, e.AwaitableNode = on, e.BaseError = Tm, e.BaseExpressionedNode = Ka, e.BigIntLiteral = Wf, e.BigIntLiteralBase = Uf, e.BinaryExpression = Fa, e.BinaryExpressionBase = Pa, e.BindingElement = Aa, e.BindingElementBase = ka, e.BindingNamedNode = Qi, e.Block = gs, e.BlockBase = hs, e.BodiedNode = bn, e.BodyableNode = xn, e.BreakStatement = _s, e.CallExpression = ro, e.CallExpressionBase = no, e.CallSignatureDeclaration = Qd, e.CallSignatureDeclarationBase = Zd, e.CaseBlock = ys, e.CaseBlockBase = vs, e.CaseClause = xs, e.CaseClauseBase = bs, e.CatchClause = Cs, e.CatchClauseBase = Ss, e.ChildOrderableNode = Sn, e.ClassDeclaration = El, e.ClassDeclarationBase = Tl, e.ClassElement = ml, e.ClassExpression = Pl, e.ClassExpressionBase = Nl, e.ClassLikeDeclarationBase = vl, e.ClassLikeDeclarationBaseSpecific = yl, e.ClassStaticBlockDeclaration = Il, e.ClassStaticBlockDeclarationBase = Fl, e.CodeAction = Dp, e.CodeFixAction = Op, e.CombinedCodeActions = kp, e.CommaListExpression = ao, e.CommaListExpressionBase = io, e.CommentClassElement = Ll, e.CommentEnumMember = Wd, e.CommentObjectLiteralElement = wo, e.CommentRange = dn, e.CommentStatement = ws, e.CommentTypeElement = $d, e.CommonIdentifierBase = pf, e.CompilerCommentClassElement = f, e.CompilerCommentEnumMember = h, e.CompilerCommentNode = u, e.CompilerCommentObjectLiteralElement = m, e.CompilerCommentStatement = d, e.CompilerCommentTypeElement = p, e.ComputedPropertyName = hf, e.ComputedPropertyNameBase = mf, e.ConditionalExpression = so, e.ConditionalExpressionBase = oo, e.ConditionalTypeNode = au, e.ConstructSignatureDeclaration = tf, e.ConstructSignatureDeclarationBase = ef, e.ConstructorDeclaration = Bl, e.ConstructorDeclarationBase = Rl, e.ConstructorDeclarationOverloadBase = zl, e.ConstructorTypeNode = lu, e.ConstructorTypeNodeBase = cu, e.ContinueStatement = Ts, e.DebuggerStatement = Ds, e.DebuggerStatementBase = Es, e.DecoratableNode = Cn, e.Decorator = Jl, e.DecoratorBase = ql, e.DefaultClause = ks, e.DefaultClauseBase = Os, e.DefinitionInfo = jp, e.DeleteExpression = lo, e.DeleteExpressionBase = co, e.Diagnostic = Np, e.DiagnosticMessageChain = Mp, e.DiagnosticWithLocation = Pp, e.Directory = $p, e.DirectoryEmitResult = Qp, e.DirectoryNotFoundError = Em, e.DoStatement = Ms, e.DoStatementBase = js, e.DocumentSpan = Ap, e.DotDotDotTokenableNode = On, e.ElementAccessExpression = fo, e.ElementAccessExpressionBase = uo, e.EmitOutput = Ip, e.EmitResult = Lp, e.EmptyStatement = Ps, e.EmptyStatementBase = Ns, e.EnumDeclaration = Kd, e.EnumDeclarationBase = Gd, e.EnumMember = Jd, e.EnumMemberBase = qd, e.ExclamationTokenableNode = kn, e.ExportAssignment = ic, e.ExportAssignmentBase = rc, e.ExportDeclaration = oc, e.ExportDeclarationBase = ac, e.ExportGetableNode = An, e.ExportSpecifier = lc, e.ExportSpecifierBase = cc, e.ExportableNode = H, e.Expression = Na, e.ExpressionStatement = Is, e.ExpressionStatementBase = Fs, e.ExpressionWithTypeArguments = du, e.ExpressionWithTypeArgumentsBase = uu, e.ExpressionableNode = Ga, e.ExpressionedNode = qa, e.ExtendsClauseableNode = Fi, e.ExternalModuleReference = dc, e.ExternalModuleReferenceBase = uc, e.FalseLiteral = Jf, e.FalseLiteralBase = qf, e.FileNotFoundError = bm, e.FileReference = Vc, e.FileTextChanges = Ep, e.ForInStatement = Rs, e.ForInStatementBase = Ls, e.ForOfStatement = Bs, e.ForOfStatementBase = zs, e.ForStatement = Hs, e.ForStatementBase = Vs, e.FunctionDeclaration = cl, e.FunctionDeclarationBase = ol, e.FunctionDeclarationOverloadBase = sl, e.FunctionExpression = ul, e.FunctionExpressionBase = ll, e.FunctionLikeDeclaration = Qc, e.FunctionOrConstructorTypeNodeBase = su, e.FunctionOrConstructorTypeNodeBaseBase = ou, e.FunctionTypeNode = pu, e.FunctionTypeNodeBase = fu, e.GeneratorableNode = Ii, e.GetAccessorDeclaration = Hl, e.GetAccessorDeclarationBase = Vl, e.HeritageClause = Yd, e.HeritageClauseableNode = Ri, e.Identifier = _f, e.IdentifierBase = gf, e.IfStatement = Ws, e.IfStatementBase = Us, e.ImplementationLocation = Rp, e.ImplementsClauseableNode = zi, e.ImportAttribute = pc, e.ImportAttributeBase = fc, e.ImportAttributeNamedNode = $i, e.ImportAttributes = hc, e.ImportAttributesBase = mc, e.ImportClause = _c, e.ImportClauseBase = gc, e.ImportDeclaration = yc, e.ImportDeclarationBase = vc, e.ImportEqualsDeclaration = Cc, e.ImportEqualsDeclarationBase = Sc, e.ImportExpression = mo, e.ImportExpressionBase = po, e.ImportExpressionedNode = Ja, e.ImportSpecifier = Tc, e.ImportSpecifierBase = wc, e.ImportTypeNode = mu, e.IndexSignatureDeclaration = rf, e.IndexSignatureDeclarationBase = nf, e.IndexedAccessTypeNode = hu, e.InferTypeNode = gu, e.InitializerExpressionGetableNode = Bi, e.InitializerExpressionableNode = Vi, e.InterfaceDeclaration = of, e.InterfaceDeclarationBase = af, e.IntersectionTypeNode = _u, e.InvalidOperationError = ym, e.IterationStatement = As, e.JSDoc = eu, e.JSDocAllType = Bu, e.JSDocAugmentsTag = Ju, e.JSDocAuthorTag = Yu, e.JSDocBase = $l, e.JSDocCallbackTag = Xu, e.JSDocClassTag = Zu, e.JSDocDeprecatedTag = Qu, e.JSDocEnumTag = $u, e.JSDocFunctionType = td, e.JSDocFunctionTypeBase = ed, e.JSDocImplementsTag = nd, e.JSDocLink = rd, e.JSDocLinkCode = id, e.JSDocLinkPlain = ad, e.JSDocMemberName = od, e.JSDocNameReference = cd, e.JSDocNamepathType = sd, e.JSDocNonNullableType = ld, e.JSDocNullableType = ud, e.JSDocOptionalType = dd, e.JSDocOverloadTag = pd, e.JSDocOverloadTagBase = fd, e.JSDocOverrideTag = md, e.JSDocParameterTag = gd, e.JSDocParameterTagBase = hd, e.JSDocPrivateTag = _d, e.JSDocPropertyLikeTag = Yl, e.JSDocPropertyTag = yd, e.JSDocPropertyTagBase = vd, e.JSDocProtectedTag = bd, e.JSDocPublicTag = J, e.JSDocReadonlyTag = xd, e.JSDocReturnTag = Cd, e.JSDocReturnTagBase = Sd, e.JSDocSatisfiesTag = Td, e.JSDocSatisfiesTagBase = wd, e.JSDocSeeTag = Dd, e.JSDocSeeTagBase = Ed, e.JSDocSignature = Od, e.JSDocTag = Hu, e.JSDocTagBase = Vu, e.JSDocTagInfo = kd, e.JSDocTemplateTag = jd, e.JSDocTemplateTagBase = Ad, e.JSDocText = Md, e.JSDocThisTag = Pd, e.JSDocThisTagBase = Nd, e.JSDocThrowsTag = Id, e.JSDocThrowsTagBase = Fd, e.JSDocType = zu, e.JSDocTypeExpression = Rd, e.JSDocTypeExpressionableTag = Xl, e.JSDocTypeLiteral = zd, e.JSDocTypeParameteredTag = Zl, e.JSDocTypeTag = Bd, e.JSDocTypedefTag = Ld, e.JSDocUnknownTag = Vd, e.JSDocUnknownType = Hd, e.JSDocVariadicType = Ud, e.JSDocableNode = Ui, e.JsxAttribute = Sf, e.JsxAttributeBase = xf, e.JsxAttributedNode = df, e.JsxClosingElement = wf, e.JsxClosingElementBase = Cf, e.JsxClosingFragment = Tf, e.JsxElement = Df, e.JsxElementBase = Ef, e.JsxExpression = Af, e.JsxExpressionBase = kf, e.JsxFragment = jf, e.JsxNamespacedName = Nf, e.JsxNamespacedNameBase = Mf, e.JsxOpeningElement = Ff, e.JsxOpeningElementBase = Pf, e.JsxOpeningFragment = If, e.JsxSelfClosingElement = Rf, e.JsxSelfClosingElementBase = Lf, e.JsxSpreadAttribute = Bf, e.JsxSpreadAttributeBase = zf, e.JsxTagNamedNode = ff, e.JsxText = Hf, e.JsxTextBase = Vf, e.LabeledStatement = Ks, e.LabeledStatementBase = Gs, e.LanguageService = Yp, e.LeftHandSideExpression = W, e.LeftHandSideExpressionedNode = Ya, e.LiteralExpression = go, e.LiteralExpressionBase = ho, e.LiteralLikeNode = Wi, e.LiteralTypeNode = vu, e.ManipulationError = Ot, e.ManipulationSettingsContainer = ne, e.MappedTypeNode = yu, e.MemberExpression = Ha, e.MemoryEmitResult = zp, e.MetaProperty = vo, e.MetaPropertyBase = _o, e.MethodDeclaration = _l, e.MethodDeclarationBase = hl, e.MethodDeclarationOverloadBase = gl, e.MethodSignature = cf, e.MethodSignatureBase = sf, e.ModifierableNode = Gi, e.ModuleBlock = Dc, e.ModuleBlockBase = Ec, e.ModuleChildableNode = Oc, e.ModuleDeclaration = Ac, e.ModuleDeclarationBase = kc, e.ModuleNamedNode = ea, e.ModuledNode = qi, e.NameableNode = ta, e.NamedExports = Pc, e.NamedExportsBase = Nc, e.NamedImports = Ic, e.NamedImportsBase = Fc, e.NamedNode = ia, e.NamedNodeBase = Ji, e.NamedTupleMember = xu, e.NamedTupleMemberBase = bu, e.NamespaceExport = Rc, e.NamespaceExportBase = Lc, e.NamespaceImport = Bc, e.NamespaceImportBase = zc, e.NewExpression = bo, e.NewExpressionBase = yo, e.NoSubstitutionTemplateLiteral = op, e.NoSubstitutionTemplateLiteralBase = ap, e.Node = V, e.NodeWithTypeArguments = ru, e.NodeWithTypeArgumentsBase = nu, e.NonNullExpression = So, e.NonNullExpressionBase = xo, e.NotEmittedStatement = Js, e.NotEmittedStatementBase = qs, e.NotImplementedError = Dm, e.NotSupportedError = Om, e.NullLiteral = Qf, e.NullLiteralBase = Zf, e.NumericLiteral = ep, e.NumericLiteralBase = $f, e.ObjectBindingPattern = ja, e.ObjectDestructuringAssignment = Eo, e.ObjectDestructuringAssignmentBase = To, e.ObjectLiteralElement = Co, e.ObjectLiteralExpression = Oo, e.ObjectLiteralExpressionBase = Do, e.OmittedExpression = Io, e.OmittedExpressionBase = Fo, e.OutputFile = Fp, e.OverloadableNode = tl, e.OverrideableNode = oa, e.ParameterDeclaration = fl, e.ParameterDeclarationBase = dl, e.ParameteredNode = sa, e.ParenthesizedExpression = Ro, e.ParenthesizedExpressionBase = Lo, e.ParenthesizedTypeNode = Su, e.PartiallyEmittedExpression = G, e.PartiallyEmittedExpressionBase = zo, e.PathNotFoundError = km, e.PostfixUnaryExpression = Bo, e.PostfixUnaryExpressionBase = K, e.PrefixUnaryExpression = Ho, e.PrefixUnaryExpressionBase = Vo, e.PrimaryExpression = Ua, e.PrivateIdentifier = yf, e.PrivateIdentifierBase = vf, e.Program = Jp, e.Project = um, e.PropertyAccessExpression = Wo, e.PropertyAccessExpressionBase = Uo, e.PropertyAssignment = Ao, e.PropertyAssignmentBase = ko, e.PropertyDeclaration = Wl, e.PropertyDeclarationBase = Ul, e.PropertyNamedNode = aa, e.PropertySignature = uf, e.PropertySignatureBase = lf, e.QualifiedName = bf, e.QuestionDotTokenableNode = ca, e.QuestionTokenableNode = la, e.ReadonlyableNode = ua, e.RefactorEditInfo = Bp, e.ReferenceEntry = Up, e.ReferenceFindableNode = Yi, e.ReferencedSymbol = Vp, e.ReferencedSymbolDefinitionInfo = Hp, e.ReferencedSymbolEntry = Wp, e.RegularExpressionLiteral = np, e.RegularExpressionLiteralBase = tp, e.RenameLocation = Gp, e.RenameableNode = Zi, e.RestTypeNode = Cu, e.ReturnStatement = Xs, e.ReturnStatementBase = Ys, e.ReturnTypedNode = da, e.SatisfiesExpression = Ko, e.SatisfiesExpressionBase = Go, e.ScopeableNode = fa, e.ScopedNode = ha, e.SetAccessorDeclaration = Kl, e.SetAccessorDeclarationBase = Gl, e.ShorthandPropertyAssignment = Mo, e.ShorthandPropertyAssignmentBase = jo, e.Signature = Sp, e.SignaturedDeclaration = ga, e.SourceFile = Uc, e.SourceFileBase = Hc, e.SpreadAssignment = Po, e.SpreadAssignmentBase = No, e.SpreadElement = Jo, e.SpreadElementBase = qo, e.Statement = fs, e.StatementBase = ds, e.StatementedNode = ps, e.StaticableNode = _a, e.StringLiteral = ip, e.StringLiteralBase = rp, e.Structure = qn, e.SuperElementAccessExpression = Xo, e.SuperElementAccessExpressionBase = Yo, e.SuperExpression = Qo, e.SuperExpressionBase = Zo, e.SuperExpressionedNode = Xa, e.SuperPropertyAccessExpression = es, e.SuperPropertyAccessExpressionBase = $o, e.SwitchStatement = Qs, e.SwitchStatementBase = Zs, e.Symbol = Cp, e.SymbolDisplayPart = Kp, e.SyntaxList = _n, e.TaggedTemplateExpression = sp, e.TemplateExpression = lp, e.TemplateExpressionBase = cp, e.TemplateHead = dp, e.TemplateHeadBase = up, e.TemplateLiteralTypeNode = wu, e.TemplateMiddle = pp, e.TemplateMiddleBase = fp, e.TemplateSpan = hp, e.TemplateSpanBase = mp, e.TemplateTail = _p, e.TemplateTailBase = gp, e.TextChange = Tp, e.TextInsertableNode = va, e.TextRange = un, e.TextSpan = wp, e.ThisExpression = ns, e.ThisExpressionBase = ts, e.ThisTypeNode = Tu, e.ThrowStatement = ec, e.ThrowStatementBase = $s, e.TrueLiteral = Kf, e.TrueLiteralBase = Gf, e.TryStatement = nc, e.TryStatementBase = tc, e.TupleTypeNode = Eu, e.Type = Xp, e.TypeAliasDeclaration = Ou, e.TypeAliasDeclarationBase = Du, e.TypeArgumentedNode = ba, e.TypeAssertion = is, e.TypeAssertionBase = rs, e.TypeChecker = qp, e.TypeElement = Xd, e.TypeElementMemberedNode = Ca, e.TypeLiteralNode = Au, e.TypeLiteralNodeBase = ku, e.TypeNode = tu, e.TypeOfExpression = os, e.TypeOfExpressionBase = as, e.TypeOperatorTypeNode = ju, e.TypeParameter = Zp, e.TypeParameterDeclaration = Nu, e.TypeParameterDeclarationBase = Mu, e.TypeParameteredNode = Ta, e.TypePredicateNode = Fu, e.TypeQueryNode = Iu, e.TypeReferenceNode = Lu, e.TypedNode = xa, e.UnaryExpression = Ba, e.UnaryExpressionedNode = Za, e.UnionTypeNode = Ru, e.UnwrappableNode = Da, e.UpdateExpression = Va, e.VariableDeclaration = yp, e.VariableDeclarationBase = vp, e.VariableDeclarationList = xp, e.VariableDeclarationListBase = bp, e.VariableStatement = qc, e.VariableStatementBase = Kc, e.VoidExpression = cs, e.VoidExpressionBase = ss, e.WhileStatement = Yc, e.WhileStatementBase = Jc, e.WithStatement = Zc, e.WithStatementBase = Xc, e.Writers = mm, e.YieldExpression = us, e.YieldExpressionBase = ls, e.createWrappedNode = fm, e.forEachStructureChild = Jn, e.getCompilerOptionsFromTsConfig = pe, e.getScopeForNode = pa, e.insertOverloads = al, e.printNode = te, e.setScopeForNode = ma;
|
|
136201
|
-
})))(),
|
|
136202
|
-
if (e !== void 0 && (
|
|
136203
|
-
},
|
|
136217
|
+
})))(), Jr = new Set(["t", "msg"]), Yr = "Trans", Xr = (e) => {
|
|
136218
|
+
if (e !== void 0 && (qr.Node.isStringLiteral(e) || qr.Node.isNoSubstitutionTemplateLiteral(e))) return e.getLiteralText();
|
|
136219
|
+
}, Zr = (e) => {
|
|
136204
136220
|
if (e === void 0) return;
|
|
136205
|
-
let t =
|
|
136221
|
+
let t = Xr(e);
|
|
136206
136222
|
if (t !== void 0) return { message: t };
|
|
136207
|
-
if (!
|
|
136223
|
+
if (!qr.Node.isObjectLiteralExpression(e)) return;
|
|
136208
136224
|
let n = e.getProperty("message");
|
|
136209
|
-
if (n === void 0 || !
|
|
136210
|
-
let r =
|
|
136225
|
+
if (n === void 0 || !qr.Node.isPropertyAssignment(n)) return;
|
|
136226
|
+
let r = Xr(n.getInitializer());
|
|
136211
136227
|
if (r === void 0) return;
|
|
136212
|
-
let i = e.getProperty("context"), a = i !== void 0 &&
|
|
136228
|
+
let i = e.getProperty("context"), a = i !== void 0 && qr.Node.isPropertyAssignment(i) ? Xr(i.getInitializer()) : void 0;
|
|
136213
136229
|
return a === void 0 ? { message: r } : {
|
|
136214
136230
|
message: r,
|
|
136215
136231
|
context: a
|
|
136216
136232
|
};
|
|
136217
|
-
},
|
|
136233
|
+
}, Qr = (e, t) => {
|
|
136218
136234
|
let n = e.getAttribute(t);
|
|
136219
|
-
if (n === void 0 || !
|
|
136235
|
+
if (n === void 0 || !qr.Node.isJsxAttribute(n)) return;
|
|
136220
136236
|
let r = n.getInitializer();
|
|
136221
136237
|
if (r !== void 0) {
|
|
136222
|
-
if (
|
|
136223
|
-
if (
|
|
136238
|
+
if (qr.Node.isStringLiteral(r)) return r.getLiteralText();
|
|
136239
|
+
if (qr.Node.isJsxExpression(r)) return Xr(r.getExpression());
|
|
136224
136240
|
}
|
|
136225
|
-
},
|
|
136241
|
+
}, $r = (e) => {
|
|
136226
136242
|
let t = e.getJsxChildren();
|
|
136227
|
-
if (t.some((e) =>
|
|
136228
|
-
let n =
|
|
136243
|
+
if (t.some((e) => qr.Node.isJsxExpression(e) || qr.Node.isJsxElement(e) || qr.Node.isJsxSelfClosingElement(e))) return;
|
|
136244
|
+
let n = Pr(t.filter((e) => qr.Node.isJsxText(e)).map((e) => e.getText()).join(""));
|
|
136229
136245
|
return n.length > 0 ? n : void 0;
|
|
136230
|
-
},
|
|
136246
|
+
}, ei = (e) => {
|
|
136231
136247
|
let t = /* @__PURE__ */ new Map();
|
|
136232
|
-
for (let n of e) t.set(
|
|
136248
|
+
for (let n of e) t.set(Nr(n.message, n.context), n);
|
|
136233
136249
|
return [...t.values()];
|
|
136234
|
-
},
|
|
136250
|
+
}, ti = async (e) => {
|
|
136235
136251
|
if (e.length === 0) return [];
|
|
136236
|
-
let t = new
|
|
136252
|
+
let t = new qr.Project({
|
|
136237
136253
|
useInMemoryFileSystem: !0,
|
|
136238
136254
|
skipFileDependencyResolution: !0
|
|
136239
136255
|
}), n = [];
|
|
@@ -136245,19 +136261,19 @@ ${t.message}`), t;
|
|
|
136245
136261
|
continue;
|
|
136246
136262
|
}
|
|
136247
136263
|
t.createSourceFile(`front-component-${r}.tsx`, i, { overwrite: !0 }).forEachDescendant((e) => {
|
|
136248
|
-
if (
|
|
136264
|
+
if (qr.Node.isCallExpression(e)) {
|
|
136249
136265
|
let t = e.getExpression();
|
|
136250
|
-
if (
|
|
136251
|
-
let t =
|
|
136266
|
+
if (qr.Node.isIdentifier(t) && Jr.has(t.getText())) {
|
|
136267
|
+
let t = Zr(e.getArguments()[0]);
|
|
136252
136268
|
t !== void 0 && n.push(t);
|
|
136253
136269
|
}
|
|
136254
136270
|
return;
|
|
136255
136271
|
}
|
|
136256
|
-
if (
|
|
136257
|
-
if (e.getTagNameNode().getText() !==
|
|
136258
|
-
let t =
|
|
136272
|
+
if (qr.Node.isJsxSelfClosingElement(e)) {
|
|
136273
|
+
if (e.getTagNameNode().getText() !== Yr) return;
|
|
136274
|
+
let t = Qr(e, "message");
|
|
136259
136275
|
if (t !== void 0 && t.length > 0) {
|
|
136260
|
-
let r =
|
|
136276
|
+
let r = Qr(e, "context");
|
|
136261
136277
|
n.push(r === void 0 ? { message: t } : {
|
|
136262
136278
|
message: t,
|
|
136263
136279
|
context: r
|
|
@@ -136265,12 +136281,12 @@ ${t.message}`), t;
|
|
|
136265
136281
|
}
|
|
136266
136282
|
return;
|
|
136267
136283
|
}
|
|
136268
|
-
if (
|
|
136284
|
+
if (qr.Node.isJsxElement(e)) {
|
|
136269
136285
|
let t = e.getOpeningElement();
|
|
136270
|
-
if (t.getTagNameNode().getText() !==
|
|
136271
|
-
let r =
|
|
136286
|
+
if (t.getTagNameNode().getText() !== Yr) return;
|
|
136287
|
+
let r = Qr(t, "message") ?? $r(e);
|
|
136272
136288
|
if (r !== void 0 && r.length > 0) {
|
|
136273
|
-
let e =
|
|
136289
|
+
let e = Qr(t, "context");
|
|
136274
136290
|
n.push(e === void 0 ? { message: r } : {
|
|
136275
136291
|
message: r,
|
|
136276
136292
|
context: e
|
|
@@ -136279,28 +136295,29 @@ ${t.message}`), t;
|
|
|
136279
136295
|
}
|
|
136280
136296
|
});
|
|
136281
136297
|
}
|
|
136282
|
-
return
|
|
136283
|
-
},
|
|
136298
|
+
return ei(n);
|
|
136299
|
+
}, ni = {
|
|
136284
136300
|
objectMetadata: "objects",
|
|
136285
136301
|
fieldMetadata: "fields",
|
|
136286
136302
|
view: "views",
|
|
136287
136303
|
pageLayout: "pageLayouts",
|
|
136288
136304
|
pageLayoutTab: "pageLayoutTabs",
|
|
136289
136305
|
commandMenuItem: "commandMenuItems",
|
|
136290
|
-
navigationMenuItem: "navigationMenuItems"
|
|
136291
|
-
|
|
136306
|
+
navigationMenuItem: "navigationMenuItems",
|
|
136307
|
+
timelineActivityType: "timelineActivityTypes"
|
|
136308
|
+
}, ri = (e) => {
|
|
136292
136309
|
let t = /* @__PURE__ */ new Map(), n = (e, n) => {
|
|
136293
136310
|
if (!(typeof e != "object" || !e)) for (let r of He[n]) {
|
|
136294
136311
|
let i = e[r];
|
|
136295
136312
|
if (typeof i != "string" || i.length === 0) continue;
|
|
136296
136313
|
let a = Le(n, r);
|
|
136297
|
-
t.set(
|
|
136314
|
+
t.set(JSON.stringify([a, i]), {
|
|
136298
136315
|
message: i,
|
|
136299
136316
|
context: a
|
|
136300
136317
|
});
|
|
136301
136318
|
}
|
|
136302
136319
|
};
|
|
136303
|
-
for (let [t, r] of Object.entries(
|
|
136320
|
+
for (let [t, r] of Object.entries(ni)) {
|
|
136304
136321
|
let i = e[r];
|
|
136305
136322
|
if (Array.isArray(i)) for (let e of i) n(e, t);
|
|
136306
136323
|
}
|
|
@@ -136309,12 +136326,12 @@ ${t.message}`), t;
|
|
|
136309
136326
|
for (let t of e.widgets ?? []) n(t, "pageLayoutWidget");
|
|
136310
136327
|
}
|
|
136311
136328
|
return [...t.values()];
|
|
136312
|
-
},
|
|
136313
|
-
let n = await
|
|
136314
|
-
for (let t of [...
|
|
136329
|
+
}, ii = async ({ manifest: e, frontComponentSourcePaths: t }) => {
|
|
136330
|
+
let n = await ti(t), r = /* @__PURE__ */ new Map();
|
|
136331
|
+
for (let t of [...ri(e), ...n]) r.set(Nr(t.message, t.context), t);
|
|
136315
136332
|
return [...r.values()];
|
|
136316
|
-
},
|
|
136317
|
-
let i = await
|
|
136333
|
+
}, ai = async ({ appPath: e, manifest: t, frontComponentSourcePaths: n = [], scaffoldLocale: r }) => {
|
|
136334
|
+
let i = await ii({
|
|
136318
136335
|
manifest: t,
|
|
136319
136336
|
frontComponentSourcePaths: n
|
|
136320
136337
|
}), a = tt.join(e, Be);
|
|
@@ -136328,24 +136345,24 @@ ${t.message}`), t;
|
|
|
136328
136345
|
}
|
|
136329
136346
|
let o = (await ot(a)).filter((e) => e.endsWith(".json") && e !== "en.json");
|
|
136330
136347
|
for (let e of o) {
|
|
136331
|
-
let t = tt.join(a, e), n = await he(t) ?? {}, r = new Map(pe(n).map((e) => [
|
|
136348
|
+
let t = tt.join(a, e), n = await he(t) ?? {}, r = new Map(pe(n).map((e) => [Nr(e.message, e.context), e.translation]));
|
|
136332
136349
|
await ae(t, Oe(i.map(({ message: e, context: t }) => ({
|
|
136333
136350
|
message: e,
|
|
136334
136351
|
context: t,
|
|
136335
|
-
translation: r.get(
|
|
136352
|
+
translation: r.get(Nr(e, t)) ?? ""
|
|
136336
136353
|
}))));
|
|
136337
136354
|
}
|
|
136338
136355
|
return {
|
|
136339
136356
|
sourceCount: i.length,
|
|
136340
136357
|
updatedLocaleFiles: o
|
|
136341
136358
|
};
|
|
136342
|
-
},
|
|
136359
|
+
}, oi = (e) => Object.prototype.hasOwnProperty.call(E, e), si = class {
|
|
136343
136360
|
async execute(e) {
|
|
136344
136361
|
let t = e.appPath ?? w, n;
|
|
136345
|
-
e.locale !== void 0 && ((e.locale === "en" || !
|
|
136362
|
+
e.locale !== void 0 && ((e.locale === "en" || !oi(e.locale)) && (console.error(vt.red(`"${e.locale}" is not a supported target locale. Choose one of: ${Object.keys(E).filter((e) => e !== "en").join(", ")}`)), process.exit(1)), n = e.locale), console.log(vt.blue("Extracting translatable strings..."));
|
|
136346
136363
|
let r = await be(t);
|
|
136347
136364
|
r.success || (console.error(vt.red(r.errors.join("\n"))), process.exit(1)), r.warnings.length > 0 && console.warn(vt.yellow(r.warnings.join("\n")));
|
|
136348
|
-
let i = r.filePaths.frontComponents.map((e) => tt.join(t, e)), { sourceCount: a, updatedLocaleFiles: o } = await
|
|
136365
|
+
let i = r.filePaths.frontComponents.map((e) => tt.join(t, e)), { sourceCount: a, updatedLocaleFiles: o } = await ai({
|
|
136349
136366
|
appPath: t,
|
|
136350
136367
|
manifest: r.manifest,
|
|
136351
136368
|
frontComponentSourcePaths: i,
|
|
@@ -136353,8 +136370,8 @@ ${t.message}`), t;
|
|
|
136353
136370
|
});
|
|
136354
136371
|
console.log(vt.green(`✓ Extracted ${a} string${a === 1 ? "" : "s"} to locales/`)), o.length > 0 && console.log(vt.gray(`Updated: ${o.join(", ")}`));
|
|
136355
136372
|
}
|
|
136356
|
-
},
|
|
136357
|
-
let t = new
|
|
136373
|
+
}, ci = (e) => {
|
|
136374
|
+
let t = new dn(), n = new Or(), r = new Ar(), i = new mn(), a = new un(), o = new Mr(), s = new si();
|
|
136358
136375
|
e.command("dev [appPath]").description("Build and sync local changes").option("-o, --once", "Build and sync once, then exit (deprecated: use `twenty apply`)").option("--dry-run", "Preview the metadata changes without applying them (deprecated: use `twenty plan`)").option("-f, --force", "Apply destructive changes (deletes) without confirmation").option("--debounceMs <ms>", "Debounce in ms (default: 1 000)").option("-v, --verbose", "Show detailed logs").option("-d, --debug", "Show detailed logs (alias for --verbose)").action(async (e, t) => {
|
|
136359
136376
|
t.dryRun && !t.once && console.warn(vt.yellow("--dry-run only applies with --once. Ignoring it; run `yarn twenty plan` to preview changes."));
|
|
136360
136377
|
let i = t.verbose || t.debug;
|
|
@@ -136396,7 +136413,7 @@ ${t.message}`), t;
|
|
|
136396
136413
|
}), e.command("dev:add [entityType]").description(`Scaffold a new entity (${Object.values(f).join("|")})`).option("--path <path>", "Path in which the entity should be created.").action(async (e, t) => {
|
|
136397
136414
|
await a.execute(e, t?.path);
|
|
136398
136415
|
}), e.command("dev:catalog-sync").description("Trigger marketplace catalog sync").option("-r, --remote <name>", "Sync on a specific remote").action(async (e) => {
|
|
136399
|
-
let { CatalogSyncCommand: t } = await import("./catalog-sync-
|
|
136416
|
+
let { CatalogSyncCommand: t } = await import("./catalog-sync-C82Xfr2f.mjs");
|
|
136400
136417
|
await new t().execute({ remote: e.remote });
|
|
136401
136418
|
}), e.command("dev:generate-client [appPath]").description("Generate the typed API client from the active remote (no app definition required)").action(async (e) => {
|
|
136402
136419
|
await o.execute({ appPath: Dt(e) });
|
|
@@ -136405,8 +136422,8 @@ ${t.message}`), t;
|
|
|
136405
136422
|
appPath: Dt(e),
|
|
136406
136423
|
locale: t.locale
|
|
136407
136424
|
});
|
|
136408
|
-
}),
|
|
136409
|
-
},
|
|
136425
|
+
}), jr(e);
|
|
136426
|
+
}, li = async (e, t) => {
|
|
136410
136427
|
let n = t.test ? S : ie, r = t.port ? parseInt(t.port, 10) : n;
|
|
136411
136428
|
(isNaN(r) || r < 1 || r > 65535) && (console.error(vt.red("Invalid port number.")), process.exit(1));
|
|
136412
136429
|
let i = await Pe({
|
|
@@ -136416,14 +136433,14 @@ ${t.message}`), t;
|
|
|
136416
136433
|
onProgress: (e) => console.log(vt.gray(e))
|
|
136417
136434
|
});
|
|
136418
136435
|
i.success || (console.error(vt.red(i.error.message)), process.exit(1));
|
|
136419
|
-
},
|
|
136436
|
+
}, ui = (e) => {
|
|
136420
136437
|
let t = e.test ? Je : Xe;
|
|
136421
136438
|
if (!T(t)) {
|
|
136422
136439
|
console.log(vt.yellow("No Twenty server container found."));
|
|
136423
136440
|
return;
|
|
136424
136441
|
}
|
|
136425
136442
|
ht(`docker stop ${t}`, { stdio: "ignore" }), console.log(vt.green("Twenty server stopped."));
|
|
136426
|
-
},
|
|
136443
|
+
}, di = (e) => {
|
|
136427
136444
|
let t = e.test ? Je : Xe;
|
|
136428
136445
|
if (!T(t)) {
|
|
136429
136446
|
console.log(vt.yellow("No Twenty server container found."));
|
|
@@ -136438,7 +136455,7 @@ ${t.message}`), t;
|
|
|
136438
136455
|
t
|
|
136439
136456
|
], { stdio: "inherit" });
|
|
136440
136457
|
} catch {}
|
|
136441
|
-
},
|
|
136458
|
+
}, fi = async (e) => {
|
|
136442
136459
|
let t = e.test ? Je : Xe, n = e.test ? S : ie;
|
|
136443
136460
|
if (!T(t)) {
|
|
136444
136461
|
console.log(` Status: ${vt.gray("not created")}`), console.log(vt.gray(` Run 'yarn twenty docker:start${e.test ? " --test" : ""}' to create one.`));
|
|
@@ -136446,14 +136463,14 @@ ${t.message}`), t;
|
|
|
136446
136463
|
}
|
|
136447
136464
|
let r = te(t), i = r ? ke(t) : n, a = r ? await Re(i) : !1, o = a ? vt.green("running (healthy)") : r ? vt.yellow("running (starting...)") : vt.gray("stopped"), s = N("APP_VERSION", t);
|
|
136448
136465
|
console.log(` Status: ${o}`), console.log(` URL: http://localhost:${i}`), s && console.log(` Version: ${vt.gray(s)}`), a && console.log(vt.gray(" Login: tim@apple.dev / tim@apple.dev"));
|
|
136449
|
-
},
|
|
136466
|
+
}, pi = (e) => {
|
|
136450
136467
|
let t = e.test ? Je : Xe, n = e.test ? "twenty-app-dev-test-data" : "twenty-app-dev-data", r = e.test ? "twenty-app-dev-test-storage" : "twenty-app-dev-storage";
|
|
136451
136468
|
T(t) && ht(`docker rm -f ${t}`, { stdio: "ignore" });
|
|
136452
136469
|
try {
|
|
136453
136470
|
ht(`docker volume rm ${n} ${r}`, { stdio: "ignore" });
|
|
136454
136471
|
} catch {}
|
|
136455
136472
|
console.log(vt.green("Twenty server data reset.")), console.log(vt.gray(`Run 'yarn twenty docker:start${e.test ? " --test" : ""}' to start a fresh instance.`));
|
|
136456
|
-
},
|
|
136473
|
+
}, mi = async (e, t) => {
|
|
136457
136474
|
let n = await De({
|
|
136458
136475
|
version: e ?? "latest",
|
|
136459
136476
|
test: t.test,
|
|
@@ -136466,39 +136483,39 @@ ${t.message}`), t;
|
|
|
136466
136483
|
return;
|
|
136467
136484
|
}
|
|
136468
136485
|
console.log(vt.green(` Upgraded to: ${r.image}`)), r.containerRecreated && console.log(vt.gray(` Run 'yarn twenty docker:start${t.test ? " --test" : ""}' to wait for the server to be ready.`));
|
|
136469
|
-
},
|
|
136470
|
-
e.command("docker:start [version]").description("Start the local Twenty container (version defaults to the app `engines.twenty` range, then `latest`)").option("-p, --port <port>", "HTTP port").option("--test", "Start a separate test instance (port 2021)").action(
|
|
136486
|
+
}, hi = (e) => {
|
|
136487
|
+
e.command("docker:start [version]").description("Start the local Twenty container (version defaults to the app `engines.twenty` range, then `latest`)").option("-p, --port <port>", "HTTP port").option("--test", "Start a separate test instance (port 2021)").action(li), e.command("docker:stop").description("Stop the local Twenty container").option("--test", "Stop the test instance").action(ui), e.command("docker:logs").description("Stream container logs").option("-n, --lines <lines>", "Number of lines to show", "50").option("--test", "Show logs for the test instance").action(di), e.command("docker:status").description("Show container status").option("--test", "Show status of the test instance").action(fi), e.command("docker:reset").description("Delete all data and start fresh").option("--test", "Reset the test instance").action(pi), e.command("docker:upgrade [version]").description("Upgrade the Docker image").option("--test", "Upgrade the test instance").action(mi);
|
|
136471
136488
|
let t = e.command("server", { hidden: !0 }).description("Manage a Twenty server (local instance and server-side actions)"), n = (e, t) => console.warn(vt.yellow(`⚠ \`twenty server ${e}\` is deprecated. Use \`twenty ${t}\` instead.`));
|
|
136472
136489
|
t.command("start [version]").option("-p, --port <port>", "HTTP port").option("--test", "Start a separate test instance (port 2021)").action(async (e, t) => {
|
|
136473
|
-
n("start", "docker:start"), await
|
|
136490
|
+
n("start", "docker:start"), await li(e, t);
|
|
136474
136491
|
}), t.command("stop").option("--test", "Stop the test instance").action((e) => {
|
|
136475
|
-
n("stop", "docker:stop"),
|
|
136492
|
+
n("stop", "docker:stop"), ui(e);
|
|
136476
136493
|
}), t.command("logs").option("-n, --lines <lines>", "Number of lines to show", "50").option("--test", "Show logs for the test instance").action((e) => {
|
|
136477
|
-
n("logs", "docker:logs"),
|
|
136494
|
+
n("logs", "docker:logs"), di(e);
|
|
136478
136495
|
}), t.command("status").option("--test", "Show status of the test instance").action(async (e) => {
|
|
136479
|
-
n("status", "docker:status"), await
|
|
136496
|
+
n("status", "docker:status"), await fi(e);
|
|
136480
136497
|
}), t.command("reset").option("--test", "Reset the test instance").action((e) => {
|
|
136481
|
-
n("reset", "docker:reset"),
|
|
136498
|
+
n("reset", "docker:reset"), pi(e);
|
|
136482
136499
|
}), t.command("upgrade [version]").option("--test", "Upgrade the test instance").action(async (e, t) => {
|
|
136483
|
-
n("upgrade", "docker:upgrade"), await
|
|
136500
|
+
n("upgrade", "docker:upgrade"), await mi(e, t);
|
|
136484
136501
|
}), t.command("catalog-sync").option("-r, --remote <name>", "Sync on a specific remote").action(async (e) => {
|
|
136485
136502
|
n("catalog-sync", "dev:catalog-sync");
|
|
136486
|
-
let { CatalogSyncCommand: t } = await import("./catalog-sync-
|
|
136503
|
+
let { CatalogSyncCommand: t } = await import("./catalog-sync-C82Xfr2f.mjs");
|
|
136487
136504
|
await new t().execute({ remote: e.remote });
|
|
136488
136505
|
});
|
|
136489
|
-
},
|
|
136506
|
+
}, gi = /^(\d{1,3}\.){3}\d{1,3}$/, _i = (e) => {
|
|
136490
136507
|
try {
|
|
136491
136508
|
let { hostname: t } = new URL(e);
|
|
136492
|
-
if (
|
|
136509
|
+
if (gi.test(t)) return t.replace(/\./g, "-");
|
|
136493
136510
|
let n = t.split(".");
|
|
136494
136511
|
return n.length > 2 ? n.slice(0, -2).join("-") : n.length === 2 ? n[0] : n.join("-");
|
|
136495
136512
|
} catch {
|
|
136496
136513
|
return "remote";
|
|
136497
136514
|
}
|
|
136498
|
-
},
|
|
136515
|
+
}, vi = async (e, t) => t ? ((await Ue({
|
|
136499
136516
|
apiKey: t,
|
|
136500
136517
|
apiUrl: e
|
|
136501
|
-
})).success || (console.error(vt.red("✗ Authentication failed.")), process.exit(1)), "API key") :
|
|
136518
|
+
})).success || (console.error(vt.red("✗ Authentication failed.")), process.exit(1)), "API key") : yi(e), yi = async (e) => {
|
|
136502
136519
|
console.log(vt.gray("Opening browser for authentication..."));
|
|
136503
136520
|
let t = await k({ apiUrl: e });
|
|
136504
136521
|
return t.success ? "OAuth" : (console.log(vt.yellow(t.error.message)), (await Ue({
|
|
@@ -136511,21 +136528,21 @@ ${t.message}`), t;
|
|
|
136511
136528
|
}])).apiKey,
|
|
136512
136529
|
apiUrl: e
|
|
136513
136530
|
})).success || (console.error(vt.red("✗ Authentication failed.")), process.exit(1)), "API key");
|
|
136514
|
-
},
|
|
136531
|
+
}, bi = async (e) => {
|
|
136515
136532
|
e.apiUrl && console.warn(vt.yellow("⚠ --api-url is deprecated. Use --url instead."));
|
|
136516
136533
|
let t = e.test ? le(!0) : void 0, n = new se(t ? { configPath: t } : void 0), r = await n.getRemotes();
|
|
136517
136534
|
if (e.as !== void 0 && r.includes(e.as)) {
|
|
136518
136535
|
let t = await n.getConfigForRemote(e.as);
|
|
136519
136536
|
se.setActiveRemote(e.as);
|
|
136520
|
-
let r = await
|
|
136537
|
+
let r = await vi(t.apiUrl, e.apiKey);
|
|
136521
136538
|
console.log(vt.green(`✓ Re-authenticated "${e.as}" via ${r}.`)), await n.setDefaultRemote(e.as), console.log(vt.green(`✓ Default remote set to "${e.as}".`));
|
|
136522
136539
|
return;
|
|
136523
136540
|
}
|
|
136524
136541
|
let i = e.url ?? e.apiUrl;
|
|
136525
|
-
if (i) i =
|
|
136542
|
+
if (i) i = Ye(i);
|
|
136526
136543
|
else {
|
|
136527
136544
|
let t = await Me();
|
|
136528
|
-
e.local ? (t || (console.error(vt.red("No local Twenty server found.\nStart one with: yarn twenty docker:start")), process.exit(1)), console.log(vt.gray(`Found local server at ${t}`)), i = t) : i =
|
|
136545
|
+
e.local ? (t || (console.error(vt.red("No local Twenty server found.\nStart one with: yarn twenty docker:start")), process.exit(1)), console.log(vt.gray(`Found local server at ${t}`)), i = t) : i = Ye((await yt.prompt([{
|
|
136529
136546
|
type: "input",
|
|
136530
136547
|
name: "serverUrl",
|
|
136531
136548
|
message: "Twenty server URL:",
|
|
@@ -136538,11 +136555,11 @@ ${t.message}`), t;
|
|
|
136538
136555
|
}
|
|
136539
136556
|
}])).serverUrl);
|
|
136540
136557
|
}
|
|
136541
|
-
let a = e.as ??
|
|
136558
|
+
let a = e.as ?? _i(i);
|
|
136542
136559
|
se.setActiveRemote(a);
|
|
136543
|
-
let o = await
|
|
136560
|
+
let o = await vi(i, e.apiKey);
|
|
136544
136561
|
console.log(vt.green(`✓ Remote "${a}" added (${i}) via ${o}.`)), await n.setDefaultRemote(a), console.log(vt.green(`✓ Default remote set to "${a}".`));
|
|
136545
|
-
},
|
|
136562
|
+
}, xi = async () => {
|
|
136546
136563
|
let e = new se(), t = await e.getRemotes(), n = await e.getDefaultRemote();
|
|
136547
136564
|
if (t.length === 0) {
|
|
136548
136565
|
console.log("No remotes configured."), console.log("Use 'twenty remote:add' to add one.");
|
|
@@ -136554,7 +136571,7 @@ ${t.message}`), t;
|
|
|
136554
136571
|
console.log(`${o}${s} ${vt.gray(t.apiUrl)} [${i}]`);
|
|
136555
136572
|
}
|
|
136556
136573
|
console.log("\n", vt.gray("Use 'twenty remote:use <name>' to change default"));
|
|
136557
|
-
},
|
|
136574
|
+
}, Si = async (e) => {
|
|
136558
136575
|
let t = new se(), n = e ?? (await yt.prompt([{
|
|
136559
136576
|
type: "select",
|
|
136560
136577
|
name: "remote",
|
|
@@ -136562,7 +136579,7 @@ ${t.message}`), t;
|
|
|
136562
136579
|
choices: await t.getRemotes()
|
|
136563
136580
|
}])).remote;
|
|
136564
136581
|
(await t.getRemotes()).includes(n) || (console.error(vt.red(`Remote "${n}" not found.`)), process.exit(1)), await t.setDefaultRemote(n), console.log(vt.green(`✓ Default remote set to "${n}".`));
|
|
136565
|
-
},
|
|
136582
|
+
}, Ci = async () => {
|
|
136566
136583
|
let e = new se(), t = new et(), n = se.getActiveRemote(), r = await e.getConfig(), i = r.twentyCLIAccessToken ? "oauth" : r.apiKey ? "api-key" : "none";
|
|
136567
136584
|
if (console.log(` Remote: ${vt.bold(n)}`), console.log(` Server: ${r.apiUrl}`), i === "none") {
|
|
136568
136585
|
console.log(` Auth: ${vt.yellow("not configured")}`);
|
|
@@ -136570,36 +136587,36 @@ ${t.message}`), t;
|
|
|
136570
136587
|
}
|
|
136571
136588
|
let { authValid: a } = await t.validateAuth(), o = a ? vt.green(`${i} (valid)`) : vt.red(`${i} (invalid)`);
|
|
136572
136589
|
console.log(` Auth: ${o}`);
|
|
136573
|
-
},
|
|
136590
|
+
}, wi = async (e) => {
|
|
136574
136591
|
let t = new se();
|
|
136575
136592
|
(await t.getRemotes()).includes(e) || (console.error(vt.red(`Remote "${e}" not found.`)), process.exit(1)), se.setActiveRemote(e), await t.clearConfig(), console.log(vt.green(`✓ Remote "${e}" removed.`));
|
|
136576
|
-
},
|
|
136577
|
-
e.command("remote:add").description("Add or re-authenticate a remote").option("--as <name>", "Name for this remote").option("--api-key <apiKey>", "API key for non-interactive auth").option("--url <url>", "Server URL").option("--api-url <apiUrl>", "[deprecated: use --url]").option("--local", "Connect to a local Twenty server (auto-detect)").option("--test", "Write to config.test.json (for integration tests)").action(
|
|
136593
|
+
}, Ti = (e) => {
|
|
136594
|
+
e.command("remote:add").description("Add or re-authenticate a remote").option("--as <name>", "Name for this remote").option("--api-key <apiKey>", "API key for non-interactive auth").option("--url <url>", "Server URL").option("--api-url <apiUrl>", "[deprecated: use --url]").option("--local", "Connect to a local Twenty server (auto-detect)").option("--test", "Write to config.test.json (for integration tests)").action(bi), e.command("remote:list").description("List all configured remotes").action(xi), e.command("remote:use [name]").description("Set the default remote").action(Si), e.command("remote:status").description("Show active remote auth status").action(Ci), e.command("remote:remove <name>").description("Remove a remote").action(wi);
|
|
136578
136595
|
let t = e.command("remote", { hidden: !0 }).description("Manage remote Twenty servers"), n = (e, t) => console.warn(vt.yellow(`⚠ \`twenty remote ${e}\` is deprecated. Use \`twenty ${t}\` instead.`));
|
|
136579
136596
|
t.command("add").option("--as <name>", "Name for this remote").option("--api-key <apiKey>", "API key for non-interactive auth").option("--url <url>", "Server URL").option("--api-url <apiUrl>", "[deprecated: use --url]").option("--local", "Connect to a local Twenty server (auto-detect)").option("--test", "Write to config.test.json (for integration tests)").action(async (e) => {
|
|
136580
|
-
n("add", "remote:add"), await
|
|
136597
|
+
n("add", "remote:add"), await bi(e);
|
|
136581
136598
|
}), t.command("list").action(async () => {
|
|
136582
|
-
n("list", "remote:list"), await
|
|
136599
|
+
n("list", "remote:list"), await xi();
|
|
136583
136600
|
}), t.command("switch [name]").action(async (e) => {
|
|
136584
|
-
n("switch", "remote:use"), await
|
|
136601
|
+
n("switch", "remote:use"), await Si(e);
|
|
136585
136602
|
}), t.command("status").action(async () => {
|
|
136586
|
-
n("status", "remote:status"), await
|
|
136603
|
+
n("status", "remote:status"), await Ci();
|
|
136587
136604
|
}), t.command("remove <name>").action(async (e) => {
|
|
136588
|
-
n("remove", "remote:remove"), await
|
|
136605
|
+
n("remove", "remote:remove"), await wi(e);
|
|
136589
136606
|
});
|
|
136590
|
-
},
|
|
136591
|
-
|
|
136607
|
+
}, Ei = (e) => {
|
|
136608
|
+
ci(e), z(e), hi(e), Ti(e), gn(e);
|
|
136592
136609
|
};
|
|
136593
136610
|
//#endregion
|
|
136594
136611
|
//#region src/cli/cli.ts
|
|
136595
136612
|
Et.defaultOptions.depth = 10;
|
|
136596
|
-
var
|
|
136597
|
-
|
|
136613
|
+
var Di = new wt();
|
|
136614
|
+
Di.name("twenty").description("CLI for Twenty application development").version(A.version), Di.option("-r, --remote <name>", "Use a specific remote (overrides the default set by remote:use)"), Di.hook("preAction", async (e) => {
|
|
136598
136615
|
let t = (e.optsWithGlobals ? e.optsWithGlobals() : e.opts()).remote;
|
|
136599
136616
|
t ? console.log(vt.gray(`Using remote: ${t}`)) : t = await new se().getDefaultRemote(), se.setActiveRemote(t);
|
|
136600
|
-
}),
|
|
136617
|
+
}), Ei(Di), Di.exitOverride();
|
|
136601
136618
|
try {
|
|
136602
|
-
|
|
136619
|
+
Di.parse();
|
|
136603
136620
|
} catch (e) {
|
|
136604
136621
|
e instanceof Tt && process.exit(e.exitCode), e instanceof Error && (console.error(vt.red("Error:"), e.message), process.exit(1));
|
|
136605
136622
|
}
|