twenty-sdk 2.21.0 → 2.23.0-alpha.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/dist/billing/index.cjs.map +1 -1
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{catalog-sync-DoBWDnCd.js → catalog-sync-Cq0X-dtP.js} +1 -1
- package/dist/{catalog-sync-CjqZ81jv.mjs → catalog-sync-DMB2-zfb.mjs} +1 -1
- package/dist/cli/utilities/build/manifest/utils/get-default-fields-in-object-fields.d.ts +1 -2
- package/dist/cli.cjs +7 -7
- package/dist/cli.mjs +56 -56
- package/dist/define/index.cjs +18 -18
- package/dist/define/index.cjs.map +1 -1
- package/dist/define/index.d.ts +62 -49
- package/dist/define/index.mjs +5575 -5266
- package/dist/define/index.mjs.map +1 -1
- package/dist/front-component/index.cjs.map +1 -1
- package/dist/front-component/index.d.ts +1 -0
- package/dist/front-component/index.mjs +1 -1
- package/dist/front-component/index.mjs.map +1 -1
- package/dist/{get-function-input-schema-GNk3NRLJ-C4DmUxTK.mjs → get-function-input-schema-GNk3NRLJ-DvySDoB9.mjs} +1 -1
- package/dist/logic-function/index.cjs.map +1 -1
- package/dist/logic-function/index.mjs.map +1 -1
- package/dist/{login-CIXRVsRD.mjs → login-CBkilp_U.mjs} +3213 -3006
- package/dist/{login-CZP9z64V.js → login-DiBaFL7M.js} +26 -26
- 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/utilities/build/manifest/utils/get-default-relation-object-fields.d.ts +0 -9
package/dist/cli.mjs
CHANGED
|
@@ -4,7 +4,7 @@ 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 { $ as a, At as o, B as s, C as c, Ct as l, Dt as u, E as d, Et as f, F as p, G as m, H as h, I as g, J as _, K as v, L as y, M as b, N as x, O as S, Ot as C, P as w, Q as T, R as E, S as D, St as O, Tt as k, U as A, V as j, W as ee, Z as te, _ as ne, _t as M, a as N, at as P, b as re, bt as ie, c as ae, ct as oe, d as se, dt as ce, f as le, ft as ue, g as de, gt as fe, h as F, ht as pe, i as me, it as he, jt as ge, k as _e, kt as ve, l as ye, lt as be, m as xe, mt as Se, n as Ce, nt as we, o as Te, ot as Ee, p as De, pt as I, rt as Oe, s as ke, st as Ae, t as je, tt as Me, u as Ne, ut as Pe, v as Fe, vt as Ie, w as Le, wt as Re, x as ze, xt as Be, y as Ve, yt as He, z as Ue } from "./login-
|
|
7
|
+
import { $ as a, At as o, B as s, C as c, Ct as l, Dt as u, E as d, Et as f, F as p, G as m, H as h, I as g, J as _, K as v, L as y, M as b, N as x, O as S, Ot as C, P as w, Q as T, R as E, S as D, St as O, Tt as k, U as A, V as j, W as ee, Z as te, _ as ne, _t as M, a as N, at as P, b as re, bt as ie, c as ae, ct as oe, d as se, dt as ce, f as le, ft as ue, g as de, gt as fe, h as F, ht as pe, i as me, it as he, jt as ge, k as _e, kt as ve, l as ye, lt as be, m as xe, mt as Se, n as Ce, nt as we, o as Te, ot as Ee, p as De, pt as I, rt as Oe, s as ke, st as Ae, t as je, tt as Me, u as Ne, ut as Pe, v as Fe, vt as Ie, w as Le, wt as Re, x as ze, xt as Be, y as Ve, yt as He, z as Ue } from "./login-CBkilp_U.mjs";
|
|
8
8
|
import We, { dirname as Ge, join as Ke, relative as qe } from "path";
|
|
9
9
|
import { readFile as Je, readdir as Ye, writeFile as Xe } from "node:fs/promises";
|
|
10
10
|
import { v4 as Ze } from "uuid";
|
|
@@ -3818,18 +3818,18 @@ export default defineViewField({
|
|
|
3818
3818
|
let { overwrite: e } = await this.handleFileExist();
|
|
3819
3819
|
if (!e) return;
|
|
3820
3820
|
}
|
|
3821
|
-
await Xe(c, s), console.log(ct.green(`✓ Created ${i}:`), ct.cyan(qe(ve, c))), r ===
|
|
3821
|
+
await Xe(c, s), console.log(ct.green(`✓ Created ${i}:`), ct.cyan(qe(ve, c))), r === fe.Object && await this.promptAndCreateObjectCompanions({
|
|
3822
3822
|
objectName: o,
|
|
3823
3823
|
applicationUniversalIdentifier: n,
|
|
3824
3824
|
customPath: t
|
|
3825
|
-
}), r ===
|
|
3825
|
+
}), r === fe.ConnectionProvider && await this.registerConnectionProviderServerVariables(o);
|
|
3826
3826
|
} catch (e) {
|
|
3827
3827
|
console.error(ct.red("Add new entity failed:"), e instanceof Error ? e.message : e), process.exit(1);
|
|
3828
3828
|
}
|
|
3829
3829
|
}
|
|
3830
3830
|
async getEntityData(e, t) {
|
|
3831
3831
|
switch (e) {
|
|
3832
|
-
case
|
|
3832
|
+
case fe.Object: {
|
|
3833
3833
|
let e = await this.getObjectData(), t = e.nameSingular, n = Ze(), r = Ze();
|
|
3834
3834
|
return this.lastObjectUniversalIdentifier = n, this.lastNameFieldUniversalIdentifier = r, this.lastObjectLabelSingular = e.labelSingular, {
|
|
3835
3835
|
name: t,
|
|
@@ -3841,7 +3841,7 @@ export default defineViewField({
|
|
|
3841
3841
|
})
|
|
3842
3842
|
};
|
|
3843
3843
|
}
|
|
3844
|
-
case
|
|
3844
|
+
case fe.Field: {
|
|
3845
3845
|
let e = await this.getFieldData(), t = e.name;
|
|
3846
3846
|
return {
|
|
3847
3847
|
name: t,
|
|
@@ -3851,49 +3851,49 @@ export default defineViewField({
|
|
|
3851
3851
|
})
|
|
3852
3852
|
};
|
|
3853
3853
|
}
|
|
3854
|
-
case
|
|
3854
|
+
case fe.LogicFunction: {
|
|
3855
3855
|
let t = await this.getEntityName(e);
|
|
3856
3856
|
return {
|
|
3857
3857
|
name: t,
|
|
3858
3858
|
file: Lt({ name: t })
|
|
3859
3859
|
};
|
|
3860
3860
|
}
|
|
3861
|
-
case
|
|
3861
|
+
case fe.FrontComponent: {
|
|
3862
3862
|
let t = await this.getEntityName(e);
|
|
3863
3863
|
return {
|
|
3864
3864
|
name: t,
|
|
3865
3865
|
file: It({ name: t })
|
|
3866
3866
|
};
|
|
3867
3867
|
}
|
|
3868
|
-
case
|
|
3868
|
+
case fe.Role: {
|
|
3869
3869
|
let t = await this.getEntityName(e);
|
|
3870
3870
|
return {
|
|
3871
3871
|
name: t,
|
|
3872
3872
|
file: Wt({ name: t })
|
|
3873
3873
|
};
|
|
3874
3874
|
}
|
|
3875
|
-
case
|
|
3875
|
+
case fe.Skill: {
|
|
3876
3876
|
let t = await this.getEntityName(e);
|
|
3877
3877
|
return {
|
|
3878
3878
|
name: t,
|
|
3879
3879
|
file: qt({ name: t })
|
|
3880
3880
|
};
|
|
3881
3881
|
}
|
|
3882
|
-
case
|
|
3882
|
+
case fe.Agent: {
|
|
3883
3883
|
let t = await this.getEntityName(e);
|
|
3884
3884
|
return {
|
|
3885
3885
|
name: t,
|
|
3886
3886
|
file: Gt({ name: t })
|
|
3887
3887
|
};
|
|
3888
3888
|
}
|
|
3889
|
-
case
|
|
3889
|
+
case fe.ConnectionProvider: {
|
|
3890
3890
|
let t = await this.getEntityName(e);
|
|
3891
3891
|
return {
|
|
3892
3892
|
name: t,
|
|
3893
3893
|
file: Kt({ name: t })
|
|
3894
3894
|
};
|
|
3895
3895
|
}
|
|
3896
|
-
case
|
|
3896
|
+
case fe.View: {
|
|
3897
3897
|
let e = (await this.getViewData()).name;
|
|
3898
3898
|
return {
|
|
3899
3899
|
name: e,
|
|
@@ -3903,18 +3903,18 @@ export default defineViewField({
|
|
|
3903
3903
|
})
|
|
3904
3904
|
};
|
|
3905
3905
|
}
|
|
3906
|
-
case
|
|
3906
|
+
case fe.ViewField: return {
|
|
3907
3907
|
name: await this.getEntityName(e),
|
|
3908
3908
|
file: Xt({})
|
|
3909
3909
|
};
|
|
3910
|
-
case
|
|
3910
|
+
case fe.NavigationMenuItem: {
|
|
3911
3911
|
let t = await this.getEntityName(e);
|
|
3912
3912
|
return {
|
|
3913
3913
|
name: t,
|
|
3914
3914
|
file: Rt({ name: t })
|
|
3915
3915
|
};
|
|
3916
3916
|
}
|
|
3917
|
-
case
|
|
3917
|
+
case fe.PageLayout: {
|
|
3918
3918
|
let t = await this.getEntityName(e), { type: n } = await lt.prompt([{
|
|
3919
3919
|
type: "select",
|
|
3920
3920
|
name: "type",
|
|
@@ -3929,14 +3929,14 @@ export default defineViewField({
|
|
|
3929
3929
|
})
|
|
3930
3930
|
};
|
|
3931
3931
|
}
|
|
3932
|
-
case
|
|
3932
|
+
case fe.PageLayoutTab: {
|
|
3933
3933
|
let t = await this.getEntityName(e);
|
|
3934
3934
|
return {
|
|
3935
3935
|
name: t,
|
|
3936
3936
|
file: Ht({ name: t })
|
|
3937
3937
|
};
|
|
3938
3938
|
}
|
|
3939
|
-
case
|
|
3939
|
+
case fe.CommandMenuItem: {
|
|
3940
3940
|
let t = await this.getEntityName(e);
|
|
3941
3941
|
return {
|
|
3942
3942
|
name: t,
|
|
@@ -3965,7 +3965,7 @@ export default defineViewField({
|
|
|
3965
3965
|
isVisible: !0,
|
|
3966
3966
|
size: 200
|
|
3967
3967
|
}] : []
|
|
3968
|
-
}), s = n ? Ke(ve, n) : Ke(ve, B, this.getFolderName(
|
|
3968
|
+
}), s = n ? Ke(ve, n) : Ke(ve, B, this.getFolderName(fe.View));
|
|
3969
3969
|
await be(s);
|
|
3970
3970
|
let c = Ke(s, `all-${Ft(e)}.ts`);
|
|
3971
3971
|
if (await Pe(c)) {
|
|
@@ -3990,7 +3990,7 @@ export default defineViewField({
|
|
|
3990
3990
|
name: e,
|
|
3991
3991
|
type: "OBJECT",
|
|
3992
3992
|
targetObjectUniversalIdentifier: this.lastObjectUniversalIdentifier
|
|
3993
|
-
}), p = n ? Ke(ve, n) : Ke(ve, B, this.getFolderName(
|
|
3993
|
+
}), p = n ? Ke(ve, n) : Ke(ve, B, this.getFolderName(fe.NavigationMenuItem));
|
|
3994
3994
|
await be(p);
|
|
3995
3995
|
let m = Ke(p, `${Ft(e)}.ts`);
|
|
3996
3996
|
if (await Pe(m)) {
|
|
@@ -4002,7 +4002,7 @@ export default defineViewField({
|
|
|
4002
4002
|
objectLabelSingular: this.lastObjectLabelSingular ?? e,
|
|
4003
4003
|
objectUniversalIdentifier: this.lastObjectUniversalIdentifier,
|
|
4004
4004
|
fieldsWidgetViewUniversalIdentifier: a
|
|
4005
|
-
}), g = n ? Ke(ve, n) : Ke(ve, B, this.getFolderName(
|
|
4005
|
+
}), g = n ? Ke(ve, n) : Ke(ve, B, this.getFolderName(fe.PageLayout));
|
|
4006
4006
|
await be(g);
|
|
4007
4007
|
let _ = Ke(g, `${Ft(e)}-record-page-layout.ts`);
|
|
4008
4008
|
if (await Pe(_)) {
|
|
@@ -4064,7 +4064,7 @@ export default defineViewField({
|
|
|
4064
4064
|
name: "entity",
|
|
4065
4065
|
message: "What entity do you want to create?",
|
|
4066
4066
|
default: "",
|
|
4067
|
-
choices: Object.values(
|
|
4067
|
+
choices: Object.values(fe)
|
|
4068
4068
|
}]);
|
|
4069
4069
|
return e;
|
|
4070
4070
|
}
|
|
@@ -4209,7 +4209,7 @@ export default defineViewField({
|
|
|
4209
4209
|
}
|
|
4210
4210
|
getFileName(e, t) {
|
|
4211
4211
|
switch (t) {
|
|
4212
|
-
case
|
|
4212
|
+
case fe.FrontComponent: return `${Ft(e)}.tsx`;
|
|
4213
4213
|
default: return `${Ft(e)}.ts`;
|
|
4214
4214
|
}
|
|
4215
4215
|
}
|
|
@@ -4363,7 +4363,7 @@ export default defineViewField({
|
|
|
4363
4363
|
}
|
|
4364
4364
|
}), e.command("catalog-sync", { hidden: !0 }).option("-r, --remote <name>", "Sync on a specific remote").action(async (e) => {
|
|
4365
4365
|
an("catalog-sync", "dev:catalog-sync");
|
|
4366
|
-
let { CatalogSyncCommand: t } = await import("./catalog-sync-
|
|
4366
|
+
let { CatalogSyncCommand: t } = await import("./catalog-sync-DMB2-zfb.mjs");
|
|
4367
4367
|
await new t().execute({ remote: e.remote });
|
|
4368
4368
|
});
|
|
4369
4369
|
}, sn = class {
|
|
@@ -4500,7 +4500,7 @@ export default defineViewField({
|
|
|
4500
4500
|
await this.watcher?.close();
|
|
4501
4501
|
}
|
|
4502
4502
|
async copyAndNotify(e) {
|
|
4503
|
-
let t = qe(this.appPath, e), n = Ke(
|
|
4503
|
+
let t = qe(this.appPath, e), n = Ke(Se, t), r = Ke(this.appPath, n);
|
|
4504
4504
|
await be(Ge(r)), await Ae(e, r);
|
|
4505
4505
|
let i = await Je(r), a = it.createHash("md5").update(i).digest("hex");
|
|
4506
4506
|
this.handleFileBuilt({
|
|
@@ -4511,7 +4511,7 @@ export default defineViewField({
|
|
|
4511
4511
|
});
|
|
4512
4512
|
}
|
|
4513
4513
|
async handleUnlink(e) {
|
|
4514
|
-
let t = Ke(
|
|
4514
|
+
let t = Ke(Se, qe(this.appPath, e));
|
|
4515
4515
|
await ue(Ke(this.appPath, t));
|
|
4516
4516
|
}
|
|
4517
4517
|
}, V = class {
|
|
@@ -4955,7 +4955,7 @@ export default defineViewField({
|
|
|
4955
4955
|
});
|
|
4956
4956
|
}
|
|
4957
4957
|
async start() {
|
|
4958
|
-
let e = We.join(this.state.appPath,
|
|
4958
|
+
let e = We.join(this.state.appPath, Se);
|
|
4959
4959
|
await be(e), await oe(e), this.state.addEvent({
|
|
4960
4960
|
message: `Using remote "${A.getActiveRemote()}"`,
|
|
4961
4961
|
status: "info"
|
|
@@ -5048,19 +5048,19 @@ export default defineViewField({
|
|
|
5048
5048
|
}), !0);
|
|
5049
5049
|
}
|
|
5050
5050
|
}, Cn = {
|
|
5051
|
-
objects:
|
|
5052
|
-
fields:
|
|
5053
|
-
logicFunctions:
|
|
5054
|
-
frontComponents:
|
|
5055
|
-
roles:
|
|
5056
|
-
skills:
|
|
5057
|
-
connectionProviders:
|
|
5058
|
-
views:
|
|
5059
|
-
viewFields:
|
|
5060
|
-
navigationMenuItems:
|
|
5061
|
-
pageLayouts:
|
|
5062
|
-
pageLayoutTabs:
|
|
5063
|
-
commandMenuItems:
|
|
5051
|
+
objects: fe.Object,
|
|
5052
|
+
fields: fe.Field,
|
|
5053
|
+
logicFunctions: fe.LogicFunction,
|
|
5054
|
+
frontComponents: fe.FrontComponent,
|
|
5055
|
+
roles: fe.Role,
|
|
5056
|
+
skills: fe.Skill,
|
|
5057
|
+
connectionProviders: fe.ConnectionProvider,
|
|
5058
|
+
views: fe.View,
|
|
5059
|
+
viewFields: fe.ViewField,
|
|
5060
|
+
navigationMenuItems: fe.NavigationMenuItem,
|
|
5061
|
+
pageLayouts: fe.PageLayout,
|
|
5062
|
+
pageLayoutTabs: fe.PageLayoutTab,
|
|
5063
|
+
commandMenuItems: fe.CommandMenuItem
|
|
5064
5064
|
}, wn = 200, Tn = {
|
|
5065
5065
|
pending: [
|
|
5066
5066
|
"building",
|
|
@@ -5280,20 +5280,20 @@ export default defineViewField({
|
|
|
5280
5280
|
"↑",
|
|
5281
5281
|
"⇡"
|
|
5282
5282
|
], Nn = {
|
|
5283
|
-
[
|
|
5284
|
-
[
|
|
5285
|
-
[
|
|
5286
|
-
[
|
|
5287
|
-
[
|
|
5288
|
-
[
|
|
5289
|
-
[
|
|
5290
|
-
[
|
|
5291
|
-
[
|
|
5292
|
-
[
|
|
5293
|
-
[
|
|
5294
|
-
[
|
|
5295
|
-
[
|
|
5296
|
-
[
|
|
5283
|
+
[fe.Object]: "Objects",
|
|
5284
|
+
[fe.Field]: "Fields",
|
|
5285
|
+
[fe.LogicFunction]: "Logic functions",
|
|
5286
|
+
[fe.FrontComponent]: "Front components",
|
|
5287
|
+
[fe.CommandMenuItem]: "Command menu items",
|
|
5288
|
+
[fe.Role]: "Roles",
|
|
5289
|
+
[fe.Skill]: "Skills",
|
|
5290
|
+
[fe.View]: "Views",
|
|
5291
|
+
[fe.ViewField]: "View fields",
|
|
5292
|
+
[fe.NavigationMenuItem]: "Navigation menu items",
|
|
5293
|
+
[fe.PageLayout]: "Page layouts",
|
|
5294
|
+
[fe.PageLayoutTab]: "Page layout tabs",
|
|
5295
|
+
[fe.Agent]: "Agents",
|
|
5296
|
+
[fe.ConnectionProvider]: "Connection providers"
|
|
5297
5297
|
}, Pn = Object.keys(Nn), Fn = {
|
|
5298
5298
|
info: "gray",
|
|
5299
5299
|
success: "green",
|
|
@@ -136245,10 +136245,10 @@ ${t.message}`), t;
|
|
|
136245
136245
|
});
|
|
136246
136246
|
}), e.command("dev:typecheck [appPath]").description("Run TypeScript type checking").action(async (e) => {
|
|
136247
136247
|
await i.execute({ appPath: ht(e) });
|
|
136248
|
-
}), e.command("dev:add [entityType]").description(`Scaffold a new entity (${Object.values(
|
|
136248
|
+
}), e.command("dev:add [entityType]").description(`Scaffold a new entity (${Object.values(fe).join("|")})`).option("--path <path>", "Path in which the entity should be created.").action(async (e, t) => {
|
|
136249
136249
|
await a.execute(e, t?.path);
|
|
136250
136250
|
}), e.command("dev:catalog-sync").description("Trigger marketplace catalog sync").option("-r, --remote <name>", "Sync on a specific remote").action(async (e) => {
|
|
136251
|
-
let { CatalogSyncCommand: t } = await import("./catalog-sync-
|
|
136251
|
+
let { CatalogSyncCommand: t } = await import("./catalog-sync-DMB2-zfb.mjs");
|
|
136252
136252
|
await new t().execute({ remote: e.remote });
|
|
136253
136253
|
}), e.command("dev:generate-client [appPath]").description("Generate the typed API client from the active remote (no app definition required)").action(async (e) => {
|
|
136254
136254
|
await o.execute({ appPath: ht(e) });
|
|
@@ -136335,7 +136335,7 @@ ${t.message}`), t;
|
|
|
136335
136335
|
n("upgrade", "docker:upgrade"), await $r(e, t);
|
|
136336
136336
|
}), t.command("catalog-sync").option("-r, --remote <name>", "Sync on a specific remote").action(async (e) => {
|
|
136337
136337
|
n("catalog-sync", "dev:catalog-sync");
|
|
136338
|
-
let { CatalogSyncCommand: t } = await import("./catalog-sync-
|
|
136338
|
+
let { CatalogSyncCommand: t } = await import("./catalog-sync-DMB2-zfb.mjs");
|
|
136339
136339
|
await new t().execute({ remote: e.remote });
|
|
136340
136340
|
});
|
|
136341
136341
|
}, ti = /^(\d{1,3}\.){3}\d{1,3}$/, ni = (e) => {
|