@prisma/compute-sdk 0.29.0 → 0.31.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/dist/api-client.d.ts +38 -38
- package/dist/api-client.d.ts.map +1 -1
- package/dist/api-client.js +44 -43
- package/dist/api-client.js.map +1 -1
- package/dist/callbacks.d.ts +33 -33
- package/dist/callbacks.d.ts.map +1 -1
- package/dist/compute-client.d.ts +66 -66
- package/dist/compute-client.d.ts.map +1 -1
- package/dist/compute-client.js +274 -272
- package/dist/compute-client.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/index.js.map +1 -1
- package/dist/config/normalize.d.ts +3 -1
- package/dist/config/normalize.d.ts.map +1 -1
- package/dist/config/normalize.js +24 -6
- package/dist/config/normalize.js.map +1 -1
- package/dist/config/serialize.d.ts.map +1 -1
- package/dist/config/serialize.js +26 -3
- package/dist/config/serialize.js.map +1 -1
- package/dist/config/types.d.ts +15 -3
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +9 -0
- package/dist/config/types.js.map +1 -1
- package/dist/errors.d.ts +28 -28
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +12 -12
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/log-stream.d.ts +1 -1
- package/dist/log-stream.d.ts.map +1 -1
- package/dist/log-stream.js +1 -1
- package/dist/log-stream.js.map +1 -1
- package/dist/polling.d.ts +4 -4
- package/dist/polling.d.ts.map +1 -1
- package/dist/polling.js +15 -15
- package/dist/polling.js.map +1 -1
- package/dist/types.d.ts +9 -8
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -8
- package/dist/types.js.map +1 -1
- package/package.json +2 -2
- package/src/api-client.ts +57 -63
- package/src/callbacks.ts +34 -34
- package/src/compute-client.ts +433 -413
- package/src/config/index.ts +3 -0
- package/src/config/normalize.ts +58 -5
- package/src/config/serialize.ts +39 -4
- package/src/config/types.ts +27 -2
- package/src/errors.ts +42 -38
- package/src/index.ts +27 -26
- package/src/log-stream.ts +2 -2
- package/src/polling.ts +19 -18
- package/src/types.ts +13 -17
package/dist/errors.d.ts
CHANGED
|
@@ -36,43 +36,43 @@ declare const ArtifactError_base: import("better-result").TaggedErrorClass<"Arti
|
|
|
36
36
|
export declare class ArtifactError extends ArtifactError_base {
|
|
37
37
|
}
|
|
38
38
|
declare const TimeoutError_base: import("better-result").TaggedErrorClass<"TimeoutError", {
|
|
39
|
-
|
|
39
|
+
deploymentId: string;
|
|
40
40
|
elapsedMs: number;
|
|
41
41
|
lastStatus: string;
|
|
42
42
|
message: string;
|
|
43
43
|
}>;
|
|
44
44
|
export declare class TimeoutError extends TimeoutError_base {
|
|
45
45
|
constructor(args: {
|
|
46
|
-
|
|
46
|
+
deploymentId: string;
|
|
47
47
|
elapsedMs: number;
|
|
48
48
|
lastStatus: string;
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
declare const
|
|
52
|
-
|
|
51
|
+
declare const DeploymentFailedError_base: import("better-result").TaggedErrorClass<"DeploymentFailedError", {
|
|
52
|
+
deploymentId: string;
|
|
53
53
|
message: string;
|
|
54
54
|
}>;
|
|
55
|
-
export declare class
|
|
55
|
+
export declare class DeploymentFailedError extends DeploymentFailedError_base {
|
|
56
56
|
constructor(args: {
|
|
57
|
-
|
|
57
|
+
deploymentId: string;
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
declare const
|
|
61
|
-
|
|
60
|
+
declare const NoExistingDeploymentError_base: import("better-result").TaggedErrorClass<"NoExistingDeploymentError", {
|
|
61
|
+
appId: string;
|
|
62
62
|
message: string;
|
|
63
63
|
}>;
|
|
64
|
-
export declare class
|
|
64
|
+
export declare class NoExistingDeploymentError extends NoExistingDeploymentError_base {
|
|
65
65
|
constructor(args: {
|
|
66
|
-
|
|
66
|
+
appId: string;
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
declare const
|
|
70
|
-
|
|
69
|
+
declare const NoDeploymentsFoundError_base: import("better-result").TaggedErrorClass<"NoDeploymentsFoundError", {
|
|
70
|
+
appId: string;
|
|
71
71
|
message: string;
|
|
72
72
|
}>;
|
|
73
|
-
export declare class
|
|
73
|
+
export declare class NoDeploymentsFoundError extends NoDeploymentsFoundError_base {
|
|
74
74
|
constructor(args: {
|
|
75
|
-
|
|
75
|
+
appId: string;
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
declare const CancelledError_base: import("better-result").TaggedErrorClass<"CancelledError", {
|
|
@@ -85,21 +85,21 @@ export declare class CancelledError extends CancelledError_base {
|
|
|
85
85
|
}
|
|
86
86
|
declare const DestroyAggregateError_base: import("better-result").TaggedErrorClass<"DestroyAggregateError", {
|
|
87
87
|
message: string;
|
|
88
|
-
|
|
88
|
+
succeededDeploymentIds: string[];
|
|
89
89
|
failures: Array<{
|
|
90
|
-
|
|
91
|
-
error:
|
|
90
|
+
deploymentId: string;
|
|
91
|
+
error: DeploymentOperationError;
|
|
92
92
|
}>;
|
|
93
|
-
|
|
93
|
+
appDeleted: boolean;
|
|
94
94
|
}>;
|
|
95
95
|
export declare class DestroyAggregateError extends DestroyAggregateError_base {
|
|
96
96
|
constructor(args: {
|
|
97
|
-
|
|
97
|
+
succeededDeploymentIds: string[];
|
|
98
98
|
failures: Array<{
|
|
99
|
-
|
|
100
|
-
error:
|
|
99
|
+
deploymentId: string;
|
|
100
|
+
error: DeploymentOperationError;
|
|
101
101
|
}>;
|
|
102
|
-
|
|
102
|
+
appDeleted: boolean;
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
declare const InvalidOptionsError_base: import("better-result").TaggedErrorClass<"InvalidOptionsError", {
|
|
@@ -113,12 +113,12 @@ declare const LogStreamError_base: import("better-result").TaggedErrorClass<"Log
|
|
|
113
113
|
}>;
|
|
114
114
|
export declare class LogStreamError extends LogStreamError_base {
|
|
115
115
|
}
|
|
116
|
-
export type DeployError = AuthenticationError | ApiError | MissingArgumentError | InvalidOptionsError | BuildError | ArtifactError | TimeoutError |
|
|
117
|
-
export type UpdateEnvError = AuthenticationError | ApiError | MissingArgumentError | InvalidOptionsError |
|
|
118
|
-
export type
|
|
119
|
-
export type
|
|
120
|
-
export type PromoteError = AuthenticationError | ApiError | MissingArgumentError |
|
|
116
|
+
export type DeployError = AuthenticationError | ApiError | MissingArgumentError | InvalidOptionsError | BuildError | ArtifactError | TimeoutError | DeploymentFailedError | CancelledError;
|
|
117
|
+
export type UpdateEnvError = AuthenticationError | ApiError | MissingArgumentError | InvalidOptionsError | NoExistingDeploymentError | TimeoutError | DeploymentFailedError | CancelledError;
|
|
118
|
+
export type DestroyDeploymentError = CancelledError | MissingArgumentError | NoDeploymentsFoundError | AuthenticationError | ApiError | TimeoutError | DeploymentFailedError;
|
|
119
|
+
export type DestroyAppError = CancelledError | AuthenticationError | ApiError | DestroyAggregateError;
|
|
120
|
+
export type PromoteError = AuthenticationError | ApiError | MissingArgumentError | NoDeploymentsFoundError | TimeoutError | DeploymentFailedError | CancelledError;
|
|
121
121
|
export type ApiRequestError = CancelledError | AuthenticationError | ApiError;
|
|
122
|
-
export type
|
|
122
|
+
export type DeploymentOperationError = CancelledError | AuthenticationError | ApiError | TimeoutError | DeploymentFailedError;
|
|
123
123
|
export {};
|
|
124
124
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";gBAGc,GAAG;aACN,MAAM;;AAFjB,qBAAa,mBAAoB,SAAQ,wBAGrC;CAAG;;gBAGO,MAAM;gBACN,MAAM;WACX,MAAM;aACJ,MAAM;WACR,MAAM;kBACC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;;AANtC,qBAAa,QA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Z,qBAAqB,CAAC;AAE1B,MAAM,MAAM,eAAe,GACvB,cAAc,GACd,mBAAmB,GACnB,QAAQ,GACR,qBAAqB,CAAC;AAE1B,MAAM,MAAM,YAAY,GACpB,mBAAmB,GACnB,QAAQ,GACR,oBAAoB,GACpB,uBAAuB,GACvB,YAAY,GACZ,qBAAqB,GACrB,cAAc,CAAC;AAEnB,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG,mBAAmB,GAAG,QAAQ,CAAC;AAE9E,MAAM,MAAM,wBAAwB,GAChC,cAAc,GACd,mBAAmB,GACnB,QAAQ,GACR,YAAY,GACZ,qBAAqB,CAAC"}
|
package/dist/errors.js
CHANGED
|
@@ -19,31 +19,31 @@ export class TimeoutError extends TaggedError("TimeoutError")() {
|
|
|
19
19
|
constructor(args) {
|
|
20
20
|
super({
|
|
21
21
|
...args,
|
|
22
|
-
message: `Timed out waiting for
|
|
22
|
+
message: `Timed out waiting for deployment ${args.deploymentId} to reach target state (last status: ${args.lastStatus}, elapsed: ${Math.round(args.elapsedMs / 1000)}s)`,
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
export class
|
|
26
|
+
export class DeploymentFailedError extends TaggedError("DeploymentFailedError")() {
|
|
27
27
|
constructor(args) {
|
|
28
28
|
super({
|
|
29
|
-
|
|
30
|
-
message: `
|
|
29
|
+
deploymentId: args.deploymentId,
|
|
30
|
+
message: `Deployment ${args.deploymentId} transitioned to failed status`,
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
export class
|
|
34
|
+
export class NoExistingDeploymentError extends TaggedError("NoExistingDeploymentError")() {
|
|
35
35
|
constructor(args) {
|
|
36
36
|
super({
|
|
37
|
-
|
|
38
|
-
message: `
|
|
37
|
+
appId: args.appId,
|
|
38
|
+
message: `App ${args.appId} has no existing deployments. Environment-only updates require at least one prior deployment.`,
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
export class
|
|
42
|
+
export class NoDeploymentsFoundError extends TaggedError("NoDeploymentsFoundError")() {
|
|
43
43
|
constructor(args) {
|
|
44
44
|
super({
|
|
45
|
-
|
|
46
|
-
message: `
|
|
45
|
+
appId: args.appId,
|
|
46
|
+
message: `App ${args.appId} has no deployments`,
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -54,10 +54,10 @@ export class CancelledError extends TaggedError("CancelledError")() {
|
|
|
54
54
|
}
|
|
55
55
|
export class DestroyAggregateError extends TaggedError("DestroyAggregateError")() {
|
|
56
56
|
constructor(args) {
|
|
57
|
-
const failedIds = args.failures.map((f) => f.
|
|
57
|
+
const failedIds = args.failures.map((f) => f.deploymentId).join(", ");
|
|
58
58
|
super({
|
|
59
59
|
...args,
|
|
60
|
-
message: `Failed to destroy ${args.failures.length}
|
|
60
|
+
message: `Failed to destroy ${args.failures.length} deployment(s): ${failedIds}`,
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
}
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,OAAO,mBAAoB,SAAQ,WAAW,CAAC,qBAAqB,CAAC,EAGvE;CAAG;AAEP,MAAM,OAAO,QAAS,SAAQ,WAAW,CAAC,UAAU,CAAC,EAOjD;CAAG;AAEP,MAAM,OAAO,oBAAqB,SAAQ,WAAW,CAAC,sBAAsB,CAAC,EAGzE;IACF,YAAY,IAAuB;QACjC,KAAK,CAAC;YACJ,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,8BAA8B,IAAI,CAAC,KAAK,EAAE;SACpD,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,UAAW,SAAQ,WAAW,CAAC,YAAY,CAAC,EAGrD;CAAG;AAEP,MAAM,OAAO,aAA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AAG"}
|
package/dist/index.d.ts
CHANGED
|
@@ -11,21 +11,21 @@ export { type BuildSettings, joinPosix, nextOutputRootFromStandaloneDirectory, r
|
|
|
11
11
|
export type { BuildArtifact, BuildStrategy } from "./build-strategy.ts";
|
|
12
12
|
export { PreBuilt } from "./build-strategy.ts";
|
|
13
13
|
export { BunBuild } from "./bun-build.ts";
|
|
14
|
-
export type { DeployInteraction, DeployProgress,
|
|
15
|
-
export type {
|
|
14
|
+
export type { DeployInteraction, DeployProgress, DestroyAppProgress, DestroyDeploymentInteraction, DestroyDeploymentProgress, PromoteProgress, UpdateEnvProgress, } from "./callbacks.ts";
|
|
15
|
+
export type { CreateAppOptions, CreateProjectOptions, DeleteAppOptions, DeleteDeploymentOptions, DeployOptions, DeployResult, DestroyAppOptions, DestroyAppResult, DestroyDeploymentOptions, DestroyDeploymentResult, ListAppsOptions, ListDeploymentsOptions, ListProjectsOptions, PromoteOptions, PromoteResult, ShowAppOptions, ShowDeploymentOptions, StartDeploymentOptions, StopDeploymentOptions, UpdateEnvOptions, UpdateEnvResult, } from "./compute-client.ts";
|
|
16
16
|
export { ComputeClient } from "./compute-client.ts";
|
|
17
17
|
export { CustomBuild } from "./custom-build.ts";
|
|
18
18
|
export type { DetectedSchema, MigrationCommand, SchemaDetection, SchemaEngine, UnsupportedSchema, UnsupportedSchemaTarget, } from "./detect-schema.ts";
|
|
19
19
|
export { detectAppSchema } from "./detect-schema.ts";
|
|
20
|
-
export type { ApiRequestError, DeployError,
|
|
21
|
-
export { ApiError, ArtifactError, AuthenticationError, BuildError, CancelledError, DestroyAggregateError, InvalidOptionsError, LogStreamError, MissingArgumentError,
|
|
20
|
+
export type { ApiRequestError, DeployError, DeploymentOperationError, DestroyAppError, DestroyDeploymentError, PromoteError, UpdateEnvError, } from "./errors.ts";
|
|
21
|
+
export { ApiError, ArtifactError, AuthenticationError, BuildError, CancelledError, DeploymentFailedError, DestroyAggregateError, InvalidOptionsError, LogStreamError, MissingArgumentError, NoDeploymentsFoundError, NoExistingDeploymentError, TimeoutError, } from "./errors.ts";
|
|
22
22
|
export type { LogRecord, LogStreamOptions, StreamLogsError, StreamRecord, StreamResult, TerminalRecord, } from "./log-stream.ts";
|
|
23
23
|
export { streamLogs } from "./log-stream.ts";
|
|
24
24
|
export { NestjsBuild } from "./nestjs-build.ts";
|
|
25
25
|
export { NextjsBuild } from "./nextjs-build.ts";
|
|
26
26
|
export { NuxtBuild } from "./nuxt-build.ts";
|
|
27
27
|
export { TanstackStartBuild } from "./tanstack-start-build.ts";
|
|
28
|
-
export type {
|
|
28
|
+
export type { AppDetail, AppInfo, ComputeRegion, CreateProjectResult, DatabaseInfo, DeploymentDetail, DeploymentInfo, PortMapping, ProjectInfo, RegionInfo, ResolvedConfig, } from "./types.ts";
|
|
29
29
|
export { KNOWN_REGION_IDS, REGIONS } from "./types.ts";
|
|
30
30
|
export { uploadArtifact } from "./upload-artifact.ts";
|
|
31
31
|
export { type BuildCommandIo, buildCommandEnv, type PackageManager, type PackageManifest, readBuildScript, readPackageManifest, resolvePackageManager, runBuildCommand, } from "./workspace.ts";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,GAAG,EACH,UAAU,EACV,iBAAiB,EACjB,EAAE,EACF,KAAK,MAAM,EACX,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,k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,EACvB,yBAAyB,EACzB,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,YAAY,EACV,SAAS,EACT,OAAO,EACP,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,WAAW,EACX,UAAU,EACV,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,KAAK,cAAc,EACnB,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,GAChB,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ export { BunBuild } from "./bun-build.js";
|
|
|
13
13
|
export { ComputeClient } from "./compute-client.js";
|
|
14
14
|
export { CustomBuild } from "./custom-build.js";
|
|
15
15
|
export { detectAppSchema } from "./detect-schema.js";
|
|
16
|
-
export { ApiError, ArtifactError, AuthenticationError, BuildError, CancelledError, DestroyAggregateError, InvalidOptionsError, LogStreamError, MissingArgumentError,
|
|
16
|
+
export { ApiError, ArtifactError, AuthenticationError, BuildError, CancelledError, DeploymentFailedError, DestroyAggregateError, InvalidOptionsError, LogStreamError, MissingArgumentError, NoDeploymentsFoundError, NoExistingDeploymentError, TimeoutError, } from "./errors.js";
|
|
17
17
|
export { streamLogs } from "./log-stream.js";
|
|
18
18
|
export { NestjsBuild } from "./nestjs-build.js";
|
|
19
19
|
export { NextjsBuild } from "./nextjs-build.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,OAAO,EACL,GAAG,EACH,UAAU,EACV,iBAAiB,EACjB,EAAE,EAEF,WAAW,GACZ,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAGL,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,YAAY,CAAC;AACpB,OAAO,EAEL,SAAS,EACT,qCAAqC,EACrC,oBAAoB,EACpB,oBAAoB,EACpB,8BAA8B,GAC/B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAiC1C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAShD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAUrD,OAAO,EACL,QAAQ,EACR,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,cAAc,EACd,qBAAqB,EACr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C;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAc/D,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAEL,eAAe,EAGf,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,GAChB,MAAM,gBAAgB,CAAC"}
|
package/dist/log-stream.d.ts
CHANGED
package/dist/log-stream.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-stream.d.ts","sourceRoot":"","sources":["../src/log-stream.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAI7D,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,cAAc,CAAC;AAEtD,MAAM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eAAe,GAAG,cAAc,GAAG,cAAc,CAAC;AA6J9D;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,GACvC,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC,CAUhD"}
|
package/dist/log-stream.js
CHANGED
|
@@ -24,7 +24,7 @@ function toError(value) {
|
|
|
24
24
|
return new Error(String(value));
|
|
25
25
|
}
|
|
26
26
|
function buildWebSocketUrl(options) {
|
|
27
|
-
const httpUrl = new URL(`/v1/
|
|
27
|
+
const httpUrl = new URL(`/v1/deployments/${encodeURIComponent(options.deploymentId)}/logs`, options.baseUrl);
|
|
28
28
|
httpUrl.protocol = httpUrl.protocol === "https:" ? "wss:" : "ws:";
|
|
29
29
|
if (options.tail != null)
|
|
30
30
|
httpUrl.searchParams.set("tail", String(options.tail));
|
package/dist/log-stream.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-stream.js","sourceRoot":"","sources":["../src/log-stream.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,SAAS,MAAM,IAAI,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,KAAK,GAAG,KAAK,IAAI,UAAU,CAAC;AAsClC,SAAS,cAAc,CAAC,IAAY,EAAE,UAAkB;IACtD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAG7B,CAAC;QACF,OAAO,MAAM,CAAC,KAAK,EAAE,OAAO,IAAI,MAAM,CAAC,OAAO,IAAI,QAAQ,UAAU,EAAE,CAAC;IACzE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,IAAI,QAAQ,UAAU,EAAE,CAAC;IACtC,CAAC;AACH,CAAC;AAED,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+1,6 @@
|
|
|
1
1
|
import { Result } from "better-result";
|
|
2
2
|
import type { ApiClientError, InternalApiClient } from "./api-client.ts";
|
|
3
|
-
import { CancelledError,
|
|
3
|
+
import { CancelledError, DeploymentFailedError, TimeoutError } from "./errors.ts";
|
|
4
4
|
export type PollOptions = {
|
|
5
5
|
targetStatus: "running" | "stopped";
|
|
6
6
|
timeoutSeconds: number;
|
|
@@ -12,11 +12,11 @@ export type PollResult = {
|
|
|
12
12
|
previewDomain: string;
|
|
13
13
|
lastStatus: string;
|
|
14
14
|
};
|
|
15
|
-
export type PollError = CancelledError | TimeoutError |
|
|
15
|
+
export type PollError = CancelledError | TimeoutError | DeploymentFailedError | ApiClientError;
|
|
16
16
|
/**
|
|
17
|
-
* Polls a
|
|
17
|
+
* Polls a deployment until it reaches the target status, fails, or times out.
|
|
18
18
|
*
|
|
19
19
|
* Returns a Result with the preview domain on success or a typed error.
|
|
20
20
|
*/
|
|
21
|
-
export declare function
|
|
21
|
+
export declare function pollDeploymentStatus(api: InternalApiClient, deploymentId: string, options: PollOptions): Promise<Result<PollResult, PollError>>;
|
|
22
22
|
//# sourceMappingURL=polling.d.ts.map
|
package/dist/polling.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polling.d.ts","sourceRoot":"","sources":["../src/polling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAEL,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"polling.d.ts","sourceRoot":"","sources":["../src/polling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAEL,cAAc,EACd,qBAAqB,EACrB,YAAY,EACb,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY,EAAE,SAAS,GAAG,SAAS,CAAC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,SAAS,GACjB,cAAc,GACd,YAAY,GACZ,qBAAqB,GACrB,cAAc,CAAC;AAEnB;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,iBAAiB,EACtB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAoDxC"}
|
package/dist/polling.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Result } from "better-result";
|
|
2
|
-
import { ApiError, CancelledError,
|
|
2
|
+
import { ApiError, CancelledError, DeploymentFailedError, TimeoutError, } from "./errors.js";
|
|
3
3
|
/**
|
|
4
|
-
* Polls a
|
|
4
|
+
* Polls a deployment until it reaches the target status, fails, or times out.
|
|
5
5
|
*
|
|
6
6
|
* Returns a Result with the preview domain on success or a typed error.
|
|
7
7
|
*/
|
|
8
|
-
export async function
|
|
8
|
+
export async function pollDeploymentStatus(api, deploymentId, options) {
|
|
9
9
|
return Result.gen(async function* () {
|
|
10
10
|
const deadline = Date.now() + options.timeoutSeconds * 1_000;
|
|
11
11
|
let lastStatus = "";
|
|
@@ -13,32 +13,32 @@ export async function pollVersionStatus(api, versionId, options) {
|
|
|
13
13
|
if (options.signal?.aborted) {
|
|
14
14
|
return Result.err(new CancelledError());
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
18
|
-
lastStatus =
|
|
19
|
-
options.onStatusChange?.(
|
|
16
|
+
const deployment = yield* Result.await(api.getDeployment(deploymentId, options.signal));
|
|
17
|
+
if (deployment.status !== lastStatus) {
|
|
18
|
+
lastStatus = deployment.status;
|
|
19
|
+
options.onStatusChange?.(deployment.status);
|
|
20
20
|
}
|
|
21
|
-
if (
|
|
22
|
-
if (options.targetStatus === "running" && !
|
|
21
|
+
if (deployment.status === options.targetStatus) {
|
|
22
|
+
if (options.targetStatus === "running" && !deployment.previewDomain) {
|
|
23
23
|
return Result.err(new ApiError({
|
|
24
24
|
statusCode: 0,
|
|
25
25
|
statusText: "",
|
|
26
|
-
message: "
|
|
26
|
+
message: "Deployment reached running state without a previewDomain",
|
|
27
27
|
traceHeaders: {},
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
30
|
return Result.ok({
|
|
31
|
-
previewDomain:
|
|
32
|
-
lastStatus:
|
|
31
|
+
previewDomain: deployment.previewDomain ?? "",
|
|
32
|
+
lastStatus: deployment.status,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
if (
|
|
36
|
-
return Result.err(new
|
|
35
|
+
if (deployment.status === "failed") {
|
|
36
|
+
return Result.err(new DeploymentFailedError({ deploymentId }));
|
|
37
37
|
}
|
|
38
38
|
await sleep(options.pollIntervalMs, options.signal);
|
|
39
39
|
}
|
|
40
40
|
return Result.err(new TimeoutError({
|
|
41
|
-
|
|
41
|
+
deploymentId,
|
|
42
42
|
elapsedMs: Date.now() - (deadline - options.timeoutSeconds * 1_000),
|
|
43
43
|
lastStatus,
|
|
44
44
|
}));
|
package/dist/polling.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polling.js","sourceRoot":"","sources":["../src/polling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EACL,QAAQ,EACR,cAAc,EACd,
|
|
1
|
+
{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gB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -18,24 +18,24 @@ export interface DatabaseInfo {
|
|
|
18
18
|
export interface CreateProjectResult extends ProjectInfo {
|
|
19
19
|
database?: DatabaseInfo;
|
|
20
20
|
}
|
|
21
|
-
export interface
|
|
21
|
+
export interface AppInfo {
|
|
22
22
|
id: string;
|
|
23
23
|
name: string;
|
|
24
24
|
region: string;
|
|
25
25
|
projectId: string;
|
|
26
26
|
createdAt?: string;
|
|
27
27
|
}
|
|
28
|
-
export interface
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
export interface AppDetail extends AppInfo {
|
|
29
|
+
latestDeploymentId?: string | null;
|
|
30
|
+
appEndpointDomain?: string;
|
|
31
31
|
}
|
|
32
|
-
export interface
|
|
32
|
+
export interface DeploymentInfo {
|
|
33
33
|
id: string;
|
|
34
34
|
status: string;
|
|
35
35
|
createdAt: string;
|
|
36
36
|
previewDomain?: string | null;
|
|
37
37
|
}
|
|
38
|
-
export interface
|
|
38
|
+
export interface DeploymentDetail extends DeploymentInfo {
|
|
39
39
|
envVars?: Record<string, string | null>;
|
|
40
40
|
foundryVersionId?: string;
|
|
41
41
|
}
|
|
@@ -45,11 +45,12 @@ export interface RegionInfo {
|
|
|
45
45
|
}
|
|
46
46
|
export interface ResolvedConfig {
|
|
47
47
|
projectId: string;
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
appId: string;
|
|
49
|
+
appName: string;
|
|
50
50
|
region: string;
|
|
51
51
|
portMapping?: PortMapping;
|
|
52
52
|
}
|
|
53
|
+
export type { ComputeRegion } from "./config/types.ts";
|
|
53
54
|
/** Known compute region identifiers, used by the CLI for interactive prompts. */
|
|
54
55
|
export declare const KNOWN_REGION_IDS: readonly ["us-east-1", "us-west-1", "eu-west-3", "eu-central-1", "ap-northeast-1", "ap-southeast-1"];
|
|
55
56
|
export declare const REGIONS: RegionInfo[];
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,SAAU,SAAQ,OAAO;IACxC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,sGAAkB,CAAC;AAChD,eAAO,MAAM,OAAO,EAAE,UAAU,EAG7B,CAAC"}
|
package/dist/types.js
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Domain types for the Compute SDK.
|
|
3
3
|
*/
|
|
4
|
+
import { COMPUTE_REGIONS } from "./config/types.js";
|
|
4
5
|
/** Known compute region identifiers, used by the CLI for interactive prompts. */
|
|
5
|
-
export const KNOWN_REGION_IDS =
|
|
6
|
-
"us-east-1",
|
|
7
|
-
"us-west-1",
|
|
8
|
-
"eu-west-3",
|
|
9
|
-
"eu-central-1",
|
|
10
|
-
"ap-northeast-1",
|
|
11
|
-
"ap-southeast-1",
|
|
12
|
-
];
|
|
6
|
+
export const KNOWN_REGION_IDS = COMPUTE_REGIONS;
|
|
13
7
|
export const REGIONS = KNOWN_REGION_IDS.map((id) => ({
|
|
14
8
|
id,
|
|
15
9
|
displayName: id,
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA+DpD,iFAAiF;AACjF,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAChD,MAAM,CAAC,MAAM,OAAO,GAAiB,gBAAgB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACjE,EAAE;IACF,WAAW,EAAE,EAAE;CAChB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/compute-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "TypeScript SDK for deploying and managing applications on Prisma Compute",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": "prisma/project-compute",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"ws": "^8.20.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@prisma/management-api-sdk": "
|
|
49
|
+
"@prisma/management-api-sdk": "^1.44.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/bun": "latest",
|