@storybook/cli 10.1.0-alpha.9 → 10.1.0-beta.0

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.
@@ -1,168 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_i5timqwdlx from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_i5timqwdlx from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_i5timqwdlx from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_i5timqwdlx.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_i5timqwdlx.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_i5timqwdlx.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
- import {
13
- __name
14
- } from "./chunk-5JXVRX4Y.js";
15
-
16
- // ../../node_modules/yocto-queue/index.js
17
- var Node = class {
18
- static {
19
- __name(this, "Node");
20
- }
21
- value;
22
- next;
23
- constructor(value) {
24
- this.value = value;
25
- }
26
- };
27
- var Queue = class {
28
- static {
29
- __name(this, "Queue");
30
- }
31
- #head;
32
- #tail;
33
- #size;
34
- constructor() {
35
- this.clear();
36
- }
37
- enqueue(value) {
38
- const node = new Node(value);
39
- if (this.#head) {
40
- this.#tail.next = node;
41
- this.#tail = node;
42
- } else {
43
- this.#head = node;
44
- this.#tail = node;
45
- }
46
- this.#size++;
47
- }
48
- dequeue() {
49
- const current = this.#head;
50
- if (!current) {
51
- return;
52
- }
53
- this.#head = this.#head.next;
54
- this.#size--;
55
- return current.value;
56
- }
57
- peek() {
58
- if (!this.#head) {
59
- return;
60
- }
61
- return this.#head.value;
62
- }
63
- clear() {
64
- this.#head = void 0;
65
- this.#tail = void 0;
66
- this.#size = 0;
67
- }
68
- get size() {
69
- return this.#size;
70
- }
71
- *[Symbol.iterator]() {
72
- let current = this.#head;
73
- while (current) {
74
- yield current.value;
75
- current = current.next;
76
- }
77
- }
78
- *drain() {
79
- while (this.#head) {
80
- yield this.dequeue();
81
- }
82
- }
83
- };
84
-
85
- // ../../node_modules/p-limit/index.js
86
- function pLimit(concurrency) {
87
- validateConcurrency(concurrency);
88
- const queue = new Queue();
89
- let activeCount = 0;
90
- const resumeNext = /* @__PURE__ */ __name(() => {
91
- if (activeCount < concurrency && queue.size > 0) {
92
- queue.dequeue()();
93
- activeCount++;
94
- }
95
- }, "resumeNext");
96
- const next = /* @__PURE__ */ __name(() => {
97
- activeCount--;
98
- resumeNext();
99
- }, "next");
100
- const run = /* @__PURE__ */ __name(async (function_, resolve, arguments_) => {
101
- const result = (async () => function_(...arguments_))();
102
- resolve(result);
103
- try {
104
- await result;
105
- } catch {
106
- }
107
- next();
108
- }, "run");
109
- const enqueue = /* @__PURE__ */ __name((function_, resolve, arguments_) => {
110
- new Promise((internalResolve) => {
111
- queue.enqueue(internalResolve);
112
- }).then(
113
- run.bind(void 0, function_, resolve, arguments_)
114
- );
115
- (async () => {
116
- await Promise.resolve();
117
- if (activeCount < concurrency) {
118
- resumeNext();
119
- }
120
- })();
121
- }, "enqueue");
122
- const generator = /* @__PURE__ */ __name((function_, ...arguments_) => new Promise((resolve) => {
123
- enqueue(function_, resolve, arguments_);
124
- }), "generator");
125
- Object.defineProperties(generator, {
126
- activeCount: {
127
- get: /* @__PURE__ */ __name(() => activeCount, "get")
128
- },
129
- pendingCount: {
130
- get: /* @__PURE__ */ __name(() => queue.size, "get")
131
- },
132
- clearQueue: {
133
- value() {
134
- queue.clear();
135
- }
136
- },
137
- concurrency: {
138
- get: /* @__PURE__ */ __name(() => concurrency, "get"),
139
- set(newConcurrency) {
140
- validateConcurrency(newConcurrency);
141
- concurrency = newConcurrency;
142
- queueMicrotask(() => {
143
- while (activeCount < concurrency && queue.size > 0) {
144
- resumeNext();
145
- }
146
- });
147
- }
148
- }
149
- });
150
- return generator;
151
- }
152
- __name(pLimit, "pLimit");
153
- function limitFunction(function_, option) {
154
- const { concurrency } = option;
155
- const limit = pLimit(concurrency);
156
- return (...arguments_) => limit(() => function_(...arguments_));
157
- }
158
- __name(limitFunction, "limitFunction");
159
- function validateConcurrency(concurrency) {
160
- if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
161
- throw new TypeError("Expected `concurrency` to be a number from 1 and up");
162
- }
163
- }
164
- __name(validateConcurrency, "validateConcurrency");
165
- export {
166
- pLimit as default,
167
- limitFunction
168
- };