zephyr-edge-contract 0.0.0-canary-20250122192655 → 0.0.0-canary-20250122193404

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
@@ -13,6 +13,6 @@ export type { LocalPackageJson } from './lib/ze-api/local-package-json';
13
13
  export type { ZephyrBuildStats } from './lib/zephyr-build-stats';
14
14
  export type { Asset, SnapshotUploadRes, Source, UploadableAsset, ZeBuildAsset, ZeBuildAssetsMap, ZeUploadAssetsOptions, } from './lib/zephyr-edge-contract';
15
15
  export { ZEPHYR_API_ENDPOINT, ZE_API_ENDPOINT, ZE_IS_PREVIEW, ze_api_gateway, ZE_API_ENDPOINT_HOST, } from './lib/api-contract-negotiation/get-api-contract';
16
- export { PromiseTuple, isSuccessTuple, PromiseLazyLoad, PromiseWithResolvers, deferred, } from './lib/promise';
16
+ export { forEachLimit, PromiseTuple, isSuccessTuple, PromiseLazyLoad, PromiseWithResolvers, deferred, } from './lib/promise';
17
17
  export { type FindTemplates, formatString } from './lib/string/string';
18
18
  export { stripAnsi } from './lib/string/strip-ansi';
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.deferred = exports.PromiseWithResolvers = exports.PromiseLazyLoad = exports.isSuccessTuple = exports.PromiseTuple = exports.ZE_API_ENDPOINT_HOST = exports.ze_api_gateway = exports.ZE_IS_PREVIEW = exports.ZE_API_ENDPOINT = exports.ZEPHYR_API_ENDPOINT = exports.safe_json_parse = exports.ZeUtils = exports.flatCreateSnapshotId = exports.createSnapshotId = exports.createApplicationUid = void 0;
4
+ exports.stripAnsi = exports.formatString = exports.deferred = exports.PromiseWithResolvers = exports.PromiseLazyLoad = exports.isSuccessTuple = exports.PromiseTuple = exports.forEachLimit = exports.ZE_API_ENDPOINT_HOST = exports.ze_api_gateway = exports.ZE_IS_PREVIEW = exports.ZE_API_ENDPOINT = exports.ZEPHYR_API_ENDPOINT = exports.safe_json_parse = exports.ZeUtils = exports.flatCreateSnapshotId = exports.createSnapshotId = exports.createApplicationUid = void 0;
5
5
  const tslib_1 = require("tslib");
6
6
  var create_application_uid_1 = require("./lib/utils/create-application-uid");
7
7
  Object.defineProperty(exports, "createApplicationUid", { enumerable: true, get: function () { return create_application_uid_1.createApplicationUid; } });
