twenty 2.58.0 → 2.59.0
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/CONTRIBUTING.md +82 -54
- package/README.md +35 -22
- package/dist/app-template/.nvmrc +1 -1
- package/dist/app-template/example/files/README.md +20 -4
- package/dist/app-template/example/files/github/workflows/publish.yml +1 -1
- package/dist/app-template/example/files/src/default-role.ts +6 -4
- package/dist/app-template/yarn.lock +167 -104
- package/dist/app-worker.cjs +1 -1
- package/dist/chunks/{cli-version.constant-jomCqLLP.cjs → AssetDirectory-c_JEwMr2.cjs} +1 -1
- package/dist/chunks/{build-source-manifest-DcRIFlDb.cjs → build-source-manifest-Ddwa8ath.cjs} +1 -1
- package/dist/chunks/build-source-snapshot-CUsEVNsQ.cjs +898 -0
- package/dist/chunks/cli-version.constant-y_3mZ4gx.cjs +1 -0
- package/dist/chunks/compile-application-translations-C9UZQCAb.cjs +58 -0
- package/dist/chunks/create-metadata-client-FopHnDj0.cjs +6 -0
- package/dist/chunks/create-pull-base-write-CX8xZhMz.cjs +1 -0
- package/dist/chunks/{create-rest-client-CMUss3u-.cjs → create-rest-client-HbzXSfhZ.cjs} +1 -1
- package/dist/chunks/{extract-source-translations--J7rPcdh.cjs → extract-source-translations-B-XmoSt7.cjs} +1 -1
- package/dist/chunks/{fetch-metadata-inspection-LB3RA2cV.cjs → fetch-metadata-inspection-ooyNi2DN.cjs} +1 -1
- package/dist/chunks/{fetch-signed-in-identity-GVHuJKXy.cjs → fetch-signed-in-identity-nCzWXunB.cjs} +1 -1
- package/dist/chunks/fetch-workspace-or-throw-DHoa_BYF.cjs +1 -0
- package/dist/chunks/{get-client-generation-skip-reason-CkpxXdRw.cjs → get-client-generation-skip-reason-BZiAtHwa.cjs} +1 -1
- package/dist/chunks/global-flags.constant-DMHyA_PD.cjs +1 -0
- package/dist/chunks/{is-exported-manifest-DRPkDqYh.cjs → is-exported-manifest-C4lO285q.cjs} +1 -1
- package/dist/chunks/{is-valid-package-name-Bv-sKHlR.cjs → is-valid-package-name-Ds0DY5qP.cjs} +1 -1
- package/dist/chunks/isValidUuid-D3NV1xmO.cjs +1 -0
- package/dist/chunks/list-application-source-files-DcyU-HrX.cjs +1 -0
- package/dist/chunks/{metadata-page.constant-Bt8myt0X.cjs → metadata-page.constant-D4-pGQWp.cjs} +1 -1
- package/dist/chunks/parse-app-export-BC81wdmc.cjs +1 -0
- package/dist/chunks/{parse-graphql-response-D3WfxVAu.cjs → parse-graphql-response-Cl8_fBgo.cjs} +1 -1
- package/dist/chunks/proxy-header-environment-variable.constant-CJyhJMve.cjs +1 -0
- package/dist/chunks/pull-minimum-sdk-version.constant-DUMi_IUD.cjs +6 -0
- package/dist/chunks/pull-source-CXQQf8Lw.cjs +1 -0
- package/dist/chunks/{read-app-identity-DyMNXRhZ.cjs → read-app-identity-Cny6sAGs.cjs} +1 -1
- package/dist/chunks/{read-application-identifier-hrv6xLTN.cjs → read-application-identifier-C4U2JsfD.cjs} +1 -1
- package/dist/chunks/{read-application-identity-CyVawH0m.cjs → read-application-identity-5sO-Mqb1.cjs} +1 -1
- package/dist/chunks/read-command-values-l5T9Lba4.cjs +1 -0
- package/dist/chunks/read-infer-deletion-option-Hv5V-A47.cjs +8 -0
- package/dist/chunks/{read-local-container-DsjjrgOn.cjs → read-local-container-Cs3cWspd.cjs} +1 -1
- package/dist/chunks/read-snapshot-file-Dxla2ete.cjs +1 -0
- package/dist/chunks/{read-source-identity-CXzcnYKk.cjs → read-source-identity-CG9W0pSt.cjs} +1 -1
- package/dist/chunks/record-pull-base-8bIoAoiB.cjs +1 -0
- package/dist/chunks/request-oauth-tokens-_Xwy2q9c.cjs +1 -0
- package/dist/chunks/resolve-command-target-CLqjjxCT.cjs +1 -0
- package/dist/chunks/{resolve-metadata-object-CN7eAeDR.cjs → resolve-metadata-object-7DhvIcEm.cjs} +1 -1
- package/dist/chunks/resolve-proxy-headers-DipR9jft.cjs +1 -0
- package/dist/chunks/resolve-request-url-CfvGDGkw.cjs +1 -0
- package/dist/chunks/{run-api-graphql-command-x0ynMacW.cjs → run-api-graphql-command-ELrIPdM5.cjs} +1 -1
- package/dist/chunks/{run-api-rest-command-p5A2Fb05.cjs → run-api-rest-command-COVnszcN.cjs} +1 -1
- package/dist/chunks/{run-app-add-command-oHIkbKe1.cjs → run-app-add-command-b9sm20rn.cjs} +2 -2
- package/dist/chunks/{run-app-apply-command-Ww_5FeZf.cjs → run-app-apply-command-CD7NOdiR.cjs} +2 -2
- package/dist/chunks/{run-app-build-command-DpgKL1XF.cjs → run-app-build-command-C8ubC2GH.cjs} +1 -1
- package/dist/chunks/{run-app-dev-command-DVOvwZdx.cjs → run-app-dev-command-D1JOfJv6.cjs} +2 -2
- package/dist/chunks/{run-app-exec-command-Cly1JhuE.cjs → run-app-exec-command-cw4vPVHE.cjs} +2 -2
- package/dist/chunks/{run-app-generate-client-command-CVwOI5-n.cjs → run-app-generate-client-command-BVRFtPni.cjs} +1 -1
- package/dist/chunks/{run-app-init-command-DdSdOmo5.cjs → run-app-init-command-DuxE1JhM.cjs} +2 -2
- package/dist/chunks/{run-app-install-command-zs9OY8uz.cjs → run-app-install-command-DlcUupwk.cjs} +1 -1
- package/dist/chunks/run-app-logs-command-CaLIVesh.cjs +8 -0
- package/dist/chunks/{run-app-operation-CBy4X1VK.cjs → run-app-operation-DKPh4r7b.cjs} +1 -1
- package/dist/chunks/{run-app-plan-command-Cuz9v8Db.cjs → run-app-plan-command-BGQ7vJZT.cjs} +1 -1
- package/dist/chunks/run-app-publish-command-BGNJVIBl.cjs +1 -0
- package/dist/chunks/run-app-pull-command-NbZ8fjhE.cjs +6 -0
- package/dist/chunks/{run-app-translations-extract-command-BZEJppmw.cjs → run-app-translations-extract-command-CGIFvpC1.cjs} +1 -1
- package/dist/chunks/{run-app-typecheck-command-BHFWyv_1.cjs → run-app-typecheck-command-D0KV3hFS.cjs} +1 -1
- package/dist/chunks/{run-app-uninstall-command-DvBgm_4t.cjs → run-app-uninstall-command-CepQk4_4.cjs} +1 -1
- package/dist/chunks/run-auth-login-command-DpS1bUdL.cjs +1 -0
- package/dist/chunks/{run-auth-logout-command-BMpq04ml.cjs → run-auth-logout-command-hvi_HvpQ.cjs} +1 -1
- package/dist/chunks/{run-auth-status-command-2Xrg0AoZ.cjs → run-auth-status-command-Dr4YQuLn.cjs} +1 -1
- package/dist/chunks/{run-cli-BoGVmb1j.cjs → run-cli-oUabLHNz.cjs} +1 -1
- package/dist/chunks/{run-commands-command-DZkaWdQm.cjs → run-commands-command-DYm9TuAx.cjs} +1 -1
- package/dist/chunks/run-data-export-command-C4_7rc0v.cjs +3 -0
- package/dist/chunks/run-data-get-command-CcEYQ4xO.cjs +1 -0
- package/dist/chunks/{run-data-list-command-CVubWAFh.cjs → run-data-list-command-D0K7HFD-.cjs} +1 -1
- package/dist/chunks/run-doctor-command-fHf5vCGl.cjs +2 -0
- package/dist/chunks/{run-local-logs-command-CkZln0BN.cjs → run-local-logs-command-COsSRk3f.cjs} +1 -1
- package/dist/chunks/{run-local-reset-command-B5UrKkAf.cjs → run-local-reset-command-m0x-EiA6.cjs} +1 -1
- package/dist/chunks/{run-local-start-command-Cp8nzjc6.cjs → run-local-start-command-DsFS9_ew.cjs} +1 -1
- package/dist/chunks/{run-local-status-command-E3cpSfTu.cjs → run-local-status-command-BYxy0R9I.cjs} +1 -1
- package/dist/chunks/{run-local-stop-command-Cr3oAzQ9.cjs → run-local-stop-command-D66F73fW.cjs} +1 -1
- package/dist/chunks/{run-local-upgrade-command-Ch5AvQjt.cjs → run-local-upgrade-command-6P71bQw6.cjs} +1 -1
- package/dist/chunks/{run-metadata-field-describe-command-Bof9tzyG.cjs → run-metadata-field-describe-command-nfKhj-m_.cjs} +1 -1
- package/dist/chunks/{run-metadata-field-list-command-C2AxyLJH.cjs → run-metadata-field-list-command-CW2I6hmh.cjs} +1 -1
- package/dist/chunks/{run-metadata-object-describe-command-CEh8rVCs.cjs → run-metadata-object-describe-command-WLxcOe4T.cjs} +1 -1
- package/dist/chunks/{run-metadata-object-list-command-4qWTuJlm.cjs → run-metadata-object-list-command-Q4pwAEwO.cjs} +1 -1
- package/dist/chunks/{run-open-command-BWRHlLfS.cjs → run-open-command-DPrz3N1e.cjs} +1 -1
- package/dist/chunks/{run-remote-remove-command-Dc0XJydM.cjs → run-remote-remove-command-DgSQvjeN.cjs} +1 -1
- package/dist/chunks/{run-remote-rename-command-3AzuENYT.cjs → run-remote-rename-command--37-GTRY.cjs} +1 -1
- package/dist/chunks/{run-remote-use-command-BKVP65QI.cjs → run-remote-use-command-B6obKSPB.cjs} +1 -1
- package/dist/chunks/{run-version-command-BZ_R0Tss.cjs → run-version-command-BWTSv9_Y.cjs} +1 -1
- package/dist/chunks/{sign-in-to-remote-again-DN6ov5o2.cjs → sign-in-to-remote-again-DFQr-xvw.cjs} +1 -1
- package/dist/chunks/{sign-in-with-browser-DXd6hkJk.cjs → sign-in-with-browser-TQANmPyb.cjs} +2 -2
- package/dist/chunks/{standard-object-fields.constant-2yLND0Cg.cjs → standard-object-fields.constant-C4AVX0t2.cjs} +1 -1
- package/dist/chunks/subscribe-graphql-w-Ar4hCj.cjs +2 -0
- package/dist/chunks/to-worker-output-diagnostics-w1hZPfn0.cjs +2 -0
- package/dist/chunks/{wait-for-local-environment-BmOFeICJ.cjs → wait-for-local-environment-zNEJcWA1.cjs} +1 -1
- package/dist/cli.cjs +1 -1
- package/docs/commands.md +875 -233
- package/package.json +3 -2
- package/src/app/README.md +15 -10
- package/src/app/add/README.md +75 -51
- package/src/app/bundles/README.md +56 -33
- package/src/app/client/README.md +23 -21
- package/src/app/dev/README.md +30 -16
- package/src/app/exec/README.md +61 -41
- package/src/app/function-logs/README.md +49 -32
- package/src/app/manifest/README.md +31 -25
- package/src/app/pull/README.md +191 -21
- package/src/app/source/README.md +67 -14
- package/src/app/typecheck/README.md +29 -24
- package/dist/chunks/build-source-snapshot-C0UVzVTo.cjs +0 -897
- package/dist/chunks/compile-application-translations-Da3xWXl-.cjs +0 -58
- package/dist/chunks/create-metadata-client-oO0QvH6j.cjs +0 -6
- package/dist/chunks/create-pull-base-write-CQHTbtQP.cjs +0 -1
- package/dist/chunks/fetch-workspace-or-throw-CGlqJOIG.cjs +0 -1
- package/dist/chunks/global-flags.constant-DooTv_Uq.cjs +0 -1
- package/dist/chunks/list-application-source-files-jEau5Rie.cjs +0 -1
- package/dist/chunks/parse-app-export-CmFKsj2e.cjs +0 -1
- package/dist/chunks/pull-minimum-sdk-version.constant-0v8yv93F.cjs +0 -6
- package/dist/chunks/pull-source-C6LiDOqa.cjs +0 -1
- package/dist/chunks/read-command-values-rGaU2qHz.cjs +0 -1
- package/dist/chunks/read-infer-deletion-option-Br1FJCfZ.cjs +0 -8
- package/dist/chunks/read-snapshot-file-D-s1kuCP.cjs +0 -1
- package/dist/chunks/record-pull-base-BZ6YgdEp.cjs +0 -1
- package/dist/chunks/request-oauth-tokens-B4JHBmVU.cjs +0 -1
- package/dist/chunks/resolve-command-target-CwC9p_NB.cjs +0 -1
- package/dist/chunks/resolve-request-url-BzW185lE.cjs +0 -1
- package/dist/chunks/run-app-logs-command-CnW8I5a0.cjs +0 -9
- package/dist/chunks/run-app-publish-command-DACw_WFa.cjs +0 -1
- package/dist/chunks/run-app-pull-command-CNbC_iZs.cjs +0 -6
- package/dist/chunks/run-auth-login-command-DmnIxGG3.cjs +0 -1
- package/dist/chunks/run-data-get-command-BE6hUvWQ.cjs +0 -1
- package/dist/chunks/run-doctor-command-OCHUN5AA.cjs +0 -2
- package/dist/chunks/to-worker-output-diagnostics-DlISjOqp.cjs +0 -2
|
@@ -4,38 +4,55 @@ The command subscribes to POST `/metadata`,
|
|
|
4
4
|
`logicFunctionLogs(input: LogicFunctionLogsInput!)`, application universal
|
|
5
5
|
identifier and optional exact function name or universal identifier. It receives
|
|
6
6
|
future completed-execution output, not history or per-line execution progress.
|
|
7
|
-
Names can repeat within one app; name selection is a filter matching all of
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
7
|
+
Names can repeat within one app; name selection is a filter matching all of
|
|
8
|
+
them.
|
|
9
|
+
|
|
10
|
+
## Identity and authorization
|
|
11
|
+
|
|
12
|
+
`app logs` uses the CLI app-identity worker. Only the app definition is needed;
|
|
13
|
+
no function bundles, full manifest build or generated client is required. Source
|
|
14
|
+
diagnostics use CLI output, and target credentials stay outside the worker.
|
|
15
|
+
|
|
16
|
+
The CLI target supplies OAuth or API-key credentials, environment proxy routing
|
|
17
|
+
and cancellation. Server authorization requires `WORKFLOWS`, workspace scoping
|
|
18
|
+
and per-payload application access checks. There is no execution mutation, app
|
|
19
|
+
registration or workspace audit-log query.
|
|
20
|
+
|
|
21
|
+
## Older server compatibility
|
|
22
|
+
|
|
23
|
+
The selection requests nullable `name` and `universalIdentifier` fields. Server
|
|
24
|
+
schemas rejecting only these fields trigger one explicit, warned fallback to
|
|
25
|
+
`{ logs }`, before any record has been emitted. Unrelated validation,
|
|
26
|
+
authorization, network and execution errors are never retried.
|
|
27
|
+
|
|
28
|
+
An explicit filter provides that identity if the server cannot; unknown values
|
|
29
|
+
stay null.
|
|
30
|
+
|
|
31
|
+
## Streaming and deadlines
|
|
32
|
+
|
|
33
|
+
A pull-driven reader uses the GraphQL `next`/`complete` SSE protocol, awaits
|
|
34
|
+
output and reads the next frame only when the consumer is ready. It handles
|
|
35
|
+
comments, multiline data, split UTF-8 and LF/CRLF/CR framing. Each frame is
|
|
36
|
+
capped at 16 MiB; the session has no total byte cap. Reader locks and HTTP
|
|
37
|
+
requests are released on exit.
|
|
38
|
+
|
|
39
|
+
Setup has a 60-second deadline. After setup there is no whole-session timer; the
|
|
40
|
+
HTTP body's 60-second idle deadline detects missing heartbeats. Yoga sends
|
|
41
|
+
comments every 12 seconds in production. Undici suspends its body deadline while
|
|
42
|
+
the body is paused for backpressure and refreshes it on resume.
|
|
43
|
+
|
|
44
|
+
## Completion and failures
|
|
45
|
+
|
|
46
|
+
There is no automatic reconnect or replay. EOF without `complete`, broken JSON
|
|
47
|
+
or records, redirects, oversized frames and network failures stop the command.
|
|
48
|
+
Errors retain `recordCount`; network failures explain the gap. Explicit server
|
|
49
|
+
completion exits 0, Ctrl+C exits 130.
|
|
50
|
+
|
|
51
|
+
Human text escapes terminal control characters; NDJSON emits start, connection
|
|
52
|
+
progress, records and a final result/error. A compatibility fallback may
|
|
53
|
+
establish two connections and therefore emit two connection progress events.
|
|
54
|
+
|
|
55
|
+
## Verification
|
|
39
56
|
|
|
40
57
|
Tests cover the public command with a real local HTTP transport, duplicate-name
|
|
41
58
|
filters, compatibility failures, proxy routing, per-frame bounds, output
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
The manifest builder constructs and validates metadata and compiles translations
|
|
4
4
|
for build, plan and apply. The worker evaluates definitions through
|
|
5
|
-
[app/source](../source/README.md); bundling and final artifact checksums belong
|
|
6
|
-
[app/bundles](../bundles/README.md).
|
|
5
|
+
[app/source](../source/README.md); bundling and final artifact checksums belong
|
|
6
|
+
to [app/bundles](../bundles/README.md).
|
|
7
7
|
|
|
8
8
|
See the [app tooling overview](../README.md) for package ownership.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Manifest construction
|
|
11
11
|
|
|
12
12
|
The builder discovers definitions and assets, derives default object fields and
|
|
13
13
|
permission identifiers, infers logic-function input schemas, resolves lifecycle
|
|
@@ -15,21 +15,27 @@ hooks, reads the README and validates entity relationships, identifiers, role
|
|
|
15
15
|
permissions and conditional availability. Manifests are sorted and carry
|
|
16
16
|
checksum placeholders that the bundler replaces with final artifact checksums.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
`application.requiredServerVersionRange`, with surrounding whitespace trimmed;
|
|
20
|
-
an absent or empty value becomes `null`. No CLI version is substituted. The
|
|
21
|
-
builder reports package dependency warnings and validates empty lockfiles.
|
|
18
|
+
## Server version and dependencies
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
`package.json`'s `engines.twenty` sets `application.requiredServerVersionRange`,
|
|
21
|
+
with surrounding whitespace trimmed; an absent or empty value becomes `null`. No
|
|
22
|
+
CLI version is substituted. The builder reports package dependency warnings and
|
|
23
|
+
validates empty lockfiles.
|
|
24
|
+
|
|
25
|
+
## Translations
|
|
26
|
+
|
|
27
|
+
Translation compilation reuses the locale catalog helpers shared with pull. It
|
|
28
|
+
preserves the distinction between no locale directory (`undefined`) and an empty
|
|
29
|
+
one (`{}`), context-dependent message IDs, authored-over-compiled precedence,
|
|
30
|
+
orphan compiled translations, collision handling and skipped-file warnings. It
|
|
31
|
+
reads catalogs without rewriting them.
|
|
32
|
+
|
|
33
|
+
## Select option identity
|
|
28
34
|
|
|
29
35
|
Select options without an `id` receive a deterministic ID from their label and
|
|
30
|
-
field identifier. Keep an explicit `id` when changing an option's label or
|
|
31
|
-
so existing view filters continue to reference the same option. Duplicate
|
|
32
|
-
IDs fail validation. Pulled options already carry their server IDs.
|
|
36
|
+
field identifier. Keep an explicit `id` when changing an option's label or
|
|
37
|
+
value, so existing view filters continue to reference the same option. Duplicate
|
|
38
|
+
option IDs fail validation. Pulled options already carry their server IDs.
|
|
33
39
|
|
|
34
40
|
## Implementation
|
|
35
41
|
|
|
@@ -38,18 +44,18 @@ IDs fail validation. Pulled options already carry their server IDs.
|
|
|
38
44
|
- Source and public-asset discovery is sorted so warning, error and entity file
|
|
39
45
|
order is deterministic.
|
|
40
46
|
- The loader result accepts a compile-time config type, with the same runtime
|
|
41
|
-
shape check. Config types describe the authoring values consumed by the
|
|
42
|
-
Handler parameters use `never` and return `unknown`; front components
|
|
43
|
-
only the `name` consumed here. The builder never calls those callbacks.
|
|
44
|
-
- The version helper requires an explicit app path; the process working
|
|
45
|
-
cannot choose another app's version.
|
|
47
|
+
shape check. Config types describe the authoring values consumed by the
|
|
48
|
+
builder. Handler parameters use `never` and return `unknown`; front components
|
|
49
|
+
expose only the `name` consumed here. The builder never calls those callbacks.
|
|
50
|
+
- The version helper requires an explicit app path; the process working
|
|
51
|
+
directory cannot choose another app's version.
|
|
46
52
|
- Filesystem reads use Node and the CLI `pathExists` helper. The JSON reader
|
|
47
53
|
propagates parse errors.
|
|
48
|
-
- The worker resolves the app's authoring SDK with the source compatibility
|
|
49
|
-
returns structured errors and warnings, checks cancellation between
|
|
50
|
-
stops esbuild before exiting. It uses credential filtering,
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
- The worker resolves the app's authoring SDK with the source compatibility
|
|
55
|
+
check, returns structured errors and warnings, checks cancellation between
|
|
56
|
+
phases and stops esbuild before exiting. It uses credential filtering, bounded
|
|
57
|
+
output capture and cancellation/termination behavior. It does not hold a
|
|
58
|
+
snapshot or write build state.
|
|
53
59
|
|
|
54
60
|
## Verification
|
|
55
61
|
|
package/src/app/pull/README.md
CHANGED
|
@@ -8,32 +8,202 @@ and reconciliation tests.
|
|
|
8
8
|
|
|
9
9
|
See the [app tooling overview](../README.md) for package boundaries.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Target and project creation
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- The wire/export and baseline boundary check identity and envelope fields, not every metadata collection. `toPullManifest` is the single explicit assertion into the typed writers, preserving their trust in the server schema. Missing/null object and field collections are consumed with `?? []`, like the other collections. Malformed entity contents can still make reconciliation fail before writing. We do not duplicate the server's schema.
|
|
18
|
-
- The baseline file is an envelope whose `manifest` member is an `ExportedManifest`. Reconciliation walks arrays generically without maintaining a second collection list. Unrecognized collections and non-array metadata survive; protected or unreconciled definitions retain their prior baseline entries.
|
|
19
|
-
- `preparePullEntities` resolves the source layout once for current and baseline entities. Planning, overwrite reporting and nested-definition protection consume these prepared entities. A definition can leave a parent only when another retained or written file contains it, or its remote deletion is confirmed.
|
|
20
|
-
- Fields already declared with `defineField` stay in their existing files, even when the server exports them inside an object. Object generation excludes those fields; baseline comparisons use the same source layout. Pull also removes duplicate inline copies left in object files, while retaining the standalone definitions.
|
|
21
|
-
- Before destination writes, `assertPullSdkExports` checks the actual imports emitted by the writer against the app's SDK. It checks export presence, not every config shape; run typecheck to validate the generated definitions against the installed SDK.
|
|
22
|
-
- Temporary files and the baseline live under `.twenty/cli`. Apply and pull share `createPullBaseWrite` as the serializer. The baseline is bound to the API URL, workspace UUID and application UUID. Pull stages it with mode 0600 and writes it after the source files.
|
|
23
|
-
- The baseline can carry `sourceFingerprints`, a SHA-256 per app-relative source, locale and dependency file. Apply captures them before building. Pull reports an overwritten local change when a file it rewrites or deletes no longer matches its fingerprint. Without a fingerprint it compares the file with the writer's rendering of the baseline, which is reliable only for source produced by that writer. Pull carries fingerprints forward, updating the files it writes and dropping the ones it deletes.
|
|
24
|
-
- Ordinary I/O failures restore originals. Cancellation is checked before committing the staged plan, not halfway through it. An acknowledged successful commit wins over cancellation. The parent can forcibly kill an unresponsive worker after its grace period, so an unacknowledged result has outcome `unknown`, never a claim that rollback succeeded. Failed rollback retains backups and reports their directory; failure to clean up after a completed commit has outcome `pulled`.
|
|
25
|
-
- Human reporting uses CLI terminal escaping, machine reporting contains the full coverage and path lists, and gaps warn without stopping successful writes. Unknown coverage status strings remain visible. Pull does not prompt for approval or require a clean Git checkout; remote changes overwrite conflicting local edits and are included in the report.
|
|
13
|
+
An existing application's local identifier selects the target. With no local
|
|
14
|
+
definition, the command fetches
|
|
15
|
+
`currentWorkspace.workspaceCustomApplication.universalIdentifier`. Apply
|
|
16
|
+
baseline recording still queries only the workspace ID.
|
|
26
17
|
|
|
27
|
-
|
|
18
|
+
Outside an app, pull offers to create a local project and install its
|
|
19
|
+
dependencies before reconciliation. Noninteractive creation requires `--path`
|
|
20
|
+
and `--yes`. The initializer omits demo entities, and unrelated nonempty
|
|
21
|
+
directories are refused.
|
|
28
22
|
|
|
29
|
-
|
|
23
|
+
Missing custom applications fail before project creation. The worker still
|
|
24
|
+
checks that the local identity matches the export before writing.
|
|
30
25
|
|
|
31
|
-
|
|
26
|
+
## Worker and schema boundary
|
|
32
27
|
|
|
33
|
-
|
|
28
|
+
Source scanning stays inside the disposable CLI worker so configs containing
|
|
29
|
+
functions are never serialized through IPC. Only the server export and report
|
|
30
|
+
cross that boundary. Selected credentials are removed from the worker
|
|
31
|
+
environment. App source is trusted developer code, not sandboxed code.
|
|
34
32
|
|
|
35
|
-
|
|
33
|
+
The wire/export and baseline boundary check identity and envelope fields, not
|
|
34
|
+
every metadata collection. `toPullManifest` is the single explicit assertion
|
|
35
|
+
into the typed writers, preserving their trust in the server schema.
|
|
36
|
+
Missing/null object and field collections are consumed with `?? []`, like the
|
|
37
|
+
other collections.
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
Malformed entity contents can still make reconciliation fail before writing. We
|
|
40
|
+
do not duplicate the server's schema.
|
|
38
41
|
|
|
39
|
-
|
|
42
|
+
## Reconcile definitions
|
|
43
|
+
|
|
44
|
+
The baseline file is an envelope whose `manifest` member is an
|
|
45
|
+
`ExportedManifest`. Reconciliation walks arrays generically without maintaining
|
|
46
|
+
a second collection list. Unrecognized collections and non-array metadata
|
|
47
|
+
survive; protected or unreconciled definitions retain their prior baseline
|
|
48
|
+
entries.
|
|
49
|
+
|
|
50
|
+
`preparePullEntities` resolves the source layout once for current and baseline
|
|
51
|
+
entities. Planning, overwrite reporting and nested-definition protection consume
|
|
52
|
+
these prepared entities. A definition can leave a parent only when another
|
|
53
|
+
retained or written file contains it, or its remote deletion is confirmed.
|
|
54
|
+
|
|
55
|
+
Fields already declared with `defineField` stay in their existing files, even
|
|
56
|
+
when the server exports them inside an object. Object generation excludes those
|
|
57
|
+
fields; baseline comparisons use the same source layout. Pull also removes
|
|
58
|
+
duplicate inline copies left in object files, while retaining the standalone
|
|
59
|
+
definitions.
|
|
60
|
+
|
|
61
|
+
Before destination writes, `assertPullSdkExports` checks the actual imports
|
|
62
|
+
emitted by the writer against the app's SDK. It checks export presence, not
|
|
63
|
+
every config shape; run typecheck to validate the generated definitions against
|
|
64
|
+
the installed SDK.
|
|
65
|
+
|
|
66
|
+
## Baseline and local edits
|
|
67
|
+
|
|
68
|
+
Temporary files and the baseline live under `.twenty/cli`. Apply and pull share
|
|
69
|
+
`createPullBaseWrite` as the serializer. The baseline is bound to the API URL,
|
|
70
|
+
workspace UUID and application UUID. Pull stages it with mode 0600 and writes it
|
|
71
|
+
after the source files.
|
|
72
|
+
|
|
73
|
+
The baseline can carry `sourceFingerprints`, a SHA-256 per app-relative source,
|
|
74
|
+
locale and dependency file. Apply captures them before building. Pull reports an
|
|
75
|
+
overwritten local change when a file it rewrites or deletes no longer matches
|
|
76
|
+
its fingerprint.
|
|
77
|
+
|
|
78
|
+
Without a fingerprint it compares the file with the writer's rendering of the
|
|
79
|
+
baseline, which is reliable only for source produced by that writer. Pull
|
|
80
|
+
carries fingerprints forward, updating the files it writes and dropping the ones
|
|
81
|
+
it deletes.
|
|
82
|
+
|
|
83
|
+
## Commit and recovery
|
|
84
|
+
|
|
85
|
+
Ordinary I/O failures restore originals. Cancellation is checked before
|
|
86
|
+
committing the staged plan, not halfway through it. An acknowledged successful
|
|
87
|
+
commit wins over cancellation. The parent can forcibly kill an unresponsive
|
|
88
|
+
worker after its grace period, so an unacknowledged result has outcome
|
|
89
|
+
`unknown`, never a claim that rollback succeeded.
|
|
90
|
+
|
|
91
|
+
Failed rollback retains backups and reports their directory; failure to clean up
|
|
92
|
+
after a completed commit has outcome `pulled`.
|
|
93
|
+
|
|
94
|
+
## Reporting
|
|
95
|
+
|
|
96
|
+
Human reporting uses CLI terminal escaping, machine reporting contains the full
|
|
97
|
+
coverage and path lists, and gaps warn without stopping successful writes.
|
|
98
|
+
Unknown coverage status strings remain visible. Reconciliation does not prompt
|
|
99
|
+
for overwrite approval or require a clean Git checkout; remote changes overwrite
|
|
100
|
+
conflicting local edits and are included in the report.
|
|
101
|
+
|
|
102
|
+
## Translations
|
|
103
|
+
|
|
104
|
+
Translation string extraction uses the CLI's TypeScript parser. Traversal,
|
|
105
|
+
static-string rules, whitespace normalization and deduplication are checked
|
|
106
|
+
against the SDK reference by parity tests. It does not depend on ts-morph or
|
|
107
|
+
load parser tooling for help and command discovery.
|
|
108
|
+
|
|
109
|
+
## Workflows and Code-step files
|
|
110
|
+
|
|
111
|
+
Workflows arrive in `manifest.workflows` and are written as `defineWorkflow`
|
|
112
|
+
files. Their filter operands and form field types use SDK enums; filter group
|
|
113
|
+
logical operators stay string literals, which every SDK with `defineWorkflow`
|
|
114
|
+
accepts. A workflow the server cannot express as a definition is reported as
|
|
115
|
+
`UNSUPPORTED` coverage, so its local file is kept.
|
|
116
|
+
|
|
117
|
+
Each `CODE` step's source is written verbatim to a `.code.ts` file in a folder
|
|
118
|
+
beside the workflow, named after the workflow file without `.workflow.ts` or
|
|
119
|
+
`.ts`. The file is named after the kebab-cased step name, capped at 80
|
|
120
|
+
characters, or the first 8 characters of the step identifier when the name has
|
|
121
|
+
no usable characters.
|
|
122
|
+
|
|
123
|
+
When that path is taken by another step or an unrelated local file, the name
|
|
124
|
+
gets that identifier prefix, then a numeric suffix; only the step's own previous
|
|
125
|
+
file is overwritten. The workflow reads it with
|
|
126
|
+
`readFileSync(join(__dirname, ...))` because a text import would not type-check
|
|
127
|
+
in the app.
|
|
128
|
+
|
|
129
|
+
The loader never evaluates `.code.ts` files as app definitions, even if their
|
|
130
|
+
source contains a `defineX` default export. They remain in the source inventory
|
|
131
|
+
for fingerprints and reconciliation. Pull deletes the ones a regenerated or
|
|
132
|
+
deleted workflow no longer references, even when the step survives under a new
|
|
133
|
+
name.
|
|
134
|
+
|
|
135
|
+
## Skills and agents
|
|
136
|
+
|
|
137
|
+
Skills and agents arrive in `manifest.skills` and `manifest.agents` and are
|
|
138
|
+
written as `defineSkill` and `defineAgent` files, with no enum bindings. The
|
|
139
|
+
server exports one only when its definition reproduces the stored entity;
|
|
140
|
+
otherwise it is reported as `UNSUPPORTED` coverage, so its local file is kept.
|
|
141
|
+
|
|
142
|
+
## Exported files and compatibility
|
|
143
|
+
|
|
144
|
+
Pull requests
|
|
145
|
+
`exportApplication(shouldIncludeDependencies: true, shouldIncludeSourceFiles: true, shouldIncludePublicAssets: true)`.
|
|
146
|
+
Existing clients that do not request source files continue to receive coverage
|
|
147
|
+
gaps for frontend components and their widgets, without reading component source
|
|
148
|
+
from storage.
|
|
149
|
+
|
|
150
|
+
Apply baseline recording opts in to source export too, so a later pull compares
|
|
151
|
+
the same supported components. Pull restores `dependencies/package.json` and
|
|
152
|
+
`dependencies/yarn.lock` to the project root, in the same transaction as
|
|
153
|
+
metadata and the baseline.
|
|
154
|
+
|
|
155
|
+
Exact folder and filename checks accept only that dependency pair, declared
|
|
156
|
+
frontend component sources, and `public-asset` files under `public/`. Public
|
|
157
|
+
assets travel as base64 and are restored as bytes, preserving images and fonts.
|
|
158
|
+
Record attachments and unrelated files are refused.
|
|
159
|
+
|
|
160
|
+
Public assets unchanged on the server preserve local edits; remote changes use
|
|
161
|
+
the usual overwrite report. Missing remote assets leave local files untouched.
|
|
162
|
+
If the remote package omits `twenty-sdk`, pull retains the local SDK dependency
|
|
163
|
+
so the workspace custom app remains usable with the CLI.
|
|
164
|
+
|
|
165
|
+
The baseline stores remote `dependencyFingerprints` separately from written
|
|
166
|
+
`sourceFingerprints` for this case. Other exported dependency contents are
|
|
167
|
+
copied exactly. Dependency files unchanged on the server preserve local edits;
|
|
168
|
+
remote changes replace local contents and use the usual overwrite report.
|
|
169
|
+
Missing remote files leave local files untouched.
|
|
170
|
+
|
|
171
|
+
After project setup, reconciliation does not install dependencies, generate the
|
|
172
|
+
typed client or write logic-function source. Export responses have a 16 MiB cap.
|
|
173
|
+
Pull does not modify the workspace. Because pull is partial, `app apply` of the
|
|
174
|
+
workspace custom application only deletes entities missing from source with
|
|
175
|
+
`--prune`.
|
|
176
|
+
|
|
177
|
+
## Front component source
|
|
178
|
+
|
|
179
|
+
Front component entry files are restored from their stored original TSX, at
|
|
180
|
+
their original path or the existing local definition's path. No JSX is
|
|
181
|
+
regenerated. Export reports missing source, computed identifiers, and
|
|
182
|
+
unsupported widget availability as coverage gaps; widgets referencing those
|
|
183
|
+
components remain unexported.
|
|
184
|
+
|
|
185
|
+
Imports are preserved without checking whether they can be resolved. Imported
|
|
186
|
+
local files are not pulled yet; missing dependencies must be restored before
|
|
187
|
+
building or applying. Support for imported local files is tracked separately in
|
|
188
|
+
[#29462](https://github.com/twentyhq/twenty/issues/29462).
|
|
189
|
+
|
|
190
|
+
An explicit GraphQL rejection of the source-export argument retries once without
|
|
191
|
+
it, preserving older servers' metadata pull.
|
|
192
|
+
|
|
193
|
+
Pull records remote source hashes separately from local fingerprints. Unchanged
|
|
194
|
+
remote source preserves local edits, including after repeated pulls; changed
|
|
195
|
+
source uses the existing overwrite report, even if only comments changed and the
|
|
196
|
+
compiled checksum stayed the same.
|
|
197
|
+
|
|
198
|
+
An occupied destination or a missing declared source aborts the entire pull
|
|
199
|
+
before writes. Supported page-layout widgets keep their component identifiers.
|
|
200
|
+
Run `yarn install` after dependency changes before building the pulled TSX.
|
|
201
|
+
|
|
202
|
+
## Verification
|
|
203
|
+
|
|
204
|
+
Tests cover writers, planning and reconciliation. Command tests build the actual
|
|
205
|
+
Vite worker, exercise an authoring-only SDK, local mock HTTP, credentials/output
|
|
206
|
+
isolation, SDK export refusal and forced termination after the first destination
|
|
207
|
+
write. The repository SDK tests cover canonical generated definitions, nested
|
|
208
|
+
coverage, translation preservation, target mismatch, overwrite reporting and
|
|
209
|
+
rollback.
|
package/src/app/source/README.md
CHANGED
|
@@ -1,33 +1,86 @@
|
|
|
1
1
|
# App source loading
|
|
2
2
|
|
|
3
|
-
This CLI-owned source loader powers `twenty app pull` and the
|
|
3
|
+
This CLI-owned source loader powers `twenty app pull` and the
|
|
4
|
+
[manifest builder](../manifest/README.md) used by public build, plan and apply
|
|
5
|
+
commands.
|
|
4
6
|
|
|
5
|
-
Package boundaries are documented in the
|
|
6
|
-
[app tooling overview](../README.md).
|
|
7
|
+
Package boundaries are documented in the [app tooling overview](../README.md).
|
|
7
8
|
|
|
8
9
|
## Boundary
|
|
9
10
|
|
|
10
|
-
`readAppIdentity` checks the installed SDK without importing it, then evaluates
|
|
11
|
+
`readAppIdentity` checks the installed SDK without importing it, then evaluates
|
|
12
|
+
the application's definition in a disposable CLI worker. Source is trusted
|
|
13
|
+
executable developer code. The child contains exits, captures bounded output and
|
|
14
|
+
can be killed on cancellation; it is not a filesystem or network sandbox.
|
|
15
|
+
Selected workspace credentials are removed from its environment by the worker
|
|
16
|
+
launcher.
|
|
11
17
|
|
|
12
|
-
`scanProjectSourceFiles` stays inside the worker. Its configs may contain
|
|
18
|
+
`scanProjectSourceFiles` stays inside the worker. Its configs may contain
|
|
19
|
+
functions and React components, so reconciliation runs in that same worker
|
|
20
|
+
rather than send configs over JSON IPC. Only the application UUID, display name
|
|
21
|
+
and diagnostics cross the identity boundary.
|
|
13
22
|
|
|
14
23
|
## Compatibility
|
|
15
24
|
|
|
16
|
-
- The app supplies its own `twenty-sdk`, version `>=1.23.0`, with resolvable
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
25
|
+
- The app supplies its own `twenty-sdk`, version `>=1.23.0`, with resolvable
|
|
26
|
+
`twenty-sdk/define` and `twenty-sdk/front-component` entry points. The
|
|
27
|
+
installed SDK's Node requirement is checked: a Node below every version the
|
|
28
|
+
range accepts fails, any other Node outside the range only warns.
|
|
29
|
+
- There is no upper SDK version cap. Every evaluated definition must return the
|
|
30
|
+
public `ValidationResult` shape: boolean `success`, object `config`,
|
|
31
|
+
string-array `errors`, and optional string-array `warnings`. An incompatible
|
|
32
|
+
shape fails with `SDK_SOURCE_UNSUPPORTED`. This validates the loader contract,
|
|
33
|
+
not every future SDK behavior.
|
|
34
|
+
- The CLI owns esbuild, its TypeScript parser and tinyglobby as runtime
|
|
35
|
+
dependencies. These load only for source operations. The app does not need to
|
|
36
|
+
install TypeScript for source loading. Build and typecheck use the project's
|
|
37
|
+
compiler separately.
|
|
38
|
+
- The pull writer separately checks the authoring exports its generated files
|
|
39
|
+
use; this loader floor does not establish that every SDK since 1.23 supports
|
|
40
|
+
all current manifest collections.
|
|
20
41
|
|
|
21
42
|
## Source contract
|
|
22
43
|
|
|
23
|
-
Source discovery covers root and nested `.ts`/`.tsx` files, excluding
|
|
44
|
+
Source discovery covers root and nested `.ts`/`.tsx` files, excluding
|
|
45
|
+
declarations, `node_modules`, `dist` and `.twenty`. Only a direct top-level
|
|
46
|
+
`export default defineX(...)` is classified as a definition. Aliases, namespace
|
|
47
|
+
calls and variable re-exports remain unsupported.
|
|
24
48
|
|
|
25
|
-
|
|
49
|
+
Workflow `.code.ts` files are workspace-authored data and are never classified
|
|
50
|
+
as definitions, regardless of their exports. They remain in the inventory for
|
|
51
|
+
reconciliation and fingerprints. Helpers reserve their paths without being
|
|
52
|
+
evaluated on their own; imported helpers run as dependencies of a definition.
|
|
26
53
|
|
|
27
|
-
|
|
54
|
+
## Definition evaluation
|
|
28
55
|
|
|
29
|
-
|
|
56
|
+
Definitions are bundled using the app's tsconfig and imports, then evaluated
|
|
57
|
+
with a require rooted at the app. React resolves from the app. UI and
|
|
58
|
+
generated-client imports use extraction stubs; these are not working UI or
|
|
59
|
+
client implementations. CSS imports are ignored and conditional-availability
|
|
60
|
+
expressions are transformed for extraction.
|
|
61
|
+
|
|
62
|
+
## Failures and identity
|
|
63
|
+
|
|
64
|
+
An ordinary extraction failure marks a scanned definition unreadable, retaining
|
|
65
|
+
its path so reconciliation can avoid overwriting it. SDK validation errors leave
|
|
66
|
+
the config available for reporting. Reading identity evaluates only application
|
|
67
|
+
definitions, rejects duplicate or invalid application UUIDs, and returns `null`
|
|
68
|
+
when no application is declared.
|
|
69
|
+
|
|
70
|
+
The loader checks SDK compatibility, validation-result shape and cancellation
|
|
71
|
+
between files. Discovery is sorted: the loader, the identity reader and the
|
|
72
|
+
scanner share `listApplicationSourceFiles`, so results do not depend on
|
|
73
|
+
filesystem timing.
|
|
74
|
+
|
|
75
|
+
Detection uses the function name rather than its import origin: a local helper
|
|
76
|
+
named `defineObject`, for example, must be renamed if it returns an incompatible
|
|
77
|
+
shape. Such a mismatch fails the scan. Source rewriting and reconciliation live
|
|
78
|
+
in the adjacent `pull` module.
|
|
30
79
|
|
|
31
80
|
## Verification
|
|
32
81
|
|
|
33
|
-
Run the source-loader, SDK-resolution and worker tests with the CLI Vitest
|
|
82
|
+
Run the source-loader, SDK-resolution and worker tests with the CLI Vitest
|
|
83
|
+
configuration. The repository-SDK fixture requires its existing SDK/UI/shared
|
|
84
|
+
artifacts to be built, as do the other CLI app tests. Worker tests use an
|
|
85
|
+
authoring-only SDK without a project compiler, exercise output and credential
|
|
86
|
+
isolation, and cover source exits and cancellation.
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# Application typechecking
|
|
2
2
|
|
|
3
|
-
The CLI typechecks applications using their own TypeScript installation.
|
|
4
|
-
|
|
3
|
+
The CLI typechecks applications using their own TypeScript installation. See the
|
|
4
|
+
[app tooling overview](../README.md) for package ownership.
|
|
5
5
|
|
|
6
|
-
The internal `typecheckSource` worker request checks the app's source and
|
|
7
|
-
configuration. `bundleSnapshot` runs this typecheck after bundling. A
|
|
8
|
-
discards that build's snapshot. Public build, typecheck, plan
|
|
9
|
-
commands use this pipeline.
|
|
6
|
+
The internal `typecheckSource` worker request checks the app's source and
|
|
7
|
+
compiler configuration. `bundleSnapshot` runs this typecheck after bundling. A
|
|
8
|
+
failed check discards that build's snapshot. Public build, typecheck, plan and
|
|
9
|
+
apply commands use this pipeline. Uninstall reads app identity without
|
|
10
|
+
typechecking.
|
|
10
11
|
|
|
11
12
|
## Compiler ownership
|
|
12
13
|
|
|
@@ -15,13 +16,17 @@ or a workspace ancestor. It never falls back to its own parser dependency,
|
|
|
15
16
|
`NODE_PATH` or Node's global package folders. Apps keep TypeScript in their
|
|
16
17
|
development dependencies; neither apps nor the SDK depend on the CLI.
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
missing compiler API or unsupported Plug'n'Play installation returns
|
|
20
|
-
`TOOLING_UNSUPPORTED`. The resolved compiler entry must belong to the app's
|
|
21
|
-
TypeScript installation so checks use the project's compiler version.
|
|
19
|
+
## Resolution errors
|
|
22
20
|
|
|
23
|
-
TypeScript
|
|
24
|
-
|
|
21
|
+
Missing TypeScript returns `TYPESCRIPT_NOT_INSTALLED`. An incomplete
|
|
22
|
+
installation, missing compiler API or unsupported Plug'n'Play installation
|
|
23
|
+
returns `TOOLING_UNSUPPORTED`. The resolved compiler entry must belong to the
|
|
24
|
+
app's TypeScript installation so checks use the project's compiler version.
|
|
25
|
+
|
|
26
|
+
## Worker and compiler API
|
|
27
|
+
|
|
28
|
+
TypeScript is loaded only in the child worker. Its public JavaScript compiler
|
|
29
|
+
API is required. The CLI uses the installed compiler's diagnostic categories and
|
|
25
30
|
message formatter, so diagnostics follow the project's compiler version. The CLI
|
|
26
31
|
parser used for source loading remains independent.
|
|
27
32
|
|
|
@@ -38,8 +43,8 @@ parser used for source loading remains independent.
|
|
|
38
43
|
- Build warnings remain alongside typecheck diagnostics. Failure never holds a
|
|
39
44
|
snapshot for upload, and cleanup preserves unrelated snapshots.
|
|
40
45
|
- Check cancellation before and after the synchronous compiler work. A busy
|
|
41
|
-
compiler cannot process IPC cancellation mid-call; the worker grace
|
|
42
|
-
|
|
46
|
+
compiler cannot process IPC cancellation mid-call; the worker grace period and
|
|
47
|
+
forced termination remain the fallback.
|
|
43
48
|
|
|
44
49
|
Different compiler versions can produce different diagnostics. Align compiler
|
|
45
50
|
versions when comparing CLI results with another tool. See the
|
|
@@ -54,14 +59,14 @@ From `packages/twenty-cli`, after building the shared and SDK dependencies:
|
|
|
54
59
|
node ../../node_modules/vitest/vitest.mjs run --config vitest.config.ts src/app/typecheck src/app/snapshots --maxWorkers=1
|
|
55
60
|
```
|
|
56
61
|
|
|
57
|
-
The typecheck suite compares the SDK reference, the CLI implementation
|
|
58
|
-
|
|
62
|
+
The typecheck suite compares the SDK reference, the CLI implementation and the
|
|
63
|
+
production worker with the same compiler. It also tests absent and hoisted
|
|
59
64
|
compilers, global-path fallback, incomplete installations and actual TypeScript
|
|
60
|
-
5.9.3 versus 5.7.3 behavior. The 5.7.3 compiler comes from the SDK's
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
Snapshot parity runs both real typecheck phases, with no compiler bypass.
|
|
64
|
-
|
|
65
|
-
contract exercises CLI snapshots against a local HTTP fixture.
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
5.9.3 versus 5.7.3 behavior. The 5.7.3 compiler comes from the SDK's ts-morph
|
|
66
|
+
dependency for this test only.
|
|
67
|
+
|
|
68
|
+
Snapshot parity runs both real typecheck phases, with no compiler bypass. The
|
|
69
|
+
app fixture supplies only the SDK's authoring/runtime exports. The apply
|
|
70
|
+
contract exercises CLI snapshots against a local HTTP fixture. For the fresh CLI
|
|
71
|
+
template, parity compares successful builds with the test setup included and
|
|
72
|
+
Vitest configuration files excluded.
|