twenty-sdk 2.30.0 → 2.31.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 +20 -1
- package/dist/billing/index.cjs.map +1 -1
- package/dist/billing/index.mjs +2380 -18
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{catalog-sync-WmgvkRw7.mjs → catalog-sync-DNeKMZag.mjs} +1 -1
- package/dist/{catalog-sync-61JsVcDP.js → catalog-sync-Dm-JMzJE.js} +1 -1
- package/dist/cli.cjs +6 -6
- package/dist/cli.mjs +55 -55
- package/dist/define/index.cjs +24 -24
- package/dist/define/index.cjs.map +1 -1
- package/dist/define/index.d.ts +319 -844
- package/dist/define/index.mjs +6644 -6513
- package/dist/define/index.mjs.map +1 -1
- package/dist/front-component/index.cjs +3 -3
- package/dist/front-component/index.cjs.map +1 -1
- package/dist/front-component/index.mjs +460 -460
- package/dist/front-component/index.mjs.map +1 -1
- package/dist/{get-function-input-schema-GNk3NRLJ-DkTcUzrb.mjs → get-function-input-schema-GNk3NRLJ-DgTZrVOo.mjs} +1 -1
- package/dist/logic-function/index.cjs +26 -7
- package/dist/logic-function/index.cjs.map +1 -1
- package/dist/logic-function/index.mjs +2420 -56
- package/dist/logic-function/index.mjs.map +1 -1
- package/dist/{login-BnGCnmge.mjs → login-BtUz3jl-.mjs} +6173 -6041
- package/dist/{login-CM2Aug-k.js → login-MKVngbGb.js} +56 -56
- package/dist/operations.cjs +1 -1
- package/dist/operations.mjs +1 -1
- package/dist/utils/index.cjs +20 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.mjs +2375 -13
- package/dist/utils/index.mjs.map +1 -1
- package/package.json +2 -2
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, Mt as x, N as S, O as C, Ot as w, P as T, Q as E, R as D, S as O, St as k, Tt as A, U as ee, V as j, W as M, Z as te, _ as ne, _t as N, a as P, at as F, 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 I, 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 Oe, rt as ke, s as Ae, st as je, t as Me, tt as Ne, u as Pe, ut as Fe, v as Ie, vt as Le, w as Re, wt as ze, x as Be, xt as Ve, y as He, yt as Ue, z as We } 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, Mt as x, N as S, O as C, Ot as w, P as T, Q as E, R as D, S as O, St as k, Tt as A, U as ee, V as j, W as M, Z as te, _ as ne, _t as N, a as P, at as F, 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 I, 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 Oe, rt as ke, s as Ae, st as je, t as Me, tt as Ne, u as Pe, ut as Fe, v as Ie, vt as Le, w as Re, wt as ze, x as Be, xt as Ve, y as He, yt as Ue, z as We } from "./login-BtUz3jl-.mjs";
|
|
8
8
|
import Ge, { dirname as Ke, join as qe, relative as Je } from "path";
|
|
9
9
|
import { readFile as Ye, readdir as Xe, writeFile as Ze } from "node:fs/promises";
|
|
10
10
|
import { v4 as Qe } from "uuid";
|
|
@@ -3827,18 +3827,18 @@ export default defineViewField({
|
|
|
3827
3827
|
let { overwrite: e } = await this.handleFileExist();
|
|
3828
3828
|
if (!e) return;
|
|
3829
3829
|
}
|
|
3830
|
-
await Ze(l, c), console.log(lt.green(`✓ Created ${i}:`), lt.cyan(Je(o, l))), r ===
|
|
3830
|
+
await Ze(l, c), console.log(lt.green(`✓ Created ${i}:`), lt.cyan(Je(o, l))), r === fe.Object && await this.promptAndCreateObjectCompanions({
|
|
3831
3831
|
objectName: s,
|
|
3832
3832
|
applicationUniversalIdentifier: n,
|
|
3833
3833
|
customPath: t
|
|
3834
|
-
}), r ===
|
|
3834
|
+
}), r === fe.ConnectionProvider && await this.registerConnectionProviderServerVariables(s);
|
|
3835
3835
|
} catch (e) {
|
|
3836
3836
|
console.error(lt.red("Add new entity failed:"), e instanceof Error ? e.message : e), process.exit(1);
|
|
3837
3837
|
}
|
|
3838
3838
|
}
|
|
3839
3839
|
async getEntityData(e, t) {
|
|
3840
3840
|
switch (e) {
|
|
3841
|
-
case
|
|
3841
|
+
case fe.Object: {
|
|
3842
3842
|
let e = await this.getObjectData(), t = e.nameSingular, n = Qe(), r = Qe();
|
|
3843
3843
|
return this.lastObjectUniversalIdentifier = n, this.lastNameFieldUniversalIdentifier = r, this.lastObjectLabelSingular = e.labelSingular, {
|
|
3844
3844
|
name: t,
|
|
@@ -3850,7 +3850,7 @@ export default defineViewField({
|
|
|
3850
3850
|
})
|
|
3851
3851
|
};
|
|
3852
3852
|
}
|
|
3853
|
-
case
|
|
3853
|
+
case fe.Field: {
|
|
3854
3854
|
let e = await this.getFieldData(), t = e.name;
|
|
3855
3855
|
return {
|
|
3856
3856
|
name: t,
|
|
@@ -3860,49 +3860,49 @@ export default defineViewField({
|
|
|
3860
3860
|
})
|
|
3861
3861
|
};
|
|
3862
3862
|
}
|
|
3863
|
-
case
|
|
3863
|
+
case fe.LogicFunction: {
|
|
3864
3864
|
let t = await this.getEntityName(e);
|
|
3865
3865
|
return {
|
|
3866
3866
|
name: t,
|
|
3867
3867
|
file: Rt({ name: t })
|
|
3868
3868
|
};
|
|
3869
3869
|
}
|
|
3870
|
-
case
|
|
3870
|
+
case fe.FrontComponent: {
|
|
3871
3871
|
let t = await this.getEntityName(e);
|
|
3872
3872
|
return {
|
|
3873
3873
|
name: t,
|
|
3874
3874
|
file: Lt({ name: t })
|
|
3875
3875
|
};
|
|
3876
3876
|
}
|
|
3877
|
-
case
|
|
3877
|
+
case fe.Role: {
|
|
3878
3878
|
let t = await this.getEntityName(e);
|
|
3879
3879
|
return {
|
|
3880
3880
|
name: t,
|
|
3881
3881
|
file: Gt({ name: t })
|
|
3882
3882
|
};
|
|
3883
3883
|
}
|
|
3884
|
-
case
|
|
3884
|
+
case fe.Skill: {
|
|
3885
3885
|
let t = await this.getEntityName(e);
|
|
3886
3886
|
return {
|
|
3887
3887
|
name: t,
|
|
3888
3888
|
file: Jt({ name: t })
|
|
3889
3889
|
};
|
|
3890
3890
|
}
|
|
3891
|
-
case
|
|
3891
|
+
case fe.Agent: {
|
|
3892
3892
|
let t = await this.getEntityName(e);
|
|
3893
3893
|
return {
|
|
3894
3894
|
name: t,
|
|
3895
3895
|
file: Kt({ name: t })
|
|
3896
3896
|
};
|
|
3897
3897
|
}
|
|
3898
|
-
case
|
|
3898
|
+
case fe.ConnectionProvider: {
|
|
3899
3899
|
let t = await this.getEntityName(e);
|
|
3900
3900
|
return {
|
|
3901
3901
|
name: t,
|
|
3902
3902
|
file: qt({ name: t })
|
|
3903
3903
|
};
|
|
3904
3904
|
}
|
|
3905
|
-
case
|
|
3905
|
+
case fe.View: {
|
|
3906
3906
|
let e = (await this.getViewData()).name;
|
|
3907
3907
|
return {
|
|
3908
3908
|
name: e,
|
|
@@ -3912,18 +3912,18 @@ export default defineViewField({
|
|
|
3912
3912
|
})
|
|
3913
3913
|
};
|
|
3914
3914
|
}
|
|
3915
|
-
case
|
|
3915
|
+
case fe.ViewField: return {
|
|
3916
3916
|
name: await this.getEntityName(e),
|
|
3917
3917
|
file: Zt({})
|
|
3918
3918
|
};
|
|
3919
|
-
case
|
|
3919
|
+
case fe.NavigationMenuItem: {
|
|
3920
3920
|
let t = await this.getEntityName(e);
|
|
3921
3921
|
return {
|
|
3922
3922
|
name: t,
|
|
3923
3923
|
file: zt({ name: t })
|
|
3924
3924
|
};
|
|
3925
3925
|
}
|
|
3926
|
-
case
|
|
3926
|
+
case fe.PageLayout: {
|
|
3927
3927
|
let t = await this.getEntityName(e), { type: n } = await ut.prompt([{
|
|
3928
3928
|
type: "select",
|
|
3929
3929
|
name: "type",
|
|
@@ -3938,14 +3938,14 @@ export default defineViewField({
|
|
|
3938
3938
|
})
|
|
3939
3939
|
};
|
|
3940
3940
|
}
|
|
3941
|
-
case
|
|
3941
|
+
case fe.PageLayoutTab: {
|
|
3942
3942
|
let t = await this.getEntityName(e);
|
|
3943
3943
|
return {
|
|
3944
3944
|
name: t,
|
|
3945
3945
|
file: Ut({ name: t })
|
|
3946
3946
|
};
|
|
3947
3947
|
}
|
|
3948
|
-
case
|
|
3948
|
+
case fe.CommandMenuItem: {
|
|
3949
3949
|
let t = await this.getEntityName(e);
|
|
3950
3950
|
return {
|
|
3951
3951
|
name: t,
|
|
@@ -3974,7 +3974,7 @@ export default defineViewField({
|
|
|
3974
3974
|
isVisible: !0,
|
|
3975
3975
|
size: 200
|
|
3976
3976
|
}] : []
|
|
3977
|
-
}), c = n ? qe(o, n) : qe(o, Qt, this.getFolderName(
|
|
3977
|
+
}), c = n ? qe(o, n) : qe(o, Qt, this.getFolderName(fe.View));
|
|
3978
3978
|
await be(c);
|
|
3979
3979
|
let l = qe(c, `all-${It(e)}.ts`);
|
|
3980
3980
|
if (await Fe(l)) {
|
|
@@ -3999,7 +3999,7 @@ export default defineViewField({
|
|
|
3999
3999
|
name: e,
|
|
4000
4000
|
type: "OBJECT",
|
|
4001
4001
|
targetObjectUniversalIdentifier: this.lastObjectUniversalIdentifier
|
|
4002
|
-
}), m = n ? qe(o, n) : qe(o, Qt, this.getFolderName(
|
|
4002
|
+
}), m = n ? qe(o, n) : qe(o, Qt, this.getFolderName(fe.NavigationMenuItem));
|
|
4003
4003
|
await be(m);
|
|
4004
4004
|
let h = qe(m, `${It(e)}.ts`);
|
|
4005
4005
|
if (await Fe(h)) {
|
|
@@ -4011,7 +4011,7 @@ export default defineViewField({
|
|
|
4011
4011
|
objectLabelSingular: this.lastObjectLabelSingular ?? e,
|
|
4012
4012
|
objectUniversalIdentifier: this.lastObjectUniversalIdentifier,
|
|
4013
4013
|
fieldsWidgetViewUniversalIdentifier: a
|
|
4014
|
-
}), _ = n ? qe(o, n) : qe(o, Qt, this.getFolderName(
|
|
4014
|
+
}), _ = n ? qe(o, n) : qe(o, Qt, this.getFolderName(fe.PageLayout));
|
|
4015
4015
|
await be(_);
|
|
4016
4016
|
let v = qe(_, `${It(e)}-record-page-layout.ts`);
|
|
4017
4017
|
if (await Fe(v)) {
|
|
@@ -4073,7 +4073,7 @@ export default defineViewField({
|
|
|
4073
4073
|
name: "entity",
|
|
4074
4074
|
message: "What entity do you want to create?",
|
|
4075
4075
|
default: "",
|
|
4076
|
-
choices: Object.values(
|
|
4076
|
+
choices: Object.values(fe)
|
|
4077
4077
|
}]);
|
|
4078
4078
|
return e;
|
|
4079
4079
|
}
|
|
@@ -4218,7 +4218,7 @@ export default defineViewField({
|
|
|
4218
4218
|
}
|
|
4219
4219
|
getFileName(e, t) {
|
|
4220
4220
|
switch (t) {
|
|
4221
|
-
case
|
|
4221
|
+
case fe.FrontComponent: return `${It(e)}.tsx`;
|
|
4222
4222
|
default: return `${It(e)}.ts`;
|
|
4223
4223
|
}
|
|
4224
4224
|
}
|
|
@@ -4376,7 +4376,7 @@ export default defineViewField({
|
|
|
4376
4376
|
}
|
|
4377
4377
|
}), e.command("catalog-sync", { hidden: !0 }).option("-r, --remote <name>", "Sync on a specific remote").action(async (e) => {
|
|
4378
4378
|
on("catalog-sync", "dev:catalog-sync");
|
|
4379
|
-
let { CatalogSyncCommand: t } = await import("./catalog-sync-
|
|
4379
|
+
let { CatalogSyncCommand: t } = await import("./catalog-sync-DNeKMZag.mjs");
|
|
4380
4380
|
await new t().execute({ remote: e.remote });
|
|
4381
4381
|
});
|
|
4382
4382
|
}, cn = class {
|
|
@@ -4603,7 +4603,7 @@ export default defineViewField({
|
|
|
4603
4603
|
}
|
|
4604
4604
|
}), this.watcher.on("all", (e, t) => {
|
|
4605
4605
|
if (e === "addDir" || e === "unlinkDir") return;
|
|
4606
|
-
let n = Je(this.appPath, t), r = n.startsWith(
|
|
4606
|
+
let n = Je(this.appPath, t), r = n.startsWith(pe), i = ["package.json", "yarn.lock"].includes(n);
|
|
4607
4607
|
!(n.endsWith(".ts") || n.endsWith(".tsx")) && !r && !i || this.handleChangeDetected(n, e);
|
|
4608
4608
|
});
|
|
4609
4609
|
}
|
|
@@ -4699,7 +4699,7 @@ export default defineViewField({
|
|
|
4699
4699
|
this.assetWatcher = new V({
|
|
4700
4700
|
appPath: this.state.appPath,
|
|
4701
4701
|
fileFolder: l.PublicAsset,
|
|
4702
|
-
watchPaths: [
|
|
4702
|
+
watchPaths: [pe],
|
|
4703
4703
|
handleFileBuilt: this.handleFileBuilt.bind(this)
|
|
4704
4704
|
}), await this.assetWatcher.start();
|
|
4705
4705
|
}
|
|
@@ -5061,19 +5061,19 @@ export default defineViewField({
|
|
|
5061
5061
|
}), !0);
|
|
5062
5062
|
}
|
|
5063
5063
|
}, wn = {
|
|
5064
|
-
objects:
|
|
5065
|
-
fields:
|
|
5066
|
-
logicFunctions:
|
|
5067
|
-
frontComponents:
|
|
5068
|
-
roles:
|
|
5069
|
-
skills:
|
|
5070
|
-
connectionProviders:
|
|
5071
|
-
views:
|
|
5072
|
-
viewFields:
|
|
5073
|
-
navigationMenuItems:
|
|
5074
|
-
pageLayouts:
|
|
5075
|
-
pageLayoutTabs:
|
|
5076
|
-
commandMenuItems:
|
|
5064
|
+
objects: fe.Object,
|
|
5065
|
+
fields: fe.Field,
|
|
5066
|
+
logicFunctions: fe.LogicFunction,
|
|
5067
|
+
frontComponents: fe.FrontComponent,
|
|
5068
|
+
roles: fe.Role,
|
|
5069
|
+
skills: fe.Skill,
|
|
5070
|
+
connectionProviders: fe.ConnectionProvider,
|
|
5071
|
+
views: fe.View,
|
|
5072
|
+
viewFields: fe.ViewField,
|
|
5073
|
+
navigationMenuItems: fe.NavigationMenuItem,
|
|
5074
|
+
pageLayouts: fe.PageLayout,
|
|
5075
|
+
pageLayoutTabs: fe.PageLayoutTab,
|
|
5076
|
+
commandMenuItems: fe.CommandMenuItem
|
|
5077
5077
|
}, Tn = 200, En = {
|
|
5078
5078
|
pending: [
|
|
5079
5079
|
"building",
|
|
@@ -5293,20 +5293,20 @@ export default defineViewField({
|
|
|
5293
5293
|
"↑",
|
|
5294
5294
|
"⇡"
|
|
5295
5295
|
], Pn = {
|
|
5296
|
-
[
|
|
5297
|
-
[
|
|
5298
|
-
[
|
|
5299
|
-
[
|
|
5300
|
-
[
|
|
5301
|
-
[
|
|
5302
|
-
[
|
|
5303
|
-
[
|
|
5304
|
-
[
|
|
5305
|
-
[
|
|
5306
|
-
[
|
|
5307
|
-
[
|
|
5308
|
-
[
|
|
5309
|
-
[
|
|
5296
|
+
[fe.Object]: "Objects",
|
|
5297
|
+
[fe.Field]: "Fields",
|
|
5298
|
+
[fe.LogicFunction]: "Logic functions",
|
|
5299
|
+
[fe.FrontComponent]: "Front components",
|
|
5300
|
+
[fe.CommandMenuItem]: "Command menu items",
|
|
5301
|
+
[fe.Role]: "Roles",
|
|
5302
|
+
[fe.Skill]: "Skills",
|
|
5303
|
+
[fe.View]: "Views",
|
|
5304
|
+
[fe.ViewField]: "View fields",
|
|
5305
|
+
[fe.NavigationMenuItem]: "Navigation menu items",
|
|
5306
|
+
[fe.PageLayout]: "Page layouts",
|
|
5307
|
+
[fe.PageLayoutTab]: "Page layout tabs",
|
|
5308
|
+
[fe.Agent]: "Agents",
|
|
5309
|
+
[fe.ConnectionProvider]: "Connection providers"
|
|
5310
5310
|
}, Fn = Object.keys(Pn), In = {
|
|
5311
5311
|
info: "gray",
|
|
5312
5312
|
success: "green",
|
|
@@ -136290,10 +136290,10 @@ ${t.message}`), t;
|
|
|
136290
136290
|
});
|
|
136291
136291
|
}), e.command("dev:typecheck [appPath]").description("Run TypeScript type checking").action(async (e) => {
|
|
136292
136292
|
await i.execute({ appPath: gt(e) });
|
|
136293
|
-
}), e.command("dev:add [entityType]").description(`Scaffold a new entity (${Object.values(
|
|
136293
|
+
}), 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) => {
|
|
136294
136294
|
await a.execute(e, t?.path);
|
|
136295
136295
|
}), e.command("dev:catalog-sync").description("Trigger marketplace catalog sync").option("-r, --remote <name>", "Sync on a specific remote").action(async (e) => {
|
|
136296
|
-
let { CatalogSyncCommand: t } = await import("./catalog-sync-
|
|
136296
|
+
let { CatalogSyncCommand: t } = await import("./catalog-sync-DNeKMZag.mjs");
|
|
136297
136297
|
await new t().execute({ remote: e.remote });
|
|
136298
136298
|
}), e.command("dev:generate-client [appPath]").description("Generate the typed API client from the active remote (no app definition required)").action(async (e) => {
|
|
136299
136299
|
await o.execute({ appPath: gt(e) });
|
|
@@ -136380,7 +136380,7 @@ ${t.message}`), t;
|
|
|
136380
136380
|
n("upgrade", "docker:upgrade"), await ei(e, t);
|
|
136381
136381
|
}), t.command("catalog-sync").option("-r, --remote <name>", "Sync on a specific remote").action(async (e) => {
|
|
136382
136382
|
n("catalog-sync", "dev:catalog-sync");
|
|
136383
|
-
let { CatalogSyncCommand: t } = await import("./catalog-sync-
|
|
136383
|
+
let { CatalogSyncCommand: t } = await import("./catalog-sync-DNeKMZag.mjs");
|
|
136384
136384
|
await new t().execute({ remote: e.remote });
|
|
136385
136385
|
});
|
|
136386
136386
|
}, ni = /^(\d{1,3}\.){3}\d{1,3}$/, ri = (e) => {
|