storybook 9.0.0-alpha.2 → 9.0.0-alpha.20
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/README.md +1 -1
- package/assets/docs/addon-backgrounds.gif +0 -0
- package/assets/docs/addon-controls-args-annotated.png +0 -0
- package/assets/docs/addon-controls-args-background-color.png +0 -0
- package/assets/docs/addon-controls-args-background-string.png +0 -0
- package/assets/docs/addon-controls-args-docs.png +0 -0
- package/assets/docs/addon-controls-args-logging.png +0 -0
- package/assets/docs/addon-controls-args-no-annotation.png +0 -0
- package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
- package/assets/docs/addon-controls-args-reflow.png +0 -0
- package/assets/docs/addon-controls-args-template.png +0 -0
- package/assets/docs/addon-controls-expanded.png +0 -0
- package/assets/docs/addon-controls-hero.gif +0 -0
- package/assets/docs/addon-controls-install.png +0 -0
- package/assets/docs/hero.gif +0 -0
- package/assets/docs/highlight.png +0 -0
- package/assets/docs/viewport.png +0 -0
- package/bin/index.cjs +2 -2
- package/dist/actions/decorator.d.ts +6 -0
- package/dist/actions/decorator.js +138 -0
- package/dist/actions/index.cjs +126 -0
- package/dist/actions/index.d.ts +102 -0
- package/dist/actions/index.js +111 -0
- package/dist/actions/preview.cjs +164 -0
- package/dist/actions/preview.d.ts +54 -0
- package/dist/actions/preview.js +155 -0
- package/dist/backgrounds/index.cjs +148 -0
- package/dist/backgrounds/index.d.ts +91 -0
- package/dist/backgrounds/index.js +130 -0
- package/dist/backgrounds/preview.cjs +143 -0
- package/dist/backgrounds/preview.d.ts +54 -0
- package/dist/backgrounds/preview.js +127 -0
- package/dist/bin/index.cjs +66 -89
- package/dist/bin/index.js +62 -85
- package/dist/builder-manager/index.cjs +523 -540
- package/dist/builder-manager/index.js +544 -561
- package/dist/channels/index.cjs +1026 -981
- package/dist/channels/index.js +1194 -1165
- package/dist/cli/bin/index.cjs +483 -483
- package/dist/cli/bin/index.js +495 -495
- package/dist/cli/index.cjs +2279 -2295
- package/dist/cli/index.d.ts +4 -8
- package/dist/cli/index.js +740 -756
- package/dist/client-logger/index.cjs +56 -88
- package/dist/client-logger/index.js +41 -47
- package/dist/common/index.cjs +2496 -2480
- package/dist/common/index.d.ts +5 -29
- package/dist/common/index.js +2679 -2663
- package/dist/component-testing/index.cjs +23 -0
- package/dist/component-testing/index.d.ts +3 -0
- package/dist/component-testing/index.js +5 -0
- package/dist/component-testing/preview.cjs +40 -0
- package/dist/component-testing/preview.d.ts +5 -0
- package/dist/component-testing/preview.js +25 -0
- package/dist/components/index.cjs +11709 -20418
- package/dist/components/index.d.ts +94 -346
- package/dist/components/index.js +5827 -19157
- package/dist/controls/decorator.d.ts +5 -0
- package/dist/controls/decorator.js +8 -0
- package/dist/controls/index.cjs +26 -0
- package/dist/controls/index.d.ts +39 -0
- package/dist/controls/index.js +6 -0
- package/dist/controls/preview.cjs +26 -0
- package/dist/controls/preview.d.ts +54 -0
- package/dist/controls/preview.js +9 -0
- package/dist/core-events/index.cjs +91 -106
- package/dist/core-events/index.d.ts +139 -104
- package/dist/core-events/index.js +79 -94
- package/dist/core-server/index.cjs +14413 -13924
- package/dist/core-server/index.d.ts +270 -3
- package/dist/core-server/index.js +14003 -13519
- package/dist/core-server/presets/common-manager.css +170 -0
- package/dist/core-server/presets/common-manager.js +12099 -17
- package/dist/core-server/presets/common-preset.cjs +2760 -2914
- package/dist/core-server/presets/common-preset.js +2852 -3007
- package/dist/csf/index.cjs +76 -120
- package/dist/csf/index.d.ts +2 -6
- package/dist/csf/index.js +69 -113
- package/dist/csf-tools/index.cjs +412 -403
- package/dist/csf-tools/index.d.ts +0 -4
- package/dist/csf-tools/index.js +410 -401
- package/dist/docs-tools/index.cjs +2569 -575
- package/dist/docs-tools/index.d.ts +2 -2
- package/dist/docs-tools/index.js +2557 -564
- package/dist/highlight/index.cjs +27 -0
- package/dist/highlight/index.d.ts +17 -0
- package/dist/highlight/index.js +7 -0
- package/dist/highlight/preview.cjs +81 -0
- package/dist/highlight/preview.d.ts +54 -0
- package/dist/highlight/preview.js +67 -0
- package/dist/instrumenter/index.cjs +2207 -2342
- package/dist/instrumenter/index.d.ts +8 -7
- package/dist/instrumenter/index.js +2438 -2620
- package/dist/manager/globals-module-info.cjs +290 -151
- package/dist/manager/globals-module-info.d.ts +1 -1
- package/dist/manager/globals-module-info.js +274 -135
- package/dist/manager/globals-runtime.js +60016 -28331
- package/dist/manager/globals.cjs +23 -19
- package/dist/manager/globals.d.ts +8 -5
- package/dist/manager/globals.js +10 -6
- package/dist/manager/runtime.js +4645 -3946
- package/dist/manager-api/index.cjs +4228 -3833
- package/dist/manager-api/index.d.ts +398 -102
- package/dist/manager-api/index.js +3676 -3291
- package/dist/manager-errors.d.ts +25 -1
- package/dist/manager-errors.js +42 -26
- package/dist/measure/index.cjs +474 -0
- package/dist/measure/index.d.ts +66 -0
- package/dist/measure/index.js +462 -0
- package/dist/measure/preview.cjs +464 -0
- package/dist/measure/preview.d.ts +59 -0
- package/dist/measure/preview.js +448 -0
- package/dist/outline/index.cjs +528 -0
- package/dist/outline/index.d.ts +66 -0
- package/dist/outline/index.js +500 -0
- package/dist/outline/preview.cjs +518 -0
- package/dist/outline/preview.d.ts +59 -0
- package/dist/outline/preview.js +486 -0
- package/dist/preview/globals.cjs +21 -17
- package/dist/preview/globals.d.ts +4 -1
- package/dist/preview/globals.js +6 -2
- package/dist/preview/runtime.js +45697 -6618
- package/dist/preview-api/index.cjs +1363 -1898
- package/dist/preview-api/index.d.ts +449 -498
- package/dist/preview-api/index.js +1622 -2095
- package/dist/preview-errors.cjs +99 -82
- package/dist/preview-errors.d.ts +25 -1
- package/dist/preview-errors.js +110 -94
- package/dist/router/index.cjs +847 -871
- package/dist/router/index.js +193 -199
- package/dist/server-errors.cjs +156 -125
- package/dist/server-errors.d.ts +28 -2
- package/dist/server-errors.js +150 -119
- package/dist/telemetry/index.cjs +1050 -1977
- package/dist/telemetry/index.d.ts +26 -5
- package/dist/telemetry/index.js +1085 -2008
- package/dist/test/index.cjs +35686 -0
- package/dist/test/index.d.ts +186 -0
- package/dist/test/index.js +33752 -0
- package/dist/test/preview.cjs +15870 -0
- package/dist/test/preview.d.ts +54 -0
- package/dist/test/preview.js +14441 -0
- package/dist/test/spy.cjs +258 -0
- package/dist/test/spy.d.ts +66 -0
- package/dist/test/spy.js +240 -0
- package/dist/theming/create.cjs +79 -2269
- package/dist/theming/create.js +67 -841
- package/dist/theming/index.cjs +1065 -3232
- package/dist/theming/index.js +951 -1719
- package/dist/types/index.cjs +11 -12
- package/dist/types/index.d.ts +612 -157
- package/dist/types/index.js +1 -2
- package/dist/viewport/index.cjs +310 -0
- package/dist/viewport/index.d.ts +320 -0
- package/dist/viewport/index.js +290 -0
- package/dist/viewport/preview.cjs +35 -0
- package/dist/viewport/preview.d.ts +68 -0
- package/dist/viewport/preview.js +19 -0
- package/package.json +359 -12
|
@@ -4,12 +4,12 @@ import { dirname as ESM_COMPAT_dirname } from 'node:path';
|
|
|
4
4
|
const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
|
|
5
5
|
const __dirname = ESM_COMPAT_dirname(__filename);
|
|
6
6
|
const require = ESM_COMPAT_Module.createRequire(import.meta.url);
|
|
7
|
-
var
|
|
7
|
+
var Lt = Object.create;
|
|
8
8
|
var A = Object.defineProperty;
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var o = (e, i) => A(e, "name", { value: i, configurable: !0 }),
|
|
9
|
+
var Ct = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var At = Object.getOwnPropertyNames;
|
|
11
|
+
var Nt = Object.getPrototypeOf, Dt = Object.prototype.hasOwnProperty;
|
|
12
|
+
var o = (e, i) => A(e, "name", { value: i, configurable: !0 }), S = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "\
|
|
13
13
|
u" ? new Proxy(e, {
|
|
14
14
|
get: (i, t) => (typeof require < "u" ? require : i)[t]
|
|
15
15
|
}) : e)(function(e) {
|
|
@@ -17,16 +17,16 @@ u" ? new Proxy(e, {
|
|
|
17
17
|
throw Error('Dynamic require of "' + e + '" is not supported');
|
|
18
18
|
});
|
|
19
19
|
var q = (e, i) => () => (e && (i = e(e = 0)), i);
|
|
20
|
-
var
|
|
20
|
+
var N = (e, i) => () => (i || e((i = { exports: {} }).exports, i), i.exports), $ = (e, i) => {
|
|
21
21
|
for (var t in i)
|
|
22
22
|
A(e, t, { get: i[t], enumerable: !0 });
|
|
23
|
-
}, fe = (e, i, t,
|
|
23
|
+
}, fe = (e, i, t, a) => {
|
|
24
24
|
if (i && typeof i == "object" || typeof i == "function")
|
|
25
|
-
for (let
|
|
26
|
-
!
|
|
25
|
+
for (let r of At(i))
|
|
26
|
+
!Dt.call(e, r) && r !== t && A(e, r, { get: () => i[r], enumerable: !(a = Ct(i, r)) || a.enumerable });
|
|
27
27
|
return e;
|
|
28
28
|
};
|
|
29
|
-
var
|
|
29
|
+
var V = (e, i, t) => (t = e != null ? Lt(Nt(e)) : {}, fe(
|
|
30
30
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
31
|
// file that has been converted to a CommonJS file using a Babel-
|
|
32
32
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
@@ -37,16 +37,16 @@ var $ = (e, i, t) => (t = e != null ? At(It(e)) : {}, fe(
|
|
|
37
37
|
|
|
38
38
|
// ../node_modules/tslib/tslib.es6.mjs
|
|
39
39
|
var He = {};
|
|
40
|
-
|
|
41
|
-
__addDisposableResource: () =>
|
|
40
|
+
$(He, {
|
|
41
|
+
__addDisposableResource: () => qe,
|
|
42
42
|
__assign: () => H,
|
|
43
43
|
__asyncDelegator: () => Le,
|
|
44
|
-
__asyncGenerator: () =>
|
|
44
|
+
__asyncGenerator: () => Re,
|
|
45
45
|
__asyncValues: () => Ce,
|
|
46
|
-
__await: () =>
|
|
46
|
+
__await: () => R,
|
|
47
47
|
__awaiter: () => Ee,
|
|
48
48
|
__classPrivateFieldGet: () => Ie,
|
|
49
|
-
__classPrivateFieldIn: () =>
|
|
49
|
+
__classPrivateFieldIn: () => ze,
|
|
50
50
|
__classPrivateFieldSet: () => Me,
|
|
51
51
|
__createBinding: () => J,
|
|
52
52
|
__decorate: () => ye,
|
|
@@ -67,10 +67,10 @@ z(He, {
|
|
|
67
67
|
__runInitializers: () => be,
|
|
68
68
|
__setFunctionName: () => je,
|
|
69
69
|
__spread: () => ke,
|
|
70
|
-
__spreadArray: () =>
|
|
70
|
+
__spreadArray: () => Fe,
|
|
71
71
|
__spreadArrays: () => Te,
|
|
72
72
|
__values: () => B,
|
|
73
|
-
default: () =>
|
|
73
|
+
default: () => $t
|
|
74
74
|
});
|
|
75
75
|
function xe(e, i) {
|
|
76
76
|
if (typeof i != "function" && i !== null)
|
|
@@ -83,34 +83,34 @@ function xe(e, i) {
|
|
|
83
83
|
}
|
|
84
84
|
function he(e, i) {
|
|
85
85
|
var t = {};
|
|
86
|
-
for (var
|
|
86
|
+
for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && i.indexOf(a) < 0 && (t[a] = e[a]);
|
|
87
87
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
88
|
-
for (var
|
|
89
|
-
i.indexOf(r
|
|
88
|
+
for (var r = 0, a = Object.getOwnPropertySymbols(e); r < a.length; r++)
|
|
89
|
+
i.indexOf(a[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[r]) && (t[a[r]] = e[a[r]]);
|
|
90
90
|
return t;
|
|
91
91
|
}
|
|
92
|
-
function ye(e, i, t,
|
|
93
|
-
var
|
|
94
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") n = Reflect.decorate(e, i, t,
|
|
95
|
-
else for (var c = e.length - 1; c >= 0; c--) (s = e[c]) && (n = (
|
|
96
|
-
return
|
|
92
|
+
function ye(e, i, t, a) {
|
|
93
|
+
var r = arguments.length, n = r < 3 ? i : a === null ? a = Object.getOwnPropertyDescriptor(i, t) : a, s;
|
|
94
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") n = Reflect.decorate(e, i, t, a);
|
|
95
|
+
else for (var c = e.length - 1; c >= 0; c--) (s = e[c]) && (n = (r < 3 ? s(n) : r > 3 ? s(i, t, n) : s(i, t)) || n);
|
|
96
|
+
return r > 3 && n && Object.defineProperty(i, t, n), n;
|
|
97
97
|
}
|
|
98
98
|
function ve(e, i) {
|
|
99
|
-
return function(t,
|
|
100
|
-
i(t,
|
|
99
|
+
return function(t, a) {
|
|
100
|
+
i(t, a, e);
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function we(e, i, t,
|
|
103
|
+
function we(e, i, t, a, r, n) {
|
|
104
104
|
function s(v) {
|
|
105
105
|
if (v !== void 0 && typeof v != "function") throw new TypeError("Function expected");
|
|
106
106
|
return v;
|
|
107
107
|
}
|
|
108
108
|
o(s, "accept");
|
|
109
|
-
for (var c =
|
|
110
|
-
(l ? Object.getOwnPropertyDescriptor(l,
|
|
109
|
+
for (var c = a.kind, p = c === "getter" ? "get" : c === "setter" ? "set" : "value", l = !i && e ? a.static ? e : e.prototype : null, u = i ||
|
|
110
|
+
(l ? Object.getOwnPropertyDescriptor(l, a.name) : {}), d, x = !1, g = t.length - 1; g >= 0; g--) {
|
|
111
111
|
var m = {};
|
|
112
|
-
for (var f in
|
|
113
|
-
for (var f in
|
|
112
|
+
for (var f in a) m[f] = f === "access" ? {} : a[f];
|
|
113
|
+
for (var f in a.access) m.access[f] = a.access[f];
|
|
114
114
|
m.addInitializer = function(v) {
|
|
115
115
|
if (x) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
116
116
|
n.push(s(v || null));
|
|
@@ -119,15 +119,15 @@ function we(e, i, t, r, a, n) {
|
|
|
119
119
|
if (c === "accessor") {
|
|
120
120
|
if (y === void 0) continue;
|
|
121
121
|
if (y === null || typeof y != "object") throw new TypeError("Object expected");
|
|
122
|
-
(d = s(y.get)) && (u.get = d), (d = s(y.set)) && (u.set = d), (d = s(y.init)) &&
|
|
123
|
-
} else (d = s(y)) && (c === "field" ?
|
|
122
|
+
(d = s(y.get)) && (u.get = d), (d = s(y.set)) && (u.set = d), (d = s(y.init)) && r.unshift(d);
|
|
123
|
+
} else (d = s(y)) && (c === "field" ? r.unshift(d) : u[p] = d);
|
|
124
124
|
}
|
|
125
|
-
l && Object.defineProperty(l,
|
|
125
|
+
l && Object.defineProperty(l, a.name, u), x = !0;
|
|
126
126
|
}
|
|
127
127
|
function be(e, i, t) {
|
|
128
|
-
for (var
|
|
129
|
-
t =
|
|
130
|
-
return
|
|
128
|
+
for (var a = arguments.length > 2, r = 0; r < i.length; r++)
|
|
129
|
+
t = a ? i[r].call(e, t) : i[r].call(e);
|
|
130
|
+
return a ? t : void 0;
|
|
131
131
|
}
|
|
132
132
|
function _e(e) {
|
|
133
133
|
return typeof e == "symbol" ? e : "".concat(e);
|
|
@@ -139,16 +139,16 @@ function je(e, i, t) {
|
|
|
139
139
|
function Oe(e, i) {
|
|
140
140
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, i);
|
|
141
141
|
}
|
|
142
|
-
function Ee(e, i, t,
|
|
143
|
-
function
|
|
142
|
+
function Ee(e, i, t, a) {
|
|
143
|
+
function r(n) {
|
|
144
144
|
return n instanceof t ? n : new t(function(s) {
|
|
145
145
|
s(n);
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
return o(
|
|
148
|
+
return o(r, "adopt"), new (t || (t = Promise))(function(n, s) {
|
|
149
149
|
function c(u) {
|
|
150
150
|
try {
|
|
151
|
-
l(
|
|
151
|
+
l(a.next(u));
|
|
152
152
|
} catch (d) {
|
|
153
153
|
s(d);
|
|
154
154
|
}
|
|
@@ -156,23 +156,23 @@ function Ee(e, i, t, r) {
|
|
|
156
156
|
o(c, "fulfilled");
|
|
157
157
|
function p(u) {
|
|
158
158
|
try {
|
|
159
|
-
l(
|
|
159
|
+
l(a.throw(u));
|
|
160
160
|
} catch (d) {
|
|
161
161
|
s(d);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
o(p, "rejected");
|
|
165
165
|
function l(u) {
|
|
166
|
-
u.done ? n(u.value) :
|
|
166
|
+
u.done ? n(u.value) : r(u.value).then(c, p);
|
|
167
167
|
}
|
|
168
|
-
o(l, "step"), l((
|
|
168
|
+
o(l, "step"), l((a = a.apply(e, i || [])).next());
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
function Pe(e, i) {
|
|
172
172
|
var t = { label: 0, sent: /* @__PURE__ */ o(function() {
|
|
173
173
|
if (n[0] & 1) throw n[1];
|
|
174
174
|
return n[1];
|
|
175
|
-
}, "sent"), trys: [], ops: [] },
|
|
175
|
+
}, "sent"), trys: [], ops: [] }, a, r, n, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
176
176
|
return s.next = c(0), s.throw = c(1), s.return = c(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
177
177
|
return this;
|
|
178
178
|
}), s;
|
|
@@ -182,11 +182,11 @@ function Pe(e, i) {
|
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
184
|
function p(l) {
|
|
185
|
-
if (
|
|
185
|
+
if (a) throw new TypeError("Generator is already executing.");
|
|
186
186
|
for (; s && (s = 0, l[0] && (t = 0)), t; ) try {
|
|
187
|
-
if (
|
|
187
|
+
if (a = 1, r && (n = l[0] & 2 ? r.return : l[0] ? r.throw || ((n = r.return) && n.call(r), 0) : r.next) && !(n = n.call(r, l[1])).done)
|
|
188
188
|
return n;
|
|
189
|
-
switch (
|
|
189
|
+
switch (r = 0, n && (l = [l[0] & 2, n.value]), l[0]) {
|
|
190
190
|
case 0:
|
|
191
191
|
case 1:
|
|
192
192
|
n = l;
|
|
@@ -194,7 +194,7 @@ function Pe(e, i) {
|
|
|
194
194
|
case 4:
|
|
195
195
|
return t.label++, { value: l[1], done: !1 };
|
|
196
196
|
case 5:
|
|
197
|
-
t.label++,
|
|
197
|
+
t.label++, r = l[1], l = [0];
|
|
198
198
|
continue;
|
|
199
199
|
case 7:
|
|
200
200
|
l = t.ops.pop(), t.trys.pop();
|
|
@@ -221,9 +221,9 @@ function Pe(e, i) {
|
|
|
221
221
|
}
|
|
222
222
|
l = i.call(e, t);
|
|
223
223
|
} catch (u) {
|
|
224
|
-
l = [6, u],
|
|
224
|
+
l = [6, u], r = 0;
|
|
225
225
|
} finally {
|
|
226
|
-
|
|
226
|
+
a = n = 0;
|
|
227
227
|
}
|
|
228
228
|
if (l[0] & 5) throw l[1];
|
|
229
229
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
@@ -233,11 +233,11 @@ function Se(e, i) {
|
|
|
233
233
|
for (var t in e) t !== "default" && !Object.prototype.hasOwnProperty.call(i, t) && J(i, e, t);
|
|
234
234
|
}
|
|
235
235
|
function B(e) {
|
|
236
|
-
var i = typeof Symbol == "function" && Symbol.iterator, t = i && e[i],
|
|
236
|
+
var i = typeof Symbol == "function" && Symbol.iterator, t = i && e[i], a = 0;
|
|
237
237
|
if (t) return t.call(e);
|
|
238
238
|
if (e && typeof e.length == "number") return {
|
|
239
239
|
next: /* @__PURE__ */ o(function() {
|
|
240
|
-
return e &&
|
|
240
|
+
return e && a >= e.length && (e = void 0), { value: e && e[a++], done: !e };
|
|
241
241
|
}, "next")
|
|
242
242
|
};
|
|
243
243
|
throw new TypeError(i ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
@@ -245,14 +245,14 @@ function B(e) {
|
|
|
245
245
|
function ee(e, i) {
|
|
246
246
|
var t = typeof Symbol == "function" && e[Symbol.iterator];
|
|
247
247
|
if (!t) return e;
|
|
248
|
-
var
|
|
248
|
+
var a = t.call(e), r, n = [], s;
|
|
249
249
|
try {
|
|
250
|
-
for (; (i === void 0 || i-- > 0) && !(
|
|
250
|
+
for (; (i === void 0 || i-- > 0) && !(r = a.next()).done; ) n.push(r.value);
|
|
251
251
|
} catch (c) {
|
|
252
252
|
s = { error: c };
|
|
253
253
|
} finally {
|
|
254
254
|
try {
|
|
255
|
-
|
|
255
|
+
r && !r.done && (t = a.return) && t.call(a);
|
|
256
256
|
} finally {
|
|
257
257
|
if (s) throw s.error;
|
|
258
258
|
}
|
|
@@ -266,47 +266,47 @@ function ke() {
|
|
|
266
266
|
}
|
|
267
267
|
function Te() {
|
|
268
268
|
for (var e = 0, i = 0, t = arguments.length; i < t; i++) e += arguments[i].length;
|
|
269
|
-
for (var
|
|
270
|
-
for (var n = arguments[i], s = 0, c = n.length; s < c; s++,
|
|
271
|
-
r
|
|
272
|
-
return
|
|
269
|
+
for (var a = Array(e), r = 0, i = 0; i < t; i++)
|
|
270
|
+
for (var n = arguments[i], s = 0, c = n.length; s < c; s++, r++)
|
|
271
|
+
a[r] = n[s];
|
|
272
|
+
return a;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
if (t || arguments.length === 2) for (var
|
|
276
|
-
(n || !(
|
|
274
|
+
function Fe(e, i, t) {
|
|
275
|
+
if (t || arguments.length === 2) for (var a = 0, r = i.length, n; a < r; a++)
|
|
276
|
+
(n || !(a in i)) && (n || (n = Array.prototype.slice.call(i, 0, a)), n[a] = i[a]);
|
|
277
277
|
return e.concat(n || Array.prototype.slice.call(i));
|
|
278
278
|
}
|
|
279
|
-
function
|
|
280
|
-
return this instanceof
|
|
279
|
+
function R(e) {
|
|
280
|
+
return this instanceof R ? (this.v = e, this) : new R(e);
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function Re(e, i, t) {
|
|
283
283
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
284
|
-
var
|
|
285
|
-
return
|
|
284
|
+
var a = t.apply(e, i || []), r, n = [];
|
|
285
|
+
return r = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), c("next"), c("throw"), c("return", s), r[Symbol.
|
|
286
286
|
asyncIterator] = function() {
|
|
287
287
|
return this;
|
|
288
|
-
},
|
|
288
|
+
}, r;
|
|
289
289
|
function s(g) {
|
|
290
290
|
return function(m) {
|
|
291
291
|
return Promise.resolve(m).then(g, d);
|
|
292
292
|
};
|
|
293
293
|
}
|
|
294
294
|
function c(g, m) {
|
|
295
|
-
|
|
295
|
+
a[g] && (r[g] = function(f) {
|
|
296
296
|
return new Promise(function(y, v) {
|
|
297
297
|
n.push([g, f, y, v]) > 1 || p(g, f);
|
|
298
298
|
});
|
|
299
|
-
}, m && (
|
|
299
|
+
}, m && (r[g] = m(r[g])));
|
|
300
300
|
}
|
|
301
301
|
function p(g, m) {
|
|
302
302
|
try {
|
|
303
|
-
l(
|
|
303
|
+
l(a[g](m));
|
|
304
304
|
} catch (f) {
|
|
305
305
|
x(n[0][3], f);
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
function l(g) {
|
|
309
|
-
g.value instanceof
|
|
309
|
+
g.value instanceof R ? Promise.resolve(g.value.v).then(u, d) : x(n[0][2], g);
|
|
310
310
|
}
|
|
311
311
|
function u(g) {
|
|
312
312
|
p("next", g);
|
|
@@ -320,32 +320,32 @@ function Fe(e, i, t) {
|
|
|
320
320
|
}
|
|
321
321
|
function Le(e) {
|
|
322
322
|
var i, t;
|
|
323
|
-
return i = {},
|
|
324
|
-
throw
|
|
325
|
-
}),
|
|
323
|
+
return i = {}, a("next"), a("throw", function(r) {
|
|
324
|
+
throw r;
|
|
325
|
+
}), a("return"), i[Symbol.iterator] = function() {
|
|
326
326
|
return this;
|
|
327
327
|
}, i;
|
|
328
|
-
function r
|
|
329
|
-
i[
|
|
330
|
-
return (t = !t) ? { value:
|
|
328
|
+
function a(r, n) {
|
|
329
|
+
i[r] = e[r] ? function(s) {
|
|
330
|
+
return (t = !t) ? { value: R(e[r](s)), done: !1 } : n ? n(s) : s;
|
|
331
331
|
} : n;
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
function Ce(e) {
|
|
335
335
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
336
336
|
var i = e[Symbol.asyncIterator], t;
|
|
337
|
-
return i ? i.call(e) : (e = typeof B == "function" ? B(e) : e[Symbol.iterator](), t = {},
|
|
337
|
+
return i ? i.call(e) : (e = typeof B == "function" ? B(e) : e[Symbol.iterator](), t = {}, a("next"), a("throw"), a("return"), t[Symbol.asyncIterator] =
|
|
338
338
|
function() {
|
|
339
339
|
return this;
|
|
340
340
|
}, t);
|
|
341
|
-
function
|
|
341
|
+
function a(n) {
|
|
342
342
|
t[n] = e[n] && function(s) {
|
|
343
343
|
return new Promise(function(c, p) {
|
|
344
|
-
s = e[n](s),
|
|
344
|
+
s = e[n](s), r(c, p, s.done, s.value);
|
|
345
345
|
});
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function r(n, s, c, p) {
|
|
349
349
|
Promise.resolve(p).then(function(l) {
|
|
350
350
|
n({ value: l, done: c });
|
|
351
351
|
}, s);
|
|
@@ -357,94 +357,94 @@ function Ae(e, i) {
|
|
|
357
357
|
function Ne(e) {
|
|
358
358
|
if (e && e.__esModule) return e;
|
|
359
359
|
var i = {};
|
|
360
|
-
if (e != null) for (var t = Q(e),
|
|
361
|
-
return
|
|
360
|
+
if (e != null) for (var t = Q(e), a = 0; a < t.length; a++) t[a] !== "default" && J(i, e, t[a]);
|
|
361
|
+
return zt(i, e), i;
|
|
362
362
|
}
|
|
363
363
|
function De(e) {
|
|
364
364
|
return e && e.__esModule ? e : { default: e };
|
|
365
365
|
}
|
|
366
|
-
function Ie(e, i, t,
|
|
367
|
-
if (t === "a" && !
|
|
368
|
-
if (typeof i == "function" ? e !== i || !
|
|
366
|
+
function Ie(e, i, t, a) {
|
|
367
|
+
if (t === "a" && !a) throw new TypeError("Private accessor was defined without a getter");
|
|
368
|
+
if (typeof i == "function" ? e !== i || !a : !i.has(e)) throw new TypeError("Cannot read private member from an object whose class did not\
|
|
369
369
|
declare it");
|
|
370
|
-
return t === "m" ?
|
|
370
|
+
return t === "m" ? a : t === "a" ? a.call(e) : a ? a.value : i.get(e);
|
|
371
371
|
}
|
|
372
|
-
function Me(e, i, t,
|
|
373
|
-
if (
|
|
374
|
-
if (
|
|
375
|
-
if (typeof i == "function" ? e !== i || !
|
|
372
|
+
function Me(e, i, t, a, r) {
|
|
373
|
+
if (a === "m") throw new TypeError("Private method is not writable");
|
|
374
|
+
if (a === "a" && !r) throw new TypeError("Private accessor was defined without a setter");
|
|
375
|
+
if (typeof i == "function" ? e !== i || !r : !i.has(e)) throw new TypeError("Cannot write private member to an object whose class did not \
|
|
376
376
|
declare it");
|
|
377
|
-
return
|
|
377
|
+
return a === "a" ? r.call(e, t) : r ? r.value = t : i.set(e, t), t;
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function ze(e, i) {
|
|
380
380
|
if (i === null || typeof i != "object" && typeof i != "function") throw new TypeError("Cannot use 'in' operator on non-object");
|
|
381
381
|
return typeof e == "function" ? i === e : e.has(i);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function qe(e, i, t) {
|
|
384
384
|
if (i != null) {
|
|
385
385
|
if (typeof i != "object" && typeof i != "function") throw new TypeError("Object expected.");
|
|
386
|
-
var
|
|
386
|
+
var a, r;
|
|
387
387
|
if (t) {
|
|
388
388
|
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
389
|
-
|
|
389
|
+
a = i[Symbol.asyncDispose];
|
|
390
390
|
}
|
|
391
|
-
if (
|
|
391
|
+
if (a === void 0) {
|
|
392
392
|
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
393
|
-
|
|
393
|
+
a = i[Symbol.dispose], t && (r = a);
|
|
394
394
|
}
|
|
395
|
-
if (typeof
|
|
396
|
-
|
|
395
|
+
if (typeof a != "function") throw new TypeError("Object not disposable.");
|
|
396
|
+
r && (a = /* @__PURE__ */ o(function() {
|
|
397
397
|
try {
|
|
398
|
-
|
|
398
|
+
r.call(this);
|
|
399
399
|
} catch (n) {
|
|
400
400
|
return Promise.reject(n);
|
|
401
401
|
}
|
|
402
|
-
}, "dispose")), e.stack.push({ value: i, dispose:
|
|
402
|
+
}, "dispose")), e.stack.push({ value: i, dispose: a, async: t });
|
|
403
403
|
} else t && e.stack.push({ async: !0 });
|
|
404
404
|
return i;
|
|
405
405
|
}
|
|
406
406
|
function $e(e) {
|
|
407
407
|
function i(n) {
|
|
408
|
-
e.error = e.hasError ? new
|
|
408
|
+
e.error = e.hasError ? new qt(n, e.error, "An error was suppressed during disposal.") : n, e.hasError = !0;
|
|
409
409
|
}
|
|
410
410
|
o(i, "fail");
|
|
411
|
-
var t,
|
|
412
|
-
function
|
|
411
|
+
var t, a = 0;
|
|
412
|
+
function r() {
|
|
413
413
|
for (; t = e.stack.pop(); )
|
|
414
414
|
try {
|
|
415
|
-
if (!t.async &&
|
|
415
|
+
if (!t.async && a === 1) return a = 0, e.stack.push(t), Promise.resolve().then(r);
|
|
416
416
|
if (t.dispose) {
|
|
417
417
|
var n = t.dispose.call(t.value);
|
|
418
|
-
if (t.async) return
|
|
419
|
-
return i(s),
|
|
418
|
+
if (t.async) return a |= 2, Promise.resolve(n).then(r, function(s) {
|
|
419
|
+
return i(s), r();
|
|
420
420
|
});
|
|
421
|
-
} else
|
|
421
|
+
} else a |= 1;
|
|
422
422
|
} catch (s) {
|
|
423
423
|
i(s);
|
|
424
424
|
}
|
|
425
|
-
if (
|
|
425
|
+
if (a === 1) return e.hasError ? Promise.reject(e.error) : Promise.resolve();
|
|
426
426
|
if (e.hasError) throw e.error;
|
|
427
427
|
}
|
|
428
|
-
return o(
|
|
428
|
+
return o(r, "next"), r();
|
|
429
429
|
}
|
|
430
430
|
function We(e, i) {
|
|
431
|
-
return typeof e == "string" && /^\.\.?\//.test(e) ? e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(t,
|
|
432
|
-
return
|
|
431
|
+
return typeof e == "string" && /^\.\.?\//.test(e) ? e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(t, a, r, n, s) {
|
|
432
|
+
return a ? i ? ".jsx" : ".js" : r && (!n || !s) ? t : r + n + "." + s.toLowerCase() + "js";
|
|
433
433
|
}) : e;
|
|
434
434
|
}
|
|
435
|
-
var Y, H, J,
|
|
435
|
+
var Y, H, J, zt, Q, qt, $t, Be = q(() => {
|
|
436
436
|
Y = /* @__PURE__ */ o(function(e, i) {
|
|
437
|
-
return Y = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t,
|
|
438
|
-
t.__proto__ =
|
|
439
|
-
} || function(t,
|
|
440
|
-
for (var
|
|
437
|
+
return Y = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, a) {
|
|
438
|
+
t.__proto__ = a;
|
|
439
|
+
} || function(t, a) {
|
|
440
|
+
for (var r in a) Object.prototype.hasOwnProperty.call(a, r) && (t[r] = a[r]);
|
|
441
441
|
}, Y(e, i);
|
|
442
442
|
}, "extendStatics");
|
|
443
443
|
o(xe, "__extends");
|
|
444
444
|
H = /* @__PURE__ */ o(function() {
|
|
445
445
|
return H = Object.assign || /* @__PURE__ */ o(function(i) {
|
|
446
|
-
for (var t,
|
|
447
|
-
t = arguments[
|
|
446
|
+
for (var t, a = 1, r = arguments.length; a < r; a++) {
|
|
447
|
+
t = arguments[a];
|
|
448
448
|
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (i[n] = t[n]);
|
|
449
449
|
}
|
|
450
450
|
return i;
|
|
@@ -460,34 +460,34 @@ var Y, H, J, $t, Q, Wt, Ht, Be = q(() => {
|
|
|
460
460
|
o(Oe, "__metadata");
|
|
461
461
|
o(Ee, "__awaiter");
|
|
462
462
|
o(Pe, "__generator");
|
|
463
|
-
J = Object.create ? function(e, i, t,
|
|
464
|
-
|
|
465
|
-
var
|
|
466
|
-
(!
|
|
463
|
+
J = Object.create ? function(e, i, t, a) {
|
|
464
|
+
a === void 0 && (a = t);
|
|
465
|
+
var r = Object.getOwnPropertyDescriptor(i, t);
|
|
466
|
+
(!r || ("get" in r ? !i.__esModule : r.writable || r.configurable)) && (r = { enumerable: !0, get: /* @__PURE__ */ o(function() {
|
|
467
467
|
return i[t];
|
|
468
|
-
}, "get") }), Object.defineProperty(e,
|
|
469
|
-
} : function(e, i, t,
|
|
470
|
-
|
|
468
|
+
}, "get") }), Object.defineProperty(e, a, r);
|
|
469
|
+
} : function(e, i, t, a) {
|
|
470
|
+
a === void 0 && (a = t), e[a] = i[t];
|
|
471
471
|
};
|
|
472
472
|
o(Se, "__exportStar");
|
|
473
473
|
o(B, "__values");
|
|
474
474
|
o(ee, "__read");
|
|
475
475
|
o(ke, "__spread");
|
|
476
476
|
o(Te, "__spreadArrays");
|
|
477
|
-
o(
|
|
478
|
-
o(
|
|
479
|
-
o(
|
|
477
|
+
o(Fe, "__spreadArray");
|
|
478
|
+
o(R, "__await");
|
|
479
|
+
o(Re, "__asyncGenerator");
|
|
480
480
|
o(Le, "__asyncDelegator");
|
|
481
481
|
o(Ce, "__asyncValues");
|
|
482
482
|
o(Ae, "__makeTemplateObject");
|
|
483
|
-
|
|
483
|
+
zt = Object.create ? function(e, i) {
|
|
484
484
|
Object.defineProperty(e, "default", { enumerable: !0, value: i });
|
|
485
485
|
} : function(e, i) {
|
|
486
486
|
e.default = i;
|
|
487
487
|
}, Q = /* @__PURE__ */ o(function(e) {
|
|
488
488
|
return Q = Object.getOwnPropertyNames || function(i) {
|
|
489
489
|
var t = [];
|
|
490
|
-
for (var
|
|
490
|
+
for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (t[t.length] = a);
|
|
491
491
|
return t;
|
|
492
492
|
}, Q(e);
|
|
493
493
|
}, "ownKeys");
|
|
@@ -495,15 +495,15 @@ var Y, H, J, $t, Q, Wt, Ht, Be = q(() => {
|
|
|
495
495
|
o(De, "__importDefault");
|
|
496
496
|
o(Ie, "__classPrivateFieldGet");
|
|
497
497
|
o(Me, "__classPrivateFieldSet");
|
|
498
|
-
o(
|
|
499
|
-
o(
|
|
500
|
-
|
|
501
|
-
var
|
|
502
|
-
return
|
|
498
|
+
o(ze, "__classPrivateFieldIn");
|
|
499
|
+
o(qe, "__addDisposableResource");
|
|
500
|
+
qt = typeof SuppressedError == "function" ? SuppressedError : function(e, i, t) {
|
|
501
|
+
var a = new Error(t);
|
|
502
|
+
return a.name = "SuppressedError", a.error = e, a.suppressed = i, a;
|
|
503
503
|
};
|
|
504
504
|
o($e, "__disposeResources");
|
|
505
505
|
o(We, "__rewriteRelativeImportExtension");
|
|
506
|
-
|
|
506
|
+
$t = {
|
|
507
507
|
__extends: xe,
|
|
508
508
|
__assign: H,
|
|
509
509
|
__rest: he,
|
|
@@ -522,9 +522,9 @@ var Y, H, J, $t, Q, Wt, Ht, Be = q(() => {
|
|
|
522
522
|
__read: ee,
|
|
523
523
|
__spread: ke,
|
|
524
524
|
__spreadArrays: Te,
|
|
525
|
-
__spreadArray:
|
|
526
|
-
__await:
|
|
527
|
-
__asyncGenerator:
|
|
525
|
+
__spreadArray: Fe,
|
|
526
|
+
__await: R,
|
|
527
|
+
__asyncGenerator: Re,
|
|
528
528
|
__asyncDelegator: Le,
|
|
529
529
|
__asyncValues: Ce,
|
|
530
530
|
__makeTemplateObject: Ae,
|
|
@@ -532,28 +532,28 @@ var Y, H, J, $t, Q, Wt, Ht, Be = q(() => {
|
|
|
532
532
|
__importDefault: De,
|
|
533
533
|
__classPrivateFieldGet: Ie,
|
|
534
534
|
__classPrivateFieldSet: Me,
|
|
535
|
-
__classPrivateFieldIn:
|
|
536
|
-
__addDisposableResource:
|
|
535
|
+
__classPrivateFieldIn: ze,
|
|
536
|
+
__addDisposableResource: qe,
|
|
537
537
|
__disposeResources: $e,
|
|
538
538
|
__rewriteRelativeImportExtension: We
|
|
539
539
|
};
|
|
540
540
|
});
|
|
541
541
|
|
|
542
542
|
// ../node_modules/@yarnpkg/esbuild-plugin-pnp/lib/index.js
|
|
543
|
-
var Ue =
|
|
543
|
+
var Ue = N((U) => {
|
|
544
544
|
"use strict";
|
|
545
545
|
Object.defineProperty(U, "__esModule", { value: !0 });
|
|
546
546
|
U.pnpPlugin = void 0;
|
|
547
|
-
var Je = (Be(), W(He)),
|
|
547
|
+
var Je = (Be(), W(He)), Wt = Je.__importStar(S("fs")), Ht = Je.__importDefault(S("path")), Bt = /()/, Jt = [".tsx", ".ts", ".jsx", ".mjs",
|
|
548
548
|
".cjs", ".js", ".css", ".json"];
|
|
549
|
-
function
|
|
549
|
+
function Ut(e) {
|
|
550
550
|
return e.map((i) => {
|
|
551
551
|
let t = i.indexOf("*");
|
|
552
552
|
return t !== -1 ? { prefix: i.slice(0, t), suffix: i.slice(t + 1) } : i;
|
|
553
553
|
});
|
|
554
554
|
}
|
|
555
|
-
o(
|
|
556
|
-
function
|
|
555
|
+
o(Ut, "parseExternals");
|
|
556
|
+
function Gt(e, i) {
|
|
557
557
|
for (let t of i)
|
|
558
558
|
if (typeof t == "object") {
|
|
559
559
|
if (e.length >= t.prefix.length + t.suffix.length && e.startsWith(t.prefix) && e.endsWith(t.suffix))
|
|
@@ -563,44 +563,44 @@ var Ue = R((U) => {
|
|
|
563
563
|
return !0;
|
|
564
564
|
return !1;
|
|
565
565
|
}
|
|
566
|
-
o(
|
|
567
|
-
async function
|
|
566
|
+
o(Gt, "isExternal");
|
|
567
|
+
async function Vt(e) {
|
|
568
568
|
return {
|
|
569
|
-
contents: await
|
|
569
|
+
contents: await Wt.promises.readFile(e.path),
|
|
570
570
|
loader: "default",
|
|
571
571
|
// For regular imports in the `file` namespace, resolveDir is the directory the
|
|
572
572
|
// file being resolved lives in. For all other virtual modules, this defaults to
|
|
573
573
|
// empty string: ""
|
|
574
574
|
// A sensible value for pnp imports is the same as the `file` namespace, as pnp
|
|
575
575
|
// still resolves to files on disk (in the cache).
|
|
576
|
-
resolveDir:
|
|
576
|
+
resolveDir: Ht.default.dirname(e.path)
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
o(
|
|
580
|
-
async function
|
|
581
|
-
let
|
|
579
|
+
o(Vt, "defaultOnLoad");
|
|
580
|
+
async function Xt(e, { resolvedPath: i, error: t, watchFiles: a }) {
|
|
581
|
+
let r = t ? [{ text: t.message }] : [], n;
|
|
582
582
|
switch (e.kind) {
|
|
583
583
|
case "require-call":
|
|
584
584
|
case "require-resolve":
|
|
585
585
|
case "dynamic-import":
|
|
586
|
-
n = { warnings:
|
|
586
|
+
n = { warnings: r };
|
|
587
587
|
break;
|
|
588
588
|
default:
|
|
589
|
-
n = { errors:
|
|
589
|
+
n = { errors: r };
|
|
590
590
|
break;
|
|
591
591
|
}
|
|
592
|
-
return i !== null ? { namespace: "pnp", path: i, watchFiles:
|
|
592
|
+
return i !== null ? { namespace: "pnp", path: i, watchFiles: a } : { external: !0, ...n, watchFiles: a };
|
|
593
593
|
}
|
|
594
|
-
o(
|
|
595
|
-
function
|
|
594
|
+
o(Xt, "defaultOnResolve");
|
|
595
|
+
function Kt({ baseDir: e = process.cwd(), extensions: i = Jt, filter: t = Bt, onResolve: a = Xt, onLoad: r = Vt } = {}) {
|
|
596
596
|
return {
|
|
597
597
|
name: "@yarnpkg/esbuild-plugin-pnp",
|
|
598
598
|
setup(n) {
|
|
599
599
|
var s, c;
|
|
600
|
-
let { findPnpApi: p } =
|
|
600
|
+
let { findPnpApi: p } = S("module");
|
|
601
601
|
if (typeof p > "u")
|
|
602
602
|
return;
|
|
603
|
-
let l =
|
|
603
|
+
let l = Ut((s = n.initialOptions.external) !== null && s !== void 0 ? s : []), u = (c = n.initialOptions.platform) !== null && c !==
|
|
604
604
|
void 0 ? c : "browser", d = u === "node", x = new Set(n.initialOptions.conditions);
|
|
605
605
|
x.add("default"), (u === "browser" || u === "node") && x.add(u);
|
|
606
606
|
let g = new Set(x);
|
|
@@ -608,112 +608,93 @@ var Ue = R((U) => {
|
|
|
608
608
|
let m = new Set(x);
|
|
609
609
|
m.add("require"), n.onResolve({ filter: t }, (f) => {
|
|
610
610
|
var y, v;
|
|
611
|
-
if (
|
|
611
|
+
if (Gt(f.path, l))
|
|
612
612
|
return { external: !0 };
|
|
613
613
|
let _ = x;
|
|
614
614
|
f.kind === "dynamic-import" || f.kind === "import-statement" ? _ = g : (f.kind === "require-call" || f.kind === "require-resolve") &&
|
|
615
615
|
(_ = m);
|
|
616
|
-
let
|
|
616
|
+
let O = f.resolveDir ? `${f.resolveDir}/` : f.importer ? f.importer : `${e}/`, w = p(O);
|
|
617
617
|
if (!w)
|
|
618
618
|
return;
|
|
619
|
-
let
|
|
619
|
+
let E = null, P;
|
|
620
620
|
try {
|
|
621
|
-
|
|
621
|
+
E = w.resolveRequest(f.path, O, {
|
|
622
622
|
conditions: _,
|
|
623
623
|
considerBuiltins: d,
|
|
624
624
|
extensions: i
|
|
625
625
|
});
|
|
626
|
-
} catch (
|
|
627
|
-
|
|
626
|
+
} catch (z) {
|
|
627
|
+
P = z;
|
|
628
628
|
}
|
|
629
629
|
let T = [w.resolveRequest("pnpapi", null)];
|
|
630
|
-
if (
|
|
631
|
-
let
|
|
632
|
-
if (
|
|
633
|
-
let
|
|
634
|
-
|
|
635
|
-
void 0 ? v :
|
|
630
|
+
if (E) {
|
|
631
|
+
let z = w.findPackageLocator(E);
|
|
632
|
+
if (z) {
|
|
633
|
+
let G = w.getPackageInformation(z);
|
|
634
|
+
G?.linkType === "SOFT" && T.push((v = (y = w.resolveVirtual) === null || y === void 0 ? void 0 : y.call(w, E)) !== null && v !==
|
|
635
|
+
void 0 ? v : E);
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
|
-
return
|
|
639
|
-
}), n.onLoad !== null && n.onLoad({ filter: t },
|
|
638
|
+
return a(f, { resolvedPath: E, error: P, watchFiles: T });
|
|
639
|
+
}), n.onLoad !== null && n.onLoad({ filter: t }, r);
|
|
640
640
|
}
|
|
641
641
|
};
|
|
642
642
|
}
|
|
643
|
-
o(
|
|
644
|
-
U.pnpPlugin =
|
|
645
|
-
});
|
|
646
|
-
|
|
647
|
-
// ../node_modules/esbuild-plugin-alias/index.js
|
|
648
|
-
var Ve = R((Ar, Ge) => {
|
|
649
|
-
Ge.exports = (e) => {
|
|
650
|
-
let i = Object.keys(e), t = new RegExp(`^(${i.map((r) => Qt(r)).join("|")})$`);
|
|
651
|
-
return {
|
|
652
|
-
name: "alias",
|
|
653
|
-
setup(r) {
|
|
654
|
-
r.onResolve({ filter: t }, (a) => ({
|
|
655
|
-
path: e[a.path]
|
|
656
|
-
}));
|
|
657
|
-
}
|
|
658
|
-
};
|
|
659
|
-
};
|
|
660
|
-
function Qt(e) {
|
|
661
|
-
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
662
|
-
}
|
|
663
|
-
o(Qt, "escapeRegExp");
|
|
643
|
+
o(Kt, "pnpPlugin");
|
|
644
|
+
U.pnpPlugin = Kt;
|
|
664
645
|
});
|
|
665
646
|
|
|
666
647
|
// ../node_modules/totalist/sync/index.mjs
|
|
667
|
-
var
|
|
668
|
-
|
|
669
|
-
totalist: () =>
|
|
648
|
+
var Ve = {};
|
|
649
|
+
$(Ve, {
|
|
650
|
+
totalist: () => Ge
|
|
670
651
|
});
|
|
671
|
-
import { join as te, resolve as
|
|
672
|
-
import { readdirSync as
|
|
673
|
-
function
|
|
674
|
-
e =
|
|
675
|
-
let
|
|
676
|
-
for (;
|
|
677
|
-
n = te(e, r
|
|
652
|
+
import { join as te, resolve as Zt } from "path";
|
|
653
|
+
import { readdirSync as Yt, statSync as Qt } from "fs";
|
|
654
|
+
function Ge(e, i, t = "") {
|
|
655
|
+
e = Zt(".", e);
|
|
656
|
+
let a = Yt(e), r = 0, n, s;
|
|
657
|
+
for (; r < a.length; r++)
|
|
658
|
+
n = te(e, a[r]), s = Qt(n), s.isDirectory() ? Ge(n, i, te(t, a[r])) : i(te(t, a[r]), n, s);
|
|
678
659
|
}
|
|
679
|
-
var
|
|
680
|
-
o(
|
|
660
|
+
var Xe = q(() => {
|
|
661
|
+
o(Ge, "totalist");
|
|
681
662
|
});
|
|
682
663
|
|
|
683
664
|
// ../node_modules/@polka/url/build.mjs
|
|
684
|
-
var
|
|
685
|
-
|
|
686
|
-
parse: () =>
|
|
665
|
+
var Ze = {};
|
|
666
|
+
$(Ze, {
|
|
667
|
+
parse: () => ei
|
|
687
668
|
});
|
|
688
|
-
import * as
|
|
689
|
-
function
|
|
669
|
+
import * as Ke from "node:querystring";
|
|
670
|
+
function ei(e) {
|
|
690
671
|
let i = e.url;
|
|
691
672
|
if (i == null) return;
|
|
692
673
|
let t = e._parsedUrl;
|
|
693
674
|
if (t && t.raw === i) return t;
|
|
694
|
-
let
|
|
675
|
+
let a = i, r = "", n;
|
|
695
676
|
if (i.length > 1) {
|
|
696
677
|
let s = i.indexOf("?", 1);
|
|
697
|
-
s !== -1 && (
|
|
678
|
+
s !== -1 && (r = i.substring(s), a = i.substring(0, s), r.length > 1 && (n = Ke.parse(r.substring(1))));
|
|
698
679
|
}
|
|
699
|
-
return e._parsedUrl = { pathname:
|
|
680
|
+
return e._parsedUrl = { pathname: a, search: r, query: n, raw: i };
|
|
700
681
|
}
|
|
701
|
-
var
|
|
702
|
-
o(
|
|
682
|
+
var Ye = q(() => {
|
|
683
|
+
o(ei, "parse");
|
|
703
684
|
});
|
|
704
685
|
|
|
705
686
|
// ../node_modules/mrmime/index.mjs
|
|
706
|
-
var
|
|
707
|
-
|
|
708
|
-
lookup: () =>
|
|
709
|
-
mimes: () =>
|
|
687
|
+
var et = {};
|
|
688
|
+
$(et, {
|
|
689
|
+
lookup: () => ti,
|
|
690
|
+
mimes: () => Qe
|
|
710
691
|
});
|
|
711
|
-
function
|
|
692
|
+
function ti(e) {
|
|
712
693
|
let i = ("" + e).trim().toLowerCase(), t = i.lastIndexOf(".");
|
|
713
|
-
return
|
|
694
|
+
return Qe[~t ? i.substring(++t) : i];
|
|
714
695
|
}
|
|
715
|
-
var
|
|
716
|
-
|
|
696
|
+
var Qe, tt = q(() => {
|
|
697
|
+
Qe = {
|
|
717
698
|
"3g2": "video/3gpp2",
|
|
718
699
|
"3gp": "video/3gpp",
|
|
719
700
|
"3gpp": "video/3gpp",
|
|
@@ -1149,82 +1130,82 @@ var tt, rt = q(() => {
|
|
|
1149
1130
|
yml: "text/yaml",
|
|
1150
1131
|
zip: "application/zip"
|
|
1151
1132
|
};
|
|
1152
|
-
o(
|
|
1133
|
+
o(ti, "lookup");
|
|
1153
1134
|
});
|
|
1154
1135
|
|
|
1155
1136
|
// ../node_modules/sirv/build.js
|
|
1156
|
-
var
|
|
1157
|
-
var ie =
|
|
1158
|
-
lookup:
|
|
1137
|
+
var nt = N((Na, rt) => {
|
|
1138
|
+
var ie = S("fs"), { join: ii, normalize: ai, resolve: ri } = S("path"), { totalist: ni } = (Xe(), W(Ve)), { parse: oi } = (Ye(), W(Ze)), {
|
|
1139
|
+
lookup: si } = (tt(), W(et)), li = /* @__PURE__ */ o(() => {
|
|
1159
1140
|
}, "noop");
|
|
1160
|
-
function
|
|
1141
|
+
function ci(e, i) {
|
|
1161
1142
|
for (let t = 0; t < i.length; t++)
|
|
1162
1143
|
if (i[t].test(e)) return !0;
|
|
1163
1144
|
}
|
|
1164
|
-
o(
|
|
1165
|
-
function
|
|
1166
|
-
let t = 0,
|
|
1167
|
-
e.charCodeAt(
|
|
1145
|
+
o(ci, "isMatch");
|
|
1146
|
+
function it(e, i) {
|
|
1147
|
+
let t = 0, a, r = e.length - 1;
|
|
1148
|
+
e.charCodeAt(r) === 47 && (e = e.substring(0, r));
|
|
1168
1149
|
let n = [], s = `${e}/index`;
|
|
1169
1150
|
for (; t < i.length; t++)
|
|
1170
|
-
|
|
1151
|
+
a = i[t] ? `.${i[t]}` : "", e && n.push(e + a), n.push(s + a);
|
|
1171
1152
|
return n;
|
|
1172
1153
|
}
|
|
1173
|
-
o(
|
|
1174
|
-
function
|
|
1175
|
-
let
|
|
1176
|
-
for (; r < n.length; r++)
|
|
1177
|
-
if (a = e[n[r]]) return a;
|
|
1178
|
-
}
|
|
1179
|
-
o(fi, "viaCache");
|
|
1180
|
-
function di(e, i, t, r) {
|
|
1181
|
-
let a = 0, n = at(t, r), s, c, p, l;
|
|
1154
|
+
o(it, "toAssume");
|
|
1155
|
+
function pi(e, i, t) {
|
|
1156
|
+
let a = 0, r, n = it(i, t);
|
|
1182
1157
|
for (; a < n.length; a++)
|
|
1183
|
-
if (
|
|
1158
|
+
if (r = e[n[a]]) return r;
|
|
1159
|
+
}
|
|
1160
|
+
o(pi, "viaCache");
|
|
1161
|
+
function mi(e, i, t, a) {
|
|
1162
|
+
let r = 0, n = it(t, a), s, c, p, l;
|
|
1163
|
+
for (; r < n.length; r++)
|
|
1164
|
+
if (s = ai(ii(e, p = n[r])), s.startsWith(e) && ie.existsSync(s)) {
|
|
1184
1165
|
if (c = ie.statSync(s), c.isDirectory()) continue;
|
|
1185
|
-
return l =
|
|
1166
|
+
return l = at(p, c, i), l["Cache-Control"] = i ? "no-cache" : "no-store", { abs: s, stats: c, headers: l };
|
|
1186
1167
|
}
|
|
1187
1168
|
}
|
|
1188
|
-
o(
|
|
1189
|
-
function
|
|
1169
|
+
o(mi, "viaLocal");
|
|
1170
|
+
function ui(e, i) {
|
|
1190
1171
|
return i.statusCode = 404, i.end();
|
|
1191
1172
|
}
|
|
1192
|
-
o(
|
|
1193
|
-
function
|
|
1173
|
+
o(ui, "is404");
|
|
1174
|
+
function fi(e, i, t, a, r) {
|
|
1194
1175
|
let n = 200, s, c = {};
|
|
1195
|
-
|
|
1196
|
-
for (let p in
|
|
1197
|
-
s = i.getHeader(p), s && (
|
|
1198
|
-
if ((s = i.getHeader("content-type")) && (
|
|
1176
|
+
r = { ...r };
|
|
1177
|
+
for (let p in r)
|
|
1178
|
+
s = i.getHeader(p), s && (r[p] = s);
|
|
1179
|
+
if ((s = i.getHeader("content-type")) && (r["Content-Type"] = s), e.headers.range) {
|
|
1199
1180
|
n = 206;
|
|
1200
|
-
let [p, l] = e.headers.range.replace("bytes=", "").split("-"), u = c.end = parseInt(l, 10) ||
|
|
1181
|
+
let [p, l] = e.headers.range.replace("bytes=", "").split("-"), u = c.end = parseInt(l, 10) || a.size - 1, d = c.start = parseInt(p, 10) ||
|
|
1201
1182
|
0;
|
|
1202
|
-
if (u >=
|
|
1203
|
-
return i.setHeader("Content-Range", `bytes */${
|
|
1204
|
-
|
|
1183
|
+
if (u >= a.size && (u = a.size - 1), d >= a.size)
|
|
1184
|
+
return i.setHeader("Content-Range", `bytes */${a.size}`), i.statusCode = 416, i.end();
|
|
1185
|
+
r["Content-Range"] = `bytes ${d}-${u}/${a.size}`, r["Content-Length"] = u - d + 1, r["Accept-Ranges"] = "bytes";
|
|
1205
1186
|
}
|
|
1206
|
-
i.writeHead(n,
|
|
1187
|
+
i.writeHead(n, r), ie.createReadStream(t, c).pipe(i);
|
|
1207
1188
|
}
|
|
1208
|
-
o(
|
|
1209
|
-
var
|
|
1189
|
+
o(fi, "send");
|
|
1190
|
+
var di = {
|
|
1210
1191
|
".br": "br",
|
|
1211
1192
|
".gz": "gzip"
|
|
1212
1193
|
};
|
|
1213
|
-
function
|
|
1214
|
-
let
|
|
1215
|
-
|
|
1194
|
+
function at(e, i, t) {
|
|
1195
|
+
let a = di[e.slice(-3)], r = si(e.slice(0, a && -3)) || "";
|
|
1196
|
+
r === "text/html" && (r += ";charset=utf-8");
|
|
1216
1197
|
let n = {
|
|
1217
1198
|
"Content-Length": i.size,
|
|
1218
|
-
"Content-Type":
|
|
1199
|
+
"Content-Type": r,
|
|
1219
1200
|
"Last-Modified": i.mtime.toUTCString()
|
|
1220
1201
|
};
|
|
1221
|
-
return
|
|
1202
|
+
return a && (n["Content-Encoding"] = a), t && (n.ETag = `W/"${i.size}-${i.mtime.getTime()}"`), n;
|
|
1222
1203
|
}
|
|
1223
|
-
o(
|
|
1224
|
-
|
|
1225
|
-
e =
|
|
1226
|
-
let t = i.onNoMatch ||
|
|
1227
|
-
s = i.brotli &&
|
|
1204
|
+
o(at, "toHeaders");
|
|
1205
|
+
rt.exports = function(e, i = {}) {
|
|
1206
|
+
e = ri(e || ".");
|
|
1207
|
+
let t = i.onNoMatch || ui, a = i.setHeaders || li, r = i.extensions || ["html", "htm"], n = i.gzip && r.map((m) => `${m}.gz`).concat("gz"),
|
|
1208
|
+
s = i.brotli && r.map((m) => `${m}.br`).concat("br"), c = {}, p = "/", l = !!i.etag, u = !!i.single;
|
|
1228
1209
|
if (typeof i.single == "string") {
|
|
1229
1210
|
let m = i.single.lastIndexOf(".");
|
|
1230
1211
|
p += ~m ? i.single.substring(0, m) : i.single;
|
|
@@ -1235,51 +1216,51 @@ var st = R(($r, ot) => {
|
|
|
1235
1216
|
d.push(new RegExp(m, "i"));
|
|
1236
1217
|
}));
|
|
1237
1218
|
let x = i.maxAge != null && `public,max-age=${i.maxAge}`;
|
|
1238
|
-
x && i.immutable ? x += ",immutable" : x && i.maxAge === 0 && (x += ",must-revalidate"), i.dev ||
|
|
1219
|
+
x && i.immutable ? x += ",immutable" : x && i.maxAge === 0 && (x += ",must-revalidate"), i.dev || ni(e, (m, f, y) => {
|
|
1239
1220
|
if (!/\.well-known[\\+\/]/.test(m)) {
|
|
1240
1221
|
if (!i.dotfiles && /(^\.|[\\+|\/+]\.)/.test(m)) return;
|
|
1241
1222
|
}
|
|
1242
|
-
let v =
|
|
1223
|
+
let v = at(m, y, l);
|
|
1243
1224
|
x && (v["Cache-Control"] = x), c["/" + m.normalize().replace(/\\+/g, "/")] = { abs: f, stats: y, headers: v };
|
|
1244
1225
|
});
|
|
1245
|
-
let g = i.dev ?
|
|
1226
|
+
let g = i.dev ? mi.bind(0, e, l) : pi.bind(0, c);
|
|
1246
1227
|
return function(m, f, y) {
|
|
1247
|
-
let v = [""], _ =
|
|
1248
|
-
if (n &&
|
|
1228
|
+
let v = [""], _ = oi(m).pathname, O = m.headers["accept-encoding"] || "";
|
|
1229
|
+
if (n && O.includes("gzip") && v.unshift(...n), s && /(br|brotli)/i.test(O) && v.unshift(...s), v.push(...r), _.indexOf("%") !== -1)
|
|
1249
1230
|
try {
|
|
1250
1231
|
_ = decodeURI(_);
|
|
1251
1232
|
} catch {
|
|
1252
1233
|
}
|
|
1253
|
-
let w = g(_, v) || u && !
|
|
1234
|
+
let w = g(_, v) || u && !ci(_, d) && g(p, v);
|
|
1254
1235
|
if (!w) return y ? y() : t(m, f);
|
|
1255
1236
|
if (l && m.headers["if-none-match"] === w.headers.ETag)
|
|
1256
1237
|
return f.writeHead(304), f.end();
|
|
1257
|
-
(n || s) && f.setHeader("Vary", "Accept-Encoding"),
|
|
1238
|
+
(n || s) && f.setHeader("Vary", "Accept-Encoding"), a(f, _, w.stats), fi(m, f, w.abs, w.stats, w.headers);
|
|
1258
1239
|
};
|
|
1259
1240
|
};
|
|
1260
1241
|
});
|
|
1261
1242
|
|
|
1262
1243
|
// ../node_modules/ejs/lib/utils.js
|
|
1263
|
-
var
|
|
1244
|
+
var st = N((k) => {
|
|
1264
1245
|
"use strict";
|
|
1265
|
-
var
|
|
1266
|
-
return
|
|
1246
|
+
var gi = /[|\\{}()[\]^$+*?.]/g, xi = Object.prototype.hasOwnProperty, ae = /* @__PURE__ */ o(function(e, i) {
|
|
1247
|
+
return xi.apply(e, [i]);
|
|
1267
1248
|
}, "hasOwn");
|
|
1268
1249
|
k.escapeRegExpChars = function(e) {
|
|
1269
|
-
return e ? String(e).replace(
|
|
1250
|
+
return e ? String(e).replace(gi, "\\$&") : "";
|
|
1270
1251
|
};
|
|
1271
|
-
var
|
|
1252
|
+
var hi = {
|
|
1272
1253
|
"&": "&",
|
|
1273
1254
|
"<": "<",
|
|
1274
1255
|
">": ">",
|
|
1275
1256
|
'"': """,
|
|
1276
1257
|
"'": "'"
|
|
1277
|
-
},
|
|
1278
|
-
function
|
|
1279
|
-
return
|
|
1258
|
+
}, yi = /[&<>'"]/g;
|
|
1259
|
+
function vi(e) {
|
|
1260
|
+
return hi[e] || e;
|
|
1280
1261
|
}
|
|
1281
|
-
o(
|
|
1282
|
-
var
|
|
1262
|
+
o(vi, "encode_char");
|
|
1263
|
+
var wi = `var _ENCODE_HTML_RULES = {
|
|
1283
1264
|
"&": "&"
|
|
1284
1265
|
, "<": "<"
|
|
1285
1266
|
, ">": ">"
|
|
@@ -1292,32 +1273,32 @@ function encode_char(c) {
|
|
|
1292
1273
|
};
|
|
1293
1274
|
`;
|
|
1294
1275
|
k.escapeXML = function(e) {
|
|
1295
|
-
return e == null ? "" : String(e).replace(
|
|
1276
|
+
return e == null ? "" : String(e).replace(yi, vi);
|
|
1296
1277
|
};
|
|
1297
|
-
function
|
|
1278
|
+
function ot() {
|
|
1298
1279
|
return Function.prototype.toString.call(this) + `;
|
|
1299
|
-
` +
|
|
1280
|
+
` + wi;
|
|
1300
1281
|
}
|
|
1301
|
-
o(
|
|
1282
|
+
o(ot, "escapeXMLToString");
|
|
1302
1283
|
try {
|
|
1303
|
-
typeof Object.defineProperty == "function" ? Object.defineProperty(k.escapeXML, "toString", { value:
|
|
1284
|
+
typeof Object.defineProperty == "function" ? Object.defineProperty(k.escapeXML, "toString", { value: ot }) : k.escapeXML.toString = ot;
|
|
1304
1285
|
} catch {
|
|
1305
1286
|
console.warn("Unable to set escapeXML.toString (is the Function prototype frozen?)");
|
|
1306
1287
|
}
|
|
1307
1288
|
k.shallowCopy = function(e, i) {
|
|
1308
1289
|
if (i = i || {}, e != null)
|
|
1309
1290
|
for (var t in i)
|
|
1310
|
-
|
|
1291
|
+
ae(i, t) && (t === "__proto__" || t === "constructor" || (e[t] = i[t]));
|
|
1311
1292
|
return e;
|
|
1312
1293
|
};
|
|
1313
1294
|
k.shallowCopyFromList = function(e, i, t) {
|
|
1314
1295
|
if (t = t || [], i = i || {}, e != null)
|
|
1315
|
-
for (var
|
|
1316
|
-
var
|
|
1317
|
-
if (typeof i[
|
|
1318
|
-
if (!
|
|
1296
|
+
for (var a = 0; a < t.length; a++) {
|
|
1297
|
+
var r = t[a];
|
|
1298
|
+
if (typeof i[r] < "u") {
|
|
1299
|
+
if (!ae(i, r) || r === "__proto__" || r === "constructor")
|
|
1319
1300
|
continue;
|
|
1320
|
-
e[
|
|
1301
|
+
e[r] = i[r];
|
|
1321
1302
|
}
|
|
1322
1303
|
}
|
|
1323
1304
|
return e;
|
|
@@ -1354,14 +1335,14 @@ function encode_char(c) {
|
|
|
1354
1335
|
k.hasOwnOnlyObject = function(e) {
|
|
1355
1336
|
var i = k.createNullProtoObjWherePossible();
|
|
1356
1337
|
for (var t in e)
|
|
1357
|
-
|
|
1338
|
+
ae(e, t) && (i[t] = e[t]);
|
|
1358
1339
|
return i;
|
|
1359
1340
|
};
|
|
1360
1341
|
});
|
|
1361
1342
|
|
|
1362
1343
|
// ../node_modules/ejs/package.json
|
|
1363
|
-
var
|
|
1364
|
-
|
|
1344
|
+
var lt = N((za, bi) => {
|
|
1345
|
+
bi.exports = {
|
|
1365
1346
|
name: "ejs",
|
|
1366
1347
|
description: "Embedded JavaScript templates",
|
|
1367
1348
|
keywords: [
|
|
@@ -1406,10 +1387,10 @@ var pt = R((Jr, Oi) => {
|
|
|
1406
1387
|
});
|
|
1407
1388
|
|
|
1408
1389
|
// ../node_modules/ejs/lib/ejs.js
|
|
1409
|
-
var
|
|
1390
|
+
var ht = N((h) => {
|
|
1410
1391
|
"use strict";
|
|
1411
|
-
var ne =
|
|
1412
|
-
|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",
|
|
1392
|
+
var ne = S("fs"), D = S("path"), b = st(), ct = !1, _i = lt().version, ji = "<", Oi = ">", Ei = "%", gt = "locals", Pi = "ejs", Si = "(<%%\
|
|
1393
|
+
|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)", xt = [
|
|
1413
1394
|
"delimiter",
|
|
1414
1395
|
"scope",
|
|
1415
1396
|
"context",
|
|
@@ -1421,63 +1402,63 @@ var vt = R((h) => {
|
|
|
1421
1402
|
"strict",
|
|
1422
1403
|
"filename",
|
|
1423
1404
|
"async"
|
|
1424
|
-
],
|
|
1405
|
+
], ki = xt.concat("cache"), pt = /^\uFEFF/, re = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
|
|
1425
1406
|
h.cache = b.cache;
|
|
1426
1407
|
h.fileLoader = ne.readFileSync;
|
|
1427
|
-
h.localsName =
|
|
1408
|
+
h.localsName = gt;
|
|
1428
1409
|
h.promiseImpl = new Function("return this;")().Promise;
|
|
1429
1410
|
h.resolveInclude = function(e, i, t) {
|
|
1430
|
-
var
|
|
1411
|
+
var a = D.dirname, r = D.extname, n = D.resolve, s = n(t ? i : a(i), e), c = r(e);
|
|
1431
1412
|
return c || (s += ".ejs"), s;
|
|
1432
1413
|
};
|
|
1433
|
-
function
|
|
1414
|
+
function mt(e, i) {
|
|
1434
1415
|
var t;
|
|
1435
|
-
if (i.some(function(
|
|
1436
|
-
return t = h.resolveInclude(e,
|
|
1416
|
+
if (i.some(function(a) {
|
|
1417
|
+
return t = h.resolveInclude(e, a, !0), ne.existsSync(t);
|
|
1437
1418
|
}))
|
|
1438
1419
|
return t;
|
|
1439
1420
|
}
|
|
1440
|
-
o(
|
|
1441
|
-
function
|
|
1442
|
-
var t,
|
|
1421
|
+
o(mt, "resolvePaths");
|
|
1422
|
+
function Ti(e, i) {
|
|
1423
|
+
var t, a, r = i.views, n = /^[A-Za-z]+:\\|^\//.exec(e);
|
|
1443
1424
|
if (n && n.length)
|
|
1444
|
-
e = e.replace(/^\/*/, ""), Array.isArray(i.root) ? t =
|
|
1445
|
-
else if (i.filename && (
|
|
1425
|
+
e = e.replace(/^\/*/, ""), Array.isArray(i.root) ? t = mt(e, i.root) : t = h.resolveInclude(e, i.root || "/", !0);
|
|
1426
|
+
else if (i.filename && (a = h.resolveInclude(e, i.filename), ne.existsSync(a) && (t = a)), !t && Array.isArray(r) && (t = mt(e, r)), !t &&
|
|
1446
1427
|
typeof i.includer != "function")
|
|
1447
1428
|
throw new Error('Could not find the include file "' + i.escapeFunction(e) + '"');
|
|
1448
1429
|
return t;
|
|
1449
1430
|
}
|
|
1450
|
-
o(
|
|
1451
|
-
function
|
|
1452
|
-
var t,
|
|
1431
|
+
o(Ti, "getIncludePath");
|
|
1432
|
+
function I(e, i) {
|
|
1433
|
+
var t, a = e.filename, r = arguments.length > 1;
|
|
1453
1434
|
if (e.cache) {
|
|
1454
|
-
if (!
|
|
1435
|
+
if (!a)
|
|
1455
1436
|
throw new Error("cache option requires a filename");
|
|
1456
|
-
if (t = h.cache.get(
|
|
1437
|
+
if (t = h.cache.get(a), t)
|
|
1457
1438
|
return t;
|
|
1458
|
-
|
|
1459
|
-
} else if (!
|
|
1460
|
-
if (!
|
|
1439
|
+
r || (i = ut(a).toString().replace(pt, ""));
|
|
1440
|
+
} else if (!r) {
|
|
1441
|
+
if (!a)
|
|
1461
1442
|
throw new Error("Internal EJS error: no file name or template provided");
|
|
1462
|
-
i =
|
|
1443
|
+
i = ut(a).toString().replace(pt, "");
|
|
1463
1444
|
}
|
|
1464
|
-
return t = h.compile(i, e), e.cache && h.cache.set(
|
|
1445
|
+
return t = h.compile(i, e), e.cache && h.cache.set(a, t), t;
|
|
1465
1446
|
}
|
|
1466
|
-
o(
|
|
1467
|
-
function
|
|
1468
|
-
var
|
|
1447
|
+
o(I, "handleCache");
|
|
1448
|
+
function Fi(e, i, t) {
|
|
1449
|
+
var a;
|
|
1469
1450
|
if (t) {
|
|
1470
1451
|
try {
|
|
1471
|
-
|
|
1472
|
-
} catch (
|
|
1473
|
-
return t(
|
|
1452
|
+
a = I(e)(i);
|
|
1453
|
+
} catch (r) {
|
|
1454
|
+
return t(r);
|
|
1474
1455
|
}
|
|
1475
|
-
t(null,
|
|
1456
|
+
t(null, a);
|
|
1476
1457
|
} else {
|
|
1477
1458
|
if (typeof h.promiseImpl == "function")
|
|
1478
|
-
return new h.promiseImpl(function(
|
|
1459
|
+
return new h.promiseImpl(function(r, n) {
|
|
1479
1460
|
try {
|
|
1480
|
-
|
|
1461
|
+
a = I(e)(i), r(a);
|
|
1481
1462
|
} catch (s) {
|
|
1482
1463
|
n(s);
|
|
1483
1464
|
}
|
|
@@ -1485,66 +1466,66 @@ var vt = R((h) => {
|
|
|
1485
1466
|
throw new Error("Please provide a callback function");
|
|
1486
1467
|
}
|
|
1487
1468
|
}
|
|
1488
|
-
o(
|
|
1489
|
-
function
|
|
1469
|
+
o(Fi, "tryHandleCache");
|
|
1470
|
+
function ut(e) {
|
|
1490
1471
|
return h.fileLoader(e);
|
|
1491
1472
|
}
|
|
1492
|
-
o(
|
|
1493
|
-
function
|
|
1473
|
+
o(ut, "fileLoader");
|
|
1474
|
+
function Ri(e, i) {
|
|
1494
1475
|
var t = b.shallowCopy(b.createNullProtoObjWherePossible(), i);
|
|
1495
|
-
if (t.filename =
|
|
1496
|
-
var
|
|
1497
|
-
if (
|
|
1498
|
-
return
|
|
1476
|
+
if (t.filename = Ti(e, t), typeof i.includer == "function") {
|
|
1477
|
+
var a = i.includer(e, t.filename);
|
|
1478
|
+
if (a && (a.filename && (t.filename = a.filename), a.template))
|
|
1479
|
+
return I(t, a.template);
|
|
1499
1480
|
}
|
|
1500
|
-
return
|
|
1481
|
+
return I(t);
|
|
1501
1482
|
}
|
|
1502
|
-
o(
|
|
1503
|
-
function
|
|
1483
|
+
o(Ri, "includeFile");
|
|
1484
|
+
function ft(e, i, t, a, r) {
|
|
1504
1485
|
var n = i.split(`
|
|
1505
|
-
`), s = Math.max(
|
|
1486
|
+
`), s = Math.max(a - 3, 0), c = Math.min(n.length, a + 3), p = r(t), l = n.slice(s, c).map(function(u, d) {
|
|
1506
1487
|
var x = d + s + 1;
|
|
1507
|
-
return (x ==
|
|
1488
|
+
return (x == a ? " >> " : " ") + x + "| " + u;
|
|
1508
1489
|
}).join(`
|
|
1509
1490
|
`);
|
|
1510
|
-
throw e.path = p, e.message = (p || "ejs") + ":" +
|
|
1491
|
+
throw e.path = p, e.message = (p || "ejs") + ":" + a + `
|
|
1511
1492
|
` + l + `
|
|
1512
1493
|
|
|
1513
1494
|
` + e.message, e;
|
|
1514
1495
|
}
|
|
1515
|
-
o(
|
|
1516
|
-
function
|
|
1496
|
+
o(ft, "rethrow");
|
|
1497
|
+
function dt(e) {
|
|
1517
1498
|
return e.replace(/;(\s*$)/, "$1");
|
|
1518
1499
|
}
|
|
1519
|
-
o(
|
|
1500
|
+
o(dt, "stripSemi");
|
|
1520
1501
|
h.compile = /* @__PURE__ */ o(function(i, t) {
|
|
1521
|
-
var
|
|
1522
|
-
return t && t.scope && (
|
|
1523
|
-
t.scope), delete t.scope),
|
|
1502
|
+
var a;
|
|
1503
|
+
return t && t.scope && (ct || (console.warn("`scope` option is deprecated and will be removed in EJS 3"), ct = !0), t.context || (t.context =
|
|
1504
|
+
t.scope), delete t.scope), a = new j(i, t), a.compile();
|
|
1524
1505
|
}, "compile");
|
|
1525
1506
|
h.render = function(e, i, t) {
|
|
1526
|
-
var
|
|
1527
|
-
return arguments.length == 2 && b.shallowCopyFromList(
|
|
1507
|
+
var a = i || b.createNullProtoObjWherePossible(), r = t || b.createNullProtoObjWherePossible();
|
|
1508
|
+
return arguments.length == 2 && b.shallowCopyFromList(r, a, xt), I(r, e)(a);
|
|
1528
1509
|
};
|
|
1529
1510
|
h.renderFile = function() {
|
|
1530
|
-
var e = Array.prototype.slice.call(arguments), i = e.shift(), t,
|
|
1531
|
-
return typeof arguments[arguments.length - 1] == "function" && (t = e.pop()), e.length ? (
|
|
1532
|
-
(
|
|
1533
|
-
ns"], n && b.shallowCopy(
|
|
1511
|
+
var e = Array.prototype.slice.call(arguments), i = e.shift(), t, a = { filename: i }, r, n;
|
|
1512
|
+
return typeof arguments[arguments.length - 1] == "function" && (t = e.pop()), e.length ? (r = e.shift(), e.length ? b.shallowCopy(a, e.pop()) :
|
|
1513
|
+
(r.settings && (r.settings.views && (a.views = r.settings.views), r.settings["view cache"] && (a.cache = !0), n = r.settings["view optio\
|
|
1514
|
+
ns"], n && b.shallowCopy(a, n)), b.shallowCopyFromList(a, r, ki)), a.filename = i) : r = b.createNullProtoObjWherePossible(), Fi(a, r, t);
|
|
1534
1515
|
};
|
|
1535
1516
|
h.Template = j;
|
|
1536
1517
|
h.clearCache = function() {
|
|
1537
1518
|
h.cache.reset();
|
|
1538
1519
|
};
|
|
1539
1520
|
function j(e, i) {
|
|
1540
|
-
var t = b.hasOwnOnlyObject(i),
|
|
1541
|
-
this.templateText = e, this.mode = null, this.truncate = !1, this.currentLine = 1, this.source = "",
|
|
1542
|
-
t.escape || t.escapeFunction || b.escapeXML,
|
|
1543
|
-
t.openDelimiter || h.openDelimiter ||
|
|
1544
|
-
delimiter ||
|
|
1545
|
-
root,
|
|
1546
|
-
t.views,
|
|
1547
|
-
!0,
|
|
1521
|
+
var t = b.hasOwnOnlyObject(i), a = b.createNullProtoObjWherePossible();
|
|
1522
|
+
this.templateText = e, this.mode = null, this.truncate = !1, this.currentLine = 1, this.source = "", a.client = t.client || !1, a.escapeFunction =
|
|
1523
|
+
t.escape || t.escapeFunction || b.escapeXML, a.compileDebug = t.compileDebug !== !1, a.debug = !!t.debug, a.filename = t.filename, a.openDelimiter =
|
|
1524
|
+
t.openDelimiter || h.openDelimiter || ji, a.closeDelimiter = t.closeDelimiter || h.closeDelimiter || Oi, a.delimiter = t.delimiter || h.
|
|
1525
|
+
delimiter || Ei, a.strict = t.strict || !1, a.context = t.context, a.cache = t.cache || !1, a.rmWhitespace = t.rmWhitespace, a.root = t.
|
|
1526
|
+
root, a.includer = t.includer, a.outputFunctionName = t.outputFunctionName, a.localsName = t.localsName || h.localsName || gt, a.views =
|
|
1527
|
+
t.views, a.async = t.async, a.destructuredLocals = t.destructuredLocals, a.legacyInclude = typeof t.legacyInclude < "u" ? !!t.legacyInclude :
|
|
1528
|
+
!0, a.strict ? a._with = !1 : a._with = typeof t._with < "u" ? t._with : !0, this.opts = a, this.regex = this.createRegex();
|
|
1548
1529
|
}
|
|
1549
1530
|
o(j, "Template");
|
|
1550
1531
|
j.modes = {
|
|
@@ -1556,39 +1537,39 @@ ns"], n && b.shallowCopy(r, n)), b.shallowCopyFromList(r, a, Fi)), r.filename =
|
|
|
1556
1537
|
};
|
|
1557
1538
|
j.prototype = {
|
|
1558
1539
|
createRegex: /* @__PURE__ */ o(function() {
|
|
1559
|
-
var e =
|
|
1540
|
+
var e = Si, i = b.escapeRegExpChars(this.opts.delimiter), t = b.escapeRegExpChars(this.opts.openDelimiter), a = b.escapeRegExpChars(this.
|
|
1560
1541
|
opts.closeDelimiter);
|
|
1561
|
-
return e = e.replace(/%/g, i).replace(/</g, t).replace(/>/g,
|
|
1542
|
+
return e = e.replace(/%/g, i).replace(/</g, t).replace(/>/g, a), new RegExp(e);
|
|
1562
1543
|
}, "createRegex"),
|
|
1563
1544
|
compile: /* @__PURE__ */ o(function() {
|
|
1564
|
-
var e, i, t = this.opts,
|
|
1545
|
+
var e, i, t = this.opts, a = "", r = "", n = t.escapeFunction, s, c = t.filename ? JSON.stringify(t.filename) : "undefined";
|
|
1565
1546
|
if (!this.source) {
|
|
1566
|
-
if (this.generateSource(),
|
|
1547
|
+
if (this.generateSource(), a += ` var __output = "";
|
|
1567
1548
|
function __append(s) { if (s !== undefined && s !== null) __output += s }
|
|
1568
1549
|
`, t.outputFunctionName) {
|
|
1569
|
-
if (!
|
|
1550
|
+
if (!re.test(t.outputFunctionName))
|
|
1570
1551
|
throw new Error("outputFunctionName is not a valid JS identifier.");
|
|
1571
|
-
|
|
1552
|
+
a += " var " + t.outputFunctionName + ` = __append;
|
|
1572
1553
|
`;
|
|
1573
1554
|
}
|
|
1574
|
-
if (t.localsName && !
|
|
1555
|
+
if (t.localsName && !re.test(t.localsName))
|
|
1575
1556
|
throw new Error("localsName is not a valid JS identifier.");
|
|
1576
1557
|
if (t.destructuredLocals && t.destructuredLocals.length) {
|
|
1577
1558
|
for (var p = " var __locals = (" + t.localsName + ` || {}),
|
|
1578
1559
|
`, l = 0; l < t.destructuredLocals.length; l++) {
|
|
1579
1560
|
var u = t.destructuredLocals[l];
|
|
1580
|
-
if (!
|
|
1561
|
+
if (!re.test(u))
|
|
1581
1562
|
throw new Error("destructuredLocals[" + l + "] is not a valid JS identifier.");
|
|
1582
1563
|
l > 0 && (p += `,
|
|
1583
1564
|
`), p += u + " = __locals." + u;
|
|
1584
1565
|
}
|
|
1585
|
-
|
|
1566
|
+
a += p + `;
|
|
1586
1567
|
`;
|
|
1587
1568
|
}
|
|
1588
|
-
t._with !== !1 && (
|
|
1589
|
-
`,
|
|
1590
|
-
`),
|
|
1591
|
-
`, this.source =
|
|
1569
|
+
t._with !== !1 && (a += " with (" + t.localsName + ` || {}) {
|
|
1570
|
+
`, r += ` }
|
|
1571
|
+
`), r += ` return __output;
|
|
1572
|
+
`, this.source = a + this.source + r;
|
|
1592
1573
|
}
|
|
1593
1574
|
t.compileDebug ? e = `var __line = 1
|
|
1594
1575
|
, __lines = ` + JSON.stringify(this.templateText) + `
|
|
@@ -1598,7 +1579,7 @@ try {
|
|
|
1598
1579
|
rethrow(e, __lines, __filename, __line, escapeFn);
|
|
1599
1580
|
}
|
|
1600
1581
|
` : e = this.source, t.client && (e = "escapeFn = escapeFn || " + n.toString() + `;
|
|
1601
|
-
` + e, t.compileDebug && (e = "rethrow = rethrow || " +
|
|
1582
|
+
` + e, t.compileDebug && (e = "rethrow = rethrow || " + ft.toString() + `;
|
|
1602
1583
|
` + e)), t.strict && (e = `"use strict";
|
|
1603
1584
|
` + e), t.debug && console.log(e), t.compileDebug && t.filename && (e = e + `
|
|
1604
1585
|
//# sourceURL=` + c + `
|
|
@@ -1622,16 +1603,16 @@ try {
|
|
|
1622
1603
|
}
|
|
1623
1604
|
var d = t.client ? i : /* @__PURE__ */ o(function(f) {
|
|
1624
1605
|
var y = /* @__PURE__ */ o(function(v, _) {
|
|
1625
|
-
var
|
|
1626
|
-
return _ && (
|
|
1606
|
+
var O = b.shallowCopy(b.createNullProtoObjWherePossible(), f);
|
|
1607
|
+
return _ && (O = b.shallowCopy(O, _)), Ri(v, t)(O);
|
|
1627
1608
|
}, "include");
|
|
1628
1609
|
return i.apply(
|
|
1629
1610
|
t.context,
|
|
1630
|
-
[f || b.createNullProtoObjWherePossible(), n, y,
|
|
1611
|
+
[f || b.createNullProtoObjWherePossible(), n, y, ft]
|
|
1631
1612
|
);
|
|
1632
1613
|
}, "anonymous");
|
|
1633
1614
|
if (t.filename && typeof Object.defineProperty == "function") {
|
|
1634
|
-
var x = t.filename, g =
|
|
1615
|
+
var x = t.filename, g = D.basename(x, D.extname(x));
|
|
1635
1616
|
try {
|
|
1636
1617
|
Object.defineProperty(d, "name", {
|
|
1637
1618
|
value: g,
|
|
@@ -1648,18 +1629,18 @@ try {
|
|
|
1648
1629
|
var e = this.opts;
|
|
1649
1630
|
e.rmWhitespace && (this.templateText = this.templateText.replace(/[\r\n]+/g, `
|
|
1650
1631
|
`).replace(/^\s+|\s+$/gm, "")), this.templateText = this.templateText.replace(/[ \t]*<%_/gm, "<%_").replace(/_%>[ \t]*/gm, "_%>");
|
|
1651
|
-
var i = this, t = this.parseTemplateText(),
|
|
1632
|
+
var i = this, t = this.parseTemplateText(), a = this.opts.delimiter, r = this.opts.openDelimiter, n = this.opts.closeDelimiter;
|
|
1652
1633
|
t && t.length && t.forEach(function(s, c) {
|
|
1653
1634
|
var p;
|
|
1654
|
-
if (s.indexOf(
|
|
1635
|
+
if (s.indexOf(r + a) === 0 && s.indexOf(r + a + a) !== 0 && (p = t[c + 2], !(p == a + n || p == "-" + a + n || p == "_" + a + n)))
|
|
1655
1636
|
throw new Error('Could not find matching close tag for "' + s + '".');
|
|
1656
1637
|
i.scanLine(s);
|
|
1657
1638
|
});
|
|
1658
1639
|
}, "generateSource"),
|
|
1659
1640
|
parseTemplateText: /* @__PURE__ */ o(function() {
|
|
1660
|
-
for (var e = this.templateText, i = this.regex, t = i.exec(e),
|
|
1661
|
-
|
|
1662
|
-
return e &&
|
|
1641
|
+
for (var e = this.templateText, i = this.regex, t = i.exec(e), a = [], r; t; )
|
|
1642
|
+
r = t.index, r !== 0 && (a.push(e.substring(0, r)), e = e.slice(r)), a.push(t[0]), e = e.slice(t[0].length), t = i.exec(e);
|
|
1643
|
+
return e && a.push(e), a;
|
|
1663
1644
|
}, "parseTemplateText"),
|
|
1664
1645
|
_addOutput: /* @__PURE__ */ o(function(e) {
|
|
1665
1646
|
if (this.truncate && (e = e.replace(/^(?:\r\n|\r|\n)/, ""), this.truncate = !1), !e)
|
|
@@ -1669,33 +1650,33 @@ try {
|
|
|
1669
1650
|
`;
|
|
1670
1651
|
}, "_addOutput"),
|
|
1671
1652
|
scanLine: /* @__PURE__ */ o(function(e) {
|
|
1672
|
-
var i = this, t = this.opts.delimiter,
|
|
1653
|
+
var i = this, t = this.opts.delimiter, a = this.opts.openDelimiter, r = this.opts.closeDelimiter, n = 0;
|
|
1673
1654
|
switch (n = e.split(`
|
|
1674
1655
|
`).length - 1, e) {
|
|
1675
|
-
case
|
|
1676
|
-
case
|
|
1656
|
+
case a + t:
|
|
1657
|
+
case a + t + "_":
|
|
1677
1658
|
this.mode = j.modes.EVAL;
|
|
1678
1659
|
break;
|
|
1679
|
-
case
|
|
1660
|
+
case a + t + "=":
|
|
1680
1661
|
this.mode = j.modes.ESCAPED;
|
|
1681
1662
|
break;
|
|
1682
|
-
case
|
|
1663
|
+
case a + t + "-":
|
|
1683
1664
|
this.mode = j.modes.RAW;
|
|
1684
1665
|
break;
|
|
1685
|
-
case
|
|
1666
|
+
case a + t + "#":
|
|
1686
1667
|
this.mode = j.modes.COMMENT;
|
|
1687
1668
|
break;
|
|
1688
|
-
case
|
|
1689
|
-
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(
|
|
1669
|
+
case a + t + t:
|
|
1670
|
+
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(a + t + t, a + t) + `")
|
|
1690
1671
|
`;
|
|
1691
1672
|
break;
|
|
1692
|
-
case t + t +
|
|
1693
|
-
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(t + t +
|
|
1673
|
+
case t + t + r:
|
|
1674
|
+
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(t + t + r, t + r) + `")
|
|
1694
1675
|
`;
|
|
1695
1676
|
break;
|
|
1696
|
-
case t +
|
|
1697
|
-
case "-" + t +
|
|
1698
|
-
case "_" + t +
|
|
1677
|
+
case t + r:
|
|
1678
|
+
case "-" + t + r:
|
|
1679
|
+
case "_" + t + r:
|
|
1699
1680
|
this.mode == j.modes.LITERAL && this._addOutput(e), this.mode = null, this.truncate = e.indexOf("-") === 0 || e.indexOf("_") === 0;
|
|
1700
1681
|
break;
|
|
1701
1682
|
default:
|
|
@@ -1716,12 +1697,12 @@ try {
|
|
|
1716
1697
|
break;
|
|
1717
1698
|
// Exec, esc, and output
|
|
1718
1699
|
case j.modes.ESCAPED:
|
|
1719
|
-
this.source += " ; __append(escapeFn(" +
|
|
1700
|
+
this.source += " ; __append(escapeFn(" + dt(e) + `))
|
|
1720
1701
|
`;
|
|
1721
1702
|
break;
|
|
1722
1703
|
// Exec and output
|
|
1723
1704
|
case j.modes.RAW:
|
|
1724
|
-
this.source += " ; __append(" +
|
|
1705
|
+
this.source += " ; __append(" + dt(e) + `)
|
|
1725
1706
|
`;
|
|
1726
1707
|
break;
|
|
1727
1708
|
case j.modes.COMMENT:
|
|
@@ -1740,16 +1721,16 @@ try {
|
|
|
1740
1721
|
};
|
|
1741
1722
|
h.escapeXML = b.escapeXML;
|
|
1742
1723
|
h.__express = h.renderFile;
|
|
1743
|
-
h.VERSION =
|
|
1744
|
-
h.name =
|
|
1724
|
+
h.VERSION = _i;
|
|
1725
|
+
h.name = Pi;
|
|
1745
1726
|
typeof window < "u" && (window.ejs = h);
|
|
1746
1727
|
});
|
|
1747
1728
|
|
|
1748
1729
|
// src/builder-manager/index.ts
|
|
1749
|
-
import { cp as
|
|
1750
|
-
import { dirname as Ft, join as
|
|
1751
|
-
import { stringifyProcessEnvs as
|
|
1752
|
-
import { globalsModuleInfoMap as
|
|
1730
|
+
import { cp as aa, rm as ra, writeFile as Tt } from "node:fs/promises";
|
|
1731
|
+
import { dirname as Ft, join as F, parse as na } from "node:path";
|
|
1732
|
+
import { stringifyProcessEnvs as oa } from "storybook/internal/common";
|
|
1733
|
+
import { globalsModuleInfoMap as sa } from "storybook/internal/manager/globals-module-info";
|
|
1753
1734
|
import { logger as me } from "storybook/internal/node-logger";
|
|
1754
1735
|
|
|
1755
1736
|
// ../node_modules/@fal-works/esbuild-plugin-global-externals/lib/module-info.js
|
|
@@ -1757,29 +1738,29 @@ var de = /* @__PURE__ */ o((e) => {
|
|
|
1757
1738
|
let {
|
|
1758
1739
|
type: i = "esm",
|
|
1759
1740
|
varName: t,
|
|
1760
|
-
namedExports:
|
|
1761
|
-
defaultExport:
|
|
1741
|
+
namedExports: a = null,
|
|
1742
|
+
defaultExport: r = !0
|
|
1762
1743
|
} = typeof e == "string" ? { varName: e } : e;
|
|
1763
|
-
return { type: i, varName: t, namedExports:
|
|
1744
|
+
return { type: i, varName: t, namedExports: a, defaultExport: r };
|
|
1764
1745
|
}, "normalizeModuleInfo");
|
|
1765
1746
|
|
|
1766
1747
|
// ../node_modules/@fal-works/esbuild-plugin-global-externals/lib/on-load.js
|
|
1767
|
-
var
|
|
1768
|
-
var
|
|
1769
|
-
let
|
|
1748
|
+
var It = /* @__PURE__ */ o((e) => `module.exports = ${e};`, "createCjsContents");
|
|
1749
|
+
var Mt = /* @__PURE__ */ o((e, i, t) => {
|
|
1750
|
+
let a = t ? [`export default ${e};`] : [];
|
|
1770
1751
|
if (i && i.length) {
|
|
1771
|
-
let
|
|
1772
|
-
|
|
1752
|
+
let r = [...new Set(i)].join(", ");
|
|
1753
|
+
a.push(`const { ${r} } = ${e};`), a.push(`export { ${r} };`);
|
|
1773
1754
|
}
|
|
1774
|
-
return
|
|
1755
|
+
return a.join(`
|
|
1775
1756
|
`);
|
|
1776
1757
|
}, "createEsmContents"), ge = /* @__PURE__ */ o((e) => {
|
|
1777
|
-
let { type: i, varName: t, namedExports:
|
|
1758
|
+
let { type: i, varName: t, namedExports: a, defaultExport: r } = e;
|
|
1778
1759
|
switch (i) {
|
|
1779
1760
|
case "esm":
|
|
1780
|
-
return
|
|
1761
|
+
return Mt(t, a, r);
|
|
1781
1762
|
case "cjs":
|
|
1782
|
-
return
|
|
1763
|
+
return It(t);
|
|
1783
1764
|
}
|
|
1784
1765
|
}, "createContents");
|
|
1785
1766
|
|
|
@@ -1788,12 +1769,12 @@ var X = "global-externals", K = /* @__PURE__ */ o((e) => {
|
|
|
1788
1769
|
let { modulePathFilter: i, getModuleInfo: t } = e;
|
|
1789
1770
|
return {
|
|
1790
1771
|
name: X,
|
|
1791
|
-
setup(
|
|
1792
|
-
|
|
1793
|
-
path:
|
|
1772
|
+
setup(a) {
|
|
1773
|
+
a.onResolve({ filter: i }, (r) => ({
|
|
1774
|
+
path: r.path,
|
|
1794
1775
|
namespace: X
|
|
1795
|
-
})),
|
|
1796
|
-
let n =
|
|
1776
|
+
})), a.onLoad({ filter: /.*/, namespace: X }, (r) => {
|
|
1777
|
+
let n = r.path, s = de(t(n));
|
|
1797
1778
|
return { contents: ge(s) };
|
|
1798
1779
|
});
|
|
1799
1780
|
}
|
|
@@ -1810,29 +1791,29 @@ var Z = /* @__PURE__ */ o((e) => {
|
|
|
1810
1791
|
}, "globalExternals");
|
|
1811
1792
|
|
|
1812
1793
|
// src/builder-manager/index.ts
|
|
1813
|
-
var
|
|
1794
|
+
var Rt = V(Ue(), 1), ue = V(nt(), 1);
|
|
1814
1795
|
|
|
1815
1796
|
// src/builder-manager/utils/data.ts
|
|
1816
|
-
import { basename as
|
|
1817
|
-
import { getRefs as
|
|
1797
|
+
import { basename as Ni } from "node:path";
|
|
1798
|
+
import { getRefs as Di } from "storybook/internal/common";
|
|
1818
1799
|
|
|
1819
1800
|
// src/builder-manager/utils/template.ts
|
|
1820
|
-
var
|
|
1821
|
-
import { readFile as
|
|
1822
|
-
import { dirname as
|
|
1823
|
-
var oe = /* @__PURE__ */ o(async (e) =>
|
|
1801
|
+
var yt = V(ht(), 1);
|
|
1802
|
+
import { readFile as Li } from "node:fs/promises";
|
|
1803
|
+
import { dirname as Ci, join as Ai } from "node:path";
|
|
1804
|
+
var oe = /* @__PURE__ */ o(async (e) => Ai(Ci(S.resolve("storybook/package.json")), "assets/server", e), "getTemplatePath"), vt = /* @__PURE__ */ o(
|
|
1824
1805
|
async (e) => {
|
|
1825
1806
|
let i = await oe(e);
|
|
1826
|
-
return
|
|
1807
|
+
return Li(i, { encoding: "utf8" });
|
|
1827
1808
|
}, "readTemplate");
|
|
1828
|
-
var se = /* @__PURE__ */ o(async (e, i, t,
|
|
1809
|
+
var se = /* @__PURE__ */ o(async (e, i, t, a, r, n, s, c, p, l, u, { versionCheck: d, previewUrl: x, configType: g, ignorePreview: m }, f) => {
|
|
1829
1810
|
let y = await i, v = await e, _ = Object.entries(f).reduce(
|
|
1830
|
-
(
|
|
1811
|
+
(O, [w, E]) => ({ ...O, [w]: JSON.stringify(E) }),
|
|
1831
1812
|
{}
|
|
1832
1813
|
);
|
|
1833
|
-
return (0,
|
|
1814
|
+
return (0, yt.render)(v, {
|
|
1834
1815
|
title: y ? `${y} - Storybook` : "Storybook",
|
|
1835
|
-
files: { js: n, css:
|
|
1816
|
+
files: { js: n, css: r },
|
|
1836
1817
|
favicon: await t,
|
|
1837
1818
|
globals: {
|
|
1838
1819
|
FEATURES: JSON.stringify(await s, null, 2),
|
|
@@ -1847,137 +1828,137 @@ var se = /* @__PURE__ */ o(async (e, i, t, r, a, n, s, c, p, l, u, { versionChec
|
|
|
1847
1828
|
TAGS_OPTIONS: JSON.stringify(await u, null, 2),
|
|
1848
1829
|
..._
|
|
1849
1830
|
},
|
|
1850
|
-
head: await
|
|
1831
|
+
head: await a || "",
|
|
1851
1832
|
ignorePreview: m
|
|
1852
1833
|
});
|
|
1853
1834
|
}, "renderHTML");
|
|
1854
1835
|
|
|
1855
1836
|
// src/builder-manager/utils/data.ts
|
|
1856
1837
|
var le = /* @__PURE__ */ o(async (e) => {
|
|
1857
|
-
let i =
|
|
1858
|
-
presets.apply("title"), s = e.presets.apply("docs", {}), c = e.presets.apply("tags", {}), p =
|
|
1838
|
+
let i = Di(e), t = e.presets.apply("favicon").then((x) => Ni(x)), a = e.presets.apply("features"), r = e.presets.apply("logLevel"), n = e.
|
|
1839
|
+
presets.apply("title"), s = e.presets.apply("docs", {}), c = e.presets.apply("tags", {}), p = vt("template.ejs"), l = e.presets.apply("man\
|
|
1859
1840
|
agerHead"), [u, d] = await Promise.all([
|
|
1860
1841
|
//
|
|
1861
|
-
|
|
1862
|
-
|
|
1842
|
+
bt.get(),
|
|
1843
|
+
wt(e)
|
|
1863
1844
|
]);
|
|
1864
1845
|
return {
|
|
1865
1846
|
refs: i,
|
|
1866
|
-
features:
|
|
1847
|
+
features: a,
|
|
1867
1848
|
title: n,
|
|
1868
1849
|
docsOptions: s,
|
|
1869
1850
|
template: p,
|
|
1870
1851
|
customHead: l,
|
|
1871
1852
|
instance: u,
|
|
1872
1853
|
config: d,
|
|
1873
|
-
logLevel:
|
|
1854
|
+
logLevel: r,
|
|
1874
1855
|
favicon: t,
|
|
1875
1856
|
tagsOptions: c
|
|
1876
1857
|
};
|
|
1877
1858
|
}, "getData");
|
|
1878
1859
|
|
|
1879
1860
|
// src/builder-manager/utils/files.ts
|
|
1880
|
-
import { existsSync as
|
|
1881
|
-
import { mkdir as
|
|
1882
|
-
import { dirname as
|
|
1861
|
+
import { existsSync as Ii } from "node:fs";
|
|
1862
|
+
import { mkdir as Mi, writeFile as zi } from "node:fs/promises";
|
|
1863
|
+
import { dirname as qi, join as $i, normalize as Wi } from "node:path";
|
|
1883
1864
|
|
|
1884
1865
|
// ../node_modules/slash/index.js
|
|
1885
|
-
function
|
|
1866
|
+
function M(e) {
|
|
1886
1867
|
return e.startsWith("\\\\?\\") ? e : e.replace(/\\/g, "/");
|
|
1887
1868
|
}
|
|
1888
|
-
o(
|
|
1869
|
+
o(M, "slash");
|
|
1889
1870
|
|
|
1890
1871
|
// src/builder-manager/utils/files.ts
|
|
1891
1872
|
async function ce(e, i) {
|
|
1892
1873
|
let t = await Promise.all(
|
|
1893
1874
|
i?.map(async (n) => {
|
|
1894
|
-
let { location: s, url: c } =
|
|
1895
|
-
if (!
|
|
1896
|
-
let p =
|
|
1897
|
-
await
|
|
1875
|
+
let { location: s, url: c } = Hi(n, e);
|
|
1876
|
+
if (!Ii(s)) {
|
|
1877
|
+
let p = qi(s);
|
|
1878
|
+
await Mi(p, { recursive: !0 });
|
|
1898
1879
|
}
|
|
1899
|
-
return await
|
|
1880
|
+
return await zi(s, n.contents), c;
|
|
1900
1881
|
}) || []
|
|
1901
|
-
),
|
|
1902
|
-
return { cssFiles: t.filter((n) => n.endsWith(".css")), jsFiles:
|
|
1882
|
+
), a = t.filter((n) => n.endsWith(".js"));
|
|
1883
|
+
return { cssFiles: t.filter((n) => n.endsWith(".css")), jsFiles: a };
|
|
1903
1884
|
}
|
|
1904
1885
|
o(ce, "readOrderedFiles");
|
|
1905
|
-
function
|
|
1906
|
-
let t = e.path.replace(i, ""),
|
|
1907
|
-
return { location:
|
|
1886
|
+
function Hi(e, i) {
|
|
1887
|
+
let t = e.path.replace(i, ""), a = Wi($i(i, t)), r = `./sb-addons${M(t).split("/").map(encodeURIComponent).join("/")}`;
|
|
1888
|
+
return { location: a, url: r };
|
|
1908
1889
|
}
|
|
1909
|
-
o(
|
|
1890
|
+
o(Hi, "sanitizePath");
|
|
1910
1891
|
|
|
1911
1892
|
// src/builder-manager/utils/framework.ts
|
|
1912
|
-
import { sep as
|
|
1893
|
+
import { sep as Bi } from "node:path";
|
|
1913
1894
|
import {
|
|
1914
|
-
extractProperRendererNameFromFramework as
|
|
1915
|
-
getFrameworkName as
|
|
1895
|
+
extractProperRendererNameFromFramework as _t,
|
|
1896
|
+
getFrameworkName as Ji
|
|
1916
1897
|
} from "storybook/internal/common";
|
|
1917
|
-
var
|
|
1898
|
+
var jt = /* @__PURE__ */ o((e) => {
|
|
1918
1899
|
if (e)
|
|
1919
1900
|
return typeof e == "string" ? e : e.name;
|
|
1920
|
-
}, "pluckNameFromConfigProperty"),
|
|
1921
|
-
match(/(@storybook\/.*)$/)?.[1], "pluckStorybookPackageFromPath"),
|
|
1901
|
+
}, "pluckNameFromConfigProperty"), Ot = /* @__PURE__ */ o((e) => e.replaceAll(Bi, "/"), "normalizePath"), Ui = /* @__PURE__ */ o((e) => Ot(e).
|
|
1902
|
+
match(/(@storybook\/.*)$/)?.[1], "pluckStorybookPackageFromPath"), Gi = /* @__PURE__ */ o((e) => Ot(e).split("node_modules/")[1] ?? e, "pluc\
|
|
1922
1903
|
kThirdPartyPackageFromPath"), pe = /* @__PURE__ */ o(async (e) => {
|
|
1923
|
-
let i = {}, { builder: t } = await e.presets.apply("core"),
|
|
1924
|
-
await
|
|
1925
|
-
let n =
|
|
1926
|
-
n && (i.STORYBOOK_BUILDER =
|
|
1927
|
-
let s =
|
|
1904
|
+
let i = {}, { builder: t } = await e.presets.apply("core"), a = await Ji(e);
|
|
1905
|
+
await _t(a) && (i.STORYBOOK_RENDERER = await _t(a) ?? void 0);
|
|
1906
|
+
let n = jt(t);
|
|
1907
|
+
n && (i.STORYBOOK_BUILDER = Ui(n) ?? Gi(n));
|
|
1908
|
+
let s = jt(await e.presets.apply("framework"));
|
|
1928
1909
|
return s && (i.STORYBOOK_FRAMEWORK = s), i;
|
|
1929
1910
|
}, "buildFrameworkGlobalsFromOptions");
|
|
1930
1911
|
|
|
1931
1912
|
// src/builder-manager/utils/managerEntries.ts
|
|
1932
|
-
import { existsSync as
|
|
1933
|
-
import { mkdir as
|
|
1934
|
-
import { dirname as
|
|
1935
|
-
import { resolvePathInStorybookCache as
|
|
1936
|
-
var
|
|
1937
|
-
""), "sanitizeBase"),
|
|
1913
|
+
import { existsSync as Vi } from "node:fs";
|
|
1914
|
+
import { mkdir as Xi, writeFile as Ki } from "node:fs/promises";
|
|
1915
|
+
import { dirname as Zi, join as Et, parse as Yi, relative as Qi, sep as ea } from "node:path";
|
|
1916
|
+
import { resolvePathInStorybookCache as ta } from "storybook/internal/common";
|
|
1917
|
+
var Pt = /* @__PURE__ */ o((e) => e.replaceAll(".", "").replaceAll("@", "").replaceAll(ea, "-").replaceAll("/", "-").replaceAll(new RegExp(/^(-)+/g),
|
|
1918
|
+
""), "sanitizeBase"), ia = /* @__PURE__ */ o((e) => {
|
|
1938
1919
|
let i = e.split(/-?node_modules-?/);
|
|
1939
1920
|
return i[i.length - 1].replaceAll("storybook-addon-", "").replaceAll("dist-", "");
|
|
1940
1921
|
}, "sanitizeFinal");
|
|
1941
|
-
async function
|
|
1922
|
+
async function St(e, i) {
|
|
1942
1923
|
return Promise.all(
|
|
1943
|
-
e.map(async (t,
|
|
1944
|
-
let { name:
|
|
1924
|
+
e.map(async (t, a) => {
|
|
1925
|
+
let { name: r, dir: n } = Yi(t), s = ta("sb-manager", i);
|
|
1945
1926
|
if (!s)
|
|
1946
1927
|
throw new Error("Could not create/find cache directory");
|
|
1947
|
-
let c =
|
|
1928
|
+
let c = Qi(process.cwd(), n), p = Et(
|
|
1948
1929
|
s,
|
|
1949
|
-
|
|
1930
|
+
ia(Et(`${Pt(c)}-${a}`, `${Pt(r)}-bundle.js`))
|
|
1950
1931
|
);
|
|
1951
|
-
if (!
|
|
1952
|
-
let l =
|
|
1953
|
-
await
|
|
1932
|
+
if (!Vi(p)) {
|
|
1933
|
+
let l = Zi(p);
|
|
1934
|
+
await Xi(l, { recursive: !0 });
|
|
1954
1935
|
}
|
|
1955
|
-
return await
|
|
1936
|
+
return await Ki(p, `import '${M(t).replaceAll(/'/g, "\\'")}';`), p;
|
|
1956
1937
|
})
|
|
1957
1938
|
);
|
|
1958
1939
|
}
|
|
1959
|
-
o(
|
|
1940
|
+
o(St, "wrapManagerEntries");
|
|
1960
1941
|
|
|
1961
1942
|
// src/builder-manager/utils/safeResolve.ts
|
|
1962
|
-
var
|
|
1943
|
+
var kt = /* @__PURE__ */ o((e) => {
|
|
1963
1944
|
try {
|
|
1964
|
-
return Promise.resolve(
|
|
1945
|
+
return Promise.resolve(S.resolve(e));
|
|
1965
1946
|
} catch {
|
|
1966
1947
|
return Promise.resolve(!1);
|
|
1967
1948
|
}
|
|
1968
1949
|
}, "safeResolve");
|
|
1969
1950
|
|
|
1970
1951
|
// src/builder-manager/index.ts
|
|
1971
|
-
var
|
|
1972
|
-
let [i, t,
|
|
1952
|
+
var la = /^\/($|\?)/, L, C, wt = /* @__PURE__ */ o(async (e) => {
|
|
1953
|
+
let [i, t, a, r] = await Promise.all([
|
|
1973
1954
|
e.presets.apply("managerEntries", []),
|
|
1974
|
-
|
|
1955
|
+
kt(F(e.configDir, "manager")),
|
|
1975
1956
|
oe("addon.tsconfig.json"),
|
|
1976
1957
|
e.presets.apply("env")
|
|
1977
1958
|
]), n = t ? [...i, t] : i;
|
|
1978
1959
|
return {
|
|
1979
|
-
entryPoints: await
|
|
1980
|
-
outdir:
|
|
1960
|
+
entryPoints: await St(n, e.cacheKey),
|
|
1961
|
+
outdir: F(e.outputDir || "./", "sb-addons"),
|
|
1981
1962
|
format: "iife",
|
|
1982
1963
|
write: !1,
|
|
1983
1964
|
ignoreAnnotations: !0,
|
|
@@ -2004,24 +1985,21 @@ var ur = /^\/($|\?)/, G, C, _t = /* @__PURE__ */ o(async (e) => {
|
|
|
2004
1985
|
target: ["chrome100", "safari15", "firefox91"],
|
|
2005
1986
|
platform: "browser",
|
|
2006
1987
|
bundle: !0,
|
|
2007
|
-
minify: !
|
|
1988
|
+
minify: !1,
|
|
1989
|
+
minifyWhitespace: !1,
|
|
1990
|
+
minifyIdentifiers: !1,
|
|
1991
|
+
minifySyntax: !1,
|
|
1992
|
+
metafile: !0,
|
|
1993
|
+
// treeShaking: true,
|
|
2008
1994
|
sourcemap: !1,
|
|
2009
1995
|
conditions: ["browser", "module", "default"],
|
|
2010
1996
|
jsxFactory: "React.createElement",
|
|
2011
1997
|
jsxFragment: "React.Fragment",
|
|
2012
1998
|
jsx: "transform",
|
|
2013
1999
|
jsxImportSource: "react",
|
|
2014
|
-
tsconfig:
|
|
2000
|
+
tsconfig: a,
|
|
2015
2001
|
legalComments: "external",
|
|
2016
|
-
plugins: [
|
|
2017
|
-
(0, Ct.default)({
|
|
2018
|
-
process: O.resolve("process/browser.js"),
|
|
2019
|
-
util: O.resolve("util/util.js"),
|
|
2020
|
-
assert: O.resolve("browser-assert")
|
|
2021
|
-
}),
|
|
2022
|
-
Z(mr),
|
|
2023
|
-
(0, Lt.pnpPlugin)()
|
|
2024
|
-
],
|
|
2002
|
+
plugins: [Z(sa), (0, Rt.pnpPlugin)()],
|
|
2025
2003
|
banner: {
|
|
2026
2004
|
js: "try{"
|
|
2027
2005
|
},
|
|
@@ -2029,25 +2007,25 @@ var ur = /^\/($|\?)/, G, C, _t = /* @__PURE__ */ o(async (e) => {
|
|
|
2029
2007
|
js: '}catch(e){ console.error("[Storybook] One of your manager-entries failed: " + import.meta.url, e); }'
|
|
2030
2008
|
},
|
|
2031
2009
|
define: {
|
|
2032
|
-
"process.env": JSON.stringify(
|
|
2033
|
-
...
|
|
2010
|
+
"process.env": JSON.stringify(r),
|
|
2011
|
+
...oa(r),
|
|
2034
2012
|
global: "window",
|
|
2035
2013
|
module: "{}"
|
|
2036
2014
|
}
|
|
2037
2015
|
};
|
|
2038
|
-
}, "getConfig"),
|
|
2016
|
+
}, "getConfig"), bt = {
|
|
2039
2017
|
get: /* @__PURE__ */ o(async () => {
|
|
2040
2018
|
let { build: e } = await import("esbuild");
|
|
2041
2019
|
return e;
|
|
2042
2020
|
}, "get")
|
|
2043
|
-
},
|
|
2021
|
+
}, ca = /* @__PURE__ */ o(async function* ({
|
|
2044
2022
|
startTime: i,
|
|
2045
2023
|
options: t,
|
|
2046
|
-
router:
|
|
2024
|
+
router: a
|
|
2047
2025
|
}) {
|
|
2048
2026
|
t.quiet || me.info("=> Starting manager..");
|
|
2049
2027
|
let {
|
|
2050
|
-
config:
|
|
2028
|
+
config: r,
|
|
2051
2029
|
favicon: n,
|
|
2052
2030
|
customHead: s,
|
|
2053
2031
|
features: c,
|
|
@@ -2060,19 +2038,19 @@ var ur = /^\/($|\?)/, G, C, _t = /* @__PURE__ */ o(async (e) => {
|
|
|
2060
2038
|
tagsOptions: m
|
|
2061
2039
|
} = await le(t);
|
|
2062
2040
|
yield;
|
|
2063
|
-
let f =
|
|
2064
|
-
await
|
|
2065
|
-
...
|
|
2041
|
+
let f = r.outdir;
|
|
2042
|
+
await ra(f, { recursive: !0, force: !0 }), yield, L = await p({
|
|
2043
|
+
...r
|
|
2066
2044
|
}), yield;
|
|
2067
|
-
let y =
|
|
2068
|
-
|
|
2045
|
+
let y = F(Ft(S.resolve("storybook/package.json")), "dist", "manager");
|
|
2046
|
+
a.use(
|
|
2069
2047
|
"/sb-addons",
|
|
2070
2048
|
(0, ue.default)(f, {
|
|
2071
2049
|
maxAge: 3e5,
|
|
2072
2050
|
dev: !0,
|
|
2073
2051
|
immutable: !0
|
|
2074
2052
|
})
|
|
2075
|
-
),
|
|
2053
|
+
), a.use(
|
|
2076
2054
|
"/sb-manager",
|
|
2077
2055
|
(0, ue.default)(y, {
|
|
2078
2056
|
maxAge: 3e5,
|
|
@@ -2080,7 +2058,12 @@ var ur = /^\/($|\?)/, G, C, _t = /* @__PURE__ */ o(async (e) => {
|
|
|
2080
2058
|
immutable: !0
|
|
2081
2059
|
})
|
|
2082
2060
|
);
|
|
2083
|
-
let { cssFiles: v, jsFiles: _ } = await ce(f,
|
|
2061
|
+
let { cssFiles: v, jsFiles: _ } = await ce(f, L?.outputFiles);
|
|
2062
|
+
L.metafile && t.outputDir && await Tt(
|
|
2063
|
+
F(t.outputDir, "metafile.json"),
|
|
2064
|
+
JSON.stringify(L.metafile, null, 2)
|
|
2065
|
+
);
|
|
2066
|
+
let O = await pe(t);
|
|
2084
2067
|
yield;
|
|
2085
2068
|
let w = await se(
|
|
2086
2069
|
u,
|
|
@@ -2095,26 +2078,26 @@ var ur = /^\/($|\?)/, G, C, _t = /* @__PURE__ */ o(async (e) => {
|
|
|
2095
2078
|
g,
|
|
2096
2079
|
m,
|
|
2097
2080
|
t,
|
|
2098
|
-
|
|
2081
|
+
O
|
|
2099
2082
|
);
|
|
2100
|
-
return yield,
|
|
2101
|
-
|
|
2102
|
-
}),
|
|
2103
|
-
|
|
2083
|
+
return yield, a.use("/", ({ url: E }, P, T) => {
|
|
2084
|
+
E && la.test(E) ? (P.statusCode = 200, P.setHeader("Content-Type", "text/html"), P.write(w), P.end()) : T();
|
|
2085
|
+
}), a.use("/index.html", (E, P) => {
|
|
2086
|
+
P.statusCode = 200, P.setHeader("Content-Type", "text/html"), P.write(w), P.end();
|
|
2104
2087
|
}), {
|
|
2105
|
-
bail:
|
|
2088
|
+
bail: ma,
|
|
2106
2089
|
stats: {
|
|
2107
2090
|
toJson: /* @__PURE__ */ o(() => ({}), "toJson")
|
|
2108
2091
|
},
|
|
2109
2092
|
totalTime: process.hrtime(i)
|
|
2110
2093
|
};
|
|
2111
|
-
}, "starterGeneratorFn"),
|
|
2094
|
+
}, "starterGeneratorFn"), pa = /* @__PURE__ */ o(async function* ({ startTime: i, options: t }) {
|
|
2112
2095
|
if (!t.outputDir)
|
|
2113
2096
|
throw new Error("outputDir is required");
|
|
2114
2097
|
me.info("=> Building manager..");
|
|
2115
2098
|
let {
|
|
2116
|
-
config:
|
|
2117
|
-
customHead:
|
|
2099
|
+
config: a,
|
|
2100
|
+
customHead: r,
|
|
2118
2101
|
favicon: n,
|
|
2119
2102
|
features: s,
|
|
2120
2103
|
instance: c,
|
|
@@ -2126,26 +2109,26 @@ var ur = /^\/($|\?)/, G, C, _t = /* @__PURE__ */ o(async (e) => {
|
|
|
2126
2109
|
tagsOptions: g
|
|
2127
2110
|
} = await le(t);
|
|
2128
2111
|
yield;
|
|
2129
|
-
let m =
|
|
2130
|
-
|
|
2131
|
-
...
|
|
2112
|
+
let m = a.outdir, f = F(Ft(S.resolve("storybook/package.json")), "dist", "manager"), y = F(t.outputDir, "sb-manager");
|
|
2113
|
+
L = await c({
|
|
2114
|
+
...a,
|
|
2132
2115
|
minify: !0
|
|
2133
2116
|
}), yield;
|
|
2134
|
-
let v =
|
|
2135
|
-
filter: /* @__PURE__ */ o((
|
|
2136
|
-
let { ext: T } =
|
|
2117
|
+
let v = aa(f, y, {
|
|
2118
|
+
filter: /* @__PURE__ */ o((P) => {
|
|
2119
|
+
let { ext: T } = na(P);
|
|
2137
2120
|
return T ? T === ".js" : !0;
|
|
2138
2121
|
}, "filter"),
|
|
2139
2122
|
recursive: !0
|
|
2140
|
-
}), { cssFiles: _, jsFiles:
|
|
2123
|
+
}), { cssFiles: _, jsFiles: O } = await ce(m, L?.outputFiles), w = await pe(t);
|
|
2141
2124
|
yield;
|
|
2142
|
-
let
|
|
2125
|
+
let E = await se(
|
|
2143
2126
|
l,
|
|
2144
2127
|
u,
|
|
2145
2128
|
n,
|
|
2146
|
-
|
|
2129
|
+
r,
|
|
2147
2130
|
_,
|
|
2148
|
-
|
|
2131
|
+
O,
|
|
2149
2132
|
s,
|
|
2150
2133
|
p,
|
|
2151
2134
|
d,
|
|
@@ -2154,36 +2137,36 @@ var ur = /^\/($|\?)/, G, C, _t = /* @__PURE__ */ o(async (e) => {
|
|
|
2154
2137
|
t,
|
|
2155
2138
|
w
|
|
2156
2139
|
);
|
|
2157
|
-
return await Promise.all([
|
|
2140
|
+
return await Promise.all([Tt(F(t.outputDir, "index.html"), E), v]), me.trace({ message: "=> Manager built", time: process.hrtime(i) }), {
|
|
2158
2141
|
toJson: /* @__PURE__ */ o(() => ({}), "toJson")
|
|
2159
2142
|
};
|
|
2160
|
-
}, "builderGeneratorFn"),
|
|
2143
|
+
}, "builderGeneratorFn"), ma = /* @__PURE__ */ o(async () => {
|
|
2161
2144
|
if (C)
|
|
2162
2145
|
try {
|
|
2163
2146
|
await C.throw(new Error());
|
|
2164
2147
|
} catch {
|
|
2165
2148
|
}
|
|
2166
|
-
}, "bail"),
|
|
2167
|
-
C =
|
|
2149
|
+
}, "bail"), Rr = /* @__PURE__ */ o(async (e) => {
|
|
2150
|
+
C = ca(e);
|
|
2168
2151
|
let i;
|
|
2169
2152
|
do
|
|
2170
2153
|
i = await C.next();
|
|
2171
2154
|
while (!i.done);
|
|
2172
2155
|
return i.value;
|
|
2173
|
-
}, "start"),
|
|
2174
|
-
C =
|
|
2156
|
+
}, "start"), Lr = /* @__PURE__ */ o(async (e) => {
|
|
2157
|
+
C = pa(e);
|
|
2175
2158
|
let i;
|
|
2176
2159
|
do
|
|
2177
2160
|
i = await C.next();
|
|
2178
2161
|
while (!i.done);
|
|
2179
2162
|
return i.value;
|
|
2180
|
-
}, "build"),
|
|
2163
|
+
}, "build"), Cr = [], Ar = [];
|
|
2181
2164
|
export {
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2165
|
+
ma as bail,
|
|
2166
|
+
Lr as build,
|
|
2167
|
+
Cr as corePresets,
|
|
2168
|
+
bt as executor,
|
|
2169
|
+
wt as getConfig,
|
|
2170
|
+
Ar as overridePresets,
|
|
2171
|
+
Rr as start
|
|
2189
2172
|
};
|