@m-kopa/launchpad-cli 0.65.0 → 0.67.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/CHANGELOG.md +21 -0
- package/dist/bundle/upload.d.ts +4 -0
- package/dist/bundle/upload.d.ts.map +1 -1
- package/dist/cli.js +710 -137
- package/dist/commands/deploy.d.ts +15 -4
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/init.d.ts +2 -2
- package/dist/commands/migrate.d.ts +15 -0
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/status.d.ts +14 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/manifest/migrate-dispatch.d.ts +7 -3
- package/dist/manifest/migrate-dispatch.d.ts.map +1 -1
- package/dist/manifest/wrangler-config.d.ts +9 -2
- package/dist/manifest/wrangler-config.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/skills/launchpad-content-pr/SKILL.md +130 -50
- package/skills/launchpad-deploy/SKILL.md +43 -7
- package/skills/launchpad-deploy-status/SKILL.md +1 -1
- package/skills/launchpad-destroy/SKILL.md +1 -1
- package/skills/launchpad-identity/SKILL.md +135 -38
- package/skills/launchpad-onboard/SKILL.md +3 -2
- package/skills/launchpad-report/SKILL.md +1 -1
- package/skills/launchpad-status/SKILL.md +1 -1
|
@@ -27,11 +27,22 @@ export { MAX_COMPRESSED_TARBALL_BYTES };
|
|
|
27
27
|
* Workers dispatch is the default for new static, React and React API apps. Before a
|
|
28
28
|
* first deploy, convert a gateway manifest that only implies Pages (no
|
|
29
29
|
* `origin` in v1 or v2) to v2 dispatch. An explicit origin is an opt-out and
|
|
30
|
-
* registered apps keep their origin.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* registered apps keep their origin. A new app that cannot convert stops with
|
|
31
|
+
* DispatchIneligibleError rather than quietly landing on Pages, where new
|
|
32
|
+
* projects fail at the account's Pages limit.
|
|
33
|
+
*
|
|
34
|
+
* Registry failures are handled per outcome. An app that could convert fails
|
|
35
|
+
* closed: a retry gets a new app onto dispatch, and a registered app's deploy
|
|
36
|
+
* needs the same bot to answer anyway. An app that cannot convert fails open
|
|
37
|
+
* with a warning: blocking would stop a registered app's deploy on a registry
|
|
38
|
+
* blip, and a new app that slips through still meets the bot's Pages capacity
|
|
39
|
+
* refusal. Also throws when the converted manifest cannot be saved.
|
|
33
40
|
*/
|
|
34
|
-
export declare function defaultToDispatch(cwd: string, manifestPath: string, io: CliIo): Promise<
|
|
41
|
+
export declare function defaultToDispatch(cwd: string, manifestPath: string, io: CliIo): Promise<void>;
|
|
42
|
+
/** A new app that only implies Pages and cannot convert to dispatch. Nothing was deployed. */
|
|
43
|
+
export declare class DispatchIneligibleError extends Error {
|
|
44
|
+
constructor(reason: string, v2: boolean);
|
|
45
|
+
}
|
|
35
46
|
/** Pure wording branch kept exported for the v1 byte-identity contract. */
|
|
36
47
|
/** What the local manifest says the origin is: v1 manifests are always pages;
|
|
37
48
|
* a v2 manifest defaults to pages; `undefined` means it could not be read. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AA0EA,OAAO,EAGL,4BAA4B,EAC7B,MAAM,uBAAuB,CAAC;AAY/B,OAAO,EAAa,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAY,MAAM,kBAAkB,CAAC;AASjE,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,CAAC;AAEjD,eAAO,MAAM,aAAa,EAAE,OAI3B,CAAC;AAEF,UAAU,UAAU;IAClB,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AA6RD;;;;;;GAMG;AACH,wB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C/E,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;AAE9D,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,cAAc,CAG/E;AAED;;;4EAG4E;AAC5E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;CACrD,GAAG,OAAO,CAIV;AAED,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,OAAO,EACvB,UAAU,GAAE,OAAO,GAAG,SAAqB,GAC1C,MAAM,CAOR"}
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ export interface InitInputs {
|
|
|
10
10
|
type: AppType | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* Edge gating mode (sp-gwdflt). Supplied via `--auth`. Undefined ⇒
|
|
13
|
-
* the buildManifest default: `gateway` for
|
|
14
|
-
*
|
|
13
|
+
* the buildManifest default: `gateway` for every shape, containers
|
|
14
|
+
* included (AIO-811).
|
|
15
15
|
*/
|
|
16
16
|
auth: AuthMode | undefined;
|
|
17
17
|
/** New apps choose dispatch explicitly; existing manifests keep their origin. */
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { Command } from "../dispatcher.js";
|
|
2
2
|
export declare const migrateCommand: Command;
|
|
3
|
+
/** Plain-text env var names that look like secrets, so the author can move them. */
|
|
4
|
+
export declare function plainSecretWarning(names: readonly string[]): string | null;
|
|
3
5
|
export declare const BACKUP_PATH = ".launchpad/manifest-before-dispatch.yaml";
|
|
4
6
|
/** Dispatch secrets land on the Worker script, which exists only after the first delivery. */
|
|
5
7
|
export declare function secretsNextStep(secrets: readonly string[]): string | null;
|
|
@@ -10,6 +12,8 @@ export type DispatchConversion = {
|
|
|
10
12
|
readonly slug: string;
|
|
11
13
|
/** Secret names the converted manifest declares; set with `secrets push` after first delivery. */
|
|
12
14
|
readonly secrets: readonly string[];
|
|
15
|
+
/** Plain-text env var names that look like secrets; worth a warning, not a refusal. */
|
|
16
|
+
readonly plainSecretLike: readonly string[];
|
|
13
17
|
};
|
|
14
18
|
/**
|
|
15
19
|
* Convert `<cwd>/launchpad.yaml` to a v2 dispatch manifest, or report that it
|
|
@@ -18,6 +22,17 @@ export type DispatchConversion = {
|
|
|
18
22
|
* cannot preserve. Shared by `migrate` and first-deploy auto-conversion.
|
|
19
23
|
*/
|
|
20
24
|
export declare function convertToDispatch(cwd: string, dryRun: boolean): Promise<DispatchConversion>;
|
|
25
|
+
/**
|
|
26
|
+
* The app cannot convert and the registry could not say whether it is new.
|
|
27
|
+
* Keeps the runtime reason as its message, so `migrate` reads as before.
|
|
28
|
+
*/
|
|
29
|
+
export declare class IneligibleUnconfirmedError extends Error {
|
|
30
|
+
constructor(cause: unknown);
|
|
31
|
+
}
|
|
32
|
+
/** launchpad.yaml does not parse, so whether the app could convert is unknown. */
|
|
33
|
+
export declare class InvalidManifestError extends Error {
|
|
34
|
+
constructor();
|
|
35
|
+
}
|
|
21
36
|
/** The app is eligible but the converted manifest or its backup could not be written. */
|
|
22
37
|
export declare class MigrationSaveError extends Error {
|
|
23
38
|
constructor(cause: unknown);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAS,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIvD,eAAO,MAAM,cAAc,EAAE,OAI5B,CAAC;
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAS,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIvD,eAAO,MAAM,cAAc,EAA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** AIO-811: latest container content-redeploy outcome (never changes `state`). */
|
|
31
|
+
readonly containerRedeploy?: ContainerRedeployView;
|
|
32
|
+
}
|
|
33
|
+
/** Latest container content-redeploy outcome, as the bot reports it. */
|
|
34
|
+
export interface ContainerRedeployView {
|
|
35
|
+
readonly attemptId: string;
|
|
36
|
+
readonly state: "running" | "failed" | "verified";
|
|
37
|
+
readonly at: string;
|
|
38
|
+
readonly stage?: string;
|
|
39
|
+
readonly message?: string;
|
|
30
40
|
}
|
|
31
41
|
/** What status reports, in machine-readable form for downstream
|
|
32
42
|
* consumers (M-1187 destroy, M-1189 update-skill). The lifecycle states
|
|
@@ -94,6 +104,8 @@ export interface StatusJsonOutput {
|
|
|
94
104
|
readonly groupIssues?: readonly StatusGroupIssue[];
|
|
95
105
|
/** Latest deploy attempt capability, when the bot retains one. */
|
|
96
106
|
readonly statusPageUrl?: string;
|
|
107
|
+
/** AIO-811: latest container content-redeploy outcome (never changes `state`). */
|
|
108
|
+
readonly containerRedeploy?: ContainerRedeployView;
|
|
97
109
|
}
|
|
98
110
|
export interface StatusGroupIssue {
|
|
99
111
|
readonly code: "group_not_assigned";
|
|
@@ -137,6 +149,8 @@ export declare function computeV2SpecDrift(local: ManifestV2, deployed: Manifest
|
|
|
137
149
|
local: unknown;
|
|
138
150
|
deployed: unknown;
|
|
139
151
|
}>;
|
|
152
|
+
/** One human line for the latest container content-redeploy outcome. */
|
|
153
|
+
export declare function containerRedeployLine(view: ContainerRedeployView): string;
|
|
140
154
|
/** Build the dispatch status block without consulting the Pages-shaped mirror. */
|
|
141
155
|
export declare function renderV2DeploymentLines(dep: DeploymentStatusView): string[];
|
|
142
156
|
/** Arg parser (reads the filesystem only for slug inference).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AA6CA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG1D,OAAO,EAGL,KA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1
|
import { type DeploymentManifest, type Manifest, type ManifestV2 } from "@m-kopa/launchpad-engine";
|
|
2
|
+
/** What the app's wrangler config declares, already checked by the caller. */
|
|
3
|
+
export interface WranglerSettings {
|
|
4
|
+
readonly d1?: string;
|
|
5
|
+
readonly vars?: Readonly<Record<string, string>>;
|
|
6
|
+
}
|
|
2
7
|
/**
|
|
3
8
|
* Convert a Pages-implied manifest to v2 dispatch, keeping only what the
|
|
4
|
-
* dispatch runtime preserves. `
|
|
5
|
-
* wrangler config declares, already checked by the caller.
|
|
9
|
+
* dispatch runtime preserves. Wrangler `vars` become plain_text env vars.
|
|
6
10
|
*/
|
|
7
|
-
export declare function dispatchManifest(manifest: DeploymentManifest,
|
|
11
|
+
export declare function dispatchManifest(manifest: DeploymentManifest, wrangler?: WranglerSettings): ManifestV2;
|
|
8
12
|
/**
|
|
9
13
|
* The D1 binding name when `targets` is exactly one pages target carrying
|
|
10
14
|
* `d1_binding`. Dispatch declares that database as `spec.bindings.d1`; every
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-dispatch.d.ts","sourceRoot":"","sources":["../../src/manifest/migrate-dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,kBAAkB,EAEvB,KAAK,QAAQ,EACb,KAAK,UAAU,EAGhB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"migrate-dispatch.d.ts","sourceRoot":"","sources":["../../src/manifest/migrate-dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,kBAAkB,EAEvB,KAAK,QAAQ,EACb,KAAK,UAAU,EAGhB,MAAM,0BAA0B,CAAC;AAUlC,8EAA8E;AAC9E,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAClD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,QAAQ,GAAE,gBAAqB,GAAG,UAAU,CAiD1G;AA2FD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,MAAM,GAAG,SAAS,CAIrF"}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
export
|
|
1
|
+
/** What a convertible wrangler config carries to dispatch. */
|
|
2
|
+
export interface WranglerRuntime {
|
|
3
|
+
/** The single D1 binding name, if the config declares one. */
|
|
4
|
+
readonly d1?: string;
|
|
5
|
+
/** Plain `vars`, which become v2 plain_text env vars. */
|
|
6
|
+
readonly vars: Readonly<Record<string, string>>;
|
|
7
|
+
}
|
|
8
|
+
/** The D1 binding and plain vars a wrangler config declares. Throws on anything else. */
|
|
9
|
+
export declare function wranglerRuntime(file: string, text: string): WranglerRuntime;
|
|
3
10
|
//# sourceMappingURL=wrangler-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrangler-config.d.ts","sourceRoot":"","sources":["../../src/manifest/wrangler-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wrangler-config.d.ts","sourceRoot":"","sources":["../../src/manifest/wrangler-config.ts"],"names":[],"mappings":"AAsBA,8DAA8D;AAC9D,MAAM,WAAW,eAAe;IAC9B,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACjD;AAED,yFAAyF;AACzF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,eAAe,CAS3E"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "0.
|
|
1
|
+
export declare const CLI_VERSION = "0.67.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: launchpad-content-pr
|
|
3
|
-
description: Push a content change to a Launchpad app via `launchpad deploy` and verify it shipped via `launchpad status`. Covers the post-first-deploy iteration loop (edit → deploy → verify)
|
|
4
|
-
version: 0.
|
|
3
|
+
description: Push a content change to a Launchpad app via `launchpad deploy` and verify it shipped via `launchpad status`. Covers the post-first-deploy iteration loop (edit → deploy → verify) - subsequent deploys commit directly to the app repo's main, then the dispatch delivery (or, for a legacy Pages app, the Pages build) runs asynchronously, so verification is its own step. Use when someone says "push a content change", "ship an update", "/launchpad-content-pr", "verify my deploy", or after `/launchpad-deploy` reports `done` and they want to follow up with an edit.
|
|
4
|
+
version: 0.67.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -35,22 +35,45 @@ verify it shipped.
|
|
|
35
35
|
|
|
36
36
|
The slash-command name is historical: subsequent deploys do **not**
|
|
37
37
|
open a content PR any more. The bot commits the bundle **directly to
|
|
38
|
-
the app repo's `main
|
|
39
|
-
|
|
38
|
+
the app repo's `main`**, and what builds that commit depends on the
|
|
39
|
+
app's origin (next section). Either way the build runs
|
|
40
|
+
asynchronously - so "ship" and "verify" are two separate steps, and
|
|
40
41
|
this skill covers both.
|
|
41
42
|
|
|
42
43
|
Under Model A the first deploy and the first content are the same
|
|
43
|
-
event
|
|
44
|
+
event - `launchpad init` + `launchpad deploy` from the user's CWD
|
|
44
45
|
stages the working tree with the provisioning run: the workflow's
|
|
45
46
|
`content_seeded` stage commits it straight onto the app repo's
|
|
46
|
-
`main`, the bot waits for the
|
|
47
|
-
|
|
47
|
+
`main`, the bot waits for the first build to land (the dispatch
|
|
48
|
+
delivery reaching `delivered`, or the verified Pages deployment for a
|
|
49
|
+
legacy app), and the lifecycle flips to `live`. On dispatch that is
|
|
50
|
+
proof of delivery, not a check of the public hostname.
|
|
48
51
|
There is no separate "now push content" step.
|
|
49
52
|
|
|
50
53
|
This skill is therefore the **iteration** companion to
|
|
51
54
|
`/launchpad-deploy`: once an app is live, how do you ship the next
|
|
52
55
|
change — and how do you know it's actually serving.
|
|
53
56
|
|
|
57
|
+
## Which origin is this app on?
|
|
58
|
+
|
|
59
|
+
New `static`, `react` and `react+api` apps are served from Workers
|
|
60
|
+
dispatch (`spec.origin: dispatch` in a v2 manifest). Cloudflare Pages
|
|
61
|
+
is the legacy origin that older apps still use. The deploy verb is
|
|
62
|
+
the same for both, but the build, the verification output and a few
|
|
63
|
+
follow-up verbs differ, so check first:
|
|
64
|
+
|
|
65
|
+
- **Local manifest** - `apiVersion: launchpad.m-kopa.us/v2` with
|
|
66
|
+
`spec.origin: dispatch` means dispatch. A v1 manifest, or a v2
|
|
67
|
+
manifest with no `spec.origin` or `spec.origin: pages`, means Pages.
|
|
68
|
+
- **Deployed truth** - `launchpad status <slug>` prints a
|
|
69
|
+
`v2 delivery: state ...` line for a dispatch app and a
|
|
70
|
+
`last deployment: ...` Pages build line for a Pages app. In
|
|
71
|
+
`--json`, `deployment.origin` is `"dispatch"` for a dispatch app (absent or `"pages"` for Pages).
|
|
72
|
+
|
|
73
|
+
A dispatch app has **no Pages project**. That is expected; do not
|
|
74
|
+
treat a missing Pages project as a failure, and do not try to create
|
|
75
|
+
one.
|
|
76
|
+
|
|
54
77
|
## Audience changes
|
|
55
78
|
|
|
56
79
|
Keep the existing audience for ordinary content updates.
|
|
@@ -109,17 +132,29 @@ What happens:
|
|
|
109
132
|
the bundle **directly to `main`** on `launchpad-app-<slug>` via
|
|
110
133
|
the Git Data API — you are the commit author, the bot is the
|
|
111
134
|
committer. No PR, no merge step.
|
|
112
|
-
- The CLI prints the bot's 202 ack
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
135
|
+
- The CLI prints the bot's 202 ack (`✓ Bundle accepted — committed
|
|
136
|
+
as <sha>`). By default it then **waits for the build and verifies
|
|
137
|
+
it** (up to ~180s). Tune with `--verify-timeout=<secs>`, or skip it
|
|
138
|
+
with `--no-verify` (commit only, return immediately).
|
|
139
|
+
- **Dispatch app:** the app repo's own GitHub workflow
|
|
140
|
+
(`launchpad-build`) builds the commit, then the bot verifies that
|
|
141
|
+
run and uploads its artifact to the dispatch namespace. The CLI
|
|
142
|
+
prints each stage once as it changes (source committed, CI
|
|
143
|
+
building, run verified, artifact uploading, live in dispatch
|
|
144
|
+
namespace) and finishes with `✓ Live in dispatch namespace -
|
|
145
|
+
delivered commit <sha>`. A refused delivery exits non-zero with
|
|
146
|
+
`✗ Dispatch delivery REFUSED at <stage>`, the reason, and the
|
|
147
|
+
GitHub Actions run URL when there is one. There is no served-bytes comparison on this
|
|
148
|
+
path; the delivery record is the proof.
|
|
149
|
+
- **Pages app (legacy):** Cloudflare Pages builds the commit. The CLI
|
|
150
|
+
byte-compares the served entrypoint against what you shipped and
|
|
116
151
|
prints `✓ Verified — the live deployment serves exactly what you
|
|
117
|
-
shipped
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
is still async and can fail afterwards
|
|
122
|
-
`launchpad status`.
|
|
152
|
+
shipped` (static) or `✓ Live and reachable (HTTP 200)` (react /
|
|
153
|
+
react+api), or exits non-zero if the build fails or the served
|
|
154
|
+
bytes don't match (sp-dplvfy).
|
|
155
|
+
- When verify is skipped or times out (`pending`), the commit landed
|
|
156
|
+
but the build or delivery is still async and can fail afterwards -
|
|
157
|
+
confirm with `launchpad status`.
|
|
123
158
|
|
|
124
159
|
Flags worth knowing:
|
|
125
160
|
|
|
@@ -137,7 +172,8 @@ Exit codes:
|
|
|
137
172
|
|
|
138
173
|
- **0** — bundle accepted and committed (or "nothing to deploy"
|
|
139
174
|
when `main` already matches the bundle), **and** default in-line
|
|
140
|
-
verification confirmed the
|
|
175
|
+
verification confirmed it: the delivery on dispatch, the served
|
|
176
|
+
content on Pages. With
|
|
141
177
|
`--no-verify`, or if verification times out at `pending`, exit 0
|
|
142
178
|
means only that the commit landed — confirm with `launchpad status`.
|
|
143
179
|
- **non-zero** — gate rejections are rendered with per-file detail
|
|
@@ -178,14 +214,21 @@ violation didn't block this deploy" is by design, not a missed gate.
|
|
|
178
214
|
There is **no** server-side scan of `package.json` dependencies,
|
|
179
215
|
top-level files, or source patterns. Express/Koa-style servers,
|
|
180
216
|
native DB drivers (`pg`, `better-sqlite3`, …), `dotenv`, and
|
|
181
|
-
pm2/Docker artefacts are not rejected at deploy time
|
|
182
|
-
won't run on the
|
|
183
|
-
build or runtime instead.
|
|
217
|
+
pm2/Docker artefacts are not rejected at deploy time - they simply
|
|
218
|
+
won't run on the Workers runtime (dispatch or Pages) and fail at
|
|
219
|
+
build or runtime instead. On a legacy Pages `react+api` app,
|
|
184
220
|
`compatibility_flags = ["nodejs_compat"]` in `wrangler.toml`
|
|
185
|
-
(ADR-0011) is **required but not validated**
|
|
186
|
-
at runtime.
|
|
221
|
+
(ADR-0011) is **required but not validated** - a missing flag fails
|
|
222
|
+
at runtime. On dispatch the bot sets `nodejs_compat` on a `react+api`
|
|
223
|
+
Worker itself. Treat the stack-constraints table in `/launchpad-deploy`
|
|
187
224
|
as advisory architecture guidance, not an enforced gate.
|
|
188
225
|
|
|
226
|
+
A dispatch delivery does refuse a few things a Pages build accepted:
|
|
227
|
+
hidden files or directories inside the build output, functions that
|
|
228
|
+
compile to more than one module, and a `_worker.js` directory. The
|
|
229
|
+
full list is in `/launchpad-deploy`. Fix the named cause on dispatch;
|
|
230
|
+
never move the app to Pages to get past a refusal.
|
|
231
|
+
|
|
189
232
|
### Verifying locally before you ship
|
|
190
233
|
|
|
191
234
|
The CLI ships an offline validator that catches the schema-level
|
|
@@ -221,20 +264,37 @@ group passes (no need to use `deploy --dry-run` as a workaround).
|
|
|
221
264
|
launchpad status <slug>
|
|
222
265
|
```
|
|
223
266
|
|
|
224
|
-
`launchpad status` reports manifest drift **and** the live
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
267
|
+
`launchpad status` reports manifest drift **and** the live build
|
|
268
|
+
truth for the app's origin. (See `/launchpad-status` for the full
|
|
269
|
+
state list.) What you're looking for after a deploy:
|
|
270
|
+
|
|
271
|
+
**Dispatch app** - a `v2 delivery:` line:
|
|
272
|
+
|
|
273
|
+
- **`v2 delivery: state delivered, stage live, commit <sha>`** - your
|
|
274
|
+
commit is live in the dispatch namespace. Check the short SHA is
|
|
275
|
+
yours. You're done.
|
|
276
|
+
- **`state pending`** at stage `committed`, `building`, `verified` or
|
|
277
|
+
`uploading` - still in flight. Re-run `launchpad status` shortly;
|
|
278
|
+
each status read also moves a pending delivery forward.
|
|
279
|
+
- **`state refused`**, followed by `failed at <stage>: <reason>` and,
|
|
280
|
+
when there is one, a `GitHub run:` URL - the commit landed but the delivery was refused.
|
|
281
|
+
A `serving: previous successful deployment ...` line says what is
|
|
282
|
+
still live. Surface the reason verbatim, fix the cause, and re-run
|
|
283
|
+
`launchpad deploy`.
|
|
284
|
+
|
|
285
|
+
**Pages app (legacy)** - a `last deployment:` line:
|
|
229
286
|
|
|
230
|
-
- **`live, in sync`** with `last deployment: build success`
|
|
287
|
+
- **`live, in sync`** with `last deployment: build success` - your
|
|
231
288
|
commit landed and the build is serving. You're done.
|
|
232
289
|
- **`last deployment: build FAILED at stage "<stage>"`** (+ log
|
|
233
|
-
excerpt)
|
|
290
|
+
excerpt) - the commit landed but the build broke; the previous
|
|
234
291
|
successful deployment is still serving. Fix the cause and re-run
|
|
235
292
|
`launchpad deploy`.
|
|
236
|
-
- **`build IN PROGRESS`**
|
|
293
|
+
- **`build IN PROGRESS`** - re-run `launchpad status` shortly to
|
|
237
294
|
confirm the outcome.
|
|
295
|
+
|
|
296
|
+
Either origin:
|
|
297
|
+
|
|
238
298
|
- **`drift: <fields>`** — your local manifest diverges from what's
|
|
239
299
|
deployed. Either re-run `launchpad deploy` to ship the local, or
|
|
240
300
|
`launchpad pull --manifest <slug> --out launchpad.yaml` to bring the local
|
|
@@ -242,11 +302,11 @@ for after a deploy:
|
|
|
242
302
|
- **provisioning / failed / destroy states** — route to
|
|
243
303
|
`/launchpad-deploy-status` or `/launchpad-destroy`.
|
|
244
304
|
|
|
245
|
-
Do not declare a change shipped until `status` shows the build
|
|
246
|
-
outcome for your commit.
|
|
305
|
+
Do not declare a change shipped until `status` shows the build or
|
|
306
|
+
delivery outcome for your commit.
|
|
247
307
|
|
|
248
308
|
You can also point a browser at `https://<slug>.launchpad.m-kopa.us`
|
|
249
|
-
once status reports the build green. An SSO gate sits in front of
|
|
309
|
+
once status reports the delivery or build green. An SSO gate sits in front of
|
|
250
310
|
the app: for a gateway-fronted app (the default, `auth: gateway`)
|
|
251
311
|
expect a redirect to the Entra-OIDC gateway (Microsoft sign-in) on
|
|
252
312
|
the first request; for an `auth: access` app expect a redirect to
|
|
@@ -260,8 +320,11 @@ If the URL serves the wrong thing:
|
|
|
260
320
|
via the portal admin UI); the
|
|
261
321
|
access-lockout runbook lives in
|
|
262
322
|
`launchpad-platform/docs/runbooks/access-lockout.md`.
|
|
263
|
-
- **`404`** → Pages
|
|
264
|
-
`launchpad status <slug
|
|
323
|
+
- **`404`** → the dispatch delivery or Pages build hasn't finished,
|
|
324
|
+
or it failed. Run `launchpad status <slug>` to see the most recent
|
|
325
|
+
outcome. On a dispatch `react+api` app, a 404 on a route that
|
|
326
|
+
worked on Pages can also mean a function called `next()` to fall
|
|
327
|
+
through to a static asset, which dispatch does not support.
|
|
265
328
|
- **`5xx` from Cloudflare** → wait + retry; cert issuance can lag a
|
|
266
329
|
few minutes on a brand-new hostname.
|
|
267
330
|
|
|
@@ -271,27 +334,39 @@ Once you've shipped first content, the daily-use verbs are:
|
|
|
271
334
|
|
|
272
335
|
- **`launchpad status`** (`/launchpad-status`) — is my local
|
|
273
336
|
`launchpad.yaml` in sync with what's deployed, and did the last
|
|
274
|
-
build succeed?
|
|
337
|
+
build or delivery succeed?
|
|
275
338
|
- **`launchpad pull --manifest <slug>`** (`/launchpad-status`) - read the
|
|
276
339
|
currently-deployed `launchpad.yaml`.
|
|
277
340
|
- **`launchpad deploy`** — bundle the working tree; the bot commits
|
|
278
341
|
it directly to the app repo's `main`.
|
|
279
|
-
- **`launchpad redeploy <slug>`**
|
|
280
|
-
current commit *without* changing content. Use it to
|
|
281
|
-
secret you just pushed** (
|
|
282
|
-
so `secrets push` alone won't take effect
|
|
283
|
-
|
|
342
|
+
- **`launchpad redeploy <slug>`** - Pages apps only: re-run a Pages
|
|
343
|
+
build of the current commit *without* changing content. Use it to
|
|
344
|
+
**activate a secret you just pushed** (Pages binds env only on a new
|
|
345
|
+
build, so `secrets push` alone won't take effect there) or to force
|
|
346
|
+
a clean rebuild. See `/commands/redeploy`. On a dispatch app it is a
|
|
347
|
+
no-op that prints `no redeploy needed` and exits 0; it does not
|
|
348
|
+
re-run the dispatch build. To rebuild a dispatch app, ship a change
|
|
349
|
+
with `launchpad deploy`.
|
|
284
350
|
- **`launchpad envvars`** — list / set / remove non-secret
|
|
285
351
|
production env vars.
|
|
286
352
|
- **`launchpad secrets template`** — emit `.env.example` from the
|
|
287
353
|
manifest's secret bindings.
|
|
288
|
-
- **`launchpad secrets push`**
|
|
289
|
-
(never via git).
|
|
354
|
+
- **`launchpad secrets push`** - push secret values from `.env`
|
|
355
|
+
(never via git). On a dispatch app the secret is live as soon as
|
|
356
|
+
`push` sets it, with no redeploy, and later deliveries keep it. It
|
|
357
|
+
needs the first delivery to have happened (check `launchpad
|
|
358
|
+
status`); pushing earlier fails with `dispatch_script_not_delivered`.
|
|
359
|
+
The gateway verifier names (`GATEWAY_*`, `CF_ACCESS_*`, `JWKS_URL`)
|
|
360
|
+
are platform-set on dispatch and refused with `reserved_secret_name`.
|
|
361
|
+
On a Pages app, follow the push with `launchpad redeploy`.
|
|
290
362
|
- **`launchpad secrets status`** — names-only PRESENT/MISSING audit
|
|
291
363
|
per binding.
|
|
292
|
-
- **`launchpad logs --slug <slug>`**
|
|
293
|
-
deployment history (default 10 entries, max 25 via
|
|
294
|
-
Note: the slug is flag-only, not positional.
|
|
364
|
+
- **`launchpad logs --slug <slug>`** - Pages apps only: recent
|
|
365
|
+
Cloudflare Pages deployment history (default 10 entries, max 25 via
|
|
366
|
+
`--lines`). Note: the slug is flag-only, not positional. A dispatch
|
|
367
|
+
app has no Pages deployment history, so `logs` errors there; use
|
|
368
|
+
`launchpad status`, which shows the refusal reason and, when there
|
|
369
|
+
is one, the GitHub Actions run URL.
|
|
295
370
|
- **`launchpad rollback`** — revert manifest to a prior git SHA +
|
|
296
371
|
re-apply.
|
|
297
372
|
|
|
@@ -308,9 +383,14 @@ Once you've shipped first content, the daily-use verbs are:
|
|
|
308
383
|
`launchpad deploy`.
|
|
309
384
|
- Do **not** treat exit 0 from `launchpad deploy --no-verify` (or a
|
|
310
385
|
run whose verification timed out at `pending`) as "live". The commit
|
|
311
|
-
landed, but the build is still async and can fail
|
|
312
|
-
verify with `launchpad status`. A default deploy
|
|
313
|
-
already
|
|
386
|
+
landed, but the build or delivery is still async and can fail
|
|
387
|
+
afterwards - verify with `launchpad status`. A default deploy
|
|
388
|
+
(verification on) already waits for the dispatch delivery, or
|
|
389
|
+
byte-checks the served Pages content, before exiting 0.
|
|
390
|
+
- Do **not** move a dispatch app to Pages (`spec.origin: pages`, a v1
|
|
391
|
+
manifest, `--origin pages`) to get past a refused delivery, and do
|
|
392
|
+
not reach for `redeploy` or `logs` on a dispatch app. The account
|
|
393
|
+
has a hard limit of 100 Pages projects; dispatch apps use none.
|
|
314
394
|
- Do **not** re-implement the server-side gates locally.
|
|
315
395
|
`launchpad validate` plus the CLI's own app-boundary pre-flight
|
|
316
396
|
cover the local half; the bot enforces the rest server-side and
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: launchpad-deploy
|
|
3
3
|
description: Walk a Launchpad user through deploying an app from their local working directory (Model A — `launchpad init` + `launchpad deploy`). Wraps the CLI verbs end-to-end: detects the app shape, scaffolds `launchpad.yaml`, resolves the allowed Entra group via `launchpad groups`, bundles the CWD via `launchpad deploy`, and watches the rollout via `launchpad status`. Use when someone says "deploy a new app", "ship my app to Launchpad", "/launchpad-deploy", "I have an app locally — get it on Launchpad", or any variant. Resume/abandon for legacy in-flight provisioning is at the bottom.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.67.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -158,12 +158,15 @@ Existing apps and retries retain their assigned gateway and public URL.
|
|
|
158
158
|
An older manifest that only implies Pages (v1, or v2 without `spec.origin`) is converted to dispatch automatically on the first `launchpad deploy` of an unregistered static, React or React API app.
|
|
159
159
|
Tell the author when deploy reports the conversion, and point them at the backup in `.launchpad/manifest-before-dispatch.yaml`.
|
|
160
160
|
`launchpad migrate --origin dispatch --dry-run` runs the same check without deploying, if the author wants to see it first.
|
|
161
|
-
If deploy
|
|
161
|
+
If deploy stops with `this new app cannot move to Workers dispatch`, nothing was deployed; tell the author the named setting, and do not delete files or change `appType` to force the conversion.
|
|
162
|
+
The two ways forward are fixing that setting, or setting `origin: pages` (v1) / `spec.origin: pages` (v2) to choose Pages on purpose; a new Pages app fails while the account is at its Pages project limit, so say that before they pick Pages.
|
|
162
163
|
Do not regenerate the manifest with `init`, broaden its groups, or change private ownership to work around the quota.
|
|
163
|
-
|
|
164
|
+
Plain wrangler `[vars]` carry over as plain-text env vars; a var named like the gateway verifier env (`GATEWAY_*`, `CF_ACCESS_*`, `JWKS_URL`), a `*_TOKEN` / `*_SECRET` name, the D1 binding, or an existing env var with a different value is refused by name.
|
|
165
|
+
If deploy or migrate warns that a carried var looks like a secret, ask the author whether it is one; if so it belongs in an `env-file` secret set with `launchpad secrets push`, and the value should be rotated.
|
|
166
|
+
If `launchpad migrate` refuses functions, custom runtime configuration or bindings, explain the named limitation.
|
|
164
167
|
For a React API app, `functions/` converts as-is and the dispatch build compiles it; its D1 becomes `spec.bindings.d1` and declared secrets become `secret_text` env vars.
|
|
165
168
|
When deploy says secrets carried over, tell the author to run `launchpad secrets push` once `launchpad status` shows the first delivery; pushing earlier fails with `dispatch_script_not_delivered`.
|
|
166
|
-
Still refused on dispatch, with the reason printed: wrangler settings beyond name, compatibility date/flags, `pages_build_output_dir
|
|
169
|
+
Still refused on dispatch, with the reason printed: wrangler settings beyond name, compatibility date/flags, `pages_build_output_dir`, one D1 and plain string `vars` (so KV, R2, services, Durable Objects, queues, `[env.*]`), a root `functions/_middleware` or root-level catch-all that would claim `/*`, a hand-written `_worker.js`, and functions that compile to more than one module.
|
|
167
170
|
A function that calls `next()` to fall through to a static asset does not work on dispatch, because the Worker has no asset fallback.
|
|
168
171
|
A dispatch build also refuses hidden files or directories inside the build output (`destination_dir`) with `hidden build output is not supported: <path>`.
|
|
169
172
|
`launchpad status <slug>` shows this as `v2 delivery: state refused` followed by the reason.
|
|
@@ -178,7 +181,7 @@ Do not use this command to migrate a registered app or delete its Pages resource
|
|
|
178
181
|
If the pool is full or inventory cannot be read, report the capacity error; do not fall back to Pages or change authentication to bypass it.
|
|
179
182
|
Do not replace that manifest with a v1 example or add `--origin pages` just because an older app uses Pages.
|
|
180
183
|
Use `--origin pages` only when Pages is deliberately required.
|
|
181
|
-
Containers keep their existing deployment path.
|
|
184
|
+
Containers keep their existing deployment path, with one change: use `auth: gateway` for them (see "Container apps" below).
|
|
182
185
|
Dispatch supports plain-text environment variables and `secret_text` env vars; after the first deploy is delivered, `launchpad secrets push` sets the secret values, live immediately with no redeploy.
|
|
183
186
|
|
|
184
187
|
This is interactive by default. It will ask for:
|
|
@@ -230,7 +233,7 @@ commit to a slug:
|
|
|
230
233
|
| `static` | n/a | n/a | n/a | No bundler, no TS, no React. |
|
|
231
234
|
| `react` | n/a | client-side or remote-fetch only | n/a | SPA only — no server-side anything. |
|
|
232
235
|
| `react+api` | `hono` (exclusive) | Cloudflare D1 / Neon (HTTP) / KV / R2 | **Sibling cron Worker** (Pages has no `scheduled` handler — see "Two-tier apps" below) | Requires `compatibility_flags = ["nodejs_compat"]` in `wrangler.toml` (ADR-0011 carve-out). |
|
|
233
|
-
| `container` | any HTTP server | any (container-local or HTTP backend) | container-local | Single HTTP port.
|
|
236
|
+
| `container` | any HTTP server | any (container-local or HTTP backend) | container-local | Single HTTP port. Use `auth: gateway` (default for containers; see "Container apps" below). The rest of the guided flow in this skill covers `static`/`react`/`react+api`. |
|
|
234
237
|
|
|
235
238
|
**Will not run on the Workers runtime** (advisory — representative,
|
|
236
239
|
not exhaustive): `fastify` / `@fastify/*` / `express` / `koa` /
|
|
@@ -354,6 +357,39 @@ endpoint. Files outside the manifest's app boundary (`app.root` /
|
|
|
354
357
|
`app.include`) and never-shippable files (private keys, `.env`
|
|
355
358
|
material) are stripped with a warning before upload.
|
|
356
359
|
|
|
360
|
+
### Container apps — use `auth: gateway` (AIO-811)
|
|
361
|
+
|
|
362
|
+
Container apps (`type: container`) sign in through the same Entra auth gateway as Pages apps. `launchpad init` scaffolds new container apps with `auth: gateway` by default; keep it. Pass `--auth access` only for a legacy Access app.
|
|
363
|
+
|
|
364
|
+
Request path: user → Entra auth gateway → `launchpad-container-router` (one service binding per app) → the app's container Worker.
|
|
365
|
+
The container Worker has no public hostname and no Cloudflare Access application.
|
|
366
|
+
It verifies the gateway's `X-Launchpad-User-Assertion` and fails closed with 401 when the assertion is missing or invalid.
|
|
367
|
+
|
|
368
|
+
```yaml
|
|
369
|
+
apiVersion: launchpad.m-kopa.us/v1alpha1
|
|
370
|
+
kind: App
|
|
371
|
+
metadata:
|
|
372
|
+
name: my-container-app
|
|
373
|
+
team: my-team
|
|
374
|
+
owner: owner@m-kopa.com
|
|
375
|
+
deployment:
|
|
376
|
+
type: container
|
|
377
|
+
auth: gateway
|
|
378
|
+
catalogue:
|
|
379
|
+
listed: false
|
|
380
|
+
access:
|
|
381
|
+
allowed_entra_group: G_my_group # or omit and use a private audience
|
|
382
|
+
containers:
|
|
383
|
+
- name: my-container-app
|
|
384
|
+
image: ghcr.io/m-kopa/my-container-app:1.0.0
|
|
385
|
+
port: 8080
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
`auth: access` for containers is **legacy**. Every Access-gated app uses a Cloudflare Zero Trust seat and the account has a fixed seat cap (about 50 seats; AIO-811 was prompted by hitting it), so new Access apps can be refused once the cap is reached.
|
|
389
|
+
Only keep `auth: access` on an existing container app that has not been migrated.
|
|
390
|
+
Do not switch an existing container between modes on your own; offer `/launchpad-report` so the platform team can migrate it.
|
|
391
|
+
Reading the signed-in user inside the container is covered in `/launchpad-identity`.
|
|
392
|
+
|
|
357
393
|
**First deploy vs subsequent deploys** (M-1234). Under Model A there
|
|
358
394
|
is no separate "create the app" step — `launchpad deploy` against a
|
|
359
395
|
fresh slug auto-provisions:
|
|
@@ -363,7 +399,7 @@ fresh slug auto-provisions:
|
|
|
363
399
|
workflow (TF apply, cert issuance, edge auth, app-repo scaffold).
|
|
364
400
|
Pages manifests must explicitly set `auth: gateway` to use the platform Entra-OIDC gateway.
|
|
365
401
|
`launchpad init` writes this field. Pages apps cannot opt into Cloudflare Access; only
|
|
366
|
-
containers retain that login mode. The CLI prints `✓ First-time deploy — provisioning
|
|
402
|
+
containers retain that legacy login mode, and container apps should use `auth: gateway` too (AIO-811). The CLI prints `✓ First-time deploy — provisioning
|
|
367
403
|
workflow started` and waits for delivery. If its wait expires, check
|
|
368
404
|
`launchpad status <slug>` before reporting success. Provisioning typically takes
|
|
369
405
|
5–10 minutes. **Your bundle ships with the provisioning run** — when
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: launchpad-deploy-status
|
|
3
3
|
description: Show the current provisioning stage + failure reason for a Launchpad app via `launchpad status` (Model A drift + deployment_verified) and `launchpad apps` (lifecycle bucket), or watch provisioning live with `launchpad watch`. Renders the M-892 stage trace for in-flight provisioning, and is the canonical home for `launchpad recover` (repair a terminal-failed app record that is actually live). Use when someone says "what's the status of demo-X", "/launchpad-deploy-status", "is my deploy stuck", "watch my deploy go live", "watch provisioning", "my app says failed but it's serving", or after `/launchpad-deploy` reports a non-`done` terminal stage.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.67.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: launchpad-destroy
|
|
3
3
|
description: Tear down a Launchpad app end-to-end via `launchpad destroy` — Cloudflare Pages project, edge-auth wiring (gateway KV/audience entries, or the Access app for `auth: access` apps), custom hostname, platform-repo TF, and the app repo (archive-renamed). Owner-only verb with a two-step destructive confirmation. Use when someone says "destroy this app", "/launchpad-destroy", "tear down `<slug>`", "delete the app", or asks to clean up a smoke-test / orphan / retired app.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.67.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|