@withandeo/cli 0.13.0 → 0.15.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/README.md +4 -11
- package/dist/api.d.ts +27 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +15 -0
- package/dist/api.js.map +1 -1
- package/dist/artifact.d.ts.map +1 -1
- package/dist/artifact.js +21 -0
- package/dist/artifact.js.map +1 -1
- package/dist/contracts.d.ts +21 -0
- package/dist/contracts.d.ts.map +1 -1
- package/dist/main.js +121 -9
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
- package/skill/tender-accounts/references/configuration-secrets.md +16 -4
- package/skill/tender-accounts/references/managed-source.md +34 -11
- package/templates/shopify-customer-account/apps/gateway/scripts/pack-tender-artifact.mjs +5 -2
|
@@ -13,9 +13,7 @@ npx @withandeo/cli source push --json
|
|
|
13
13
|
Run these commands from the independently deployable app directory, or use its
|
|
14
14
|
exact `--cwd`. `source connect` derives the project working directory and build
|
|
15
15
|
contract from Git plus `tender-accounts.json`; do not recreate that contract by
|
|
16
|
-
hand in the admin.
|
|
17
|
-
`--publication default-branch` only for an ordinary service when the merchant
|
|
18
|
-
explicitly wants successful default-branch previews promoted automatically.
|
|
16
|
+
hand in the admin. New connections default to preview-only. Both gateways and services support `--publication default-branch` when a merchant administrator explicitly enables automatic publication. For an existing connection use `source policy show`, then `source policy set --repository SRC_ID --publication default-branch --expected-revision N --idempotency-key KEY`. Saving the policy affects future source builds; it does not publish an existing build. Reconnecting never changes the policy.
|
|
19
17
|
|
|
20
18
|
`source push` includes only the committed revision. On a reviewed repository it
|
|
21
19
|
uploads a bounded Git bundle through Andeo; the trusted runner verifies the
|
|
@@ -99,8 +97,7 @@ intended repository, project, branches, SHA, preview build, and composition.
|
|
|
99
97
|
Never substitute a raw token, direct API, Git force push, ref deletion, or database
|
|
100
98
|
edit. Andeo creates and verifies an archive before history replacement and
|
|
101
99
|
uses an expected-SHA compare-and-swap for the target. History migration always
|
|
102
|
-
suppresses automatic production publication
|
|
103
|
-
preview-only.
|
|
100
|
+
suppresses automatic production publication.
|
|
104
101
|
|
|
105
102
|
If a durable source operation fails for a transient provider or runner reason,
|
|
106
103
|
inspect and resume that same reviewed intent by ID:
|
|
@@ -120,12 +117,38 @@ change stale. Rebase or update the feature branch, push a new committed
|
|
|
120
117
|
revision, wait for its exact preview, and have the administrator review that
|
|
121
118
|
new snapshot. Source landing never calls the production publisher directly;
|
|
122
119
|
after landing, the repository's already configured default-branch policy may
|
|
123
|
-
publish the same
|
|
124
|
-
preview-only.
|
|
120
|
+
publish the same artifact after its exact preview and production validation succeed.
|
|
125
121
|
|
|
126
122
|
Treat source administration and production publication as different acts. A
|
|
127
123
|
source operation may create a new immutable preview lineage, but only the
|
|
128
|
-
merchant's
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
124
|
+
merchant's saved policy or explicit publication approval can authorize production. Portal and gateway remain independent apps: configure variables, policy and delivery for each. Do not imply that two repository refs or apps publish atomically.
|
|
125
|
+
|
|
126
|
+
## Move a legacy managed repository to its tenant namespace
|
|
127
|
+
|
|
128
|
+
New managed repositories use a namespace derived from the project's immutable tenant ID. Existing connections keep their recorded address until an administrator explicitly reconnects them. No repository-transfer script runs.
|
|
129
|
+
|
|
130
|
+
Finish source builds, pushes, operations, deployment work, and open reviews first. Keep your existing checkout and commit any source you intend to push. Read the current repository ID:
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
andeo source status --json
|
|
134
|
+
andeo source reconnect prepare --repository SRC_OLD --idempotency-key tenant-move-20260925 --json
|
|
135
|
+
andeo source reconnect status --reconnection RECONNECT_ID --json
|
|
136
|
+
andeo source push --reconnection RECONNECT_ID --branch main --json
|
|
137
|
+
andeo source reconnect complete --reconnection RECONNECT_ID --expected-sha EXACT_DEFAULT_BRANCH_SHA --json
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Use the actual default branch instead of `main`. The push sends local `HEAD` to the explicit destination branch, without force and without changing your managed remote. Push any other required branches from the corresponding commits before completion. The commands do not assume your checkout contains every remote branch or tag.
|
|
141
|
+
|
|
142
|
+
Preparation pauses the old connection and revokes its write credentials; deployed production continues serving. The destination is not a connected source while it is being seeded, so seed events do not build or publish. Reviewed repositories use this administrator-only seeding path too.
|
|
143
|
+
|
|
144
|
+
Completion revokes all destination write credentials, verifies the exact default-branch SHA, preserves the old source history, and activates the new connection with the same review protection and automatic publication disabled. It explicitly starts an initial preview build. When `initialBuild.startPending` is true, repeat the same completion command to repair the build start. In a linked checkout, completion updates the named managed remote only if it still matches the expected old address (or already matches the new one). Use `--remote NAME` to select the correct existing managed remote.
|
|
145
|
+
|
|
146
|
+
Retry prepare with the same repository ID and idempotency key after an interrupted request. Completion is bound to its first expected SHA; inspect a mismatch instead of changing that input. To abandon a pending move:
|
|
147
|
+
|
|
148
|
+
```sh
|
|
149
|
+
andeo source reconnect cancel --reconnection RECONNECT_ID --json
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Cancellation revokes destination access and restores the old connection. It retains any unused destination repository for explicit operator cleanup; it never deletes Git contents or adopts another request's destination. A completed reconnect cannot be cancelled.
|
|
153
|
+
|
|
154
|
+
After verifying the new preview, inspect `andeo source policy show --json` and use the existing administrator policy command to restore automatic publication if wanted. Changing policy does not publish an existing build; push a new qualifying revision under the new policy.
|
|
@@ -22,7 +22,10 @@ if (config.schema !== "tender.account-source/v1" || config.runtime?.kind !== "wo
|
|
|
22
22
|
|
|
23
23
|
const retainedConfigPath = process.env.TENDER_PUBLIC_VARS_SOURCE;
|
|
24
24
|
let parsedVars;
|
|
25
|
-
if (
|
|
25
|
+
if (config.runtimeVars === true) {
|
|
26
|
+
// Deployment resolves saved environment configuration; no values enter this artifact.
|
|
27
|
+
parsedVars = Object.fromEntries(config.publicVarNames.map(name => [name, "declared"]));
|
|
28
|
+
} else if (retainedConfigPath) {
|
|
26
29
|
const retained = JSON.parse(await readFile(resolve(retainedConfigPath), "utf8"));
|
|
27
30
|
if (retained?.schema !== "tender.external-app-build/v1") {
|
|
28
31
|
throw new Error("The retained configuration must be an app build envelope.");
|
|
@@ -74,7 +77,7 @@ const manifest = {
|
|
|
74
77
|
health: { path: "/api/health" },
|
|
75
78
|
resources,
|
|
76
79
|
services: config.services,
|
|
77
|
-
vars: publicVars,
|
|
80
|
+
...(config.runtimeVars === true ? {runtimeVars: Object.keys(publicVars).sort()} : {vars: publicVars}),
|
|
78
81
|
databaseSchema,
|
|
79
82
|
};
|
|
80
83
|
const artifactsRoot = join(appRoot, ".tender/artifacts");
|