@@ -20,6 +20,7 @@ Object.defineProperty(exports, "ze_api_gateway", { enumerable: true, get: functi
20
20
  Object.defineProperty(exports, "ZE_API_ENDPOINT_HOST", { enumerable: true, get: function () { return get_api_contract_1.ZE_API_ENDPOINT_HOST; } });
21
21
  // promise proto methods
22
22
  var promise_1 = require("./lib/promise");
23
+ Object.defineProperty(exports, "forEachLimit", { enumerable: true, get: function () { return promise_1.forEachLimit; } });
23
24
  Object.defineProperty(exports, "PromiseTuple", { enumerable: true, get: function () { return promise_1.PromiseTuple; } });
24
25
  Object.defineProperty(exports, "isSuccessTuple", { enumerable: true, get: function () { return promise_1.isSuccessTuple; } });
25
26
  Object.defineProperty(exports, "PromiseLazyLoad", { enumerable: true, get: function () { return promise_1.PromiseLazyLoad; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,0BAA0B;;;;AAY1B,6EAA0E;AAAjE,8HAAA,oBAAoB,OAAA;AAC7B,qEAAwF;AAA/E,sHAAA,gBAAgB,OAAA;AAAE,0HAAA,oBAAoB,OAAA;AAC/C,iEAAyC;AACzC,+DAA8D;AAArD,kHAAA,eAAe,OAAA;AAgBxB,2BAA2B;AAC3B,oFAMyD;AALvD,uHAAA,mBAAmB,OAAA;AACnB,mHAAA,eAAe,OAAA;AACf,iHAAA,aAAa,OAAA;AACb,kHAAA,cAAc,OAAA;AACd,wHAAA,oBAAoB,OAAA;AAGtB,wBAAwB;AACxB,yCAMuB;AALrB,uGAAA,YAAY,OAAA;AACZ,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AACf,+GAAA,oBAAoB,OAAA;AACpB,mGAAA,QAAQ,OAAA;AAGV,uBAAuB;AACvB,8CAAuE;AAA1C,sGAAA,YAAY,OAAA;AACzC,sDAAoD;AAA3C,uGAAA,SAAS,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,0BAA0B;;;;AAY1B,6EAA0E;AAAjE,8HAAA,oBAAoB,OAAA;AAC7B,qEAAwF;AAA/E,sHAAA,gBAAgB,OAAA;AAAE,0HAAA,oBAAoB,OAAA;AAC/C,iEAAyC;AACzC,+DAA8D;AAArD,kHAAA,eAAe,OAAA;AAgBxB,2BAA2B;AAC3B,oFAMyD;AALvD,uHAAA,mBAAmB,OAAA;AACnB,mHAAA,eAAe,OAAA;AACf,iHAAA,aAAa,OAAA;AACb,kHAAA,cAAc,OAAA;AACd,wHAAA,oBAAoB,OAAA;AAGtB,wBAAwB;AACxB,yCAOuB;AANrB,uGAAA,YAAY,OAAA;AACZ,uGAAA,YAAY,OAAA;AACZ,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AACf,+GAAA,oBAAoB,OAAA;AACpB,mGAAA,QAAQ,OAAA;AAGV,uBAAuB;AACvB,8CAAuE;AAA1C,sGAAA,YAAY,OAAA;AACzC,sDAAoD;AAA3C,uGAAA,SAAS,OAAA"}
@@ -27,7 +27,10 @@ export interface ZephyrPluginOptions {
27
27
  exposes?: Record<string, string>;
28
28
  remotes?: Record<string, string>;
29
29
  shared?: Record<string, unknown>;
30
+ runtimePlugins?: string[] | undefined;
30
31
  };
32
+ target?: 'ios' | 'android' | 'web' | undefined;
33
+ upload_file?: boolean;
31
34
  wait_for_index_html?: boolean;
32
35
  outputPath?: string;
33
36
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Limits the concurrency of running a list of promise-returning functions.
3
+ *
4
+ * @param tasks An array of functions, each returning a Promise
5
+ * @param batchSize Maximum number of Promises allowed to run concurrently
6
+ * @returns A Promise that resolves to an array of the results
7
+ */
8
+ export declare function forEachLimit<T>(tasks: Array<() => Promise<T>>, batchSize: number): Promise<T[]>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.forEachLimit = void 0;
4
+ /**
5
+ * Limits the concurrency of running a list of promise-returning functions.
6
+ *
7
+ * @param tasks An array of functions, each returning a Promise
8
+ * @param batchSize Maximum number of Promises allowed to run concurrently
9
+ * @returns A Promise that resolves to an array of the results
10
+ */
11
+ async function forEachLimit(tasks, batchSize) {
12
+ const results = new Array(tasks.length);
13
+ let currentIndex = 0;
14
+ // Worker function: runs until there are no more tasks left.
15
+ // Each worker picks the next available task and runs it.
16
+ async function worker() {
17
+ while (currentIndex < tasks.length) {
18
+ const taskIndex = currentIndex++;
19
+ const task = tasks[taskIndex];
20
+ // Execute the task and store the result in the correct position
21
+ results[taskIndex] = await task();
22
+ }
23
+ }
24
+ // Create a pool of "batchSize" workers
25
+ const workers = Array.from({ length: batchSize }, () => worker());
26
+ // Wait until all workers finish
27
+ await Promise.all(workers);
28
+ return results;
29
+ }
30
+ exports.forEachLimit = forEachLimit;
31
+ //# sourceMappingURL=forEachLimit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forEachLimit.js","sourceRoot":"","sources":["../../../src/lib/promise/forEachLimit.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACI,KAAK,UAAU,YAAY,CAChC,KAA8B,EAC9B,SAAiB;IAEjB,MAAM,OAAO,GAAQ,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7C,IAAI,YAAY,GAAG,CAAC,CAAC;IAErB,4DAA4D;IAC5D,yDAAyD;IACzD,KAAK,UAAU,MAAM;QACnB,OAAO,YAAY,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;YACnC,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;YACjC,MAAM,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;YAC9B,gEAAgE;YAChE,OAAO,CAAC,SAAS,CAAC,GAAG,MAAM,IAAI,EAAE,CAAC;QACpC,CAAC;IACH,CAAC;IAED,uCAAuC;IACvC,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;IAElE,gCAAgC;IAChC,MAAM,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAE3B,OAAO,OAAO,CAAC;AACjB,CAAC;AAzBD,oCAyBC"}
@@ -1,3 +1,4 @@
1
+ export { forEachLimit } from './forEachLimit';
1
2
  /**
2
3
  * ES 2023 Promise.withResolvers() polyfill
3
4
  *
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSuccessTuple = exports.PromiseTuple = exports.PromiseLazyLoad = exports.deferred = exports.PromiseWithResolvers = void 0;
3
+ exports.isSuccessTuple = exports.PromiseTuple = exports.PromiseLazyLoad = exports.deferred = exports.PromiseWithResolvers = exports.forEachLimit = void 0;
4
+ var forEachLimit_1 = require("./forEachLimit");
5
+ Object.defineProperty(exports, "forEachLimit", { enumerable: true, get: function () { return forEachLimit_1.forEachLimit; } });
4
6
  /**
5
7
  * ES 2023 Promise.withResolvers() polyfill
6
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/promise/index.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,SAAgB,oBAAoB;IAClC,IAAI,OAA6C,CAAC;IAClD,IAAI,MAAmC,CAAC;IAExC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAI,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC1C,OAAO,GAAG,GAAG,CAAC;QACd,MAAM,GAAG,GAAG,C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3B,CAAC;AAFD,wCAEC"}
@@ -3,6 +3,7 @@ export interface ConvertedGraph {
3
3
  id?: string;
4
4
  version?: string;
5
5
  name?: string;
6
+ /** //TODO: what is this? */
6
7
  remote: unknown;
7
8
  metadata: unknown;
8
9
  versionData: unknown;
@@ -17,4 +18,5 @@ export interface ConvertedGraph {
17
18
  dependencies?: LocalPackageJson[];
18
19
  devDependencies?: LocalPackageJson[];
19
20
  optionalDependencies?: LocalPackageJson[];
21
+ target?: 'ios' | 'android' | 'web' | undefined;
20
22
  }
@@ -102,6 +102,11 @@ export interface ZephyrBuildStats {
102
102
  domain?: string | undefined;
103
103
  /** @deprecated */
104
104
  platform?: DeploymentIntegrationPlatform | undefined;
105
+ /**
106
+ * The target platform of the build , should be `ios`, `android`, `web` or undefined at
107
+ * the moment
108
+ */
109
+ build_target?: string;
105
110
  /** @deprecated */
106
111
  type: unknown;
107
112
  }
@@ -1 +1 @@
1
- {"version":3,"file":"zephyr-build-stats.js","sourceRoot":"","sources":["../../src/lib/zephyr-build-stats.ts"],"names":[],"mappings":";AAAA,0BAA0B;;AAmH1B,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;;AAwH1B,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-edge-contract",
3
- "version": "0.0.0-canary-20250122192655",
3
+ "version": "0.0.0-canary-20250122193404",
4
4
  "license": "Apache-2.0",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",