@supacloud/cli 0.64.4 → 0.65.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/dist/index.js +444 -38
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -206650,7 +206650,7 @@ function resolveSupaCloudContext(env = process.env, cwd = process.cwd(), selecti
|
|
|
206650
206650
|
var ACTION_POLICY = {
|
|
206651
206651
|
deploy: { write: ["deploy"] },
|
|
206652
206652
|
applications: {
|
|
206653
|
-
read: ["list_releases", "get_release", "get_runtime", "get_configuration"],
|
|
206653
|
+
read: ["list_releases", "get_release", "get_runtime", "get_deployment_evidence", "get_configuration"],
|
|
206654
206654
|
write: ["upload_release", "put_configuration", "activate_release", "reconcile_activation", "retire_activation"]
|
|
206655
206655
|
},
|
|
206656
206656
|
project: {
|
|
@@ -213741,6 +213741,131 @@ var ApplicationActivationRetirementResultSchema = _Object_2({
|
|
|
213741
213741
|
activation_id: ApplicationActivationIdSchema,
|
|
213742
213742
|
retired_at: String3()
|
|
213743
213743
|
}, { additionalProperties: false });
|
|
213744
|
+
// node_modules/@supacloud/delivery/src/deployment-evidence.ts
|
|
213745
|
+
var closed3 = { additionalProperties: false };
|
|
213746
|
+
var sha256 = String3({ pattern: "^[a-f0-9]{64}$" });
|
|
213747
|
+
var isoDate = String3({ minLength: 20, maxLength: 40 });
|
|
213748
|
+
var status = Union3([
|
|
213749
|
+
Literal2("confirmed"),
|
|
213750
|
+
Literal2("failed"),
|
|
213751
|
+
Literal2("unknown")
|
|
213752
|
+
]);
|
|
213753
|
+
var evidenceStatus = Union3([
|
|
213754
|
+
Literal2("confirmed"),
|
|
213755
|
+
Literal2("failed"),
|
|
213756
|
+
Literal2("unknown"),
|
|
213757
|
+
Literal2("incomplete")
|
|
213758
|
+
]);
|
|
213759
|
+
var DEPLOYMENT_EVIDENCE_SCHEMA = "supacloud.deployment-evidence.v1";
|
|
213760
|
+
var DatabaseProviderSchema = _Object_2({
|
|
213761
|
+
provider: String3({ minLength: 1, maxLength: 64, pattern: "^[a-z][a-z0-9_.-]*$" }),
|
|
213762
|
+
version: String3({ minLength: 1, maxLength: 64 }),
|
|
213763
|
+
topology: Union3([Literal2("single-node"), Literal2("distributed")]),
|
|
213764
|
+
migration: _Object_2({
|
|
213765
|
+
status,
|
|
213766
|
+
inventory_sha256: Union3([sha256, Null2()]),
|
|
213767
|
+
compatibility: Union3([
|
|
213768
|
+
Literal2("verified"),
|
|
213769
|
+
Literal2("not-proven"),
|
|
213770
|
+
Literal2("failed")
|
|
213771
|
+
])
|
|
213772
|
+
}, closed3),
|
|
213773
|
+
backup: _Object_2({
|
|
213774
|
+
status,
|
|
213775
|
+
latest_success_at: Union3([isoDate, Null2()]),
|
|
213776
|
+
freshness_seconds: Union3([Integer2({ minimum: 0 }), Null2()])
|
|
213777
|
+
}, closed3),
|
|
213778
|
+
recovery: _Object_2({
|
|
213779
|
+
status,
|
|
213780
|
+
drill_id: Union3([String3({ minLength: 1, maxLength: 128 }), Null2()]),
|
|
213781
|
+
rpo_seconds: Union3([Integer2({ minimum: 0 }), Null2()]),
|
|
213782
|
+
rto_seconds: Union3([Integer2({ minimum: 0 }), Null2()])
|
|
213783
|
+
}, closed3)
|
|
213784
|
+
}, closed3);
|
|
213785
|
+
var componentName = Union3([
|
|
213786
|
+
Literal2("management-api"),
|
|
213787
|
+
Literal2("web-console"),
|
|
213788
|
+
Literal2("edge-runtime"),
|
|
213789
|
+
Literal2("worker"),
|
|
213790
|
+
Literal2("postgres"),
|
|
213791
|
+
Literal2("postgrest"),
|
|
213792
|
+
Literal2("gotrue"),
|
|
213793
|
+
Literal2("storage"),
|
|
213794
|
+
Literal2("realtime")
|
|
213795
|
+
]);
|
|
213796
|
+
var DeploymentComponentEvidenceSchema = _Object_2({
|
|
213797
|
+
name: componentName,
|
|
213798
|
+
version: Union3([String3({ minLength: 1, maxLength: 128 }), Null2()]),
|
|
213799
|
+
status,
|
|
213800
|
+
health_check: Union3([String3({ minLength: 1, maxLength: 256 }), Null2()]),
|
|
213801
|
+
checked_at: Union3([isoDate, Null2()])
|
|
213802
|
+
}, closed3);
|
|
213803
|
+
var DeploymentEvidenceSchema = _Object_2({
|
|
213804
|
+
schema: Literal2(DEPLOYMENT_EVIDENCE_SCHEMA),
|
|
213805
|
+
status: evidenceStatus,
|
|
213806
|
+
recorded_at: isoDate,
|
|
213807
|
+
scope: _Object_2({
|
|
213808
|
+
project_ref: String3({ pattern: "^[a-z0-9-]{1,20}$" }),
|
|
213809
|
+
application_id: ApplicationIdSchema,
|
|
213810
|
+
environment_id: ApplicationIdSchema
|
|
213811
|
+
}, closed3),
|
|
213812
|
+
source: _Object_2({
|
|
213813
|
+
commit_sha: Union3([String3({ pattern: "^[0-9a-f]{7,64}$" }), Null2()]),
|
|
213814
|
+
manifest_sha256: sha256,
|
|
213815
|
+
contract_schema: Union3([String3({ minLength: 1, maxLength: 128 }), Null2()]),
|
|
213816
|
+
environment_binding_version: Union3([sha256, Null2()])
|
|
213817
|
+
}, closed3),
|
|
213818
|
+
database: DatabaseProviderSchema,
|
|
213819
|
+
components: _Array_(DeploymentComponentEvidenceSchema, { minItems: 1, maxItems: 32 }),
|
|
213820
|
+
activation: _Object_2({
|
|
213821
|
+
release_id: ApplicationReleaseIdSchema,
|
|
213822
|
+
configuration_id: ApplicationConfigurationIdSchema,
|
|
213823
|
+
activation_id: ApplicationConfigurationIdSchema
|
|
213824
|
+
}, closed3),
|
|
213825
|
+
health: _Object_2({
|
|
213826
|
+
status,
|
|
213827
|
+
checked_at: Union3([isoDate, Null2()]),
|
|
213828
|
+
authenticated_smoke: status
|
|
213829
|
+
}, closed3),
|
|
213830
|
+
rollback: _Object_2({
|
|
213831
|
+
release_id: Union3([ApplicationReleaseIdSchema, Null2()]),
|
|
213832
|
+
configuration_id: Union3([ApplicationConfigurationIdSchema, Null2()]),
|
|
213833
|
+
status: Union3([Literal2("ready"), Literal2("not-ready"), Literal2("unknown")]),
|
|
213834
|
+
result: Union3([status, Null2()])
|
|
213835
|
+
}, closed3),
|
|
213836
|
+
notes: _Array_(String3({ minLength: 1, maxLength: 512 }), { maxItems: 32 })
|
|
213837
|
+
}, closed3);
|
|
213838
|
+
function isIsoDate(value) {
|
|
213839
|
+
return Number.isFinite(Date.parse(value)) && new Date(value).toISOString() === value;
|
|
213840
|
+
}
|
|
213841
|
+
function statusValues(evidence) {
|
|
213842
|
+
return [
|
|
213843
|
+
evidence.database.migration.status,
|
|
213844
|
+
evidence.database.backup.status,
|
|
213845
|
+
evidence.database.recovery.status,
|
|
213846
|
+
...evidence.components.map((component) => component.status),
|
|
213847
|
+
evidence.health.status,
|
|
213848
|
+
evidence.health.authenticated_smoke,
|
|
213849
|
+
...evidence.rollback.result === null ? [] : [evidence.rollback.result]
|
|
213850
|
+
];
|
|
213851
|
+
}
|
|
213852
|
+
function deriveDeploymentEvidenceStatus(evidence) {
|
|
213853
|
+
const values = statusValues({ ...evidence, status: "incomplete" });
|
|
213854
|
+
if (values.includes("failed"))
|
|
213855
|
+
return "failed";
|
|
213856
|
+
if (values.includes("unknown"))
|
|
213857
|
+
return "unknown";
|
|
213858
|
+
if (evidence.database.migration.compatibility !== "verified" || evidence.rollback.status !== "ready" || evidence.components.some((component) => component.health_check === null || component.checked_at === null) || evidence.health.checked_at === null || evidence.health.authenticated_smoke !== "confirmed" || evidence.database.recovery.status !== "confirmed" || evidence.database.recovery.drill_id === null || evidence.database.recovery.rpo_seconds === null || evidence.database.recovery.rto_seconds === null) {
|
|
213859
|
+
return "incomplete";
|
|
213860
|
+
}
|
|
213861
|
+
return "confirmed";
|
|
213862
|
+
}
|
|
213863
|
+
function parseDeploymentEvidence(value) {
|
|
213864
|
+
if (!Check3(DeploymentEvidenceSchema, value) || !isIsoDate(value.recorded_at) || value.health.checked_at !== null && !isIsoDate(value.health.checked_at) || value.database.backup.latest_success_at !== null && !isIsoDate(value.database.backup.latest_success_at) || value.components.some((component) => component.checked_at !== null && !isIsoDate(component.checked_at)) || new Set(value.components.map((component) => component.name)).size !== value.components.length || deriveDeploymentEvidenceStatus(value) !== value.status) {
|
|
213865
|
+
throw new Error("Invalid deployment evidence.");
|
|
213866
|
+
}
|
|
213867
|
+
return structuredClone(value);
|
|
213868
|
+
}
|
|
213744
213869
|
// node_modules/@supacloud/delivery/src/application-runtime-identity.ts
|
|
213745
213870
|
var ApplicationRuntimeIdentitySchema = _Object_2({
|
|
213746
213871
|
schema: Literal2("supacloud.application-runtime.v1"),
|
|
@@ -219174,6 +219299,7 @@ var APPLICATION_TOOL_SCHEMA = {
|
|
|
219174
219299
|
"get_release",
|
|
219175
219300
|
"upload_release",
|
|
219176
219301
|
"get_runtime",
|
|
219302
|
+
"get_deployment_evidence",
|
|
219177
219303
|
"get_configuration",
|
|
219178
219304
|
"put_configuration",
|
|
219179
219305
|
"activate_release",
|
|
@@ -219347,6 +219473,30 @@ function registerApplicationTools(server2, http) {
|
|
|
219347
219473
|
return releaseControlFailure(operation, "INVALID_RESPONSE", result.status);
|
|
219348
219474
|
}
|
|
219349
219475
|
}
|
|
219476
|
+
if (action === "get_deployment_evidence") {
|
|
219477
|
+
const environmentId = text(args, "environment_id");
|
|
219478
|
+
if (!Check(ApplicationIdSchema2, environmentId))
|
|
219479
|
+
throw new Error("Invalid environment ID");
|
|
219480
|
+
const result = await http.get(`/v1/projects/${project}/applications/${encodeURIComponent(id)}/environments/${encodeURIComponent(environmentId)}/deployment-evidence`, { maxJsonBytes: 262144, responseTimeoutMs: 30000 });
|
|
219481
|
+
if (!result.ok)
|
|
219482
|
+
return releaseControlFailure(operation, "HTTP_ERROR", result.status);
|
|
219483
|
+
try {
|
|
219484
|
+
const data = result.data;
|
|
219485
|
+
if (!data || typeof data !== "object" || !("project_ref" in data) || data.project_ref !== ref || !("application_id" in data) || data.application_id !== id || !("environment_id" in data) || data.environment_id !== environmentId || !("evidence" in data))
|
|
219486
|
+
throw new Error;
|
|
219487
|
+
const evidence = data.evidence === null ? null : parseDeploymentEvidence(data.evidence);
|
|
219488
|
+
if (evidence && (evidence.scope.project_ref !== ref || evidence.scope.application_id !== id || evidence.scope.environment_id !== environmentId))
|
|
219489
|
+
throw new Error;
|
|
219490
|
+
return releaseControlSuccess(operation, {
|
|
219491
|
+
project_ref: ref,
|
|
219492
|
+
application_id: id,
|
|
219493
|
+
environment_id: environmentId,
|
|
219494
|
+
evidence
|
|
219495
|
+
});
|
|
219496
|
+
} catch {
|
|
219497
|
+
return releaseControlFailure(operation, "INVALID_RESPONSE", result.status);
|
|
219498
|
+
}
|
|
219499
|
+
}
|
|
219350
219500
|
if (action === "list_releases") {
|
|
219351
219501
|
const limit = args.limit ?? 50;
|
|
219352
219502
|
if (typeof limit !== "number" || !Number.isInteger(limit) || limit < 1 || limit > 100 || args.cursor !== undefined && !Check(ApplicationReleaseIdSchema2, args.cursor)) {
|
|
@@ -229212,6 +229362,8 @@ function renderClient(graph, options) {
|
|
|
229212
229362
|
const schemaLocals = new Map;
|
|
229213
229363
|
const usedTypeNames = new Set;
|
|
229214
229364
|
const allRoutes = [];
|
|
229365
|
+
const allProcedures = [];
|
|
229366
|
+
const commandByClassName = new Map(graph.modules.flatMap((module) => module.commands.map((command) => [command.className, command])));
|
|
229215
229367
|
let usesStatic = false;
|
|
229216
229368
|
let usesValue = false;
|
|
229217
229369
|
const uniqueTypeName = (candidate) => {
|
|
@@ -229342,8 +229494,30 @@ function renderClient(graph, options) {
|
|
|
229342
229494
|
const responseSchemaEntries = hasResponseMap ? Object.entries(responseSchemas).map(([status, ref]) => [status, ref.local]) : responseSchema ? [["200", responseSchema.local]] : [];
|
|
229343
229495
|
const responseSchemaArgument = responseSchemaEntries.length > 0 ? `{ ${responseSchemaEntries.map(([status, local]) => `${JSON.stringify(status)}: ${local}`).join(", ")} }` : "undefined";
|
|
229344
229496
|
const responseKindArgument = responseKind === undefined ? "undefined" : JSON.stringify(responseKind);
|
|
229497
|
+
const command = route.command === undefined ? undefined : commandByClassName.get(route.command);
|
|
229498
|
+
const procedureKind = route.method === "GET" || route.method === "HEAD" ? "query" : "mutation";
|
|
229499
|
+
const idempotencyMode = command?.idempotency ?? "none";
|
|
229500
|
+
const procedureMetadata = {
|
|
229501
|
+
key: `${controller.className}.${route.handler}`,
|
|
229502
|
+
method: route.method,
|
|
229503
|
+
path: fullPath,
|
|
229504
|
+
controller: controller.className,
|
|
229505
|
+
handler: route.handler,
|
|
229506
|
+
kind: procedureKind,
|
|
229507
|
+
idempotency: idempotencyMode
|
|
229508
|
+
};
|
|
229509
|
+
allProcedures.push({
|
|
229510
|
+
method: route.method,
|
|
229511
|
+
path: fullPath,
|
|
229512
|
+
controller: controller.className,
|
|
229513
|
+
handler: route.handler,
|
|
229514
|
+
kind: procedureKind,
|
|
229515
|
+
...command?.name === undefined ? {} : { command: command.name },
|
|
229516
|
+
...command?.permission === undefined ? {} : { permission: command.permission },
|
|
229517
|
+
idempotency: idempotencyMode
|
|
229518
|
+
});
|
|
229345
229519
|
routeMethods.push(`
|
|
229346
|
-
${route.handler}: makeRoute<${requestTypeName}, ${responseType === "never" ? "never" : responseTypeName}>(${JSON.stringify(route.method)}, ${JSON.stringify(fullPath)}, ${responseSchemaArgument}, ${responseKindArgument}, ${route.parse === "none"}),`);
|
|
229520
|
+
${route.handler}: makeRoute<${requestTypeName}, ${responseType === "never" ? "never" : responseTypeName}, ${JSON.stringify(procedureKind)}, ${JSON.stringify(idempotencyMode)}>(${JSON.stringify(route.method)}, ${JSON.stringify(fullPath)}, ${responseSchemaArgument}, ${responseKindArgument}, ${route.parse === "none"}, ${JSON.stringify(procedureKind)}, ${JSON.stringify(idempotencyMode)}, ${JSON.stringify(procedureMetadata)}),`);
|
|
229347
229521
|
}
|
|
229348
229522
|
controllerEntries.push(`
|
|
229349
229523
|
${controllerKey}: {${routeMethods.join("")}
|
|
@@ -229374,6 +229548,66 @@ function renderClient(graph, options) {
|
|
|
229374
229548
|
"",
|
|
229375
229549
|
"export type ResponseDecoder<T> = (value: unknown) => T;",
|
|
229376
229550
|
"",
|
|
229551
|
+
'export type ProcedureKind = "query" | "mutation";',
|
|
229552
|
+
'export type IdempotencyMode = "required" | "none";',
|
|
229553
|
+
"",
|
|
229554
|
+
"export interface ProcedureMetadata<",
|
|
229555
|
+
" Kind extends ProcedureKind = ProcedureKind,",
|
|
229556
|
+
" Idempotency extends IdempotencyMode = IdempotencyMode,",
|
|
229557
|
+
"> {",
|
|
229558
|
+
" key: string;",
|
|
229559
|
+
" method: string;",
|
|
229560
|
+
" path: string;",
|
|
229561
|
+
" controller: string;",
|
|
229562
|
+
" handler: string;",
|
|
229563
|
+
" kind: Kind;",
|
|
229564
|
+
" idempotency: Idempotency;",
|
|
229565
|
+
"}",
|
|
229566
|
+
"",
|
|
229567
|
+
"export interface ProcedureExecutionOptions {",
|
|
229568
|
+
" /** Reuse the same key when retrying an uncertain mutation. */",
|
|
229569
|
+
" idempotencyKey?: string;",
|
|
229570
|
+
" signal?: AbortSignal;",
|
|
229571
|
+
"}",
|
|
229572
|
+
"",
|
|
229573
|
+
"export type RequiredProcedureExecutionOptions = ProcedureExecutionOptions & { idempotencyKey: string };",
|
|
229574
|
+
"",
|
|
229575
|
+
"type ProcedureResult<Result> = [Result] extends [never] ? unknown : Result;",
|
|
229576
|
+
"",
|
|
229577
|
+
"type ProcedureArgs<Options extends ClientRequestOptions, Idempotency extends IdempotencyMode> =",
|
|
229578
|
+
' Idempotency extends "required"',
|
|
229579
|
+
" ? {} extends Options",
|
|
229580
|
+
" ? [execution: RequiredProcedureExecutionOptions] | [input: Options, execution: RequiredProcedureExecutionOptions]",
|
|
229581
|
+
" : [input: Options, execution: RequiredProcedureExecutionOptions]",
|
|
229582
|
+
" : {} extends Options",
|
|
229583
|
+
" ? [input?: Options, execution?: ProcedureExecutionOptions]",
|
|
229584
|
+
" : [input: Options, execution?: ProcedureExecutionOptions];",
|
|
229585
|
+
"",
|
|
229586
|
+
"export type ProcedureCall<",
|
|
229587
|
+
" Options extends ClientRequestOptions = ClientRequestOptions,",
|
|
229588
|
+
" Result = never,",
|
|
229589
|
+
' Idempotency extends IdempotencyMode = "none",',
|
|
229590
|
+
"> = (...args: ProcedureArgs<Options, Idempotency>) => Promise<ProcedureResult<Result>>;",
|
|
229591
|
+
"",
|
|
229592
|
+
"export type QueryableProcedure<",
|
|
229593
|
+
" Options extends ClientRequestOptions,",
|
|
229594
|
+
" Result,",
|
|
229595
|
+
" Idempotency extends IdempotencyMode,",
|
|
229596
|
+
" Kind extends ProcedureKind,",
|
|
229597
|
+
"> = ProcedureCall<Options, Result, Idempotency> & {",
|
|
229598
|
+
" readonly __supacloudProcedure: ProcedureMetadata<Kind, Idempotency>;",
|
|
229599
|
+
" readonly __supacloudInput?: Options;",
|
|
229600
|
+
"};",
|
|
229601
|
+
"",
|
|
229602
|
+
"export type ProcedureMember<",
|
|
229603
|
+
" Options extends ClientRequestOptions,",
|
|
229604
|
+
" Result,",
|
|
229605
|
+
" Kind extends ProcedureKind,",
|
|
229606
|
+
" Idempotency extends IdempotencyMode,",
|
|
229607
|
+
'> = Kind extends "query"',
|
|
229608
|
+
' ? { query: QueryableProcedure<Options, Result, Idempotency, "query"> }',
|
|
229609
|
+
' : { mutate: QueryableProcedure<Options, Result, Idempotency, "mutation"> };',
|
|
229610
|
+
"",
|
|
229377
229611
|
'export type ApiClientErrorCode = "API_HTTP_ERROR" | "API_RESPONSE_INVALID" | "API_RESPONSE_UNDECLARED";',
|
|
229378
229612
|
"",
|
|
229379
229613
|
"export interface ApiClientErrorDetails {",
|
|
@@ -229417,6 +229651,17 @@ function renderClient(graph, options) {
|
|
|
229417
229651
|
" : { (options: Options): Promise<Result>; <T>(options: Options, decode: ResponseDecoder<T>): Promise<T> }",
|
|
229418
229652
|
") & ((...args: {} extends Options ? [options?: Options] : [options: Options]) => Promise<[Result] extends [never] ? unknown : Result>);",
|
|
229419
229653
|
"",
|
|
229654
|
+
"export interface ApiProcedureDefinition {",
|
|
229655
|
+
" method: string;",
|
|
229656
|
+
" path: string;",
|
|
229657
|
+
" controller: string;",
|
|
229658
|
+
" handler: string;",
|
|
229659
|
+
" kind: ProcedureKind;",
|
|
229660
|
+
" command?: string;",
|
|
229661
|
+
" permission?: string;",
|
|
229662
|
+
" idempotency: IdempotencyMode;",
|
|
229663
|
+
"}",
|
|
229664
|
+
"",
|
|
229420
229665
|
...routeTypes,
|
|
229421
229666
|
...routeTypes.length > 0 ? [""] : [],
|
|
229422
229667
|
"export interface HttpInterceptorRequest {",
|
|
@@ -229424,6 +229669,7 @@ function renderClient(graph, options) {
|
|
|
229424
229669
|
" url: string;",
|
|
229425
229670
|
" headers: Record<string, string>;",
|
|
229426
229671
|
" body?: unknown;",
|
|
229672
|
+
" signal?: AbortSignal;",
|
|
229427
229673
|
"}",
|
|
229428
229674
|
"",
|
|
229429
229675
|
"export type HttpInterceptorFn = (",
|
|
@@ -229442,6 +229688,8 @@ function renderClient(graph, options) {
|
|
|
229442
229688
|
"",
|
|
229443
229689
|
"export const API_ROUTES = " + JSON.stringify(allRoutes, null, 2) + " as const;",
|
|
229444
229690
|
"",
|
|
229691
|
+
"export const API_PROCEDURES: readonly ApiProcedureDefinition[] = " + JSON.stringify(allProcedures, null, 2) + ";",
|
|
229692
|
+
"",
|
|
229445
229693
|
"export type AppRoutePath = typeof API_ROUTES[number]['path'];",
|
|
229446
229694
|
"",
|
|
229447
229695
|
"export const API_SCHEMAS = [",
|
|
@@ -229667,6 +229915,7 @@ function renderClient(graph, options) {
|
|
|
229667
229915
|
` responseSchemas?: Readonly<Record<string, ${responseSchemaType}>>,`,
|
|
229668
229916
|
" responseKind?: string,",
|
|
229669
229917
|
" raw?: boolean,",
|
|
229918
|
+
" execution?: ProcedureExecutionOptions,",
|
|
229670
229919
|
" ): Promise<T>;",
|
|
229671
229920
|
" async function request<T>(",
|
|
229672
229921
|
" method: string,",
|
|
@@ -229676,6 +229925,7 @@ function renderClient(graph, options) {
|
|
|
229676
229925
|
` responseSchemas?: Readonly<Record<string, ${responseSchemaType}>>,`,
|
|
229677
229926
|
" responseKind?: string,",
|
|
229678
229927
|
" raw?: boolean,",
|
|
229928
|
+
" execution?: ProcedureExecutionOptions,",
|
|
229679
229929
|
" ): Promise<T | unknown>;",
|
|
229680
229930
|
" async function request(",
|
|
229681
229931
|
" method: string,",
|
|
@@ -229690,6 +229940,7 @@ function renderClient(graph, options) {
|
|
|
229690
229940
|
` responseSchemas?: Readonly<Record<string, ${responseSchemaType}>>,`,
|
|
229691
229941
|
" responseKind?: string,",
|
|
229692
229942
|
" raw = false,",
|
|
229943
|
+
" execution?: ProcedureExecutionOptions,",
|
|
229693
229944
|
" ): Promise<T | unknown> {",
|
|
229694
229945
|
" const url = `${baseUrl}${buildRouteUrl(path, options.params, options.query)}`;",
|
|
229695
229946
|
' const customHeaders = typeof config.headers === "function" ? await config.headers() : config.headers;',
|
|
@@ -229715,9 +229966,10 @@ function renderClient(graph, options) {
|
|
|
229715
229966
|
" headers: reqPayload.headers,",
|
|
229716
229967
|
" ...(reqPayload.body === undefined ? {} : { body: raw ? rawBody(reqPayload.body) : JSON.stringify(reqPayload.body) }),",
|
|
229717
229968
|
' ...(raw && reqPayload.body instanceof ReadableStream ? { duplex: "half" } : {}),',
|
|
229969
|
+
" ...(reqPayload.signal === undefined ? {} : { signal: reqPayload.signal }),",
|
|
229718
229970
|
" });",
|
|
229719
229971
|
" };",
|
|
229720
|
-
" const response = await executeChain(0, { method, url, headers, body: options.body });",
|
|
229972
|
+
" const response = await executeChain(0, { method, url, headers, body: options.body, ...(execution?.signal === undefined ? {} : { signal: execution.signal }) });",
|
|
229721
229973
|
" const declaredSchema = responseSchemas ? selectResponseSchema(response.status, responseSchemas) : undefined;",
|
|
229722
229974
|
" const failure = (code: ApiClientErrorCode, message: string) => new ApiClientError(message, {",
|
|
229723
229975
|
' code, method, path, status: response.status, requestId: response.headers.get("x-request-id"),',
|
|
@@ -229755,7 +230007,44 @@ function renderClient(graph, options) {
|
|
|
229755
230007
|
" return decode ? decode(checked) : checked;",
|
|
229756
230008
|
" }",
|
|
229757
230009
|
"",
|
|
229758
|
-
|
|
230010
|
+
" function hasHeader(headers: Record<string, string>, name: string): boolean {",
|
|
230011
|
+
" return Object.keys(headers).some((key) => key.toLowerCase() === name.toLowerCase());",
|
|
230012
|
+
" }",
|
|
230013
|
+
"",
|
|
230014
|
+
" function withProcedureExecution(",
|
|
230015
|
+
" options: ClientRequestOptions,",
|
|
230016
|
+
" execution: ProcedureExecutionOptions | undefined,",
|
|
230017
|
+
" idempotency: IdempotencyMode,",
|
|
230018
|
+
" ): ClientRequestOptions {",
|
|
230019
|
+
" const headers = { ...(options.headers as Record<string, string> | undefined) };",
|
|
230020
|
+
" if (execution?.idempotencyKey !== undefined) {",
|
|
230021
|
+
" if (!/^[A-Za-z0-9._:-]{1,512}$/.test(execution.idempotencyKey)) {",
|
|
230022
|
+
' throw new TypeError("idempotencyKey must contain only safe header characters and be at most 512 characters");',
|
|
230023
|
+
" }",
|
|
230024
|
+
' headers["idempotency-key"] = execution.idempotencyKey;',
|
|
230025
|
+
" }",
|
|
230026
|
+
' if (idempotency === "required" && !hasHeader(headers, "idempotency-key")) {',
|
|
230027
|
+
' throw new TypeError("This mutation requires an idempotencyKey");',
|
|
230028
|
+
" }",
|
|
230029
|
+
" return Object.keys(headers).length === 0 ? options : { ...options, headers };",
|
|
230030
|
+
" }",
|
|
230031
|
+
"",
|
|
230032
|
+
" function isProcedureExecution(value: unknown): value is ProcedureExecutionOptions {",
|
|
230033
|
+
' if (value === null || typeof value !== "object" || Array.isArray(value)) return false;',
|
|
230034
|
+
' return Object.hasOwn(value, "idempotencyKey") || Object.hasOwn(value, "signal");',
|
|
230035
|
+
" }",
|
|
230036
|
+
"",
|
|
230037
|
+
` function makeProcedure<Options extends ClientRequestOptions, Result = never, Idempotency extends IdempotencyMode = "none", Kind extends ProcedureKind = ProcedureKind>(metadata: ProcedureMetadata<Kind, Idempotency>, responseSchemas?: Readonly<Record<string, ${responseSchemaType}>>, responseKind?: string, raw = false): QueryableProcedure<Options, Result, Idempotency, Kind> {`,
|
|
230038
|
+
" const procedure = async (first?: Options | ProcedureExecutionOptions, second?: ProcedureExecutionOptions): Promise<unknown> => {",
|
|
230039
|
+
" const execution = second ?? (isProcedureExecution(first) ? first : undefined);",
|
|
230040
|
+
" const input = (execution === first ? undefined : first) ?? {};",
|
|
230041
|
+
" const requestOptions = withProcedureExecution(input as ClientRequestOptions, execution, metadata.idempotency);",
|
|
230042
|
+
" return request(metadata.method, metadata.path, requestOptions, undefined, responseSchemas, responseKind, raw, execution);",
|
|
230043
|
+
" };",
|
|
230044
|
+
" return Object.assign(procedure, { __supacloudProcedure: Object.freeze(metadata) }) as QueryableProcedure<Options, Result, Idempotency, Kind>;",
|
|
230045
|
+
" }",
|
|
230046
|
+
"",
|
|
230047
|
+
` function makeRoute<Options extends ClientRequestOptions, Result = never, Kind extends ProcedureKind = never, Idempotency extends IdempotencyMode = "none">(method: string, path: string, responseSchemas?: Readonly<Record<string, ${responseSchemaType}>>, responseKind?: string, raw = false, kind?: Kind, idempotency: Idempotency = "none" as Idempotency, metadata?: ProcedureMetadata<Kind, Idempotency>): RouteMethod<Options, Result> & ProcedureMember<Options, Result, Kind, Idempotency> {`,
|
|
229759
230048
|
" function route<T>(options: Options, decode: ResponseDecoder<T>): Promise<T>;",
|
|
229760
230049
|
" function route(options: Options): Promise<Result>;",
|
|
229761
230050
|
" function route(options?: Options): Promise<unknown>;",
|
|
@@ -229763,13 +230052,16 @@ function renderClient(graph, options) {
|
|
|
229763
230052
|
" const requestOptions = options ?? {};",
|
|
229764
230053
|
" return request(method, path, requestOptions, decode, responseSchemas, responseKind, raw);",
|
|
229765
230054
|
" }",
|
|
229766
|
-
|
|
230055
|
+
' if (kind === "query" && metadata) Object.assign(route, { query: makeProcedure<Options, Result, Idempotency, "query">(metadata as ProcedureMetadata<"query", Idempotency>, responseSchemas, responseKind, raw) });',
|
|
230056
|
+
' if (kind === "mutation" && metadata) Object.assign(route, { mutate: makeProcedure<Options, Result, Idempotency, "mutation">(metadata as ProcedureMetadata<"mutation", Idempotency>, responseSchemas, responseKind, raw) });',
|
|
230057
|
+
" return route as RouteMethod<Options, Result> & ProcedureMember<Options, Result, Kind, Idempotency>;",
|
|
229767
230058
|
" }",
|
|
229768
230059
|
"",
|
|
229769
230060
|
" return {",
|
|
229770
230061
|
" request,",
|
|
229771
230062
|
" buildRouteUrl,",
|
|
229772
230063
|
" routes: API_ROUTES,",
|
|
230064
|
+
" procedures: API_PROCEDURES,",
|
|
229773
230065
|
...controllerEntries,
|
|
229774
230066
|
" };",
|
|
229775
230067
|
"}",
|
|
@@ -239949,14 +240241,14 @@ function validateWorkerExecution2(groups) {
|
|
|
239949
240241
|
routes.add(route);
|
|
239950
240242
|
}
|
|
239951
240243
|
}
|
|
239952
|
-
var
|
|
240244
|
+
var closed4;
|
|
239953
240245
|
var positive2 = (maximum) => Integer4({ minimum: 1, maximum });
|
|
239954
240246
|
var WorkerExecutionGroupSchema2;
|
|
239955
240247
|
var WorkerExecutionSchema2;
|
|
239956
240248
|
var init_worker_execution = __esm2(() => {
|
|
239957
240249
|
init_build();
|
|
239958
240250
|
init_value2();
|
|
239959
|
-
|
|
240251
|
+
closed4 = { additionalProperties: false };
|
|
239960
240252
|
WorkerExecutionGroupSchema2 = _Object_3({
|
|
239961
240253
|
name: String22({ pattern: "^[a-z][a-z0-9-]{0,47}$" }),
|
|
239962
240254
|
target: String22({ pattern: "^[a-z][a-z0-9-]{0,53}$" }),
|
|
@@ -239972,22 +240264,22 @@ var init_worker_execution = __esm2(() => {
|
|
|
239972
240264
|
resources: _Object_3({
|
|
239973
240265
|
cpuLimit: Number22({ minimum: 0.1, maximum: 64, multipleOf: 0.1 }),
|
|
239974
240266
|
memoryLimitMiB: Integer4({ minimum: 64, maximum: 262144 })
|
|
239975
|
-
},
|
|
240267
|
+
}, closed4),
|
|
239976
240268
|
database: _Object_3({
|
|
239977
240269
|
engineConnectionsPerReplica: positive2(16),
|
|
239978
240270
|
handlerConnectionsPerReplica: positive2(16)
|
|
239979
|
-
},
|
|
240271
|
+
}, closed4),
|
|
239980
240272
|
lifecycle: _Object_3({
|
|
239981
240273
|
executionTimeoutSeconds: positive2(3500),
|
|
239982
240274
|
visibilityTimeoutSeconds: Integer4({ minimum: 15, maximum: 3600 }),
|
|
239983
240275
|
shutdownGraceSeconds: positive2(300)
|
|
239984
|
-
},
|
|
239985
|
-
retry: _Object_3({ maxAttempts: Integer4({ minimum: 1, maximum: 10 }) },
|
|
239986
|
-
admission: _Object_3({ maxOutstandingOperations: positive2(1e6) },
|
|
239987
|
-
},
|
|
240276
|
+
}, closed4),
|
|
240277
|
+
retry: _Object_3({ maxAttempts: Integer4({ minimum: 1, maximum: 10 }) }, closed4),
|
|
240278
|
+
admission: _Object_3({ maxOutstandingOperations: positive2(1e6) }, closed4)
|
|
240279
|
+
}, closed4);
|
|
239988
240280
|
WorkerExecutionSchema2 = _Object_3({
|
|
239989
240281
|
groups: _Array_2(WorkerExecutionGroupSchema2, { minItems: 1, maxItems: 32 })
|
|
239990
|
-
},
|
|
240282
|
+
}, closed4);
|
|
239991
240283
|
});
|
|
239992
240284
|
function parseDeliveryOptions(value) {
|
|
239993
240285
|
if (value === undefined)
|
|
@@ -240321,6 +240613,9 @@ function parseDeliveryBuildManifest2(value) {
|
|
|
240321
240613
|
if (!Check22(DeliveryBuildManifestSchema2, value))
|
|
240322
240614
|
throw new Error("Invalid delivery build manifest.");
|
|
240323
240615
|
validateWorkerExecution2(value.plan.targets.flatMap((target) => target.execution ? [target.execution] : []));
|
|
240616
|
+
if (value.plan.targets.reduce((count, target) => count + (target.execution?.replicas ?? 1), 0) > 32) {
|
|
240617
|
+
throw new Error("Invalid delivery replica count.");
|
|
240618
|
+
}
|
|
240324
240619
|
for (const target of value.plan.targets) {
|
|
240325
240620
|
if (target.execution && (target.kind !== "jobs" || target.isolation !== "process" || target.execution.target !== target.name || target.jobs.length !== 1 || target.jobs[0]?.name !== target.execution.taskKey || value.objects.find((object) => object.name === target.name)?.entryKind !== "bun-worker-application")) {
|
|
240326
240621
|
throw new Error("Invalid delivery execution binding.");
|
|
@@ -240334,7 +240629,7 @@ function parseDeliveryBuildManifest2(value) {
|
|
|
240334
240629
|
}
|
|
240335
240630
|
for (const object of value.objects) {
|
|
240336
240631
|
const target = value.plan.targets.find((target) => target.name === object.name);
|
|
240337
|
-
if (
|
|
240632
|
+
if (["bun-worker-application", "go-worker-application", "scriptc-worker-application"].includes(object.entryKind) && target?.kind !== "jobs" || object.entryKind === "bun-http-application" && target?.kind === "jobs") {
|
|
240338
240633
|
throw new Error("Delivery executable kind does not match its target.");
|
|
240339
240634
|
}
|
|
240340
240635
|
if (new Set(object.files.map((file) => file.path)).size !== object.files.length || !object.files.some((file) => file.path === object.entrypoint) || deliveryObjectDigest2(object) !== object.objectId) {
|
|
@@ -240377,7 +240672,9 @@ var init_delivery_build_schema = __esm2(() => {
|
|
|
240377
240672
|
entryKind: Union4([
|
|
240378
240673
|
Literal3("compiled-module-factory"),
|
|
240379
240674
|
Literal3("bun-http-application"),
|
|
240380
|
-
Literal3("bun-worker-application")
|
|
240675
|
+
Literal3("bun-worker-application"),
|
|
240676
|
+
Literal3("go-worker-application"),
|
|
240677
|
+
Literal3("scriptc-worker-application")
|
|
240381
240678
|
]),
|
|
240382
240679
|
runtimeImports: _Array_2(String22()),
|
|
240383
240680
|
files: _Array_2(_Object_3({
|
|
@@ -240865,7 +241162,7 @@ var APPLICATION_DEVELOPMENT_SCHEMA = "supacloud.application-development.v1";
|
|
|
240865
241162
|
var APPLICATION_DEVELOPMENT_ARCHIVE_MAX_BYTES = 524288;
|
|
240866
241163
|
var APPLICATION_DEVELOPMENT_LIMITS;
|
|
240867
241164
|
var DevelopmentContractError;
|
|
240868
|
-
var
|
|
241165
|
+
var closed42;
|
|
240869
241166
|
var text22;
|
|
240870
241167
|
var texts;
|
|
240871
241168
|
var count;
|
|
@@ -240898,13 +241195,13 @@ var init_application_development = __esm2(() => {
|
|
|
240898
241195
|
this.name = "DevelopmentContractError";
|
|
240899
241196
|
}
|
|
240900
241197
|
};
|
|
240901
|
-
|
|
241198
|
+
closed42 = { additionalProperties: false };
|
|
240902
241199
|
text22 = String22({ minLength: 1, maxLength: 512, pattern: "^[^\\u0000-\\u001f\\u007f]+$" });
|
|
240903
241200
|
texts = _Array_2(text22);
|
|
240904
241201
|
count = Integer4({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER });
|
|
240905
241202
|
mode = Union4([Literal3("required"), Literal3("none")]);
|
|
240906
241203
|
operations2 = _Array_2(Union4([Literal3("read"), Literal3("write"), Literal3("publish"), Literal3("consume")]));
|
|
240907
|
-
resourceUse = _Object_3({ resource: text22, operations: operations2 },
|
|
241204
|
+
resourceUse = _Object_3({ resource: text22, operations: operations2 }, closed42);
|
|
240908
241205
|
schemaKind = Optional4(Union4([Literal3("opaque"), Literal3("declared")]));
|
|
240909
241206
|
stage = Union4([
|
|
240910
241207
|
Union4([Literal3("commandExecutor"), Literal3("jobExecutor"), Literal3("authorize"), Literal3("idempotency"), Literal3("transaction"), Literal3("handler"), Literal3("audit")]),
|
|
@@ -240929,7 +241226,7 @@ var init_application_development = __esm2(() => {
|
|
|
240929
241226
|
jobs: texts,
|
|
240930
241227
|
queries: texts,
|
|
240931
241228
|
resources: texts
|
|
240932
|
-
},
|
|
241229
|
+
}, closed42), { maxItems: APPLICATION_DEVELOPMENT_LIMITS.modules }),
|
|
240933
241230
|
routes: _Array_2(_Object_3({
|
|
240934
241231
|
module: text22,
|
|
240935
241232
|
method: Union4([Literal3("GET"), Literal3("POST"), Literal3("PUT"), Literal3("PATCH"), Literal3("DELETE"), Literal3("HEAD"), Literal3("OPTIONS")]),
|
|
@@ -240945,8 +241242,8 @@ var init_application_development = __esm2(() => {
|
|
|
240945
241242
|
headers: schemaKind,
|
|
240946
241243
|
cookie: schemaKind,
|
|
240947
241244
|
response: schemaKind
|
|
240948
|
-
},
|
|
240949
|
-
},
|
|
241245
|
+
}, closed42))
|
|
241246
|
+
}, closed42), { maxItems: APPLICATION_DEVELOPMENT_LIMITS.routes }),
|
|
240950
241247
|
commands: _Array_2(_Object_3({
|
|
240951
241248
|
module: text22,
|
|
240952
241249
|
name: text22,
|
|
@@ -240955,28 +241252,28 @@ var init_application_development = __esm2(() => {
|
|
|
240955
241252
|
idempotency: mode,
|
|
240956
241253
|
audit: Optional4(text22),
|
|
240957
241254
|
resources: _Array_2(resourceUse)
|
|
240958
|
-
},
|
|
241255
|
+
}, closed42), { maxItems: APPLICATION_DEVELOPMENT_LIMITS.commands }),
|
|
240959
241256
|
jobs: _Array_2(_Object_3({
|
|
240960
241257
|
module: text22,
|
|
240961
241258
|
name: text22,
|
|
240962
241259
|
mode: Optional4(Union4([Literal3("task"), Literal3("workflow")])),
|
|
240963
241260
|
resources: _Array_2(resourceUse)
|
|
240964
|
-
},
|
|
240965
|
-
resources: _Array_2(_Object_3({ name: text22, kind: Union4([Literal3("database"), Literal3("bucket"), Literal3("queue"), Literal3("config"), Literal3("secret")]) },
|
|
241261
|
+
}, closed42), { maxItems: APPLICATION_DEVELOPMENT_LIMITS.jobs }),
|
|
241262
|
+
resources: _Array_2(_Object_3({ name: text22, kind: Union4([Literal3("database"), Literal3("bucket"), Literal3("queue"), Literal3("config"), Literal3("secret")]) }, closed42), { maxItems: APPLICATION_DEVELOPMENT_LIMITS.resources }),
|
|
240966
241263
|
resourceUses: _Array_2(_Object_3({
|
|
240967
241264
|
module: text22,
|
|
240968
241265
|
owner: text22,
|
|
240969
241266
|
ownerKind: Union4([Literal3("command"), Literal3("job")]),
|
|
240970
241267
|
resource: text22,
|
|
240971
241268
|
operations: operations2
|
|
240972
|
-
},
|
|
241269
|
+
}, closed42), { maxItems: APPLICATION_DEVELOPMENT_LIMITS.resourceUses }),
|
|
240973
241270
|
executionPlans: _Array_2(_Object_3({
|
|
240974
241271
|
module: text22,
|
|
240975
241272
|
kind: Union4([Literal3("route"), Literal3("command"), Literal3("job")]),
|
|
240976
241273
|
name: text22,
|
|
240977
241274
|
command: Optional4(text22),
|
|
240978
241275
|
stages: _Array_2(stage)
|
|
240979
|
-
},
|
|
241276
|
+
}, closed42), { maxItems: APPLICATION_DEVELOPMENT_LIMITS.plans }),
|
|
240980
241277
|
diagnostics: _Array_2(_Object_3({
|
|
240981
241278
|
code: text22,
|
|
240982
241279
|
severity: Union4([Literal3("error"), Literal3("warn")]),
|
|
@@ -240985,8 +241282,8 @@ var init_application_development = __esm2(() => {
|
|
|
240985
241282
|
repair: Optional4(_Object_3({
|
|
240986
241283
|
type: Union4([Literal3("set_command_mode"), Literal3("add_module_import"), Literal3("add_provider"), Literal3("mark_optional_dependency"), Literal3("change_provider_scope"), Literal3("add_command_permission"), Literal3("add_route_parameter_binding"), Literal3("remove_route_body_binding")]),
|
|
240987
241284
|
readiness: Union4([Literal3("preview"), Literal3("input-required"), Literal3("manual")])
|
|
240988
|
-
},
|
|
240989
|
-
},
|
|
241285
|
+
}, closed42))
|
|
241286
|
+
}, closed42), { maxItems: APPLICATION_DEVELOPMENT_LIMITS.diagnostics }),
|
|
240990
241287
|
omitted: _Object_3({
|
|
240991
241288
|
modules: count,
|
|
240992
241289
|
providers: count,
|
|
@@ -240997,7 +241294,7 @@ var init_application_development = __esm2(() => {
|
|
|
240997
241294
|
resourceUses: count,
|
|
240998
241295
|
plans: count,
|
|
240999
241296
|
diagnostics: count
|
|
241000
|
-
},
|
|
241297
|
+
}, closed42),
|
|
241001
241298
|
limits: _Object_3({
|
|
241002
241299
|
outputBytes: Literal3(APPLICATION_DEVELOPMENT_LIMITS.outputBytes),
|
|
241003
241300
|
modules: Literal3(APPLICATION_DEVELOPMENT_LIMITS.modules),
|
|
@@ -241009,8 +241306,8 @@ var init_application_development = __esm2(() => {
|
|
|
241009
241306
|
resourceUses: Literal3(APPLICATION_DEVELOPMENT_LIMITS.resourceUses),
|
|
241010
241307
|
plans: Literal3(APPLICATION_DEVELOPMENT_LIMITS.plans),
|
|
241011
241308
|
diagnostics: Literal3(APPLICATION_DEVELOPMENT_LIMITS.diagnostics)
|
|
241012
|
-
},
|
|
241013
|
-
},
|
|
241309
|
+
}, closed42)
|
|
241310
|
+
}, closed42);
|
|
241014
241311
|
});
|
|
241015
241312
|
function parseApplicationDevelopmentContext(input) {
|
|
241016
241313
|
try {
|
|
@@ -241312,6 +241609,114 @@ var init_application_activation = __esm2(() => {
|
|
|
241312
241609
|
retired_at: String22()
|
|
241313
241610
|
}, { additionalProperties: false });
|
|
241314
241611
|
});
|
|
241612
|
+
var closed6;
|
|
241613
|
+
var sha2562;
|
|
241614
|
+
var isoDate2;
|
|
241615
|
+
var status2;
|
|
241616
|
+
var evidenceStatus2;
|
|
241617
|
+
var DEPLOYMENT_EVIDENCE_SCHEMA2 = "supacloud.deployment-evidence.v1";
|
|
241618
|
+
var DatabaseProviderSchema2;
|
|
241619
|
+
var componentName2;
|
|
241620
|
+
var DeploymentComponentEvidenceSchema2;
|
|
241621
|
+
var DeploymentEvidenceSchema2;
|
|
241622
|
+
var init_deployment_evidence = __esm2(() => {
|
|
241623
|
+
init_build();
|
|
241624
|
+
init_value2();
|
|
241625
|
+
init_application_configuration();
|
|
241626
|
+
init_application_release();
|
|
241627
|
+
closed6 = { additionalProperties: false };
|
|
241628
|
+
sha2562 = String22({ pattern: "^[a-f0-9]{64}$" });
|
|
241629
|
+
isoDate2 = String22({ minLength: 20, maxLength: 40 });
|
|
241630
|
+
status2 = Union4([
|
|
241631
|
+
Literal3("confirmed"),
|
|
241632
|
+
Literal3("failed"),
|
|
241633
|
+
Literal3("unknown")
|
|
241634
|
+
]);
|
|
241635
|
+
evidenceStatus2 = Union4([
|
|
241636
|
+
Literal3("confirmed"),
|
|
241637
|
+
Literal3("failed"),
|
|
241638
|
+
Literal3("unknown"),
|
|
241639
|
+
Literal3("incomplete")
|
|
241640
|
+
]);
|
|
241641
|
+
DatabaseProviderSchema2 = _Object_3({
|
|
241642
|
+
provider: String22({ minLength: 1, maxLength: 64, pattern: "^[a-z][a-z0-9_.-]*$" }),
|
|
241643
|
+
version: String22({ minLength: 1, maxLength: 64 }),
|
|
241644
|
+
topology: Union4([Literal3("single-node"), Literal3("distributed")]),
|
|
241645
|
+
migration: _Object_3({
|
|
241646
|
+
status: status2,
|
|
241647
|
+
inventory_sha256: Union4([sha2562, Null3()]),
|
|
241648
|
+
compatibility: Union4([
|
|
241649
|
+
Literal3("verified"),
|
|
241650
|
+
Literal3("not-proven"),
|
|
241651
|
+
Literal3("failed")
|
|
241652
|
+
])
|
|
241653
|
+
}, closed6),
|
|
241654
|
+
backup: _Object_3({
|
|
241655
|
+
status: status2,
|
|
241656
|
+
latest_success_at: Union4([isoDate2, Null3()]),
|
|
241657
|
+
freshness_seconds: Union4([Integer4({ minimum: 0 }), Null3()])
|
|
241658
|
+
}, closed6),
|
|
241659
|
+
recovery: _Object_3({
|
|
241660
|
+
status: status2,
|
|
241661
|
+
drill_id: Union4([String22({ minLength: 1, maxLength: 128 }), Null3()]),
|
|
241662
|
+
rpo_seconds: Union4([Integer4({ minimum: 0 }), Null3()]),
|
|
241663
|
+
rto_seconds: Union4([Integer4({ minimum: 0 }), Null3()])
|
|
241664
|
+
}, closed6)
|
|
241665
|
+
}, closed6);
|
|
241666
|
+
componentName2 = Union4([
|
|
241667
|
+
Literal3("management-api"),
|
|
241668
|
+
Literal3("web-console"),
|
|
241669
|
+
Literal3("edge-runtime"),
|
|
241670
|
+
Literal3("worker"),
|
|
241671
|
+
Literal3("postgres"),
|
|
241672
|
+
Literal3("postgrest"),
|
|
241673
|
+
Literal3("gotrue"),
|
|
241674
|
+
Literal3("storage"),
|
|
241675
|
+
Literal3("realtime")
|
|
241676
|
+
]);
|
|
241677
|
+
DeploymentComponentEvidenceSchema2 = _Object_3({
|
|
241678
|
+
name: componentName2,
|
|
241679
|
+
version: Union4([String22({ minLength: 1, maxLength: 128 }), Null3()]),
|
|
241680
|
+
status: status2,
|
|
241681
|
+
health_check: Union4([String22({ minLength: 1, maxLength: 256 }), Null3()]),
|
|
241682
|
+
checked_at: Union4([isoDate2, Null3()])
|
|
241683
|
+
}, closed6);
|
|
241684
|
+
DeploymentEvidenceSchema2 = _Object_3({
|
|
241685
|
+
schema: Literal3(DEPLOYMENT_EVIDENCE_SCHEMA2),
|
|
241686
|
+
status: evidenceStatus2,
|
|
241687
|
+
recorded_at: isoDate2,
|
|
241688
|
+
scope: _Object_3({
|
|
241689
|
+
project_ref: String22({ pattern: "^[a-z0-9-]{1,20}$" }),
|
|
241690
|
+
application_id: ApplicationIdSchema3,
|
|
241691
|
+
environment_id: ApplicationIdSchema3
|
|
241692
|
+
}, closed6),
|
|
241693
|
+
source: _Object_3({
|
|
241694
|
+
commit_sha: Union4([String22({ pattern: "^[0-9a-f]{7,64}$" }), Null3()]),
|
|
241695
|
+
manifest_sha256: sha2562,
|
|
241696
|
+
contract_schema: Union4([String22({ minLength: 1, maxLength: 128 }), Null3()]),
|
|
241697
|
+
environment_binding_version: Union4([sha2562, Null3()])
|
|
241698
|
+
}, closed6),
|
|
241699
|
+
database: DatabaseProviderSchema2,
|
|
241700
|
+
components: _Array_2(DeploymentComponentEvidenceSchema2, { minItems: 1, maxItems: 32 }),
|
|
241701
|
+
activation: _Object_3({
|
|
241702
|
+
release_id: ApplicationReleaseIdSchema3,
|
|
241703
|
+
configuration_id: ApplicationConfigurationIdSchema3,
|
|
241704
|
+
activation_id: ApplicationConfigurationIdSchema3
|
|
241705
|
+
}, closed6),
|
|
241706
|
+
health: _Object_3({
|
|
241707
|
+
status: status2,
|
|
241708
|
+
checked_at: Union4([isoDate2, Null3()]),
|
|
241709
|
+
authenticated_smoke: status2
|
|
241710
|
+
}, closed6),
|
|
241711
|
+
rollback: _Object_3({
|
|
241712
|
+
release_id: Union4([ApplicationReleaseIdSchema3, Null3()]),
|
|
241713
|
+
configuration_id: Union4([ApplicationConfigurationIdSchema3, Null3()]),
|
|
241714
|
+
status: Union4([Literal3("ready"), Literal3("not-ready"), Literal3("unknown")]),
|
|
241715
|
+
result: Union4([status2, Null3()])
|
|
241716
|
+
}, closed6),
|
|
241717
|
+
notes: _Array_2(String22({ minLength: 1, maxLength: 512 }), { maxItems: 32 })
|
|
241718
|
+
}, closed6);
|
|
241719
|
+
});
|
|
241315
241720
|
var APPLICATION_RUNTIME_PROBE_PATH2 = "/.well-known/supacloud/runtime";
|
|
241316
241721
|
var ApplicationRuntimeIdentitySchema2;
|
|
241317
241722
|
var ApplicationReadinessReportSchema2;
|
|
@@ -241389,6 +241794,7 @@ var init_src = __esm2(() => {
|
|
|
241389
241794
|
init_application_activation();
|
|
241390
241795
|
init_application_release();
|
|
241391
241796
|
init_application_configuration();
|
|
241797
|
+
init_deployment_evidence();
|
|
241392
241798
|
init_application_runtime_identity();
|
|
241393
241799
|
init_delivery_build_schema();
|
|
241394
241800
|
init_delivery_migration_archive();
|
|
@@ -246856,7 +247262,7 @@ var starter_metadata_default = {
|
|
|
246856
247262
|
generatedBy: "supacloud/starter-metadata-v1",
|
|
246857
247263
|
packages: {
|
|
246858
247264
|
compiler: {
|
|
246859
|
-
version: "0.
|
|
247265
|
+
version: "0.34.0"
|
|
246860
247266
|
},
|
|
246861
247267
|
app: {
|
|
246862
247268
|
version: "0.22.0",
|
|
@@ -246883,7 +247289,7 @@ var starter_metadata_default = {
|
|
|
246883
247289
|
}
|
|
246884
247290
|
},
|
|
246885
247291
|
sdk: {
|
|
246886
|
-
version: "0.
|
|
247292
|
+
version: "0.38.0",
|
|
246887
247293
|
peerDependencies: {
|
|
246888
247294
|
"@supabase/supabase-js": "^2.115.0"
|
|
246889
247295
|
}
|
|
@@ -254587,7 +254993,7 @@ function registerRemoteDevTools(server2, options = {}) {
|
|
|
254587
254993
|
// package.json
|
|
254588
254994
|
var package_default = {
|
|
254589
254995
|
name: "@supacloud/cli",
|
|
254590
|
-
version: "0.
|
|
254996
|
+
version: "0.65.1",
|
|
254591
254997
|
description: "Project-scoped CLI for SupaCloud users",
|
|
254592
254998
|
type: "module",
|
|
254593
254999
|
main: "./dist/index.js",
|
|
@@ -254622,14 +255028,14 @@ var package_default = {
|
|
|
254622
255028
|
},
|
|
254623
255029
|
dependencies: {
|
|
254624
255030
|
"@sinclair/typebox": "^0.34.52",
|
|
254625
|
-
"@supacloud/compiler": "^0.
|
|
254626
|
-
"@supacloud/delivery": "0.
|
|
255031
|
+
"@supacloud/compiler": "^0.34.0",
|
|
255032
|
+
"@supacloud/delivery": "0.7.0",
|
|
254627
255033
|
"@supacloud/db": "^0.2.0",
|
|
254628
255034
|
fflate: "^0.8.3",
|
|
254629
255035
|
typebox: "1.3.34"
|
|
254630
255036
|
},
|
|
254631
255037
|
overrides: {
|
|
254632
|
-
"@supacloud/delivery": "0.
|
|
255038
|
+
"@supacloud/delivery": "0.7.0"
|
|
254633
255039
|
},
|
|
254634
255040
|
devDependencies: {
|
|
254635
255041
|
"@supacloud/elysia": "^0.23.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supacloud/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.65.1",
|
|
4
4
|
"description": "Project-scoped CLI for SupaCloud users",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@sinclair/typebox": "^0.34.52",
|
|
38
|
-
"@supacloud/compiler": "^0.
|
|
39
|
-
"@supacloud/delivery": "0.
|
|
38
|
+
"@supacloud/compiler": "^0.34.0",
|
|
39
|
+
"@supacloud/delivery": "0.7.0",
|
|
40
40
|
"@supacloud/db": "^0.2.0",
|
|
41
41
|
"fflate": "^0.8.3",
|
|
42
42
|
"typebox": "1.3.34"
|
|
43
43
|
},
|
|
44
44
|
"overrides": {
|
|
45
|
-
"@supacloud/delivery": "0.
|
|
45
|
+
"@supacloud/delivery": "0.7.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@supacloud/elysia": "^0.23.1",
|