@storm-software/unbuild 0.23.0 → 0.23.2
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/bin/unbuild.js +49761 -1652
- package/bin/unbuild.mjs +49737 -1611
- package/dist/build.js +16 -10
- package/dist/build.mjs +15 -9
- package/dist/chunk-26H2BQTK.mjs +2446 -0
- package/dist/{chunk-3OJD7CO4.js → chunk-27VOTZLA.js} +7 -5
- package/dist/chunk-3TNHGERR.mjs +49 -0
- package/dist/chunk-45FJ3WQ6.js +7528 -0
- package/dist/{chunk-BIZYEBW3.mjs → chunk-4ENAOJ33.mjs} +4 -2
- package/dist/chunk-4HFICKAT.js +451 -0
- package/dist/chunk-4IU7LXNH.mjs +4054 -0
- package/dist/{chunk-IIVTCNH5.mjs → chunk-4QTKZ7Y7.mjs} +5 -3
- package/dist/chunk-7G3WYTPJ.js +6 -0
- package/dist/chunk-AMTVM7UD.js +4054 -0
- package/dist/{chunk-WPOEGALQ.js → chunk-D4WJVAJM.js} +7 -5
- package/dist/chunk-DIRFSBOA.mjs +84 -0
- package/dist/chunk-EGCWTBMT.mjs +1120 -0
- package/dist/chunk-EKTZK3IJ.mjs +765 -0
- package/dist/chunk-FAXWFK7Q.mjs +7528 -0
- package/dist/chunk-J3DIENOH.mjs +3056 -0
- package/dist/{chunk-AICX43E6.mjs → chunk-JLKG5B52.mjs} +6584 -143
- package/dist/chunk-K5SQO3GD.mjs +451 -0
- package/dist/{chunk-DFIGNXGY.js → chunk-L76UPCDF.js} +7631 -1190
- package/dist/chunk-NMYL4VJJ.js +84 -0
- package/dist/chunk-NOVWJHZD.mjs +6 -0
- package/dist/{chunk-FDF3FMZP.mjs → chunk-NXZFF473.mjs} +5 -3
- package/dist/{chunk-RCEWRXM5.js → chunk-P6LWSWAQ.js} +4 -2
- package/dist/{chunk-XEAFTDQ7.js → chunk-QPMFJ7G7.js} +7 -5
- package/dist/chunk-RBSVNX4W.js +49 -0
- package/dist/chunk-RM7SW35Z.js +1120 -0
- package/dist/chunk-RNM4JSUG.js +29 -0
- package/dist/chunk-S532A3LO.js +510 -0
- package/dist/{chunk-T5NKX2EJ.mjs → chunk-TCARWZKA.mjs} +8 -6
- package/dist/{chunk-OG2CKJQU.mjs → chunk-UT4OJQUT.mjs} +5 -3
- package/dist/chunk-VJI72AA6.mjs +510 -0
- package/dist/chunk-W7YS7HE5.js +765 -0
- package/dist/chunk-X6Y2OZGW.js +3056 -0
- package/dist/chunk-YXF5LOZH.js +2449 -0
- package/dist/clean.js +4 -4
- package/dist/clean.mjs +3 -3
- package/dist/config.js +8 -8
- package/dist/config.mjs +7 -7
- package/dist/dist-JWSUGJW5.js +17571 -0
- package/dist/dist-LXRVOZWD.mjs +17570 -0
- package/dist/esm-2JSYGY2W.js +1716 -0
- package/dist/esm-2LICJFKF.mjs +1716 -0
- package/dist/execa-2KYLC5PR.mjs +2424 -0
- package/dist/execa-QRX32ES4.js +2424 -0
- package/dist/index.js +22 -11
- package/dist/index.mjs +21 -10
- package/dist/json5-JI6Y4EBT.mjs +10 -0
- package/dist/json5-ZRUT32KA.js +10 -0
- package/dist/jsonc-2MC7UMCL.js +15 -0
- package/dist/jsonc-PDDMSRDH.mjs +15 -0
- package/dist/multipart-parser-FQDS23TV.mjs +187 -0
- package/dist/multipart-parser-IX66WIWH.js +187 -0
- package/dist/toml-IHKP66UV.mjs +10 -0
- package/dist/toml-MDHAEB3G.js +10 -0
- package/dist/types.js +2 -1
- package/dist/types.mjs +2 -1
- package/dist/yaml-GMY56OHD.mjs +10 -0
- package/dist/yaml-UTMAXQ2T.js +10 -0
- package/package.json +3 -3
- package/dist/chunk-3GQAWCBQ.js +0 -13
- package/dist/chunk-AW52DUNE.mjs +0 -1043
- package/dist/chunk-AYRYNROK.js +0 -27
- package/dist/chunk-B5GGHMTB.mjs +0 -604
- package/dist/chunk-ERHVDARL.mjs +0 -0
- package/dist/chunk-LPEX4YW6.mjs +0 -13
- package/dist/chunk-OQPSH7GE.js +0 -604
- package/dist/chunk-OULCUN6I.js +0 -1
- package/dist/chunk-T2OTJN2D.js +0 -1043
package/dist/index.js
CHANGED
|
@@ -1,26 +1,37 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkYXF5LOZHjs = require('./chunk-YXF5LOZH.js');
|
|
4
|
+
require('./chunk-45FJ3WQ6.js');
|
|
5
|
+
require('./chunk-W7YS7HE5.js');
|
|
6
|
+
require('./chunk-RM7SW35Z.js');
|
|
7
|
+
require('./chunk-S532A3LO.js');
|
|
8
|
+
require('./chunk-4HFICKAT.js');
|
|
9
|
+
require('./chunk-NMYL4VJJ.js');
|
|
4
10
|
|
|
5
11
|
|
|
6
|
-
var
|
|
12
|
+
var _chunk27VOTZLAjs = require('./chunk-27VOTZLA.js');
|
|
7
13
|
|
|
8
14
|
|
|
9
|
-
var
|
|
15
|
+
var _chunkRNM4JSUGjs = require('./chunk-RNM4JSUG.js');
|
|
10
16
|
|
|
11
17
|
|
|
12
18
|
|
|
13
|
-
var
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
16
|
-
require('./chunk-
|
|
17
|
-
require('./chunk-
|
|
18
|
-
require('./chunk-
|
|
19
|
-
require('./chunk-3GQAWCBQ.js');
|
|
19
|
+
var _chunkL76UPCDFjs = require('./chunk-L76UPCDF.js');
|
|
20
|
+
require('./chunk-P6LWSWAQ.js');
|
|
21
|
+
require('./chunk-7G3WYTPJ.js');
|
|
22
|
+
require('./chunk-QPMFJ7G7.js');
|
|
23
|
+
require('./chunk-D4WJVAJM.js');
|
|
24
|
+
require('./chunk-X6Y2OZGW.js');
|
|
20
25
|
|
|
21
26
|
|
|
27
|
+
var _chunkRBSVNX4Wjs = require('./chunk-RBSVNX4W.js');
|
|
22
28
|
|
|
29
|
+
// src/index.ts
|
|
30
|
+
_chunkRBSVNX4Wjs.init_cjs_shims.call(void 0, );
|
|
23
31
|
|
|
24
32
|
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
exports.build = _chunkYXF5LOZHjs.build; exports.clean = _chunk27VOTZLAjs.clean; exports.createTsCompilerOptions = _chunkL76UPCDFjs.createTsCompilerOptions; exports.getDefaultBuildPlugins = _chunkRNM4JSUGjs.getDefaultBuildPlugins; exports.loadConfig = _chunkL76UPCDFjs.loadConfig;
|
package/dist/index.mjs
CHANGED
|
@@ -1,22 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-26H2BQTK.mjs";
|
|
4
|
+
import "./chunk-FAXWFK7Q.mjs";
|
|
5
|
+
import "./chunk-EKTZK3IJ.mjs";
|
|
6
|
+
import "./chunk-EGCWTBMT.mjs";
|
|
7
|
+
import "./chunk-VJI72AA6.mjs";
|
|
8
|
+
import "./chunk-K5SQO3GD.mjs";
|
|
9
|
+
import "./chunk-DIRFSBOA.mjs";
|
|
4
10
|
import {
|
|
5
11
|
clean
|
|
6
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4QTKZ7Y7.mjs";
|
|
7
13
|
import {
|
|
8
14
|
getDefaultBuildPlugins
|
|
9
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TCARWZKA.mjs";
|
|
10
16
|
import {
|
|
11
17
|
createTsCompilerOptions,
|
|
12
18
|
loadConfig
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import
|
|
19
|
+
} from "./chunk-JLKG5B52.mjs";
|
|
20
|
+
import "./chunk-4ENAOJ33.mjs";
|
|
21
|
+
import "./chunk-NOVWJHZD.mjs";
|
|
22
|
+
import "./chunk-NXZFF473.mjs";
|
|
23
|
+
import "./chunk-UT4OJQUT.mjs";
|
|
24
|
+
import "./chunk-J3DIENOH.mjs";
|
|
25
|
+
import {
|
|
26
|
+
init_esm_shims
|
|
27
|
+
} from "./chunk-3TNHGERR.mjs";
|
|
28
|
+
|
|
29
|
+
// src/index.ts
|
|
30
|
+
init_esm_shims();
|
|
20
31
|
export {
|
|
21
32
|
build,
|
|
22
33
|
clean,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkW7YS7HE5js = require('./chunk-W7YS7HE5.js');
|
|
5
|
+
require('./chunk-NMYL4VJJ.js');
|
|
6
|
+
require('./chunk-RBSVNX4W.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.parseJSON5 = _chunkW7YS7HE5js.ou; exports.stringifyJSON5 = _chunkW7YS7HE5js.cu;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunk4HFICKATjs = require('./chunk-4HFICKAT.js');
|
|
5
|
+
require('./chunk-NMYL4VJJ.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkRBSVNX4Wjs = require('./chunk-RBSVNX4W.js');
|
|
9
|
+
|
|
10
|
+
// ../../node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/jsonc.mjs
|
|
11
|
+
_chunkRBSVNX4Wjs.init_cjs_shims.call(void 0, );
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
exports.parseJSONC = _chunk4HFICKATjs.h; exports.stringifyJSONC = _chunk4HFICKATjs.d;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
d,
|
|
3
|
+
h
|
|
4
|
+
} from "./chunk-K5SQO3GD.mjs";
|
|
5
|
+
import "./chunk-DIRFSBOA.mjs";
|
|
6
|
+
import {
|
|
7
|
+
init_esm_shims
|
|
8
|
+
} from "./chunk-3TNHGERR.mjs";
|
|
9
|
+
|
|
10
|
+
// ../../node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/jsonc.mjs
|
|
11
|
+
init_esm_shims();
|
|
12
|
+
export {
|
|
13
|
+
h as parseJSONC,
|
|
14
|
+
d as stringifyJSONC
|
|
15
|
+
};
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import {
|
|
2
|
+
require_node,
|
|
3
|
+
require_node_fetch_native_DhEqb06g
|
|
4
|
+
} from "./chunk-4IU7LXNH.mjs";
|
|
5
|
+
import {
|
|
6
|
+
__commonJS,
|
|
7
|
+
__name,
|
|
8
|
+
__require,
|
|
9
|
+
init_esm_shims
|
|
10
|
+
} from "./chunk-3TNHGERR.mjs";
|
|
11
|
+
|
|
12
|
+
// ../../node_modules/.pnpm/node-fetch-native@1.6.5/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs
|
|
13
|
+
var require_multipart_parser = __commonJS({
|
|
14
|
+
"../../node_modules/.pnpm/node-fetch-native@1.6.5/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs"(exports) {
|
|
15
|
+
init_esm_shims();
|
|
16
|
+
var N = Object.defineProperty;
|
|
17
|
+
var c = /* @__PURE__ */ __name((_, a) => N(_, "name", { value: a, configurable: true }), "c");
|
|
18
|
+
__require("node:fs"), __require("node:path");
|
|
19
|
+
var node = require_node();
|
|
20
|
+
__require("node:http"), __require("node:https"), __require("node:zlib"), __require("node:stream"), __require("node:buffer"), __require("node:util"), require_node_fetch_native_DhEqb06g(), __require("node:url"), __require("node:net");
|
|
21
|
+
var s = 0;
|
|
22
|
+
var S = { START_BOUNDARY: s++, HEADER_FIELD_START: s++, HEADER_FIELD: s++, HEADER_VALUE_START: s++, HEADER_VALUE: s++, HEADER_VALUE_ALMOST_DONE: s++, HEADERS_ALMOST_DONE: s++, PART_DATA_START: s++, PART_DATA: s++, END: s++ };
|
|
23
|
+
var f = 1;
|
|
24
|
+
var F = { PART_BOUNDARY: f, LAST_BOUNDARY: f *= 2 };
|
|
25
|
+
var LF = 10;
|
|
26
|
+
var CR = 13;
|
|
27
|
+
var SPACE = 32;
|
|
28
|
+
var HYPHEN = 45;
|
|
29
|
+
var COLON = 58;
|
|
30
|
+
var A = 97;
|
|
31
|
+
var Z = 122;
|
|
32
|
+
var lower = c((_) => _ | 32, "lower");
|
|
33
|
+
var noop = c(() => {
|
|
34
|
+
}, "noop");
|
|
35
|
+
var MultipartParser = class {
|
|
36
|
+
static {
|
|
37
|
+
__name(this, "MultipartParser");
|
|
38
|
+
}
|
|
39
|
+
static {
|
|
40
|
+
c(this, "MultipartParser");
|
|
41
|
+
}
|
|
42
|
+
constructor(a) {
|
|
43
|
+
this.index = 0, this.flags = 0, this.onHeaderEnd = noop, this.onHeaderField = noop, this.onHeadersEnd = noop, this.onHeaderValue = noop, this.onPartBegin = noop, this.onPartData = noop, this.onPartEnd = noop, this.boundaryChars = {}, a = `\r
|
|
44
|
+
--` + a;
|
|
45
|
+
const t = new Uint8Array(a.length);
|
|
46
|
+
for (let n = 0; n < a.length; n++) t[n] = a.charCodeAt(n), this.boundaryChars[t[n]] = true;
|
|
47
|
+
this.boundary = t, this.lookbehind = new Uint8Array(this.boundary.length + 8), this.state = S.START_BOUNDARY;
|
|
48
|
+
}
|
|
49
|
+
write(a) {
|
|
50
|
+
let t = 0;
|
|
51
|
+
const n = a.length;
|
|
52
|
+
let E = this.index, { lookbehind: d, boundary: h, boundaryChars: H, index: e, state: o, flags: l } = this;
|
|
53
|
+
const b = this.boundary.length, m = b - 1, O = a.length;
|
|
54
|
+
let r, P;
|
|
55
|
+
const u = c((D) => {
|
|
56
|
+
this[D + "Mark"] = t;
|
|
57
|
+
}, "mark"), i = c((D) => {
|
|
58
|
+
delete this[D + "Mark"];
|
|
59
|
+
}, "clear"), T = c((D, p, R, g) => {
|
|
60
|
+
(p === void 0 || p !== R) && this[D](g && g.subarray(p, R));
|
|
61
|
+
}, "callback"), L = c((D, p) => {
|
|
62
|
+
const R = D + "Mark";
|
|
63
|
+
R in this && (p ? (T(D, this[R], t, a), delete this[R]) : (T(D, this[R], a.length, a), this[R] = 0));
|
|
64
|
+
}, "dataCallback");
|
|
65
|
+
for (t = 0; t < n; t++) switch (r = a[t], o) {
|
|
66
|
+
case S.START_BOUNDARY:
|
|
67
|
+
if (e === h.length - 2) {
|
|
68
|
+
if (r === HYPHEN) l |= F.LAST_BOUNDARY;
|
|
69
|
+
else if (r !== CR) return;
|
|
70
|
+
e++;
|
|
71
|
+
break;
|
|
72
|
+
} else if (e - 1 === h.length - 2) {
|
|
73
|
+
if (l & F.LAST_BOUNDARY && r === HYPHEN) o = S.END, l = 0;
|
|
74
|
+
else if (!(l & F.LAST_BOUNDARY) && r === LF) e = 0, T("onPartBegin"), o = S.HEADER_FIELD_START;
|
|
75
|
+
else return;
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
r !== h[e + 2] && (e = -2), r === h[e + 2] && e++;
|
|
79
|
+
break;
|
|
80
|
+
case S.HEADER_FIELD_START:
|
|
81
|
+
o = S.HEADER_FIELD, u("onHeaderField"), e = 0;
|
|
82
|
+
case S.HEADER_FIELD:
|
|
83
|
+
if (r === CR) {
|
|
84
|
+
i("onHeaderField"), o = S.HEADERS_ALMOST_DONE;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
if (e++, r === HYPHEN) break;
|
|
88
|
+
if (r === COLON) {
|
|
89
|
+
if (e === 1) return;
|
|
90
|
+
L("onHeaderField", true), o = S.HEADER_VALUE_START;
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
if (P = lower(r), P < A || P > Z) return;
|
|
94
|
+
break;
|
|
95
|
+
case S.HEADER_VALUE_START:
|
|
96
|
+
if (r === SPACE) break;
|
|
97
|
+
u("onHeaderValue"), o = S.HEADER_VALUE;
|
|
98
|
+
case S.HEADER_VALUE:
|
|
99
|
+
r === CR && (L("onHeaderValue", true), T("onHeaderEnd"), o = S.HEADER_VALUE_ALMOST_DONE);
|
|
100
|
+
break;
|
|
101
|
+
case S.HEADER_VALUE_ALMOST_DONE:
|
|
102
|
+
if (r !== LF) return;
|
|
103
|
+
o = S.HEADER_FIELD_START;
|
|
104
|
+
break;
|
|
105
|
+
case S.HEADERS_ALMOST_DONE:
|
|
106
|
+
if (r !== LF) return;
|
|
107
|
+
T("onHeadersEnd"), o = S.PART_DATA_START;
|
|
108
|
+
break;
|
|
109
|
+
case S.PART_DATA_START:
|
|
110
|
+
o = S.PART_DATA, u("onPartData");
|
|
111
|
+
case S.PART_DATA:
|
|
112
|
+
if (E = e, e === 0) {
|
|
113
|
+
for (t += m; t < O && !(a[t] in H); ) t += b;
|
|
114
|
+
t -= m, r = a[t];
|
|
115
|
+
}
|
|
116
|
+
if (e < h.length) h[e] === r ? (e === 0 && L("onPartData", true), e++) : e = 0;
|
|
117
|
+
else if (e === h.length) e++, r === CR ? l |= F.PART_BOUNDARY : r === HYPHEN ? l |= F.LAST_BOUNDARY : e = 0;
|
|
118
|
+
else if (e - 1 === h.length) if (l & F.PART_BOUNDARY) {
|
|
119
|
+
if (e = 0, r === LF) {
|
|
120
|
+
l &= ~F.PART_BOUNDARY, T("onPartEnd"), T("onPartBegin"), o = S.HEADER_FIELD_START;
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
} else l & F.LAST_BOUNDARY && r === HYPHEN ? (T("onPartEnd"), o = S.END, l = 0) : e = 0;
|
|
124
|
+
if (e > 0) d[e - 1] = r;
|
|
125
|
+
else if (E > 0) {
|
|
126
|
+
const D = new Uint8Array(d.buffer, d.byteOffset, d.byteLength);
|
|
127
|
+
T("onPartData", 0, E, D), E = 0, u("onPartData"), t--;
|
|
128
|
+
}
|
|
129
|
+
break;
|
|
130
|
+
case S.END:
|
|
131
|
+
break;
|
|
132
|
+
default:
|
|
133
|
+
throw new Error(`Unexpected state entered: ${o}`);
|
|
134
|
+
}
|
|
135
|
+
L("onHeaderField"), L("onHeaderValue"), L("onPartData"), this.index = e, this.state = o, this.flags = l;
|
|
136
|
+
}
|
|
137
|
+
end() {
|
|
138
|
+
if (this.state === S.HEADER_FIELD_START && this.index === 0 || this.state === S.PART_DATA && this.index === this.boundary.length) this.onPartEnd();
|
|
139
|
+
else if (this.state !== S.END) throw new Error("MultipartParser.end(): stream ended unexpectedly");
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
function _fileName(_) {
|
|
143
|
+
const a = _.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
|
|
144
|
+
if (!a) return;
|
|
145
|
+
const t = a[2] || a[3] || "";
|
|
146
|
+
let n = t.slice(t.lastIndexOf("\\") + 1);
|
|
147
|
+
return n = n.replace(/%22/g, '"'), n = n.replace(/&#(\d{4});/g, (E, d) => String.fromCharCode(d)), n;
|
|
148
|
+
}
|
|
149
|
+
__name(_fileName, "_fileName");
|
|
150
|
+
c(_fileName, "_fileName");
|
|
151
|
+
async function toFormData(_, a) {
|
|
152
|
+
if (!/multipart/i.test(a)) throw new TypeError("Failed to fetch");
|
|
153
|
+
const t = a.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
|
|
154
|
+
if (!t) throw new TypeError("no or bad content-type header, no multipart boundary");
|
|
155
|
+
const n = new MultipartParser(t[1] || t[2]);
|
|
156
|
+
let E, d, h, H, e, o;
|
|
157
|
+
const l = [], b = new node.FormData(), m = c((i) => {
|
|
158
|
+
h += u.decode(i, { stream: true });
|
|
159
|
+
}, "onPartData"), O = c((i) => {
|
|
160
|
+
l.push(i);
|
|
161
|
+
}, "appendToFile"), r = c(() => {
|
|
162
|
+
const i = new node.File(l, o, { type: e });
|
|
163
|
+
b.append(H, i);
|
|
164
|
+
}, "appendFileToFormData"), P = c(() => {
|
|
165
|
+
b.append(H, h);
|
|
166
|
+
}, "appendEntryToFormData"), u = new TextDecoder("utf-8");
|
|
167
|
+
u.decode(), n.onPartBegin = function() {
|
|
168
|
+
n.onPartData = m, n.onPartEnd = P, E = "", d = "", h = "", H = "", e = "", o = null, l.length = 0;
|
|
169
|
+
}, n.onHeaderField = function(i) {
|
|
170
|
+
E += u.decode(i, { stream: true });
|
|
171
|
+
}, n.onHeaderValue = function(i) {
|
|
172
|
+
d += u.decode(i, { stream: true });
|
|
173
|
+
}, n.onHeaderEnd = function() {
|
|
174
|
+
if (d += u.decode(), E = E.toLowerCase(), E === "content-disposition") {
|
|
175
|
+
const i = d.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);
|
|
176
|
+
i && (H = i[2] || i[3] || ""), o = _fileName(d), o && (n.onPartData = O, n.onPartEnd = r);
|
|
177
|
+
} else E === "content-type" && (e = d);
|
|
178
|
+
d = "", E = "";
|
|
179
|
+
};
|
|
180
|
+
for await (const i of _) n.write(i);
|
|
181
|
+
return n.end(), b;
|
|
182
|
+
}
|
|
183
|
+
__name(toFormData, "toFormData");
|
|
184
|
+
c(toFormData, "toFormData"), exports.toFormData = toFormData;
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
export default require_multipart_parser();
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkAMTVM7UDjs = require('./chunk-AMTVM7UD.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkRBSVNX4Wjs = require('./chunk-RBSVNX4W.js');
|
|
11
|
+
|
|
12
|
+
// ../../node_modules/.pnpm/node-fetch-native@1.6.5/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs
|
|
13
|
+
var require_multipart_parser = _chunkRBSVNX4Wjs.__commonJS.call(void 0, {
|
|
14
|
+
"../../node_modules/.pnpm/node-fetch-native@1.6.5/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs"(exports) {
|
|
15
|
+
_chunkRBSVNX4Wjs.init_cjs_shims.call(void 0, );
|
|
16
|
+
var N = Object.defineProperty;
|
|
17
|
+
var c = /* @__PURE__ */ _chunkRBSVNX4Wjs.__name.call(void 0, (_, a) => N(_, "name", { value: a, configurable: true }), "c");
|
|
18
|
+
_chunkRBSVNX4Wjs.__require.call(void 0, "fs"), _chunkRBSVNX4Wjs.__require.call(void 0, "path");
|
|
19
|
+
var node = _chunkAMTVM7UDjs.require_node.call(void 0, );
|
|
20
|
+
_chunkRBSVNX4Wjs.__require.call(void 0, "http"), _chunkRBSVNX4Wjs.__require.call(void 0, "https"), _chunkRBSVNX4Wjs.__require.call(void 0, "zlib"), _chunkRBSVNX4Wjs.__require.call(void 0, "stream"), _chunkRBSVNX4Wjs.__require.call(void 0, "buffer"), _chunkRBSVNX4Wjs.__require.call(void 0, "util"), _chunkAMTVM7UDjs.require_node_fetch_native_DhEqb06g.call(void 0, ), _chunkRBSVNX4Wjs.__require.call(void 0, "url"), _chunkRBSVNX4Wjs.__require.call(void 0, "net");
|
|
21
|
+
var s = 0;
|
|
22
|
+
var S = { START_BOUNDARY: s++, HEADER_FIELD_START: s++, HEADER_FIELD: s++, HEADER_VALUE_START: s++, HEADER_VALUE: s++, HEADER_VALUE_ALMOST_DONE: s++, HEADERS_ALMOST_DONE: s++, PART_DATA_START: s++, PART_DATA: s++, END: s++ };
|
|
23
|
+
var f = 1;
|
|
24
|
+
var F = { PART_BOUNDARY: f, LAST_BOUNDARY: f *= 2 };
|
|
25
|
+
var LF = 10;
|
|
26
|
+
var CR = 13;
|
|
27
|
+
var SPACE = 32;
|
|
28
|
+
var HYPHEN = 45;
|
|
29
|
+
var COLON = 58;
|
|
30
|
+
var A = 97;
|
|
31
|
+
var Z = 122;
|
|
32
|
+
var lower = c((_) => _ | 32, "lower");
|
|
33
|
+
var noop = c(() => {
|
|
34
|
+
}, "noop");
|
|
35
|
+
var MultipartParser = class {
|
|
36
|
+
static {
|
|
37
|
+
_chunkRBSVNX4Wjs.__name.call(void 0, this, "MultipartParser");
|
|
38
|
+
}
|
|
39
|
+
static {
|
|
40
|
+
c(this, "MultipartParser");
|
|
41
|
+
}
|
|
42
|
+
constructor(a) {
|
|
43
|
+
this.index = 0, this.flags = 0, this.onHeaderEnd = noop, this.onHeaderField = noop, this.onHeadersEnd = noop, this.onHeaderValue = noop, this.onPartBegin = noop, this.onPartData = noop, this.onPartEnd = noop, this.boundaryChars = {}, a = `\r
|
|
44
|
+
--` + a;
|
|
45
|
+
const t = new Uint8Array(a.length);
|
|
46
|
+
for (let n = 0; n < a.length; n++) t[n] = a.charCodeAt(n), this.boundaryChars[t[n]] = true;
|
|
47
|
+
this.boundary = t, this.lookbehind = new Uint8Array(this.boundary.length + 8), this.state = S.START_BOUNDARY;
|
|
48
|
+
}
|
|
49
|
+
write(a) {
|
|
50
|
+
let t = 0;
|
|
51
|
+
const n = a.length;
|
|
52
|
+
let E = this.index, { lookbehind: d, boundary: h, boundaryChars: H, index: e, state: o, flags: l } = this;
|
|
53
|
+
const b = this.boundary.length, m = b - 1, O = a.length;
|
|
54
|
+
let r, P;
|
|
55
|
+
const u = c((D) => {
|
|
56
|
+
this[D + "Mark"] = t;
|
|
57
|
+
}, "mark"), i = c((D) => {
|
|
58
|
+
delete this[D + "Mark"];
|
|
59
|
+
}, "clear"), T = c((D, p, R, g) => {
|
|
60
|
+
(p === void 0 || p !== R) && this[D](g && g.subarray(p, R));
|
|
61
|
+
}, "callback"), L = c((D, p) => {
|
|
62
|
+
const R = D + "Mark";
|
|
63
|
+
R in this && (p ? (T(D, this[R], t, a), delete this[R]) : (T(D, this[R], a.length, a), this[R] = 0));
|
|
64
|
+
}, "dataCallback");
|
|
65
|
+
for (t = 0; t < n; t++) switch (r = a[t], o) {
|
|
66
|
+
case S.START_BOUNDARY:
|
|
67
|
+
if (e === h.length - 2) {
|
|
68
|
+
if (r === HYPHEN) l |= F.LAST_BOUNDARY;
|
|
69
|
+
else if (r !== CR) return;
|
|
70
|
+
e++;
|
|
71
|
+
break;
|
|
72
|
+
} else if (e - 1 === h.length - 2) {
|
|
73
|
+
if (l & F.LAST_BOUNDARY && r === HYPHEN) o = S.END, l = 0;
|
|
74
|
+
else if (!(l & F.LAST_BOUNDARY) && r === LF) e = 0, T("onPartBegin"), o = S.HEADER_FIELD_START;
|
|
75
|
+
else return;
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
r !== h[e + 2] && (e = -2), r === h[e + 2] && e++;
|
|
79
|
+
break;
|
|
80
|
+
case S.HEADER_FIELD_START:
|
|
81
|
+
o = S.HEADER_FIELD, u("onHeaderField"), e = 0;
|
|
82
|
+
case S.HEADER_FIELD:
|
|
83
|
+
if (r === CR) {
|
|
84
|
+
i("onHeaderField"), o = S.HEADERS_ALMOST_DONE;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
if (e++, r === HYPHEN) break;
|
|
88
|
+
if (r === COLON) {
|
|
89
|
+
if (e === 1) return;
|
|
90
|
+
L("onHeaderField", true), o = S.HEADER_VALUE_START;
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
if (P = lower(r), P < A || P > Z) return;
|
|
94
|
+
break;
|
|
95
|
+
case S.HEADER_VALUE_START:
|
|
96
|
+
if (r === SPACE) break;
|
|
97
|
+
u("onHeaderValue"), o = S.HEADER_VALUE;
|
|
98
|
+
case S.HEADER_VALUE:
|
|
99
|
+
r === CR && (L("onHeaderValue", true), T("onHeaderEnd"), o = S.HEADER_VALUE_ALMOST_DONE);
|
|
100
|
+
break;
|
|
101
|
+
case S.HEADER_VALUE_ALMOST_DONE:
|
|
102
|
+
if (r !== LF) return;
|
|
103
|
+
o = S.HEADER_FIELD_START;
|
|
104
|
+
break;
|
|
105
|
+
case S.HEADERS_ALMOST_DONE:
|
|
106
|
+
if (r !== LF) return;
|
|
107
|
+
T("onHeadersEnd"), o = S.PART_DATA_START;
|
|
108
|
+
break;
|
|
109
|
+
case S.PART_DATA_START:
|
|
110
|
+
o = S.PART_DATA, u("onPartData");
|
|
111
|
+
case S.PART_DATA:
|
|
112
|
+
if (E = e, e === 0) {
|
|
113
|
+
for (t += m; t < O && !(a[t] in H); ) t += b;
|
|
114
|
+
t -= m, r = a[t];
|
|
115
|
+
}
|
|
116
|
+
if (e < h.length) h[e] === r ? (e === 0 && L("onPartData", true), e++) : e = 0;
|
|
117
|
+
else if (e === h.length) e++, r === CR ? l |= F.PART_BOUNDARY : r === HYPHEN ? l |= F.LAST_BOUNDARY : e = 0;
|
|
118
|
+
else if (e - 1 === h.length) if (l & F.PART_BOUNDARY) {
|
|
119
|
+
if (e = 0, r === LF) {
|
|
120
|
+
l &= ~F.PART_BOUNDARY, T("onPartEnd"), T("onPartBegin"), o = S.HEADER_FIELD_START;
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
} else l & F.LAST_BOUNDARY && r === HYPHEN ? (T("onPartEnd"), o = S.END, l = 0) : e = 0;
|
|
124
|
+
if (e > 0) d[e - 1] = r;
|
|
125
|
+
else if (E > 0) {
|
|
126
|
+
const D = new Uint8Array(d.buffer, d.byteOffset, d.byteLength);
|
|
127
|
+
T("onPartData", 0, E, D), E = 0, u("onPartData"), t--;
|
|
128
|
+
}
|
|
129
|
+
break;
|
|
130
|
+
case S.END:
|
|
131
|
+
break;
|
|
132
|
+
default:
|
|
133
|
+
throw new Error(`Unexpected state entered: ${o}`);
|
|
134
|
+
}
|
|
135
|
+
L("onHeaderField"), L("onHeaderValue"), L("onPartData"), this.index = e, this.state = o, this.flags = l;
|
|
136
|
+
}
|
|
137
|
+
end() {
|
|
138
|
+
if (this.state === S.HEADER_FIELD_START && this.index === 0 || this.state === S.PART_DATA && this.index === this.boundary.length) this.onPartEnd();
|
|
139
|
+
else if (this.state !== S.END) throw new Error("MultipartParser.end(): stream ended unexpectedly");
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
function _fileName(_) {
|
|
143
|
+
const a = _.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
|
|
144
|
+
if (!a) return;
|
|
145
|
+
const t = a[2] || a[3] || "";
|
|
146
|
+
let n = t.slice(t.lastIndexOf("\\") + 1);
|
|
147
|
+
return n = n.replace(/%22/g, '"'), n = n.replace(/&#(\d{4});/g, (E, d) => String.fromCharCode(d)), n;
|
|
148
|
+
}
|
|
149
|
+
_chunkRBSVNX4Wjs.__name.call(void 0, _fileName, "_fileName");
|
|
150
|
+
c(_fileName, "_fileName");
|
|
151
|
+
async function toFormData(_, a) {
|
|
152
|
+
if (!/multipart/i.test(a)) throw new TypeError("Failed to fetch");
|
|
153
|
+
const t = a.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
|
|
154
|
+
if (!t) throw new TypeError("no or bad content-type header, no multipart boundary");
|
|
155
|
+
const n = new MultipartParser(t[1] || t[2]);
|
|
156
|
+
let E, d, h, H, e, o;
|
|
157
|
+
const l = [], b = new node.FormData(), m = c((i) => {
|
|
158
|
+
h += u.decode(i, { stream: true });
|
|
159
|
+
}, "onPartData"), O = c((i) => {
|
|
160
|
+
l.push(i);
|
|
161
|
+
}, "appendToFile"), r = c(() => {
|
|
162
|
+
const i = new node.File(l, o, { type: e });
|
|
163
|
+
b.append(H, i);
|
|
164
|
+
}, "appendFileToFormData"), P = c(() => {
|
|
165
|
+
b.append(H, h);
|
|
166
|
+
}, "appendEntryToFormData"), u = new TextDecoder("utf-8");
|
|
167
|
+
u.decode(), n.onPartBegin = function() {
|
|
168
|
+
n.onPartData = m, n.onPartEnd = P, E = "", d = "", h = "", H = "", e = "", o = null, l.length = 0;
|
|
169
|
+
}, n.onHeaderField = function(i) {
|
|
170
|
+
E += u.decode(i, { stream: true });
|
|
171
|
+
}, n.onHeaderValue = function(i) {
|
|
172
|
+
d += u.decode(i, { stream: true });
|
|
173
|
+
}, n.onHeaderEnd = function() {
|
|
174
|
+
if (d += u.decode(), E = E.toLowerCase(), E === "content-disposition") {
|
|
175
|
+
const i = d.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);
|
|
176
|
+
i && (H = i[2] || i[3] || ""), o = _fileName(d), o && (n.onPartData = O, n.onPartEnd = r);
|
|
177
|
+
} else E === "content-type" && (e = d);
|
|
178
|
+
d = "", E = "";
|
|
179
|
+
};
|
|
180
|
+
for await (const i of _) n.write(i);
|
|
181
|
+
return n.end(), b;
|
|
182
|
+
}
|
|
183
|
+
_chunkRBSVNX4Wjs.__name.call(void 0, toFormData, "toFormData");
|
|
184
|
+
c(toFormData, "toFormData"), exports.toFormData = toFormData;
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
exports. default = require_multipart_parser();
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkS532A3LOjs = require('./chunk-S532A3LO.js');
|
|
5
|
+
require('./chunk-NMYL4VJJ.js');
|
|
6
|
+
require('./chunk-RBSVNX4W.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.parseTOML = _chunkS532A3LOjs.ae; exports.stringifyTOML = _chunkS532A3LOjs.ue;
|
package/dist/types.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";require('./chunk-
|
|
1
|
+
"use strict";require('./chunk-7G3WYTPJ.js');
|
|
2
|
+
require('./chunk-RBSVNX4W.js');
|
package/dist/types.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-NOVWJHZD.mjs";
|
|
2
|
+
import "./chunk-3TNHGERR.mjs";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkRM7SW35Zjs = require('./chunk-RM7SW35Z.js');
|
|
5
|
+
require('./chunk-NMYL4VJJ.js');
|
|
6
|
+
require('./chunk-RBSVNX4W.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.parseYAML = _chunkRM7SW35Zjs.Ar; exports.stringifyYAML = _chunkRM7SW35Zjs.vr;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/unbuild",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.2",
|
|
4
4
|
"description": "A package containing `unbuild` utilities for building Storm Software libraries and applications",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "github",
|
|
@@ -175,9 +175,9 @@
|
|
|
175
175
|
"@nx/devkit": "^20.3.1",
|
|
176
176
|
"@nx/js": "^20.3.1",
|
|
177
177
|
"@rollup/pluginutils": "^5.1.4",
|
|
178
|
-
"@storm-software/build-tools": "
|
|
178
|
+
"@storm-software/build-tools": "workspace:*",
|
|
179
179
|
"@storm-software/config": "workspace:*",
|
|
180
|
-
"@storm-software/config-tools": "
|
|
180
|
+
"@storm-software/config-tools": "workspace:*",
|
|
181
181
|
"@swc/core": "1.7.26",
|
|
182
182
|
"@types/node": "^22.10.2",
|
|
183
183
|
"commander": "^12.1.0",
|
package/dist/chunk-3GQAWCBQ.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
4
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
5
|
-
}) : x)(function(x) {
|
|
6
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
7
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.__name = __name; exports.__require = __require;
|