twenty-sdk 2.50.0 → 2.51.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/build/descriptor.json +1 -1
  2. package/dist/{build-snapshot-DlB2VyNd.mjs → build-snapshot--GXJr4vI.mjs} +2 -2
  3. package/dist/{build-snapshot-C-NQg7fn.js → build-snapshot-D38u-ntr.js} +1 -1
  4. package/dist/build.cjs +1 -1
  5. package/dist/build.mjs +2 -2
  6. package/dist/{catalog-sync-C6jv_xoa.mjs → catalog-sync-BMUVC4nI.mjs} +1 -1
  7. package/dist/{catalog-sync-DxcdSEBJ.js → catalog-sync-D5e5_2jo.js} +1 -1
  8. package/dist/cli/utilities/build/common/front-component-build/css-injection-plugin.d.ts +1 -2
  9. package/dist/cli/utilities/build/common/front-component-build/utils/unwrap-define-front-component-to-direct-export.d.ts +1 -1
  10. package/dist/cli.cjs +11 -11
  11. package/dist/cli.mjs +113 -113
  12. package/dist/{compile-application-BFhqkVqO.js → compile-application-BPxjs2Co.js} +5 -5
  13. package/dist/{compile-application-B2LfsDBX.mjs → compile-application-CU3rJlps.mjs} +1380 -1376
  14. package/dist/define/index.cjs +15 -12
  15. package/dist/define/index.cjs.map +1 -1
  16. package/dist/define/index.d.ts +22 -5
  17. package/dist/define/index.mjs +5555 -5128
  18. package/dist/define/index.mjs.map +1 -1
  19. package/dist/front-component/index.cjs +1 -1
  20. package/dist/front-component/index.cjs.map +1 -1
  21. package/dist/front-component/index.d.ts +6 -1
  22. package/dist/front-component/index.mjs +26 -15
  23. package/dist/front-component/index.mjs.map +1 -1
  24. package/dist/front-component-renderer/build.cjs +1 -1
  25. package/dist/front-component-renderer/build.mjs +1 -1
  26. package/dist/get-front-component-build-plugins-B0LNjbg4.js +883 -0
  27. package/dist/{get-front-component-build-plugins-QXeU8MwC.mjs → get-front-component-build-plugins-CnwC-jU8.mjs} +7178 -6721
  28. package/dist/logic-function/index.cjs.map +1 -1
  29. package/dist/logic-function/index.mjs.map +1 -1
  30. package/dist/{login-_eABINVq.mjs → login-B-j7rN0L.mjs} +466 -466
  31. package/dist/{login-DkjpI4jn.js → login-CLfFxyR3.js} +9 -9
  32. package/dist/operations.cjs +1 -1
  33. package/dist/operations.mjs +2 -2
  34. package/dist/{package-DftRfrG7.mjs → package-Blg6y0Gq.mjs} +6 -1
  35. package/dist/package-sw5GnVdj.js +1 -0
  36. package/dist/{typecheck-application-DIe_vwjU.mjs → typecheck-application-aR7mCSHB.mjs} +1 -1
  37. package/package.json +8 -3
  38. package/dist/get-front-component-build-plugins-BcUjFnki.js +0 -880
  39. package/dist/package-vtLsH5RS.js +0 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "protocolVersion": 1,
3
- "sdkVersion": "2.50.0",
3
+ "sdkVersion": "2.51.3",
4
4
  "requiredNode": "^24.5.0",
