@lana-commerce/core 14.0.0-alpha.6 → 14.0.0-alpha.8
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/CHANGELOG.md +2 -0
- package/cjs/json/common.js +1 -1
- package/cjs/json/mutator.js +2 -1
- package/esm/json/common.js +1 -1
- package/esm/json/mutator.js +1 -1
- package/package.json +1 -1
- package/types/json/mutator.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -21,6 +21,7 @@ This project adheres to [Semantic Versioning][semantic versioning].
|
|
|
21
21
|
- Add "webauthn" logic to "customer" module.
|
|
22
22
|
- Add webauthn related fields to customer/shop fragments.
|
|
23
23
|
- "Customer" module: now all signin forms share the custom error type. When custom error happens, it is set on all forms.
|
|
24
|
+
- Add "jobs" option to Mutator. Limits the number of simultaneously running jobs.
|
|
24
25
|
|
|
25
26
|
### Patch Changes
|
|
26
27
|
|
|
@@ -30,6 +31,7 @@ This project adheres to [Semantic Versioning][semantic versioning].
|
|
|
30
31
|
- Do not discard unhandled messages in "websocket" lib.
|
|
31
32
|
- Fix awaiters being dispatched before promise registeration in "websocket" lib.
|
|
32
33
|
- Use `"verbatimModuleSyntax": true` when compiling ESM version of the package.
|
|
34
|
+
- Increase verbosity on pretty printed error text in "json" client (sendUnwrap() method).
|
|
33
35
|
|
|
34
36
|
## [Released]
|
|
35
37
|
|
package/cjs/json/common.js
CHANGED
package/cjs/json/mutator.js
CHANGED
|
@@ -208,10 +208,11 @@ function batchProcessor(name, perBatch, groupBy, resolveItems) {
|
|
|
208
208
|
}
|
|
209
209
|
class StatsExecuteContext {
|
|
210
210
|
constructor(name, opts, progressCallback) {
|
|
211
|
+
var _a;
|
|
211
212
|
this.progressCallback = progressCallback;
|
|
212
213
|
this.opts = opts;
|
|
213
214
|
this.stats = { name, stats: new Map(), secondsElapsed: +new Date() };
|
|
214
|
-
this.limit = new promiseLimit_js_1.PromiseLimiter(opts.sequential ? 1 : 20);
|
|
215
|
+
this.limit = new promiseLimit_js_1.PromiseLimiter(opts.sequential ? 1 : (_a = opts.jobs) !== null && _a !== void 0 ? _a : 20);
|
|
215
216
|
}
|
|
216
217
|
done() {
|
|
217
218
|
this.stats.secondsElapsed = (+new Date() - this.stats.secondsElapsed) / 1000;
|
package/esm/json/common.js
CHANGED
package/esm/json/mutator.js
CHANGED
|
@@ -209,7 +209,7 @@ class StatsExecuteContext {
|
|
|
209
209
|
this.progressCallback = progressCallback;
|
|
210
210
|
this.opts = opts;
|
|
211
211
|
this.stats = { name, stats: new Map(), secondsElapsed: +new Date() };
|
|
212
|
-
this.limit = new PromiseLimiter(opts.sequential ? 1 : 20);
|
|
212
|
+
this.limit = new PromiseLimiter(opts.sequential ? 1 : opts.jobs ?? 20);
|
|
213
213
|
}
|
|
214
214
|
done() {
|
|
215
215
|
this.stats.secondsElapsed = (+new Date() - this.stats.secondsElapsed) / 1000;
|
package/package.json
CHANGED
package/types/json/mutator.d.ts
CHANGED
|
@@ -87,6 +87,8 @@ export interface ExecutionResult {
|
|
|
87
87
|
export interface MutatorOptions {
|
|
88
88
|
/** Run everything as sequentially as possible. */
|
|
89
89
|
sequential?: boolean;
|
|
90
|
+
/** When running things in parallel, override the limit of simultaneously running jobs. */
|
|
91
|
+
jobs?: number;
|
|
90
92
|
}
|
|
91
93
|
export declare class Mutator {
|
|
92
94
|
private batches;
|