zephyr-edge-contract 0.0.0-canary-20250813124421 → 0.0.0-canary-20250817202041
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 +5 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/edge-api/publish-request.d.ts +2 -0
- package/dist/lib/snapshot.d.ts +4 -0
- package/dist/lib/utils/normalize-js-var-name.d.ts +1 -0
- package/dist/lib/utils/normalize-js-var-name.js +11 -0
- package/dist/lib/utils/normalize-js-var-name.js.map +1 -0
- package/dist/lib/zephyr-build-stats.d.ts +9 -21
- package/dist/lib/zephyr-build-stats.js.map +1 -1
- package/dist/lib/zephyr-manifest.d.ts +8 -0
- package/dist/lib/zephyr-manifest.js +5 -0
- package/dist/lib/zephyr-manifest.js.map +1 -0
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/dist/lib/utils/index.d.ts +0 -2
- package/dist/lib/utils/index.js +0 -7
- package/dist/lib/utils/index.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,15 +5,16 @@ export * as ZeUtils from './lib/promise';
|
|
|
5
5
|
export type { Snapshot, SnapshotAsset, SnapshotMetadata } from './lib/snapshot';
|
|
6
6
|
export { createApplicationUid } from './lib/utils/create-application-uid';
|
|
7
7
|
export { createSnapshotId, flatCreateSnapshotId } from './lib/utils/create-snapshot-id';
|
|
8
|
+
export { normalize_js_var_name as normalize_app_name } from './lib/utils/normalize-js-var-name';
|
|
8
9
|
export { safe_json_parse } from './lib/utils/safe-json-parse';
|
|
9
10
|
export type { ZeApplicationList } from './lib/ze-api/app-list';
|
|
10
11
|
export type { ZeAppVersion, ZeAppVersionResponse } from './lib/ze-api/app-version';
|
|
11
12
|
export type { ConvertedGraph } from './lib/ze-api/converted-graph';
|
|
12
13
|
export type { LocalPackageJson } from './lib/ze-api/local-package-json';
|
|
13
|
-
export type { ZephyrBuildStats } from './lib/zephyr-build-stats';
|
|
14
|
+
export type { ZephyrBuildStats, ZephyrDependency } from './lib/zephyr-build-stats';
|
|
14
15
|
export type { Asset, SnapshotUploadRes, Source, UploadableAsset, ZeBuildAsset, ZeBuildAssetsMap, ZeUploadAssetsOptions, } from './lib/zephyr-edge-contract';
|
|
16
|
+
export { ZEPHYR_MANIFEST_VERSION, type ZephyrManifest } from './lib/zephyr-manifest';
|
|
15
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';
|
|
16
18
|
export { deferred, forEachLimit, isSuccessTuple, PromiseLazyLoad, PromiseTuple, PromiseWithResolvers, } from './lib/promise';
|
|
17
19
|
export { formatString, type FindTemplates } from './lib/string/string';
|
|
18
20
|
export { stripAnsi } from './lib/string/strip-ansi';
|
|
19
|
-
export type { ApplicationConsumes, UsedIn } from './lib/zephyr-build-stats';
|
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.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.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");
|
|
@@ -9,8 +9,12 @@ Object.defineProperty(exports, "createApplicationUid", { enumerable: true, get:
|
|
|
9
9
|
var create_snapshot_id_1 = require("./lib/utils/create-snapshot-id");
|
|
10
10
|
Object.defineProperty(exports, "createSnapshotId", { enumerable: true, get: function () { return create_snapshot_id_1.createSnapshotId; } });
|
|
11
11
|
Object.defineProperty(exports, "flatCreateSnapshotId", { enumerable: true, get: function () { return create_snapshot_id_1.flatCreateSnapshotId; } });
|
|
12
|
+
var normalize_js_var_name_1 = require("./lib/utils/normalize-js-var-name");
|
|
13
|
+
Object.defineProperty(exports, "normalize_app_name", { enumerable: true, get: function () { return normalize_js_var_name_1.normalize_js_var_name; } });
|
|
12
14
|
var safe_json_parse_1 = require("./lib/utils/safe-json-parse");
|
|
13
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_VERSION", { enumerable: true, get: function () { return zephyr_manifest_1.ZEPHYR_MANIFEST_VERSION; } });
|
|
14
18
|
// api contract negotiation
|
|
15
19
|
var get_api_contract_1 = require("./lib/api-contract-negotiation/get-api-contract");
|
|
16
20
|
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,+DAA8D;AAArD,kHAAA,eAAe,OAAA;
|
|
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;AAexB,yDAAqF;AAA5E,0HAAA,uBAAuB,OAAA;AAEhC,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"}
|
package/dist/lib/snapshot.d.ts
CHANGED
|
@@ -28,6 +28,10 @@ export interface Snapshot {
|
|
|
28
28
|
remotes?: Record<string, string>;
|
|
29
29
|
shared?: Record<string, unknown>;
|
|
30
30
|
};
|
|
31
|
+
zephyrManifest?: {
|
|
32
|
+
filename: string;
|
|
33
|
+
remotes?: string[];
|
|
34
|
+
};
|
|
31
35
|
assets: Record<string, SnapshotAsset>;
|
|
32
36
|
}
|
|
33
37
|
export interface SnapshotAsset {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalize_js_var_name(name: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalize_js_var_name = normalize_js_var_name;
|
|
4
|
+
// Normalize to allow only JavaScript var valid names
|
|
5
|
+
function normalize_js_var_name(name) {
|
|
6
|
+
// Replace invalid starting characters with '_'
|
|
7
|
+
const normalized = name.replace(/^[^a-zA-Z_$]/, '_');
|
|
8
|
+
// Replace invalid subsequent characters with '_'
|
|
9
|
+
return normalized.replace(/[^a-zA-Z0-9_$]/g, '_');
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=normalize-js-var-name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-js-var-name.js","sourceRoot":"","sources":["../../../src/lib/utils/normalize-js-var-name.ts"],"names":[],"mappings":";;AACA,sDAKC;AAND,qDAAqD;AACrD,SAAgB,qBAAqB,CAAC,IAAY;IAChD,+CAA+C;IAC/C,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IACrD,iDAAiD;IACjD,OAAO,UAAU,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -117,6 +117,8 @@ export interface ZephyrBuildStats {
|
|
|
117
117
|
build_target?: string;
|
|
118
118
|
/** @deprecated */
|
|
119
119
|
type: unknown;
|
|
120
|
+
/** Resolved zephyr dependencies */
|
|
121
|
+
'zephyr:dependencies'?: 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;
|
|
@@ -143,27 +152,6 @@ export interface ApplicationOverride {
|
|
|
143
152
|
location: string;
|
|
144
153
|
applicationID: string;
|
|
145
154
|
}
|
|
146
|
-
/**
|
|
147
|
-
* If a remote's component is consumed by another app, this field should exists in the
|
|
148
|
-
* consuming app's build stats. This is the only way to know that a remote's component is
|
|
149
|
-
* being consumed by another app. It has the shape looks like
|
|
150
|
-
*
|
|
151
|
-
* {
|
|
152
|
-
* consumingApplicationID: 'NxWelcome',
|
|
153
|
-
* applicationID: 'rspack_mf_remote',
|
|
154
|
-
* name: 'NxWelcome',
|
|
155
|
-
* usedIn: [Array]
|
|
156
|
-
* }
|
|
157
|
-
*
|
|
158
|
-
* - ConsumingApplicationId and name are the same value
|
|
159
|
-
* - ApplicationId is the id of the remote application
|
|
160
|
-
* - UsedIn is an array of object with the following shape: { files:
|
|
161
|
-
* src/screens/LazyLoadedCheckoutSuccessScreen.tsx, url:
|
|
162
|
-
* /src/screens/LazyLoadedCheckoutSuccessScreen.tsx } This field describes where the
|
|
163
|
-
* remote is being used, and how are they imported, the id of the remote application
|
|
164
|
-
* (the id/applicationId is referring to the id of the remote application within the
|
|
165
|
-
* bundler context) and the name of the remote's component (ex: NxWelcome).
|
|
166
|
-
*/
|
|
167
155
|
export interface ApplicationConsumes {
|
|
168
156
|
consumingApplicationID: string;
|
|
169
157
|
applicationID: 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;;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,8 @@
|
|
|
1
|
+
import type { ZephyrDependency } from './zephyr-build-stats';
|
|
2
|
+
export declare const ZEPHYR_MANIFEST_VERSION = "1.0.0";
|
|
3
|
+
/** Changes to this interface should be semanticaly reflect on the const above; */
|
|
4
|
+
export interface ZephyrManifest {
|
|
5
|
+
version: typeof ZEPHYR_MANIFEST_VERSION;
|
|
6
|
+
timestamp: string;
|
|
7
|
+
dependencies: Record<string, ZephyrDependency>;
|
|
8
|
+
}
|
|
@@ -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"}
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
package/dist/lib/utils/index.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
// Export utility functions
|
|
5
|
-
tslib_1.__exportStar(require("./create-application-uid"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./safe-json-parse"), exports);
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/utils/index.ts"],"names":[],"mappings":";;;AAAA,2BAA2B;AAC3B,mEAAyC;AACzC,4DAAkC"}
|