@kubb/cli 3.5.3 → 3.5.5
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/{chunk-HGM6EZRG.cjs → chunk-QIIAJMH6.cjs} +61 -10
- package/dist/chunk-QIIAJMH6.cjs.map +1 -0
- package/dist/{generate-YZLOFWLB.cjs → generate-I27JEXNY.cjs} +16 -16
- package/dist/{generate-YZLOFWLB.cjs.map → generate-I27JEXNY.cjs.map} +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/dist/chunk-HGM6EZRG.cjs.map +0 -1
|
@@ -79,10 +79,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
79
79
|
mod
|
|
80
80
|
));
|
|
81
81
|
|
|
82
|
-
// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@20.17.
|
|
82
|
+
// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@20.17.16__jiti@2.4.2_postcss@8.4.49_typescript@5.7.3_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js
|
|
83
83
|
var getImportMetaUrl; exports.importMetaUrl = void 0;
|
|
84
84
|
var init_cjs_shims = __esm({
|
|
85
|
-
"../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@20.17.
|
|
85
|
+
"../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@20.17.16__jiti@2.4.2_postcss@8.4.49_typescript@5.7.3_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js"() {
|
|
86
86
|
getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
87
87
|
exports.importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
88
88
|
}
|
|
@@ -7701,7 +7701,7 @@ var ConsolaWritable = class extends stream.Writable {
|
|
|
7701
7701
|
}
|
|
7702
7702
|
};
|
|
7703
7703
|
|
|
7704
|
-
// ../../node_modules/.pnpm/p-queue@8.0
|
|
7704
|
+
// ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/index.js
|
|
7705
7705
|
init_cjs_shims();
|
|
7706
7706
|
|
|
7707
7707
|
// ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
|
|
@@ -7797,10 +7797,10 @@ function pTimeout(promise, options) {
|
|
|
7797
7797
|
return cancelablePromise;
|
|
7798
7798
|
}
|
|
7799
7799
|
|
|
7800
|
-
// ../../node_modules/.pnpm/p-queue@8.0
|
|
7800
|
+
// ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/priority-queue.js
|
|
7801
7801
|
init_cjs_shims();
|
|
7802
7802
|
|
|
7803
|
-
// ../../node_modules/.pnpm/p-queue@8.0
|
|
7803
|
+
// ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/lower-bound.js
|
|
7804
7804
|
init_cjs_shims();
|
|
7805
7805
|
function lowerBound(array, value, comparator) {
|
|
7806
7806
|
let first = 0;
|
|
@@ -7818,7 +7818,7 @@ function lowerBound(array, value, comparator) {
|
|
|
7818
7818
|
return first;
|
|
7819
7819
|
}
|
|
7820
7820
|
|
|
7821
|
-
// ../../node_modules/.pnpm/p-queue@8.0
|
|
7821
|
+
// ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/priority-queue.js
|
|
7822
7822
|
var PriorityQueue = class {
|
|
7823
7823
|
#queue = [];
|
|
7824
7824
|
enqueue(run, options) {
|
|
@@ -7828,15 +7828,24 @@ var PriorityQueue = class {
|
|
|
7828
7828
|
};
|
|
7829
7829
|
const element = {
|
|
7830
7830
|
priority: options.priority,
|
|
7831
|
+
id: options.id,
|
|
7831
7832
|
run
|
|
7832
7833
|
};
|
|
7833
|
-
if (this.size
|
|
7834
|
+
if (this.size === 0 || this.#queue[this.size - 1].priority >= options.priority) {
|
|
7834
7835
|
this.#queue.push(element);
|
|
7835
7836
|
return;
|
|
7836
7837
|
}
|
|
7837
7838
|
const index = lowerBound(this.#queue, element, (a3, b) => b.priority - a3.priority);
|
|
7838
7839
|
this.#queue.splice(index, 0, element);
|
|
7839
7840
|
}
|
|
7841
|
+
setPriority(id, priority) {
|
|
7842
|
+
const index = this.#queue.findIndex((element) => element.id === id);
|
|
7843
|
+
if (index === -1) {
|
|
7844
|
+
throw new ReferenceError(`No promise function with the id "${id}" exists in the queue.`);
|
|
7845
|
+
}
|
|
7846
|
+
const [item] = this.#queue.splice(index, 1);
|
|
7847
|
+
this.enqueue(item.run, { priority, id });
|
|
7848
|
+
}
|
|
7840
7849
|
dequeue() {
|
|
7841
7850
|
const item = this.#queue.shift();
|
|
7842
7851
|
return item?.run;
|
|
@@ -7849,7 +7858,7 @@ var PriorityQueue = class {
|
|
|
7849
7858
|
}
|
|
7850
7859
|
};
|
|
7851
7860
|
|
|
7852
|
-
// ../../node_modules/.pnpm/p-queue@8.0
|
|
7861
|
+
// ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/index.js
|
|
7853
7862
|
var PQueue = class extends import_index.default {
|
|
7854
7863
|
#carryoverConcurrencyCount;
|
|
7855
7864
|
#isIntervalIgnored;
|
|
@@ -7866,6 +7875,8 @@ var PQueue = class extends import_index.default {
|
|
|
7866
7875
|
#concurrency;
|
|
7867
7876
|
#isPaused;
|
|
7868
7877
|
#throwOnTimeout;
|
|
7878
|
+
// Use to assign a unique identifier to a promise function, if not explicitly specified
|
|
7879
|
+
#idAssigner = 1n;
|
|
7869
7880
|
/**
|
|
7870
7881
|
Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already.
|
|
7871
7882
|
|
|
@@ -8004,7 +8015,47 @@ var PQueue = class extends import_index.default {
|
|
|
8004
8015
|
}, { once: true });
|
|
8005
8016
|
});
|
|
8006
8017
|
}
|
|
8018
|
+
/**
|
|
8019
|
+
Updates the priority of a promise function by its id, affecting its execution order. Requires a defined concurrency limit to take effect.
|
|
8020
|
+
|
|
8021
|
+
For example, this can be used to prioritize a promise function to run earlier.
|
|
8022
|
+
|
|
8023
|
+
```js
|
|
8024
|
+
import PQueue from 'p-queue';
|
|
8025
|
+
|
|
8026
|
+
const queue = new PQueue({concurrency: 1});
|
|
8027
|
+
|
|
8028
|
+
queue.add(async () => '🦄', {priority: 1});
|
|
8029
|
+
queue.add(async () => '🦀', {priority: 0, id: '🦀'});
|
|
8030
|
+
queue.add(async () => '🦄', {priority: 1});
|
|
8031
|
+
queue.add(async () => '🦄', {priority: 1});
|
|
8032
|
+
|
|
8033
|
+
queue.setPriority('🦀', 2);
|
|
8034
|
+
```
|
|
8035
|
+
|
|
8036
|
+
In this case, the promise function with `id: '🦀'` runs second.
|
|
8037
|
+
|
|
8038
|
+
You can also deprioritize a promise function to delay its execution:
|
|
8039
|
+
|
|
8040
|
+
```js
|
|
8041
|
+
import PQueue from 'p-queue';
|
|
8042
|
+
|
|
8043
|
+
const queue = new PQueue({concurrency: 1});
|
|
8044
|
+
|
|
8045
|
+
queue.add(async () => '🦄', {priority: 1});
|
|
8046
|
+
queue.add(async () => '🦀', {priority: 1, id: '🦀'});
|
|
8047
|
+
queue.add(async () => '🦄');
|
|
8048
|
+
queue.add(async () => '🦄', {priority: 0});
|
|
8049
|
+
|
|
8050
|
+
queue.setPriority('🦀', -1);
|
|
8051
|
+
```
|
|
8052
|
+
Here, the promise function with `id: '🦀'` executes last.
|
|
8053
|
+
*/
|
|
8054
|
+
setPriority(id, priority) {
|
|
8055
|
+
this.#queue.setPriority(id, priority);
|
|
8056
|
+
}
|
|
8007
8057
|
async add(function_, options = {}) {
|
|
8058
|
+
options.id ??= (this.#idAssigner++).toString();
|
|
8008
8059
|
options = {
|
|
8009
8060
|
timeout: this.timeout,
|
|
8010
8061
|
throwOnTimeout: this.#throwOnTimeout,
|
|
@@ -8330,5 +8381,5 @@ ${logFiles.join("\n")}`);
|
|
|
8330
8381
|
exports.generate = generate;
|
|
8331
8382
|
exports.init_cjs_shims = init_cjs_shims;
|
|
8332
8383
|
exports.p = p2;
|
|
8333
|
-
//# sourceMappingURL=chunk-
|
|
8334
|
-
//# sourceMappingURL=chunk-
|
|
8384
|
+
//# sourceMappingURL=chunk-QIIAJMH6.cjs.map
|
|
8385
|
+
//# sourceMappingURL=chunk-QIIAJMH6.cjs.map
|