@cloudflare/workers-utils 0.25.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.mjs +2 -2
- package/dist/{chunk-66IS76LR.mjs → chunk-27EBTAT2.mjs} +3 -31
- package/dist/{chunk-DCOBXSFB.mjs → chunk-DDRU76YD.mjs} +1 -6
- package/dist/{chunk-J6D57QVQ.mjs → chunk-ELQRF72O.mjs} +1 -1
- package/dist/chunk-OC543JY3.mjs +33 -0
- package/dist/chunk-OTBYAUQ6.mjs +155 -0
- package/dist/{chunk-O4YGOZSW.mjs → chunk-TJ6ANXA2.mjs} +1 -1
- package/dist/fs-helpers.d.mts +40 -0
- package/dist/fs-helpers.mjs +2 -0
- package/dist/global-wrangler-config-path.d.mts +35 -0
- package/dist/global-wrangler-config-path.mjs +3 -0
- package/dist/index.d.mts +15 -71
- package/dist/index.mjs +373 -808
- package/dist/metafile-esm.json +1 -1
- package/dist/prometheus-metrics.mjs +2 -2
- package/dist/test-helpers/index.mjs +3 -2
- package/package.json +10 -3
package/dist/index.mjs
CHANGED
|
@@ -1,728 +1,30 @@
|
|
|
1
|
-
export { assertNever, constructWranglerConfig, getTodaysCompatDate, isCompatDate, mapWorkerMetadataBindings } from './chunk-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
import {
|
|
1
|
+
export { assertNever, constructWranglerConfig, getTodaysCompatDate, isCompatDate, mapWorkerMetadataBindings } from './chunk-ELQRF72O.mjs';
|
|
2
|
+
import { getGlobalConfigPath } from './chunk-OTBYAUQ6.mjs';
|
|
3
|
+
export { getGlobalConfigPath, getGlobalWranglerCachePath } from './chunk-OTBYAUQ6.mjs';
|
|
4
|
+
export { MetricsRegistry } from './chunk-TJ6ANXA2.mjs';
|
|
5
|
+
import { partitionExports, UserError, isRedirectedRawConfig, dedent, configFileName, formatConfigSnippet, FatalError, ParseError, parseJSON, APIError, parsePackageJSON, readFileSync as readFileSync$1, parseTOML, modify, applyEdits, format, dist_default, parseJSONC } from './chunk-27EBTAT2.mjs';
|
|
6
|
+
export { APIError, CommandLineArgsError, DeprecationError, ENVIRONMENT_TAG_PREFIX, FatalError, INHERIT_SYMBOL, JSON_CONFIG_FORMATS, JsonFriendlyFatalError, MissingConfigError, PATH_TO_DEPLOY_CONFIG, ParseError, SERVICE_TAG_PREFIX, UserError, configFileName, configFormat, createFatalError, experimental_readRawConfig, findWranglerConfig, formatConfigSnippet, indexLocation, isRedirectedConfig, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, readFileSync, readFileSyncToBuffer, resolveWranglerConfigPath, searchLocation } from './chunk-27EBTAT2.mjs';
|
|
7
|
+
import { isDirectory, removeDirSync } from './chunk-OC543JY3.mjs';
|
|
8
|
+
export { isDirectory, removeDir, removeDirSync } from './chunk-OC543JY3.mjs';
|
|
9
|
+
import { __commonJS, __require, __name, __toESM } from './chunk-DDRU76YD.mjs';
|
|
6
10
|
import fs2, { accessSync, constants, writeFileSync, renameSync, existsSync, unlinkSync, mkdirSync, chmodSync, readFileSync } from 'node:fs';
|
|
7
11
|
import assert from 'node:assert';
|
|
8
|
-
import
|
|
9
|
-
import os, { arch } from 'node:os';
|
|
12
|
+
import path2, { join, dirname, basename, resolve } from 'node:path';
|
|
10
13
|
import { execFileSync, spawn } from 'node:child_process';
|
|
11
14
|
import { createHash } from 'node:crypto';
|
|
15
|
+
import { arch } from 'node:os';
|
|
12
16
|
import { fetch, Headers, FormData, Response } from 'undici';
|
|
13
17
|
import { URLSearchParams } from 'node:url';
|
|
14
18
|
import * as timersPromises from 'node:timers/promises';
|
|
15
19
|
import { setTimeout as setTimeout$1 } from 'node:timers/promises';
|
|
16
20
|
|
|
17
|
-
// ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js
|
|
18
|
-
var require_XDGAppPaths = __commonJS({
|
|
19
|
-
"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js"(exports) {
|
|
20
|
-
exports.__esModule = true;
|
|
21
|
-
exports.Adapt = void 0;
|
|
22
|
-
function isBoolean2(t2) {
|
|
23
|
-
return typeOf(t2) === "boolean";
|
|
24
|
-
}
|
|
25
|
-
__name(isBoolean2, "isBoolean");
|
|
26
|
-
function isObject(t2) {
|
|
27
|
-
return typeOf(t2) === "object";
|
|
28
|
-
}
|
|
29
|
-
__name(isObject, "isObject");
|
|
30
|
-
function isString2(t2) {
|
|
31
|
-
return typeOf(t2) === "string";
|
|
32
|
-
}
|
|
33
|
-
__name(isString2, "isString");
|
|
34
|
-
function typeOf(t2) {
|
|
35
|
-
return typeof t2;
|
|
36
|
-
}
|
|
37
|
-
__name(typeOf, "typeOf");
|
|
38
|
-
function Adapt(adapter_) {
|
|
39
|
-
var meta = adapter_.meta, path5 = adapter_.path, xdg = adapter_.xdg;
|
|
40
|
-
var XDGAppPaths_ = /* @__PURE__ */ function() {
|
|
41
|
-
function XDGAppPaths_2(options_) {
|
|
42
|
-
if (options_ === void 0) {
|
|
43
|
-
options_ = {};
|
|
44
|
-
}
|
|
45
|
-
var _a, _b, _c;
|
|
46
|
-
function XDGAppPaths(options2) {
|
|
47
|
-
if (options2 === void 0) {
|
|
48
|
-
options2 = {};
|
|
49
|
-
}
|
|
50
|
-
return new XDGAppPaths_2(options2);
|
|
51
|
-
}
|
|
52
|
-
__name(XDGAppPaths, "XDGAppPaths");
|
|
53
|
-
var options = isObject(options_) ? options_ : { name: options_ };
|
|
54
|
-
var suffix = (_a = options.suffix) !== null && _a !== void 0 ? _a : "";
|
|
55
|
-
var isolated_ = (_b = options.isolated) !== null && _b !== void 0 ? _b : true;
|
|
56
|
-
var namePriorityList = [
|
|
57
|
-
options.name,
|
|
58
|
-
meta.pkgMainFilename(),
|
|
59
|
-
meta.mainFilename()
|
|
60
|
-
];
|
|
61
|
-
var nameFallback = "$eval";
|
|
62
|
-
var name = path5.parse(((_c = namePriorityList.find(function(e2) {
|
|
63
|
-
return isString2(e2);
|
|
64
|
-
})) !== null && _c !== void 0 ? _c : nameFallback) + suffix).name;
|
|
65
|
-
XDGAppPaths.$name = /* @__PURE__ */ __name(function $name() {
|
|
66
|
-
return name;
|
|
67
|
-
}, "$name");
|
|
68
|
-
XDGAppPaths.$isolated = /* @__PURE__ */ __name(function $isolated() {
|
|
69
|
-
return isolated_;
|
|
70
|
-
}, "$isolated");
|
|
71
|
-
function isIsolated(dirOptions) {
|
|
72
|
-
var _a2;
|
|
73
|
-
dirOptions = dirOptions !== null && dirOptions !== void 0 ? dirOptions : { isolated: isolated_ };
|
|
74
|
-
var isolated = isBoolean2(dirOptions) ? dirOptions : (_a2 = dirOptions.isolated) !== null && _a2 !== void 0 ? _a2 : isolated_;
|
|
75
|
-
return isolated;
|
|
76
|
-
}
|
|
77
|
-
__name(isIsolated, "isIsolated");
|
|
78
|
-
function finalPathSegment(dirOptions) {
|
|
79
|
-
return isIsolated(dirOptions) ? name : "";
|
|
80
|
-
}
|
|
81
|
-
__name(finalPathSegment, "finalPathSegment");
|
|
82
|
-
XDGAppPaths.cache = /* @__PURE__ */ __name(function cache(dirOptions) {
|
|
83
|
-
return path5.join(xdg.cache(), finalPathSegment(dirOptions));
|
|
84
|
-
}, "cache");
|
|
85
|
-
XDGAppPaths.config = /* @__PURE__ */ __name(function config(dirOptions) {
|
|
86
|
-
return path5.join(xdg.config(), finalPathSegment(dirOptions));
|
|
87
|
-
}, "config");
|
|
88
|
-
XDGAppPaths.data = /* @__PURE__ */ __name(function data(dirOptions) {
|
|
89
|
-
return path5.join(xdg.data(), finalPathSegment(dirOptions));
|
|
90
|
-
}, "data");
|
|
91
|
-
XDGAppPaths.runtime = /* @__PURE__ */ __name(function runtime(dirOptions) {
|
|
92
|
-
return xdg.runtime() ? path5.join(xdg.runtime(), finalPathSegment(dirOptions)) : void 0;
|
|
93
|
-
}, "runtime");
|
|
94
|
-
XDGAppPaths.state = /* @__PURE__ */ __name(function state(dirOptions) {
|
|
95
|
-
return path5.join(xdg.state(), finalPathSegment(dirOptions));
|
|
96
|
-
}, "state");
|
|
97
|
-
XDGAppPaths.configDirs = /* @__PURE__ */ __name(function configDirs(dirOptions) {
|
|
98
|
-
return xdg.configDirs().map(function(s) {
|
|
99
|
-
return path5.join(s, finalPathSegment(dirOptions));
|
|
100
|
-
});
|
|
101
|
-
}, "configDirs");
|
|
102
|
-
XDGAppPaths.dataDirs = /* @__PURE__ */ __name(function dataDirs(dirOptions) {
|
|
103
|
-
return xdg.dataDirs().map(function(s) {
|
|
104
|
-
return path5.join(s, finalPathSegment(dirOptions));
|
|
105
|
-
});
|
|
106
|
-
}, "dataDirs");
|
|
107
|
-
return XDGAppPaths;
|
|
108
|
-
}
|
|
109
|
-
__name(XDGAppPaths_2, "XDGAppPaths_");
|
|
110
|
-
return XDGAppPaths_2;
|
|
111
|
-
}();
|
|
112
|
-
return { XDGAppPaths: new XDGAppPaths_() };
|
|
113
|
-
}
|
|
114
|
-
__name(Adapt, "Adapt");
|
|
115
|
-
exports.Adapt = Adapt;
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
// ../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/lib/XDG.js
|
|
120
|
-
var require_XDG = __commonJS({
|
|
121
|
-
"../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/lib/XDG.js"(exports) {
|
|
122
|
-
var __spreadArray = exports && exports.__spreadArray || function(to, from) {
|
|
123
|
-
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
124
|
-
to[j] = from[i];
|
|
125
|
-
return to;
|
|
126
|
-
};
|
|
127
|
-
exports.__esModule = true;
|
|
128
|
-
exports.Adapt = void 0;
|
|
129
|
-
function Adapt(adapter_) {
|
|
130
|
-
var env = adapter_.env, osPaths = adapter_.osPaths, path5 = adapter_.path;
|
|
131
|
-
var isMacOS = /^darwin$/i.test(adapter_.process.platform);
|
|
132
|
-
var isWinOS = /^win/i.test(adapter_.process.platform);
|
|
133
|
-
function baseDir() {
|
|
134
|
-
return osPaths.home() || osPaths.temp();
|
|
135
|
-
}
|
|
136
|
-
__name(baseDir, "baseDir");
|
|
137
|
-
function valOrPath(val, pathSegments) {
|
|
138
|
-
return val || path5.join.apply(path5, pathSegments);
|
|
139
|
-
}
|
|
140
|
-
__name(valOrPath, "valOrPath");
|
|
141
|
-
var linux = /* @__PURE__ */ __name(function() {
|
|
142
|
-
var cache = /* @__PURE__ */ __name(function() {
|
|
143
|
-
return valOrPath(env.get("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
|
|
144
|
-
}, "cache");
|
|
145
|
-
var config = /* @__PURE__ */ __name(function() {
|
|
146
|
-
return valOrPath(env.get("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
|
|
147
|
-
}, "config");
|
|
148
|
-
var data = /* @__PURE__ */ __name(function() {
|
|
149
|
-
return valOrPath(env.get("XDG_DATA_HOME"), [baseDir(), ".local", "share"]);
|
|
150
|
-
}, "data");
|
|
151
|
-
var runtime = /* @__PURE__ */ __name(function() {
|
|
152
|
-
return env.get("XDG_RUNTIME_DIR") || void 0;
|
|
153
|
-
}, "runtime");
|
|
154
|
-
var state = /* @__PURE__ */ __name(function() {
|
|
155
|
-
return valOrPath(env.get("XDG_STATE_HOME"), [baseDir(), ".local", "state"]);
|
|
156
|
-
}, "state");
|
|
157
|
-
return { cache, config, data, runtime, state };
|
|
158
|
-
}, "linux");
|
|
159
|
-
var macos = /* @__PURE__ */ __name(function() {
|
|
160
|
-
var cache = /* @__PURE__ */ __name(function() {
|
|
161
|
-
return valOrPath(env.get("XDG_CACHE_HOME"), [baseDir(), "Library", "Caches"]);
|
|
162
|
-
}, "cache");
|
|
163
|
-
var config = /* @__PURE__ */ __name(function() {
|
|
164
|
-
return valOrPath(env.get("XDG_CONFIG_HOME"), [baseDir(), "Library", "Preferences"]);
|
|
165
|
-
}, "config");
|
|
166
|
-
var data = /* @__PURE__ */ __name(function() {
|
|
167
|
-
return valOrPath(env.get("XDG_DATA_HOME"), [baseDir(), "Library", "Application Support"]);
|
|
168
|
-
}, "data");
|
|
169
|
-
var runtime = /* @__PURE__ */ __name(function() {
|
|
170
|
-
return env.get("XDG_RUNTIME_DIR") || void 0;
|
|
171
|
-
}, "runtime");
|
|
172
|
-
var state = /* @__PURE__ */ __name(function() {
|
|
173
|
-
return valOrPath(env.get("XDG_STATE_HOME"), [baseDir(), "Library", "State"]);
|
|
174
|
-
}, "state");
|
|
175
|
-
return { cache, config, data, runtime, state };
|
|
176
|
-
}, "macos");
|
|
177
|
-
var windows = /* @__PURE__ */ __name(function() {
|
|
178
|
-
function appData() {
|
|
179
|
-
return valOrPath(env.get("APPDATA"), [baseDir(), "AppData", "Roaming"]);
|
|
180
|
-
}
|
|
181
|
-
__name(appData, "appData");
|
|
182
|
-
function localAppData() {
|
|
183
|
-
return valOrPath(env.get("LOCALAPPDATA"), [baseDir(), "AppData", "Local"]);
|
|
184
|
-
}
|
|
185
|
-
__name(localAppData, "localAppData");
|
|
186
|
-
var cache = /* @__PURE__ */ __name(function() {
|
|
187
|
-
return valOrPath(env.get("XDG_CACHE_HOME"), [localAppData(), "xdg.cache"]);
|
|
188
|
-
}, "cache");
|
|
189
|
-
var config = /* @__PURE__ */ __name(function() {
|
|
190
|
-
return valOrPath(env.get("XDG_CONFIG_HOME"), [appData(), "xdg.config"]);
|
|
191
|
-
}, "config");
|
|
192
|
-
var data = /* @__PURE__ */ __name(function() {
|
|
193
|
-
return valOrPath(env.get("XDG_DATA_HOME"), [appData(), "xdg.data"]);
|
|
194
|
-
}, "data");
|
|
195
|
-
var runtime = /* @__PURE__ */ __name(function() {
|
|
196
|
-
return env.get("XDG_RUNTIME_DIR") || void 0;
|
|
197
|
-
}, "runtime");
|
|
198
|
-
var state = /* @__PURE__ */ __name(function() {
|
|
199
|
-
return valOrPath(env.get("XDG_STATE_HOME"), [localAppData(), "xdg.state"]);
|
|
200
|
-
}, "state");
|
|
201
|
-
return { cache, config, data, runtime, state };
|
|
202
|
-
}, "windows");
|
|
203
|
-
var XDG_ = /* @__PURE__ */ function() {
|
|
204
|
-
function XDG_2() {
|
|
205
|
-
function XDG() {
|
|
206
|
-
return new XDG_2();
|
|
207
|
-
}
|
|
208
|
-
__name(XDG, "XDG");
|
|
209
|
-
var extension = isMacOS ? macos() : isWinOS ? windows() : linux();
|
|
210
|
-
XDG.cache = extension.cache;
|
|
211
|
-
XDG.config = extension.config;
|
|
212
|
-
XDG.data = extension.data;
|
|
213
|
-
XDG.runtime = extension.runtime;
|
|
214
|
-
XDG.state = extension.state;
|
|
215
|
-
XDG.configDirs = /* @__PURE__ */ __name(function configDirs() {
|
|
216
|
-
var pathList = env.get("XDG_CONFIG_DIRS");
|
|
217
|
-
return __spreadArray([extension.config()], pathList ? pathList.split(path5.delimiter) : []);
|
|
218
|
-
}, "configDirs");
|
|
219
|
-
XDG.dataDirs = /* @__PURE__ */ __name(function dataDirs() {
|
|
220
|
-
var pathList = env.get("XDG_DATA_DIRS");
|
|
221
|
-
return __spreadArray([extension.data()], pathList ? pathList.split(path5.delimiter) : []);
|
|
222
|
-
}, "dataDirs");
|
|
223
|
-
return XDG;
|
|
224
|
-
}
|
|
225
|
-
__name(XDG_2, "XDG_");
|
|
226
|
-
return XDG_2;
|
|
227
|
-
}();
|
|
228
|
-
return { XDG: new XDG_() };
|
|
229
|
-
}
|
|
230
|
-
__name(Adapt, "Adapt");
|
|
231
|
-
exports.Adapt = Adapt;
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
// ../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/lib/OSPaths.js
|
|
236
|
-
var require_OSPaths = __commonJS({
|
|
237
|
-
"../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/lib/OSPaths.js"(exports) {
|
|
238
|
-
var __spreadArray = exports && exports.__spreadArray || function(to, from) {
|
|
239
|
-
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
240
|
-
to[j] = from[i];
|
|
241
|
-
return to;
|
|
242
|
-
};
|
|
243
|
-
exports.__esModule = true;
|
|
244
|
-
exports.Adapt = void 0;
|
|
245
|
-
function isEmpty(s) {
|
|
246
|
-
return !s;
|
|
247
|
-
}
|
|
248
|
-
__name(isEmpty, "isEmpty");
|
|
249
|
-
function Adapt(adapter_) {
|
|
250
|
-
var env = adapter_.env, os2 = adapter_.os, path5 = adapter_.path;
|
|
251
|
-
var isWinOS = /^win/i.test(adapter_.process.platform);
|
|
252
|
-
function normalizePath(path_) {
|
|
253
|
-
return path_ ? adapter_.path.normalize(adapter_.path.join(path_, ".")) : void 0;
|
|
254
|
-
}
|
|
255
|
-
__name(normalizePath, "normalizePath");
|
|
256
|
-
function home() {
|
|
257
|
-
var posix = /* @__PURE__ */ __name(function() {
|
|
258
|
-
return normalizePath((typeof os2.homedir === "function" ? os2.homedir() : void 0) || env.get("HOME"));
|
|
259
|
-
}, "posix");
|
|
260
|
-
var windows = /* @__PURE__ */ __name(function() {
|
|
261
|
-
var priorityList = [
|
|
262
|
-
typeof os2.homedir === "function" ? os2.homedir() : void 0,
|
|
263
|
-
env.get("USERPROFILE"),
|
|
264
|
-
env.get("HOME"),
|
|
265
|
-
env.get("HOMEDRIVE") || env.get("HOMEPATH") ? path5.join(env.get("HOMEDRIVE") || "", env.get("HOMEPATH") || "") : void 0
|
|
266
|
-
];
|
|
267
|
-
return normalizePath(priorityList.find(function(v) {
|
|
268
|
-
return !isEmpty(v);
|
|
269
|
-
}));
|
|
270
|
-
}, "windows");
|
|
271
|
-
return isWinOS ? windows() : posix();
|
|
272
|
-
}
|
|
273
|
-
__name(home, "home");
|
|
274
|
-
function temp() {
|
|
275
|
-
function joinPathToBase(base, segments) {
|
|
276
|
-
return base ? path5.join.apply(path5, __spreadArray([base], segments)) : void 0;
|
|
277
|
-
}
|
|
278
|
-
__name(joinPathToBase, "joinPathToBase");
|
|
279
|
-
function posix() {
|
|
280
|
-
var fallback = "/tmp";
|
|
281
|
-
var priorityList = [
|
|
282
|
-
typeof os2.tmpdir === "function" ? os2.tmpdir() : void 0,
|
|
283
|
-
env.get("TMPDIR"),
|
|
284
|
-
env.get("TEMP"),
|
|
285
|
-
env.get("TMP")
|
|
286
|
-
];
|
|
287
|
-
return normalizePath(priorityList.find(function(v) {
|
|
288
|
-
return !isEmpty(v);
|
|
289
|
-
})) || fallback;
|
|
290
|
-
}
|
|
291
|
-
__name(posix, "posix");
|
|
292
|
-
function windows() {
|
|
293
|
-
var fallback = "C:\\Temp";
|
|
294
|
-
var priorityListLazy = [
|
|
295
|
-
typeof os2.tmpdir === "function" ? os2.tmpdir : function() {
|
|
296
|
-
return void 0;
|
|
297
|
-
},
|
|
298
|
-
function() {
|
|
299
|
-
return env.get("TEMP");
|
|
300
|
-
},
|
|
301
|
-
function() {
|
|
302
|
-
return env.get("TMP");
|
|
303
|
-
},
|
|
304
|
-
function() {
|
|
305
|
-
return joinPathToBase(env.get("LOCALAPPDATA"), ["Temp"]);
|
|
306
|
-
},
|
|
307
|
-
function() {
|
|
308
|
-
return joinPathToBase(home(), ["AppData", "Local", "Temp"]);
|
|
309
|
-
},
|
|
310
|
-
function() {
|
|
311
|
-
return joinPathToBase(env.get("ALLUSERSPROFILE"), ["Temp"]);
|
|
312
|
-
},
|
|
313
|
-
function() {
|
|
314
|
-
return joinPathToBase(env.get("SystemRoot"), ["Temp"]);
|
|
315
|
-
},
|
|
316
|
-
function() {
|
|
317
|
-
return joinPathToBase(env.get("windir"), ["Temp"]);
|
|
318
|
-
},
|
|
319
|
-
function() {
|
|
320
|
-
return joinPathToBase(env.get("SystemDrive"), ["\\", "Temp"]);
|
|
321
|
-
}
|
|
322
|
-
];
|
|
323
|
-
var v = priorityListLazy.find(function(v2) {
|
|
324
|
-
return v2 && !isEmpty(v2());
|
|
325
|
-
});
|
|
326
|
-
return v && normalizePath(v()) || fallback;
|
|
327
|
-
}
|
|
328
|
-
__name(windows, "windows");
|
|
329
|
-
return isWinOS ? windows() : posix();
|
|
330
|
-
}
|
|
331
|
-
__name(temp, "temp");
|
|
332
|
-
var OSPaths_ = /* @__PURE__ */ function() {
|
|
333
|
-
function OSPaths_2() {
|
|
334
|
-
function OSPaths() {
|
|
335
|
-
return new OSPaths_2();
|
|
336
|
-
}
|
|
337
|
-
__name(OSPaths, "OSPaths");
|
|
338
|
-
OSPaths.home = home;
|
|
339
|
-
OSPaths.temp = temp;
|
|
340
|
-
return OSPaths;
|
|
341
|
-
}
|
|
342
|
-
__name(OSPaths_2, "OSPaths_");
|
|
343
|
-
return OSPaths_2;
|
|
344
|
-
}();
|
|
345
|
-
return { OSPaths: new OSPaths_() };
|
|
346
|
-
}
|
|
347
|
-
__name(Adapt, "Adapt");
|
|
348
|
-
exports.Adapt = Adapt;
|
|
349
|
-
}
|
|
350
|
-
});
|
|
351
|
-
|
|
352
|
-
// ../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/platform-adapters/node.js
|
|
353
|
-
var require_node = __commonJS({
|
|
354
|
-
"../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/platform-adapters/node.js"(exports) {
|
|
355
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
356
|
-
if (k2 === void 0) k2 = k;
|
|
357
|
-
Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
358
|
-
return m[k];
|
|
359
|
-
}, "get") });
|
|
360
|
-
} : function(o, m, k, k2) {
|
|
361
|
-
if (k2 === void 0) k2 = k;
|
|
362
|
-
o[k2] = m[k];
|
|
363
|
-
});
|
|
364
|
-
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
365
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
366
|
-
} : function(o, v) {
|
|
367
|
-
o["default"] = v;
|
|
368
|
-
});
|
|
369
|
-
var __importStar = exports && exports.__importStar || function(mod) {
|
|
370
|
-
if (mod && mod.__esModule) return mod;
|
|
371
|
-
var result = {};
|
|
372
|
-
if (mod != null) {
|
|
373
|
-
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
374
|
-
}
|
|
375
|
-
__setModuleDefault(result, mod);
|
|
376
|
-
return result;
|
|
377
|
-
};
|
|
378
|
-
exports.__esModule = true;
|
|
379
|
-
exports.adapter = void 0;
|
|
380
|
-
var os2 = __importStar(__require("os"));
|
|
381
|
-
var path5 = __importStar(__require("path"));
|
|
382
|
-
exports.adapter = {
|
|
383
|
-
atImportPermissions: { env: true },
|
|
384
|
-
env: {
|
|
385
|
-
get: /* @__PURE__ */ __name(function(s) {
|
|
386
|
-
return process.env[s];
|
|
387
|
-
}, "get")
|
|
388
|
-
},
|
|
389
|
-
os: os2,
|
|
390
|
-
path: path5,
|
|
391
|
-
process
|
|
392
|
-
};
|
|
393
|
-
}
|
|
394
|
-
});
|
|
395
|
-
|
|
396
|
-
// ../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/mod.cjs.js
|
|
397
|
-
var require_mod_cjs = __commonJS({
|
|
398
|
-
"../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/mod.cjs.js"(exports, module) {
|
|
399
|
-
var OSPaths_js_1 = require_OSPaths();
|
|
400
|
-
var node_js_1 = require_node();
|
|
401
|
-
module.exports = OSPaths_js_1.Adapt(node_js_1.adapter).OSPaths;
|
|
402
|
-
}
|
|
403
|
-
});
|
|
404
|
-
|
|
405
|
-
// ../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js
|
|
406
|
-
var require_node2 = __commonJS({
|
|
407
|
-
"../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js"(exports) {
|
|
408
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
409
|
-
if (k2 === void 0) k2 = k;
|
|
410
|
-
Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
411
|
-
return m[k];
|
|
412
|
-
}, "get") });
|
|
413
|
-
} : function(o, m, k, k2) {
|
|
414
|
-
if (k2 === void 0) k2 = k;
|
|
415
|
-
o[k2] = m[k];
|
|
416
|
-
});
|
|
417
|
-
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
418
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
419
|
-
} : function(o, v) {
|
|
420
|
-
o["default"] = v;
|
|
421
|
-
});
|
|
422
|
-
var __importStar = exports && exports.__importStar || function(mod) {
|
|
423
|
-
if (mod && mod.__esModule) return mod;
|
|
424
|
-
var result = {};
|
|
425
|
-
if (mod != null) {
|
|
426
|
-
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
427
|
-
}
|
|
428
|
-
__setModuleDefault(result, mod);
|
|
429
|
-
return result;
|
|
430
|
-
};
|
|
431
|
-
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
432
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
433
|
-
};
|
|
434
|
-
exports.__esModule = true;
|
|
435
|
-
exports.adapter = void 0;
|
|
436
|
-
var path5 = __importStar(__require("path"));
|
|
437
|
-
var os_paths_1 = __importDefault(require_mod_cjs());
|
|
438
|
-
exports.adapter = {
|
|
439
|
-
atImportPermissions: { env: true },
|
|
440
|
-
env: {
|
|
441
|
-
get: /* @__PURE__ */ __name(function(s) {
|
|
442
|
-
return process.env[s];
|
|
443
|
-
}, "get")
|
|
444
|
-
},
|
|
445
|
-
osPaths: os_paths_1["default"],
|
|
446
|
-
path: path5,
|
|
447
|
-
process
|
|
448
|
-
};
|
|
449
|
-
}
|
|
450
|
-
});
|
|
451
|
-
|
|
452
|
-
// ../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/mod.cjs.js
|
|
453
|
-
var require_mod_cjs2 = __commonJS({
|
|
454
|
-
"../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/mod.cjs.js"(exports, module) {
|
|
455
|
-
var XDG_js_1 = require_XDG();
|
|
456
|
-
var node_js_1 = require_node2();
|
|
457
|
-
module.exports = XDG_js_1.Adapt(node_js_1.adapter).XDG;
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
|
-
|
|
461
|
-
// ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js
|
|
462
|
-
var require_node3 = __commonJS({
|
|
463
|
-
"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js"(exports) {
|
|
464
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
465
|
-
if (k2 === void 0) k2 = k;
|
|
466
|
-
Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
467
|
-
return m[k];
|
|
468
|
-
}, "get") });
|
|
469
|
-
} : function(o, m, k, k2) {
|
|
470
|
-
if (k2 === void 0) k2 = k;
|
|
471
|
-
o[k2] = m[k];
|
|
472
|
-
});
|
|
473
|
-
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
474
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
475
|
-
} : function(o, v) {
|
|
476
|
-
o["default"] = v;
|
|
477
|
-
});
|
|
478
|
-
var __importStar = exports && exports.__importStar || function(mod) {
|
|
479
|
-
if (mod && mod.__esModule) return mod;
|
|
480
|
-
var result = {};
|
|
481
|
-
if (mod != null) {
|
|
482
|
-
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
483
|
-
}
|
|
484
|
-
__setModuleDefault(result, mod);
|
|
485
|
-
return result;
|
|
486
|
-
};
|
|
487
|
-
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
488
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
489
|
-
};
|
|
490
|
-
exports.__esModule = true;
|
|
491
|
-
exports.adapter = void 0;
|
|
492
|
-
var path5 = __importStar(__require("path"));
|
|
493
|
-
var xdg_portable_1 = __importDefault(require_mod_cjs2());
|
|
494
|
-
exports.adapter = {
|
|
495
|
-
atImportPermissions: { env: true, read: true },
|
|
496
|
-
meta: {
|
|
497
|
-
mainFilename: /* @__PURE__ */ __name(function() {
|
|
498
|
-
var requireMain = typeof __require !== "undefined" && __require !== null && __require.main ? __require.main : { filename: void 0 };
|
|
499
|
-
var requireMainFilename = requireMain.filename;
|
|
500
|
-
var filename = (requireMainFilename !== process.execArgv[0] ? requireMainFilename : void 0) || (typeof process._eval === "undefined" ? process.argv[1] : void 0);
|
|
501
|
-
return filename;
|
|
502
|
-
}, "mainFilename"),
|
|
503
|
-
pkgMainFilename: /* @__PURE__ */ __name(function() {
|
|
504
|
-
return process.pkg ? process.execPath : void 0;
|
|
505
|
-
}, "pkgMainFilename")
|
|
506
|
-
},
|
|
507
|
-
path: path5,
|
|
508
|
-
process,
|
|
509
|
-
xdg: xdg_portable_1["default"]
|
|
510
|
-
};
|
|
511
|
-
}
|
|
512
|
-
});
|
|
513
|
-
|
|
514
|
-
// ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js
|
|
515
|
-
var require_mod_cjs3 = __commonJS({
|
|
516
|
-
"../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js"(exports, module) {
|
|
517
|
-
var XDGAppPaths_js_1 = require_XDGAppPaths();
|
|
518
|
-
var node_js_1 = require_node3();
|
|
519
|
-
module.exports = XDGAppPaths_js_1.Adapt(node_js_1.adapter).XDGAppPaths;
|
|
520
|
-
}
|
|
521
|
-
});
|
|
522
|
-
|
|
523
|
-
// ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js
|
|
524
|
-
var require_signals = __commonJS({
|
|
525
|
-
"../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports, module) {
|
|
526
|
-
module.exports = [
|
|
527
|
-
"SIGABRT",
|
|
528
|
-
"SIGALRM",
|
|
529
|
-
"SIGHUP",
|
|
530
|
-
"SIGINT",
|
|
531
|
-
"SIGTERM"
|
|
532
|
-
];
|
|
533
|
-
if (process.platform !== "win32") {
|
|
534
|
-
module.exports.push(
|
|
535
|
-
"SIGVTALRM",
|
|
536
|
-
"SIGXCPU",
|
|
537
|
-
"SIGXFSZ",
|
|
538
|
-
"SIGUSR2",
|
|
539
|
-
"SIGTRAP",
|
|
540
|
-
"SIGSYS",
|
|
541
|
-
"SIGQUIT",
|
|
542
|
-
"SIGIOT"
|
|
543
|
-
// should detect profiler and enable/disable accordingly.
|
|
544
|
-
// see #21
|
|
545
|
-
// 'SIGPROF'
|
|
546
|
-
);
|
|
547
|
-
}
|
|
548
|
-
if (process.platform === "linux") {
|
|
549
|
-
module.exports.push(
|
|
550
|
-
"SIGIO",
|
|
551
|
-
"SIGPOLL",
|
|
552
|
-
"SIGPWR",
|
|
553
|
-
"SIGSTKFLT",
|
|
554
|
-
"SIGUNUSED"
|
|
555
|
-
);
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
});
|
|
559
|
-
|
|
560
|
-
// ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
|
|
561
|
-
var require_signal_exit = __commonJS({
|
|
562
|
-
"../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module) {
|
|
563
|
-
var process2 = global.process;
|
|
564
|
-
var processOk = /* @__PURE__ */ __name(function(process3) {
|
|
565
|
-
return process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
|
|
566
|
-
}, "processOk");
|
|
567
|
-
if (!processOk(process2)) {
|
|
568
|
-
module.exports = function() {
|
|
569
|
-
return function() {
|
|
570
|
-
};
|
|
571
|
-
};
|
|
572
|
-
} else {
|
|
573
|
-
assert3 = __require("assert");
|
|
574
|
-
signals = require_signals();
|
|
575
|
-
isWin = /^win/i.test(process2.platform);
|
|
576
|
-
EE = __require("events");
|
|
577
|
-
if (typeof EE !== "function") {
|
|
578
|
-
EE = EE.EventEmitter;
|
|
579
|
-
}
|
|
580
|
-
if (process2.__signal_exit_emitter__) {
|
|
581
|
-
emitter = process2.__signal_exit_emitter__;
|
|
582
|
-
} else {
|
|
583
|
-
emitter = process2.__signal_exit_emitter__ = new EE();
|
|
584
|
-
emitter.count = 0;
|
|
585
|
-
emitter.emitted = {};
|
|
586
|
-
}
|
|
587
|
-
if (!emitter.infinite) {
|
|
588
|
-
emitter.setMaxListeners(Infinity);
|
|
589
|
-
emitter.infinite = true;
|
|
590
|
-
}
|
|
591
|
-
module.exports = function(cb, opts) {
|
|
592
|
-
if (!processOk(global.process)) {
|
|
593
|
-
return function() {
|
|
594
|
-
};
|
|
595
|
-
}
|
|
596
|
-
assert3.equal(typeof cb, "function", "a callback must be provided for exit handler");
|
|
597
|
-
if (loaded === false) {
|
|
598
|
-
load();
|
|
599
|
-
}
|
|
600
|
-
var ev = "exit";
|
|
601
|
-
if (opts && opts.alwaysLast) {
|
|
602
|
-
ev = "afterexit";
|
|
603
|
-
}
|
|
604
|
-
var remove = /* @__PURE__ */ __name(function() {
|
|
605
|
-
emitter.removeListener(ev, cb);
|
|
606
|
-
if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
|
|
607
|
-
unload();
|
|
608
|
-
}
|
|
609
|
-
}, "remove");
|
|
610
|
-
emitter.on(ev, cb);
|
|
611
|
-
return remove;
|
|
612
|
-
};
|
|
613
|
-
unload = /* @__PURE__ */ __name(function unload2() {
|
|
614
|
-
if (!loaded || !processOk(global.process)) {
|
|
615
|
-
return;
|
|
616
|
-
}
|
|
617
|
-
loaded = false;
|
|
618
|
-
signals.forEach(function(sig) {
|
|
619
|
-
try {
|
|
620
|
-
process2.removeListener(sig, sigListeners[sig]);
|
|
621
|
-
} catch (er) {
|
|
622
|
-
}
|
|
623
|
-
});
|
|
624
|
-
process2.emit = originalProcessEmit;
|
|
625
|
-
process2.reallyExit = originalProcessReallyExit;
|
|
626
|
-
emitter.count -= 1;
|
|
627
|
-
}, "unload");
|
|
628
|
-
module.exports.unload = unload;
|
|
629
|
-
emit = /* @__PURE__ */ __name(function emit2(event, code, signal) {
|
|
630
|
-
if (emitter.emitted[event]) {
|
|
631
|
-
return;
|
|
632
|
-
}
|
|
633
|
-
emitter.emitted[event] = true;
|
|
634
|
-
emitter.emit(event, code, signal);
|
|
635
|
-
}, "emit");
|
|
636
|
-
sigListeners = {};
|
|
637
|
-
signals.forEach(function(sig) {
|
|
638
|
-
sigListeners[sig] = /* @__PURE__ */ __name(function listener() {
|
|
639
|
-
if (!processOk(global.process)) {
|
|
640
|
-
return;
|
|
641
|
-
}
|
|
642
|
-
var listeners = process2.listeners(sig);
|
|
643
|
-
if (listeners.length === emitter.count) {
|
|
644
|
-
unload();
|
|
645
|
-
emit("exit", null, sig);
|
|
646
|
-
emit("afterexit", null, sig);
|
|
647
|
-
if (isWin && sig === "SIGHUP") {
|
|
648
|
-
sig = "SIGINT";
|
|
649
|
-
}
|
|
650
|
-
process2.kill(process2.pid, sig);
|
|
651
|
-
}
|
|
652
|
-
}, "listener");
|
|
653
|
-
});
|
|
654
|
-
module.exports.signals = function() {
|
|
655
|
-
return signals;
|
|
656
|
-
};
|
|
657
|
-
loaded = false;
|
|
658
|
-
load = /* @__PURE__ */ __name(function load2() {
|
|
659
|
-
if (loaded || !processOk(global.process)) {
|
|
660
|
-
return;
|
|
661
|
-
}
|
|
662
|
-
loaded = true;
|
|
663
|
-
emitter.count += 1;
|
|
664
|
-
signals = signals.filter(function(sig) {
|
|
665
|
-
try {
|
|
666
|
-
process2.on(sig, sigListeners[sig]);
|
|
667
|
-
return true;
|
|
668
|
-
} catch (er) {
|
|
669
|
-
return false;
|
|
670
|
-
}
|
|
671
|
-
});
|
|
672
|
-
process2.emit = processEmit;
|
|
673
|
-
process2.reallyExit = processReallyExit;
|
|
674
|
-
}, "load");
|
|
675
|
-
module.exports.load = load;
|
|
676
|
-
originalProcessReallyExit = process2.reallyExit;
|
|
677
|
-
processReallyExit = /* @__PURE__ */ __name(function processReallyExit2(code) {
|
|
678
|
-
if (!processOk(global.process)) {
|
|
679
|
-
return;
|
|
680
|
-
}
|
|
681
|
-
process2.exitCode = code || /* istanbul ignore next */
|
|
682
|
-
0;
|
|
683
|
-
emit("exit", process2.exitCode, null);
|
|
684
|
-
emit("afterexit", process2.exitCode, null);
|
|
685
|
-
originalProcessReallyExit.call(process2, process2.exitCode);
|
|
686
|
-
}, "processReallyExit");
|
|
687
|
-
originalProcessEmit = process2.emit;
|
|
688
|
-
processEmit = /* @__PURE__ */ __name(function processEmit2(ev, arg) {
|
|
689
|
-
if (ev === "exit" && processOk(global.process)) {
|
|
690
|
-
if (arg !== void 0) {
|
|
691
|
-
process2.exitCode = arg;
|
|
692
|
-
}
|
|
693
|
-
var ret = originalProcessEmit.apply(this, arguments);
|
|
694
|
-
emit("exit", process2.exitCode, null);
|
|
695
|
-
emit("afterexit", process2.exitCode, null);
|
|
696
|
-
return ret;
|
|
697
|
-
} else {
|
|
698
|
-
return originalProcessEmit.apply(this, arguments);
|
|
699
|
-
}
|
|
700
|
-
}, "processEmit");
|
|
701
|
-
}
|
|
702
|
-
var assert3;
|
|
703
|
-
var signals;
|
|
704
|
-
var isWin;
|
|
705
|
-
var EE;
|
|
706
|
-
var emitter;
|
|
707
|
-
var unload;
|
|
708
|
-
var emit;
|
|
709
|
-
var sigListeners;
|
|
710
|
-
var loaded;
|
|
711
|
-
var load;
|
|
712
|
-
var originalProcessReallyExit;
|
|
713
|
-
var processReallyExit;
|
|
714
|
-
var originalProcessEmit;
|
|
715
|
-
var processEmit;
|
|
716
|
-
}
|
|
717
|
-
});
|
|
718
|
-
|
|
719
21
|
// ../../node_modules/.pnpm/command-exists@1.2.9/node_modules/command-exists/lib/command-exists.js
|
|
720
22
|
var require_command_exists = __commonJS({
|
|
721
23
|
"../../node_modules/.pnpm/command-exists@1.2.9/node_modules/command-exists/lib/command-exists.js"(exports, module) {
|
|
722
24
|
var exec = __require("child_process").exec;
|
|
723
25
|
var execSync = __require("child_process").execSync;
|
|
724
26
|
var fs3 = __require("fs");
|
|
725
|
-
var
|
|
27
|
+
var path4 = __require("path");
|
|
726
28
|
var access = fs3.access;
|
|
727
29
|
var accessSync2 = fs3.accessSync;
|
|
728
30
|
var constants2 = fs3.constants || fs3;
|
|
@@ -826,8 +128,8 @@ var require_command_exists = __commonJS({
|
|
|
826
128
|
cleanInput = /* @__PURE__ */ __name(function(s) {
|
|
827
129
|
var isPathName = /[\\]/.test(s);
|
|
828
130
|
if (isPathName) {
|
|
829
|
-
var dirname2 = '"' +
|
|
830
|
-
var basename2 = '"' +
|
|
131
|
+
var dirname2 = '"' + path4.dirname(s) + '"';
|
|
132
|
+
var basename2 = '"' + path4.basename(s) + '"';
|
|
831
133
|
return dirname2 + ":" + basename2;
|
|
832
134
|
}
|
|
833
135
|
return '"' + s + '"';
|
|
@@ -891,7 +193,7 @@ var require_ini = __commonJS({
|
|
|
891
193
|
opt.whitespace = opt.whitespace === true;
|
|
892
194
|
}
|
|
893
195
|
var separator = opt.whitespace ? " = " : "=";
|
|
894
|
-
Object.keys(obj).forEach(function(k,
|
|
196
|
+
Object.keys(obj).forEach(function(k, _, __) {
|
|
895
197
|
var val = obj[k];
|
|
896
198
|
if (val && Array.isArray(val)) {
|
|
897
199
|
val.forEach(function(item) {
|
|
@@ -904,7 +206,7 @@ var require_ini = __commonJS({
|
|
|
904
206
|
});
|
|
905
207
|
if (opt.section && out.length)
|
|
906
208
|
out = "[" + safe(opt.section) + "]" + eol + out;
|
|
907
|
-
children.forEach(function(k,
|
|
209
|
+
children.forEach(function(k, _, __) {
|
|
908
210
|
var nk = dotSplit(k).join("\\.");
|
|
909
211
|
var section = (opt.section ? opt.section + "." : "") + nk;
|
|
910
212
|
var child = encode(obj[k], {
|
|
@@ -930,7 +232,7 @@ var require_ini = __commonJS({
|
|
|
930
232
|
var section = null;
|
|
931
233
|
var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;
|
|
932
234
|
var lines = str.split(/[\r\n]+/g);
|
|
933
|
-
lines.forEach(function(line,
|
|
235
|
+
lines.forEach(function(line, _, __) {
|
|
934
236
|
if (!line || line.match(/^\s*[;#]/))
|
|
935
237
|
return;
|
|
936
238
|
var match = line.match(re);
|
|
@@ -969,14 +271,14 @@ var require_ini = __commonJS({
|
|
|
969
271
|
else
|
|
970
272
|
p[key] = value;
|
|
971
273
|
});
|
|
972
|
-
Object.keys(out).filter(function(k,
|
|
274
|
+
Object.keys(out).filter(function(k, _, __) {
|
|
973
275
|
if (!out[k] || typeof out[k] !== "object" || Array.isArray(out[k]))
|
|
974
276
|
return false;
|
|
975
277
|
var parts = dotSplit(k);
|
|
976
278
|
var p2 = out;
|
|
977
279
|
var l = parts.pop();
|
|
978
280
|
var nl = l.replace(/\\\./g, ".");
|
|
979
|
-
parts.forEach(function(part,
|
|
281
|
+
parts.forEach(function(part, _2, __2) {
|
|
980
282
|
if (part === "__proto__")
|
|
981
283
|
return;
|
|
982
284
|
if (!p2[part] || typeof p2[part] !== "object")
|
|
@@ -987,7 +289,7 @@ var require_ini = __commonJS({
|
|
|
987
289
|
return false;
|
|
988
290
|
p2[nl] = out[k];
|
|
989
291
|
return true;
|
|
990
|
-
}).forEach(function(del,
|
|
292
|
+
}).forEach(function(del, _, __) {
|
|
991
293
|
delete out[del];
|
|
992
294
|
});
|
|
993
295
|
return out;
|
|
@@ -1008,7 +310,7 @@ var require_ini = __commonJS({
|
|
|
1008
310
|
val = val.substr(1, val.length - 2);
|
|
1009
311
|
try {
|
|
1010
312
|
val = JSON.parse(val);
|
|
1011
|
-
} catch (
|
|
313
|
+
} catch (_) {
|
|
1012
314
|
}
|
|
1013
315
|
} else {
|
|
1014
316
|
var esc = false;
|
|
@@ -1111,7 +413,7 @@ var require_utils = __commonJS({
|
|
|
1111
413
|
"../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/lib/utils.js"(exports) {
|
|
1112
414
|
var fs3 = __require("fs");
|
|
1113
415
|
var ini = require_ini();
|
|
1114
|
-
var
|
|
416
|
+
var path4 = __require("path");
|
|
1115
417
|
var stripJsonComments = require_strip_json_comments();
|
|
1116
418
|
var parse = exports.parse = function(content) {
|
|
1117
419
|
if (/^\s*{/.test(content))
|
|
@@ -1125,7 +427,7 @@ var require_utils = __commonJS({
|
|
|
1125
427
|
for (var i in args)
|
|
1126
428
|
if ("string" !== typeof args[i])
|
|
1127
429
|
return;
|
|
1128
|
-
var file2 =
|
|
430
|
+
var file2 = path4.join.apply(null, args);
|
|
1129
431
|
try {
|
|
1130
432
|
return fs3.readFileSync(file2, "utf-8");
|
|
1131
433
|
} catch (err) {
|
|
@@ -1162,15 +464,15 @@ var require_utils = __commonJS({
|
|
|
1162
464
|
return obj;
|
|
1163
465
|
};
|
|
1164
466
|
exports.find = function() {
|
|
1165
|
-
var rel =
|
|
467
|
+
var rel = path4.join.apply(null, [].slice.call(arguments));
|
|
1166
468
|
function find2(start, rel2) {
|
|
1167
|
-
var file2 =
|
|
469
|
+
var file2 = path4.join(start, rel2);
|
|
1168
470
|
try {
|
|
1169
471
|
fs3.statSync(file2);
|
|
1170
472
|
return file2;
|
|
1171
473
|
} catch (err) {
|
|
1172
|
-
if (
|
|
1173
|
-
return find2(
|
|
474
|
+
if (path4.dirname(start) !== start)
|
|
475
|
+
return find2(path4.dirname(start), rel2);
|
|
1174
476
|
}
|
|
1175
477
|
}
|
|
1176
478
|
__name(find2, "find");
|
|
@@ -1660,8 +962,8 @@ var require_registry_auth_token = __commonJS({
|
|
|
1660
962
|
return void 0;
|
|
1661
963
|
}
|
|
1662
964
|
__name(getLegacyAuthInfo, "getLegacyAuthInfo");
|
|
1663
|
-
function normalizePath(
|
|
1664
|
-
return
|
|
965
|
+
function normalizePath(path4) {
|
|
966
|
+
return path4[path4.length - 1] === "/" ? path4 : path4 + "/";
|
|
1665
967
|
}
|
|
1666
968
|
__name(normalizePath, "normalizePath");
|
|
1667
969
|
function getAuthInfoForUrl(regUrl, npmrc) {
|
|
@@ -2107,7 +1409,7 @@ var util;
|
|
|
2107
1409
|
}
|
|
2108
1410
|
__name(joinValues, "joinValues");
|
|
2109
1411
|
util2.joinValues = joinValues;
|
|
2110
|
-
util2.jsonStringifyReplacer = (
|
|
1412
|
+
util2.jsonStringifyReplacer = (_, value) => {
|
|
2111
1413
|
if (typeof value === "bigint") {
|
|
2112
1414
|
return value.toString();
|
|
2113
1415
|
}
|
|
@@ -2408,8 +1710,8 @@ function getErrorMap() {
|
|
|
2408
1710
|
}
|
|
2409
1711
|
__name(getErrorMap, "getErrorMap");
|
|
2410
1712
|
var makeIssue = /* @__PURE__ */ __name((params) => {
|
|
2411
|
-
const { data, path:
|
|
2412
|
-
const fullPath = [...
|
|
1713
|
+
const { data, path: path4, errorMaps, issueData } = params;
|
|
1714
|
+
const fullPath = [...path4, ...issueData.path || []];
|
|
2413
1715
|
const fullIssue = {
|
|
2414
1716
|
...issueData,
|
|
2415
1717
|
path: fullPath
|
|
@@ -2515,11 +1817,11 @@ var ParseInputLazyPath = class {
|
|
|
2515
1817
|
static {
|
|
2516
1818
|
__name(this, "ParseInputLazyPath");
|
|
2517
1819
|
}
|
|
2518
|
-
constructor(parent, value,
|
|
1820
|
+
constructor(parent, value, path4, key) {
|
|
2519
1821
|
this._cachedPath = [];
|
|
2520
1822
|
this.parent = parent;
|
|
2521
1823
|
this.data = value;
|
|
2522
|
-
this._path =
|
|
1824
|
+
this._path = path4;
|
|
2523
1825
|
this._key = key;
|
|
2524
1826
|
}
|
|
2525
1827
|
get path() {
|
|
@@ -5931,37 +5233,6 @@ z.object({
|
|
|
5931
5233
|
timeout: z.number().gte(0).or(z.string()).optional()
|
|
5932
5234
|
}).strict();
|
|
5933
5235
|
|
|
5934
|
-
// ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/esm-wrapper/mod.esm.js
|
|
5935
|
-
var mod_esm_exports = {};
|
|
5936
|
-
__export(mod_esm_exports, {
|
|
5937
|
-
default: () => mod_esm_default
|
|
5938
|
-
});
|
|
5939
|
-
var import_mod_cjs = __toESM(require_mod_cjs3(), 1);
|
|
5940
|
-
__reExport(mod_esm_exports, __toESM(require_mod_cjs3(), 1));
|
|
5941
|
-
var mod_esm_default = import_mod_cjs.default;
|
|
5942
|
-
|
|
5943
|
-
// src/global-wrangler-config-path.ts
|
|
5944
|
-
function getGlobalConfigPath({
|
|
5945
|
-
appName = "wrangler",
|
|
5946
|
-
leadingDot = true,
|
|
5947
|
-
useLegacyHomeDir = true
|
|
5948
|
-
} = {}) {
|
|
5949
|
-
const dirName = `${leadingDot ? "." : ""}${appName}`;
|
|
5950
|
-
const configDir = mod_esm_default(dirName).config();
|
|
5951
|
-
if (useLegacyHomeDir) {
|
|
5952
|
-
const legacyConfigDir = path3.join(os.homedir(), dirName);
|
|
5953
|
-
if (isDirectory(legacyConfigDir)) {
|
|
5954
|
-
return legacyConfigDir;
|
|
5955
|
-
}
|
|
5956
|
-
}
|
|
5957
|
-
return configDir;
|
|
5958
|
-
}
|
|
5959
|
-
__name(getGlobalConfigPath, "getGlobalConfigPath");
|
|
5960
|
-
function getGlobalWranglerConfigPath() {
|
|
5961
|
-
return getGlobalConfigPath();
|
|
5962
|
-
}
|
|
5963
|
-
__name(getGlobalWranglerConfigPath, "getGlobalWranglerConfigPath");
|
|
5964
|
-
|
|
5965
5236
|
// src/environment-variables/factory.ts
|
|
5966
5237
|
function getBooleanEnvironmentVariableFactory(options) {
|
|
5967
5238
|
return () => {
|
|
@@ -6115,7 +5386,7 @@ var getBuildPlatformFromEnv = getEnvironmentVariableFactory({
|
|
|
6115
5386
|
var getRegistryPath = getEnvironmentVariableFactory({
|
|
6116
5387
|
variableName: "WRANGLER_REGISTRY_PATH",
|
|
6117
5388
|
defaultValue() {
|
|
6118
|
-
return
|
|
5389
|
+
return path2.join(getGlobalConfigPath(), "registry");
|
|
6119
5390
|
}
|
|
6120
5391
|
});
|
|
6121
5392
|
var getD1ExtraLocationChoices = getEnvironmentVariableFactory({
|
|
@@ -6333,9 +5604,9 @@ Please add "${field}" to "env.${envName}".`
|
|
|
6333
5604
|
return rawEnv[field] ?? defaultValue;
|
|
6334
5605
|
}
|
|
6335
5606
|
__name(notInheritable, "notInheritable");
|
|
6336
|
-
function unwindPropertyPath(root,
|
|
5607
|
+
function unwindPropertyPath(root, path4) {
|
|
6337
5608
|
let container = root;
|
|
6338
|
-
const parts =
|
|
5609
|
+
const parts = path4.split(".");
|
|
6339
5610
|
for (let i = 0; i < parts.length - 1; i++) {
|
|
6340
5611
|
if (!hasProperty(container, parts[i])) {
|
|
6341
5612
|
return;
|
|
@@ -6578,10 +5849,10 @@ var isRecord = /* @__PURE__ */ __name((value) => typeof value === "object" && va
|
|
|
6578
5849
|
var validateUniqueNameProperty = /* @__PURE__ */ __name((diagnostics, field, value) => {
|
|
6579
5850
|
if (Array.isArray(value)) {
|
|
6580
5851
|
const nameCount = /* @__PURE__ */ new Map();
|
|
6581
|
-
Object.entries(value).forEach(([
|
|
5852
|
+
Object.entries(value).forEach(([_, entry]) => {
|
|
6582
5853
|
nameCount.set(entry.name, (nameCount.get(entry.name) ?? 0) + 1);
|
|
6583
5854
|
});
|
|
6584
|
-
const duplicates = Array.from(nameCount.entries()).filter(([
|
|
5855
|
+
const duplicates = Array.from(nameCount.entries()).filter(([_, count]) => count > 1).map(([name]) => name);
|
|
6585
5856
|
if (duplicates.length > 0) {
|
|
6586
5857
|
const list = duplicates.join('", "');
|
|
6587
5858
|
diagnostics.errors.push(
|
|
@@ -6714,7 +5985,7 @@ function isPagesConfig(rawConfig) {
|
|
|
6714
5985
|
__name(isPagesConfig, "isPagesConfig");
|
|
6715
5986
|
function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args, preserveOriginalMain = false) {
|
|
6716
5987
|
const diagnostics = new Diagnostics(
|
|
6717
|
-
`Processing ${configPath ?
|
|
5988
|
+
`Processing ${configPath ? path2.relative(process.cwd(), configPath) : "wrangler"} configuration:`
|
|
6718
5989
|
);
|
|
6719
5990
|
validateOptionalProperty(
|
|
6720
5991
|
diagnostics,
|
|
@@ -6939,13 +6210,13 @@ function normalizeAndValidateBuild(diagnostics, rawEnv, rawBuild, configPath) {
|
|
|
6939
6210
|
// be configured in the Wrangler configuration file, but who knows, that may
|
|
6940
6211
|
// change in the future, so we do a check anyway
|
|
6941
6212
|
command && configPath ? Array.isArray(watch_dir) ? watch_dir.map(
|
|
6942
|
-
(dir) =>
|
|
6213
|
+
(dir) => path2.relative(
|
|
6943
6214
|
process.cwd(),
|
|
6944
|
-
|
|
6215
|
+
path2.join(path2.dirname(configPath), `${dir}`)
|
|
6945
6216
|
)
|
|
6946
|
-
) :
|
|
6217
|
+
) : path2.relative(
|
|
6947
6218
|
process.cwd(),
|
|
6948
|
-
|
|
6219
|
+
path2.join(path2.dirname(configPath), `${watch_dir}`)
|
|
6949
6220
|
) : watch_dir
|
|
6950
6221
|
),
|
|
6951
6222
|
cwd
|
|
@@ -6953,11 +6224,11 @@ function normalizeAndValidateBuild(diagnostics, rawEnv, rawBuild, configPath) {
|
|
|
6953
6224
|
}
|
|
6954
6225
|
__name(normalizeAndValidateBuild, "normalizeAndValidateBuild");
|
|
6955
6226
|
function normalizeAndValidateMainField(configPath, rawMain) {
|
|
6956
|
-
const configDir =
|
|
6227
|
+
const configDir = path2.dirname(configPath ?? "wrangler.toml");
|
|
6957
6228
|
if (rawMain !== void 0) {
|
|
6958
6229
|
if (typeof rawMain === "string") {
|
|
6959
|
-
const directory =
|
|
6960
|
-
return
|
|
6230
|
+
const directory = path2.resolve(configDir);
|
|
6231
|
+
return path2.resolve(directory, rawMain);
|
|
6961
6232
|
} else {
|
|
6962
6233
|
return rawMain;
|
|
6963
6234
|
}
|
|
@@ -6967,11 +6238,11 @@ function normalizeAndValidateMainField(configPath, rawMain) {
|
|
|
6967
6238
|
}
|
|
6968
6239
|
__name(normalizeAndValidateMainField, "normalizeAndValidateMainField");
|
|
6969
6240
|
function normalizeAndValidateBaseDirField(configPath, rawDir) {
|
|
6970
|
-
const configDir =
|
|
6241
|
+
const configDir = path2.dirname(configPath ?? "wrangler.toml");
|
|
6971
6242
|
if (rawDir !== void 0) {
|
|
6972
6243
|
if (typeof rawDir === "string") {
|
|
6973
|
-
const directory =
|
|
6974
|
-
return
|
|
6244
|
+
const directory = path2.resolve(configDir);
|
|
6245
|
+
return path2.resolve(directory, rawDir);
|
|
6975
6246
|
} else {
|
|
6976
6247
|
return rawDir;
|
|
6977
6248
|
}
|
|
@@ -6981,11 +6252,11 @@ function normalizeAndValidateBaseDirField(configPath, rawDir) {
|
|
|
6981
6252
|
}
|
|
6982
6253
|
__name(normalizeAndValidateBaseDirField, "normalizeAndValidateBaseDirField");
|
|
6983
6254
|
function normalizeAndValidatePagesBuildOutputDir(configPath, rawPagesDir) {
|
|
6984
|
-
const configDir =
|
|
6255
|
+
const configDir = path2.dirname(configPath ?? "wrangler.toml");
|
|
6985
6256
|
if (rawPagesDir !== void 0) {
|
|
6986
6257
|
if (typeof rawPagesDir === "string") {
|
|
6987
|
-
const directory =
|
|
6988
|
-
return
|
|
6258
|
+
const directory = path2.resolve(configDir);
|
|
6259
|
+
return path2.resolve(directory, rawPagesDir);
|
|
6989
6260
|
} else {
|
|
6990
6261
|
return rawPagesDir;
|
|
6991
6262
|
}
|
|
@@ -7140,9 +6411,9 @@ function normalizeAndValidateSite(diagnostics, configPath, rawConfig, mainEntryP
|
|
|
7140
6411
|
`site.entry-point`,
|
|
7141
6412
|
`Delete the \`site.entry-point\` field, then add the top level \`main\` field to your configuration file:
|
|
7142
6413
|
\`\`\`
|
|
7143
|
-
main = "${
|
|
6414
|
+
main = "${path2.join(
|
|
7144
6415
|
String(legacySiteEntryPoint) || "workers-site",
|
|
7145
|
-
|
|
6416
|
+
path2.extname(String(legacySiteEntryPoint) || "workers-site") ? "" : "index.js"
|
|
7146
6417
|
)}"
|
|
7147
6418
|
\`\`\``,
|
|
7148
6419
|
false,
|
|
@@ -7167,9 +6438,9 @@ Delete the deprecated \`site.entry-point\` field from your config.`
|
|
|
7167
6438
|
);
|
|
7168
6439
|
}
|
|
7169
6440
|
if (configPath && siteEntryPoint) {
|
|
7170
|
-
siteEntryPoint =
|
|
6441
|
+
siteEntryPoint = path2.relative(
|
|
7171
6442
|
process.cwd(),
|
|
7172
|
-
|
|
6443
|
+
path2.join(path2.dirname(configPath), siteEntryPoint)
|
|
7173
6444
|
);
|
|
7174
6445
|
}
|
|
7175
6446
|
return {
|
|
@@ -7215,9 +6486,9 @@ function normalizeAndValidateModulePaths(diagnostics, configPath, field, rawMapp
|
|
|
7215
6486
|
for (const [name, filePath] of Object.entries(rawMapping)) {
|
|
7216
6487
|
if (isString(diagnostics, `${field}['${name}']`, filePath, void 0)) {
|
|
7217
6488
|
if (configPath) {
|
|
7218
|
-
mapping[name] = configPath ?
|
|
6489
|
+
mapping[name] = configPath ? path2.relative(
|
|
7219
6490
|
process.cwd(),
|
|
7220
|
-
|
|
6491
|
+
path2.join(path2.dirname(configPath), filePath)
|
|
7221
6492
|
) : filePath;
|
|
7222
6493
|
}
|
|
7223
6494
|
}
|
|
@@ -8266,9 +7537,9 @@ function validateAndNormalizeTsconfig(diagnostics, topLevelEnv, rawEnv, configPa
|
|
|
8266
7537
|
isString,
|
|
8267
7538
|
void 0
|
|
8268
7539
|
);
|
|
8269
|
-
return configPath && tsconfig ?
|
|
7540
|
+
return configPath && tsconfig ? path2.relative(
|
|
8270
7541
|
process.cwd(),
|
|
8271
|
-
|
|
7542
|
+
path2.join(path2.dirname(configPath), tsconfig)
|
|
8272
7543
|
) : tsconfig;
|
|
8273
7544
|
}
|
|
8274
7545
|
__name(validateAndNormalizeTsconfig, "validateAndNormalizeTsconfig");
|
|
@@ -9142,9 +8413,9 @@ function validateContainerApp(envName, topLevelName, configPath) {
|
|
|
9142
8413
|
let resolvedBuildContextPath = void 0;
|
|
9143
8414
|
try {
|
|
9144
8415
|
if (isDockerfile(resolvedImage, configPath)) {
|
|
9145
|
-
const baseDir = configPath ?
|
|
9146
|
-
resolvedImage =
|
|
9147
|
-
resolvedBuildContextPath = containerAppOptional.image_build_context ?
|
|
8416
|
+
const baseDir = configPath ? path2.dirname(configPath) : process.cwd();
|
|
8417
|
+
resolvedImage = path2.resolve(baseDir, resolvedImage);
|
|
8418
|
+
resolvedBuildContextPath = containerAppOptional.image_build_context ? path2.resolve(baseDir, containerAppOptional.image_build_context) : path2.dirname(resolvedImage);
|
|
9148
8419
|
}
|
|
9149
8420
|
} catch (err) {
|
|
9150
8421
|
if (err instanceof Error && err.message) {
|
|
@@ -9813,6 +9084,38 @@ var validateD1Binding = /* @__PURE__ */ __name((diagnostics, field, value) => {
|
|
|
9813
9084
|
);
|
|
9814
9085
|
isValid2 = false;
|
|
9815
9086
|
}
|
|
9087
|
+
if (!isOptionalProperty(value, "database_name", "string")) {
|
|
9088
|
+
diagnostics.errors.push(
|
|
9089
|
+
`"${field}" bindings should, optionally, have a string "database_name" field but got ${JSON.stringify(
|
|
9090
|
+
value
|
|
9091
|
+
)}.`
|
|
9092
|
+
);
|
|
9093
|
+
isValid2 = false;
|
|
9094
|
+
}
|
|
9095
|
+
if (!isOptionalProperty(value, "migrations_dir", "string")) {
|
|
9096
|
+
diagnostics.errors.push(
|
|
9097
|
+
`"${field}" bindings should, optionally, have a string "migrations_dir" field but got ${JSON.stringify(
|
|
9098
|
+
value
|
|
9099
|
+
)}.`
|
|
9100
|
+
);
|
|
9101
|
+
isValid2 = false;
|
|
9102
|
+
}
|
|
9103
|
+
if (!isOptionalProperty(value, "migrations_table", "string")) {
|
|
9104
|
+
diagnostics.errors.push(
|
|
9105
|
+
`"${field}" bindings should, optionally, have a string "migrations_table" field but got ${JSON.stringify(
|
|
9106
|
+
value
|
|
9107
|
+
)}.`
|
|
9108
|
+
);
|
|
9109
|
+
isValid2 = false;
|
|
9110
|
+
}
|
|
9111
|
+
if (!isOptionalProperty(value, "database_internal_env", "string")) {
|
|
9112
|
+
diagnostics.errors.push(
|
|
9113
|
+
`"${field}" bindings should, optionally, have a string "database_internal_env" field but got ${JSON.stringify(
|
|
9114
|
+
value
|
|
9115
|
+
)}.`
|
|
9116
|
+
);
|
|
9117
|
+
isValid2 = false;
|
|
9118
|
+
}
|
|
9816
9119
|
validateAdditionalProperties(diagnostics, field, Object.keys(value), [
|
|
9817
9120
|
"binding",
|
|
9818
9121
|
"database_id",
|
|
@@ -11609,8 +10912,8 @@ function isRemoteValid(targetObject, fieldPath, diagnostics) {
|
|
|
11609
10912
|
}
|
|
11610
10913
|
__name(isRemoteValid, "isRemoteValid");
|
|
11611
10914
|
function isDockerfile(imagePath, configPath) {
|
|
11612
|
-
const baseDir = configPath ?
|
|
11613
|
-
const maybeDockerfile =
|
|
10915
|
+
const baseDir = configPath ? path2.dirname(configPath) : process.cwd();
|
|
10916
|
+
const maybeDockerfile = path2.resolve(baseDir, imagePath);
|
|
11614
10917
|
if (fs2.existsSync(maybeDockerfile)) {
|
|
11615
10918
|
if (isDirectory(maybeDockerfile)) {
|
|
11616
10919
|
throw new UserError(
|
|
@@ -11835,11 +11138,273 @@ Pages requires Durable Object bindings to specify the name of the Worker where t
|
|
|
11835
11138
|
}
|
|
11836
11139
|
__name(validateDurableObjectBinding2, "validateDurableObjectBinding");
|
|
11837
11140
|
|
|
11141
|
+
// ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
11142
|
+
var signals = [];
|
|
11143
|
+
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
11144
|
+
if (process.platform !== "win32") {
|
|
11145
|
+
signals.push(
|
|
11146
|
+
"SIGALRM",
|
|
11147
|
+
"SIGABRT",
|
|
11148
|
+
"SIGVTALRM",
|
|
11149
|
+
"SIGXCPU",
|
|
11150
|
+
"SIGXFSZ",
|
|
11151
|
+
"SIGUSR2",
|
|
11152
|
+
"SIGTRAP",
|
|
11153
|
+
"SIGSYS",
|
|
11154
|
+
"SIGQUIT",
|
|
11155
|
+
"SIGIOT"
|
|
11156
|
+
// should detect profiler and enable/disable accordingly.
|
|
11157
|
+
// see #21
|
|
11158
|
+
// 'SIGPROF'
|
|
11159
|
+
);
|
|
11160
|
+
}
|
|
11161
|
+
if (process.platform === "linux") {
|
|
11162
|
+
signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
11163
|
+
}
|
|
11164
|
+
|
|
11165
|
+
// ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
11166
|
+
var processOk = /* @__PURE__ */ __name((process3) => !!process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function", "processOk");
|
|
11167
|
+
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
11168
|
+
var global = globalThis;
|
|
11169
|
+
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
11170
|
+
var Emitter = class {
|
|
11171
|
+
static {
|
|
11172
|
+
__name(this, "Emitter");
|
|
11173
|
+
}
|
|
11174
|
+
emitted = {
|
|
11175
|
+
afterExit: false,
|
|
11176
|
+
exit: false
|
|
11177
|
+
};
|
|
11178
|
+
listeners = {
|
|
11179
|
+
afterExit: [],
|
|
11180
|
+
exit: []
|
|
11181
|
+
};
|
|
11182
|
+
count = 0;
|
|
11183
|
+
id = Math.random();
|
|
11184
|
+
constructor() {
|
|
11185
|
+
if (global[kExitEmitter]) {
|
|
11186
|
+
return global[kExitEmitter];
|
|
11187
|
+
}
|
|
11188
|
+
ObjectDefineProperty(global, kExitEmitter, {
|
|
11189
|
+
value: this,
|
|
11190
|
+
writable: false,
|
|
11191
|
+
enumerable: false,
|
|
11192
|
+
configurable: false
|
|
11193
|
+
});
|
|
11194
|
+
}
|
|
11195
|
+
on(ev, fn) {
|
|
11196
|
+
this.listeners[ev].push(fn);
|
|
11197
|
+
}
|
|
11198
|
+
removeListener(ev, fn) {
|
|
11199
|
+
const list = this.listeners[ev];
|
|
11200
|
+
const i = list.indexOf(fn);
|
|
11201
|
+
if (i === -1) {
|
|
11202
|
+
return;
|
|
11203
|
+
}
|
|
11204
|
+
if (i === 0 && list.length === 1) {
|
|
11205
|
+
list.length = 0;
|
|
11206
|
+
} else {
|
|
11207
|
+
list.splice(i, 1);
|
|
11208
|
+
}
|
|
11209
|
+
}
|
|
11210
|
+
emit(ev, code, signal) {
|
|
11211
|
+
if (this.emitted[ev]) {
|
|
11212
|
+
return false;
|
|
11213
|
+
}
|
|
11214
|
+
this.emitted[ev] = true;
|
|
11215
|
+
let ret = false;
|
|
11216
|
+
for (const fn of this.listeners[ev]) {
|
|
11217
|
+
ret = fn(code, signal) === true || ret;
|
|
11218
|
+
}
|
|
11219
|
+
if (ev === "exit") {
|
|
11220
|
+
ret = this.emit("afterExit", code, signal) || ret;
|
|
11221
|
+
}
|
|
11222
|
+
return ret;
|
|
11223
|
+
}
|
|
11224
|
+
};
|
|
11225
|
+
var SignalExitBase = class {
|
|
11226
|
+
static {
|
|
11227
|
+
__name(this, "SignalExitBase");
|
|
11228
|
+
}
|
|
11229
|
+
};
|
|
11230
|
+
var signalExitWrap = /* @__PURE__ */ __name((handler) => {
|
|
11231
|
+
return {
|
|
11232
|
+
onExit(cb, opts) {
|
|
11233
|
+
return handler.onExit(cb, opts);
|
|
11234
|
+
},
|
|
11235
|
+
load() {
|
|
11236
|
+
return handler.load();
|
|
11237
|
+
},
|
|
11238
|
+
unload() {
|
|
11239
|
+
return handler.unload();
|
|
11240
|
+
}
|
|
11241
|
+
};
|
|
11242
|
+
}, "signalExitWrap");
|
|
11243
|
+
var SignalExitFallback = class extends SignalExitBase {
|
|
11244
|
+
static {
|
|
11245
|
+
__name(this, "SignalExitFallback");
|
|
11246
|
+
}
|
|
11247
|
+
onExit() {
|
|
11248
|
+
return () => {
|
|
11249
|
+
};
|
|
11250
|
+
}
|
|
11251
|
+
load() {
|
|
11252
|
+
}
|
|
11253
|
+
unload() {
|
|
11254
|
+
}
|
|
11255
|
+
};
|
|
11256
|
+
var SignalExit = class extends SignalExitBase {
|
|
11257
|
+
static {
|
|
11258
|
+
__name(this, "SignalExit");
|
|
11259
|
+
}
|
|
11260
|
+
// "SIGHUP" throws an `ENOSYS` error on Windows,
|
|
11261
|
+
// so use a supported signal instead
|
|
11262
|
+
/* c8 ignore start */
|
|
11263
|
+
#hupSig = process2.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
11264
|
+
/* c8 ignore stop */
|
|
11265
|
+
#emitter = new Emitter();
|
|
11266
|
+
#process;
|
|
11267
|
+
#originalProcessEmit;
|
|
11268
|
+
#originalProcessReallyExit;
|
|
11269
|
+
#sigListeners = {};
|
|
11270
|
+
#loaded = false;
|
|
11271
|
+
constructor(process3) {
|
|
11272
|
+
super();
|
|
11273
|
+
this.#process = process3;
|
|
11274
|
+
this.#sigListeners = {};
|
|
11275
|
+
for (const sig of signals) {
|
|
11276
|
+
this.#sigListeners[sig] = () => {
|
|
11277
|
+
const listeners = this.#process.listeners(sig);
|
|
11278
|
+
let { count } = this.#emitter;
|
|
11279
|
+
const p = process3;
|
|
11280
|
+
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
|
|
11281
|
+
count += p.__signal_exit_emitter__.count;
|
|
11282
|
+
}
|
|
11283
|
+
if (listeners.length === count) {
|
|
11284
|
+
this.unload();
|
|
11285
|
+
const ret = this.#emitter.emit("exit", null, sig);
|
|
11286
|
+
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
11287
|
+
if (!ret)
|
|
11288
|
+
process3.kill(process3.pid, s);
|
|
11289
|
+
}
|
|
11290
|
+
};
|
|
11291
|
+
}
|
|
11292
|
+
this.#originalProcessReallyExit = process3.reallyExit;
|
|
11293
|
+
this.#originalProcessEmit = process3.emit;
|
|
11294
|
+
}
|
|
11295
|
+
onExit(cb, opts) {
|
|
11296
|
+
if (!processOk(this.#process)) {
|
|
11297
|
+
return () => {
|
|
11298
|
+
};
|
|
11299
|
+
}
|
|
11300
|
+
if (this.#loaded === false) {
|
|
11301
|
+
this.load();
|
|
11302
|
+
}
|
|
11303
|
+
const ev = opts?.alwaysLast ? "afterExit" : "exit";
|
|
11304
|
+
this.#emitter.on(ev, cb);
|
|
11305
|
+
return () => {
|
|
11306
|
+
this.#emitter.removeListener(ev, cb);
|
|
11307
|
+
if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
|
|
11308
|
+
this.unload();
|
|
11309
|
+
}
|
|
11310
|
+
};
|
|
11311
|
+
}
|
|
11312
|
+
load() {
|
|
11313
|
+
if (this.#loaded) {
|
|
11314
|
+
return;
|
|
11315
|
+
}
|
|
11316
|
+
this.#loaded = true;
|
|
11317
|
+
this.#emitter.count += 1;
|
|
11318
|
+
for (const sig of signals) {
|
|
11319
|
+
try {
|
|
11320
|
+
const fn = this.#sigListeners[sig];
|
|
11321
|
+
if (fn)
|
|
11322
|
+
this.#process.on(sig, fn);
|
|
11323
|
+
} catch (_) {
|
|
11324
|
+
}
|
|
11325
|
+
}
|
|
11326
|
+
this.#process.emit = (ev, ...a) => {
|
|
11327
|
+
return this.#processEmit(ev, ...a);
|
|
11328
|
+
};
|
|
11329
|
+
this.#process.reallyExit = (code) => {
|
|
11330
|
+
return this.#processReallyExit(code);
|
|
11331
|
+
};
|
|
11332
|
+
}
|
|
11333
|
+
unload() {
|
|
11334
|
+
if (!this.#loaded) {
|
|
11335
|
+
return;
|
|
11336
|
+
}
|
|
11337
|
+
this.#loaded = false;
|
|
11338
|
+
signals.forEach((sig) => {
|
|
11339
|
+
const listener = this.#sigListeners[sig];
|
|
11340
|
+
if (!listener) {
|
|
11341
|
+
throw new Error("Listener not defined for signal: " + sig);
|
|
11342
|
+
}
|
|
11343
|
+
try {
|
|
11344
|
+
this.#process.removeListener(sig, listener);
|
|
11345
|
+
} catch (_) {
|
|
11346
|
+
}
|
|
11347
|
+
});
|
|
11348
|
+
this.#process.emit = this.#originalProcessEmit;
|
|
11349
|
+
this.#process.reallyExit = this.#originalProcessReallyExit;
|
|
11350
|
+
this.#emitter.count -= 1;
|
|
11351
|
+
}
|
|
11352
|
+
#processReallyExit(code) {
|
|
11353
|
+
if (!processOk(this.#process)) {
|
|
11354
|
+
return 0;
|
|
11355
|
+
}
|
|
11356
|
+
this.#process.exitCode = code || 0;
|
|
11357
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
11358
|
+
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
|
|
11359
|
+
}
|
|
11360
|
+
#processEmit(ev, ...args) {
|
|
11361
|
+
const og = this.#originalProcessEmit;
|
|
11362
|
+
if (ev === "exit" && processOk(this.#process)) {
|
|
11363
|
+
if (typeof args[0] === "number") {
|
|
11364
|
+
this.#process.exitCode = args[0];
|
|
11365
|
+
}
|
|
11366
|
+
const ret = og.call(this.#process, ev, ...args);
|
|
11367
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
11368
|
+
return ret;
|
|
11369
|
+
} else {
|
|
11370
|
+
return og.call(this.#process, ev, ...args);
|
|
11371
|
+
}
|
|
11372
|
+
}
|
|
11373
|
+
};
|
|
11374
|
+
var process2 = globalThis.process;
|
|
11375
|
+
var {
|
|
11376
|
+
/**
|
|
11377
|
+
* Called when the process is exiting, whether via signal, explicit
|
|
11378
|
+
* exit, or running out of stuff to do.
|
|
11379
|
+
*
|
|
11380
|
+
* If the global process object is not suitable for instrumentation,
|
|
11381
|
+
* then this will be a no-op.
|
|
11382
|
+
*
|
|
11383
|
+
* Returns a function that may be used to unload signal-exit.
|
|
11384
|
+
*/
|
|
11385
|
+
onExit,
|
|
11386
|
+
/**
|
|
11387
|
+
* Load the listeners. Likely you never need to call this, unless
|
|
11388
|
+
* doing a rather deep integration with signal-exit functionality.
|
|
11389
|
+
* Mostly exposed for the benefit of testing.
|
|
11390
|
+
*
|
|
11391
|
+
* @internal
|
|
11392
|
+
*/
|
|
11393
|
+
load,
|
|
11394
|
+
/**
|
|
11395
|
+
* Unload the listeners. Likely you never need to call this, unless
|
|
11396
|
+
* doing a rather deep integration with signal-exit functionality.
|
|
11397
|
+
* Mostly exposed for the benefit of testing.
|
|
11398
|
+
*
|
|
11399
|
+
* @internal
|
|
11400
|
+
*/
|
|
11401
|
+
unload
|
|
11402
|
+
} = signalExitWrap(processOk(process2) ? new SignalExit(process2) : new SignalExitFallback());
|
|
11403
|
+
|
|
11838
11404
|
// src/wrangler-tmp-dir.ts
|
|
11839
|
-
var import_signal_exit = __toESM(require_signal_exit());
|
|
11840
11405
|
function getWranglerHiddenDirPath(projectRoot) {
|
|
11841
11406
|
projectRoot ??= process.cwd();
|
|
11842
|
-
return
|
|
11407
|
+
return path2.join(projectRoot, ".wrangler");
|
|
11843
11408
|
}
|
|
11844
11409
|
__name(getWranglerHiddenDirPath, "getWranglerHiddenDirPath");
|
|
11845
11410
|
var STALE_WRANGLER_TMP_DIR_MS = 24 * 60 * 60 * 1e3;
|
|
@@ -11860,7 +11425,7 @@ function sweepStaleWranglerTmpDirs(tmpRoot) {
|
|
|
11860
11425
|
if (!entry.isDirectory()) {
|
|
11861
11426
|
continue;
|
|
11862
11427
|
}
|
|
11863
|
-
const entryPath =
|
|
11428
|
+
const entryPath = path2.join(tmpRoot, entry.name);
|
|
11864
11429
|
try {
|
|
11865
11430
|
if (fs2.statSync(entryPath).mtimeMs < cutoff) {
|
|
11866
11431
|
removeDirSync(entryPath);
|
|
@@ -11871,10 +11436,10 @@ function sweepStaleWranglerTmpDirs(tmpRoot) {
|
|
|
11871
11436
|
}
|
|
11872
11437
|
__name(sweepStaleWranglerTmpDirs, "sweepStaleWranglerTmpDirs");
|
|
11873
11438
|
function getWranglerTmpDir(projectRoot, prefix, cleanup = true) {
|
|
11874
|
-
const tmpRoot =
|
|
11439
|
+
const tmpRoot = path2.join(getWranglerHiddenDirPath(projectRoot), "tmp");
|
|
11875
11440
|
fs2.mkdirSync(tmpRoot, { recursive: true });
|
|
11876
11441
|
sweepStaleWranglerTmpDirs(tmpRoot);
|
|
11877
|
-
const tmpPrefix =
|
|
11442
|
+
const tmpPrefix = path2.join(tmpRoot, `${prefix}-`);
|
|
11878
11443
|
const tmpDir = fs2.realpathSync(fs2.mkdtempSync(tmpPrefix));
|
|
11879
11444
|
const cleanupDir = /* @__PURE__ */ __name(() => {
|
|
11880
11445
|
if (cleanup) {
|
|
@@ -11884,7 +11449,7 @@ function getWranglerTmpDir(projectRoot, prefix, cleanup = true) {
|
|
|
11884
11449
|
}
|
|
11885
11450
|
}
|
|
11886
11451
|
}, "cleanupDir");
|
|
11887
|
-
const removeExitListener = (
|
|
11452
|
+
const removeExitListener = onExit(cleanupDir);
|
|
11888
11453
|
return {
|
|
11889
11454
|
path: tmpDir,
|
|
11890
11455
|
remove() {
|
|
@@ -12438,18 +12003,18 @@ function startTunnel(options) {
|
|
|
12438
12003
|
env: options.token ? { TUNNEL_TOKEN: options.token } : void 0,
|
|
12439
12004
|
skipVersionCheck: true,
|
|
12440
12005
|
logger
|
|
12441
|
-
}).then((
|
|
12442
|
-
cloudflaredProcess =
|
|
12006
|
+
}).then((process3) => {
|
|
12007
|
+
cloudflaredProcess = process3;
|
|
12443
12008
|
if (disposed) {
|
|
12444
|
-
terminateCloudflared(
|
|
12009
|
+
terminateCloudflared(process3);
|
|
12445
12010
|
}
|
|
12446
|
-
return
|
|
12011
|
+
return process3;
|
|
12447
12012
|
});
|
|
12448
|
-
const readyPromise = cloudflaredPromise.then((
|
|
12013
|
+
const readyPromise = cloudflaredPromise.then((process3) => {
|
|
12449
12014
|
if (isNamedTunnel) {
|
|
12450
12015
|
return { mode: "named" };
|
|
12451
12016
|
}
|
|
12452
|
-
return waitForQuickTunnelReady(
|
|
12017
|
+
return waitForQuickTunnelReady(process3, timeoutMs, {
|
|
12453
12018
|
logger,
|
|
12454
12019
|
origin: options.origin
|
|
12455
12020
|
});
|
|
@@ -13253,4 +12818,4 @@ safe-buffer/index.js:
|
|
|
13253
12818
|
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
13254
12819
|
*/
|
|
13255
12820
|
|
|
13256
|
-
export { BunPackageManager, COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, Diagnostics, LOGGER_LEVELS, NpmPackageManager, PatchConfigError, PnpmPackageManager, YarnPackageManager, addAuthorizationHeader, bucketFormatMessage, checkWorkerNameValidity, defaultWranglerConfig, experimental_patchConfig, extractAccountTag, extractWAFBlockRayId, fetchInternalBase, fetchKVGetValueBase, fetchLatestNpmVersion, fetchListResultBase, fetchResultBase, formatTime, friendlyBindingNames2 as friendlyBindingNames, getBindingLocalSupport, getBindingTypeFriendlyName, getBooleanEnvironmentVariableFactory, getBrowserRenderingHeadfulFromEnv, getBuildConditionsFromEnv, getBuildPlatformFromEnv, getC3CommandFromEnv, getCIGeneratePreviewAlias, getCIMatchTag, getCIOverrideName, getCIOverrideNetworkModeHost, getCfFetchEnabledFromEnv, getCfFetchPathFromEnv, getCloudflareApiBaseUrl, getCloudflareApiEnvironmentFromEnv, getCloudflareComplianceRegion, getCloudflareEnv, getCloudflareIncludeProcessEnvFromEnv, getCloudflareLoadDevVarsFromDotEnv, getCloudflaredPathFromEnv, getComplianceRegionSubdomain, getD1ExtraLocationChoices, getDisableConfigWatching, getDockerPath, getDurableObjectExports, getEnvironmentVariableFactory,
|
|
12821
|
+
export { BunPackageManager, COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, Diagnostics, LOGGER_LEVELS, NpmPackageManager, PatchConfigError, PnpmPackageManager, YarnPackageManager, addAuthorizationHeader, bucketFormatMessage, checkWorkerNameValidity, defaultWranglerConfig, experimental_patchConfig, extractAccountTag, extractWAFBlockRayId, fetchInternalBase, fetchKVGetValueBase, fetchLatestNpmVersion, fetchListResultBase, fetchResultBase, formatTime, friendlyBindingNames2 as friendlyBindingNames, getBindingLocalSupport, getBindingTypeFriendlyName, getBooleanEnvironmentVariableFactory, getBrowserRenderingHeadfulFromEnv, getBuildConditionsFromEnv, getBuildPlatformFromEnv, getC3CommandFromEnv, getCIGeneratePreviewAlias, getCIMatchTag, getCIOverrideName, getCIOverrideNetworkModeHost, getCfFetchEnabledFromEnv, getCfFetchPathFromEnv, getCloudflareApiBaseUrl, getCloudflareApiEnvironmentFromEnv, getCloudflareComplianceRegion, getCloudflareEnv, getCloudflareIncludeProcessEnvFromEnv, getCloudflareLoadDevVarsFromDotEnv, getCloudflaredPathFromEnv, getComplianceRegionSubdomain, getD1ExtraLocationChoices, getDisableConfigWatching, getDockerPath, getDurableObjectExports, getEnvironmentVariableFactory, getHostFromRoute, getHostFromUrl, getLocalExplorerEnabledFromEnv, getOpenNextDeployFromEnv, getOutputFileDirectoryFromEnv, getOutputFilePathFromEnv, getRegistryPath, getSanitizeLogs, getSubdomainMixedStateCheckDisabled, getTraceHeader, getWorkerName, getWorkerNameFromProject, getWorkersCIBranchName, getWranglerCacheDirFromEnv, getWranglerHiddenDirPath, getWranglerHideBanner, getWranglerSendErrorReportsFromEnv, getWranglerSendMetricsFromEnv, getWranglerTmpDir, getZoneFromRoute, hasCursor, hasDurableObjectExports, hasMorePages, hasProperty, isDockerfile, isOptionalProperty, isPagesConfig, isRequiredProperty, isValidR2BucketName, isWAFBlockResponse, maybeAddTraceHeader, normalizeAndValidateConfig, performApiFetchBase, renderError, retryOnAPIFailure, spawnCloudflared, startTunnel, sweepStaleWranglerTmpDirs, throwFetchError, toValidWorkerName, truncate, validatePagesConfig };
|