@cosmoner/sdk 1.17.0 → 1.18.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.
@@ -86,6 +86,14 @@ export type FieldTable = Record<string, FieldSpec>;
86
86
  export declare const ENV_FIELDS: FieldTable;
87
87
  /** Fields of a service's `build` mapping. */
88
88
  export declare const BUILD_FIELDS: FieldTable;
89
+ /**
90
+ * Fields of a service's `previews` mapping.
91
+ *
92
+ * `enabled` only preselects pull request previews in the deploy wizard, which
93
+ * shows their hourly price there. Previews are billed, so the platform never
94
+ * switches them on or off from a commit to this file.
95
+ */
96
+ export declare const PREVIEWS_FIELDS: FieldTable;
89
97
  /** Fields of one entry under `services`. */
90
98
  export declare const SERVICE_FIELDS: FieldTable;
91
99
  /** Fields of the document itself. */
@@ -35,6 +35,16 @@ export interface DeploymentBuild {
35
35
  /** Where a static build writes the site. Static sites only. */
36
36
  output_dir?: string;
37
37
  }
38
+ /**
39
+ * Pull request previews for a service. GitHub repositories only.
40
+ *
41
+ * Previews are billed per preview for each hour they run, so `enabled` only
42
+ * preselects the option in the deploy wizard, where the price is shown. A
43
+ * commit never turns previews on or off.
44
+ */
45
+ export interface DeploymentPreviews {
46
+ enabled: boolean;
47
+ }
38
48
  /** One service defined by the file. Each deploy sets up one of them. */
