zephyr-edge-contract 0.0.0-canary.0 → 0.0.0-canary.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.
@@ -5,7 +5,8 @@ export declare const ZE_IS_PREVIEW: () => boolean;
5
5
  export declare const ze_api_gateway: {
6
6
  logs: string;
7
7
  build_stats: string;
8
- auth_link: string;
8
+ authorize_link: string;
9
9
  resolve: string;
10
10
  application_config: string;
11
+ websocket: string;
11
12
  };
@@ -18,8 +18,9 @@ exports.ZE_IS_PREVIEW = ZE_IS_PREVIEW;
18
18
  exports.ze_api_gateway = {
19
19
  logs: '/logs',
20
20
  build_stats: '/build-stats',
21
- auth_link: '/auth-link',
21
+ authorize_link: '/authorize-link',
22
22
  resolve: '/resolve',
23
23
  application_config: '/application-config',
24
+ websocket: '/websocket',
24
25
  };
25
26
  //# sourceMappingURL=get-api-contract.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-api-contract.js","sourceRoot":"","sources":["../../../src/lib/api-contract-negotiation/get-api-contract.ts"],"names":[],"mappings":";;;AAAA,0BAA0B;AACnB,MAAM,mBAAmB,GAAG,GAAG,EAAE,WACtC,OAAA,CAAA,MAAA,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,0CAAE,MAAM,EAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,6BAA6B,CAAA,EAAA,CAAC;AAD3E,QAAA,mBAAmB,uBACwD;AAEjF,MAAM,eAAe,GAAG,GAAG,EAAE;;IAClC,OAAA,CAAA,MAAA,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,0CAAE,MAAM;QAChC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;QAC5B,CAAC,CAAC,+BAA+B,CAAA;CAAA,CAAC;AAHzB,QAAA,eAAe,mBAGU;AAE/B,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,IAAI,GAAG,CAAC,I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c,GAAG;IAC5B,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,cAAc;IAC3B,cAAc,EAAE,iBAAiB;IACjC,OAAO,EAAE,UAAU;IACnB,kBAAkB,EAAE,qBAAqB;IACzC,SAAS,EAAE,YAAY;CACxB,CAAC"}
@@ -25,11 +25,15 @@ export interface GatewayPublishRequest {
25
25
  targets: PublishTargets;
26
26
  /** Previously `can_write_jwt` */
27
27
  jwt: string;
28
+ /** Per-environment variables - map of hostname to variables for all deploys */
29
+ envVarSetEnvMap?: Record<string, Record<string, string>>;
28
30
  }
29
31
  export interface StageZeroPublishRequest {
30
32
  application_uid: string;
31
33
  snapshot_id: string;
32
34
  targets: PublishTarget[];
35
+ /** Per-environment variables - map of hostname to variables for all deploys */
36
+ environmentVariables?: Record<string, Record<string, string>>;
33
37
  }
34
38
  export interface PublishRequest {
35
39
  EDGE_URL: string;
@@ -47,5 +51,7 @@ export interface PublishRequest {
47
51
  envs: PublishTarget[];
48
52
  cnames: PublishTarget[];
49
53
  };
54
+ envVarsHash?: string;
55
+ environmentVariables?: Record<string, Record<string, string>>;
50
56
  jwt: string;
51
57
  }
@@ -31,6 +31,8 @@ export interface Snapshot {
31
31
  shared?: Record<string, unknown>;
32
32
  };
33
33
  assets: Record<string, SnapshotAsset>;
34
+ ze_envs?: Record<string, string>;
35
+ ze_envs_hash?: string;
34
36
  }
