@supacloud/cli 0.96.1 → 0.96.2
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 +200 -55
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -10925,12 +10925,157 @@ function parseDeploymentEvidence(value) {
|
|
|
10925
10925
|
}
|
|
10926
10926
|
return structuredClone(value);
|
|
10927
10927
|
}
|
|
10928
|
-
// node_modules/@supacloud/delivery/src/
|
|
10928
|
+
// node_modules/@supacloud/delivery/src/delivery-tuple.ts
|
|
10929
|
+
var sha2563 = String2({ pattern: "^[a-f0-9]{64}$" });
|
|
10930
|
+
var commit = String2({ pattern: "^(?:[a-f0-9]{40}|[a-f0-9]{64})$" });
|
|
10931
|
+
var isoDate2 = String2({ minLength: 20, maxLength: 40 });
|
|
10932
|
+
var DELIVERY_TUPLE_SCHEMA = "supacloud.fa-delivery-tuple.v1";
|
|
10933
|
+
var FaDeliveryTupleSchema = _Object_({
|
|
10934
|
+
schema: Literal(DELIVERY_TUPLE_SCHEMA),
|
|
10935
|
+
customer: Literal("xigu-fa"),
|
|
10936
|
+
fa_commit: commit,
|
|
10937
|
+
cli: _Object_({
|
|
10938
|
+
version: String2({ pattern: "^\\d+\\.\\d+\\.\\d+$" })
|
|
10939
|
+
}, { additionalProperties: false }),
|
|
10940
|
+
platform_commit: commit,
|
|
10941
|
+
edge_runtime: _Object_({
|
|
10942
|
+
version: String2({ minLength: 1, maxLength: 128 }),
|
|
10943
|
+
artifact_sha256: sha2563
|
|
10944
|
+
}, { additionalProperties: false }),
|
|
10945
|
+
compatibility_window: _Object_({
|
|
10946
|
+
contract_schema: String2({ minLength: 1, maxLength: 128 }),
|
|
10947
|
+
starts_at: isoDate2,
|
|
10948
|
+
ends_at: isoDate2,
|
|
10949
|
+
old_client_supported: Boolean2(),
|
|
10950
|
+
partial_deployment_supported: Boolean2()
|
|
10951
|
+
}, { additionalProperties: false })
|
|
10952
|
+
}, { additionalProperties: false });
|
|
10953
|
+
// node_modules/@supacloud/delivery/src/contract-matrix.ts
|
|
10929
10954
|
var closed6 = { additionalProperties: false };
|
|
10955
|
+
var sha2564 = String2({ pattern: "^[a-f0-9]{64}$" });
|
|
10956
|
+
var generation = Union([Literal("old"), Literal("new")]);
|
|
10957
|
+
var versions = _Object_({ old: sha2564, new: sha2564 }, closed6);
|
|
10958
|
+
var CONTRACT_MATRIX_SCHEMA = "supacloud.consumer-contract-matrix.v1";
|
|
10959
|
+
var FA_CONTRACT_SCENARIOS = [
|
|
10960
|
+
"missing-display-field",
|
|
10961
|
+
"missing-authority-field",
|
|
10962
|
+
"added-field",
|
|
10963
|
+
"legacy-envelope",
|
|
10964
|
+
"lost-write-response",
|
|
10965
|
+
"downgrade"
|
|
10966
|
+
];
|
|
10967
|
+
var ConsumerContractMatrixSchema = _Object_({
|
|
10968
|
+
schema: Literal(CONTRACT_MATRIX_SCHEMA),
|
|
10969
|
+
customer: Literal("xigu-fa"),
|
|
10970
|
+
baseline_tuple_sha256: sha2564,
|
|
10971
|
+
candidate_tuple_sha256: sha2564,
|
|
10972
|
+
artifacts: _Object_({ frontend: versions, functions: versions, database: versions }, closed6),
|
|
10973
|
+
cases: _Array_(_Object_({
|
|
10974
|
+
frontend: generation,
|
|
10975
|
+
functions: generation,
|
|
10976
|
+
database: generation,
|
|
10977
|
+
scenarios: _Array_(_Object_({
|
|
10978
|
+
name: Enum(FA_CONTRACT_SCENARIOS),
|
|
10979
|
+
expected: Union([Literal("compatible"), Literal("blocked-safely")])
|
|
10980
|
+
}, closed6), { minItems: FA_CONTRACT_SCENARIOS.length, maxItems: FA_CONTRACT_SCENARIOS.length })
|
|
10981
|
+
}, closed6), { minItems: 8, maxItems: 8 })
|
|
10982
|
+
}, closed6);
|
|
10983
|
+
// node_modules/@supacloud/delivery/src/fa-stability.ts
|
|
10984
|
+
var closed7 = { additionalProperties: false };
|
|
10985
|
+
var hash3 = String2({ pattern: "^[a-f0-9]{64}$" });
|
|
10986
|
+
var label = String2({ minLength: 1, maxLength: 256, pattern: "\\S" });
|
|
10987
|
+
var timestamp2 = String2({ minLength: 24, maxLength: 24 });
|
|
10988
|
+
var count = Integer({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER });
|
|
10989
|
+
var environment2 = Union([Literal("test"), Literal("production")]);
|
|
10990
|
+
var FA_REQUIRED_ACCEPTANCE = {
|
|
10991
|
+
login: "real-browser",
|
|
10992
|
+
permissions: "real-http",
|
|
10993
|
+
upload: "real-http",
|
|
10994
|
+
"async-task": "real-worker",
|
|
10995
|
+
deploy: "real-http",
|
|
10996
|
+
"database-migration": "real-database",
|
|
10997
|
+
schedule: "real-worker",
|
|
10998
|
+
rollback: "real-drill",
|
|
10999
|
+
"error-policy": "real-http",
|
|
11000
|
+
"alert-delivery": "real-drill"
|
|
11001
|
+
};
|
|
11002
|
+
var FA_BUSINESS_OPERATIONS = ["login", "permissions", "upload", "async-task", "report", "deploy"];
|
|
11003
|
+
var operation = Enum(FA_BUSINESS_OPERATIONS);
|
|
11004
|
+
var proof = _Object_({
|
|
11005
|
+
path: String2({ pattern: "^[A-Za-z0-9_-][A-Za-z0-9_./-]{0,255}$" }),
|
|
11006
|
+
sha256: hash3
|
|
11007
|
+
}, closed7);
|
|
11008
|
+
var FaBusinessObservationSchema = _Object_({
|
|
11009
|
+
id: String2({ pattern: "^[A-Za-z0-9_-]{1,128}$" }),
|
|
11010
|
+
tuple_sha256: hash3,
|
|
11011
|
+
operation,
|
|
11012
|
+
started_at: timestamp2,
|
|
11013
|
+
finished_at: timestamp2,
|
|
11014
|
+
outcome: Enum(["success", "failure", "timeout", "unknown"]),
|
|
11015
|
+
attempts: Integer({ minimum: 1, maximum: 1000 }),
|
|
11016
|
+
rollbacks: count
|
|
11017
|
+
}, closed7);
|
|
11018
|
+
var FaServiceObjectivesSchema = _Object_({
|
|
11019
|
+
status: Literal("approved"),
|
|
11020
|
+
owner: label,
|
|
11021
|
+
approval_reference: label,
|
|
11022
|
+
approved_at: timestamp2,
|
|
11023
|
+
project_ref: String2({ pattern: "^[a-z0-9-]{1,20}$" }),
|
|
11024
|
+
environment: environment2,
|
|
11025
|
+
alert_route: label,
|
|
11026
|
+
window_hours: Number2({ exclusiveMinimum: 0, maximum: 8760 }),
|
|
11027
|
+
max_evidence_age_hours: Number2({ exclusiveMinimum: 0, maximum: 168 }),
|
|
11028
|
+
operations: _Array_(_Object_({
|
|
11029
|
+
operation,
|
|
11030
|
+
minimum_samples: Integer({ minimum: 1, maximum: Number.MAX_SAFE_INTEGER }),
|
|
11031
|
+
availability_percent: Number2({ exclusiveMinimum: 0, maximum: 100 }),
|
|
11032
|
+
p95_ms: Number2({ exclusiveMinimum: 0, maximum: Number.MAX_SAFE_INTEGER })
|
|
11033
|
+
}, closed7), { minItems: FA_BUSINESS_OPERATIONS.length, maxItems: FA_BUSINESS_OPERATIONS.length })
|
|
11034
|
+
}, closed7);
|
|
11035
|
+
var FaStabilityEvidenceSchema = _Object_({
|
|
11036
|
+
schema: Literal("supacloud.fa-stability-evidence.v1"),
|
|
11037
|
+
environment: environment2,
|
|
11038
|
+
project_ref: String2({ pattern: "^[a-z0-9-]{1,20}$" }),
|
|
11039
|
+
tuple_sha256: hash3,
|
|
11040
|
+
matrix_sha256: hash3,
|
|
11041
|
+
objectives_sha256: hash3,
|
|
11042
|
+
recorded_at: timestamp2,
|
|
11043
|
+
window_start: timestamp2,
|
|
11044
|
+
window_end: timestamp2,
|
|
11045
|
+
reviewed_by: label,
|
|
11046
|
+
review_reference: label,
|
|
11047
|
+
acceptance: _Array_(_Object_({
|
|
11048
|
+
id: Enum(Object.keys(FA_REQUIRED_ACCEPTANCE)),
|
|
11049
|
+
execution: Enum([
|
|
11050
|
+
"real-browser",
|
|
11051
|
+
"real-http",
|
|
11052
|
+
"real-worker",
|
|
11053
|
+
"real-database",
|
|
11054
|
+
"real-drill",
|
|
11055
|
+
"local-fake"
|
|
11056
|
+
]),
|
|
11057
|
+
passed: Boolean2(),
|
|
11058
|
+
measured_at: timestamp2,
|
|
11059
|
+
proof
|
|
11060
|
+
}, closed7), { minItems: 10, maxItems: 10 }),
|
|
11061
|
+
matrix: _Array_(_Object_({
|
|
11062
|
+
combination: label,
|
|
11063
|
+
scenario: label,
|
|
11064
|
+
outcome: Union([Literal("compatible"), Literal("blocked-safely")]),
|
|
11065
|
+
execution: Union([Literal("real-http-and-database"), Literal("local-fake")]),
|
|
11066
|
+
passed: Boolean2(),
|
|
11067
|
+
measured_at: timestamp2,
|
|
11068
|
+
proof
|
|
11069
|
+
}, closed7), { minItems: 48, maxItems: 48 }),
|
|
11070
|
+
observation: proof,
|
|
11071
|
+
alert: _Object_({ route: label, acknowledged_by: label, delivered_at: timestamp2 }, closed7)
|
|
11072
|
+
}, closed7);
|
|
11073
|
+
// node_modules/@supacloud/delivery/src/application-promotion.ts
|
|
11074
|
+
var closed8 = { additionalProperties: false };
|
|
10930
11075
|
var projectRef2 = String2({ pattern: "^[a-z0-9-]{1,20}$" });
|
|
10931
|
-
var
|
|
11076
|
+
var sha2565 = ApplicationReleaseIdSchema;
|
|
10932
11077
|
var nullableActivation2 = Union([ApplicationActivationIdSchema, Null()]);
|
|
10933
|
-
var nullableDigest = Union([
|
|
11078
|
+
var nullableDigest = Union([sha2565, Null()]);
|
|
10934
11079
|
var observation = {
|
|
10935
11080
|
activation_id: nullableActivation2,
|
|
10936
11081
|
receipt_confirmed: Boolean2(),
|
|
@@ -10956,33 +11101,33 @@ var ApplicationPromotionPlanSchema = _Object_({
|
|
|
10956
11101
|
project_ref: projectRef2,
|
|
10957
11102
|
application_id: ApplicationIdSchema,
|
|
10958
11103
|
environment_id: ApplicationIdSchema,
|
|
10959
|
-
manifest_sha256:
|
|
10960
|
-
plan_sha256:
|
|
11104
|
+
manifest_sha256: sha2565,
|
|
11105
|
+
plan_sha256: sha2565,
|
|
10961
11106
|
source: _Object_({
|
|
10962
11107
|
project_ref: projectRef2,
|
|
10963
11108
|
environment_id: ApplicationIdSchema,
|
|
10964
|
-
release_id:
|
|
11109
|
+
release_id: sha2565,
|
|
10965
11110
|
...observation
|
|
10966
|
-
},
|
|
11111
|
+
}, closed8),
|
|
10967
11112
|
target: _Object_({
|
|
10968
|
-
candidate_release_id:
|
|
10969
|
-
current_release_id: Union([
|
|
11113
|
+
candidate_release_id: sha2565,
|
|
11114
|
+
current_release_id: Union([sha2565, Null()]),
|
|
10970
11115
|
artifact_action: Union([Literal("materialize"), Literal("reuse")]),
|
|
10971
11116
|
configuration_id: Union([ApplicationConfigurationIdSchema, Null()]),
|
|
10972
11117
|
configuration: Union([ApplicationConfigurationViewSchema, Null()]),
|
|
10973
11118
|
...observation
|
|
10974
|
-
},
|
|
11119
|
+
}, closed8),
|
|
10975
11120
|
migrations: _Object_({
|
|
10976
|
-
ledger_digest:
|
|
11121
|
+
ledger_digest: sha2565,
|
|
10977
11122
|
ledger_compatible: Boolean2(),
|
|
10978
11123
|
project_migrations_applied: Boolean2(),
|
|
10979
11124
|
pending_versions: _Array_(String2({ pattern: "^\\d{1,20}$" }), { maxItems: 4096, uniqueItems: true }),
|
|
10980
11125
|
operator_provisioning_required: Boolean2()
|
|
10981
|
-
},
|
|
11126
|
+
}, closed8),
|
|
10982
11127
|
backup: _Object_({
|
|
10983
11128
|
required: Boolean2(),
|
|
10984
11129
|
confirmed: Literal(false)
|
|
10985
|
-
},
|
|
11130
|
+
}, closed8),
|
|
10986
11131
|
action: Union([Literal("promote"), Literal("no-op"), Literal("blocked")]),
|
|
10987
11132
|
blockers: _Array_(Enum([...blocker]), {
|
|
10988
11133
|
maxItems: blocker.length,
|
|
@@ -10991,7 +11136,7 @@ var ApplicationPromotionPlanSchema = _Object_({
|
|
|
10991
11136
|
steps: _Array_(String2({ minLength: 1, maxLength: 64 }), { maxItems: 8, uniqueItems: true }),
|
|
10992
11137
|
execution_performed: Literal(false),
|
|
10993
11138
|
data_recovery: Literal("separate-required")
|
|
10994
|
-
},
|
|
11139
|
+
}, closed8);
|
|
10995
11140
|
function applicationPromotionPlanDigest(value) {
|
|
10996
11141
|
return digest(canonical(value));
|
|
10997
11142
|
}
|
|
@@ -17191,12 +17336,12 @@ async function fetchMutationStatus(http, ref, mutationId) {
|
|
|
17191
17336
|
}
|
|
17192
17337
|
|
|
17193
17338
|
// src/shared/tools/application-workflow-schemas.ts
|
|
17194
|
-
var
|
|
17339
|
+
var closed9 = { additionalProperties: false };
|
|
17195
17340
|
var ref5 = String2({ pattern: "^[A-Za-z0-9_-]{1,20}$" });
|
|
17196
17341
|
var uuid = ApplicationActivationIdSchema2;
|
|
17197
17342
|
var nullableUuid = Union([uuid, Null()]);
|
|
17198
17343
|
var nullableDigest2 = Union([ApplicationReleaseIdSchema2, Null()]);
|
|
17199
|
-
var
|
|
17344
|
+
var timestamp3 = String2({ pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" });
|
|
17200
17345
|
var scope2 = { project_ref: ref5, application_id: ApplicationIdSchema2, environment_id: ApplicationIdSchema2 };
|
|
17201
17346
|
var ApplicationPromotionResultSchema = _Object_({
|
|
17202
17347
|
...scope2,
|
|
@@ -17205,7 +17350,7 @@ var ApplicationPromotionResultSchema = _Object_({
|
|
|
17205
17350
|
plan_sha256: ApplicationReleaseIdSchema2,
|
|
17206
17351
|
action: Literal("promote"),
|
|
17207
17352
|
replayed: Boolean2()
|
|
17208
|
-
},
|
|
17353
|
+
}, closed9);
|
|
17209
17354
|
var ApplicationPromotionStatusSchema = _Object_({
|
|
17210
17355
|
...scope2,
|
|
17211
17356
|
mutation: Unknown(),
|
|
@@ -17224,8 +17369,8 @@ var ApplicationPromotionStatusSchema = _Object_({
|
|
|
17224
17369
|
configuration_id: Union([ApplicationConfigurationIdSchema2, Null()]),
|
|
17225
17370
|
backup_id: Union([String2({ pattern: "^logical-full_[a-z0-9-]{1,20}_[a-f0-9]{32}$" }), Null()]),
|
|
17226
17371
|
data_recovery: Literal("separate-required")
|
|
17227
|
-
},
|
|
17228
|
-
},
|
|
17372
|
+
}, closed9)
|
|
17373
|
+
}, closed9);
|
|
17229
17374
|
var phase = Union([Literal("pending"), Literal("ready"), Literal("failed"), Literal("cleaned")]);
|
|
17230
17375
|
var previewId = String2({ pattern: "^[a-f0-9-]{8,64}$" });
|
|
17231
17376
|
var name = String2({ minLength: 1, maxLength: 256 });
|
|
@@ -17235,7 +17380,7 @@ var ApplicationPreviewReceiptSchema2 = _Object_({
|
|
|
17235
17380
|
...scope2,
|
|
17236
17381
|
preview_id: previewId,
|
|
17237
17382
|
release_id: ApplicationReleaseIdSchema2,
|
|
17238
|
-
expires_at: Union([
|
|
17383
|
+
expires_at: Union([timestamp3, Null()]),
|
|
17239
17384
|
status: Union([
|
|
17240
17385
|
Literal("planned"),
|
|
17241
17386
|
Literal("provisioning"),
|
|
@@ -17244,35 +17389,35 @@ var ApplicationPreviewReceiptSchema2 = _Object_({
|
|
|
17244
17389
|
Literal("cleaned")
|
|
17245
17390
|
]),
|
|
17246
17391
|
resources: _Object_({
|
|
17247
|
-
build_artifact: _Object_({ status: phase, release_id: ApplicationReleaseIdSchema2 },
|
|
17392
|
+
build_artifact: _Object_({ status: phase, release_id: ApplicationReleaseIdSchema2 }, closed9),
|
|
17248
17393
|
database_branch: _Object_({
|
|
17249
17394
|
status: phase,
|
|
17250
17395
|
branch_ref: ref5,
|
|
17251
17396
|
data_mode: Union([Literal("schema_only"), Literal("full_clone")])
|
|
17252
|
-
},
|
|
17253
|
-
queue_namespace: _Object_({ status: phase, namespace: name },
|
|
17254
|
-
storage_namespace: _Object_({ status: phase, namespace: name },
|
|
17255
|
-
test_secret: _Object_({ status: phase, name, value_issued: Literal(false) },
|
|
17256
|
-
configuration_revision: _Object_({ status: phase, configuration_id: Union([ApplicationConfigurationIdSchema2, Null()]) },
|
|
17257
|
-
application_activation: _Object_({ status: phase, activation_id: nullableUuid },
|
|
17258
|
-
smoke_test: _Object_({ status: phase, checks, passed: checks, failed: checks },
|
|
17259
|
-
},
|
|
17397
|
+
}, closed9),
|
|
17398
|
+
queue_namespace: _Object_({ status: phase, namespace: name }, closed9),
|
|
17399
|
+
storage_namespace: _Object_({ status: phase, namespace: name }, closed9),
|
|
17400
|
+
test_secret: _Object_({ status: phase, name, value_issued: Literal(false) }, closed9),
|
|
17401
|
+
configuration_revision: _Object_({ status: phase, configuration_id: Union([ApplicationConfigurationIdSchema2, Null()]) }, closed9),
|
|
17402
|
+
application_activation: _Object_({ status: phase, activation_id: nullableUuid }, closed9),
|
|
17403
|
+
smoke_test: _Object_({ status: phase, checks, passed: checks, failed: checks }, closed9)
|
|
17404
|
+
}, closed9),
|
|
17260
17405
|
cleanup: _Object_({
|
|
17261
17406
|
required: Boolean2(),
|
|
17262
17407
|
completed: Boolean2(),
|
|
17263
17408
|
error: Union([String2({ pattern: "^[A-Z][A-Z0-9_]{0,63}$" }), Null()])
|
|
17264
|
-
},
|
|
17409
|
+
}, closed9),
|
|
17265
17410
|
branch_name: Optional(String2({ minLength: 1, maxLength: 80 })),
|
|
17266
17411
|
queue_name: Optional(name),
|
|
17267
17412
|
test_secret_name: Optional(name),
|
|
17268
17413
|
source_configuration_id: Optional(Union([ApplicationConfigurationIdSchema2, Null()])),
|
|
17269
|
-
created_at: Optional(
|
|
17270
|
-
updated_at: Optional(
|
|
17271
|
-
},
|
|
17414
|
+
created_at: Optional(timestamp3),
|
|
17415
|
+
updated_at: Optional(timestamp3)
|
|
17416
|
+
}, closed9);
|
|
17272
17417
|
var previewListSchema = _Object_({
|
|
17273
17418
|
...scope2,
|
|
17274
17419
|
previews: _Array_(ApplicationPreviewReceiptSchema2, { maxItems: 1000 })
|
|
17275
|
-
},
|
|
17420
|
+
}, closed9);
|
|
17276
17421
|
function assertScope(value, identity) {
|
|
17277
17422
|
if (value.project_ref !== identity.project_ref || value.application_id !== identity.application_id || value.environment_id !== identity.environment_id)
|
|
17278
17423
|
throw new Error("Application workflow scope mismatch");
|
|
@@ -17466,14 +17611,14 @@ var actionFields = {
|
|
|
17466
17611
|
reconcile_preview: ["preview_id"],
|
|
17467
17612
|
cleanup_preview: ["preview_id"]
|
|
17468
17613
|
};
|
|
17469
|
-
function
|
|
17614
|
+
function timestamp4(value) {
|
|
17470
17615
|
return Number.isFinite(Date.parse(value)) && new Date(value).toISOString() === value;
|
|
17471
17616
|
}
|
|
17472
17617
|
function receipt(value, identity) {
|
|
17473
17618
|
if (!Check2(receiptSchema, value) || value.project_ref !== identity.ref || value.application_id !== identity.id || value.environment_id !== identity.environment || identity.previewId && value.preview_id !== identity.previewId || value.resources.build_artifact.release_id !== value.release_id || value.resources.storage_namespace.namespace !== value.resources.database_branch.branch_ref) {
|
|
17474
17619
|
throw new Error("Invalid preview receipt");
|
|
17475
17620
|
}
|
|
17476
|
-
if (value.expires_at !== undefined && value.expires_at !== null && !
|
|
17621
|
+
if (value.expires_at !== undefined && value.expires_at !== null && !timestamp4(value.expires_at) || value.created_at !== undefined && !timestamp4(value.created_at) || value.updated_at !== undefined && !timestamp4(value.updated_at) || value.expires_at !== undefined && value.expires_at !== null && value.created_at !== undefined && !Check2(ttlSecondsSchema, (Date.parse(value.expires_at) - Date.parse(value.created_at)) / 1000)) {
|
|
17477
17622
|
throw new Error("Invalid preview expiry");
|
|
17478
17623
|
}
|
|
17479
17624
|
if (value.status === "ready") {
|
|
@@ -21200,22 +21345,22 @@ var starter_metadata_default = {
|
|
|
21200
21345
|
generatedBy: "supacloud/starter-metadata-v1",
|
|
21201
21346
|
packages: {
|
|
21202
21347
|
compiler: {
|
|
21203
|
-
version: "0.46.
|
|
21348
|
+
version: "0.46.1"
|
|
21204
21349
|
},
|
|
21205
21350
|
app: {
|
|
21206
|
-
version: "0.
|
|
21351
|
+
version: "0.27.0",
|
|
21207
21352
|
dependencies: {
|
|
21208
21353
|
rxjs: "7.8.2"
|
|
21209
21354
|
}
|
|
21210
21355
|
},
|
|
21211
21356
|
elysia: {
|
|
21212
|
-
version: "0.
|
|
21357
|
+
version: "0.30.0"
|
|
21213
21358
|
},
|
|
21214
21359
|
commands: {
|
|
21215
21360
|
version: "0.9.2"
|
|
21216
21361
|
},
|
|
21217
21362
|
contracts: {
|
|
21218
|
-
version: "0.
|
|
21363
|
+
version: "0.9.0"
|
|
21219
21364
|
},
|
|
21220
21365
|
db: {
|
|
21221
21366
|
version: "0.17.0",
|
|
@@ -26262,7 +26407,7 @@ import {
|
|
|
26262
26407
|
reverseDatabase
|
|
26263
26408
|
} from "@supacloud/db";
|
|
26264
26409
|
import { parseDatabaseSourcesConfig } from "@supacloud/db/source-contracts";
|
|
26265
|
-
var
|
|
26410
|
+
var hash4 = (content) => createHash7("sha256").update(content).digest("hex");
|
|
26266
26411
|
var result = (value, isError = false) => ({
|
|
26267
26412
|
isError,
|
|
26268
26413
|
content: [{ type: "text", text: JSON.stringify(value, null, 2) }]
|
|
@@ -26393,7 +26538,7 @@ async function initializeCandidate(stage, majorVersion = 17) {
|
|
|
26393
26538
|
await mkdir6(join14(stage, "supabase/migrations"), { recursive: true });
|
|
26394
26539
|
await mkdir6(join14(stage, "supabase/schemas"), { recursive: true });
|
|
26395
26540
|
await writeFile5(join14(stage, "supabase/config.toml"), [
|
|
26396
|
-
`project_id = "supacloud-candidate-${
|
|
26541
|
+
`project_id = "supacloud-candidate-${hash4(stage).slice(0, 12)}"`,
|
|
26397
26542
|
"[db]",
|
|
26398
26543
|
`major_version = ${majorVersion}`,
|
|
26399
26544
|
"[db.migrations]",
|
|
@@ -26521,7 +26666,7 @@ async function migrations(root, path) {
|
|
|
26521
26666
|
const files = [];
|
|
26522
26667
|
for (const file of names) {
|
|
26523
26668
|
const text = await readFile5(await projectPath2(root, `${path}/${file}`), "utf8");
|
|
26524
|
-
files.push({ file, text, sha256:
|
|
26669
|
+
files.push({ file, text, sha256: hash4(text) });
|
|
26525
26670
|
}
|
|
26526
26671
|
return { dir, files };
|
|
26527
26672
|
}
|
|
@@ -26551,7 +26696,7 @@ async function migrationAction(args, root, options) {
|
|
|
26551
26696
|
files: input.files.map(({ file, sha256 }) => ({ file, sha256 })),
|
|
26552
26697
|
dryRun
|
|
26553
26698
|
};
|
|
26554
|
-
const digest =
|
|
26699
|
+
const digest = hash4(JSON.stringify(report));
|
|
26555
26700
|
if (dryRun.isError)
|
|
26556
26701
|
return result({ ...report, ok: false, digest, executionPerformed: false }, true);
|
|
26557
26702
|
if (args.action === "plan")
|
|
@@ -28168,7 +28313,7 @@ async function requireProjectDeploymentProtocol(http, projectRef, environmentId)
|
|
|
28168
28313
|
throw new Error("DEPLOYMENT_PROTOCOL_MISMATCH: Upgrade the SupaCloud server and CLI together (`npm install -g @supacloud/cli@latest`), then retry `supacloud deploy`. No upload or deployment was attempted; legacy endpoints will not be used.");
|
|
28169
28314
|
}
|
|
28170
28315
|
}
|
|
28171
|
-
var
|
|
28316
|
+
var operation2 = "applications.project_deploy";
|
|
28172
28317
|
var scopeSchema = _Object_({
|
|
28173
28318
|
project_ref: String2({ pattern: "^[a-z0-9-]{1,20}$" }),
|
|
28174
28319
|
application_id: ApplicationIdSchema,
|
|
@@ -28217,7 +28362,7 @@ async function runProjectDeployment(http, args) {
|
|
|
28217
28362
|
...args.web_release === undefined ? {} : { web_release: args.web_release }
|
|
28218
28363
|
};
|
|
28219
28364
|
if (!Check2(scopeSchema, scope) || !Check2(ApplicationDeployRequestSchema, request) || request.configuration_id !== undefined && request.configuration_write !== undefined && request.configuration_id !== request.configuration_write.configuration_id) {
|
|
28220
|
-
return releaseControlFailure(
|
|
28365
|
+
return releaseControlFailure(operation2, "INVALID_RESPONSE", null);
|
|
28221
28366
|
}
|
|
28222
28367
|
const expected = { ...scope, request };
|
|
28223
28368
|
const identity = {
|
|
@@ -28235,13 +28380,13 @@ async function runProjectDeployment(http, args) {
|
|
|
28235
28380
|
}, { timeoutMs: 120000, maxJsonBytes: 131072, responseTimeoutMs: 30000 });
|
|
28236
28381
|
if (result.ok && result.status === 200) {
|
|
28237
28382
|
try {
|
|
28238
|
-
return releaseControlSuccess(
|
|
28383
|
+
return releaseControlSuccess(operation2, {
|
|
28239
28384
|
...responseReceipt(result.data, expected),
|
|
28240
28385
|
deployment_id: mutation_id
|
|
28241
28386
|
});
|
|
28242
28387
|
} catch {}
|
|
28243
28388
|
} else if (!result.ok && !result.transportError && !result.responseReadError && result.status < 500 && result.status !== 408) {
|
|
28244
|
-
return releaseControlMutationFailure(
|
|
28389
|
+
return releaseControlMutationFailure(operation2, result, identity);
|
|
28245
28390
|
}
|
|
28246
28391
|
const observed = await http.get(`${endpoint}/${encodeURIComponent(mutation_id)}`, {
|
|
28247
28392
|
retry: false,
|
|
@@ -28255,14 +28400,14 @@ async function runProjectDeployment(http, args) {
|
|
|
28255
28400
|
if (state.deployment_id !== mutation_id || state.project_ref !== scope.project_ref || state.application_id !== scope.application_id || state.environment_id !== scope.environment_id || state.status !== "succeeded" || state.phase !== "verifying")
|
|
28256
28401
|
throw new Error;
|
|
28257
28402
|
const receipt = parseApplicationDeployResult(state.receipt, expected);
|
|
28258
|
-
return releaseControlSuccess(
|
|
28403
|
+
return releaseControlSuccess(operation2, {
|
|
28259
28404
|
...receipt,
|
|
28260
28405
|
deployment_id: mutation_id,
|
|
28261
28406
|
replayed: true,
|
|
28262
28407
|
execution_performed: false
|
|
28263
28408
|
});
|
|
28264
28409
|
} catch {
|
|
28265
|
-
return releaseControlFailure(
|
|
28410
|
+
return releaseControlFailure(operation2, "OUTCOME_UNKNOWN", result.transportError ? null : result.status, identity);
|
|
28266
28411
|
}
|
|
28267
28412
|
}
|
|
28268
28413
|
|
|
@@ -29392,7 +29537,7 @@ function registerDeveloperExperienceTools(server, options = {}) {
|
|
|
29392
29537
|
// package.json
|
|
29393
29538
|
var package_default = {
|
|
29394
29539
|
name: "@supacloud/cli",
|
|
29395
|
-
version: "0.96.
|
|
29540
|
+
version: "0.96.2",
|
|
29396
29541
|
description: "Project-scoped CLI for SupaCloud users",
|
|
29397
29542
|
type: "module",
|
|
29398
29543
|
main: "./dist/index.js",
|
|
@@ -29444,14 +29589,14 @@ var package_default = {
|
|
|
29444
29589
|
directory: "packages/cli"
|
|
29445
29590
|
},
|
|
29446
29591
|
dependencies: {
|
|
29447
|
-
"@supacloud/compiler": "^0.46.
|
|
29448
|
-
"@supacloud/delivery": "0.
|
|
29592
|
+
"@supacloud/compiler": "^0.46.1",
|
|
29593
|
+
"@supacloud/delivery": "0.18.0",
|
|
29449
29594
|
"@supacloud/db": "0.17.0",
|
|
29450
29595
|
typebox: "1.3.36"
|
|
29451
29596
|
},
|
|
29452
29597
|
overrides: {
|
|
29453
|
-
"@supacloud/contracts": "0.
|
|
29454
|
-
"@supacloud/delivery": "0.
|
|
29598
|
+
"@supacloud/contracts": "0.9.0",
|
|
29599
|
+
"@supacloud/delivery": "0.18.0",
|
|
29455
29600
|
"@graphql-tools/utils": "^12.0.3"
|
|
29456
29601
|
},
|
|
29457
29602
|
devDependencies: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supacloud/cli",
|
|
3
|
-
"version": "0.96.
|
|
3
|
+
"version": "0.96.2",
|
|
4
4
|
"description": "Project-scoped CLI for SupaCloud users",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"directory": "packages/cli"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@supacloud/compiler": "^0.46.
|
|
56
|
-
"@supacloud/delivery": "0.
|
|
55
|
+
"@supacloud/compiler": "^0.46.1",
|
|
56
|
+
"@supacloud/delivery": "0.18.0",
|
|
57
57
|
"@supacloud/db": "0.17.0",
|
|
58
58
|
"typebox": "1.3.36"
|
|
59
59
|
},
|
|
60
60
|
"overrides": {
|
|
61
|
-
"@supacloud/contracts": "0.
|
|
62
|
-
"@supacloud/delivery": "0.
|
|
61
|
+
"@supacloud/contracts": "0.9.0",
|
|
62
|
+
"@supacloud/delivery": "0.18.0",
|
|
63
63
|
"@graphql-tools/utils": "^12.0.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|