@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,10 +1,10 @@
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";
1
+ import CJS_COMPAT_NODE_URL_s47ofujcb4 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_s47ofujcb4 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_s47ofujcb4 from "node:module";
4
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);
5
+ var __filename = CJS_COMPAT_NODE_URL_s47ofujcb4.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_s47ofujcb4.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_s47ofujcb4.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -21,8 +21,8 @@ import {
21
21
  isGitIgnoredSync,
22
22
  isIgnoredByIgnoreFiles,
23
23
  isIgnoredByIgnoreFilesSync
24
- } from "./chunk-QLMPSJFV.js";
25
- import "./chunk-5JXVRX4Y.js";
24
+ } from "./chunk-BHESI2CN.js";
25
+ import "./chunk-RYVNNZMV.js";
26
26
  export {
27
27
  convertPathToPattern,
28
28
  generateGlobTasks,
@@ -0,0 +1,116 @@
1
+ import CJS_COMPAT_NODE_URL_s47ofujcb4 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_s47ofujcb4 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_s47ofujcb4 from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_s47ofujcb4.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_s47ofujcb4.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_s47ofujcb4.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+ import "./chunk-RYVNNZMV.js";
13
+
14
+ // ../../node_modules/yocto-queue/index.js
15
+ var Node = class {
16
+ value;
17
+ next;
18
+ constructor(value) {
19
+ this.value = value;
20
+ }
21
+ }, Queue = class {
22
+ #head;
23
+ #tail;
24
+ #size;
25
+ constructor() {
26
+ this.clear();
27
+ }
28
+ enqueue(value) {
29
+ let node = new Node(value);
30
+ this.#head ? (this.#tail.next = node, this.#tail = node) : (this.#head = node, this.#tail = node), this.#size++;
31
+ }
32
+ dequeue() {
33
+ let current = this.#head;
34
+ if (current)
35
+ return this.#head = this.#head.next, this.#size--, this.#head || (this.#tail = void 0), current.value;
36
+ }
37
+ peek() {
38
+ if (this.#head)
39
+ return this.#head.value;
40
+ }
41
+ clear() {
42
+ this.#head = void 0, this.#tail = void 0, this.#size = 0;
43
+ }
44
+ get size() {
45
+ return this.#size;
46
+ }
47
+ *[Symbol.iterator]() {
48
+ let current = this.#head;
49
+ for (; current; )
50
+ yield current.value, current = current.next;
51
+ }
52
+ *drain() {
53
+ for (; this.#head; )
54
+ yield this.dequeue();
55
+ }
56
+ };
57
+
58
+ // ../../node_modules/p-limit/index.js
59
+ function pLimit(concurrency) {
60
+ validateConcurrency(concurrency);
61
+ let queue = new Queue(), activeCount = 0, resumeNext = () => {
62
+ activeCount < concurrency && queue.size > 0 && (queue.dequeue()(), activeCount++);
63
+ }, next = () => {
64
+ activeCount--, resumeNext();
65
+ }, run = async (function_, resolve, arguments_) => {
66
+ let result = (async () => function_(...arguments_))();
67
+ resolve(result);
68
+ try {
69
+ await result;
70
+ } catch {
71
+ }
72
+ next();
73
+ }, enqueue = (function_, resolve, arguments_) => {
74
+ new Promise((internalResolve) => {
75
+ queue.enqueue(internalResolve);
76
+ }).then(
77
+ run.bind(void 0, function_, resolve, arguments_)
78
+ ), (async () => (await Promise.resolve(), activeCount < concurrency && resumeNext()))();
79
+ }, generator = (function_, ...arguments_) => new Promise((resolve) => {
80
+ enqueue(function_, resolve, arguments_);
81
+ });
82
+ return Object.defineProperties(generator, {
83
+ activeCount: {
84
+ get: () => activeCount
85
+ },
86
+ pendingCount: {
87
+ get: () => queue.size
88
+ },
89
+ clearQueue: {
90
+ value() {
91
+ queue.clear();
92
+ }
93
+ },
94
+ concurrency: {
95
+ get: () => concurrency,
96
+ set(newConcurrency) {
97
+ validateConcurrency(newConcurrency), concurrency = newConcurrency, queueMicrotask(() => {
98
+ for (; activeCount < concurrency && queue.size > 0; )
99
+ resumeNext();
100
+ });
101
+ }
102
+ }
103
+ }), generator;
104
+ }
105
+ function limitFunction(function_, option) {
106
+ let { concurrency } = option, limit = pLimit(concurrency);
107
+ return (...arguments_) => limit(() => function_(...arguments_));
108
+ }
109
+ function validateConcurrency(concurrency) {
110
+ if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0))
111
+ throw new TypeError("Expected `concurrency` to be a number from 1 and up");
112
+ }
113
+ export {
114
+ pLimit as default,
115
+ limitFunction
116
+ };