zephyr-edge-contract 0.0.58 → 0.1.0-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 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;;;;AAW1B,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;AAgBxB,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"}
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"}
@@ -5,8 +5,7 @@ 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
- authorize_link: string;
8
+ auth_link: string;
9
9
  resolve: string;
10
10
  application_config: string;
11
- websocket: string;
12
11
  };
@@ -18,9 +18,8 @@ exports.ZE_IS_PREVIEW = ZE_IS_PREVIEW;
18
18
  exports.ze_api_gateway = {
19
19
  logs: '/logs',
20
20
  build_stats: '/build-stats',
21
- authorize_link: '/authorize-link',
21
+ auth_link: '/auth-link',
22
22
  resolve: '/resolve',
23
23
  application_config: '/application-config',
24
- websocket: '/websocket',
25
24
  };
26
25
  //# 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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AA,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,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,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,UAAU;IACnB,kBAAkB,EAAE,qBAAqB;CAC1C,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
  /**
@@ -1,6 +1,8 @@
1
1
  export interface Snapshot {
2
2
  application_uid: string;
3
3
  version: string;
4
+ version_url?: string;
5
+ published_at?: number;
4
6
  snapshot_id: string;
5
7
  domain: string;
6
8
  uid: {
@@ -117,6 +117,8 @@ export interface ZephyrBuildStats {
117
117
  build_target?: string;
118
118
  /** @deprecated */
119
119
  type: unknown;
120
+ /** Resolved zephyr dependencies */
121
+ zephyrDependencies?: Record<string, ZephyrDependency>;
120
122
  }
121
123
  declare enum DeploymentIntegrationPlatform {
122
124
  CLOUDFLARE = "cloudflare",
@@ -125,6 +127,13 @@ declare enum DeploymentIntegrationPlatform {
125
127
  AZURE = "azure",
126
128
  GCP = "gcp"
127
129
  }
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
+ }
128
137
  export interface RawDependency {
129
138
  name: string;
130
139
  version: string;
@@ -1 +1 @@
1
- {"version":3,"file":"zephyr-build-stats.js","sourceRoot":"","sources":["../../src/lib/zephyr-build-stats.ts"],"names":[],"mappings":";AAAA,0BAA0B;;AAiI1B,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;;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"}
@@ -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
+ /** 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
+ }
@@ -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;AAElC,QAAA,wBAAwB,GAAG,sBAAsB,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-edge-contract",
3
- "version": "0.0.58",
3
+ "version": "0.1.0",
4
4
  "description": "Edge contract for Zephyr",
5
5
  "repository": {
6
6
  "type": "git",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-edge-contract",
3
- "version": "0.0.58",
3
+ "version": "0.1.0-next.1",
4
4
  "description": "Edge contract for Zephyr",
5
5
  "repository": {
6
6
  "type": "git",