run402 1.65.1 → 1.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/lib/deploy-v2.mjs +205 -1
- package/lib/deploy.mjs +6 -0
- package/package.json +1 -1
- package/sdk/dist/index.d.ts +1 -1
- package/sdk/dist/index.d.ts.map +1 -1
- package/sdk/dist/index.js +1 -1
- package/sdk/dist/index.js.map +1 -1
- package/sdk/dist/namespaces/deploy.d.ts +7 -1
- package/sdk/dist/namespaces/deploy.d.ts.map +1 -1
- package/sdk/dist/namespaces/deploy.js +82 -13
- package/sdk/dist/namespaces/deploy.js.map +1 -1
- package/sdk/dist/namespaces/deploy.types.d.ts +144 -1
- package/sdk/dist/namespaces/deploy.types.d.ts.map +1 -1
- package/sdk/dist/namespaces/deploy.types.js +266 -0
- package/sdk/dist/namespaces/deploy.types.js.map +1 -1
- package/sdk/dist/node/deploy-manifest.d.ts.map +1 -1
- package/sdk/dist/node/deploy-manifest.js +59 -12
- package/sdk/dist/node/deploy-manifest.js.map +1 -1
- package/sdk/dist/node/index.d.ts +1 -1
- package/sdk/dist/node/index.d.ts.map +1 -1
- package/sdk/dist/node/index.js +1 -1
- package/sdk/dist/node/index.js.map +1 -1
- package/sdk/dist/scoped.d.ts +2 -1
- package/sdk/dist/scoped.d.ts.map +1 -1
- package/sdk/dist/scoped.js +6 -0
- package/sdk/dist/scoped.js.map +1 -1
- package/sdk/dist/type-contract.d.ts.map +1 -1
- package/sdk/dist/type-contract.js +2 -0
- package/sdk/dist/type-contract.js.map +1 -1
package/README.md
CHANGED
|
@@ -60,11 +60,13 @@ run402 sites deploy-dir ./dist # incremental upload (plan/commit
|
|
|
60
60
|
run402 deploy --manifest app.json # one-call full stack deploy
|
|
61
61
|
run402 deploy release active # inspect current-live release inventory
|
|
62
62
|
run402 deploy release diff --from empty --to active
|
|
63
|
+
run402 deploy diagnose --project prj_123 https://example.com/events --method GET
|
|
64
|
+
run402 deploy resolve --project prj_123 --url https://example.com/events?utm=x#hero --method GET
|
|
63
65
|
run402 subdomains claim my-app # → my-app.run402.com (auto-reassigns on next deploy)
|
|
64
66
|
```
|
|
65
67
|
|
|
66
68
|
`deploy-dir` hashes each file client-side and only uploads bytes the gateway doesn't already have. Re-deploying an unchanged tree returns immediately with `bytes_uploaded: 0`. Progress events stream to stderr.
|
|
67
|
-
Release inspection commands print `{ status: "ok", release: ... }` or `{ status: "ok", diff: ... }`; use them after deploys to compare release inventory without starting another mutation.
|
|
69
|
+
Release inspection commands print `{ status: "ok", release: ... }` or `{ status: "ok", diff: ... }`; use them after deploys to compare release inventory without starting another mutation. Inventories include `release_generation`, `static_manifest_sha256`, and nullable `static_manifest_metadata`; diffs include `static_assets` counters such as unchanged/changed/added/removed and CAS byte reuse. `deploy diagnose` / `deploy resolve --url` print URL-first diagnostics with `would_serve`, `diagnostic_status`, `match`, warnings, and next steps; host misses are successful diagnostic calls with `would_serve: false`.
|
|
68
70
|
|
|
69
71
|
### GitHub Actions OIDC deploys
|
|
70
72
|
|
|
@@ -128,7 +130,7 @@ import { db, adminDb, getUser, email, ai } from "@run402/functions";
|
|
|
128
130
|
|
|
129
131
|
### Same-origin web routes
|
|
130
132
|
|
|
131
|
-
`run402 deploy apply` accepts `routes.replace` as an array of route entries, not a path-keyed map. Use exact `/admin` plus final-wildcard `/admin/*` for a routed section root, and target
|
|
133
|
+
`run402 deploy apply` accepts `routes.replace` as an array of route entries, not a path-keyed map. Use exact `/admin` plus final-wildcard `/admin/*` for a routed section root, narrow `/api/*` methods such as `["GET","POST","OPTIONS"]`, POST-only `/login` function routes, and exact static route targets like `{ "pattern": "/events", "methods": ["GET","HEAD"], "target": { "type": "static", "file": "events.html" } }`. Static route targets are exact file targets, not rewrites or redirects; avoid routing ordinary static files, wildcard static targets, leading-slash files, directory shorthand, and one-route-per-page route-table exhaustion. Routed functions use Node 22 Fetch Request -> Response; `req.url` is the full public URL on managed subdomains, deployment hosts, and verified custom domains. Direct `/functions/v1/:name` remains API-key protected. Known resolve literals include `host_missing`, `manifest_missing`, `path_error`, `none`, `static_exact`, `static_index`, `spa_fallback`, and `spa_fallback_missing`; current resolve is authoritative for host/static/SPAfallback diagnostics, not complete route introspection. Static route target warnings include `STATIC_ALIAS_SHADOWS_STATIC_PATH`, `STATIC_ALIAS_RELATIVE_ASSET_RISK`, `STATIC_ALIAS_DUPLICATE_CANONICAL_URL`, `STATIC_ALIAS_EXTENSIONLESS_NON_HTML`, and `STATIC_ALIAS_TABLE_NEAR_LIMIT`. Runtime route failure codes to branch on: `ROUTE_MANIFEST_LOAD_FAILED`, `ROUTED_INVOKE_WORKER_SECRET_MISSING`, `ROUTED_INVOKE_AUTH_FAILED`, `ROUTED_ROUTE_STALE`, `ROUTE_METHOD_NOT_ALLOWED`, and `ROUTED_RESPONSE_TOO_LARGE`.
|
|
132
134
|
|
|
133
135
|
### Secrets
|
|
134
136
|
|
package/lib/deploy-v2.mjs
CHANGED
|
@@ -26,7 +26,12 @@
|
|
|
26
26
|
|
|
27
27
|
import { readFileSync } from "node:fs";
|
|
28
28
|
import { resolve, dirname, isAbsolute } from "node:path";
|
|
29
|
-
import {
|
|
29
|
+
import {
|
|
30
|
+
buildDeployResolveSummary,
|
|
31
|
+
githubActionsCredentials,
|
|
32
|
+
normalizeDeployManifest,
|
|
33
|
+
normalizeDeployResolveRequest,
|
|
34
|
+
} from "#sdk/node";
|
|
30
35
|
import { getSdk } from "./sdk.mjs";
|
|
31
36
|
import { reportSdkError, fail } from "./sdk-errors.mjs";
|
|
32
37
|
import { API, allowanceAuthHeaders, getActiveProjectId, resolveProjectId } from "./config.mjs";
|
|
@@ -197,12 +202,51 @@ Output:
|
|
|
197
202
|
stdout: { "status": "ok", "diff": {...} } # preserves routes.added/removed/changed
|
|
198
203
|
`;
|
|
199
204
|
|
|
205
|
+
const DIAGNOSE_HELP = `run402 deploy diagnose — Diagnose a Run402 public URL
|
|
206
|
+
|
|
207
|
+
Usage:
|
|
208
|
+
run402 deploy diagnose --project <id> <url> [--method GET]
|
|
209
|
+
run402 deploy diagnose <url> [--method GET] # uses active project
|
|
210
|
+
|
|
211
|
+
Diagnoses how a project-owned Run402 subdomain or custom domain resolves
|
|
212
|
+
against the current live release. This is not an HTTP fetch, cache purge, or
|
|
213
|
+
CAS URL lookup. Query strings and fragments in URL input are ignored for route
|
|
214
|
+
resolution and reported in structured warnings.
|
|
215
|
+
|
|
216
|
+
Options:
|
|
217
|
+
--project <id> Project ID for local apikey lookup (default: active project)
|
|
218
|
+
--method <method> HTTP method to diagnose (default: GET)
|
|
219
|
+
|
|
220
|
+
Output:
|
|
221
|
+
stdout: { "status": "ok", "would_serve": true|false, "diagnostic_status": 200|404|..., "match": "...", "summary": "...", "request": {...}, "warnings": [...], "resolution": {...}, "next_steps": [...] }
|
|
222
|
+
`;
|
|
223
|
+
|
|
224
|
+
const RESOLVE_HELP = `run402 deploy resolve — Low-level deploy URL diagnostics
|
|
225
|
+
|
|
226
|
+
Usage:
|
|
227
|
+
run402 deploy resolve --project <id> --url <url> [--method GET]
|
|
228
|
+
run402 deploy resolve --project <id> --host <host> [--path /x] [--method GET]
|
|
229
|
+
run402 deploy resolve --url <url> [--method GET] # uses active project
|
|
230
|
+
|
|
231
|
+
Options:
|
|
232
|
+
--project <id> Project ID for local apikey lookup (default: active project)
|
|
233
|
+
--url <url> Absolute HTTP(S) public URL to diagnose
|
|
234
|
+
--host <host> Clean hostname without scheme/path/query/fragment
|
|
235
|
+
--path </path> Public URL path for host/path mode
|
|
236
|
+
--method <method> HTTP method to diagnose (default: GET)
|
|
237
|
+
|
|
238
|
+
Do not combine --url with --host or --path. Successful diagnostic misses still
|
|
239
|
+
exit 0 with status: "ok"; inspect would_serve and diagnostic_status.
|
|
240
|
+
`;
|
|
241
|
+
|
|
200
242
|
export async function runDeployV2(sub, args) {
|
|
201
243
|
if (sub === "apply") return await applyCmd(args);
|
|
202
244
|
if (sub === "resume") return await resumeCmd(args);
|
|
203
245
|
if (sub === "list") return await listCmd(args);
|
|
204
246
|
if (sub === "events") return await eventsCmd(args);
|
|
205
247
|
if (sub === "release") return await releaseCmd(args);
|
|
248
|
+
if (sub === "diagnose") return await diagnoseCmd(args);
|
|
249
|
+
if (sub === "resolve") return await resolveCmd(args);
|
|
206
250
|
fail({
|
|
207
251
|
code: "BAD_USAGE",
|
|
208
252
|
message: `Unknown deploy subcommand: ${sub}`,
|
|
@@ -548,6 +592,41 @@ const ROUTE_WARNING_GUIDANCE = {
|
|
|
548
592
|
"Keep direct function invocation API-key protected; do not substitute it for same-origin browser routes.",
|
|
549
593
|
],
|
|
550
594
|
},
|
|
595
|
+
STATIC_ALIAS_SHADOWS_STATIC_PATH: {
|
|
596
|
+
hint: "A static route target shadows a direct static path at the same public URL.",
|
|
597
|
+
next_actions: [
|
|
598
|
+
"Inspect the route pattern, target.file, and direct static path.",
|
|
599
|
+
"Confirm only when the static route target is intentional.",
|
|
600
|
+
],
|
|
601
|
+
},
|
|
602
|
+
STATIC_ALIAS_RELATIVE_ASSET_RISK: {
|
|
603
|
+
hint: "Relative asset URLs inside the target HTML may resolve differently at the static route target URL.",
|
|
604
|
+
next_actions: [
|
|
605
|
+
"Inspect the target HTML for relative asset references.",
|
|
606
|
+
"Use absolute asset URLs or confirm only when the alternate URL is intentional.",
|
|
607
|
+
],
|
|
608
|
+
},
|
|
609
|
+
STATIC_ALIAS_DUPLICATE_CANONICAL_URL: {
|
|
610
|
+
hint: "Both the static route target URL and the target file URL may be publicly reachable.",
|
|
611
|
+
next_actions: [
|
|
612
|
+
"Decide which URL should be canonical.",
|
|
613
|
+
"Update links/canonical tags or accept the duplicate public URL intentionally.",
|
|
614
|
+
],
|
|
615
|
+
},
|
|
616
|
+
STATIC_ALIAS_EXTENSIONLESS_NON_HTML: {
|
|
617
|
+
hint: "An extensionless static route target points at a non-HTML file.",
|
|
618
|
+
next_actions: [
|
|
619
|
+
"Check that the extensionless route is meant to serve that content type.",
|
|
620
|
+
"Prefer extensionless static route targets for HTML pages.",
|
|
621
|
+
],
|
|
622
|
+
},
|
|
623
|
+
STATIC_ALIAS_TABLE_NEAR_LIMIT: {
|
|
624
|
+
hint: "Static route targets count toward the route table limit.",
|
|
625
|
+
next_actions: [
|
|
626
|
+
"Consolidate manual static route targets where possible.",
|
|
627
|
+
"Avoid one route entry per page for large sites until framework-scale Web Output support exists.",
|
|
628
|
+
],
|
|
629
|
+
},
|
|
551
630
|
};
|
|
552
631
|
|
|
553
632
|
function routeWarningGuidance(warnings, code) {
|
|
@@ -783,6 +862,131 @@ async function releaseDiffCmd(args) {
|
|
|
783
862
|
}
|
|
784
863
|
}
|
|
785
864
|
|
|
865
|
+
async function diagnoseCmd(args) {
|
|
866
|
+
const opts = { project: null, url: null, method: "GET" };
|
|
867
|
+
for (let i = 0; i < args.length; i++) {
|
|
868
|
+
const arg = args[i];
|
|
869
|
+
if (arg === "--help" || arg === "-h") { console.log(DIAGNOSE_HELP); process.exit(0); }
|
|
870
|
+
if (arg === "--project" && args[i + 1]) { opts.project = args[++i]; continue; }
|
|
871
|
+
if (arg === "--method" && args[i + 1]) { opts.method = args[++i]; continue; }
|
|
872
|
+
if (arg?.startsWith("--project=")) { opts.project = arg.slice("--project=".length); continue; }
|
|
873
|
+
if (arg?.startsWith("--method=")) { opts.method = arg.slice("--method=".length); continue; }
|
|
874
|
+
if (arg?.startsWith("-")) {
|
|
875
|
+
fail({ code: "BAD_USAGE", message: `Unknown flag for deploy diagnose: ${arg}`, details: { flag: arg } });
|
|
876
|
+
}
|
|
877
|
+
if (!opts.url) {
|
|
878
|
+
opts.url = arg;
|
|
879
|
+
continue;
|
|
880
|
+
}
|
|
881
|
+
fail({
|
|
882
|
+
code: "BAD_USAGE",
|
|
883
|
+
message: "deploy diagnose accepts exactly one URL argument.",
|
|
884
|
+
hint: "run402 deploy diagnose --project prj_... https://example.com/path --method GET",
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
if (!opts.url) {
|
|
888
|
+
fail({
|
|
889
|
+
code: "BAD_USAGE",
|
|
890
|
+
message: "Missing <url>.",
|
|
891
|
+
hint: "run402 deploy diagnose --project prj_... https://example.com/path --method GET",
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
const project = resolveProjectId(opts.project);
|
|
896
|
+
await printResolveEnvelope({ project, url: opts.url, method: opts.method });
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
async function resolveCmd(args) {
|
|
900
|
+
const opts = { project: null, url: null, host: null, path: null, method: "GET" };
|
|
901
|
+
for (let i = 0; i < args.length; i++) {
|
|
902
|
+
const arg = args[i];
|
|
903
|
+
if (arg === "--help" || arg === "-h") { console.log(RESOLVE_HELP); process.exit(0); }
|
|
904
|
+
if (arg === "--project" && args[i + 1]) { opts.project = args[++i]; continue; }
|
|
905
|
+
if (arg === "--url" && args[i + 1]) { opts.url = args[++i]; continue; }
|
|
906
|
+
if (arg === "--host" && args[i + 1]) { opts.host = args[++i]; continue; }
|
|
907
|
+
if (arg === "--path" && args[i + 1]) { opts.path = args[++i]; continue; }
|
|
908
|
+
if (arg === "--method" && args[i + 1]) { opts.method = args[++i]; continue; }
|
|
909
|
+
if (arg?.startsWith("--project=")) { opts.project = arg.slice("--project=".length); continue; }
|
|
910
|
+
if (arg?.startsWith("--url=")) { opts.url = arg.slice("--url=".length); continue; }
|
|
911
|
+
if (arg?.startsWith("--host=")) { opts.host = arg.slice("--host=".length); continue; }
|
|
912
|
+
if (arg?.startsWith("--path=")) { opts.path = arg.slice("--path=".length); continue; }
|
|
913
|
+
if (arg?.startsWith("--method=")) { opts.method = arg.slice("--method=".length); continue; }
|
|
914
|
+
fail({ code: "BAD_USAGE", message: `Unknown argument for deploy resolve: ${arg}`, details: { argument: arg } });
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
if (opts.url && (opts.host || opts.path)) {
|
|
918
|
+
fail({
|
|
919
|
+
code: "BAD_USAGE",
|
|
920
|
+
message: "Do not combine --url with --host or --path.",
|
|
921
|
+
details: { url: Boolean(opts.url), host: Boolean(opts.host), path: Boolean(opts.path) },
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
if (!opts.url && !opts.host) {
|
|
925
|
+
fail({
|
|
926
|
+
code: "BAD_USAGE",
|
|
927
|
+
message: "Missing resolve input. Pass --url <url> or --host <host> [--path /x].",
|
|
928
|
+
hint: "run402 deploy resolve --project prj_... --url https://example.com/",
|
|
929
|
+
});
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
const project = resolveProjectId(opts.project);
|
|
933
|
+
const input = opts.url
|
|
934
|
+
? { project, url: opts.url, method: opts.method }
|
|
935
|
+
: {
|
|
936
|
+
project,
|
|
937
|
+
host: opts.host,
|
|
938
|
+
...(opts.path !== null ? { path: opts.path } : {}),
|
|
939
|
+
method: opts.method,
|
|
940
|
+
};
|
|
941
|
+
await printResolveEnvelope(input);
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
async function printResolveEnvelope(input) {
|
|
945
|
+
let request;
|
|
946
|
+
try {
|
|
947
|
+
request = normalizeDeployResolveRequest(input);
|
|
948
|
+
} catch (err) {
|
|
949
|
+
fail({
|
|
950
|
+
code: "BAD_USAGE",
|
|
951
|
+
message: err?.message || String(err),
|
|
952
|
+
details: { input: redactResolveInput(input) },
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
try {
|
|
957
|
+
const resolution = await getSdk().deploy.resolve(input);
|
|
958
|
+
const summary = buildDeployResolveSummary(resolution, request);
|
|
959
|
+
console.log(JSON.stringify({
|
|
960
|
+
status: "ok",
|
|
961
|
+
would_serve: summary.would_serve,
|
|
962
|
+
diagnostic_status: summary.diagnostic_status,
|
|
963
|
+
match: summary.match,
|
|
964
|
+
summary: summary.summary,
|
|
965
|
+
request,
|
|
966
|
+
warnings: summary.warnings,
|
|
967
|
+
resolution,
|
|
968
|
+
next_steps: summary.next_steps,
|
|
969
|
+
}, null, 2));
|
|
970
|
+
} catch (err) {
|
|
971
|
+
reportSdkError(err);
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
function redactResolveInput(input) {
|
|
976
|
+
const copy = { ...input };
|
|
977
|
+
if (copy.url) {
|
|
978
|
+
try {
|
|
979
|
+
const url = new URL(copy.url);
|
|
980
|
+
url.username = "";
|
|
981
|
+
url.password = "";
|
|
982
|
+
copy.url = url.toString();
|
|
983
|
+
} catch {
|
|
984
|
+
copy.url = String(copy.url).replace(/\/\/[^/@]+@/, "//<redacted>@");
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
return copy;
|
|
988
|
+
}
|
|
989
|
+
|
|
786
990
|
function parsePositiveInt(value, flag) {
|
|
787
991
|
const parsed = Number(value);
|
|
788
992
|
if (!Number.isInteger(parsed) || parsed < 1) {
|
package/lib/deploy.mjs
CHANGED
|
@@ -22,6 +22,8 @@ Subcommands (recommended for new manifests):
|
|
|
22
22
|
run402 deploy resume <operation_id> resume a stuck operation
|
|
23
23
|
run402 deploy list [--project <id>] list recent deploy operations
|
|
24
24
|
run402 deploy events <operation_id> fetch event stream for an operation
|
|
25
|
+
run402 deploy diagnose <url> diagnose public URL routing
|
|
26
|
+
run402 deploy resolve --url <url> low-level resolve diagnostics
|
|
25
27
|
run402 deploy release ... inspect release inventory and diffs
|
|
26
28
|
|
|
27
29
|
Manifest format (JSON, v2 ReleaseSpec — recommended):
|
|
@@ -305,6 +307,8 @@ export async function run(args) {
|
|
|
305
307
|
// run402 deploy resume <op> → resume an activation_pending operation
|
|
306
308
|
// run402 deploy list → list recent deploy operations
|
|
307
309
|
// run402 deploy events <op> → fetch recorded event stream for an operation
|
|
310
|
+
// run402 deploy diagnose ... → URL-first public diagnostics
|
|
311
|
+
// run402 deploy resolve ... → lower-level resolve endpoint parity
|
|
308
312
|
// run402 deploy release ... → release inventory/diff observability
|
|
309
313
|
// run402 deploy --manifest … → legacy bundle deploy (routes through v2)
|
|
310
314
|
const sub = args[0];
|
|
@@ -313,6 +317,8 @@ export async function run(args) {
|
|
|
313
317
|
case "resume":
|
|
314
318
|
case "list":
|
|
315
319
|
case "events":
|
|
320
|
+
case "diagnose":
|
|
321
|
+
case "resolve":
|
|
316
322
|
case "release": {
|
|
317
323
|
const { runDeployV2 } = await import("./deploy-v2.mjs");
|
|
318
324
|
await runDeployV2(sub, args.slice(1));
|
package/package.json
CHANGED
package/sdk/dist/index.d.ts
CHANGED
|
@@ -127,7 +127,7 @@ export type * from "./kernel.js";
|
|
|
127
127
|
export { CI_SESSION_CREDENTIALS, createCiSessionCredentials, githubActionsCredentials, isCiSessionCredentials, } from "./ci-credentials.js";
|
|
128
128
|
export type * from "./ci-credentials.js";
|
|
129
129
|
export { Deploy } from "./namespaces/deploy.js";
|
|
130
|
-
export { ROUTE_HTTP_METHODS } from "./namespaces/deploy.types.js";
|
|
130
|
+
export { EMPTY_STATIC_MANIFEST_METADATA, ROUTE_HTTP_METHODS, buildDeployResolveSummary, isDeployResolveRouteHit, isDeployResolveStaticHit, normalizeDeployResolveRequest, normalizeStaticManifestMetadata, } from "./namespaces/deploy.types.js";
|
|
131
131
|
export { Ci, CI_AUDIENCE, CI_GITHUB_ACTIONS_ISSUER, CI_GITHUB_ACTIONS_PROVIDER, DEFAULT_CI_DELEGATION_CHAIN_ID, V1_CI_ALLOWED_ACTIONS, V1_CI_ALLOWED_EVENTS_DEFAULT, assertCiDeployableSpec, buildCiDelegationResourceUri, buildCiDelegationStatement, normalizeCiRouteScopes, normalizeCiDelegationValues, validateCiNonce, validateCiRouteScope, validateCiSubjectMatch, } from "./namespaces/ci.js";
|
|
132
132
|
export { ScopedRun402 } from "./scoped.js";
|
|
133
133
|
export type * from "./namespaces/admin.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,k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sB,CAAC;AAC1C,mBAAmB,yBAAyB,CAAC;AAC7C,mBAAmB,6BAA6B,CAAC;AACjD,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,2BAA2B,CAAC;AAC/C,mBAAmB,8BAA8B,CAAC;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,mBAAmB,yBAAyB,CAAC;AAC7C,mBAAmB,uBAAuB,CAAC;AAC3C,mBAAmB,iCAAiC,CAAC;AACrD,mBAAmB,gCAAgC,CAAC;AACpD,mBAAmB,yBAAyB,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
|
@@ -176,7 +176,7 @@ export { Run402Error, PaymentRequired, ProjectNotFound, Unauthorized, ApiError,
|
|
|
176
176
|
export { withRetry } from "./retry.js";
|
|
177
177
|
export { CI_SESSION_CREDENTIALS, createCiSessionCredentials, githubActionsCredentials, isCiSessionCredentials, } from "./ci-credentials.js";
|
|
178
178
|
export { Deploy } from "./namespaces/deploy.js";
|
|
179
|
-
export { ROUTE_HTTP_METHODS } from "./namespaces/deploy.types.js";
|
|
179
|
+
export { EMPTY_STATIC_MANIFEST_METADATA, ROUTE_HTTP_METHODS, buildDeployResolveSummary, isDeployResolveRouteHit, isDeployResolveStaticHit, normalizeDeployResolveRequest, normalizeStaticManifestMetadata, } from "./namespaces/deploy.types.js";
|
|
180
180
|
export { Ci, CI_AUDIENCE, CI_GITHUB_ACTIONS_ISSUER, CI_GITHUB_ACTIONS_PROVIDER, DEFAULT_CI_DELEGATION_CHAIN_ID, V1_CI_ALLOWED_ACTIONS, V1_CI_ALLOWED_EVENTS_DEFAULT, assertCiDeployableSpec, buildCiDelegationResourceUri, buildCiDelegationStatement, normalizeCiRouteScopes, normalizeCiDelegationValues, validateCiNonce, validateCiRouteScope, validateCiSubjectMatch, } from "./namespaces/ci.js";
|
|
181
181
|
export { ScopedRun402 } from "./scoped.js";
|
|
182
182
|
//# sourceMappingURL=index.js.map
|
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,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,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,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,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AAY,EACZ,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,sBAAsB,GACvB,MAAM,aAAa,CAAC;AAMrB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIvC,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;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,GAChC,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"}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* behavior; this file is the implementation.
|
|
20
20
|
*/
|
|
21
21
|
import type { Client } from "../kernel.js";
|
|
22
|
-
import type { ApplyOptions, ActiveReleaseInventory, DeployEvent, DeployEventsResponse, DeployListResponse, DeployOperation, DeployResult, OperationSnapshot, PlanResponse, ReleaseDiffOptions, ReleaseInventory, ReleaseInventoryByIdOptions, ReleaseInventoryOptions, ReleaseSpec, ReleaseToReleaseDiff, StartOptions } from "./deploy.types.js";
|
|
22
|
+
import type { ApplyOptions, ActiveReleaseInventory, DeployEvent, DeployEventsResponse, DeployListResponse, DeployOperation, DeployResult, DeployResolveOptions, DeployResolveResponse, OperationSnapshot, PlanResponse, ReleaseDiffOptions, ReleaseInventory, ReleaseInventoryByIdOptions, ReleaseInventoryOptions, ReleaseSpec, ReleaseToReleaseDiff, StartOptions } from "./deploy.types.js";
|
|
23
23
|
export declare class Deploy {
|
|
24
24
|
private readonly client;
|
|
25
25
|
constructor(client: Client);
|
|
@@ -147,6 +147,12 @@ export declare class Deploy {
|
|
|
147
147
|
diff(opts: Omit<ReleaseDiffOptions, "project"> & {
|
|
148
148
|
project?: string;
|
|
149
149
|
}): Promise<ReleaseToReleaseDiff>;
|
|
150
|
+
/**
|
|
151
|
+
* Diagnose how a stable public URL or host/path would resolve against the
|
|
152
|
+
* current live release. This is an authenticated read: `project` is used
|
|
153
|
+
* only for local apikey lookup and is not sent to the gateway.
|
|
154
|
+
*/
|
|
155
|
+
resolve(opts: DeployResolveOptions): Promise<DeployResolveResponse>;
|
|
150
156
|
}
|
|
151
157
|
/**
|
|
152
158
|
* A deferred byte reader: returns the bytes when called. The `label` is a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/namespaces/deploy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/namespaces/deploy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAiB3C,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EAKtB,WAAW,EACX,oBAAoB,EAEpB,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EAWrB,iBAAiB,EAGjB,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,2BAA2B,EAC3B,uBAAuB,EACvB,WAAW,EACX,oBAAoB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C,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAW1E;AAmwBD;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { isCiSessionCredentials } from "../ci-credentials.js";
|
|
22
22
|
import { assertCiDeployableSpec } from "./ci.js";
|
|
23
|
-
import { ROUTE_HTTP_METHODS } from "./deploy.types.js";
|
|
23
|
+
import { ROUTE_HTTP_METHODS, normalizeDeployResolveRequest, } from "./deploy.types.js";
|
|
24
24
|
import { ApiError, LocalError, NetworkError, PaymentRequired, Run402DeployError, Unauthorized, } from "../errors.js";
|
|
25
25
|
// ─── Constants ───────────────────────────────────────────────────────────────
|
|
26
26
|
const PLAN_BODY_LIMIT_BYTES = 5 * 1024 * 1024;
|
|
@@ -262,6 +262,21 @@ export class Deploy {
|
|
|
262
262
|
qs.set("limit", String(opts.limit));
|
|
263
263
|
return this.client.request(`/deploy/v2/releases/diff?${qs.toString()}`, { headers, context: "diffing releases" });
|
|
264
264
|
}
|
|
265
|
+
/**
|
|
266
|
+
* Diagnose how a stable public URL or host/path would resolve against the
|
|
267
|
+
* current live release. This is an authenticated read: `project` is used
|
|
268
|
+
* only for local apikey lookup and is not sent to the gateway.
|
|
269
|
+
*/
|
|
270
|
+
async resolve(opts) {
|
|
271
|
+
const request = normalizeDeployResolveRequest(opts);
|
|
272
|
+
const headers = await apikeyHeaders(this.client, request.project);
|
|
273
|
+
const qs = new URLSearchParams({ host: request.host });
|
|
274
|
+
if ("url" in opts || opts.path !== undefined)
|
|
275
|
+
qs.set("path", request.path);
|
|
276
|
+
if (request.method)
|
|
277
|
+
qs.set("method", request.method);
|
|
278
|
+
return this.client.request(`/deploy/v2/resolve?${qs.toString()}`, { headers, context: "resolving deploy public URL" });
|
|
279
|
+
}
|
|
265
280
|
}
|
|
266
281
|
function appendQuery(path, params) {
|
|
267
282
|
const qs = new URLSearchParams();
|
|
@@ -913,7 +928,8 @@ const SITE_PATCH_FIELDS = new Set(["put", "delete"]);
|
|
|
913
928
|
const SUBDOMAINS_SPEC_FIELDS = new Set(["set", "add", "remove"]);
|
|
914
929
|
const ROUTES_SPEC_FIELDS = new Set(["replace"]);
|
|
915
930
|
const ROUTE_ENTRY_FIELDS = new Set(["pattern", "methods", "target"]);
|
|
916
|
-
const
|
|
931
|
+
const FUNCTION_ROUTE_TARGET_FIELDS = new Set(["type", "name"]);
|
|
932
|
+
const STATIC_ROUTE_TARGET_FIELDS = new Set(["type", "file"]);
|
|
917
933
|
const ROUTE_METHOD_SET = new Set(ROUTE_HTTP_METHODS);
|
|
918
934
|
function validateSpec(spec) {
|
|
919
935
|
if (!spec || typeof spec !== "object") {
|
|
@@ -1079,7 +1095,7 @@ function validateRoutesSpec(routes) {
|
|
|
1079
1095
|
}
|
|
1080
1096
|
validateKnownFields(obj, "routes", ROUTES_SPEC_FIELDS, routeShapeHints(obj));
|
|
1081
1097
|
if (!hasOwn(obj, "replace")) {
|
|
1082
|
-
throw invalidRouteSpec("ReleaseSpec.routes must be null or { replace: [{ pattern, target: { type: \"function\", name } }] }. Path-keyed route maps are not supported.", "routes");
|
|
1098
|
+
throw invalidRouteSpec("ReleaseSpec.routes must be null or { replace: [{ pattern, target: { type: \"function\", name } | { type: \"static\", file } }] }. Path-keyed route maps are not supported.", "routes");
|
|
1083
1099
|
}
|
|
1084
1100
|
if (!Array.isArray(obj.replace)) {
|
|
1085
1101
|
throw invalidRouteSpec("ReleaseSpec.routes.replace must be an array of route entries", "routes.replace");
|
|
@@ -1092,7 +1108,7 @@ function routeShapeHints(obj) {
|
|
|
1092
1108
|
const hints = {};
|
|
1093
1109
|
for (const key of Object.keys(obj)) {
|
|
1094
1110
|
if (key.startsWith("/")) {
|
|
1095
|
-
hints[key] = "Use `routes.replace[]` entries like `{ pattern, target: { type: \"function\", name } }` instead of a path-keyed route map.";
|
|
1111
|
+
hints[key] = "Use `routes.replace[]` entries like `{ pattern, target: { type: \"function\", name } }` or `{ pattern, methods: [\"GET\"], target: { type: \"static\", file } }` instead of a path-keyed route map.";
|
|
1096
1112
|
}
|
|
1097
1113
|
}
|
|
1098
1114
|
return hints;
|
|
@@ -1115,23 +1131,70 @@ function validateRouteEntry(route, resource) {
|
|
|
1115
1131
|
throw invalidRouteSpec(`Unsupported route method ${JSON.stringify(method)} at ReleaseSpec.${resource}.methods. Supported methods: ${ROUTE_HTTP_METHODS.join(", ")}`, `${resource}.methods`);
|
|
1116
1132
|
}
|
|
1117
1133
|
}
|
|
1134
|
+
const seen = new Set();
|
|
1135
|
+
for (const method of entry.methods) {
|
|
1136
|
+
const methodString = method;
|
|
1137
|
+
if (seen.has(methodString)) {
|
|
1138
|
+
throw invalidRouteSpec(`ReleaseSpec.${resource}.methods contains duplicate method ${JSON.stringify(method)}`, `${resource}.methods`);
|
|
1139
|
+
}
|
|
1140
|
+
seen.add(methodString);
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
const targetType = validateRouteTarget(entry.target, `${resource}.target`);
|
|
1144
|
+
if (targetType === "static") {
|
|
1145
|
+
validateStaticRouteEntry(entry, resource);
|
|
1118
1146
|
}
|
|
1119
|
-
validateRouteTarget(entry.target, `${resource}.target`);
|
|
1120
1147
|
}
|
|
1121
1148
|
function validateRouteTarget(target, resource) {
|
|
1122
1149
|
const obj = requireObject(target, resource);
|
|
1123
|
-
if (hasOwn(obj, "function") && !hasOwn(obj, "type")) {
|
|
1124
|
-
throw invalidRouteSpec(`ReleaseSpec.${resource} uses an unsupported target shorthand. Use { type: "function", name: "api" }.`, resource);
|
|
1150
|
+
if ((hasOwn(obj, "function") || hasOwn(obj, "static")) && !hasOwn(obj, "type")) {
|
|
1151
|
+
throw invalidRouteSpec(`ReleaseSpec.${resource} uses an unsupported target shorthand. Use { type: "function", name: "api" } or { type: "static", file: "events.html" }.`, resource);
|
|
1125
1152
|
}
|
|
1126
|
-
validateKnownFields(obj, resource, ROUTE_TARGET_FIELDS);
|
|
1127
1153
|
if (obj.type === undefined) {
|
|
1128
|
-
throw invalidRouteSpec(`ReleaseSpec.${resource}.type is required; use "function"`, `${resource}.type`);
|
|
1154
|
+
throw invalidRouteSpec(`ReleaseSpec.${resource}.type is required; use "function" or "static"`, `${resource}.type`);
|
|
1129
1155
|
}
|
|
1130
|
-
if (obj.type
|
|
1131
|
-
|
|
1156
|
+
if (obj.type === "function") {
|
|
1157
|
+
validateKnownFields(obj, resource, FUNCTION_ROUTE_TARGET_FIELDS);
|
|
1158
|
+
if (typeof obj.name !== "string" || obj.name.length === 0) {
|
|
1159
|
+
throw invalidRouteSpec(`ReleaseSpec.${resource}.name is required for function route targets`, `${resource}.name`);
|
|
1160
|
+
}
|
|
1161
|
+
return "function";
|
|
1132
1162
|
}
|
|
1133
|
-
if (
|
|
1134
|
-
|
|
1163
|
+
if (obj.type === "static") {
|
|
1164
|
+
validateKnownFields(obj, resource, STATIC_ROUTE_TARGET_FIELDS);
|
|
1165
|
+
if (typeof obj.file !== "string" || obj.file.length === 0) {
|
|
1166
|
+
throw invalidRouteSpec(`ReleaseSpec.${resource}.file is required for static route targets`, `${resource}.file`);
|
|
1167
|
+
}
|
|
1168
|
+
validateStaticTargetFile(obj.file, `${resource}.file`);
|
|
1169
|
+
return "static";
|
|
1170
|
+
}
|
|
1171
|
+
throw invalidRouteSpec(`Unsupported route target type ${JSON.stringify(obj.type)} at ReleaseSpec.${resource}.type; route targets support "function" and "static"`, `${resource}.type`);
|
|
1172
|
+
}
|
|
1173
|
+
function validateStaticRouteEntry(entry, resource) {
|
|
1174
|
+
const pattern = entry.pattern;
|
|
1175
|
+
if (pattern.includes("*")) {
|
|
1176
|
+
throw invalidRouteSpec(`ReleaseSpec.${resource}.pattern uses a static route target, so it must be an exact path pattern (wildcard patterns such as /docs/* are not supported for static targets)`, `${resource}.pattern`);
|
|
1177
|
+
}
|
|
1178
|
+
if (entry.methods === undefined) {
|
|
1179
|
+
throw invalidRouteSpec(`ReleaseSpec.${resource}.methods is required for static route targets; use ["GET"] or ["GET", "HEAD"]`, `${resource}.methods`);
|
|
1180
|
+
}
|
|
1181
|
+
const methods = entry.methods;
|
|
1182
|
+
const methodSet = new Set(methods);
|
|
1183
|
+
const valid = methodSet.has("GET") &&
|
|
1184
|
+
(methodSet.size === 1 || (methodSet.size === 2 && methodSet.has("HEAD")));
|
|
1185
|
+
if (!valid) {
|
|
1186
|
+
throw invalidRouteSpec(`ReleaseSpec.${resource}.methods for static route targets must be ["GET"] or ["GET", "HEAD"]; either form materializes effective GET plus HEAD`, `${resource}.methods`);
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
function validateStaticTargetFile(file, resource) {
|
|
1190
|
+
const invalid = file.startsWith("/") ||
|
|
1191
|
+
file.includes("?") ||
|
|
1192
|
+
file.includes("#") ||
|
|
1193
|
+
file.includes("\\") ||
|
|
1194
|
+
file.endsWith("/") ||
|
|
1195
|
+
file.split("/").some((segment) => segment === "" || segment === "." || segment === "..");
|
|
1196
|
+
if (invalid) {
|
|
1197
|
+
throw invalidRouteSpec(`ReleaseSpec.${resource} must be a relative materialized static-site file path without leading slash, query, fragment, traversal, empty segments, backslashes, or directory shorthand`, resource);
|
|
1135
1198
|
}
|
|
1136
1199
|
}
|
|
1137
1200
|
function validateChecksSpec(checks) {
|
|
@@ -1246,6 +1309,11 @@ function invalidRouteSpec(message, resource) {
|
|
|
1246
1309
|
pattern: "/api/*",
|
|
1247
1310
|
target: { type: "function", name: "api" },
|
|
1248
1311
|
},
|
|
1312
|
+
{
|
|
1313
|
+
pattern: "/events",
|
|
1314
|
+
methods: ["GET", "HEAD"],
|
|
1315
|
+
target: { type: "static", file: "events.html" },
|
|
1316
|
+
},
|
|
1249
1317
|
],
|
|
1250
1318
|
},
|
|
1251
1319
|
},
|
|
@@ -1267,6 +1335,7 @@ function normalizePlanResponse(plan) {
|
|
|
1267
1335
|
secrets: raw.secrets,
|
|
1268
1336
|
subdomains: raw.subdomains,
|
|
1269
1337
|
routes: raw.routes,
|
|
1338
|
+
static_assets: raw.static_assets,
|
|
1270
1339
|
};
|
|
1271
1340
|
return {
|
|
1272
1341
|
...plan,
|