zephyr-edge-contract 0.0.59 → 0.1.1-next.1
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/index.d.ts +3 -2
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/api-contract-negotiation/get-api-contract.d.ts +2 -1
- package/dist/lib/api-contract-negotiation/get-api-contract.js +2 -1
- package/dist/lib/api-contract-negotiation/get-api-contract.js.map +1 -1
- package/dist/lib/edge-api/publish-request.d.ts +11 -0
- package/dist/lib/snapshot.d.ts +9 -0
- package/dist/lib/zephyr-build-stats.d.ts +13 -0
- package/dist/lib/zephyr-build-stats.js.map +1 -1
- package/dist/lib/zephyr-manifest.d.ts +9 -0
- package/dist/lib/zephyr-manifest.js +6 -0
- package/dist/lib/zephyr-manifest.js.map +1 -0
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { PublishRequest, PublishTarget, StageZeroPublishRequest, } from './lib/edge-api/publish-request';
|
|
1
|
+
export type { GatewayPublishRequest, PublishRequest, PublishTarget, PublishTargets, StageZeroPublishRequest, } from './lib/edge-api/publish-request';
|
|
2
2
|
export type { ZeEnvs, ZeUploadBuildStats } from './lib/edge-api/ze-envs-request';
|
|
3
3
|
export type { ZephyrPluginOptions } from './lib/plugin-options/zephyr-webpack-plugin-options';
|
|
4
4
|
export * as ZeUtils from './lib/promise';
|
|
@@ -11,8 +11,9 @@ export type { ZeApplicationList } from './lib/ze-api/app-list';
|
|
|
11
11
|
export type { ZeAppVersion, ZeAppVersionResponse } from './lib/ze-api/app-version';
|
|
12
12
|
export type { ConvertedGraph } from './lib/ze-api/converted-graph';
|
|
13
13
|
export type { LocalPackageJson } from './lib/ze-api/local-package-json';
|
|
14
|
-
export type { ZephyrBuildStats } from './lib/zephyr-build-stats';
|
|
14
|
+
export type { ZephyrBuildStats, ZephyrDependency } from './lib/zephyr-build-stats';
|
|
15
15
|
export type { Asset, SnapshotUploadRes, Source, UploadableAsset, ZeBuildAsset, ZeBuildAssetsMap, ZeUploadAssetsOptions, } from './lib/zephyr-edge-contract';
|
|
16
|
+
export { ZEPHYR_MANIFEST_FILENAME, ZEPHYR_MANIFEST_VERSION, type ZephyrManifest, } from './lib/zephyr-manifest';
|
|
16
17
|
export { ZE_API_ENDPOINT, ZE_API_ENDPOINT_HOST, ze_api_gateway, ZE_IS_PREVIEW, ZEPHYR_API_ENDPOINT, } from './lib/api-contract-negotiation/get-api-contract';
|
|
17
18
|
export { deferred, forEachLimit, isSuccessTuple, PromiseLazyLoad, PromiseTuple, PromiseWithResolvers, } from './lib/promise';
|
|
18
19
|
export { formatString, type FindTemplates } from './lib/string/string';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.stripAnsi = exports.formatString = exports.PromiseWithResolvers = exports.PromiseTuple = exports.PromiseLazyLoad = exports.isSuccessTuple = exports.forEachLimit = exports.deferred = exports.ZEPHYR_API_ENDPOINT = exports.ZE_IS_PREVIEW = exports.ze_api_gateway = exports.ZE_API_ENDPOINT_HOST = exports.ZE_API_ENDPOINT = exports.safe_json_parse = exports.normalize_app_name = exports.flatCreateSnapshotId = exports.createSnapshotId = exports.createApplicationUid = exports.ZeUtils = void 0;
|
|
4
|
+
exports.stripAnsi = exports.formatString = exports.PromiseWithResolvers = exports.PromiseTuple = exports.PromiseLazyLoad = exports.isSuccessTuple = exports.forEachLimit = exports.deferred = exports.ZEPHYR_API_ENDPOINT = exports.ZE_IS_PREVIEW = exports.ze_api_gateway = exports.ZE_API_ENDPOINT_HOST = exports.ZE_API_ENDPOINT = exports.ZEPHYR_MANIFEST_VERSION = exports.ZEPHYR_MANIFEST_FILENAME = exports.safe_json_parse = exports.normalize_app_name = exports.flatCreateSnapshotId = exports.createSnapshotId = exports.createApplicationUid = exports.ZeUtils = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
exports.ZeUtils = tslib_1.__importStar(require("./lib/promise"));
|
|
7
7
|
var create_application_uid_1 = require("./lib/utils/create-application-uid");
|
|
@@ -13,6 +13,9 @@ var normalize_js_var_name_1 = require("./lib/utils/normalize-js-var-name");
|
|
|
13
13
|
Object.defineProperty(exports, "normalize_app_name", { enumerable: true, get: function () { return normalize_js_var_name_1.normalize_js_var_name; } });
|
|
14
14
|
var safe_json_parse_1 = require("./lib/utils/safe-json-parse");
|
|
15
15
|
Object.defineProperty(exports, "safe_json_parse", { enumerable: true, get: function () { return safe_json_parse_1.safe_json_parse; } });
|
|
16
|
+
var zephyr_manifest_1 = require("./lib/zephyr-manifest");
|
|
17
|
+
Object.defineProperty(exports, "ZEPHYR_MANIFEST_FILENAME", { enumerable: true, get: function () { return zephyr_manifest_1.ZEPHYR_MANIFEST_FILENAME; } });
|
|
18
|
+
Object.defineProperty(exports, "ZEPHYR_MANIFEST_VERSION", { enumerable: true, get: function () { return zephyr_manifest_1.ZEPHYR_MANIFEST_VERSION; } });
|
|
16
19
|
// api contract negotiation
|
|
17
20
|
var get_api_contract_1 = require("./lib/api-contract-negotiation/get-api-contract");
|
|
18
21
|
Object.defineProperty(exports, "ZE_API_ENDPOINT", { enumerable: true, get: function () { return get_api_contract_1.ZE_API_ENDPOINT; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,0BAA0B;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,0BAA0B;;;;AAa1B,iEAAyC;AAEzC,6EAA0E;AAAjE,8HAAA,oBAAoB,OAAA;AAC7B,qEAAwF;AAA/E,sHAAA,gBAAgB,OAAA;AAAE,0HAAA,oBAAoB,OAAA;AAC/C,2EAAgG;AAAvF,2HAAA,qBAAqB,OAAsB;AACpD,+DAA8D;AAArD,kHAAA,eAAe,OAAA;AAexB,yDAI+B;AAH7B,2HAAA,wBAAwB,OAAA;AACxB,0HAAA,uBAAuB,OAAA;AAIzB,2BAA2B;AAC3B,oFAMyD;AALvD,mHAAA,eAAe,OAAA;AACf,wHAAA,oBAAoB,OAAA;AACpB,kHAAA,cAAc,OAAA;AACd,iHAAA,aAAa,OAAA;AACb,uHAAA,mBAAmB,OAAA;AAGrB,wBAAwB;AACxB,yCAOuB;AANrB,mGAAA,QAAQ,OAAA;AACR,uGAAA,YAAY,OAAA;AACZ,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AACf,uGAAA,YAAY,OAAA;AACZ,+GAAA,oBAAoB,OAAA;AAGtB,uBAAuB;AACvB,8CAAuE;AAA9D,sGAAA,YAAY,OAAA;AACrB,sDAAoD;AAA3C,uGAAA,SAAS,OAAA"}
|
|
@@ -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
|
-
|
|
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,C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AAA,eAAe,mBAGU;AAE/B,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,IAAI,GAAG,CAAC,IAAA,uBAAe,GAAE,CAAC,CAAC,IAAI,CAAC;AAA7D,QAAA,oBAAoB,wBAAyC;AAEnE,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,KAAK,MAAM,CAAC;AAA9D,QAAA,aAAa,iBAAiD;AAE9D,QAAA,cAAc,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"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import type { ZephyrManifest } from '../zephyr-manifest';
|
|
1
2
|
export interface PublishTarget {
|
|
2
3
|
url: string;
|
|
3
4
|
hostname: string;
|
|
5
|
+
zephyrManifestFile?: {
|
|
6
|
+
content: ZephyrManifest;
|
|
7
|
+
hash: string;
|
|
8
|
+
};
|
|
4
9
|
}
|
|
5
10
|
export interface PublishTargets {
|
|
6
11
|
/**
|
|
@@ -20,11 +25,15 @@ export interface GatewayPublishRequest {
|
|
|
20
25
|
targets: PublishTargets;
|
|
21
26
|
/** Previously `can_write_jwt` */
|
|
22
27
|
jwt: string;
|
|
28
|
+
/** Per-environment variables - map of hostname to variables for all deploys */
|
|
29
|
+
envVarSetEnvMap?: Record<string, Record<string, string>>;
|
|
23
30
|
}
|
|
24
31
|
export interface StageZeroPublishRequest {
|
|
25
32
|
application_uid: string;
|
|
26
33
|
snapshot_id: string;
|
|
27
34
|
targets: PublishTarget[];
|
|
35
|
+
/** Per-environment variables - map of hostname to variables for all deploys */
|
|
36
|
+
environmentVariables?: Record<string, Record<string, string>>;
|
|
28
37
|
}
|
|
29
38
|
export interface PublishRequest {
|
|
30
39
|
EDGE_URL: string;
|
|
@@ -42,5 +51,7 @@ export interface PublishRequest {
|
|
|
42
51
|
envs: PublishTarget[];
|
|
43
52
|
cnames: PublishTarget[];
|
|
44
53
|
};
|
|
54
|
+
envVarsHash?: string;
|
|
55
|
+
environmentVariables?: Record<string, Record<string, string>>;
|
|
45
56
|
jwt: string;
|
|
46
57
|
}
|
package/dist/lib/snapshot.d.ts
CHANGED
|
@@ -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
|
}
|
|
@@ -117,6 +117,12 @@ export interface ZephyrBuildStats {
|
|
|
117
117
|
build_target?: string;
|
|
118
118
|
/** @deprecated */
|
|
119
119
|
type: unknown;
|
|
120
|
+
/** Public environment variables captured at build time (ZE_PUBLIC_* only) */
|
|
121
|
+
ze_envs?: Record<string, string>;
|
|
122
|
+
/** Content-addressable hash of ze_envs for deduplication */
|
|
123
|
+
ze_envs_hash?: string;
|
|
124
|
+
/** Resolved zephyr dependencies */
|
|
125
|
+
zephyrDependencies?: Record<string, ZephyrDependency>;
|
|
120
126
|
}
|
|
121
127
|
declare enum DeploymentIntegrationPlatform {
|
|
122
128
|
CLOUDFLARE = "cloudflare",
|
|
@@ -125,6 +131,13 @@ declare enum DeploymentIntegrationPlatform {
|
|
|
125
131
|
AZURE = "azure",
|
|
126
132
|
GCP = "gcp"
|
|
127
133
|
}
|
|
134
|
+
export interface ZephyrDependency {
|
|
135
|
+
application_uid: string;
|
|
136
|
+
remote_entry_url: string;
|
|
137
|
+
default_url: string;
|
|
138
|
+
name: string;
|
|
139
|
+
library_type: string;
|
|
140
|
+
}
|
|
128
141
|
export interface RawDependency {
|
|
129
142
|
name: string;
|
|
130
143
|
version: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zephyr-build-stats.js","sourceRoot":"","sources":["../../src/lib/zephyr-build-stats.ts"],"names":[],"mappings":";AAAA,0BAA0B;;
|
|
1
|
+
{"version":3,"file":"zephyr-build-stats.js","sourceRoot":"","sources":["../../src/lib/zephyr-build-stats.ts"],"names":[],"mappings":";AAAA,0BAA0B;;AAuI1B,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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ZephyrDependency } from './zephyr-build-stats';
|
|
2
|
+
export declare const ZEPHYR_MANIFEST_VERSION = "1.0.0";
|
|
3
|
+
export declare const ZEPHYR_MANIFEST_FILENAME = "zephyr-manifest.json";
|
|
4
|
+
export interface ZephyrManifest {
|
|
5
|
+
version: string;
|
|
6
|
+
timestamp: string;
|
|
7
|
+
dependencies: Record<string, ZephyrDependency>;
|
|
8
|
+
zeVars: Record<string, string>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ZEPHYR_MANIFEST_FILENAME = exports.ZEPHYR_MANIFEST_VERSION = void 0;
|
|
4
|
+
exports.ZEPHYR_MANIFEST_VERSION = '1.0.0';
|
|
5
|
+
exports.ZEPHYR_MANIFEST_FILENAME = 'zephyr-manifest.json';
|
|
6
|
+
//# sourceMappingURL=zephyr-manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zephyr-manifest.js","sourceRoot":"","sources":["../../src/lib/zephyr-manifest.ts"],"names":[],"mappings":";;;AAEa,QAAA,uBAAuB,GAAG,OAAO,CAAC;AAClC,QAAA,wBAAwB,GAAG,sBAAsB,CAAC"}
|
package/dist/package.json
CHANGED