5
5
  "capabilities": [
6
6
  "build",
@@ -2,8 +2,8 @@ import { createRequire as e } from "node:module";
2
2
  import { fileURLToPath as t } from "node:url";
3
3
  import { dirname as n } from "node:path";
4
4
  e(import.meta.url), n(t(import.meta.url));
5
- import { ht as r } from "./get-front-component-build-plugins-QXeU8MwC.mjs";
6
- import { t as i } from "./compile-application-B2LfsDBX.mjs";
5
+ import { St as r } from "./get-front-component-build-plugins-CnwC-jU8.mjs";
6
+ import { t as i } from "./compile-application-CU3rJlps.mjs";
7
7
  import { t as a } from "./isDefined-Dtu5EYqP-CX5uLGda.mjs";
8
8
  import { t as o } from "./validate-app-path-vPGkNVkV.mjs";
9
9
  import { isNonEmptyString as s } from "@sniptt/guards";
@@ -1,2 +1,2 @@
1
- const e=require("./isDefined-Dtu5EYqP-CGZoVWsO.js"),t=require("./compile-application-BFhqkVqO.js"),n=require("./get-front-component-build-plugins-BcUjFnki.js"),r=require("./validate-app-path-Dau-PC0a.js");let i=require("@sniptt/guards"),a=require("node:fs/promises"),o=require("node:fs"),s=require("node:path"),c=require("node:crypto");var l={[n.ht.BuiltLogicFunction]:`built-logic-function`,[n.ht.BuiltFrontComponent]:`built-front-component`,[n.ht.Source]:`source`,[n.ht.Dependencies]:`dependencies`,[n.ht.PublicAsset]:`public-asset`},u=async({appPath:t,buildId:n,filesDirectory:r,manifest:u,builtFileInfos:d,signal:f})=>{let p=[];for(let n of d.values()){f?.throwIfAborted();let i=(0,s.join)(t,n.builtPath),a=(0,s.relative)(r,i),u=l[n.fileFolder];if(!e.t(u)||(0,s.isAbsolute)(a)||a===`..`||a.startsWith(`..${s.sep}`))throw Error(`Invalid snapshot artifact: ${n.builtPath}`);let d=(0,c.createHash)(`sha256`),m=0;for await(let e of(0,o.createReadStream)(i,{signal:f}))d.update(e),m+=e.length;p.push({path:a.split(s.sep).join(`/`),sourcePath:n.sourcePath.split(s.sep).join(`/`),role:u,size:m,sha256:d.digest(`hex`)})}let m=p.sort((e,t)=>e.path<t.path?-1:+(e.path>t.path)),h=await(0,a.readFile)((0,s.join)(r,`manifest.json`)),g=(0,c.createHash)(`sha256`).update(JSON.stringify(m.map(({path:e,role:t,sha256:n})=>({path:e,role:t,sha256:n})))).update(`
1
+ const e=require("./isDefined-Dtu5EYqP-CGZoVWsO.js"),t=require("./compile-application-BPxjs2Co.js"),n=require("./get-front-component-build-plugins-B0LNjbg4.js"),r=require("./validate-app-path-Dau-PC0a.js");let i=require("@sniptt/guards"),a=require("node:fs/promises"),o=require("node:fs"),s=require("node:path"),c=require("node:crypto");var l={[n.St.BuiltLogicFunction]:`built-logic-function`,[n.St.BuiltFrontComponent]:`built-front-component`,[n.St.Source]:`source`,[n.St.Dependencies]:`dependencies`,[n.St.PublicAsset]:`public-asset`},u=async({appPath:t,buildId:n,filesDirectory:r,manifest:u,builtFileInfos:d,signal:f})=>{let p=[];for(let n of d.values()){f?.throwIfAborted();let i=(0,s.join)(t,n.builtPath),a=(0,s.relative)(r,i),u=l[n.fileFolder];if(!e.t(u)||(0,s.isAbsolute)(a)||a===`..`||a.startsWith(`..${s.sep}`))throw Error(`Invalid snapshot artifact: ${n.builtPath}`);let d=(0,c.createHash)(`sha256`),m=0;for await(let e of(0,o.createReadStream)(i,{signal:f}))d.update(e),m+=e.length;p.push({path:a.split(s.sep).join(`/`),sourcePath:n.sourcePath.split(s.sep).join(`/`),role:u,size:m,sha256:d.digest(`hex`)})}let m=p.sort((e,t)=>e.path<t.path?-1:+(e.path>t.path)),h=await(0,a.readFile)((0,s.join)(r,`manifest.json`)),g=(0,c.createHash)(`sha256`).update(JSON.stringify(m.map(({path:e,role:t,sha256:n})=>({path:e,role:t,sha256:n})))).update(`
2
2
  `).update(h).digest(`hex`),_=JSON.parse(await(0,a.readFile)((0,s.join)(r,`package.json`),`utf8`));if(!(0,i.isNonEmptyString)(_.name))throw Error(`The app package.json must declare a name.`);return{buildId:n,directory:r,contentHash:g,application:{universalIdentifier:u.application.universalIdentifier,name:_.name,displayName:u.application.displayName},manifestFormat:`twenty-application`,manifest:u,files:m}},d=new Map,f=async({appPath:n,signal:i})=>{let o=await r.t(n);if(!o.success)return o;let l,f=[],p=async()=>{if(e.t(l))try{await(0,a.rm)(l,{recursive:!0,force:!0})}catch(e){f.push({severity:`warning`,code:`SNAPSHOT_CLEANUP_FAILED`,message:`Could not remove snapshot ${l}: ${e instanceof Error?e.message:String(e)}`})}};try{i?.throwIfAborted();let e=(0,c.randomUUID)(),r=(0,s.join)(n,`.twenty`,`snapshots`);await(0,a.mkdir)(r,{recursive:!0}),l=await(0,a.mkdtemp)((0,s.join)(r,`build-`)),await(0,a.writeFile)((0,s.join)(l,`lease.json`),JSON.stringify({buildId:e,pid:process.pid,createdAt:new Date().toISOString()}),{flag:`wx`});let o=(0,s.join)(l,`files`),m=await t.t({appPath:n,outputDir:(0,s.relative)(n,o),dereferenceSymlinks:!0,signal:i});if(f.push(...m.diagnostics),!m.success)return await p(),{...m,diagnostics:f};let h=await u({appPath:n,buildId:e,filesDirectory:o,manifest:m.data.manifest,builtFileInfos:m.data.builtFileInfos,signal:i});return i?.throwIfAborted(),d.set(e,l),{success:!0,data:h,diagnostics:f}}catch(e){return await p(),{success:!1,error:{code:i?.aborted?`CANCELLED`:`BUILD_FAILED`,message:e instanceof Error?e.message:String(e)},diagnostics:f}}},p=async({buildId:t})=>{let n=d.get(t);if(!e.t(n))return{success:!1,error:{code:`SNAPSHOT_NOT_FOUND`,message:`This SDK instance does not hold the requested snapshot.`},diagnostics:[]};try{return await(0,a.rm)(n,{recursive:!0,force:!0}),d.delete(t),{success:!0,data:null,diagnostics:[]}}catch(e){return{success:!1,error:{code:`SNAPSHOT_RELEASE_FAILED`,message:e instanceof Error?e.message:String(e)},diagnostics:[]}}};exports.buildSnapshot=f,exports.releaseSnapshot=p;
package/dist/build.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./package-vtLsH5RS.js");var t={protocolVersion:1,sdkVersion:e.t.version,requiredNode:e.t.engines.node,capabilities:[`build`,`typecheck`,`releaseSnapshot`,`generateClient`],fileWrites:{build:[`.twenty/snapshots/**`],typecheck:[],releaseSnapshot:[`.twenty/snapshots/**`],generateClient:[`node_modules/twenty-client-sdk/dist/core/generated/**`,`node_modules/twenty-client-sdk/dist/core/generated.tmp/**`,`node_modules/twenty-client-sdk/dist/core.mjs`,`node_modules/twenty-client-sdk/dist/core.cjs`]}},n=async e=>(await Promise.resolve().then(()=>require("./build-snapshot-C-NQg7fn.js"))).buildSnapshot(e),r=async e=>(await Promise.resolve().then(()=>require("./typecheck-application-BsaeLeXz.js")).then(e=>e.n)).typecheckApplication(e),i=async e=>(await Promise.resolve().then(()=>require("./build-snapshot-C-NQg7fn.js"))).releaseSnapshot(e),a=async e=>(await Promise.resolve().then(()=>require("./generate-application-client-C9dcaycG.js"))).generateApplicationClient(e);exports.BUILD_DESCRIPTOR=t,exports.buildAppSnapshot=n,exports.generateAppClient=a,exports.releaseAppSnapshot=i,exports.typecheckApp=r;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./package-sw5GnVdj.js");var t={protocolVersion:1,sdkVersion:e.t.version,requiredNode:e.t.engines.node,capabilities:[`build`,`typecheck`,`releaseSnapshot`,`generateClient`],fileWrites:{build:[`.twenty/snapshots/**`],typecheck:[],releaseSnapshot:[`.twenty/snapshots/**`],generateClient:[`node_modules/twenty-client-sdk/dist/core/generated/**`,`node_modules/twenty-client-sdk/dist/core/generated.tmp/**`,`node_modules/twenty-client-sdk/dist/core.mjs`,`node_modules/twenty-client-sdk/dist/core.cjs`]}},n=async e=>(await Promise.resolve().then(()=>require("./build-snapshot-D38u-ntr.js"))).buildSnapshot(e),r=async e=>(await Promise.resolve().then(()=>require("./typecheck-application-BsaeLeXz.js")).then(e=>e.n)).typecheckApplication(e),i=async e=>(await Promise.resolve().then(()=>require("./build-snapshot-D38u-ntr.js"))).releaseSnapshot(e),a=async e=>(await Promise.resolve().then(()=>require("./generate-application-client-C9dcaycG.js"))).generateApplicationClient(e);exports.BUILD_DESCRIPTOR=t,exports.buildAppSnapshot=n,exports.generateAppClient=a,exports.releaseAppSnapshot=i,exports.typecheckApp=r;
package/dist/build.mjs CHANGED
@@ -2,7 +2,7 @@ import { createRequire as e } from "node:module";
2
2
  import { fileURLToPath as t } from "node:url";
3
3
  import { dirname as n } from "node:path";
4
4
  e(import.meta.url), n(t(import.meta.url));
5
- import { t as r } from "./package-DftRfrG7.mjs";
5
+ import { t as r } from "./package-Blg6y0Gq.mjs";
6
6
  //#region src/application-build/build-descriptor.ts
7
7
  var i = {
8
8
  protocolVersion: 1,
@@ -25,6 +25,6 @@ var i = {
25
25
  "node_modules/twenty-client-sdk/dist/core.cjs"
26
26
  ]
27
27
  }
28
- }, a = async (e) => (await import("./build-snapshot-DlB2VyNd.mjs")).buildSnapshot(e), o = async (e) => (await import("./typecheck-application-DIe_vwjU.mjs").then((e) => e.n)).typecheckApplication(e), s = async (e) => (await import("./build-snapshot-DlB2VyNd.mjs")).releaseSnapshot(e), c = async (e) => (await import("./generate-application-client-B96EJz8O.mjs")).generateApplicationClient(e);
28
+ }, a = async (e) => (await import("./build-snapshot--GXJr4vI.mjs")).buildSnapshot(e), o = async (e) => (await import("./typecheck-application-aR7mCSHB.mjs").then((e) => e.n)).typecheckApplication(e), s = async (e) => (await import("./build-snapshot--GXJr4vI.mjs")).releaseSnapshot(e), c = async (e) => (await import("./generate-application-client-B96EJz8O.mjs")).generateApplicationClient(e);
29
29
  //#endregion
30
30
  export { i as BUILD_DESCRIPTOR, a as buildAppSnapshot, c as generateAppClient, s as releaseAppSnapshot, o as typecheckApp };
@@ -2,7 +2,7 @@ import { createRequire as e } from "node:module";
2
2
  import { fileURLToPath as t } from "node:url";
3
3
  import { dirname as n } from "node:path";
4
4
  e(import.meta.url), n(t(import.meta.url));
5
- import { Z as r, q as i } from "./login-_eABINVq.mjs";
5
+ import { Z as r, q as i } from "./login-B-j7rN0L.mjs";
6
6
  import a from "chalk";
7
7
  //#region src/cli/commands/dev/catalog-sync.ts
8
8
  var o = class {
@@ -1 +1 @@
1
- const e=require("./isDefined-Dtu5EYqP-CGZoVWsO.js"),t=require("./login-DkjpI4jn.js");let n=require("chalk");n=e.i(n);var r=class{async execute(e){e.remote&&t.Z.setActiveRemote(e.remote);let r=t.Z.getActiveRemote();console.log(n.default.blue(`Syncing marketplace catalog on ${r}...`));let i=await new t.q().syncMarketplaceCatalog();i.success||(console.error(n.default.red(`Catalog sync failed: ${i.error instanceof Error?i.error.message:String(i.error)}`)),process.exit(1)),console.log(n.default.green(`✓ Marketplace catalog synced successfully`))}};exports.CatalogSyncCommand=r;
1
+ const e=require("./isDefined-Dtu5EYqP-CGZoVWsO.js"),t=require("./login-CLfFxyR3.js");let n=require("chalk");n=e.i(n);var r=class{async execute(e){e.remote&&t.Z.setActiveRemote(e.remote);let r=t.Z.getActiveRemote();console.log(n.default.blue(`Syncing marketplace catalog on ${r}...`));let i=await new t.q().syncMarketplaceCatalog();i.success||(console.error(n.default.red(`Catalog sync failed: ${i.error instanceof Error?i.error.message:String(i.error)}`)),process.exit(1)),console.log(n.default.green(`✓ Marketplace catalog synced successfully`))}};exports.CatalogSyncCommand=r;
@@ -1,2 +1 @@
1
- import type * as esbuild from 'esbuild';
2
- export declare const cssInjectionPlugin: esbuild.Plugin;
1
+ export { cssInjectionPlugin } from 'twenty-shared/front-component-build';
@@ -1 +1 @@
1
- export declare const unwrapDefineFrontComponentToDirectExport: (sourceCode: string) => string;
1
+ export { unwrapDefineFrontComponentToDirectExport } from 'twenty-shared/front-component-build';