@sylphx/cli 0.14.8 → 0.14.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/main.js +42 -4
- package/dist/main.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @sylphx/cli
|
|
2
2
|
|
|
3
|
+
## 0.14.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`38d2c64`](https://github.com/SylphxAI/platform/commit/38d2c648a79294ff454cd003e4ca5e98027d8a2f)]:
|
|
8
|
+
- @sylphx/sdk@0.15.4
|
|
9
|
+
|
|
10
|
+
## 0.14.9
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#1546](https://github.com/SylphxAI/platform/pull/1546) [`0412606`](https://github.com/SylphxAI/platform/commit/04126068505391fa9a7aee21681e18dc083bb0a1) Thanks [@shtse8](https://github.com/shtse8)! - Scope deploy log terminal status to the active build record and verify the deployment rollout separately before reporting success.
|
|
15
|
+
|
|
3
16
|
## 0.14.8
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -15,7 +15,7 @@ var init_package = __esm({
|
|
|
15
15
|
"package.json"() {
|
|
16
16
|
package_default = {
|
|
17
17
|
name: "@sylphx/cli",
|
|
18
|
-
version: "0.14.
|
|
18
|
+
version: "0.14.10",
|
|
19
19
|
description: "Sylphx Platform CLI \u2014 deploy and manage your applications from the terminal. 63 commands across deployment, logs, env vars, domains, databases, storage, monitoring, self-service (user), admin (users/quotas/audit/invitations/jwt-keys/project-migrate), and more.",
|
|
20
20
|
type: "module",
|
|
21
21
|
homepage: "https://sylphx.com",
|
|
@@ -71,7 +71,7 @@ var init_package = __esm({
|
|
|
71
71
|
"@effect/cli": "0.75.1",
|
|
72
72
|
"@effect/platform": "0.96.0",
|
|
73
73
|
"@effect/platform-bun": "0.89.0",
|
|
74
|
-
"@sylphx/sdk": "0.15.
|
|
74
|
+
"@sylphx/sdk": "0.15.4",
|
|
75
75
|
chalk: "^5.3.0",
|
|
76
76
|
effect: "3.21.0",
|
|
77
77
|
eventsource: "^2.0.2",
|
|
@@ -7588,7 +7588,7 @@ var init_databases = __esm({
|
|
|
7588
7588
|
|
|
7589
7589
|
// ../contract/dist/schemas/deployment.js
|
|
7590
7590
|
import { Schema as Schema53 } from "effect";
|
|
7591
|
-
var DeploymentEnvironmentStatus, DeploymentStatus, DeployResult, DeploymentHistoryItem, DeploymentHistoryResult, RollbackResult, ProjectStatusEnvironment, ProjectStatus, DeploymentServiceStatus, DeploymentDetail, DeploySupplyChain, TriggerDeploymentFrameworkSignals, DeploymentServiceNamePattern, DeploymentServiceName, TriggerDeploymentInput, RollbackDeploymentInput, DeployServiceStatus, EnvScopedAppEnvInfo, EnvScopedAppDeployments, EnvScopedTriggerDeployResult, EnvScopedRollbackByCommitInput, EnvScopedRollbackByCommitResult, CancelBuildResult, BuildDetail, EnvScopedEnvVar, EnvScopedListEnvVarsResult, EnvScopedSetEnvVarInput, EnvScopedSetEnvVarResult, EnvScopedDeleteEnvVarResult, EnvScopedDeploymentView, EnvScopedDeploymentHistory, EnvScopedAppHealthStatus, EnvServiceRollbackInput, EnvServiceRollbackResult, PromoteArtifactInput, PromoteArtifactResult, DeployStatusLiteral, TriggerSourceLiteral, EnvServiceHistoryDeployment, EnvServiceHistoryResult;
|
|
7591
|
+
var DeploymentEnvironmentStatus, DeploymentStatus, DeployBuildPlanFailure, QueuedBuildDispatch, DeployResult, DeploymentHistoryItem, DeploymentHistoryResult, RollbackResult, ProjectStatusEnvironment, ProjectStatus, DeploymentServiceStatus, DeploymentDetail, DeploySupplyChain, TriggerDeploymentFrameworkSignals, DeploymentServiceNamePattern, DeploymentServiceName, TriggerDeploymentInput, RollbackDeploymentInput, DeployServiceStatus, EnvScopedAppEnvInfo, EnvScopedAppDeployments, EnvScopedTriggerDeployResult, EnvScopedRollbackByCommitInput, EnvScopedRollbackByCommitResult, CancelBuildResult, BuildDetail, EnvScopedEnvVar, EnvScopedListEnvVarsResult, EnvScopedSetEnvVarInput, EnvScopedSetEnvVarResult, EnvScopedDeleteEnvVarResult, EnvScopedDeploymentView, EnvScopedDeploymentHistory, EnvScopedAppHealthStatus, EnvServiceRollbackInput, EnvServiceRollbackResult, PromoteArtifactInput, PromoteArtifactResult, DeployStatusLiteral, TriggerSourceLiteral, EnvServiceHistoryDeployment, EnvServiceHistoryResult;
|
|
7592
7592
|
var init_deployment = __esm({
|
|
7593
7593
|
"../contract/dist/schemas/deployment.js"() {
|
|
7594
7594
|
"use strict";
|
|
@@ -7617,6 +7617,18 @@ var init_deployment = __esm({
|
|
|
7617
7617
|
})),
|
|
7618
7618
|
environments: Schema53.optional(Schema53.Array(DeploymentEnvironmentStatus))
|
|
7619
7619
|
});
|
|
7620
|
+
DeployBuildPlanFailure = Schema53.Struct({
|
|
7621
|
+
serviceId: ServiceId,
|
|
7622
|
+
serviceName: Schema53.NullOr(Schema53.String),
|
|
7623
|
+
code: Schema53.String,
|
|
7624
|
+
hint: Schema53.NullOr(Schema53.String),
|
|
7625
|
+
message: Schema53.String
|
|
7626
|
+
});
|
|
7627
|
+
QueuedBuildDispatch = Schema53.Struct({
|
|
7628
|
+
serviceId: ServiceId,
|
|
7629
|
+
serviceName: Schema53.NullOr(Schema53.String),
|
|
7630
|
+
reason: Schema53.Literal("admission_deferred")
|
|
7631
|
+
});
|
|
7620
7632
|
DeployResult = Schema53.Struct({
|
|
7621
7633
|
deploymentId: Schema53.optional(DeploymentId),
|
|
7622
7634
|
deploymentRecordId: Schema53.optional(DeploymentId),
|
|
@@ -7627,7 +7639,9 @@ var init_deployment = __esm({
|
|
|
7627
7639
|
status: Schema53.String,
|
|
7628
7640
|
environment: Schema53.optional(Schema53.String),
|
|
7629
7641
|
message: Schema53.optional(Schema53.String),
|
|
7630
|
-
triggeredAt: Schema53.optional(Schema53.String)
|
|
7642
|
+
triggeredAt: Schema53.optional(Schema53.String),
|
|
7643
|
+
buildPlanFailures: Schema53.optional(Schema53.Array(DeployBuildPlanFailure)),
|
|
7644
|
+
queuedBuildDispatches: Schema53.optional(Schema53.Array(QueuedBuildDispatch))
|
|
7631
7645
|
});
|
|
7632
7646
|
DeploymentHistoryItem = Schema53.Struct({
|
|
7633
7647
|
id: DeploymentId,
|
|
@@ -20595,6 +20609,7 @@ async function createEnvironmentLogStream(envId, options = {}) {
|
|
|
20595
20609
|
limit: String(options.limit ?? 200)
|
|
20596
20610
|
});
|
|
20597
20611
|
if (options.deploymentId) params.set("deploymentId", options.deploymentId);
|
|
20612
|
+
if (options.buildId) params.set("buildId", options.buildId);
|
|
20598
20613
|
if (options.since) params.set("since", options.since);
|
|
20599
20614
|
if (options.level) params.set("level", options.level);
|
|
20600
20615
|
const preferredOrgId = options.orgId ?? resolvePreferredOrgId();
|
|
@@ -26931,12 +26946,29 @@ function deployLogStreamEffect(api2, projectId, envType, result, orgId) {
|
|
|
26931
26946
|
return api2.createEnvironmentLogStream(result.envId, {
|
|
26932
26947
|
type: "build",
|
|
26933
26948
|
deploymentId: deploymentId2,
|
|
26949
|
+
...result.buildRecordId ? { buildId: result.buildRecordId } : {},
|
|
26934
26950
|
...orgId ? { orgId } : {}
|
|
26935
26951
|
});
|
|
26936
26952
|
}
|
|
26937
26953
|
const logScope = orgId || result.envId ? { ...orgId ? { orgId } : {}, ...result.envId ? { envId: result.envId } : {} } : void 0;
|
|
26938
26954
|
return api2.createLogStream(projectId, envType, logScope);
|
|
26939
26955
|
}
|
|
26956
|
+
function verifyDeploymentAfterBuildLogs(api2, id, orgId, timeoutMs) {
|
|
26957
|
+
return Effect28.gen(function* () {
|
|
26958
|
+
yield* Console17.log("");
|
|
26959
|
+
yield* Console17.log(chalk_default.dim(" Verifying authoritative deployment state..."));
|
|
26960
|
+
yield* withSpinner(
|
|
26961
|
+
`Waiting for deployment ${chalk_default.bold(id)} rollout...`,
|
|
26962
|
+
waitForDeploymentSuccessEffect(api2, {
|
|
26963
|
+
id,
|
|
26964
|
+
...orgId ? { orgId } : {},
|
|
26965
|
+
command: "deploy",
|
|
26966
|
+
timeoutMs
|
|
26967
|
+
})
|
|
26968
|
+
);
|
|
26969
|
+
return true;
|
|
26970
|
+
});
|
|
26971
|
+
}
|
|
26940
26972
|
function reconcileDeploymentAfterLogStreamIssue(api2, id, orgId, reason, timeoutMs) {
|
|
26941
26973
|
return Effect28.gen(function* () {
|
|
26942
26974
|
yield* Console17.log("");
|
|
@@ -27097,6 +27129,12 @@ The trigger response did not include a deployment id, so the authoritative deplo
|
|
|
27097
27129
|
})
|
|
27098
27130
|
);
|
|
27099
27131
|
}
|
|
27132
|
+
if (result.buildRecordId) {
|
|
27133
|
+
const id = deploymentRecordId(result);
|
|
27134
|
+
if (id) {
|
|
27135
|
+
yield* verifyDeploymentAfterBuildLogs(api2, id, orgId, reconcileTimeoutMs);
|
|
27136
|
+
}
|
|
27137
|
+
}
|
|
27100
27138
|
yield* Console17.log("");
|
|
27101
27139
|
yield* Console17.log(chalk_default.green.bold(" \u2713 Deployment successful!"));
|
|
27102
27140
|
yield* Console17.log("");
|