@m-kopa/launchpad-cli 0.74.1 → 0.75.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 +10 -0
- package/dist/bundle/cron-bundle.d.ts +4 -0
- package/dist/bundle/cron-bundle.d.ts.map +1 -1
- package/dist/bundle/upload.d.ts +4 -0
- package/dist/bundle/upload.d.ts.map +1 -1
- package/dist/cli.js +177 -49
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/deploy/scheduled-tier-lines.d.ts +3 -0
- package/dist/deploy/scheduled-tier-lines.d.ts.map +1 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/skills/launchpad-content-pr/SKILL.md +1 -1
- package/skills/launchpad-deploy/SKILL.md +36 -2
- package/skills/launchpad-deploy-status/SKILL.md +1 -1
- package/skills/launchpad-destroy/SKILL.md +1 -1
- package/skills/launchpad-identity/SKILL.md +1 -1
- package/skills/launchpad-ingest/SKILL.md +1 -1
- package/skills/launchpad-onboard/SKILL.md +1 -1
- package/skills/launchpad-report/SKILL.md +1 -1
- package/skills/launchpad-status/SKILL.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
6
6
|
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html);
|
|
7
7
|
pre-1.0 minor bumps may carry breaking changes per ADR 0005.
|
|
8
8
|
|
|
9
|
+
## 0.75.0 - 2026-10-07
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- A dispatch app can now run a scheduled cron Worker (AIO-763). Declare it in a v2 manifest as `spec.targets`: one `kind: worker` entry with a `script` that starts with `<slug>-` and a `schedule`. `launchpad deploy` bundles the Worker on your machine and the platform deploys it as a sibling Worker, because Cloudflare gives a dispatch script no cron trigger. `d1_binding` is refused there; use `spec.bindings.d1`.
|
|
14
|
+
- `launchpad deploy` prints the cron Worker result on both success paths: `deployed` with the schedule, `retired` when you remove the `targets` block, or `skipped` with a reason. A first deploy of a new app does not deploy the cron Worker. The CLI tells you to run `launchpad deploy` again, then `launchpad secrets push`.
|
|
15
|
+
- The platform refuses a dispatch deploy before it commits anything when the manifest and the shipped Worker disagree: `worker_bundle_missing`, `worker_target_mismatch`, `worker_target_not_declared` or `worker_target_reserved`. An old CLI that ships no bundle is told to run `launchpad update`.
|
|
16
|
+
- A plain `launchpad deploy` of a v2 manifest with no file change now runs the cron step, so a failed step is healed by deploying again. Removing `targets`, or renaming the cron script, disarms the old schedule and keeps the old script and its secrets target until destroy. Re-uploading a cron Worker keeps its secrets.
|
|
17
|
+
- Cloudflare can take one to two hours to apply a new or changed schedule. Deploy a new cron at least three hours before its first run.
|
|
18
|
+
|
|
9
19
|
## 0.74.1 - 2026-10-06
|
|
10
20
|
|
|
11
21
|
- The `launchpad-ingest` skill's handler is split into `integrationConfig`, `verifiedIntegration` and a short route, so the scaffolded code passes complexity gates such as fallow. Behaviour is unchanged.
|
|
@@ -49,6 +49,10 @@ export declare function parseWranglerTopLevel(tomlText: string): WranglerTopLeve
|
|
|
49
49
|
* existing fan-out target) and is NOT built. Keying the CLI build gate on the
|
|
50
50
|
* same `schedule` the bot keys its deploy gate on avoids a build-but-skip
|
|
51
51
|
* mismatch.
|
|
52
|
+
*
|
|
53
|
+
* Where the targets live depends on the manifest generation: a v1 manifest
|
|
54
|
+
* carries them at the top level; a v2 (dispatch) manifest carries them under
|
|
55
|
+
* `spec.targets` (AIO-763). A v2 manifest without `spec.targets` has none.
|
|
52
56
|
*/
|
|
53
57
|
export declare function scheduledWorkerScripts(manifestYaml: string): string[];
|
|
54
58
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cron-bundle.d.ts","sourceRoot":"","sources":["../../src/bundle/cron-bundle.ts"],"names":[],"mappings":"AA4BA;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,sEAAsE;IACtE,Q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IACnC,kFAAkF;IAClF,QAAQ,CAAC,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;CAChD;AAED,MAAM,MAAM,iBAAiB,GACzB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,cAAc,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvC,2EAA2E;AAC3E,UAAU,gBAAgB;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClD;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CA0CxE;AAuBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CA4BrE;AAkCD;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,CAiBjB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,SAAS,MAAM,EAAE,GAC3B,OAAO,CAAC,iBAAiB,CAAC,CAgD5B"}
|
package/dist/bundle/upload.d.ts
CHANGED
|
@@ -64,6 +64,8 @@ export interface DeployBundleAccepted {
|
|
|
64
64
|
readonly notices?: unknown;
|
|
65
65
|
/** Per-integration approval status (ADR 0060); untrusted until rendered. */
|
|
66
66
|
readonly integrations?: unknown;
|
|
67
|
+
/** Cron Worker outcome (AIO-763); untrusted until `scheduledTierLines` renders it. */
|
|
68
|
+
readonly scheduled_tier?: unknown;
|
|
67
69
|
}
|
|
68
70
|
/**
|
|
69
71
|
* Response shape when managed main already matches the upload
|
|
@@ -79,6 +81,8 @@ export interface DeployBundleNothingToDeploy {
|
|
|
79
81
|
readonly standing_exceptions?: StandingExceptionsSummary;
|
|
80
82
|
readonly staleness?: StalenessVerdict;
|
|
81
83
|
readonly statusPageUrl?: string | null;
|
|
84
|
+
/** Cron Worker outcome (AIO-763); untrusted until `scheduledTierLines` renders it. */
|
|
85
|
+
readonly scheduled_tier?: unknown;
|
|
82
86
|
}
|
|
83
87
|
/**
|
|
84
88
|
* Response shape when the slug was never registered before and the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/bundle/upload.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD,eAAO,MAAM,6BAA6B,kCACT,CAAC;AAClC,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAE3D,MAAM,MAAM,oBAAoB,GAC5B,UAAU,GACV,WAAW,GACX,SAAS,GACT,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,kEAAkE;AAClE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC;IACrC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC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CAAC;AAEnE;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,UAAU,EACvB,cAAc,CAAC,EAAE,cAAc;AAC/B;gEACgE;AAChE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;AACvB;0EAC0E;AAC1E,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;AAC7B,+EAA+E;AAC/E,cAAc,GAAE,OAAe,GAC9B,OAAO,CAAC,kBAAkB,CAAC,CA+H7B"}
|
package/dist/cli.js
CHANGED
|
@@ -19,7 +19,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
19
19
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
20
20
|
|
|
21
21
|
// src/version.ts
|
|
22
|
-
var CLI_VERSION = "0.
|
|
22
|
+
var CLI_VERSION = "0.75.0";
|
|
23
23
|
|
|
24
24
|
// src/config.ts
|
|
25
25
|
import { readFileSync } from "node:fs";
|
|
@@ -2497,7 +2497,8 @@ function scheduledWorkerScripts(manifestYaml) {
|
|
|
2497
2497
|
} catch {
|
|
2498
2498
|
return [];
|
|
2499
2499
|
}
|
|
2500
|
-
const
|
|
2500
|
+
const isV2 = doc?.apiVersion === "launchpad.m-kopa.us/v2";
|
|
2501
|
+
const targets = isV2 ? doc?.spec?.targets : doc?.targets;
|
|
2501
2502
|
if (!Array.isArray(targets))
|
|
2502
2503
|
return [];
|
|
2503
2504
|
const scripts = [];
|
|
@@ -3458,7 +3459,8 @@ var SpecSchema = z4.object({
|
|
|
3458
3459
|
migration: z4.object({ stage: z4.enum(MIGRATION_STAGES) }).strict().optional(),
|
|
3459
3460
|
bindings: z4.object({
|
|
3460
3461
|
d1: z4.string().min(1).max(64).regex(ENV_NAME_REGEX, "bindings.d1 must be an UPPER_SNAKE_CASE binding name").optional()
|
|
3461
|
-
}).strict().optional()
|
|
3462
|
+
}).strict().optional(),
|
|
3463
|
+
targets: z4.array(TargetSchema).min(1).max(1).optional()
|
|
3462
3464
|
}).strict().superRefine((s, ctx) => {
|
|
3463
3465
|
if (s.access.identity_types !== undefined && (s.auth ?? "access") !== "gateway") {
|
|
3464
3466
|
ctx.addIssue({
|
|
@@ -3566,6 +3568,53 @@ var SpecSchema = z4.object({
|
|
|
3566
3568
|
});
|
|
3567
3569
|
}
|
|
3568
3570
|
}
|
|
3571
|
+
if (s.targets !== undefined) {
|
|
3572
|
+
if (s.origin !== "dispatch") {
|
|
3573
|
+
ctx.addIssue({
|
|
3574
|
+
code: z4.ZodIssueCode.custom,
|
|
3575
|
+
path: ["targets"],
|
|
3576
|
+
message: "targets requires origin: dispatch. A pages-origin app declares its cron Worker in a v1 manifest."
|
|
3577
|
+
});
|
|
3578
|
+
}
|
|
3579
|
+
for (let i = 0;i < s.targets.length; i++) {
|
|
3580
|
+
const t = s.targets[i];
|
|
3581
|
+
if (t.kind !== "worker") {
|
|
3582
|
+
ctx.addIssue({
|
|
3583
|
+
code: z4.ZodIssueCode.custom,
|
|
3584
|
+
path: ["targets", i, "kind"],
|
|
3585
|
+
message: "a dispatch app has no Pages project, so the only valid target kind is 'worker' (the cron sibling Worker)"
|
|
3586
|
+
});
|
|
3587
|
+
continue;
|
|
3588
|
+
}
|
|
3589
|
+
if (t.script === undefined) {
|
|
3590
|
+
ctx.addIssue({
|
|
3591
|
+
code: z4.ZodIssueCode.custom,
|
|
3592
|
+
path: ["targets", i, "script"],
|
|
3593
|
+
message: "a worker target must declare a script (the sibling Workers script name)"
|
|
3594
|
+
});
|
|
3595
|
+
} else if (t.script === PRIMARY_TARGET || t.script === "pages") {
|
|
3596
|
+
ctx.addIssue({
|
|
3597
|
+
code: z4.ZodIssueCode.custom,
|
|
3598
|
+
path: ["targets", i, "script"],
|
|
3599
|
+
message: `worker target script '${t.script}' is a reserved selector token — use a different script name`
|
|
3600
|
+
});
|
|
3601
|
+
}
|
|
3602
|
+
if (t.schedule === undefined) {
|
|
3603
|
+
ctx.addIssue({
|
|
3604
|
+
code: z4.ZodIssueCode.custom,
|
|
3605
|
+
path: ["targets", i, "schedule"],
|
|
3606
|
+
message: "a dispatch worker target must declare a non-empty schedule; the cron sibling is the only thing spec.targets carries on dispatch"
|
|
3607
|
+
});
|
|
3608
|
+
}
|
|
3609
|
+
if (t.d1_binding !== undefined) {
|
|
3610
|
+
ctx.addIssue({
|
|
3611
|
+
code: z4.ZodIssueCode.custom,
|
|
3612
|
+
path: ["targets", i, "d1_binding"],
|
|
3613
|
+
message: "d1_binding is not supported on a dispatch worker target. Declare the app's database with bindings.d1."
|
|
3614
|
+
});
|
|
3615
|
+
}
|
|
3616
|
+
}
|
|
3617
|
+
}
|
|
3569
3618
|
if (!isContainer && s.containers !== undefined) {
|
|
3570
3619
|
ctx.addIssue({
|
|
3571
3620
|
code: z4.ZodIssueCode.custom,
|
|
@@ -3651,7 +3700,18 @@ var ManifestV2Schema = z4.object({
|
|
|
3651
3700
|
}).strict(),
|
|
3652
3701
|
spec: SpecSchema,
|
|
3653
3702
|
status: StatusSchema.optional()
|
|
3654
|
-
}).strict()
|
|
3703
|
+
}).strict().superRefine((m, ctx) => {
|
|
3704
|
+
const prefix = `${m.metadata.slug}-`;
|
|
3705
|
+
(m.spec.targets ?? []).forEach((t, i) => {
|
|
3706
|
+
if (t.kind === "worker" && t.script !== undefined && !t.script.startsWith(prefix)) {
|
|
3707
|
+
ctx.addIssue({
|
|
3708
|
+
code: z4.ZodIssueCode.custom,
|
|
3709
|
+
path: ["spec", "targets", i, "script"],
|
|
3710
|
+
message: `worker target script '${t.script}' must start with '${prefix}' (the app slug plus a dash)`
|
|
3711
|
+
});
|
|
3712
|
+
}
|
|
3713
|
+
});
|
|
3714
|
+
});
|
|
3655
3715
|
function parseManifestV2(input) {
|
|
3656
3716
|
const result = ManifestV2Schema.safeParse(input);
|
|
3657
3717
|
if (result.success) {
|
|
@@ -5077,7 +5137,8 @@ function assertConvertibleV1(manifest) {
|
|
|
5077
5137
|
manifest.deployment.runtime !== undefined && "deployment.runtime"
|
|
5078
5138
|
].filter(Boolean);
|
|
5079
5139
|
if (unsupported2.length > 0) {
|
|
5080
|
-
|
|
5140
|
+
const targets = manifest.targets?.some((target) => target.kind === "worker") === true ? " A v1 worker target is not carried over: a dispatch app declares its cron Worker as spec.targets in a v2 manifest with origin: dispatch." : "";
|
|
5141
|
+
throw new Error(`Cannot preserve ${unsupported2.join(", ")} on dispatch.${targets} Review these settings with the platform team before migrating.`);
|
|
5081
5142
|
}
|
|
5082
5143
|
}
|
|
5083
5144
|
function d1Binding(declared, wranglerD1) {
|
|
@@ -5130,7 +5191,7 @@ function secretRefusal(binding, env) {
|
|
|
5130
5191
|
const targets = binding.targets === undefined || binding.targets === "all" ? [] : binding.targets;
|
|
5131
5192
|
const checks = [
|
|
5132
5193
|
[binding.source !== "env-file", "is platform-managed and cannot be converted automatically. Ask the platform team to migrate it."],
|
|
5133
|
-
[targets.some((target) => target !== "primary"), "
|
|
5194
|
+
[targets.some((target) => target !== "primary"), "selects a surface other than primary, and that selector is not carried over. On dispatch a secret reaches every surface, including a cron Worker declared as spec.targets with origin: dispatch."],
|
|
5134
5195
|
[PLATFORM_ENV_NAMES.has(binding.name), "is set by the platform on dispatch apps. Rename it before converting."],
|
|
5135
5196
|
[env?.[binding.name] !== undefined, "is also declared as an environment variable. Keep one."]
|
|
5136
5197
|
];
|
|
@@ -9034,6 +9095,62 @@ async function handleAccessDrift(params) {
|
|
|
9034
9095
|
return exit === 0 ? 1 : exit;
|
|
9035
9096
|
}
|
|
9036
9097
|
|
|
9098
|
+
// src/deploy/scheduled-tier-lines.ts
|
|
9099
|
+
var CONTROL_CHARS = /[\u0000-\u001f\u007f-\u009f]/g;
|
|
9100
|
+
function text(v) {
|
|
9101
|
+
if (typeof v !== "string")
|
|
9102
|
+
return null;
|
|
9103
|
+
const cleaned = v.replace(CONTROL_CHARS, " ").trim();
|
|
9104
|
+
return cleaned === "" ? null : cleaned;
|
|
9105
|
+
}
|
|
9106
|
+
function textList(v) {
|
|
9107
|
+
if (!Array.isArray(v) || v.length === 0)
|
|
9108
|
+
return null;
|
|
9109
|
+
const out = [];
|
|
9110
|
+
for (const item of v) {
|
|
9111
|
+
const t = text(item);
|
|
9112
|
+
if (t === null)
|
|
9113
|
+
return null;
|
|
9114
|
+
out.push(t);
|
|
9115
|
+
}
|
|
9116
|
+
return out;
|
|
9117
|
+
}
|
|
9118
|
+
function scheduledTierLines(value) {
|
|
9119
|
+
if (value === null || typeof value !== "object")
|
|
9120
|
+
return [];
|
|
9121
|
+
const v = value;
|
|
9122
|
+
switch (v.status) {
|
|
9123
|
+
case "deployed": {
|
|
9124
|
+
const script = text(v.script);
|
|
9125
|
+
const schedules = textList(v.schedules);
|
|
9126
|
+
if (script === null || schedules === null)
|
|
9127
|
+
return [];
|
|
9128
|
+
const retired = textList(v.retired);
|
|
9129
|
+
return [
|
|
9130
|
+
` cron Worker '${script}' deployed — schedule: ${schedules.join(", ")} (UTC)`,
|
|
9131
|
+
...retired === null ? [] : [` cron schedule retired for '${retired.join("', '")}' — the trigger is disarmed`],
|
|
9132
|
+
" Secrets reach the cron Worker only after `launchpad secrets push`."
|
|
9133
|
+
];
|
|
9134
|
+
}
|
|
9135
|
+
case "retired": {
|
|
9136
|
+
const scripts = textList(v.scripts);
|
|
9137
|
+
if (scripts === null)
|
|
9138
|
+
return [];
|
|
9139
|
+
return [
|
|
9140
|
+
` cron schedule retired for '${scripts.join("', '")}' — the trigger is disarmed`
|
|
9141
|
+
];
|
|
9142
|
+
}
|
|
9143
|
+
case "skipped": {
|
|
9144
|
+
const reason = text(v.reason);
|
|
9145
|
+
if (reason === null)
|
|
9146
|
+
return [];
|
|
9147
|
+
return [` cron Worker skipped: ${reason}`];
|
|
9148
|
+
}
|
|
9149
|
+
default:
|
|
9150
|
+
return [];
|
|
9151
|
+
}
|
|
9152
|
+
}
|
|
9153
|
+
|
|
9037
9154
|
// src/deploy/dry-run.ts
|
|
9038
9155
|
import { execFileSync } from "node:child_process";
|
|
9039
9156
|
import { resolve as resolve8 } from "node:path";
|
|
@@ -9192,11 +9309,11 @@ import { stdin as input, stdout as output } from "node:process";
|
|
|
9192
9309
|
// src/secrets/env-parse.ts
|
|
9193
9310
|
var ENV_NAME2 = /^[A-Z][A-Z0-9_]*$/;
|
|
9194
9311
|
var LINE = /^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/;
|
|
9195
|
-
function parseEnv(
|
|
9312
|
+
function parseEnv(text2) {
|
|
9196
9313
|
const entries = new Map;
|
|
9197
9314
|
const invalidNames = [];
|
|
9198
9315
|
const malformedLines = [];
|
|
9199
|
-
const lines =
|
|
9316
|
+
const lines = text2.split(`
|
|
9200
9317
|
`);
|
|
9201
9318
|
for (let i = 0;i < lines.length; i++) {
|
|
9202
9319
|
const raw = lines[i] ?? "";
|
|
@@ -10349,9 +10466,9 @@ var PLATFORM_FLAGS = new Set(["nodejs_compat"]);
|
|
|
10349
10466
|
|
|
10350
10467
|
class UnsupportedWranglerConfigError extends Error {
|
|
10351
10468
|
}
|
|
10352
|
-
function wranglerRuntime(file,
|
|
10469
|
+
function wranglerRuntime(file, text2) {
|
|
10353
10470
|
const toml = file.endsWith(".toml");
|
|
10354
|
-
const config = toml ? readToml(file,
|
|
10471
|
+
const config = toml ? readToml(file, text2) : readJsonc(file, text2);
|
|
10355
10472
|
for (const key of Object.keys(config)) {
|
|
10356
10473
|
if (!ALLOWED_KEYS.has(key) && (toml || key !== "$schema"))
|
|
10357
10474
|
throw unsupportedKey(file, key);
|
|
@@ -10398,14 +10515,14 @@ function asArray(file, key, value) {
|
|
|
10398
10515
|
throw new UnsupportedWranglerConfigError(`${file} sets \`${key}\` to something other than a list`);
|
|
10399
10516
|
return value;
|
|
10400
10517
|
}
|
|
10401
|
-
function readJsonc(file,
|
|
10402
|
-
const stripped = stripOutsideStrings(
|
|
10403
|
-
if (
|
|
10404
|
-
return lineEnd(
|
|
10405
|
-
if (!
|
|
10518
|
+
function readJsonc(file, text2) {
|
|
10519
|
+
const stripped = stripOutsideStrings(text2, '"', (at) => {
|
|
10520
|
+
if (text2.startsWith("//", at))
|
|
10521
|
+
return lineEnd(text2, at) - at;
|
|
10522
|
+
if (!text2.startsWith("/*", at))
|
|
10406
10523
|
return 0;
|
|
10407
|
-
const end =
|
|
10408
|
-
return (end === -1 ?
|
|
10524
|
+
const end = text2.indexOf("*/", at + 2);
|
|
10525
|
+
return (end === -1 ? text2.length : end + 2) - at;
|
|
10409
10526
|
}).replace(/,(\s*[}\]])/g, "$1");
|
|
10410
10527
|
let parsed;
|
|
10411
10528
|
try {
|
|
@@ -10418,11 +10535,11 @@ function readJsonc(file, text) {
|
|
|
10418
10535
|
}
|
|
10419
10536
|
return parsed;
|
|
10420
10537
|
}
|
|
10421
|
-
function readToml(file,
|
|
10538
|
+
function readToml(file, text2) {
|
|
10422
10539
|
const config = {};
|
|
10423
10540
|
const databases = [];
|
|
10424
10541
|
let table = config;
|
|
10425
|
-
for (const line of logicalTomlLines(
|
|
10542
|
+
for (const line of logicalTomlLines(text2)) {
|
|
10426
10543
|
if (line.startsWith("[")) {
|
|
10427
10544
|
table = openTable(file, line, config, databases);
|
|
10428
10545
|
} else if (table === config.vars) {
|
|
@@ -10466,8 +10583,8 @@ function assign(file, table, line, topLevel) {
|
|
|
10466
10583
|
function assignVar(file, vars, line) {
|
|
10467
10584
|
const [, key, value] = tomlAssignment(file, line);
|
|
10468
10585
|
const quoted = /^"((?:[^"\\]|\\.)*)"$|^'([^']*)'$/.exec(value.trim());
|
|
10469
|
-
const
|
|
10470
|
-
vars[key.replace(/"/g, "").trim()] =
|
|
10586
|
+
const text2 = quoted === null ? null : quoted[1] === undefined ? quoted[2] : basicString(file, key, quoted[1]);
|
|
10587
|
+
vars[key.replace(/"/g, "").trim()] = text2;
|
|
10471
10588
|
}
|
|
10472
10589
|
var TOML_ESCAPES = { b: "\b", t: "\t", n: `
|
|
10473
10590
|
`, f: "\f", r: "\r", '"': '"', "\\": "\\" };
|
|
@@ -10504,8 +10621,8 @@ function tomlValue(raw) {
|
|
|
10504
10621
|
}
|
|
10505
10622
|
return [...inner.matchAll(/"((?:[^"\\]|\\.)*)"|'([^']*)'/g)].map((item) => item[1] ?? item[2]);
|
|
10506
10623
|
}
|
|
10507
|
-
function logicalTomlLines(
|
|
10508
|
-
const stripped = stripOutsideStrings(
|
|
10624
|
+
function logicalTomlLines(text2) {
|
|
10625
|
+
const stripped = stripOutsideStrings(text2, `"'`, (at) => text2[at] === "#" ? lineEnd(text2, at) - at : 0);
|
|
10509
10626
|
const lines = [];
|
|
10510
10627
|
let pending = "";
|
|
10511
10628
|
for (const raw of stripped.split(/\r?\n/)) {
|
|
@@ -10519,10 +10636,10 @@ function logicalTomlLines(text) {
|
|
|
10519
10636
|
lines.push(pending);
|
|
10520
10637
|
return lines;
|
|
10521
10638
|
}
|
|
10522
|
-
function lineEnd(
|
|
10523
|
-
const end =
|
|
10639
|
+
function lineEnd(text2, at) {
|
|
10640
|
+
const end = text2.indexOf(`
|
|
10524
10641
|
`, at);
|
|
10525
|
-
return end === -1 ?
|
|
10642
|
+
return end === -1 ? text2.length : end;
|
|
10526
10643
|
}
|
|
10527
10644
|
function openBrackets(line) {
|
|
10528
10645
|
if (/^\[\[?[^\]=]*\]\]?$/.test(line))
|
|
@@ -10537,31 +10654,31 @@ function openBrackets(line) {
|
|
|
10537
10654
|
});
|
|
10538
10655
|
return open;
|
|
10539
10656
|
}
|
|
10540
|
-
function stripOutsideStrings(
|
|
10657
|
+
function stripOutsideStrings(text2, quotes, skip) {
|
|
10541
10658
|
let out = "";
|
|
10542
|
-
for (let i = 0;i <
|
|
10543
|
-
if (quotes.includes(
|
|
10544
|
-
const end = stringEnd(
|
|
10545
|
-
out +=
|
|
10659
|
+
for (let i = 0;i < text2.length; ) {
|
|
10660
|
+
if (quotes.includes(text2[i])) {
|
|
10661
|
+
const end = stringEnd(text2, i);
|
|
10662
|
+
out += text2.slice(i, end);
|
|
10546
10663
|
i = end;
|
|
10547
10664
|
continue;
|
|
10548
10665
|
}
|
|
10549
10666
|
const skipped = skip(i);
|
|
10550
10667
|
if (skipped === 0)
|
|
10551
|
-
out +=
|
|
10668
|
+
out += text2[i];
|
|
10552
10669
|
i += Math.max(skipped, 1);
|
|
10553
10670
|
}
|
|
10554
10671
|
return out;
|
|
10555
10672
|
}
|
|
10556
|
-
function stringEnd(
|
|
10557
|
-
const quote =
|
|
10558
|
-
for (let i = start + 1;i <
|
|
10559
|
-
if (
|
|
10673
|
+
function stringEnd(text2, start) {
|
|
10674
|
+
const quote = text2[start];
|
|
10675
|
+
for (let i = start + 1;i < text2.length; i++) {
|
|
10676
|
+
if (text2[i] === "\\" && quote === '"')
|
|
10560
10677
|
i++;
|
|
10561
|
-
else if (
|
|
10678
|
+
else if (text2[i] === quote)
|
|
10562
10679
|
return i + 1;
|
|
10563
10680
|
}
|
|
10564
|
-
return
|
|
10681
|
+
return text2.length;
|
|
10565
10682
|
}
|
|
10566
10683
|
|
|
10567
10684
|
// src/commands/migrate-live.ts
|
|
@@ -11381,6 +11498,7 @@ async function runModelADeploy(args) {
|
|
|
11381
11498
|
let slug;
|
|
11382
11499
|
let appType = "static";
|
|
11383
11500
|
let declaredOrigin;
|
|
11501
|
+
let manifestIsV2 = false;
|
|
11384
11502
|
try {
|
|
11385
11503
|
await defaultToDispatch(cwd, manifestPath, io);
|
|
11386
11504
|
} catch (e) {
|
|
@@ -11409,6 +11527,7 @@ async function runModelADeploy(args) {
|
|
|
11409
11527
|
slug = metaSlug;
|
|
11410
11528
|
const raw = manifestObj;
|
|
11411
11529
|
const isV22 = raw?.apiVersion === "launchpad.m-kopa.us/v2";
|
|
11530
|
+
manifestIsV2 = isV22;
|
|
11412
11531
|
declaredOrigin = declaredOriginOf(isV22, raw?.spec?.origin);
|
|
11413
11532
|
const deploymentType = isV22 ? raw?.spec?.appType : raw?.deployment?.type;
|
|
11414
11533
|
if (deploymentType === "static" || deploymentType === "react" || deploymentType === "react+api" || deploymentType === "container") {
|
|
@@ -11683,6 +11802,8 @@ ${w}`, ""), message);
|
|
|
11683
11802
|
io.out(` (managed main @ ${success.head_sha.slice(0, 8)} matches the bundle)`);
|
|
11684
11803
|
}
|
|
11685
11804
|
surfaceDeployExtras(success, io, slug, args.allowStale);
|
|
11805
|
+
for (const line of scheduledTierLines(success.scheduled_tier))
|
|
11806
|
+
io.out(line);
|
|
11686
11807
|
await advanceBaseShaMarker(cwd, success.head_sha, io);
|
|
11687
11808
|
return 0;
|
|
11688
11809
|
}
|
|
@@ -11707,7 +11828,12 @@ ${w}`, ""), message);
|
|
|
11707
11828
|
io.out(message);
|
|
11708
11829
|
io.out("");
|
|
11709
11830
|
io.out(`Your bundle ships with this provisioning run — when lifecycle reaches "live",`);
|
|
11710
|
-
|
|
11831
|
+
if (result.workerScript !== null) {
|
|
11832
|
+
io.out("this deploy's content is what's serving. The cron Worker is not deployed on a first deploy:");
|
|
11833
|
+
io.out(manifestIsV2 ? `run \`launchpad deploy\` again once the app is live, then \`launchpad secrets push\`.` : `it ships with your next \`launchpad deploy\` that changes content once the app is live; then run \`launchpad secrets push\`.`);
|
|
11834
|
+
} else {
|
|
11835
|
+
io.out("this deploy's content is what's serving. No second deploy needed.");
|
|
11836
|
+
}
|
|
11711
11837
|
renderIntegrationStatus(success.integrations, io);
|
|
11712
11838
|
if (appType === "container") {
|
|
11713
11839
|
const pushed = await pushSecretsWhenCommitted({ slug, manifestPath, timeoutMs: provisionTimeoutMs }, io, realFirstDeploySecretsDeps(cfg));
|
|
@@ -11755,6 +11881,8 @@ ${w}`, ""), message);
|
|
|
11755
11881
|
io.out(` ${botMessage(success.message)}`);
|
|
11756
11882
|
}
|
|
11757
11883
|
surfaceDeployExtras(success, io, slug, args.allowStale);
|
|
11884
|
+
for (const line of scheduledTierLines(success.scheduled_tier))
|
|
11885
|
+
io.out(line);
|
|
11758
11886
|
renderIntegrationStatus(success.integrations, io);
|
|
11759
11887
|
io.out("");
|
|
11760
11888
|
const dispatchOrigin = handoffIsDispatch({
|
|
@@ -13089,16 +13217,16 @@ function installCommandFor(pm) {
|
|
|
13089
13217
|
}
|
|
13090
13218
|
var OUT_DIR_REGEX = /\bbuild\s*:\s*\{[^{}]*?\boutDir\s*:\s*['"]([^'"]+)['"]/s;
|
|
13091
13219
|
function detectDestinationDir(cwd, vite) {
|
|
13092
|
-
let
|
|
13220
|
+
let text2;
|
|
13093
13221
|
try {
|
|
13094
|
-
|
|
13222
|
+
text2 = readFileSync16(vite.path, "utf8");
|
|
13095
13223
|
} catch (e) {
|
|
13096
13224
|
return {
|
|
13097
13225
|
kind: "ambiguous",
|
|
13098
13226
|
reason: `vite.config failed to read: ${e.message}`
|
|
13099
13227
|
};
|
|
13100
13228
|
}
|
|
13101
|
-
const m = OUT_DIR_REGEX.exec(
|
|
13229
|
+
const m = OUT_DIR_REGEX.exec(text2);
|
|
13102
13230
|
if (m && m[1] !== undefined && m[1].length > 0) {
|
|
13103
13231
|
return { kind: "ok", value: m[1] };
|
|
13104
13232
|
}
|
|
@@ -16535,10 +16663,10 @@ function readInstalledSkills() {
|
|
|
16535
16663
|
}
|
|
16536
16664
|
function readSkillVersion(path15) {
|
|
16537
16665
|
try {
|
|
16538
|
-
const
|
|
16539
|
-
const fenceEnd =
|
|
16666
|
+
const text2 = readFileSync20(path15, "utf8");
|
|
16667
|
+
const fenceEnd = text2.indexOf(`
|
|
16540
16668
|
---`, 4);
|
|
16541
|
-
const front = fenceEnd === -1 ?
|
|
16669
|
+
const front = fenceEnd === -1 ? text2.slice(0, 1024) : text2.slice(0, fenceEnd);
|
|
16542
16670
|
const m = /^version:\s*(.+?)\s*$/m.exec(front);
|
|
16543
16671
|
return m === null ? null : m[1] ?? null;
|
|
16544
16672
|
} catch {
|
|
@@ -16700,15 +16828,15 @@ async function doList(io) {
|
|
|
16700
16828
|
return 0;
|
|
16701
16829
|
}
|
|
16702
16830
|
async function readVersion(path15) {
|
|
16703
|
-
let
|
|
16831
|
+
let text2;
|
|
16704
16832
|
try {
|
|
16705
|
-
|
|
16833
|
+
text2 = await fs7.readFile(path15, "utf8");
|
|
16706
16834
|
} catch {
|
|
16707
16835
|
return null;
|
|
16708
16836
|
}
|
|
16709
|
-
const fenceEnd =
|
|
16837
|
+
const fenceEnd = text2.indexOf(`
|
|
16710
16838
|
---`, 4);
|
|
16711
|
-
const front = fenceEnd === -1 ?
|
|
16839
|
+
const front = fenceEnd === -1 ? text2.slice(0, 1024) : text2.slice(0, fenceEnd);
|
|
16712
16840
|
const m = /^version:\s*(.+?)\s*$/m.exec(front);
|
|
16713
16841
|
return m === null ? null : m[1] ?? null;
|
|
16714
16842
|
}
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AA0EA,OAAO,EAGL,4BAA4B,EAC7B,MAAM,uBAAuB,CAAC;AAkB/B,OAAO,EAAa,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAY,MAAM,kBAAkB,CAAC;AAWjE,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,wBAAgB,WAAW,IAAI,MAAM,CAoBpC;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,UAAU,GAAG,IAAI,CA4BpE;AAiMD,2BAA2B;AAC3B,OAAO,EAAE,4BAA4B,EAAE,CAAC;AA0zBxC;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBnG;AA+BD,8FAA8F;AAC9F,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO;CAQxC;AAwCD,2EAA2E;AAC3E;+EAC+E;AAC/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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled-tier-lines.d.ts","sourceRoot":"","sources":["../../src/deploy/scheduled-tier-lines.ts"],"names":[],"mappings":"AAiCA,mFAAmF;AACnF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAgC3D"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "0.
|
|
1
|
+
export declare const CLI_VERSION = "0.75.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
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.
|
|
4
|
+
version: 0.75.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-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.75.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -560,6 +560,38 @@ push` says so and offers to activate: on a TTY it prompts `Redeploy … now? [y/
|
|
|
560
560
|
`launchpad redeploy <slug>` to run when ready. The cron Worker tier needs no
|
|
561
561
|
redeploy (it binds on next invocation). See `/commands/redeploy`.
|
|
562
562
|
|
|
563
|
+
**Dispatch apps (`origin: dispatch`, v2 manifest).** A dispatch app has no Pages
|
|
564
|
+
project and no top-level `targets`. Cloudflare gives a dispatch script no cron
|
|
565
|
+
trigger, so the cron Worker is still a sibling Worker. Declare it as
|
|
566
|
+
`spec.targets`, with exactly one entry:
|
|
567
|
+
|
|
568
|
+
```yaml
|
|
569
|
+
spec:
|
|
570
|
+
origin: dispatch
|
|
571
|
+
targets:
|
|
572
|
+
- kind: worker
|
|
573
|
+
script: <slug>-send-cron # MUST start with "<slug>-" and equal `name` in cron/wrangler.toml
|
|
574
|
+
schedule:
|
|
575
|
+
- "0 6 * * *" # UTC
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
Rules: `kind: worker` only; `schedule` required; `d1_binding` refused (use
|
|
579
|
+
`spec.bindings.d1`); the script cannot equal the slug or be a platform-owned
|
|
580
|
+
name; list the cron directory in `app.include`.
|
|
581
|
+
|
|
582
|
+
The deploy sequence differs from a Pages app. A first deploy does **not** ship
|
|
583
|
+
the cron Worker. Tell the user: (1) `launchpad deploy`, wait for `live`; (2)
|
|
584
|
+
`launchpad deploy` again, which ships the cron Worker even with no file change;
|
|
585
|
+
(3) `launchpad secrets push`. The sibling goes live inside the deploy request,
|
|
586
|
+
before the app script is delivered, so schema and API changes must be backward
|
|
587
|
+
compatible across that window. Removing the `targets` block disarms the
|
|
588
|
+
schedule and keeps the script until destroy. If a deploy is refused with
|
|
589
|
+
`worker_bundle_missing`, `worker_target_mismatch`, `worker_target_not_declared`
|
|
590
|
+
or `worker_target_reserved`, fix the cause the message names (for
|
|
591
|
+
`worker_bundle_missing`: `launchpad update`, then deploy again). The cron code's
|
|
592
|
+
`scheduled()` must throw after it logs when a job fails, and must log no
|
|
593
|
+
personal data.
|
|
594
|
+
|
|
563
595
|
## Pages-tier D1 (`d1_binding` on a `pages` target)
|
|
564
596
|
|
|
565
597
|
A pure `react+api` app (no cron Worker) that needs a database declares the
|
|
@@ -574,7 +606,7 @@ targets:
|
|
|
574
606
|
On `launchpad deploy` the bot auto-provisions the shared D1 named after the slug (**create-or-adopt by slug during deploy** - a successful destroy exports and deletes the recorded UUID before repository archive, so platform recovery creates a fresh destination database) and binds it to the Pages app, so `env.DB` works with no manual `wrangler d1 create`.
|
|
575
607
|
The bot also pins the matching `[[d1_databases]]` block into the **committed** `wrangler.toml` - Pages git-source builds read bindings from that file, and a build without the block silently resets the binding to empty.
|
|
576
608
|
|
|
577
|
-
**Dispatch form.** A v2 `react+api` app on `origin: dispatch` has no `targets
|
|
609
|
+
**Dispatch form.** A v2 `react+api` app on `origin: dispatch` has no `pages` target and no `d1_binding` on its cron target (`spec.targets` carries only the cron Worker); it declares the same database as `spec.bindings.d1`:
|
|
578
610
|
|
|
579
611
|
```yaml
|
|
580
612
|
spec:
|
|
@@ -677,6 +709,8 @@ the in-flight case.
|
|
|
677
709
|
- Do **not** add a cron trigger to a Pages `react+api` app directly —
|
|
678
710
|
Pages has no `scheduled` handler. Scheduled work needs a sibling cron
|
|
679
711
|
**Worker** declared in `targets[]` (see "Two-tier apps").
|
|
712
|
+
On a dispatch app the same Worker is declared as `spec.targets`, and its
|
|
713
|
+
script must start with `<slug>-`.
|
|
680
714
|
- Do **not** set verifier env (`CF_ACCESS_TEAM_DOMAIN`, `CF_ACCESS_AUD`,
|
|
681
715
|
`JWKS_URL`) as `plain_text` — it is wiped on the next deploy. The per-app
|
|
682
716
|
TF emits them as `secret_text`; trust it.
|
|
@@ -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.75.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.75.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-identity
|
|
3
3
|
description: Teach an app author how to use the signed-in user's identity inside a Launchpad app - read the gateway-forwarded X-Launchpad-User-Assertion in the app's server code (functions/ on a react+api app, compiled into its Worker on dispatch, or a Pages Function on a legacy Pages app), VERIFY it with @m-kopa/platform-auth (fail-closed), and show who's logged in (sub/email/name). Use when someone says "who is logged in", "show the current user", "get the user's email in my app", "auth in my launchpad app", "read the user identity", "/launchpad-identity", or is wiring up an /api/me for a gateway-fronted app.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.75.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-ingest
|
|
3
3
|
description: Scaffold a verified ingest endpoint so an approved backend (an approved integration, ADR 0060) can write into a Launchpad react+api app - declare the integration in launchpad.yaml, add a Hono route registered ahead of the user-auth middleware that verifies the gateway's X-Launchpad-Integration-Assertion with @m-kopa/platform-auth, validates the body with zod, and does an idempotent D1 insert keyed on a caller-supplied idempotency key. Use when someone says "let another system push data into my app", "add an ingest endpoint", "receive data from the Sales backend", "approved integration", "machine-to-machine write", "/launchpad-ingest", or asks what a calling team must send.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.75.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-onboard
|
|
3
3
|
description: One-time setup for the Launchpad CLI + Claude Code skill bundle. Verifies the `launchpad` CLI is installed and current, runs `launchpad whoami` to confirm the session is fresh, and checks the bundled skills are installed and in lock-step with the CLI. Idempotent — safe to re-run any time. Use when someone says "set me up for Launchpad", "I just got a new machine and want to use Launchpad", "/launchpad-onboard", or any of the other launchpad-* skills fails on a prereq check.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.75.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-report
|
|
3
3
|
description: File a bug report or feature request to the Launchpad team's tracker from the CLI. Use when someone reports something broken, hits an error in a launchpad command, or wishes a feature existed — e.g. "this is broken", "report a bug", "can you file that", "I wish launchpad could…", "/launchpad-bug", "/launchpad-feature". Always confirm and show exactly what you'll send before filing; never file silently.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.75.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-status
|
|
3
3
|
description: Safely refresh a Launchpad clone, show manifest drift, or read the deployed manifest. Wraps bare `launchpad pull` for source sync, `launchpad pull --manifest` for deployed YAML, and `launchpad status` for drift. Use for "sync my clone", "what's deployed", "show drift", "/launchpad-status", "/launchpad-pull", or post-deploy verification.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.75.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|