35
37
  export interface SnapshotAsset {
36
38
  path: string;
@@ -40,4 +42,11 @@ export interface SnapshotAsset {
40
42
  }
41
43
  export interface SnapshotMetadata {
42
44
  pages_url?: string;
45
+ public_envs?: Record<string, string>;
46
+ version?: string;
47
+ build_id?: string;
48
+ etag?: string;
49
+ env?: {
50
+ public?: Record<string, string>;
51
+ };
43
52
  }
@@ -1,3 +1,4 @@
1
+ import { z } from 'zod';
1
2
  /** Todo: this worst and most outdated model so far, had to be refactored */
2
3
  export interface ZephyrBuildStats {
3
4
  /** @deprecated */
@@ -117,6 +118,10 @@ export interface ZephyrBuildStats {
117
118
  build_target?: string;
118
119
  /** @deprecated */
119
120
  type: unknown;
121
+ /** Public environment variables captured at build time (ZE_PUBLIC_* only) */
122
+ ze_envs?: Record<string, string>;
123
+ /** Content-addressable hash of ze_envs for deduplication */
124
+ ze_envs_hash?: string;
120
125
  /** Resolved zephyr dependencies */
121
126
  zephyrDependencies?: Record<string, ZephyrDependency>;
122
127
  }
@@ -127,13 +132,14 @@ declare enum DeploymentIntegrationPlatform {
127
132
  AZURE = "azure",
128
133
  GCP = "gcp"
129
134
  }
130
- export interface ZephyrDependency {
131
- application_uid: string;
132
- remote_entry_url: string;
133
- default_url: string;
134
- name: string;
135
- library_type: string;
136
- }
135
+ export declare const ZephyrDependencySchema: z.ZodObject<{
136
+ application_uid: z.ZodString;
137
+ remote_entry_url: z.ZodString;
138
+ default_url: z.ZodString;
139
+ name: z.ZodString;
140
+ library_type: z.ZodString;
141
+ }, z.core.$strip>;
142
+ export type ZephyrDependency = z.infer<typeof ZephyrDependencySchema>;
137
143
  export interface RawDependency {
138
144
  name: string;
139
145
  version: string;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  /* istanbul ignore file */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ZephyrDependencySchema = void 0;
5
+ const zod_1 = require("zod");
4
6
  var DeploymentIntegrationPlatform;
5
7
  (function (DeploymentIntegrationPlatform) {
6
8
  DeploymentIntegrationPlatform["CLOUDFLARE"] = "cloudflare";
@@ -9,4 +11,11 @@ var DeploymentIntegrationPlatform;
9
11
  DeploymentIntegrationPlatform["AZURE"] = "azure";
10
12
  DeploymentIntegrationPlatform["GCP"] = "gcp";
11
13
  })(DeploymentIntegrationPlatform || (DeploymentIntegrationPlatform = {}));
14
+ exports.ZephyrDependencySchema = zod_1.z.object({
15
+ application_uid: zod_1.z.string(),
16
+ remote_entry_url: zod_1.z.string(),
17
+ default_url: zod_1.z.string(),
18
+ name: zod_1.z.string(),
19
+ library_type: zod_1.z.string(),
20
+ });
12
21
  //# sourceMappingURL=zephyr-build-stats.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"zephyr-build-stats.js","sourceRoot":"","sources":["../../src/lib/zephyr-build-stats.ts"],"names":[],"mappings":";AAAA,0BAA0B;;AAmI1B,IAAK,6BAMJ;AAND,WAAK,6BAA6B;IAChC,0DAAyB,CAAA;IACzB,4CAAW,CAAA;IACX,oDAAmB,CAAA;IACnB,gDAAe,CAAA;IACf,4CAAW,CAAA;AACb,CAAC,EANI,6BAA6B,KAA7B,6BAA6B,QAMjC"}
1
+ {"version":3,"file":"zephyr-build-stats.js","sourceRoot":"","sources":["../../src/lib/zephyr-build-stats.ts"],"names":[],"mappings":";AAAA,0BAA0B;;;AAE1B,6BAAwB;AAuIxB,IAAK,6BAMJ;AAND,WAAK,6BAA6B;IAChC,0DAAyB,CAAA;IACzB,4CAAW,CAAA;IACX,oDAAmB,CAAA;IACnB,gDAAe,CAAA;IACf,4CAAW,CAAA;AACb,CAAC,EANI,6BAA6B,KAA7B,6BAA6B,QAMjC;AAEY,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE;IAC3B,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC5B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAC"}
@@ -1,9 +1,16 @@
1
- import type { ZephyrDependency } from './zephyr-build-stats';
1
+ import { z } from 'zod';
2
2
  export declare const ZEPHYR_MANIFEST_VERSION = "1.0.0";
3
3
  export declare const ZEPHYR_MANIFEST_FILENAME = "zephyr-manifest.json";
4
- /** Changes to this interface should be semanticaly reflect on the const above; */
5
- export interface ZephyrManifest {
6
- version: typeof ZEPHYR_MANIFEST_VERSION;
7
- timestamp: string;
8
- dependencies: Record<string, ZephyrDependency>;
9
- }
4
+ export declare const ZephyrManifestSchema: z.ZodObject<{
5
+ version: z.ZodString;
6
+ timestamp: z.ZodString;
7
+ dependencies: z.ZodRecord<z.ZodString, z.ZodObject<{
8
+ application_uid: z.ZodString;
9
+ remote_entry_url: z.ZodString;
10
+ default_url: z.ZodString;
11
+ name: z.ZodString;
12
+ library_type: z.ZodString;
13
+ }, z.core.$strip>>;
14
+ zeVars: z.ZodRecord<z.ZodString, z.ZodString>;
15
+ }, z.core.$strip>;
16
+ export type ZephyrManifest = z.infer<typeof ZephyrManifestSchema>;
@@ -1,6 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ZEPHYR_MANIFEST_FILENAME = exports.ZEPHYR_MANIFEST_VERSION = void 0;
3
+ exports.ZephyrManifestSchema = exports.ZEPHYR_MANIFEST_FILENAME = exports.ZEPHYR_MANIFEST_VERSION = void 0;
4
+ const zod_1 = require("zod");
5
+ const zephyr_build_stats_1 = require("./zephyr-build-stats");
4
6
  exports.ZEPHYR_MANIFEST_VERSION = '1.0.0';
5
7
  exports.ZEPHYR_MANIFEST_FILENAME = 'zephyr-manifest.json';
8
+ exports.ZephyrManifestSchema = zod_1.z.object({
9
+ version: zod_1.z.string(),
10
+ timestamp: zod_1.z.string(),
11
+ dependencies: zod_1.z.record(zod_1.z.string(), zephyr_build_stats_1.ZephyrDependencySchema),
12
+ zeVars: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
13
+ });
6
14
  //# sourceMappingURL=zephyr-manifest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"zephyr-manifest.js","sourceRoot":"","sources":["../../src/lib/zephyr-manifest.ts"],"names":[],"mappings":";;;AAEa,QAAA,uBAAuB,GAAG,OAAO,CAAC;AAElC,QAAA,wBAAwB,GAAG,sBAAsB,CAAC"}
1
+ {"version":3,"file":"zephyr-manifest.js","sourceRoot":"","sources":["../../src/lib/zephyr-manifest.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,6DAA8D;AAEjD,QAAA,uBAAuB,GAAG,OAAO,CAAC;AAClC,QAAA,wBAAwB,GAAG,sBAAsB,CAAC;AAElD,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,YAAY,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,2CAAsB,CAAC;IAC1D,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC;CACzC,CAAC,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-edge-contract",
3
- "version": "0.0.59",
3
+ "version": "0.1.0",
4
4
  "description": "Edge contract for Zephyr",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,7 +21,8 @@
21
21
  "test": "nx test zephyr-edge-contract"
22
22
  },
23
23
  "dependencies": {
24
- "tslib": "catalog:typescript"
24
+ "tslib": "catalog:typescript",
25
+ "zod": "^4.1.5"
25
26
  },
26
27
  "devDependencies": {
27
28
  "@types/jest": "catalog:typescript",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-edge-contract",
3
- "version": "0.0.0-canary.0",
3
+ "version": "0.0.0-canary.10",
4
4
  "description": "Edge contract for Zephyr",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,7 +16,8 @@
16
16
  "main": "dist/index.js",
17
17
  "types": "dist/index.d.ts",
18
18
  "dependencies": {
19
- "tslib": "^2.8.1"
19
+ "tslib": "^2.8.1",
20
+ "zod": "^4.1.5"
20
21
  },
21
22
  "devDependencies": {
22
23
  "@types/jest": "29.5.14",
@@ -26,7 +27,7 @@
26
27
  },
27
28
  "publishConfig": {
28
29
  "access": "public",
29
- "provenance": false
30
+ "provenance": true
30
31
  },
31
32
  "scripts": {
32
33
  "build": "nx build zephyr-edge-contract",