39
49
  export interface DeploymentService {
40
50
  name: string;
@@ -51,6 +61,7 @@ export interface DeploymentService {
51
61
  instance_size?: string;
52
62
  instances?: number;
53
63
  autodeploy?: boolean;
64
+ previews?: DeploymentPreviews;
54
65
  envs?: DeploymentEnvVar[];
55
66
  }
56
67
  /**
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export { DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT_MS, type Cosmone
4
4
  export { AuthenticationError, ConflictError, CosmonerConnectionError, CosmonerError, CosmonerTimeoutError, InsufficientScopeError, NotFoundError, RateLimitError, ServerError, ValidationError, WebhookSignatureError, } from "./errors";
5
5
  export { APP_SCHEMA_URL, DEPLOYMENT_FILE_PATHS, DEPLOYMENT_KEY_ORDER, DEPLOYMENT_VERSION, MAX_DEPLOYMENT_BYTES, } from "./deployment/spec";
6
6
  export { validateDeployment, validateDeploymentDocument, } from "./deployment/validate";
7
- export type { DeploymentBuild, DeploymentEnvVar, DeploymentIssue, DeploymentIssueSeverity, DeploymentService, DeploymentTemplate, DeploymentValidationResult, ValidateDeploymentOptions, } from "./deployment/types";
7
+ export type { DeploymentBuild, DeploymentEnvVar, DeploymentIssue, DeploymentIssueSeverity, DeploymentPreviews, DeploymentService, DeploymentTemplate, DeploymentValidationResult, ValidateDeploymentOptions, } from "./deployment/types";
8
8
  export { AppsService, FINISHED_DEPLOYMENT_PHASES, type App, type AppDeployment, type AppDeploymentHistoryEntry, type AppLogLine, type AppLogType, type AppLogsParams, type AppLogsResponse, type AppSizes, type AppStatus, type CreateAppDraftParams, type CreateAppDraftResponse, type CreateAppParams, type CreateAppResponse, type DeleteAppResponse, type DeployAppParams, type DeployAppResponse, type DeploymentPhase, type GetAppResponse, type GetAppSizesResponse, type GetDeploymentResponse, type ImageDeployPolicy, type ListAppsResponse, type ListDeploymentsResponse, type PreviewAppResizeResponse, type PreviewAppResponse, type ResizeAppResponse, type RollbackAppResponse, type UpdateAppParams, type UpdateAppResponse, type WaitForDeploymentParams, } from "./services/apps";
9
9
  export { BucketsService, type Bucket, type BucketTier, type CreateBucketParams, type CreateBucketResponse, type DeleteBucketResponse, type ListBucketsResponse, type PreviewBucketParams, type PreviewBucketResponse, } from "./services/buckets";
10
10
  export { CatalogService, type AppSize, type CatalogRegion, type DatabaseCatalog, type DatabaseSize, type GetDatabaseCatalogResponse, type ListAppRegionsResponse, type ListAppSizesResponse, type ListRedisPlansResponse, type ListRegionsResponse, type ListServerImagesResponse, type ListServerSizesResponse, type RedisPlan, type ServerSize, } from "./services/catalog";
package/dist/index.js CHANGED
@@ -1718,7 +1718,7 @@ function sleep(ms) {
1718
1718
  }
1719
1719
 
1720
1720
  // src/version.ts
1721
- var VERSION = "1.17.0";
1721
+ var VERSION = "1.18.0";
1722
1722
  var USER_AGENT = `cosmoner-node/${VERSION}`;
1723
1723
 
1724
1724
  // src/transport.ts
@@ -1906,6 +1906,9 @@ var BUILD_FIELDS = {
1906
1906
  command: { kind: "string", maxLength: 1024 },
1907
1907
  output_dir: { kind: "string", maxLength: 512 }
1908
1908
  };
1909
+ var PREVIEWS_FIELDS = {
1910
+ enabled: { kind: "boolean", required: true }
1911
+ };
1909
1912
  var SERVICE_FIELDS = {
1910
1913
  name: {
1911
1914
  kind: "string",
@@ -1925,6 +1928,7 @@ var SERVICE_FIELDS = {
1925
1928
  instance_size: { kind: "string", maxLength: 64 },
1926
1929
  instances: { kind: "integer", minimum: 1, maximum: 10 },
1927
1930
  autodeploy: { kind: "boolean" },
1931
+ previews: { kind: "object", fields: PREVIEWS_FIELDS },
1928
1932
  envs: { kind: "array", maxItems: 100, item: { kind: "object", fields: ENV_FIELDS } }
1929
1933
  };
1930
1934
  var ROOT_FIELDS = {
package/dist/index.mjs CHANGED
@@ -1643,7 +1643,7 @@ function sleep(ms) {
1643
1643
  }
1644
1644
 
1645
1645
  // src/version.ts
1646
- var VERSION = "1.17.0";
1646
+ var VERSION = "1.18.0";
1647
1647
  var USER_AGENT = `cosmoner-node/${VERSION}`;
1648
1648
 
1649
1649
  // src/transport.ts
@@ -1831,6 +1831,9 @@ var BUILD_FIELDS = {
1831
1831
  command: { kind: "string", maxLength: 1024 },
1832
1832
  output_dir: { kind: "string", maxLength: 512 }
1833
1833
  };
1834
+ var PREVIEWS_FIELDS = {
1835
+ enabled: { kind: "boolean", required: true }
1836
+ };
1834
1837
  var SERVICE_FIELDS = {
1835
1838
  name: {
1836
1839
  kind: "string",
@@ -1850,6 +1853,7 @@ var SERVICE_FIELDS = {
1850
1853
  instance_size: { kind: "string", maxLength: 64 },
1851
1854
  instances: { kind: "integer", minimum: 1, maximum: 10 },
1852
1855
  autodeploy: { kind: "boolean" },
1856
+ previews: { kind: "object", fields: PREVIEWS_FIELDS },
1853
1857
  envs: { kind: "array", maxItems: 100, item: { kind: "object", fields: ENV_FIELDS } }
1854
1858
  };
1855
1859
  var ROOT_FIELDS = {
package/dist/version.d.ts CHANGED
@@ -8,5 +8,5 @@
8
8
  * the release workflow runs that straight after `npm version`, and
9
9
  * `version.test.ts` fails the build if the two ever disagree.
10
10
  */
11
- export declare const VERSION = "1.17.0";
12
- export declare const USER_AGENT = "cosmoner-node/1.17.0";
11
+ export declare const VERSION = "1.18.0";
12
+ export declare const USER_AGENT = "cosmoner-node/1.18.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmoner/sdk",
3
- "version": "1.17.0",
3
+ "version": "1.18.0",
4
4
  "description": "Cosmoner SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",