twenty-sdk 2.50.0 → 2.51.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/build/descriptor.json +1 -1
- package/dist/{build-snapshot-DlB2VyNd.mjs → build-snapshot--GXJr4vI.mjs} +2 -2
- package/dist/{build-snapshot-C-NQg7fn.js → build-snapshot-D38u-ntr.js} +1 -1
- package/dist/build.cjs +1 -1
- package/dist/build.mjs +2 -2
- package/dist/{catalog-sync-DxcdSEBJ.js → catalog-sync-DJgluWIc.js} +1 -1
- package/dist/{catalog-sync-C6jv_xoa.mjs → catalog-sync-Z1uWs5Ge.mjs} +1 -1
- package/dist/cli/utilities/build/common/front-component-build/css-injection-plugin.d.ts +1 -2
- package/dist/cli/utilities/build/common/front-component-build/utils/unwrap-define-front-component-to-direct-export.d.ts +1 -1
- package/dist/cli.cjs +11 -11
- package/dist/cli.mjs +113 -113
- package/dist/{compile-application-BFhqkVqO.js → compile-application-BPxjs2Co.js} +5 -5
- package/dist/{compile-application-B2LfsDBX.mjs → compile-application-CU3rJlps.mjs} +1380 -1376
- package/dist/define/index.cjs +15 -12
- package/dist/define/index.cjs.map +1 -1
- package/dist/define/index.d.ts +22 -5
- package/dist/define/index.mjs +5555 -5128
- 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 +6 -1
- package/dist/front-component/index.mjs +26 -15
- 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-B0LNjbg4.js +883 -0
- package/dist/{get-front-component-build-plugins-QXeU8MwC.mjs → get-front-component-build-plugins-CnwC-jU8.mjs} +7178 -6721
- package/dist/logic-function/index.cjs.map +1 -1
- package/dist/logic-function/index.mjs.map +1 -1
- package/dist/{login-_eABINVq.mjs → login-CNV69o8l.mjs} +466 -466
- package/dist/{login-DkjpI4jn.js → login-CbjId2Zl.js} +9 -9
- package/dist/operations.cjs +1 -1
- package/dist/operations.mjs +2 -2
- package/dist/{package-DftRfrG7.mjs → package-CEEl5qZD.mjs} +6 -1
- package/dist/package-RzehG8GA.js +1 -0
- package/dist/{typecheck-application-DIe_vwjU.mjs → typecheck-application-aR7mCSHB.mjs} +1 -1
- package/package.json +8 -3
- package/dist/get-front-component-build-plugins-BcUjFnki.js +0 -880
- package/dist/package-vtLsH5RS.js +0 -1
|
@@ -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 {
|
|
6
|
-
import { t as i } from "./compile-application-
|
|
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-
|
|
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-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./package-RzehG8GA.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-
|
|
5
|
+
import { t as r } from "./package-CEEl5qZD.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
|
|
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 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./isDefined-Dtu5EYqP-CGZoVWsO.js"),t=require("./login-
|
|
1
|
+
const e=require("./isDefined-Dtu5EYqP-CGZoVWsO.js"),t=require("./login-CbjId2Zl.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;
|
|
@@ -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-
|
|
5
|
+
import { Z as r, q as i } from "./login-CNV69o8l.mjs";
|
|
6
6
|
import a from "chalk";
|
|
7
7
|
//#region src/cli/commands/dev/catalog-sync.ts
|
|
8
8
|
var o = class {
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const cssInjectionPlugin: esbuild.Plugin;
|
|
1
|
+
export { cssInjectionPlugin } from 'twenty-shared/front-component-build';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { unwrapDefineFrontComponentToDirectExport } from 'twenty-shared/front-component-build';
|