run402 1.70.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/cli.mjs +4 -4
- package/lib/{blob.mjs → assets.mjs} +51 -51
- package/lib/deploy-v2.mjs +13 -13
- package/lib/sites.mjs +3 -3
- package/package.json +1 -1
- package/sdk/dist/index.d.ts +11 -4
- package/sdk/dist/index.d.ts.map +1 -1
- package/sdk/dist/index.js +12 -5
- package/sdk/dist/index.js.map +1 -1
- package/sdk/dist/namespaces/{blobs.d.ts → assets.d.ts} +3 -3
- package/sdk/dist/namespaces/assets.d.ts.map +1 -0
- package/sdk/dist/namespaces/{blobs.js → assets.js} +2 -2
- package/sdk/dist/namespaces/assets.js.map +1 -0
- package/sdk/dist/namespaces/{blobs.types.d.ts → assets.types.d.ts} +1 -1
- package/sdk/dist/namespaces/assets.types.d.ts.map +1 -0
- package/sdk/dist/namespaces/{blobs.types.js → assets.types.js} +1 -1
- package/sdk/dist/namespaces/assets.types.js.map +1 -0
- package/sdk/dist/namespaces/deploy.d.ts +3 -3
- package/sdk/dist/namespaces/deploy.d.ts.map +1 -1
- package/sdk/dist/namespaces/deploy.js +28 -42
- package/sdk/dist/namespaces/deploy.js.map +1 -1
- package/sdk/dist/namespaces/deploy.types.d.ts +130 -4
- package/sdk/dist/namespaces/deploy.types.d.ts.map +1 -1
- package/sdk/dist/namespaces/deploy.types.js +1 -1
- package/sdk/dist/namespaces/deploy.types.js.map +1 -1
- package/sdk/dist/node/assets-node.d.ts +205 -0
- package/sdk/dist/node/assets-node.d.ts.map +1 -0
- package/sdk/dist/node/assets-node.js +368 -0
- package/sdk/dist/node/assets-node.js.map +1 -0
- package/sdk/dist/node/canonicalize.d.ts +1 -1
- package/sdk/dist/node/canonicalize.js +1 -1
- package/sdk/dist/node/index.d.ts +9 -2
- package/sdk/dist/node/index.d.ts.map +1 -1
- package/sdk/dist/node/index.js +9 -0
- package/sdk/dist/node/index.js.map +1 -1
- package/sdk/dist/scoped.d.ts +38 -12
- package/sdk/dist/scoped.d.ts.map +1 -1
- package/sdk/dist/scoped.js +52 -35
- package/sdk/dist/scoped.js.map +1 -1
- package/sdk/dist/namespaces/blobs.d.ts.map +0 -1
- package/sdk/dist/namespaces/blobs.js.map +0 -1
- package/sdk/dist/namespaces/blobs.types.d.ts.map +0 -1
- package/sdk/dist/namespaces/blobs.types.js.map +0 -1
package/README.md
CHANGED
|
@@ -100,10 +100,10 @@ CI deploys can ship `site`, `functions`, `database`, and absent/current `base` c
|
|
|
100
100
|
### Storage (paste-and-go CDN assets)
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
|
-
run402
|
|
104
|
-
run402
|
|
105
|
-
run402
|
|
106
|
-
run402
|
|
103
|
+
run402 assets put ./logo.png # → AssetRef with cdn_url, sri, etag
|
|
104
|
+
run402 assets put ./asset --key assets/logo --content-type image/svg+xml
|
|
105
|
+
run402 assets get <key> --output /tmp/logo.png
|
|
106
|
+
run402 assets diagnose <url> # exit 0 if fresh, 1 if stale
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
The returned `cdn_url` is content-addressed (`pr-<public_id>.run402.com/_blob/<key>-<8hex>.<ext>`) — paste it straight into HTML. SRI is bundled in `sri`.
|
|
@@ -199,7 +199,7 @@ Every command supports `--help` / `-h`:
|
|
|
199
199
|
run402 --help
|
|
200
200
|
run402 projects --help
|
|
201
201
|
run402 sites --help
|
|
202
|
-
run402
|
|
202
|
+
run402 assets --help
|
|
203
203
|
run402 functions --help
|
|
204
204
|
```
|
|
205
205
|
|
package/cli.mjs
CHANGED
|
@@ -29,9 +29,9 @@ Commands:
|
|
|
29
29
|
ci Link GitHub Actions OIDC deploy bindings
|
|
30
30
|
functions Manage serverless functions (deploy, invoke, logs, list, delete)
|
|
31
31
|
secrets Manage project secrets (set, list, delete)
|
|
32
|
-
|
|
32
|
+
assets Direct-to-S3 asset storage (put, get, ls, rm, sign, diagnose) — up to 5 TiB
|
|
33
33
|
sites Deploy static sites
|
|
34
|
-
cdn CloudFront CDN diagnostics (wait-fresh) for public
|
|
34
|
+
cdn CloudFront CDN diagnostics (wait-fresh) for public asset URLs
|
|
35
35
|
subdomains Manage custom subdomains (claim, list, delete)
|
|
36
36
|
domains Manage custom domains (add, list, status, delete)
|
|
37
37
|
apps Browse and manage the app marketplace
|
|
@@ -139,8 +139,8 @@ switch (cmd) {
|
|
|
139
139
|
await run(sub, rest);
|
|
140
140
|
break;
|
|
141
141
|
}
|
|
142
|
-
case "
|
|
143
|
-
const { run } = await import("./lib/
|
|
142
|
+
case "assets": {
|
|
143
|
+
const { run } = await import("./lib/assets.mjs");
|
|
144
144
|
await run(sub, rest);
|
|
145
145
|
break;
|
|
146
146
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* run402
|
|
2
|
+
* run402 assets — direct-to-S3 storage CLI.
|
|
3
3
|
*
|
|
4
4
|
* Usage:
|
|
5
|
-
* run402
|
|
6
|
-
* run402
|
|
7
|
-
* run402
|
|
8
|
-
* run402
|
|
9
|
-
* run402
|
|
5
|
+
* run402 assets put <file> [files...] [--project <id>] [--key <dest>] [--content-type <mime>] [--private] [--immutable] [--concurrency N] [--no-resume]
|
|
6
|
+
* run402 assets get <key> --output <file> [--project <id>]
|
|
7
|
+
* run402 assets ls [--project <id>] [--prefix <p>] [--limit <n>]
|
|
8
|
+
* run402 assets rm <key> [--project <id>]
|
|
9
|
+
* run402 assets sign <key> [--project <id>] [--ttl <seconds>]
|
|
10
10
|
*
|
|
11
11
|
* For any file ≤ 5 GiB a single presigned PUT is used. Larger files use S3
|
|
12
12
|
* multipart uploads with 16 MiB parts (640 parts at 10 GiB; up to 10 000
|
|
@@ -43,12 +43,12 @@ import { assertKnownFlags, hasHelp, normalizeArgv, parseIntegerFlag } from "./ar
|
|
|
43
43
|
const HELP = `run402 blob — Direct-to-S3 blob storage
|
|
44
44
|
|
|
45
45
|
Usage:
|
|
46
|
-
run402
|
|
47
|
-
run402
|
|
48
|
-
run402
|
|
49
|
-
run402
|
|
50
|
-
run402
|
|
51
|
-
run402
|
|
46
|
+
run402 assets put <file> [files...] [options]
|
|
47
|
+
run402 assets get <key> --output <file> [options]
|
|
48
|
+
run402 assets ls [options]
|
|
49
|
+
run402 assets rm <key> [options]
|
|
50
|
+
run402 assets sign <key> [options]
|
|
51
|
+
run402 assets diagnose <url> [options]
|
|
52
52
|
|
|
53
53
|
Options:
|
|
54
54
|
--project <id> Project ID (defaults to active project from 'run402 projects use')
|
|
@@ -65,20 +65,20 @@ Options:
|
|
|
65
65
|
--ttl <seconds> Signed-URL TTL (sign only; default 3600, min 60, max 604800)
|
|
66
66
|
|
|
67
67
|
Examples:
|
|
68
|
-
run402
|
|
69
|
-
run402
|
|
70
|
-
run402
|
|
71
|
-
run402
|
|
72
|
-
run402
|
|
73
|
-
run402
|
|
74
|
-
run402
|
|
68
|
+
run402 assets put ./artifact.tgz --project prj_abc123
|
|
69
|
+
run402 assets put ./dist/**/*.png --project prj_abc123 --key assets/
|
|
70
|
+
run402 assets put huge.bin --project prj_abc123 --immutable
|
|
71
|
+
run402 assets get images/logo.png --output /tmp/logo.png --project prj_abc123
|
|
72
|
+
run402 assets ls --project prj_abc123 --prefix images/
|
|
73
|
+
run402 assets rm images/logo.png --project prj_abc123
|
|
74
|
+
run402 assets sign images/logo.png --project prj_abc123 --ttl 600
|
|
75
75
|
`;
|
|
76
76
|
|
|
77
77
|
const SUB_HELP = {
|
|
78
|
-
put: `run402
|
|
78
|
+
put: `run402 assets put — Upload one or more files to blob storage
|
|
79
79
|
|
|
80
80
|
Usage:
|
|
81
|
-
run402
|
|
81
|
+
run402 assets put <file> [files...] [options]
|
|
82
82
|
|
|
83
83
|
Arguments:
|
|
84
84
|
<file> Path to a file (or glob); pass multiple files to batch-upload
|
|
@@ -94,15 +94,15 @@ Options:
|
|
|
94
94
|
--json Emit NDJSON progress events on stdout (for agent consumption)
|
|
95
95
|
|
|
96
96
|
Examples:
|
|
97
|
-
run402
|
|
98
|
-
run402
|
|
99
|
-
run402
|
|
100
|
-
run402
|
|
97
|
+
run402 assets put ./artifact.tgz --project prj_abc123
|
|
98
|
+
run402 assets put ./dist/**/*.png --project prj_abc123 --key assets/
|
|
99
|
+
run402 assets put ./asset --project prj_abc123 --key assets/logo --content-type image/svg+xml
|
|
100
|
+
run402 assets put huge.bin --project prj_abc123 --immutable --concurrency 8
|
|
101
101
|
`,
|
|
102
|
-
get: `run402
|
|
102
|
+
get: `run402 assets get — Download a blob by key
|
|
103
103
|
|
|
104
104
|
Usage:
|
|
105
|
-
run402
|
|
105
|
+
run402 assets get <key> --output <file> [options]
|
|
106
106
|
|
|
107
107
|
Arguments:
|
|
108
108
|
<key> Blob key to download
|
|
@@ -112,12 +112,12 @@ Options:
|
|
|
112
112
|
--project <id> Project ID (defaults to active project)
|
|
113
113
|
|
|
114
114
|
Examples:
|
|
115
|
-
run402
|
|
115
|
+
run402 assets get images/logo.png --output /tmp/logo.png --project prj_abc123
|
|
116
116
|
`,
|
|
117
|
-
ls: `run402
|
|
117
|
+
ls: `run402 assets ls — List blob keys in a project
|
|
118
118
|
|
|
119
119
|
Usage:
|
|
120
|
-
run402
|
|
120
|
+
run402 assets ls [options]
|
|
121
121
|
|
|
122
122
|
Options:
|
|
123
123
|
--project <id> Project ID (defaults to active project)
|
|
@@ -125,13 +125,13 @@ Options:
|
|
|
125
125
|
--limit <n> Max results (default 100, max 1000)
|
|
126
126
|
|
|
127
127
|
Examples:
|
|
128
|
-
run402
|
|
129
|
-
run402
|
|
128
|
+
run402 assets ls --project prj_abc123
|
|
129
|
+
run402 assets ls --project prj_abc123 --prefix images/ --limit 500
|
|
130
130
|
`,
|
|
131
|
-
rm: `run402
|
|
131
|
+
rm: `run402 assets rm — Delete a blob
|
|
132
132
|
|
|
133
133
|
Usage:
|
|
134
|
-
run402
|
|
134
|
+
run402 assets rm <key> [options]
|
|
135
135
|
|
|
136
136
|
Arguments:
|
|
137
137
|
<key> Blob key to delete
|
|
@@ -140,12 +140,12 @@ Options:
|
|
|
140
140
|
--project <id> Project ID (defaults to active project)
|
|
141
141
|
|
|
142
142
|
Examples:
|
|
143
|
-
run402
|
|
143
|
+
run402 assets rm images/logo.png --project prj_abc123
|
|
144
144
|
`,
|
|
145
|
-
sign: `run402
|
|
145
|
+
sign: `run402 assets sign — Create a presigned download URL for a blob
|
|
146
146
|
|
|
147
147
|
Usage:
|
|
148
|
-
run402
|
|
148
|
+
run402 assets sign <key> [options]
|
|
149
149
|
|
|
150
150
|
Arguments:
|
|
151
151
|
<key> Blob key to sign
|
|
@@ -155,12 +155,12 @@ Options:
|
|
|
155
155
|
--ttl <seconds> Signed-URL TTL (default 3600, min 60, max 604800)
|
|
156
156
|
|
|
157
157
|
Examples:
|
|
158
|
-
run402
|
|
158
|
+
run402 assets sign reports/2025-q4.pdf --project prj_abc123 --ttl 600
|
|
159
159
|
`,
|
|
160
|
-
diagnose: `run402
|
|
160
|
+
diagnose: `run402 assets diagnose — Inspect the live CDN state for a public blob URL
|
|
161
161
|
|
|
162
162
|
Usage:
|
|
163
|
-
run402
|
|
163
|
+
run402 assets diagnose <url> [options]
|
|
164
164
|
|
|
165
165
|
Arguments:
|
|
166
166
|
<url> Full blob URL (e.g. https://app.run402.com/_blob/avatar.png)
|
|
@@ -178,10 +178,10 @@ Exit codes:
|
|
|
178
178
|
1 observed SHA does not match (or probe returned no SHA)
|
|
179
179
|
|
|
180
180
|
Agent loop pattern:
|
|
181
|
-
until run402
|
|
181
|
+
until run402 assets diagnose <url>; do sleep 1; done
|
|
182
182
|
|
|
183
183
|
Examples:
|
|
184
|
-
run402
|
|
184
|
+
run402 assets diagnose https://app.run402.com/_blob/avatar.png
|
|
185
185
|
`,
|
|
186
186
|
};
|
|
187
187
|
|
|
@@ -352,7 +352,7 @@ async function putOne(projectId, filePath, opts) {
|
|
|
352
352
|
let initRes;
|
|
353
353
|
if (state) {
|
|
354
354
|
// Re-poll the session; if it's still active, resume. Otherwise start fresh.
|
|
355
|
-
const poll = await getSdk().
|
|
355
|
+
const poll = await getSdk().assets.getUploadSession(projectId, state.upload_id);
|
|
356
356
|
if (poll.status === "active") {
|
|
357
357
|
log(opts, { event: "resume", upload_id: state.upload_id, key: destKey });
|
|
358
358
|
initRes = {
|
|
@@ -369,7 +369,7 @@ async function putOne(projectId, filePath, opts) {
|
|
|
369
369
|
}
|
|
370
370
|
|
|
371
371
|
if (!state) {
|
|
372
|
-
initRes = await getSdk().
|
|
372
|
+
initRes = await getSdk().assets.initUploadSession(projectId, {
|
|
373
373
|
key: destKey,
|
|
374
374
|
size_bytes: size,
|
|
375
375
|
content_type: opts.contentType ?? guessContentType(destKey),
|
|
@@ -417,7 +417,7 @@ async function putOne(projectId, filePath, opts) {
|
|
|
417
417
|
const body = initRes.mode === "multipart"
|
|
418
418
|
? { parts: etags.map((e, i) => ({ part_number: i + 1, etag: e.etag, sha256: e.sha256 })) }
|
|
419
419
|
: {};
|
|
420
|
-
const result = await getSdk().
|
|
420
|
+
const result = await getSdk().assets.completeUploadSession(projectId, state.upload_id, body, {
|
|
421
421
|
contentType: opts.contentType ?? guessContentType(destKey),
|
|
422
422
|
});
|
|
423
423
|
|
|
@@ -504,7 +504,7 @@ async function get(projectId, argv) {
|
|
|
504
504
|
|
|
505
505
|
let res;
|
|
506
506
|
try {
|
|
507
|
-
res = await getSdk().
|
|
507
|
+
res = await getSdk().assets.get(resolvedId, key);
|
|
508
508
|
} catch (err) {
|
|
509
509
|
reportSdkError(err);
|
|
510
510
|
return;
|
|
@@ -526,7 +526,7 @@ async function ls(projectId, argv) {
|
|
|
526
526
|
const resolvedId = resolveProjectId(opts.project);
|
|
527
527
|
|
|
528
528
|
try {
|
|
529
|
-
const data = await getSdk().
|
|
529
|
+
const data = await getSdk().assets.ls(resolvedId, {
|
|
530
530
|
prefix: opts.prefix ?? undefined,
|
|
531
531
|
limit: opts.limit ?? undefined,
|
|
532
532
|
});
|
|
@@ -549,7 +549,7 @@ async function rm(projectId, argv) {
|
|
|
549
549
|
const key = opts.positional[0];
|
|
550
550
|
|
|
551
551
|
try {
|
|
552
|
-
await getSdk().
|
|
552
|
+
await getSdk().assets.rm(resolvedId, key);
|
|
553
553
|
console.log(JSON.stringify({ status: "ok", key }));
|
|
554
554
|
} catch (err) {
|
|
555
555
|
reportSdkError(err);
|
|
@@ -569,7 +569,7 @@ async function diagnose(projectId, argv) {
|
|
|
569
569
|
const url = opts.positional[0];
|
|
570
570
|
|
|
571
571
|
try {
|
|
572
|
-
const env = await getSdk().
|
|
572
|
+
const env = await getSdk().assets.diagnoseUrl(resolvedId, url);
|
|
573
573
|
// Always print the JSON envelope for agent consumption (parseable).
|
|
574
574
|
console.log(JSON.stringify(env, null, 2));
|
|
575
575
|
// Vantage caveat to stderr so a TTY operator sees it; agent shell loops
|
|
@@ -578,7 +578,7 @@ async function diagnose(projectId, argv) {
|
|
|
578
578
|
`\n# probed once from ${env.vantage}; not a global view\n`,
|
|
579
579
|
);
|
|
580
580
|
// Exit code: 0 if observed === expected, 1 otherwise. Lets agents
|
|
581
|
-
// shell-script `until run402
|
|
581
|
+
// shell-script `until run402 assets diagnose <url>; do sleep 1; done`.
|
|
582
582
|
if (env.observedSha256 && env.observedSha256 === env.expectedSha256) {
|
|
583
583
|
process.exit(0);
|
|
584
584
|
}
|
|
@@ -597,7 +597,7 @@ async function sign(projectId, argv) {
|
|
|
597
597
|
const key = opts.positional[0];
|
|
598
598
|
|
|
599
599
|
try {
|
|
600
|
-
const data = await getSdk().
|
|
600
|
+
const data = await getSdk().assets.sign(resolvedId, key, {
|
|
601
601
|
ttl_seconds: opts.ttl ?? undefined,
|
|
602
602
|
});
|
|
603
603
|
console.log(JSON.stringify(data, null, 2));
|
package/lib/deploy-v2.mjs
CHANGED
|
@@ -410,7 +410,7 @@ async function applyCmd(args) {
|
|
|
410
410
|
|
|
411
411
|
// GH-232: Reject empty specs client-side. Without this guard,
|
|
412
412
|
// `run402 deploy apply --spec '{}'` (and `--manifest <empty>`) would silently
|
|
413
|
-
// send an empty ReleaseSpec to /
|
|
413
|
+
// send an empty ReleaseSpec to /apply/v1/plans with no signal that nothing
|
|
414
414
|
// was deployed.
|
|
415
415
|
//
|
|
416
416
|
// `deploy apply` is v2-only — only meaningful keys are the v2 ReleaseSpec
|
|
@@ -488,11 +488,11 @@ async function applyCmd(args) {
|
|
|
488
488
|
};
|
|
489
489
|
} else {
|
|
490
490
|
// Preserve the aggressive early exit when no allowance is configured.
|
|
491
|
-
allowanceAuthHeaders("/
|
|
491
|
+
allowanceAuthHeaders("/apply/v1/plans");
|
|
492
492
|
}
|
|
493
493
|
|
|
494
494
|
try {
|
|
495
|
-
const result = await getSdk(sdkOpts).
|
|
495
|
+
const result = await getSdk(sdkOpts)._applyEngine.apply(releaseSpec, {
|
|
496
496
|
onEvent: makeStderrEventWriter(opts.quiet),
|
|
497
497
|
idempotencyKey,
|
|
498
498
|
allowWarnings: opts.allowWarnings,
|
|
@@ -815,10 +815,10 @@ async function resumeCmd(args) {
|
|
|
815
815
|
});
|
|
816
816
|
const opts = { operationId, quiet: Boolean(parsed.flags["--quiet"]) };
|
|
817
817
|
|
|
818
|
-
allowanceAuthHeaders("/
|
|
818
|
+
allowanceAuthHeaders("/apply/v1/operations");
|
|
819
819
|
|
|
820
820
|
try {
|
|
821
|
-
const result = await getSdk().
|
|
821
|
+
const result = await getSdk()._applyEngine.resume(opts.operationId, {
|
|
822
822
|
onEvent: makeStderrEventWriter(opts.quiet),
|
|
823
823
|
});
|
|
824
824
|
console.log(JSON.stringify({ status: "ok", ...result }, null, 2));
|
|
@@ -843,12 +843,12 @@ async function listCmd(args) {
|
|
|
843
843
|
};
|
|
844
844
|
|
|
845
845
|
const project = resolveProjectId(opts.project);
|
|
846
|
-
allowanceAuthHeaders("/
|
|
846
|
+
allowanceAuthHeaders("/apply/v1/operations");
|
|
847
847
|
|
|
848
848
|
try {
|
|
849
849
|
const sdkOpts = { project };
|
|
850
850
|
if (opts.limit !== null) sdkOpts.limit = opts.limit;
|
|
851
|
-
const result = await getSdk().
|
|
851
|
+
const result = await getSdk()._applyEngine.list(sdkOpts);
|
|
852
852
|
console.log(JSON.stringify({ status: "ok", ...result }, null, 2));
|
|
853
853
|
} catch (err) {
|
|
854
854
|
reportSdkError(err);
|
|
@@ -870,10 +870,10 @@ async function eventsCmd(args) {
|
|
|
870
870
|
const opts = { operationId, project: parsed.flags["--project"] ?? null };
|
|
871
871
|
|
|
872
872
|
const project = resolveProjectId(opts.project);
|
|
873
|
-
allowanceAuthHeaders("/
|
|
873
|
+
allowanceAuthHeaders("/apply/v1/operations");
|
|
874
874
|
|
|
875
875
|
try {
|
|
876
|
-
const result = await getSdk().
|
|
876
|
+
const result = await getSdk()._applyEngine.events(opts.operationId, { project });
|
|
877
877
|
console.log(JSON.stringify({ status: "ok", ...result }, null, 2));
|
|
878
878
|
} catch (err) {
|
|
879
879
|
reportSdkError(err);
|
|
@@ -921,7 +921,7 @@ async function releaseGetCmd(args) {
|
|
|
921
921
|
try {
|
|
922
922
|
const sdkOpts = { project, releaseId: opts.releaseId };
|
|
923
923
|
if (opts.siteLimit !== null) sdkOpts.siteLimit = opts.siteLimit;
|
|
924
|
-
const release = await getSdk().
|
|
924
|
+
const release = await getSdk()._applyEngine.getRelease(sdkOpts);
|
|
925
925
|
console.log(JSON.stringify({ status: "ok", release }, null, 2));
|
|
926
926
|
} catch (err) {
|
|
927
927
|
reportSdkError(err);
|
|
@@ -950,7 +950,7 @@ async function releaseActiveCmd(args) {
|
|
|
950
950
|
try {
|
|
951
951
|
const sdkOpts = { project };
|
|
952
952
|
if (opts.siteLimit !== null) sdkOpts.siteLimit = opts.siteLimit;
|
|
953
|
-
const release = await getSdk().
|
|
953
|
+
const release = await getSdk()._applyEngine.getActiveRelease(sdkOpts);
|
|
954
954
|
console.log(JSON.stringify({ status: "ok", release }, null, 2));
|
|
955
955
|
} catch (err) {
|
|
956
956
|
reportSdkError(err);
|
|
@@ -993,7 +993,7 @@ async function releaseDiffCmd(args) {
|
|
|
993
993
|
try {
|
|
994
994
|
const sdkOpts = { project, from: opts.from, to: opts.to };
|
|
995
995
|
if (opts.limit !== null) sdkOpts.limit = opts.limit;
|
|
996
|
-
const diff = await getSdk().
|
|
996
|
+
const diff = await getSdk()._applyEngine.diff(sdkOpts);
|
|
997
997
|
console.log(JSON.stringify({ status: "ok", diff }, null, 2));
|
|
998
998
|
} catch (err) {
|
|
999
999
|
reportSdkError(err);
|
|
@@ -1092,7 +1092,7 @@ async function printResolveEnvelope(input) {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
|
|
1094
1094
|
try {
|
|
1095
|
-
const resolution = await getSdk().
|
|
1095
|
+
const resolution = await getSdk()._applyEngine.resolve(input);
|
|
1096
1096
|
const summary = buildDeployResolveSummary(resolution, request);
|
|
1097
1097
|
console.log(JSON.stringify({
|
|
1098
1098
|
status: "ok",
|
package/lib/sites.mjs
CHANGED
|
@@ -221,7 +221,7 @@ async function deploy(args) {
|
|
|
221
221
|
if (opts.manifest) resolveFilePathsInManifest(manifest, dirname(resolve(opts.manifest)));
|
|
222
222
|
|
|
223
223
|
// Preserve the aggressive early exit when no allowance is configured.
|
|
224
|
-
allowanceAuthHeaders("/
|
|
224
|
+
allowanceAuthHeaders("/apply/v1/plans");
|
|
225
225
|
|
|
226
226
|
const stage = stageFilesToTempDir(manifest.files || []);
|
|
227
227
|
try {
|
|
@@ -288,7 +288,7 @@ async function deployDir(args) {
|
|
|
288
288
|
if (opts.target !== undefined) failUnsupportedTarget();
|
|
289
289
|
|
|
290
290
|
// Preserve the aggressive early exit when no allowance is configured.
|
|
291
|
-
allowanceAuthHeaders("/
|
|
291
|
+
allowanceAuthHeaders("/apply/v1/plans");
|
|
292
292
|
|
|
293
293
|
let fileSet;
|
|
294
294
|
try {
|
|
@@ -323,7 +323,7 @@ async function deployDir(args) {
|
|
|
323
323
|
|
|
324
324
|
if (opts.dryRun) {
|
|
325
325
|
try {
|
|
326
|
-
const { plan } = await getSdk().
|
|
326
|
+
const { plan } = await getSdk()._applyEngine.plan({
|
|
327
327
|
project: projectId,
|
|
328
328
|
site: { replace: fileSet },
|
|
329
329
|
}, { dryRun: true });
|
package/package.json
CHANGED
package/sdk/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { CredentialsProvider } from "./credentials.js";
|
|
9
9
|
import { Projects } from "./namespaces/projects.js";
|
|
10
|
-
import {
|
|
10
|
+
import { Assets } from "./namespaces/assets.js";
|
|
11
11
|
import { Functions } from "./namespaces/functions.js";
|
|
12
12
|
import { Secrets } from "./namespaces/secrets.js";
|
|
13
13
|
import { Subdomains } from "./namespaces/subdomains.js";
|
|
@@ -43,7 +43,7 @@ export interface Run402Options {
|
|
|
43
43
|
export declare class Run402 {
|
|
44
44
|
#private;
|
|
45
45
|
readonly projects: Projects;
|
|
46
|
-
readonly
|
|
46
|
+
readonly assets: Assets;
|
|
47
47
|
readonly functions: Functions;
|
|
48
48
|
readonly secrets: Secrets;
|
|
49
49
|
readonly subdomains: Subdomains;
|
|
@@ -61,7 +61,14 @@ export declare class Run402 {
|
|
|
61
61
|
readonly email: Email;
|
|
62
62
|
readonly contracts: Contracts;
|
|
63
63
|
readonly admin: Admin;
|
|
64
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Internal engine. v1.48 unified-apply removed `r.deploy.apply` and
|
|
66
|
+
* `r.apply` as public surfaces — the sole hero is `r.project(id).apply`.
|
|
67
|
+
* This property exists only so the scoped sub-client can delegate to the
|
|
68
|
+
* engine implementation; do not call directly from user code.
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
readonly _applyEngine: Deploy;
|
|
65
72
|
readonly ci: Ci;
|
|
66
73
|
constructor(opts: Run402Options);
|
|
67
74
|
/**
|
|
@@ -136,7 +143,7 @@ export type * from "./namespaces/allowance.js";
|
|
|
136
143
|
export type * from "./namespaces/apps.js";
|
|
137
144
|
export type * from "./namespaces/auth.js";
|
|
138
145
|
export type * from "./namespaces/billing.js";
|
|
139
|
-
export type * from "./namespaces/
|
|
146
|
+
export type * from "./namespaces/assets.types.js";
|
|
140
147
|
export type * from "./namespaces/ci.types.js";
|
|
141
148
|
export type * from "./namespaces/contracts.js";
|
|
142
149
|
export type * from "./namespaces/deploy.types.js";
|
package/sdk/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CA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,CAAC;AAC7C,mBAAmB,+BAA+B,CAAC;AACnD,mBAAmB,yBAAyB,CAAC;AAC7C,mBAAmB,uBAAuB,CAAC;AAC3C,mBAAmB,4BAA4B,CAAC;AAChD,mBAAmB,sBAAsB,CAAC"}
|
package/sdk/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { buildClient } from "./kernel.js";
|
|
9
9
|
import { Projects } from "./namespaces/projects.js";
|
|
10
|
-
import {
|
|
10
|
+
import { Assets } from "./namespaces/assets.js";
|
|
11
11
|
import { Functions } from "./namespaces/functions.js";
|
|
12
12
|
import { Secrets } from "./namespaces/secrets.js";
|
|
13
13
|
import { Subdomains } from "./namespaces/subdomains.js";
|
|
@@ -30,7 +30,7 @@ import { ScopedRun402 } from "./scoped.js";
|
|
|
30
30
|
import { LocalError } from "./errors.js";
|
|
31
31
|
export class Run402 {
|
|
32
32
|
projects;
|
|
33
|
-
|
|
33
|
+
assets;
|
|
34
34
|
functions;
|
|
35
35
|
secrets;
|
|
36
36
|
subdomains;
|
|
@@ -48,7 +48,14 @@ export class Run402 {
|
|
|
48
48
|
email;
|
|
49
49
|
contracts;
|
|
50
50
|
admin;
|
|
51
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Internal engine. v1.48 unified-apply removed `r.deploy.apply` and
|
|
53
|
+
* `r.apply` as public surfaces — the sole hero is `r.project(id).apply`.
|
|
54
|
+
* This property exists only so the scoped sub-client can delegate to the
|
|
55
|
+
* engine implementation; do not call directly from user code.
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
_applyEngine;
|
|
52
59
|
ci;
|
|
53
60
|
#client;
|
|
54
61
|
constructor(opts) {
|
|
@@ -73,7 +80,7 @@ export class Run402 {
|
|
|
73
80
|
const client = buildClient(kernel);
|
|
74
81
|
this.#client = client;
|
|
75
82
|
this.projects = new Projects(client);
|
|
76
|
-
this.
|
|
83
|
+
this.assets = new Assets(client);
|
|
77
84
|
this.functions = new Functions(client);
|
|
78
85
|
this.secrets = new Secrets(client);
|
|
79
86
|
this.subdomains = new Subdomains(client);
|
|
@@ -94,7 +101,7 @@ export class Run402 {
|
|
|
94
101
|
this.email = new Email(client);
|
|
95
102
|
this.contracts = new Contracts(client);
|
|
96
103
|
this.admin = new Admin(client);
|
|
97
|
-
this.
|
|
104
|
+
this._applyEngine = new Deploy(client);
|
|
98
105
|
this.ci = new Ci(client);
|
|
99
106
|
}
|
|
100
107
|
/**
|
package/sdk/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAkC,MAAM,aAAa,CAAC;AAE1E,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAkC,MAAM,aAAa,CAAC;AAE1E,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE,M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AC;AAE7B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EACL,8BAA8B,EAC9B,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,6BAA6B,EAC7B,+BAA+B,EAC/B,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,EAAE,EACF,WAAW,EACX,wBAAwB,EACxB,0BAA0B,EAC1B,8BAA8B,EAC9B,qBAAqB,EACrB,4BAA4B,EAC5B,sBAAsB,EACtB,4BAA4B,EAC5B,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,EAC3B,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* configured fetch still flows through any wrappers (e.g. test mocks).
|
|
8
8
|
*/
|
|
9
9
|
import type { Client } from "../kernel.js";
|
|
10
|
-
import type { BlobDiagnoseEnvelope, BlobLsOptions, BlobLsResult, BlobPutOptions, BlobPutResult, BlobPutSource, BlobSignOptions, BlobSignResult, BlobUploadCompleteOptions, BlobUploadCompleteResult, BlobUploadInitOptions, BlobUploadInitResult, BlobUploadStatusResult, BlobWaitFreshOptions, BlobWaitFreshResult } from "./
|
|
11
|
-
export declare class
|
|
10
|
+
import type { BlobDiagnoseEnvelope, BlobLsOptions, BlobLsResult, BlobPutOptions, BlobPutResult, BlobPutSource, BlobSignOptions, BlobSignResult, BlobUploadCompleteOptions, BlobUploadCompleteResult, BlobUploadInitOptions, BlobUploadInitResult, BlobUploadStatusResult, BlobWaitFreshOptions, BlobWaitFreshResult } from "./assets.types.js";
|
|
11
|
+
export declare class Assets {
|
|
12
12
|
private readonly client;
|
|
13
13
|
constructor(client: Client);
|
|
14
14
|
/**
|
|
@@ -94,4 +94,4 @@ export declare class Blobs {
|
|
|
94
94
|
/** Generate a time-boxed S3 presigned GET URL for a blob. Default TTL 1 hour, max 7 days. */
|
|
95
95
|
sign(projectId: string, key: string, opts?: BlobSignOptions): Promise<BlobSignResult>;
|
|
96
96
|
}
|
|
97
|
-
//# sourceMappingURL=
|
|
97
|
+
//# sourceMappingURL=assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/namespaces/assets.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,KAAK,EAGV,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,aAAa,EACb,aAAa,EACb,eAAe,EACf,cAAc,EACd,yBAAyB,EACzB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAiQ3B,qBAAa,MAAM;IACL,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAE3C;;;;;;;;;;OAUG;IACG,GAAG,CACP,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,aAAa,EACrB,IAAI,GAAE,cAAmB,GACxB,OAAO,CAAC,aAAa,CAAC;IAsFzB;;;;OAIG;IACG,iBAAiB,CACrB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,oBAAoB,CAAC;IAwBhC,+EAA+E;IACzE,gBAAgB,CACpB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,sBAAsB,CAAC;IAgBlC;;;OAGG;IACG,qBAAqB,CACzB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,yBAA8B,EACpC,KAAK,GAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAO,GACnC,OAAO,CAAC,wBAAwB,CAAC;IAoBpC;;;;;;;;;;;;;;;;;;;OAmBG;IACG,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAchF;;;;;;;;;;;;;;;;;OAiBG;IACG,SAAS,CACb,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,oBAAoB,GACzB,OAAO,CAAC,mBAAmB,CAAC;IA6C/B;;;;;;;OAOG;IACG,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAuB5D,oDAAoD;IAC9C,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,YAAY,CAAC;IAwB5E,+DAA+D;IACzD,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAcvD,6FAA6F;IACvF,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,cAAc,CAAC;CAwBhG"}
|
|
@@ -211,7 +211,7 @@ function buildAssetRef(resp, contentType) {
|
|
|
211
211
|
},
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
|
-
export class
|
|
214
|
+
export class Assets {
|
|
215
215
|
client;
|
|
216
216
|
constructor(client) {
|
|
217
217
|
this.client = client;
|
|
@@ -536,4 +536,4 @@ export class Blobs {
|
|
|
536
536
|
});
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
|
-
//# sourceMappingURL=
|
|
539
|
+
//# sourceMappingURL=assets.js.map
|