@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.
Files changed (58) hide show
  1. package/dist/api-client.d.ts +38 -38
  2. package/dist/api-client.d.ts.map +1 -1
  3. package/dist/api-client.js +44 -43
  4. package/dist/api-client.js.map +1 -1
  5. package/dist/callbacks.d.ts +33 -33
  6. package/dist/callbacks.d.ts.map +1 -1
  7. package/dist/compute-client.d.ts +66 -66
  8. package/dist/compute-client.d.ts.map +1 -1
  9. package/dist/compute-client.js +274 -272
  10. package/dist/compute-client.js.map +1 -1
  11. package/dist/config/index.d.ts +1 -1
  12. package/dist/config/index.d.ts.map +1 -1
  13. package/dist/config/index.js +1 -1
  14. package/dist/config/index.js.map +1 -1
  15. package/dist/config/normalize.d.ts +3 -1
  16. package/dist/config/normalize.d.ts.map +1 -1
  17. package/dist/config/normalize.js +24 -6
  18. package/dist/config/normalize.js.map +1 -1
  19. package/dist/config/serialize.d.ts.map +1 -1
  20. package/dist/config/serialize.js +26 -3
  21. package/dist/config/serialize.js.map +1 -1
  22. package/dist/config/types.d.ts +15 -3
  23. package/dist/config/types.d.ts.map +1 -1
  24. package/dist/config/types.js +9 -0
  25. package/dist/config/types.js.map +1 -1
  26. package/dist/errors.d.ts +28 -28
  27. package/dist/errors.d.ts.map +1 -1
  28. package/dist/errors.js +12 -12
  29. package/dist/errors.js.map +1 -1
  30. package/dist/index.d.ts +5 -5
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +1 -1
  33. package/dist/index.js.map +1 -1
  34. package/dist/log-stream.d.ts +1 -1
  35. package/dist/log-stream.d.ts.map +1 -1
  36. package/dist/log-stream.js +1 -1
  37. package/dist/log-stream.js.map +1 -1
  38. package/dist/polling.d.ts +4 -4
  39. package/dist/polling.d.ts.map +1 -1
  40. package/dist/polling.js +15 -15
  41. package/dist/polling.js.map +1 -1
  42. package/dist/types.d.ts +9 -8
  43. package/dist/types.d.ts.map +1 -1
  44. package/dist/types.js +2 -8
  45. package/dist/types.js.map +1 -1
  46. package/package.json +2 -2
  47. package/src/api-client.ts +57 -63
  48. package/src/callbacks.ts +34 -34
  49. package/src/compute-client.ts +433 -413
  50. package/src/config/index.ts +3 -0
  51. package/src/config/normalize.ts +58 -5
  52. package/src/config/serialize.ts +39 -4
  53. package/src/config/types.ts +27 -2
  54. package/src/errors.ts +42 -38
  55. package/src/index.ts +27 -26
  56. package/src/log-stream.ts +2 -2
  57. package/src/polling.ts +19 -18
  58. package/src/types.ts +13 -17
package/src/types.ts CHANGED
@@ -2,6 +2,8 @@
2
2
  * Domain types for the Compute SDK.
3
3
  */
4
4
 
5
+ import { COMPUTE_REGIONS } from "./config/types.ts";
6
+
5
7
  export interface PortMapping {
6
8
  http?: number | null;
7
9
  }
@@ -23,7 +25,7 @@ export interface CreateProjectResult extends ProjectInfo {
23
25
  database?: DatabaseInfo;
24
26
  }
25
27
 
26
- export interface ServiceInfo {
28
+ export interface AppInfo {
27
29
  id: string;
28
30
  name: string;
29
31
  region: string;
@@ -31,19 +33,19 @@ export interface ServiceInfo {
31
33
  createdAt?: string;
32
34
  }
33
35
 
34
- export interface ServiceDetail extends ServiceInfo {
35
- latestVersionId?: string | null;
36
- serviceEndpointDomain?: string;
36
+ export interface AppDetail extends AppInfo {
37
+ latestDeploymentId?: string | null;
38
+ appEndpointDomain?: string;
37
39
  }
38
40
 
39
- export interface VersionInfo {
41
+ export interface DeploymentInfo {
40
42
  id: string;
41
43
  status: string;
42
44
  createdAt: string;
43
45
  previewDomain?: string | null;
44
46
  }
45
47
 
46
- export interface VersionDetail extends VersionInfo {
48
+ export interface DeploymentDetail extends DeploymentInfo {
47
49
  envVars?: Record<string, string | null>;
48
50
  foundryVersionId?: string;
49
51
  }
@@ -55,22 +57,16 @@ export interface RegionInfo {
55
57
 
56
58
  export interface ResolvedConfig {
57
59
  projectId: string;
58
- serviceId: string;
59
- serviceName: string;
60
+ appId: string;
61
+ appName: string;
60
62
  region: string;
61
63
  portMapping?: PortMapping;
62
64
  }
63
65
 
64
- /** Known compute region identifiers, used by the CLI for interactive prompts. */
65
- export const KNOWN_REGION_IDS = [
66
- "us-east-1",
67
- "us-west-1",
68
- "eu-west-3",
69
- "eu-central-1",
70
- "ap-northeast-1",
71
- "ap-southeast-1",
72
- ] as const;
66
+ export type { ComputeRegion } from "./config/types.ts";
73
67
 
68
+ /** Known compute region identifiers, used by the CLI for interactive prompts. */
69
+ export const KNOWN_REGION_IDS = COMPUTE_REGIONS;
74
70
  export const REGIONS: RegionInfo[] = KNOWN_REGION_IDS.map((id) => ({
75
71
  id,
76
72
  displayName: id,