@seeka-labs/cli-apps 3.8.10 → 3.9.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/index.cjs +821 -612
- package/dist/init-template.zip +0 -0
- package/package.json +3 -2
- package/dist/ai-context/common/README.md +0 -110
- package/dist/ai-context/common/architecture/overview.md +0 -140
- package/dist/ai-context/common/guides/common-patterns.md +0 -471
- package/dist/ai-context/common/guides/data-flow.md +0 -455
- package/dist/ai-context/common/guides/getting-started.md +0 -349
- package/dist/ai-context/common/guides/testing.md +0 -592
- package/dist/ai-context/common/reference/cli-commands.md +0 -231
- package/dist/ai-context/common/reference/config-schema.md +0 -345
- package/dist/ai-context/common/reference/sdk-api.md +0 -445
- package/dist/ai-context/public/architecture/app-structure.md +0 -385
- package/dist/index.cjs.map +0 -7
- package/dist/init-template/.github/workflows/deploy-azurefunc.yml +0 -198
- package/dist/init-template/.gitlab-ci.yml +0 -67
- package/dist/init-template/.nvmrc +0 -1
- package/dist/init-template/AGENTS.md +0 -99
- package/dist/init-template/README.azurefunc.md +0 -238
- package/dist/init-template/app/.eslintrc.cjs +0 -13
- package/dist/init-template/app/browser/README.md +0 -1
- package/dist/init-template/app/browser/package.json +0 -36
- package/dist/init-template/app/browser/scripts/esbuild/build-browser-plugin.mjs +0 -130
- package/dist/init-template/app/browser/scripts/esbuild/plugins/importAsGlobals.mjs +0 -39
- package/dist/init-template/app/browser/src/browser.ts +0 -12
- package/dist/init-template/app/browser/src/plugin/index.ts +0 -61
- package/dist/init-template/app/browser/tsconfig.json +0 -34
- package/dist/init-template/app/lib/package.json +0 -46
- package/dist/init-template/app/lib/src/index.ts +0 -4
- package/dist/init-template/app/lib/src/models/index.ts +0 -29
- package/dist/init-template/app/lib/src/validation/index.ts +0 -14
- package/dist/init-template/app/lib/tsconfig.json +0 -22
- package/dist/init-template/app/server-azurefunc/.eslintrc.cjs +0 -4
- package/dist/init-template/app/server-azurefunc/.funcignore +0 -20
- package/dist/init-template/app/server-azurefunc/README.md +0 -105
- package/dist/init-template/app/server-azurefunc/host.json +0 -31
- package/dist/init-template/app/server-azurefunc/local.settings.template.json +0 -30
- package/dist/init-template/app/server-azurefunc/package.json +0 -68
- package/dist/init-template/app/server-azurefunc/scripts/build.mjs +0 -67
- package/dist/init-template/app/server-azurefunc/scripts/dev-queue-setup.js +0 -55
- package/dist/init-template/app/server-azurefunc/src/app/api/router.ts +0 -15
- package/dist/init-template/app/server-azurefunc/src/app/api/routes/getInstallationSettings.ts +0 -13
- package/dist/init-template/app/server-azurefunc/src/app/api/routes/setInstallationSettings.ts +0 -35
- package/dist/init-template/app/server-azurefunc/src/app/jobs/index.ts +0 -61
- package/dist/init-template/app/server-azurefunc/src/app/logging/index.ts +0 -4
- package/dist/init-template/app/server-azurefunc/src/app/models/index.ts +0 -12
- package/dist/init-template/app/server-azurefunc/src/app/services/activites.ts +0 -8
- package/dist/init-template/app/server-azurefunc/src/functions/healthCheck.ts +0 -19
- package/dist/init-template/app/server-azurefunc/src/functions/seekaAppWebhook.ts +0 -204
- package/dist/init-template/app/server-azurefunc/src/functions/trackActivityQueueHandler.ts +0 -48
- package/dist/init-template/app/server-azurefunc/src/functions/ui.ts +0 -49
- package/dist/init-template/app/server-azurefunc/tsconfig.json +0 -24
- package/dist/init-template/app/ui/README.md +0 -40
- package/dist/init-template/app/ui/index.html +0 -21
- package/dist/init-template/app/ui/package.json +0 -72
- package/dist/init-template/app/ui/public/favicon.ico +0 -0
- package/dist/init-template/app/ui/scripts/copy-output.mjs +0 -30
- package/dist/init-template/app/ui/src/App.tsx +0 -72
- package/dist/init-template/app/ui/src/assets/app-icon.svg +0 -1
- package/dist/init-template/app/ui/src/components/setup/steps/complete/index.tsx +0 -32
- package/dist/init-template/app/ui/src/components/setup/steps/first/index.tsx +0 -27
- package/dist/init-template/app/ui/src/components/setup/steps/index.tsx +0 -22
- package/dist/init-template/app/ui/src/components/setup/steps/second/index.tsx +0 -38
- package/dist/init-template/app/ui/src/index.tsx +0 -45
- package/dist/init-template/app/ui/src/routes/home/index.tsx +0 -21
- package/dist/init-template/app/ui/src/vite-env.d.ts +0 -13
- package/dist/init-template/app/ui/tsconfig.json +0 -35
- package/dist/init-template/app/ui/tsconfig.node.json +0 -10
- package/dist/init-template/app/ui/vite.config.mts +0 -48
- package/dist/init-template/package.json +0 -46
- package/dist/init-template/tsconfig.json +0 -24
package/dist/index.cjs
CHANGED
|
@@ -177,16 +177,16 @@ var require_util = __commonJS({
|
|
|
177
177
|
}
|
|
178
178
|
exports2.urlGenerate = urlGenerate;
|
|
179
179
|
function normalize2(aPath) {
|
|
180
|
-
var
|
|
180
|
+
var path9 = aPath;
|
|
181
181
|
var url = urlParse(aPath);
|
|
182
182
|
if (url) {
|
|
183
183
|
if (!url.path) {
|
|
184
184
|
return aPath;
|
|
185
185
|
}
|
|
186
|
-
|
|
186
|
+
path9 = url.path;
|
|
187
187
|
}
|
|
188
|
-
var isAbsolute = exports2.isAbsolute(
|
|
189
|
-
var parts =
|
|
188
|
+
var isAbsolute = exports2.isAbsolute(path9);
|
|
189
|
+
var parts = path9.split(/\/+/);
|
|
190
190
|
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
|
|
191
191
|
part = parts[i];
|
|
192
192
|
if (part === ".") {
|
|
@@ -203,18 +203,18 @@ var require_util = __commonJS({
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
|
|
207
|
-
if (
|
|
208
|
-
|
|
206
|
+
path9 = parts.join("/");
|
|
207
|
+
if (path9 === "") {
|
|
208
|
+
path9 = isAbsolute ? "/" : ".";
|
|
209
209
|
}
|
|
210
210
|
if (url) {
|
|
211
|
-
url.path =
|
|
211
|
+
url.path = path9;
|
|
212
212
|
return urlGenerate(url);
|
|
213
213
|
}
|
|
214
|
-
return
|
|
214
|
+
return path9;
|
|
215
215
|
}
|
|
216
216
|
exports2.normalize = normalize2;
|
|
217
|
-
function
|
|
217
|
+
function join5(aRoot, aPath) {
|
|
218
218
|
if (aRoot === "") {
|
|
219
219
|
aRoot = ".";
|
|
220
220
|
}
|
|
@@ -246,7 +246,7 @@ var require_util = __commonJS({
|
|
|
246
246
|
}
|
|
247
247
|
return joined;
|
|
248
248
|
}
|
|
249
|
-
exports2.join =
|
|
249
|
+
exports2.join = join5;
|
|
250
250
|
exports2.isAbsolute = function(aPath) {
|
|
251
251
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
252
252
|
};
|
|
@@ -419,7 +419,7 @@ var require_util = __commonJS({
|
|
|
419
419
|
parsed.path = parsed.path.substring(0, index2 + 1);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
sourceURL =
|
|
422
|
+
sourceURL = join5(urlGenerate(parsed), sourceURL);
|
|
423
423
|
}
|
|
424
424
|
return normalize2(sourceURL);
|
|
425
425
|
}
|
|
@@ -1831,12 +1831,12 @@ var require_buffer_from = __commonJS({
|
|
|
1831
1831
|
var require_source_map_support = __commonJS({
|
|
1832
1832
|
"../../node_modules/source-map-support/source-map-support.js"(exports2, module2) {
|
|
1833
1833
|
var SourceMapConsumer = require_source_map().SourceMapConsumer;
|
|
1834
|
-
var
|
|
1835
|
-
var
|
|
1834
|
+
var path9 = require("path");
|
|
1835
|
+
var fs8;
|
|
1836
1836
|
try {
|
|
1837
|
-
|
|
1838
|
-
if (!
|
|
1839
|
-
|
|
1837
|
+
fs8 = require("fs");
|
|
1838
|
+
if (!fs8.existsSync || !fs8.readFileSync) {
|
|
1839
|
+
fs8 = null;
|
|
1840
1840
|
}
|
|
1841
1841
|
} catch (err) {
|
|
1842
1842
|
}
|
|
@@ -1892,26 +1892,26 @@ var require_source_map_support = __commonJS({
|
|
|
1892
1892
|
};
|
|
1893
1893
|
}
|
|
1894
1894
|
var retrieveFile = handlerExec(retrieveFileHandlers);
|
|
1895
|
-
retrieveFileHandlers.push(function(
|
|
1896
|
-
|
|
1897
|
-
if (/^file:/.test(
|
|
1898
|
-
|
|
1895
|
+
retrieveFileHandlers.push(function(path10) {
|
|
1896
|
+
path10 = path10.trim();
|
|
1897
|
+
if (/^file:/.test(path10)) {
|
|
1898
|
+
path10 = path10.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
|
|
1899
1899
|
return drive ? "" : (
|
|
1900
1900
|
// file:///C:/dir/file -> C:/dir/file
|
|
1901
1901
|
"/"
|
|
1902
1902
|
);
|
|
1903
1903
|
});
|
|
1904
1904
|
}
|
|
1905
|
-
if (
|
|
1906
|
-
return fileContentsCache[
|
|
1905
|
+
if (path10 in fileContentsCache) {
|
|
1906
|
+
return fileContentsCache[path10];
|
|
1907
1907
|
}
|
|
1908
1908
|
var contents = "";
|
|
1909
1909
|
try {
|
|
1910
|
-
if (!
|
|
1910
|
+
if (!fs8) {
|
|
1911
1911
|
var xhr = new XMLHttpRequest();
|
|
1912
1912
|
xhr.open(
|
|
1913
1913
|
"GET",
|
|
1914
|
-
|
|
1914
|
+
path10,
|
|
1915
1915
|
/** async */
|
|
1916
1916
|
false
|
|
1917
1917
|
);
|
|
@@ -1919,24 +1919,24 @@ var require_source_map_support = __commonJS({
|
|
|
1919
1919
|
if (xhr.readyState === 4 && xhr.status === 200) {
|
|
1920
1920
|
contents = xhr.responseText;
|
|
1921
1921
|
}
|
|
1922
|
-
} else if (
|
|
1923
|
-
contents =
|
|
1922
|
+
} else if (fs8.existsSync(path10)) {
|
|
1923
|
+
contents = fs8.readFileSync(path10, "utf8");
|
|
1924
1924
|
}
|
|
1925
1925
|
} catch (er) {
|
|
1926
1926
|
}
|
|
1927
|
-
return fileContentsCache[
|
|
1927
|
+
return fileContentsCache[path10] = contents;
|
|
1928
1928
|
});
|
|
1929
1929
|
function supportRelativeURL(file, url) {
|
|
1930
1930
|
if (!file) return url;
|
|
1931
|
-
var dir =
|
|
1931
|
+
var dir = path9.dirname(file);
|
|
1932
1932
|
var match2 = /^\w+:\/\/[^\/]*/.exec(dir);
|
|
1933
1933
|
var protocol = match2 ? match2[0] : "";
|
|
1934
1934
|
var startPath = dir.slice(protocol.length);
|
|
1935
1935
|
if (protocol && /^\/\w\:/.test(startPath)) {
|
|
1936
1936
|
protocol += "/";
|
|
1937
|
-
return protocol +
|
|
1937
|
+
return protocol + path9.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
|
|
1938
1938
|
}
|
|
1939
|
-
return protocol +
|
|
1939
|
+
return protocol + path9.resolve(dir.slice(protocol.length), url);
|
|
1940
1940
|
}
|
|
1941
1941
|
function retrieveSourceMapURL(source) {
|
|
1942
1942
|
var fileData;
|
|
@@ -2184,9 +2184,9 @@ var require_source_map_support = __commonJS({
|
|
|
2184
2184
|
var line = +match2[2];
|
|
2185
2185
|
var column = +match2[3];
|
|
2186
2186
|
var contents = fileContentsCache[source];
|
|
2187
|
-
if (!contents &&
|
|
2187
|
+
if (!contents && fs8 && fs8.existsSync(source)) {
|
|
2188
2188
|
try {
|
|
2189
|
-
contents =
|
|
2189
|
+
contents = fs8.readFileSync(source, "utf8");
|
|
2190
2190
|
} catch (er) {
|
|
2191
2191
|
contents = "";
|
|
2192
2192
|
}
|
|
@@ -3460,8 +3460,8 @@ var require_command = __commonJS({
|
|
|
3460
3460
|
"../../node_modules/commander/lib/command.js"(exports2) {
|
|
3461
3461
|
var EventEmitter2 = require("node:events").EventEmitter;
|
|
3462
3462
|
var childProcess = require("node:child_process");
|
|
3463
|
-
var
|
|
3464
|
-
var
|
|
3463
|
+
var path9 = require("node:path");
|
|
3464
|
+
var fs8 = require("node:fs");
|
|
3465
3465
|
var process4 = require("node:process");
|
|
3466
3466
|
var { Argument: Argument2, humanReadableArgName } = require_argument();
|
|
3467
3467
|
var { CommanderError: CommanderError2 } = require_error();
|
|
@@ -4455,7 +4455,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
4455
4455
|
* @param {string} subcommandName
|
|
4456
4456
|
*/
|
|
4457
4457
|
_checkForMissingExecutable(executableFile, executableDir, subcommandName) {
|
|
4458
|
-
if (
|
|
4458
|
+
if (fs8.existsSync(executableFile)) return;
|
|
4459
4459
|
const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
|
|
4460
4460
|
const executableMissing = `'${executableFile}' does not exist
|
|
4461
4461
|
- if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
@@ -4473,11 +4473,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
4473
4473
|
let launchWithNode = false;
|
|
4474
4474
|
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
4475
4475
|
function findFile(baseDir, baseName) {
|
|
4476
|
-
const localBin =
|
|
4477
|
-
if (
|
|
4478
|
-
if (sourceExt.includes(
|
|
4476
|
+
const localBin = path9.resolve(baseDir, baseName);
|
|
4477
|
+
if (fs8.existsSync(localBin)) return localBin;
|
|
4478
|
+
if (sourceExt.includes(path9.extname(baseName))) return void 0;
|
|
4479
4479
|
const foundExt = sourceExt.find(
|
|
4480
|
-
(ext2) =>
|
|
4480
|
+
(ext2) => fs8.existsSync(`${localBin}${ext2}`)
|
|
4481
4481
|
);
|
|
4482
4482
|
if (foundExt) return `${localBin}${foundExt}`;
|
|
4483
4483
|
return void 0;
|
|
@@ -4489,21 +4489,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
4489
4489
|
if (this._scriptPath) {
|
|
4490
4490
|
let resolvedScriptPath;
|
|
4491
4491
|
try {
|
|
4492
|
-
resolvedScriptPath =
|
|
4492
|
+
resolvedScriptPath = fs8.realpathSync(this._scriptPath);
|
|
4493
4493
|
} catch {
|
|
4494
4494
|
resolvedScriptPath = this._scriptPath;
|
|
4495
4495
|
}
|
|
4496
|
-
executableDir =
|
|
4497
|
-
|
|
4496
|
+
executableDir = path9.resolve(
|
|
4497
|
+
path9.dirname(resolvedScriptPath),
|
|
4498
4498
|
executableDir
|
|
4499
4499
|
);
|
|
4500
4500
|
}
|
|
4501
4501
|
if (executableDir) {
|
|
4502
4502
|
let localFile = findFile(executableDir, executableFile);
|
|
4503
4503
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
4504
|
-
const legacyName =
|
|
4504
|
+
const legacyName = path9.basename(
|
|
4505
4505
|
this._scriptPath,
|
|
4506
|
-
|
|
4506
|
+
path9.extname(this._scriptPath)
|
|
4507
4507
|
);
|
|
4508
4508
|
if (legacyName !== this._name) {
|
|
4509
4509
|
localFile = findFile(
|
|
@@ -4514,7 +4514,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
4514
4514
|
}
|
|
4515
4515
|
executableFile = localFile || executableFile;
|
|
4516
4516
|
}
|
|
4517
|
-
launchWithNode = sourceExt.includes(
|
|
4517
|
+
launchWithNode = sourceExt.includes(path9.extname(executableFile));
|
|
4518
4518
|
let proc2;
|
|
4519
4519
|
if (process4.platform !== "win32") {
|
|
4520
4520
|
if (launchWithNode) {
|
|
@@ -5429,7 +5429,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
5429
5429
|
* @return {Command}
|
|
5430
5430
|
*/
|
|
5431
5431
|
nameFromFilename(filename) {
|
|
5432
|
-
this._name =
|
|
5432
|
+
this._name = path9.basename(filename, path9.extname(filename));
|
|
5433
5433
|
return this;
|
|
5434
5434
|
}
|
|
5435
5435
|
/**
|
|
@@ -5443,9 +5443,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
5443
5443
|
* @param {string} [path]
|
|
5444
5444
|
* @return {(string|null|Command)}
|
|
5445
5445
|
*/
|
|
5446
|
-
executableDir(
|
|
5447
|
-
if (
|
|
5448
|
-
this._executableDir =
|
|
5446
|
+
executableDir(path10) {
|
|
5447
|
+
if (path10 === void 0) return this._executableDir;
|
|
5448
|
+
this._executableDir = path10;
|
|
5449
5449
|
return this;
|
|
5450
5450
|
}
|
|
5451
5451
|
/**
|
|
@@ -5728,8 +5728,8 @@ var require_windows = __commonJS({
|
|
|
5728
5728
|
"../../node_modules/cross-spawn/node_modules/isexe/windows.js"(exports2, module2) {
|
|
5729
5729
|
module2.exports = isexe;
|
|
5730
5730
|
isexe.sync = sync3;
|
|
5731
|
-
var
|
|
5732
|
-
function checkPathExt(
|
|
5731
|
+
var fs8 = require("fs");
|
|
5732
|
+
function checkPathExt(path9, options) {
|
|
5733
5733
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
5734
5734
|
if (!pathext) {
|
|
5735
5735
|
return true;
|
|
@@ -5740,25 +5740,25 @@ var require_windows = __commonJS({
|
|
|
5740
5740
|
}
|
|
5741
5741
|
for (var i = 0; i < pathext.length; i++) {
|
|
5742
5742
|
var p = pathext[i].toLowerCase();
|
|
5743
|
-
if (p &&
|
|
5743
|
+
if (p && path9.substr(-p.length).toLowerCase() === p) {
|
|
5744
5744
|
return true;
|
|
5745
5745
|
}
|
|
5746
5746
|
}
|
|
5747
5747
|
return false;
|
|
5748
5748
|
}
|
|
5749
|
-
function checkStat(stat,
|
|
5749
|
+
function checkStat(stat, path9, options) {
|
|
5750
5750
|
if (!stat.isSymbolicLink() && !stat.isFile()) {
|
|
5751
5751
|
return false;
|
|
5752
5752
|
}
|
|
5753
|
-
return checkPathExt(
|
|
5753
|
+
return checkPathExt(path9, options);
|
|
5754
5754
|
}
|
|
5755
|
-
function isexe(
|
|
5756
|
-
|
|
5757
|
-
cb(er, er ? false : checkStat(stat,
|
|
5755
|
+
function isexe(path9, options, cb) {
|
|
5756
|
+
fs8.stat(path9, function(er, stat) {
|
|
5757
|
+
cb(er, er ? false : checkStat(stat, path9, options));
|
|
5758
5758
|
});
|
|
5759
5759
|
}
|
|
5760
|
-
function sync3(
|
|
5761
|
-
return checkStat(
|
|
5760
|
+
function sync3(path9, options) {
|
|
5761
|
+
return checkStat(fs8.statSync(path9), path9, options);
|
|
5762
5762
|
}
|
|
5763
5763
|
}
|
|
5764
5764
|
});
|
|
@@ -5768,14 +5768,14 @@ var require_mode = __commonJS({
|
|
|
5768
5768
|
"../../node_modules/cross-spawn/node_modules/isexe/mode.js"(exports2, module2) {
|
|
5769
5769
|
module2.exports = isexe;
|
|
5770
5770
|
isexe.sync = sync3;
|
|
5771
|
-
var
|
|
5772
|
-
function isexe(
|
|
5773
|
-
|
|
5771
|
+
var fs8 = require("fs");
|
|
5772
|
+
function isexe(path9, options, cb) {
|
|
5773
|
+
fs8.stat(path9, function(er, stat) {
|
|
5774
5774
|
cb(er, er ? false : checkStat(stat, options));
|
|
5775
5775
|
});
|
|
5776
5776
|
}
|
|
5777
|
-
function sync3(
|
|
5778
|
-
return checkStat(
|
|
5777
|
+
function sync3(path9, options) {
|
|
5778
|
+
return checkStat(fs8.statSync(path9), options);
|
|
5779
5779
|
}
|
|
5780
5780
|
function checkStat(stat, options) {
|
|
5781
5781
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -5799,7 +5799,7 @@ var require_mode = __commonJS({
|
|
|
5799
5799
|
// ../../node_modules/cross-spawn/node_modules/isexe/index.js
|
|
5800
5800
|
var require_isexe = __commonJS({
|
|
5801
5801
|
"../../node_modules/cross-spawn/node_modules/isexe/index.js"(exports2, module2) {
|
|
5802
|
-
var
|
|
5802
|
+
var fs8 = require("fs");
|
|
5803
5803
|
var core;
|
|
5804
5804
|
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
5805
5805
|
core = require_windows();
|
|
@@ -5808,7 +5808,7 @@ var require_isexe = __commonJS({
|
|
|
5808
5808
|
}
|
|
5809
5809
|
module2.exports = isexe;
|
|
5810
5810
|
isexe.sync = sync3;
|
|
5811
|
-
function isexe(
|
|
5811
|
+
function isexe(path9, options, cb) {
|
|
5812
5812
|
if (typeof options === "function") {
|
|
5813
5813
|
cb = options;
|
|
5814
5814
|
options = {};
|
|
@@ -5818,7 +5818,7 @@ var require_isexe = __commonJS({
|
|
|
5818
5818
|
throw new TypeError("callback not provided");
|
|
5819
5819
|
}
|
|
5820
5820
|
return new Promise(function(resolve4, reject) {
|
|
5821
|
-
isexe(
|
|
5821
|
+
isexe(path9, options || {}, function(er, is) {
|
|
5822
5822
|
if (er) {
|
|
5823
5823
|
reject(er);
|
|
5824
5824
|
} else {
|
|
@@ -5827,7 +5827,7 @@ var require_isexe = __commonJS({
|
|
|
5827
5827
|
});
|
|
5828
5828
|
});
|
|
5829
5829
|
}
|
|
5830
|
-
core(
|
|
5830
|
+
core(path9, options || {}, function(er, is) {
|
|
5831
5831
|
if (er) {
|
|
5832
5832
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
5833
5833
|
er = null;
|
|
@@ -5837,9 +5837,9 @@ var require_isexe = __commonJS({
|
|
|
5837
5837
|
cb(er, is);
|
|
5838
5838
|
});
|
|
5839
5839
|
}
|
|
5840
|
-
function sync3(
|
|
5840
|
+
function sync3(path9, options) {
|
|
5841
5841
|
try {
|
|
5842
|
-
return core.sync(
|
|
5842
|
+
return core.sync(path9, options || {});
|
|
5843
5843
|
} catch (er) {
|
|
5844
5844
|
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
5845
5845
|
return false;
|
|
@@ -5855,7 +5855,7 @@ var require_isexe = __commonJS({
|
|
|
5855
5855
|
var require_which = __commonJS({
|
|
5856
5856
|
"../../node_modules/cross-spawn/node_modules/which/which.js"(exports2, module2) {
|
|
5857
5857
|
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
5858
|
-
var
|
|
5858
|
+
var path9 = require("path");
|
|
5859
5859
|
var COLON = isWindows ? ";" : ":";
|
|
5860
5860
|
var isexe = require_isexe();
|
|
5861
5861
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -5893,7 +5893,7 @@ var require_which = __commonJS({
|
|
|
5893
5893
|
return opt.all && found.length ? resolve4(found) : reject(getNotFoundError(cmd));
|
|
5894
5894
|
const ppRaw = pathEnv[i];
|
|
5895
5895
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
5896
|
-
const pCmd =
|
|
5896
|
+
const pCmd = path9.join(pathPart, cmd);
|
|
5897
5897
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
5898
5898
|
resolve4(subStep(p, i, 0));
|
|
5899
5899
|
});
|
|
@@ -5920,7 +5920,7 @@ var require_which = __commonJS({
|
|
|
5920
5920
|
for (let i = 0; i < pathEnv.length; i++) {
|
|
5921
5921
|
const ppRaw = pathEnv[i];
|
|
5922
5922
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
5923
|
-
const pCmd =
|
|
5923
|
+
const pCmd = path9.join(pathPart, cmd);
|
|
5924
5924
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
5925
5925
|
for (let j = 0; j < pathExt.length; j++) {
|
|
5926
5926
|
const cur = p + pathExt[j];
|
|
@@ -5968,7 +5968,7 @@ var require_path_key = __commonJS({
|
|
|
5968
5968
|
var require_resolveCommand = __commonJS({
|
|
5969
5969
|
"../../node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
|
|
5970
5970
|
"use strict";
|
|
5971
|
-
var
|
|
5971
|
+
var path9 = require("path");
|
|
5972
5972
|
var which = require_which();
|
|
5973
5973
|
var getPathKey = require_path_key();
|
|
5974
5974
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -5986,7 +5986,7 @@ var require_resolveCommand = __commonJS({
|
|
|
5986
5986
|
try {
|
|
5987
5987
|
resolved = which.sync(parsed.command, {
|
|
5988
5988
|
path: env[getPathKey({ env })],
|
|
5989
|
-
pathExt: withoutPathExt ?
|
|
5989
|
+
pathExt: withoutPathExt ? path9.delimiter : void 0
|
|
5990
5990
|
});
|
|
5991
5991
|
} catch (e) {
|
|
5992
5992
|
} finally {
|
|
@@ -5995,7 +5995,7 @@ var require_resolveCommand = __commonJS({
|
|
|
5995
5995
|
}
|
|
5996
5996
|
}
|
|
5997
5997
|
if (resolved) {
|
|
5998
|
-
resolved =
|
|
5998
|
+
resolved = path9.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
5999
5999
|
}
|
|
6000
6000
|
return resolved;
|
|
6001
6001
|
}
|
|
@@ -6049,8 +6049,8 @@ var require_shebang_command = __commonJS({
|
|
|
6049
6049
|
if (!match2) {
|
|
6050
6050
|
return null;
|
|
6051
6051
|
}
|
|
6052
|
-
const [
|
|
6053
|
-
const binary =
|
|
6052
|
+
const [path9, argument] = match2[0].replace(/#! ?/, "").split(" ");
|
|
6053
|
+
const binary = path9.split("/").pop();
|
|
6054
6054
|
if (binary === "env") {
|
|
6055
6055
|
return argument;
|
|
6056
6056
|
}
|
|
@@ -6063,16 +6063,16 @@ var require_shebang_command = __commonJS({
|
|
|
6063
6063
|
var require_readShebang = __commonJS({
|
|
6064
6064
|
"../../node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
|
|
6065
6065
|
"use strict";
|
|
6066
|
-
var
|
|
6066
|
+
var fs8 = require("fs");
|
|
6067
6067
|
var shebangCommand = require_shebang_command();
|
|
6068
6068
|
function readShebang(command) {
|
|
6069
6069
|
const size = 150;
|
|
6070
6070
|
const buffer = Buffer.alloc(size);
|
|
6071
6071
|
let fd;
|
|
6072
6072
|
try {
|
|
6073
|
-
fd =
|
|
6074
|
-
|
|
6075
|
-
|
|
6073
|
+
fd = fs8.openSync(command, "r");
|
|
6074
|
+
fs8.readSync(fd, buffer, 0, size, 0);
|
|
6075
|
+
fs8.closeSync(fd);
|
|
6076
6076
|
} catch (e) {
|
|
6077
6077
|
}
|
|
6078
6078
|
return shebangCommand(buffer.toString());
|
|
@@ -6085,7 +6085,7 @@ var require_readShebang = __commonJS({
|
|
|
6085
6085
|
var require_parse = __commonJS({
|
|
6086
6086
|
"../../node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
|
|
6087
6087
|
"use strict";
|
|
6088
|
-
var
|
|
6088
|
+
var path9 = require("path");
|
|
6089
6089
|
var resolveCommand = require_resolveCommand();
|
|
6090
6090
|
var escape2 = require_escape();
|
|
6091
6091
|
var readShebang = require_readShebang();
|
|
@@ -6110,7 +6110,7 @@ var require_parse = __commonJS({
|
|
|
6110
6110
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
6111
6111
|
if (parsed.options.forceShell || needsShell) {
|
|
6112
6112
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
6113
|
-
parsed.command =
|
|
6113
|
+
parsed.command = path9.normalize(parsed.command);
|
|
6114
6114
|
parsed.command = escape2.command(parsed.command);
|
|
6115
6115
|
parsed.args = parsed.args.map((arg) => escape2.argument(arg, needsDoubleEscapeMetaChars));
|
|
6116
6116
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
@@ -7145,9 +7145,9 @@ var require_pump = __commonJS({
|
|
|
7145
7145
|
"../../node_modules/pump/index.js"(exports2, module2) {
|
|
7146
7146
|
var once = require_once();
|
|
7147
7147
|
var eos = require_end_of_stream();
|
|
7148
|
-
var
|
|
7148
|
+
var fs8;
|
|
7149
7149
|
try {
|
|
7150
|
-
|
|
7150
|
+
fs8 = require("fs");
|
|
7151
7151
|
} catch (e) {
|
|
7152
7152
|
}
|
|
7153
7153
|
var noop = function() {
|
|
@@ -7158,8 +7158,8 @@ var require_pump = __commonJS({
|
|
|
7158
7158
|
};
|
|
7159
7159
|
var isFS = function(stream2) {
|
|
7160
7160
|
if (!ancient) return false;
|
|
7161
|
-
if (!
|
|
7162
|
-
return (stream2 instanceof (
|
|
7161
|
+
if (!fs8) return false;
|
|
7162
|
+
return (stream2 instanceof (fs8.ReadStream || noop) || stream2 instanceof (fs8.WriteStream || noop)) && isFn(stream2.close);
|
|
7163
7163
|
};
|
|
7164
7164
|
var isRequest = function(stream2) {
|
|
7165
7165
|
return stream2.setHeader && isFn(stream2.abort);
|
|
@@ -7371,7 +7371,7 @@ var require_pend = __commonJS({
|
|
|
7371
7371
|
// ../../node_modules/fd-slicer/index.js
|
|
7372
7372
|
var require_fd_slicer = __commonJS({
|
|
7373
7373
|
"../../node_modules/fd-slicer/index.js"(exports2) {
|
|
7374
|
-
var
|
|
7374
|
+
var fs8 = require("fs");
|
|
7375
7375
|
var util = require("util");
|
|
7376
7376
|
var stream2 = require("stream");
|
|
7377
7377
|
var Readable = stream2.Readable;
|
|
@@ -7396,7 +7396,7 @@ var require_fd_slicer = __commonJS({
|
|
|
7396
7396
|
FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
|
|
7397
7397
|
var self2 = this;
|
|
7398
7398
|
self2.pend.go(function(cb) {
|
|
7399
|
-
|
|
7399
|
+
fs8.read(self2.fd, buffer, offset, length, position, function(err, bytesRead, buffer2) {
|
|
7400
7400
|
cb();
|
|
7401
7401
|
callback(err, bytesRead, buffer2);
|
|
7402
7402
|
});
|
|
@@ -7405,7 +7405,7 @@ var require_fd_slicer = __commonJS({
|
|
|
7405
7405
|
FdSlicer.prototype.write = function(buffer, offset, length, position, callback) {
|
|
7406
7406
|
var self2 = this;
|
|
7407
7407
|
self2.pend.go(function(cb) {
|
|
7408
|
-
|
|
7408
|
+
fs8.write(self2.fd, buffer, offset, length, position, function(err, written, buffer2) {
|
|
7409
7409
|
cb();
|
|
7410
7410
|
callback(err, written, buffer2);
|
|
7411
7411
|
});
|
|
@@ -7426,7 +7426,7 @@ var require_fd_slicer = __commonJS({
|
|
|
7426
7426
|
if (self2.refCount > 0) return;
|
|
7427
7427
|
if (self2.refCount < 0) throw new Error("invalid unref");
|
|
7428
7428
|
if (self2.autoClose) {
|
|
7429
|
-
|
|
7429
|
+
fs8.close(self2.fd, onCloseDone);
|
|
7430
7430
|
}
|
|
7431
7431
|
function onCloseDone(err) {
|
|
7432
7432
|
if (err) {
|
|
@@ -7463,7 +7463,7 @@ var require_fd_slicer = __commonJS({
|
|
|
7463
7463
|
self2.context.pend.go(function(cb) {
|
|
7464
7464
|
if (self2.destroyed) return cb();
|
|
7465
7465
|
var buffer = new Buffer(toRead);
|
|
7466
|
-
|
|
7466
|
+
fs8.read(self2.context.fd, buffer, 0, toRead, self2.pos, function(err, bytesRead) {
|
|
7467
7467
|
if (err) {
|
|
7468
7468
|
self2.destroy(err);
|
|
7469
7469
|
} else if (bytesRead === 0) {
|
|
@@ -7510,7 +7510,7 @@ var require_fd_slicer = __commonJS({
|
|
|
7510
7510
|
}
|
|
7511
7511
|
self2.context.pend.go(function(cb) {
|
|
7512
7512
|
if (self2.destroyed) return cb();
|
|
7513
|
-
|
|
7513
|
+
fs8.write(self2.context.fd, buffer, 0, buffer.length, self2.pos, function(err2, bytes) {
|
|
7514
7514
|
if (err2) {
|
|
7515
7515
|
self2.destroy();
|
|
7516
7516
|
cb();
|
|
@@ -7937,7 +7937,7 @@ var require_buffer_crc32 = __commonJS({
|
|
|
7937
7937
|
// ../../node_modules/yauzl/index.js
|
|
7938
7938
|
var require_yauzl = __commonJS({
|
|
7939
7939
|
"../../node_modules/yauzl/index.js"(exports2) {
|
|
7940
|
-
var
|
|
7940
|
+
var fs8 = require("fs");
|
|
7941
7941
|
var zlib = require("zlib");
|
|
7942
7942
|
var fd_slicer = require_fd_slicer();
|
|
7943
7943
|
var crc32 = require_buffer_crc32();
|
|
@@ -7955,7 +7955,7 @@ var require_yauzl = __commonJS({
|
|
|
7955
7955
|
exports2.ZipFile = ZipFile;
|
|
7956
7956
|
exports2.Entry = Entry;
|
|
7957
7957
|
exports2.RandomAccessReader = RandomAccessReader;
|
|
7958
|
-
function open(
|
|
7958
|
+
function open(path9, options, callback) {
|
|
7959
7959
|
if (typeof options === "function") {
|
|
7960
7960
|
callback = options;
|
|
7961
7961
|
options = null;
|
|
@@ -7967,10 +7967,10 @@ var require_yauzl = __commonJS({
|
|
|
7967
7967
|
if (options.validateEntrySizes == null) options.validateEntrySizes = true;
|
|
7968
7968
|
if (options.strictFileNames == null) options.strictFileNames = false;
|
|
7969
7969
|
if (callback == null) callback = defaultCallback;
|
|
7970
|
-
|
|
7970
|
+
fs8.open(path9, "r", function(err, fd) {
|
|
7971
7971
|
if (err) return callback(err);
|
|
7972
7972
|
fromFd(fd, options, function(err2, zipfile) {
|
|
7973
|
-
if (err2)
|
|
7973
|
+
if (err2) fs8.close(fd, defaultCallback);
|
|
7974
7974
|
callback(err2, zipfile);
|
|
7975
7975
|
});
|
|
7976
7976
|
});
|
|
@@ -7987,7 +7987,7 @@ var require_yauzl = __commonJS({
|
|
|
7987
7987
|
if (options.validateEntrySizes == null) options.validateEntrySizes = true;
|
|
7988
7988
|
if (options.strictFileNames == null) options.strictFileNames = false;
|
|
7989
7989
|
if (callback == null) callback = defaultCallback;
|
|
7990
|
-
|
|
7990
|
+
fs8.fstat(fd, function(err, stats) {
|
|
7991
7991
|
if (err) return callback(err);
|
|
7992
7992
|
var reader = fd_slicer.createFromFd(fd, { autoClose: true });
|
|
7993
7993
|
fromRandomAccessReader(reader, stats.size, options, callback);
|
|
@@ -8567,9 +8567,9 @@ var require_yauzl = __commonJS({
|
|
|
8567
8567
|
var require_extract_zip = __commonJS({
|
|
8568
8568
|
"../../node_modules/extract-zip/index.js"(exports2, module2) {
|
|
8569
8569
|
var debug = require_src()("extract-zip");
|
|
8570
|
-
var { createWriteStream, promises:
|
|
8570
|
+
var { createWriteStream, promises: fs8 } = require("fs");
|
|
8571
8571
|
var getStream = require_get_stream();
|
|
8572
|
-
var
|
|
8572
|
+
var path9 = require("path");
|
|
8573
8573
|
var { promisify } = require("util");
|
|
8574
8574
|
var stream2 = require("stream");
|
|
8575
8575
|
var yauzl = require_yauzl();
|
|
@@ -8606,12 +8606,12 @@ var require_extract_zip = __commonJS({
|
|
|
8606
8606
|
this.zipfile.readEntry();
|
|
8607
8607
|
return;
|
|
8608
8608
|
}
|
|
8609
|
-
const destDir =
|
|
8609
|
+
const destDir = path9.dirname(path9.join(this.opts.dir, entry.fileName));
|
|
8610
8610
|
try {
|
|
8611
|
-
await
|
|
8612
|
-
const canonicalDestDir = await
|
|
8613
|
-
const relativeDestDir =
|
|
8614
|
-
if (relativeDestDir.split(
|
|
8611
|
+
await fs8.mkdir(destDir, { recursive: true });
|
|
8612
|
+
const canonicalDestDir = await fs8.realpath(destDir);
|
|
8613
|
+
const relativeDestDir = path9.relative(this.opts.dir, canonicalDestDir);
|
|
8614
|
+
if (relativeDestDir.split(path9.sep).includes("..")) {
|
|
8615
8615
|
throw new Error(`Out of bound path "${canonicalDestDir}" found while processing file ${entry.fileName}`);
|
|
8616
8616
|
}
|
|
8617
8617
|
await this.extractEntry(entry);
|
|
@@ -8633,7 +8633,7 @@ var require_extract_zip = __commonJS({
|
|
|
8633
8633
|
if (this.opts.onEntry) {
|
|
8634
8634
|
this.opts.onEntry(entry, this.zipfile);
|
|
8635
8635
|
}
|
|
8636
|
-
const dest =
|
|
8636
|
+
const dest = path9.join(this.opts.dir, entry.fileName);
|
|
8637
8637
|
const mode = entry.externalFileAttributes >> 16 & 65535;
|
|
8638
8638
|
const IFMT2 = 61440;
|
|
8639
8639
|
const IFDIR2 = 16384;
|
|
@@ -8647,20 +8647,20 @@ var require_extract_zip = __commonJS({
|
|
|
8647
8647
|
if (!isDir) isDir = madeBy === 0 && entry.externalFileAttributes === 16;
|
|
8648
8648
|
debug("extracting entry", { filename: entry.fileName, isDir, isSymlink: symlink });
|
|
8649
8649
|
const procMode = this.getExtractedMode(mode, isDir) & 511;
|
|
8650
|
-
const destDir = isDir ? dest :
|
|
8650
|
+
const destDir = isDir ? dest : path9.dirname(dest);
|
|
8651
8651
|
const mkdirOptions = { recursive: true };
|
|
8652
8652
|
if (isDir) {
|
|
8653
8653
|
mkdirOptions.mode = procMode;
|
|
8654
8654
|
}
|
|
8655
8655
|
debug("mkdir", { dir: destDir, ...mkdirOptions });
|
|
8656
|
-
await
|
|
8656
|
+
await fs8.mkdir(destDir, mkdirOptions);
|
|
8657
8657
|
if (isDir) return;
|
|
8658
8658
|
debug("opening read stream", dest);
|
|
8659
8659
|
const readStream = await promisify(this.zipfile.openReadStream.bind(this.zipfile))(entry);
|
|
8660
8660
|
if (symlink) {
|
|
8661
8661
|
const link = await getStream(readStream);
|
|
8662
8662
|
debug("creating symlink", link, dest);
|
|
8663
|
-
await
|
|
8663
|
+
await fs8.symlink(link, dest);
|
|
8664
8664
|
} else {
|
|
8665
8665
|
await pipeline(readStream, createWriteStream(dest, { mode: procMode }));
|
|
8666
8666
|
}
|
|
@@ -8689,11 +8689,11 @@ var require_extract_zip = __commonJS({
|
|
|
8689
8689
|
};
|
|
8690
8690
|
module2.exports = async function(zipPath, opts) {
|
|
8691
8691
|
debug("creating target directory", opts.dir);
|
|
8692
|
-
if (!
|
|
8692
|
+
if (!path9.isAbsolute(opts.dir)) {
|
|
8693
8693
|
throw new Error("Target directory is expected to be absolute");
|
|
8694
8694
|
}
|
|
8695
|
-
await
|
|
8696
|
-
opts.dir = await
|
|
8695
|
+
await fs8.mkdir(opts.dir, { recursive: true });
|
|
8696
|
+
opts.dir = await fs8.realpath(opts.dir);
|
|
8697
8697
|
return new Extractor(zipPath, opts).extract();
|
|
8698
8698
|
};
|
|
8699
8699
|
}
|
|
@@ -8980,7 +8980,7 @@ var require_BufferList = __commonJS({
|
|
|
8980
8980
|
this.head = this.tail = null;
|
|
8981
8981
|
this.length = 0;
|
|
8982
8982
|
};
|
|
8983
|
-
BufferList.prototype.join = function
|
|
8983
|
+
BufferList.prototype.join = function join5(s) {
|
|
8984
8984
|
if (this.length === 0) return "";
|
|
8985
8985
|
var p = this.head;
|
|
8986
8986
|
var ret = "" + p.data;
|
|
@@ -11567,8 +11567,8 @@ var require_utils = __commonJS({
|
|
|
11567
11567
|
var result = transform[inputType][outputType](input);
|
|
11568
11568
|
return result;
|
|
11569
11569
|
};
|
|
11570
|
-
exports2.resolve = function(
|
|
11571
|
-
var parts =
|
|
11570
|
+
exports2.resolve = function(path9) {
|
|
11571
|
+
var parts = path9.split("/");
|
|
11572
11572
|
var result = [];
|
|
11573
11573
|
for (var index2 = 0; index2 < parts.length; index2++) {
|
|
11574
11574
|
var part = parts[index2];
|
|
@@ -17421,18 +17421,18 @@ var require_object = __commonJS({
|
|
|
17421
17421
|
var object = new ZipObject(name, zipObjectContent, o);
|
|
17422
17422
|
this.files[name] = object;
|
|
17423
17423
|
};
|
|
17424
|
-
var parentFolder = function(
|
|
17425
|
-
if (
|
|
17426
|
-
|
|
17424
|
+
var parentFolder = function(path9) {
|
|
17425
|
+
if (path9.slice(-1) === "/") {
|
|
17426
|
+
path9 = path9.substring(0, path9.length - 1);
|
|
17427
17427
|
}
|
|
17428
|
-
var lastSlash =
|
|
17429
|
-
return lastSlash > 0 ?
|
|
17428
|
+
var lastSlash = path9.lastIndexOf("/");
|
|
17429
|
+
return lastSlash > 0 ? path9.substring(0, lastSlash) : "";
|
|
17430
17430
|
};
|
|
17431
|
-
var forceTrailingSlash = function(
|
|
17432
|
-
if (
|
|
17433
|
-
|
|
17431
|
+
var forceTrailingSlash = function(path9) {
|
|
17432
|
+
if (path9.slice(-1) !== "/") {
|
|
17433
|
+
path9 += "/";
|
|
17434
17434
|
}
|
|
17435
|
-
return
|
|
17435
|
+
return path9;
|
|
17436
17436
|
};
|
|
17437
17437
|
var folderAdd = function(name, createFolders) {
|
|
17438
17438
|
createFolders = typeof createFolders !== "undefined" ? createFolders : defaults2.createFolders;
|
|
@@ -18485,54 +18485,54 @@ var require_polyfills = __commonJS({
|
|
|
18485
18485
|
}
|
|
18486
18486
|
var chdir;
|
|
18487
18487
|
module2.exports = patch;
|
|
18488
|
-
function patch(
|
|
18488
|
+
function patch(fs8) {
|
|
18489
18489
|
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
18490
|
-
patchLchmod(
|
|
18491
|
-
}
|
|
18492
|
-
if (!
|
|
18493
|
-
patchLutimes(
|
|
18494
|
-
}
|
|
18495
|
-
|
|
18496
|
-
|
|
18497
|
-
|
|
18498
|
-
|
|
18499
|
-
|
|
18500
|
-
|
|
18501
|
-
|
|
18502
|
-
|
|
18503
|
-
|
|
18504
|
-
|
|
18505
|
-
|
|
18506
|
-
|
|
18507
|
-
|
|
18508
|
-
|
|
18509
|
-
|
|
18510
|
-
|
|
18511
|
-
|
|
18512
|
-
|
|
18513
|
-
if (
|
|
18514
|
-
|
|
18490
|
+
patchLchmod(fs8);
|
|
18491
|
+
}
|
|
18492
|
+
if (!fs8.lutimes) {
|
|
18493
|
+
patchLutimes(fs8);
|
|
18494
|
+
}
|
|
18495
|
+
fs8.chown = chownFix(fs8.chown);
|
|
18496
|
+
fs8.fchown = chownFix(fs8.fchown);
|
|
18497
|
+
fs8.lchown = chownFix(fs8.lchown);
|
|
18498
|
+
fs8.chmod = chmodFix(fs8.chmod);
|
|
18499
|
+
fs8.fchmod = chmodFix(fs8.fchmod);
|
|
18500
|
+
fs8.lchmod = chmodFix(fs8.lchmod);
|
|
18501
|
+
fs8.chownSync = chownFixSync(fs8.chownSync);
|
|
18502
|
+
fs8.fchownSync = chownFixSync(fs8.fchownSync);
|
|
18503
|
+
fs8.lchownSync = chownFixSync(fs8.lchownSync);
|
|
18504
|
+
fs8.chmodSync = chmodFixSync(fs8.chmodSync);
|
|
18505
|
+
fs8.fchmodSync = chmodFixSync(fs8.fchmodSync);
|
|
18506
|
+
fs8.lchmodSync = chmodFixSync(fs8.lchmodSync);
|
|
18507
|
+
fs8.stat = statFix(fs8.stat);
|
|
18508
|
+
fs8.fstat = statFix(fs8.fstat);
|
|
18509
|
+
fs8.lstat = statFix(fs8.lstat);
|
|
18510
|
+
fs8.statSync = statFixSync(fs8.statSync);
|
|
18511
|
+
fs8.fstatSync = statFixSync(fs8.fstatSync);
|
|
18512
|
+
fs8.lstatSync = statFixSync(fs8.lstatSync);
|
|
18513
|
+
if (fs8.chmod && !fs8.lchmod) {
|
|
18514
|
+
fs8.lchmod = function(path9, mode, cb) {
|
|
18515
18515
|
if (cb) process.nextTick(cb);
|
|
18516
18516
|
};
|
|
18517
|
-
|
|
18517
|
+
fs8.lchmodSync = function() {
|
|
18518
18518
|
};
|
|
18519
18519
|
}
|
|
18520
|
-
if (
|
|
18521
|
-
|
|
18520
|
+
if (fs8.chown && !fs8.lchown) {
|
|
18521
|
+
fs8.lchown = function(path9, uid, gid, cb) {
|
|
18522
18522
|
if (cb) process.nextTick(cb);
|
|
18523
18523
|
};
|
|
18524
|
-
|
|
18524
|
+
fs8.lchownSync = function() {
|
|
18525
18525
|
};
|
|
18526
18526
|
}
|
|
18527
18527
|
if (platform === "win32") {
|
|
18528
|
-
|
|
18528
|
+
fs8.rename = typeof fs8.rename !== "function" ? fs8.rename : (function(fs$rename) {
|
|
18529
18529
|
function rename(from2, to, cb) {
|
|
18530
18530
|
var start = Date.now();
|
|
18531
18531
|
var backoff = 0;
|
|
18532
18532
|
fs$rename(from2, to, function CB(er) {
|
|
18533
18533
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
18534
18534
|
setTimeout(function() {
|
|
18535
|
-
|
|
18535
|
+
fs8.stat(to, function(stater, st) {
|
|
18536
18536
|
if (stater && stater.code === "ENOENT")
|
|
18537
18537
|
fs$rename(from2, to, CB);
|
|
18538
18538
|
else
|
|
@@ -18548,9 +18548,9 @@ var require_polyfills = __commonJS({
|
|
|
18548
18548
|
}
|
|
18549
18549
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
18550
18550
|
return rename;
|
|
18551
|
-
})(
|
|
18551
|
+
})(fs8.rename);
|
|
18552
18552
|
}
|
|
18553
|
-
|
|
18553
|
+
fs8.read = typeof fs8.read !== "function" ? fs8.read : (function(fs$read) {
|
|
18554
18554
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
18555
18555
|
var callback;
|
|
18556
18556
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -18558,22 +18558,22 @@ var require_polyfills = __commonJS({
|
|
|
18558
18558
|
callback = function(er, _2, __) {
|
|
18559
18559
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
18560
18560
|
eagCounter++;
|
|
18561
|
-
return fs$read.call(
|
|
18561
|
+
return fs$read.call(fs8, fd, buffer, offset, length, position, callback);
|
|
18562
18562
|
}
|
|
18563
18563
|
callback_.apply(this, arguments);
|
|
18564
18564
|
};
|
|
18565
18565
|
}
|
|
18566
|
-
return fs$read.call(
|
|
18566
|
+
return fs$read.call(fs8, fd, buffer, offset, length, position, callback);
|
|
18567
18567
|
}
|
|
18568
18568
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
18569
18569
|
return read;
|
|
18570
|
-
})(
|
|
18571
|
-
|
|
18570
|
+
})(fs8.read);
|
|
18571
|
+
fs8.readSync = typeof fs8.readSync !== "function" ? fs8.readSync : /* @__PURE__ */ (function(fs$readSync) {
|
|
18572
18572
|
return function(fd, buffer, offset, length, position) {
|
|
18573
18573
|
var eagCounter = 0;
|
|
18574
18574
|
while (true) {
|
|
18575
18575
|
try {
|
|
18576
|
-
return fs$readSync.call(
|
|
18576
|
+
return fs$readSync.call(fs8, fd, buffer, offset, length, position);
|
|
18577
18577
|
} catch (er) {
|
|
18578
18578
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
18579
18579
|
eagCounter++;
|
|
@@ -18583,11 +18583,11 @@ var require_polyfills = __commonJS({
|
|
|
18583
18583
|
}
|
|
18584
18584
|
}
|
|
18585
18585
|
};
|
|
18586
|
-
})(
|
|
18587
|
-
function patchLchmod(
|
|
18588
|
-
|
|
18589
|
-
|
|
18590
|
-
|
|
18586
|
+
})(fs8.readSync);
|
|
18587
|
+
function patchLchmod(fs9) {
|
|
18588
|
+
fs9.lchmod = function(path9, mode, callback) {
|
|
18589
|
+
fs9.open(
|
|
18590
|
+
path9,
|
|
18591
18591
|
constants.O_WRONLY | constants.O_SYMLINK,
|
|
18592
18592
|
mode,
|
|
18593
18593
|
function(err, fd) {
|
|
@@ -18595,80 +18595,80 @@ var require_polyfills = __commonJS({
|
|
|
18595
18595
|
if (callback) callback(err);
|
|
18596
18596
|
return;
|
|
18597
18597
|
}
|
|
18598
|
-
|
|
18599
|
-
|
|
18598
|
+
fs9.fchmod(fd, mode, function(err2) {
|
|
18599
|
+
fs9.close(fd, function(err22) {
|
|
18600
18600
|
if (callback) callback(err2 || err22);
|
|
18601
18601
|
});
|
|
18602
18602
|
});
|
|
18603
18603
|
}
|
|
18604
18604
|
);
|
|
18605
18605
|
};
|
|
18606
|
-
|
|
18607
|
-
var fd =
|
|
18606
|
+
fs9.lchmodSync = function(path9, mode) {
|
|
18607
|
+
var fd = fs9.openSync(path9, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
18608
18608
|
var threw = true;
|
|
18609
18609
|
var ret;
|
|
18610
18610
|
try {
|
|
18611
|
-
ret =
|
|
18611
|
+
ret = fs9.fchmodSync(fd, mode);
|
|
18612
18612
|
threw = false;
|
|
18613
18613
|
} finally {
|
|
18614
18614
|
if (threw) {
|
|
18615
18615
|
try {
|
|
18616
|
-
|
|
18616
|
+
fs9.closeSync(fd);
|
|
18617
18617
|
} catch (er) {
|
|
18618
18618
|
}
|
|
18619
18619
|
} else {
|
|
18620
|
-
|
|
18620
|
+
fs9.closeSync(fd);
|
|
18621
18621
|
}
|
|
18622
18622
|
}
|
|
18623
18623
|
return ret;
|
|
18624
18624
|
};
|
|
18625
18625
|
}
|
|
18626
|
-
function patchLutimes(
|
|
18627
|
-
if (constants.hasOwnProperty("O_SYMLINK") &&
|
|
18628
|
-
|
|
18629
|
-
|
|
18626
|
+
function patchLutimes(fs9) {
|
|
18627
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs9.futimes) {
|
|
18628
|
+
fs9.lutimes = function(path9, at, mt, cb) {
|
|
18629
|
+
fs9.open(path9, constants.O_SYMLINK, function(er, fd) {
|
|
18630
18630
|
if (er) {
|
|
18631
18631
|
if (cb) cb(er);
|
|
18632
18632
|
return;
|
|
18633
18633
|
}
|
|
18634
|
-
|
|
18635
|
-
|
|
18634
|
+
fs9.futimes(fd, at, mt, function(er2) {
|
|
18635
|
+
fs9.close(fd, function(er22) {
|
|
18636
18636
|
if (cb) cb(er2 || er22);
|
|
18637
18637
|
});
|
|
18638
18638
|
});
|
|
18639
18639
|
});
|
|
18640
18640
|
};
|
|
18641
|
-
|
|
18642
|
-
var fd =
|
|
18641
|
+
fs9.lutimesSync = function(path9, at, mt) {
|
|
18642
|
+
var fd = fs9.openSync(path9, constants.O_SYMLINK);
|
|
18643
18643
|
var ret;
|
|
18644
18644
|
var threw = true;
|
|
18645
18645
|
try {
|
|
18646
|
-
ret =
|
|
18646
|
+
ret = fs9.futimesSync(fd, at, mt);
|
|
18647
18647
|
threw = false;
|
|
18648
18648
|
} finally {
|
|
18649
18649
|
if (threw) {
|
|
18650
18650
|
try {
|
|
18651
|
-
|
|
18651
|
+
fs9.closeSync(fd);
|
|
18652
18652
|
} catch (er) {
|
|
18653
18653
|
}
|
|
18654
18654
|
} else {
|
|
18655
|
-
|
|
18655
|
+
fs9.closeSync(fd);
|
|
18656
18656
|
}
|
|
18657
18657
|
}
|
|
18658
18658
|
return ret;
|
|
18659
18659
|
};
|
|
18660
|
-
} else if (
|
|
18661
|
-
|
|
18660
|
+
} else if (fs9.futimes) {
|
|
18661
|
+
fs9.lutimes = function(_a, _b, _c, cb) {
|
|
18662
18662
|
if (cb) process.nextTick(cb);
|
|
18663
18663
|
};
|
|
18664
|
-
|
|
18664
|
+
fs9.lutimesSync = function() {
|
|
18665
18665
|
};
|
|
18666
18666
|
}
|
|
18667
18667
|
}
|
|
18668
18668
|
function chmodFix(orig) {
|
|
18669
18669
|
if (!orig) return orig;
|
|
18670
18670
|
return function(target, mode, cb) {
|
|
18671
|
-
return orig.call(
|
|
18671
|
+
return orig.call(fs8, target, mode, function(er) {
|
|
18672
18672
|
if (chownErOk(er)) er = null;
|
|
18673
18673
|
if (cb) cb.apply(this, arguments);
|
|
18674
18674
|
});
|
|
@@ -18678,7 +18678,7 @@ var require_polyfills = __commonJS({
|
|
|
18678
18678
|
if (!orig) return orig;
|
|
18679
18679
|
return function(target, mode) {
|
|
18680
18680
|
try {
|
|
18681
|
-
return orig.call(
|
|
18681
|
+
return orig.call(fs8, target, mode);
|
|
18682
18682
|
} catch (er) {
|
|
18683
18683
|
if (!chownErOk(er)) throw er;
|
|
18684
18684
|
}
|
|
@@ -18687,7 +18687,7 @@ var require_polyfills = __commonJS({
|
|
|
18687
18687
|
function chownFix(orig) {
|
|
18688
18688
|
if (!orig) return orig;
|
|
18689
18689
|
return function(target, uid, gid, cb) {
|
|
18690
|
-
return orig.call(
|
|
18690
|
+
return orig.call(fs8, target, uid, gid, function(er) {
|
|
18691
18691
|
if (chownErOk(er)) er = null;
|
|
18692
18692
|
if (cb) cb.apply(this, arguments);
|
|
18693
18693
|
});
|
|
@@ -18697,7 +18697,7 @@ var require_polyfills = __commonJS({
|
|
|
18697
18697
|
if (!orig) return orig;
|
|
18698
18698
|
return function(target, uid, gid) {
|
|
18699
18699
|
try {
|
|
18700
|
-
return orig.call(
|
|
18700
|
+
return orig.call(fs8, target, uid, gid);
|
|
18701
18701
|
} catch (er) {
|
|
18702
18702
|
if (!chownErOk(er)) throw er;
|
|
18703
18703
|
}
|
|
@@ -18717,13 +18717,13 @@ var require_polyfills = __commonJS({
|
|
|
18717
18717
|
}
|
|
18718
18718
|
if (cb) cb.apply(this, arguments);
|
|
18719
18719
|
}
|
|
18720
|
-
return options ? orig.call(
|
|
18720
|
+
return options ? orig.call(fs8, target, options, callback) : orig.call(fs8, target, callback);
|
|
18721
18721
|
};
|
|
18722
18722
|
}
|
|
18723
18723
|
function statFixSync(orig) {
|
|
18724
18724
|
if (!orig) return orig;
|
|
18725
18725
|
return function(target, options) {
|
|
18726
|
-
var stats = options ? orig.call(
|
|
18726
|
+
var stats = options ? orig.call(fs8, target, options) : orig.call(fs8, target);
|
|
18727
18727
|
if (stats) {
|
|
18728
18728
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
18729
18729
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -18752,16 +18752,16 @@ var require_legacy_streams = __commonJS({
|
|
|
18752
18752
|
"../../node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
|
|
18753
18753
|
var Stream2 = require("stream").Stream;
|
|
18754
18754
|
module2.exports = legacy;
|
|
18755
|
-
function legacy(
|
|
18755
|
+
function legacy(fs8) {
|
|
18756
18756
|
return {
|
|
18757
18757
|
ReadStream,
|
|
18758
18758
|
WriteStream
|
|
18759
18759
|
};
|
|
18760
|
-
function ReadStream(
|
|
18761
|
-
if (!(this instanceof ReadStream)) return new ReadStream(
|
|
18760
|
+
function ReadStream(path9, options) {
|
|
18761
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path9, options);
|
|
18762
18762
|
Stream2.call(this);
|
|
18763
18763
|
var self2 = this;
|
|
18764
|
-
this.path =
|
|
18764
|
+
this.path = path9;
|
|
18765
18765
|
this.fd = null;
|
|
18766
18766
|
this.readable = true;
|
|
18767
18767
|
this.paused = false;
|
|
@@ -18795,7 +18795,7 @@ var require_legacy_streams = __commonJS({
|
|
|
18795
18795
|
});
|
|
18796
18796
|
return;
|
|
18797
18797
|
}
|
|
18798
|
-
|
|
18798
|
+
fs8.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
18799
18799
|
if (err) {
|
|
18800
18800
|
self2.emit("error", err);
|
|
18801
18801
|
self2.readable = false;
|
|
@@ -18806,10 +18806,10 @@ var require_legacy_streams = __commonJS({
|
|
|
18806
18806
|
self2._read();
|
|
18807
18807
|
});
|
|
18808
18808
|
}
|
|
18809
|
-
function WriteStream(
|
|
18810
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
18809
|
+
function WriteStream(path9, options) {
|
|
18810
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path9, options);
|
|
18811
18811
|
Stream2.call(this);
|
|
18812
|
-
this.path =
|
|
18812
|
+
this.path = path9;
|
|
18813
18813
|
this.fd = null;
|
|
18814
18814
|
this.writable = true;
|
|
18815
18815
|
this.flags = "w";
|
|
@@ -18834,7 +18834,7 @@ var require_legacy_streams = __commonJS({
|
|
|
18834
18834
|
this.busy = false;
|
|
18835
18835
|
this._queue = [];
|
|
18836
18836
|
if (this.fd === null) {
|
|
18837
|
-
this._open =
|
|
18837
|
+
this._open = fs8.open;
|
|
18838
18838
|
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
18839
18839
|
this.flush();
|
|
18840
18840
|
}
|
|
@@ -18869,7 +18869,7 @@ var require_clone = __commonJS({
|
|
|
18869
18869
|
// ../../node_modules/graceful-fs/graceful-fs.js
|
|
18870
18870
|
var require_graceful_fs = __commonJS({
|
|
18871
18871
|
"../../node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
|
18872
|
-
var
|
|
18872
|
+
var fs8 = require("fs");
|
|
18873
18873
|
var polyfills = require_polyfills();
|
|
18874
18874
|
var legacy = require_legacy_streams();
|
|
18875
18875
|
var clone = require_clone();
|
|
@@ -18901,12 +18901,12 @@ var require_graceful_fs = __commonJS({
|
|
|
18901
18901
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
18902
18902
|
console.error(m);
|
|
18903
18903
|
};
|
|
18904
|
-
if (!
|
|
18904
|
+
if (!fs8[gracefulQueue]) {
|
|
18905
18905
|
queue = global[gracefulQueue] || [];
|
|
18906
|
-
publishQueue(
|
|
18907
|
-
|
|
18906
|
+
publishQueue(fs8, queue);
|
|
18907
|
+
fs8.close = (function(fs$close) {
|
|
18908
18908
|
function close(fd, cb) {
|
|
18909
|
-
return fs$close.call(
|
|
18909
|
+
return fs$close.call(fs8, fd, function(err) {
|
|
18910
18910
|
if (!err) {
|
|
18911
18911
|
resetQueue();
|
|
18912
18912
|
}
|
|
@@ -18918,48 +18918,48 @@ var require_graceful_fs = __commonJS({
|
|
|
18918
18918
|
value: fs$close
|
|
18919
18919
|
});
|
|
18920
18920
|
return close;
|
|
18921
|
-
})(
|
|
18922
|
-
|
|
18921
|
+
})(fs8.close);
|
|
18922
|
+
fs8.closeSync = (function(fs$closeSync) {
|
|
18923
18923
|
function closeSync(fd) {
|
|
18924
|
-
fs$closeSync.apply(
|
|
18924
|
+
fs$closeSync.apply(fs8, arguments);
|
|
18925
18925
|
resetQueue();
|
|
18926
18926
|
}
|
|
18927
18927
|
Object.defineProperty(closeSync, previousSymbol, {
|
|
18928
18928
|
value: fs$closeSync
|
|
18929
18929
|
});
|
|
18930
18930
|
return closeSync;
|
|
18931
|
-
})(
|
|
18931
|
+
})(fs8.closeSync);
|
|
18932
18932
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
18933
18933
|
process.on("exit", function() {
|
|
18934
|
-
debug(
|
|
18935
|
-
require("assert").equal(
|
|
18934
|
+
debug(fs8[gracefulQueue]);
|
|
18935
|
+
require("assert").equal(fs8[gracefulQueue].length, 0);
|
|
18936
18936
|
});
|
|
18937
18937
|
}
|
|
18938
18938
|
}
|
|
18939
18939
|
var queue;
|
|
18940
18940
|
if (!global[gracefulQueue]) {
|
|
18941
|
-
publishQueue(global,
|
|
18942
|
-
}
|
|
18943
|
-
module2.exports = patch(clone(
|
|
18944
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
18945
|
-
module2.exports = patch(
|
|
18946
|
-
|
|
18947
|
-
}
|
|
18948
|
-
function patch(
|
|
18949
|
-
polyfills(
|
|
18950
|
-
|
|
18951
|
-
|
|
18952
|
-
|
|
18953
|
-
var fs$readFile =
|
|
18954
|
-
|
|
18955
|
-
function readFile(
|
|
18941
|
+
publishQueue(global, fs8[gracefulQueue]);
|
|
18942
|
+
}
|
|
18943
|
+
module2.exports = patch(clone(fs8));
|
|
18944
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs8.__patched) {
|
|
18945
|
+
module2.exports = patch(fs8);
|
|
18946
|
+
fs8.__patched = true;
|
|
18947
|
+
}
|
|
18948
|
+
function patch(fs9) {
|
|
18949
|
+
polyfills(fs9);
|
|
18950
|
+
fs9.gracefulify = patch;
|
|
18951
|
+
fs9.createReadStream = createReadStream;
|
|
18952
|
+
fs9.createWriteStream = createWriteStream;
|
|
18953
|
+
var fs$readFile = fs9.readFile;
|
|
18954
|
+
fs9.readFile = readFile;
|
|
18955
|
+
function readFile(path9, options, cb) {
|
|
18956
18956
|
if (typeof options === "function")
|
|
18957
18957
|
cb = options, options = null;
|
|
18958
|
-
return go$readFile(
|
|
18959
|
-
function go$readFile(
|
|
18960
|
-
return fs$readFile(
|
|
18958
|
+
return go$readFile(path9, options, cb);
|
|
18959
|
+
function go$readFile(path10, options2, cb2, startTime) {
|
|
18960
|
+
return fs$readFile(path10, options2, function(err) {
|
|
18961
18961
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
18962
|
-
enqueue([go$readFile, [
|
|
18962
|
+
enqueue([go$readFile, [path10, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
18963
18963
|
else {
|
|
18964
18964
|
if (typeof cb2 === "function")
|
|
18965
18965
|
cb2.apply(this, arguments);
|
|
@@ -18967,16 +18967,16 @@ var require_graceful_fs = __commonJS({
|
|
|
18967
18967
|
});
|
|
18968
18968
|
}
|
|
18969
18969
|
}
|
|
18970
|
-
var fs$writeFile =
|
|
18971
|
-
|
|
18972
|
-
function writeFile(
|
|
18970
|
+
var fs$writeFile = fs9.writeFile;
|
|
18971
|
+
fs9.writeFile = writeFile;
|
|
18972
|
+
function writeFile(path9, data, options, cb) {
|
|
18973
18973
|
if (typeof options === "function")
|
|
18974
18974
|
cb = options, options = null;
|
|
18975
|
-
return go$writeFile(
|
|
18976
|
-
function go$writeFile(
|
|
18977
|
-
return fs$writeFile(
|
|
18975
|
+
return go$writeFile(path9, data, options, cb);
|
|
18976
|
+
function go$writeFile(path10, data2, options2, cb2, startTime) {
|
|
18977
|
+
return fs$writeFile(path10, data2, options2, function(err) {
|
|
18978
18978
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
18979
|
-
enqueue([go$writeFile, [
|
|
18979
|
+
enqueue([go$writeFile, [path10, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
18980
18980
|
else {
|
|
18981
18981
|
if (typeof cb2 === "function")
|
|
18982
18982
|
cb2.apply(this, arguments);
|
|
@@ -18984,17 +18984,17 @@ var require_graceful_fs = __commonJS({
|
|
|
18984
18984
|
});
|
|
18985
18985
|
}
|
|
18986
18986
|
}
|
|
18987
|
-
var fs$appendFile =
|
|
18987
|
+
var fs$appendFile = fs9.appendFile;
|
|
18988
18988
|
if (fs$appendFile)
|
|
18989
|
-
|
|
18990
|
-
function appendFile(
|
|
18989
|
+
fs9.appendFile = appendFile;
|
|
18990
|
+
function appendFile(path9, data, options, cb) {
|
|
18991
18991
|
if (typeof options === "function")
|
|
18992
18992
|
cb = options, options = null;
|
|
18993
|
-
return go$appendFile(
|
|
18994
|
-
function go$appendFile(
|
|
18995
|
-
return fs$appendFile(
|
|
18993
|
+
return go$appendFile(path9, data, options, cb);
|
|
18994
|
+
function go$appendFile(path10, data2, options2, cb2, startTime) {
|
|
18995
|
+
return fs$appendFile(path10, data2, options2, function(err) {
|
|
18996
18996
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
18997
|
-
enqueue([go$appendFile, [
|
|
18997
|
+
enqueue([go$appendFile, [path10, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
18998
18998
|
else {
|
|
18999
18999
|
if (typeof cb2 === "function")
|
|
19000
19000
|
cb2.apply(this, arguments);
|
|
@@ -19002,9 +19002,9 @@ var require_graceful_fs = __commonJS({
|
|
|
19002
19002
|
});
|
|
19003
19003
|
}
|
|
19004
19004
|
}
|
|
19005
|
-
var fs$copyFile =
|
|
19005
|
+
var fs$copyFile = fs9.copyFile;
|
|
19006
19006
|
if (fs$copyFile)
|
|
19007
|
-
|
|
19007
|
+
fs9.copyFile = copyFile;
|
|
19008
19008
|
function copyFile(src, dest, flags, cb) {
|
|
19009
19009
|
if (typeof flags === "function") {
|
|
19010
19010
|
cb = flags;
|
|
@@ -19022,34 +19022,34 @@ var require_graceful_fs = __commonJS({
|
|
|
19022
19022
|
});
|
|
19023
19023
|
}
|
|
19024
19024
|
}
|
|
19025
|
-
var fs$readdir =
|
|
19026
|
-
|
|
19025
|
+
var fs$readdir = fs9.readdir;
|
|
19026
|
+
fs9.readdir = readdir2;
|
|
19027
19027
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
19028
|
-
function readdir2(
|
|
19028
|
+
function readdir2(path9, options, cb) {
|
|
19029
19029
|
if (typeof options === "function")
|
|
19030
19030
|
cb = options, options = null;
|
|
19031
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(
|
|
19032
|
-
return fs$readdir(
|
|
19033
|
-
|
|
19031
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path10, options2, cb2, startTime) {
|
|
19032
|
+
return fs$readdir(path10, fs$readdirCallback(
|
|
19033
|
+
path10,
|
|
19034
19034
|
options2,
|
|
19035
19035
|
cb2,
|
|
19036
19036
|
startTime
|
|
19037
19037
|
));
|
|
19038
|
-
} : function go$readdir2(
|
|
19039
|
-
return fs$readdir(
|
|
19040
|
-
|
|
19038
|
+
} : function go$readdir2(path10, options2, cb2, startTime) {
|
|
19039
|
+
return fs$readdir(path10, options2, fs$readdirCallback(
|
|
19040
|
+
path10,
|
|
19041
19041
|
options2,
|
|
19042
19042
|
cb2,
|
|
19043
19043
|
startTime
|
|
19044
19044
|
));
|
|
19045
19045
|
};
|
|
19046
|
-
return go$readdir(
|
|
19047
|
-
function fs$readdirCallback(
|
|
19046
|
+
return go$readdir(path9, options, cb);
|
|
19047
|
+
function fs$readdirCallback(path10, options2, cb2, startTime) {
|
|
19048
19048
|
return function(err, files) {
|
|
19049
19049
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
19050
19050
|
enqueue([
|
|
19051
19051
|
go$readdir,
|
|
19052
|
-
[
|
|
19052
|
+
[path10, options2, cb2],
|
|
19053
19053
|
err,
|
|
19054
19054
|
startTime || Date.now(),
|
|
19055
19055
|
Date.now()
|
|
@@ -19064,21 +19064,21 @@ var require_graceful_fs = __commonJS({
|
|
|
19064
19064
|
}
|
|
19065
19065
|
}
|
|
19066
19066
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
19067
|
-
var legStreams = legacy(
|
|
19067
|
+
var legStreams = legacy(fs9);
|
|
19068
19068
|
ReadStream = legStreams.ReadStream;
|
|
19069
19069
|
WriteStream = legStreams.WriteStream;
|
|
19070
19070
|
}
|
|
19071
|
-
var fs$ReadStream =
|
|
19071
|
+
var fs$ReadStream = fs9.ReadStream;
|
|
19072
19072
|
if (fs$ReadStream) {
|
|
19073
19073
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
19074
19074
|
ReadStream.prototype.open = ReadStream$open;
|
|
19075
19075
|
}
|
|
19076
|
-
var fs$WriteStream =
|
|
19076
|
+
var fs$WriteStream = fs9.WriteStream;
|
|
19077
19077
|
if (fs$WriteStream) {
|
|
19078
19078
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
19079
19079
|
WriteStream.prototype.open = WriteStream$open;
|
|
19080
19080
|
}
|
|
19081
|
-
Object.defineProperty(
|
|
19081
|
+
Object.defineProperty(fs9, "ReadStream", {
|
|
19082
19082
|
get: function() {
|
|
19083
19083
|
return ReadStream;
|
|
19084
19084
|
},
|
|
@@ -19088,7 +19088,7 @@ var require_graceful_fs = __commonJS({
|
|
|
19088
19088
|
enumerable: true,
|
|
19089
19089
|
configurable: true
|
|
19090
19090
|
});
|
|
19091
|
-
Object.defineProperty(
|
|
19091
|
+
Object.defineProperty(fs9, "WriteStream", {
|
|
19092
19092
|
get: function() {
|
|
19093
19093
|
return WriteStream;
|
|
19094
19094
|
},
|
|
@@ -19099,7 +19099,7 @@ var require_graceful_fs = __commonJS({
|
|
|
19099
19099
|
configurable: true
|
|
19100
19100
|
});
|
|
19101
19101
|
var FileReadStream = ReadStream;
|
|
19102
|
-
Object.defineProperty(
|
|
19102
|
+
Object.defineProperty(fs9, "FileReadStream", {
|
|
19103
19103
|
get: function() {
|
|
19104
19104
|
return FileReadStream;
|
|
19105
19105
|
},
|
|
@@ -19110,7 +19110,7 @@ var require_graceful_fs = __commonJS({
|
|
|
19110
19110
|
configurable: true
|
|
19111
19111
|
});
|
|
19112
19112
|
var FileWriteStream = WriteStream;
|
|
19113
|
-
Object.defineProperty(
|
|
19113
|
+
Object.defineProperty(fs9, "FileWriteStream", {
|
|
19114
19114
|
get: function() {
|
|
19115
19115
|
return FileWriteStream;
|
|
19116
19116
|
},
|
|
@@ -19120,7 +19120,7 @@ var require_graceful_fs = __commonJS({
|
|
|
19120
19120
|
enumerable: true,
|
|
19121
19121
|
configurable: true
|
|
19122
19122
|
});
|
|
19123
|
-
function ReadStream(
|
|
19123
|
+
function ReadStream(path9, options) {
|
|
19124
19124
|
if (this instanceof ReadStream)
|
|
19125
19125
|
return fs$ReadStream.apply(this, arguments), this;
|
|
19126
19126
|
else
|
|
@@ -19140,7 +19140,7 @@ var require_graceful_fs = __commonJS({
|
|
|
19140
19140
|
}
|
|
19141
19141
|
});
|
|
19142
19142
|
}
|
|
19143
|
-
function WriteStream(
|
|
19143
|
+
function WriteStream(path9, options) {
|
|
19144
19144
|
if (this instanceof WriteStream)
|
|
19145
19145
|
return fs$WriteStream.apply(this, arguments), this;
|
|
19146
19146
|
else
|
|
@@ -19158,22 +19158,22 @@ var require_graceful_fs = __commonJS({
|
|
|
19158
19158
|
}
|
|
19159
19159
|
});
|
|
19160
19160
|
}
|
|
19161
|
-
function createReadStream(
|
|
19162
|
-
return new
|
|
19161
|
+
function createReadStream(path9, options) {
|
|
19162
|
+
return new fs9.ReadStream(path9, options);
|
|
19163
19163
|
}
|
|
19164
|
-
function createWriteStream(
|
|
19165
|
-
return new
|
|
19164
|
+
function createWriteStream(path9, options) {
|
|
19165
|
+
return new fs9.WriteStream(path9, options);
|
|
19166
19166
|
}
|
|
19167
|
-
var fs$open =
|
|
19168
|
-
|
|
19169
|
-
function open(
|
|
19167
|
+
var fs$open = fs9.open;
|
|
19168
|
+
fs9.open = open;
|
|
19169
|
+
function open(path9, flags, mode, cb) {
|
|
19170
19170
|
if (typeof mode === "function")
|
|
19171
19171
|
cb = mode, mode = null;
|
|
19172
|
-
return go$open(
|
|
19173
|
-
function go$open(
|
|
19174
|
-
return fs$open(
|
|
19172
|
+
return go$open(path9, flags, mode, cb);
|
|
19173
|
+
function go$open(path10, flags2, mode2, cb2, startTime) {
|
|
19174
|
+
return fs$open(path10, flags2, mode2, function(err, fd) {
|
|
19175
19175
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
19176
|
-
enqueue([go$open, [
|
|
19176
|
+
enqueue([go$open, [path10, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
19177
19177
|
else {
|
|
19178
19178
|
if (typeof cb2 === "function")
|
|
19179
19179
|
cb2.apply(this, arguments);
|
|
@@ -19181,20 +19181,20 @@ var require_graceful_fs = __commonJS({
|
|
|
19181
19181
|
});
|
|
19182
19182
|
}
|
|
19183
19183
|
}
|
|
19184
|
-
return
|
|
19184
|
+
return fs9;
|
|
19185
19185
|
}
|
|
19186
19186
|
function enqueue(elem) {
|
|
19187
19187
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
19188
|
-
|
|
19188
|
+
fs8[gracefulQueue].push(elem);
|
|
19189
19189
|
retry();
|
|
19190
19190
|
}
|
|
19191
19191
|
var retryTimer;
|
|
19192
19192
|
function resetQueue() {
|
|
19193
19193
|
var now = Date.now();
|
|
19194
|
-
for (var i = 0; i <
|
|
19195
|
-
if (
|
|
19196
|
-
|
|
19197
|
-
|
|
19194
|
+
for (var i = 0; i < fs8[gracefulQueue].length; ++i) {
|
|
19195
|
+
if (fs8[gracefulQueue][i].length > 2) {
|
|
19196
|
+
fs8[gracefulQueue][i][3] = now;
|
|
19197
|
+
fs8[gracefulQueue][i][4] = now;
|
|
19198
19198
|
}
|
|
19199
19199
|
}
|
|
19200
19200
|
retry();
|
|
@@ -19202,9 +19202,9 @@ var require_graceful_fs = __commonJS({
|
|
|
19202
19202
|
function retry() {
|
|
19203
19203
|
clearTimeout(retryTimer);
|
|
19204
19204
|
retryTimer = void 0;
|
|
19205
|
-
if (
|
|
19205
|
+
if (fs8[gracefulQueue].length === 0)
|
|
19206
19206
|
return;
|
|
19207
|
-
var elem =
|
|
19207
|
+
var elem = fs8[gracefulQueue].shift();
|
|
19208
19208
|
var fn = elem[0];
|
|
19209
19209
|
var args = elem[1];
|
|
19210
19210
|
var err = elem[2];
|
|
@@ -19226,7 +19226,7 @@ var require_graceful_fs = __commonJS({
|
|
|
19226
19226
|
debug("RETRY", fn.name, args);
|
|
19227
19227
|
fn.apply(null, args.concat([startTime]));
|
|
19228
19228
|
} else {
|
|
19229
|
-
|
|
19229
|
+
fs8[gracefulQueue].push(elem);
|
|
19230
19230
|
}
|
|
19231
19231
|
}
|
|
19232
19232
|
if (retryTimer === void 0) {
|
|
@@ -19241,7 +19241,7 @@ var require_fs = __commonJS({
|
|
|
19241
19241
|
"../../node_modules/fs-extra/lib/fs/index.js"(exports2) {
|
|
19242
19242
|
"use strict";
|
|
19243
19243
|
var u = require_universalify().fromCallback;
|
|
19244
|
-
var
|
|
19244
|
+
var fs8 = require_graceful_fs();
|
|
19245
19245
|
var api = [
|
|
19246
19246
|
"access",
|
|
19247
19247
|
"appendFile",
|
|
@@ -19282,26 +19282,26 @@ var require_fs = __commonJS({
|
|
|
19282
19282
|
"utimes",
|
|
19283
19283
|
"writeFile"
|
|
19284
19284
|
].filter((key) => {
|
|
19285
|
-
return typeof
|
|
19285
|
+
return typeof fs8[key] === "function";
|
|
19286
19286
|
});
|
|
19287
|
-
Object.assign(exports2,
|
|
19287
|
+
Object.assign(exports2, fs8);
|
|
19288
19288
|
api.forEach((method) => {
|
|
19289
|
-
exports2[method] = u(
|
|
19289
|
+
exports2[method] = u(fs8[method]);
|
|
19290
19290
|
});
|
|
19291
19291
|
exports2.exists = function(filename, callback) {
|
|
19292
19292
|
if (typeof callback === "function") {
|
|
19293
|
-
return
|
|
19293
|
+
return fs8.exists(filename, callback);
|
|
19294
19294
|
}
|
|
19295
19295
|
return new Promise((resolve4) => {
|
|
19296
|
-
return
|
|
19296
|
+
return fs8.exists(filename, resolve4);
|
|
19297
19297
|
});
|
|
19298
19298
|
};
|
|
19299
19299
|
exports2.read = function(fd, buffer, offset, length, position, callback) {
|
|
19300
19300
|
if (typeof callback === "function") {
|
|
19301
|
-
return
|
|
19301
|
+
return fs8.read(fd, buffer, offset, length, position, callback);
|
|
19302
19302
|
}
|
|
19303
19303
|
return new Promise((resolve4, reject) => {
|
|
19304
|
-
|
|
19304
|
+
fs8.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
19305
19305
|
if (err) return reject(err);
|
|
19306
19306
|
resolve4({ bytesRead, buffer: buffer2 });
|
|
19307
19307
|
});
|
|
@@ -19309,10 +19309,10 @@ var require_fs = __commonJS({
|
|
|
19309
19309
|
};
|
|
19310
19310
|
exports2.write = function(fd, buffer, ...args) {
|
|
19311
19311
|
if (typeof args[args.length - 1] === "function") {
|
|
19312
|
-
return
|
|
19312
|
+
return fs8.write(fd, buffer, ...args);
|
|
19313
19313
|
}
|
|
19314
19314
|
return new Promise((resolve4, reject) => {
|
|
19315
|
-
|
|
19315
|
+
fs8.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
19316
19316
|
if (err) return reject(err);
|
|
19317
19317
|
resolve4({ bytesWritten, buffer: buffer2 });
|
|
19318
19318
|
});
|
|
@@ -19320,10 +19320,10 @@ var require_fs = __commonJS({
|
|
|
19320
19320
|
};
|
|
19321
19321
|
exports2.readv = function(fd, buffers, ...args) {
|
|
19322
19322
|
if (typeof args[args.length - 1] === "function") {
|
|
19323
|
-
return
|
|
19323
|
+
return fs8.readv(fd, buffers, ...args);
|
|
19324
19324
|
}
|
|
19325
19325
|
return new Promise((resolve4, reject) => {
|
|
19326
|
-
|
|
19326
|
+
fs8.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
|
|
19327
19327
|
if (err) return reject(err);
|
|
19328
19328
|
resolve4({ bytesRead, buffers: buffers2 });
|
|
19329
19329
|
});
|
|
@@ -19331,17 +19331,17 @@ var require_fs = __commonJS({
|
|
|
19331
19331
|
};
|
|
19332
19332
|
exports2.writev = function(fd, buffers, ...args) {
|
|
19333
19333
|
if (typeof args[args.length - 1] === "function") {
|
|
19334
|
-
return
|
|
19334
|
+
return fs8.writev(fd, buffers, ...args);
|
|
19335
19335
|
}
|
|
19336
19336
|
return new Promise((resolve4, reject) => {
|
|
19337
|
-
|
|
19337
|
+
fs8.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
|
19338
19338
|
if (err) return reject(err);
|
|
19339
19339
|
resolve4({ bytesWritten, buffers: buffers2 });
|
|
19340
19340
|
});
|
|
19341
19341
|
});
|
|
19342
19342
|
};
|
|
19343
|
-
if (typeof
|
|
19344
|
-
exports2.realpath.native = u(
|
|
19343
|
+
if (typeof fs8.realpath.native === "function") {
|
|
19344
|
+
exports2.realpath.native = u(fs8.realpath.native);
|
|
19345
19345
|
} else {
|
|
19346
19346
|
process.emitWarning(
|
|
19347
19347
|
"fs.realpath.native is not a function. Is fs being monkey-patched?",
|
|
@@ -19356,10 +19356,10 @@ var require_fs = __commonJS({
|
|
|
19356
19356
|
var require_utils2 = __commonJS({
|
|
19357
19357
|
"../../node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) {
|
|
19358
19358
|
"use strict";
|
|
19359
|
-
var
|
|
19359
|
+
var path9 = require("path");
|
|
19360
19360
|
module2.exports.checkPath = function checkPath(pth) {
|
|
19361
19361
|
if (process.platform === "win32") {
|
|
19362
|
-
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(
|
|
19362
|
+
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path9.parse(pth).root, ""));
|
|
19363
19363
|
if (pathHasInvalidWinCharacters) {
|
|
19364
19364
|
const error = new Error(`Path contains invalid characters: ${pth}`);
|
|
19365
19365
|
error.code = "EINVAL";
|
|
@@ -19374,7 +19374,7 @@ var require_utils2 = __commonJS({
|
|
|
19374
19374
|
var require_make_dir = __commonJS({
|
|
19375
19375
|
"../../node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
|
|
19376
19376
|
"use strict";
|
|
19377
|
-
var
|
|
19377
|
+
var fs8 = require_fs();
|
|
19378
19378
|
var { checkPath } = require_utils2();
|
|
19379
19379
|
var getMode = (options) => {
|
|
19380
19380
|
const defaults2 = { mode: 511 };
|
|
@@ -19383,14 +19383,14 @@ var require_make_dir = __commonJS({
|
|
|
19383
19383
|
};
|
|
19384
19384
|
module2.exports.makeDir = async (dir, options) => {
|
|
19385
19385
|
checkPath(dir);
|
|
19386
|
-
return
|
|
19386
|
+
return fs8.mkdir(dir, {
|
|
19387
19387
|
mode: getMode(options),
|
|
19388
19388
|
recursive: true
|
|
19389
19389
|
});
|
|
19390
19390
|
};
|
|
19391
19391
|
module2.exports.makeDirSync = (dir, options) => {
|
|
19392
19392
|
checkPath(dir);
|
|
19393
|
-
return
|
|
19393
|
+
return fs8.mkdirSync(dir, {
|
|
19394
19394
|
mode: getMode(options),
|
|
19395
19395
|
recursive: true
|
|
19396
19396
|
});
|
|
@@ -19422,13 +19422,13 @@ var require_path_exists = __commonJS({
|
|
|
19422
19422
|
"../../node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
|
|
19423
19423
|
"use strict";
|
|
19424
19424
|
var u = require_universalify().fromPromise;
|
|
19425
|
-
var
|
|
19426
|
-
function pathExists(
|
|
19427
|
-
return
|
|
19425
|
+
var fs8 = require_fs();
|
|
19426
|
+
function pathExists(path9) {
|
|
19427
|
+
return fs8.access(path9).then(() => true).catch(() => false);
|
|
19428
19428
|
}
|
|
19429
19429
|
module2.exports = {
|
|
19430
19430
|
pathExists: u(pathExists),
|
|
19431
|
-
pathExistsSync:
|
|
19431
|
+
pathExistsSync: fs8.existsSync
|
|
19432
19432
|
};
|
|
19433
19433
|
}
|
|
19434
19434
|
});
|
|
@@ -19437,16 +19437,16 @@ var require_path_exists = __commonJS({
|
|
|
19437
19437
|
var require_utimes = __commonJS({
|
|
19438
19438
|
"../../node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
|
|
19439
19439
|
"use strict";
|
|
19440
|
-
var
|
|
19440
|
+
var fs8 = require_fs();
|
|
19441
19441
|
var u = require_universalify().fromPromise;
|
|
19442
|
-
async function utimesMillis(
|
|
19443
|
-
const fd = await
|
|
19442
|
+
async function utimesMillis(path9, atime, mtime) {
|
|
19443
|
+
const fd = await fs8.open(path9, "r+");
|
|
19444
19444
|
let closeErr = null;
|
|
19445
19445
|
try {
|
|
19446
|
-
await
|
|
19446
|
+
await fs8.futimes(fd, atime, mtime);
|
|
19447
19447
|
} finally {
|
|
19448
19448
|
try {
|
|
19449
|
-
await
|
|
19449
|
+
await fs8.close(fd);
|
|
19450
19450
|
} catch (e) {
|
|
19451
19451
|
closeErr = e;
|
|
19452
19452
|
}
|
|
@@ -19455,10 +19455,10 @@ var require_utimes = __commonJS({
|
|
|
19455
19455
|
throw closeErr;
|
|
19456
19456
|
}
|
|
19457
19457
|
}
|
|
19458
|
-
function utimesMillisSync(
|
|
19459
|
-
const fd =
|
|
19460
|
-
|
|
19461
|
-
return
|
|
19458
|
+
function utimesMillisSync(path9, atime, mtime) {
|
|
19459
|
+
const fd = fs8.openSync(path9, "r+");
|
|
19460
|
+
fs8.futimesSync(fd, atime, mtime);
|
|
19461
|
+
return fs8.closeSync(fd);
|
|
19462
19462
|
}
|
|
19463
19463
|
module2.exports = {
|
|
19464
19464
|
utimesMillis: u(utimesMillis),
|
|
@@ -19471,11 +19471,11 @@ var require_utimes = __commonJS({
|
|
|
19471
19471
|
var require_stat = __commonJS({
|
|
19472
19472
|
"../../node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
|
|
19473
19473
|
"use strict";
|
|
19474
|
-
var
|
|
19475
|
-
var
|
|
19474
|
+
var fs8 = require_fs();
|
|
19475
|
+
var path9 = require("path");
|
|
19476
19476
|
var u = require_universalify().fromPromise;
|
|
19477
19477
|
function getStats(src, dest, opts) {
|
|
19478
|
-
const statFunc = opts.dereference ? (file) =>
|
|
19478
|
+
const statFunc = opts.dereference ? (file) => fs8.stat(file, { bigint: true }) : (file) => fs8.lstat(file, { bigint: true });
|
|
19479
19479
|
return Promise.all([
|
|
19480
19480
|
statFunc(src),
|
|
19481
19481
|
statFunc(dest).catch((err) => {
|
|
@@ -19486,7 +19486,7 @@ var require_stat = __commonJS({
|
|
|
19486
19486
|
}
|
|
19487
19487
|
function getStatsSync(src, dest, opts) {
|
|
19488
19488
|
let destStat;
|
|
19489
|
-
const statFunc = opts.dereference ? (file) =>
|
|
19489
|
+
const statFunc = opts.dereference ? (file) => fs8.statSync(file, { bigint: true }) : (file) => fs8.lstatSync(file, { bigint: true });
|
|
19490
19490
|
const srcStat = statFunc(src);
|
|
19491
19491
|
try {
|
|
19492
19492
|
destStat = statFunc(dest);
|
|
@@ -19500,8 +19500,8 @@ var require_stat = __commonJS({
|
|
|
19500
19500
|
const { srcStat, destStat } = await getStats(src, dest, opts);
|
|
19501
19501
|
if (destStat) {
|
|
19502
19502
|
if (areIdentical(srcStat, destStat)) {
|
|
19503
|
-
const srcBaseName =
|
|
19504
|
-
const destBaseName =
|
|
19503
|
+
const srcBaseName = path9.basename(src);
|
|
19504
|
+
const destBaseName = path9.basename(dest);
|
|
19505
19505
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
19506
19506
|
return { srcStat, destStat, isChangingCase: true };
|
|
19507
19507
|
}
|
|
@@ -19523,8 +19523,8 @@ var require_stat = __commonJS({
|
|
|
19523
19523
|
const { srcStat, destStat } = getStatsSync(src, dest, opts);
|
|
19524
19524
|
if (destStat) {
|
|
19525
19525
|
if (areIdentical(srcStat, destStat)) {
|
|
19526
|
-
const srcBaseName =
|
|
19527
|
-
const destBaseName =
|
|
19526
|
+
const srcBaseName = path9.basename(src);
|
|
19527
|
+
const destBaseName = path9.basename(dest);
|
|
19528
19528
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
19529
19529
|
return { srcStat, destStat, isChangingCase: true };
|
|
19530
19530
|
}
|
|
@@ -19543,12 +19543,12 @@ var require_stat = __commonJS({
|
|
|
19543
19543
|
return { srcStat, destStat };
|
|
19544
19544
|
}
|
|
19545
19545
|
async function checkParentPaths(src, srcStat, dest, funcName) {
|
|
19546
|
-
const srcParent =
|
|
19547
|
-
const destParent =
|
|
19548
|
-
if (destParent === srcParent || destParent ===
|
|
19546
|
+
const srcParent = path9.resolve(path9.dirname(src));
|
|
19547
|
+
const destParent = path9.resolve(path9.dirname(dest));
|
|
19548
|
+
if (destParent === srcParent || destParent === path9.parse(destParent).root) return;
|
|
19549
19549
|
let destStat;
|
|
19550
19550
|
try {
|
|
19551
|
-
destStat = await
|
|
19551
|
+
destStat = await fs8.stat(destParent, { bigint: true });
|
|
19552
19552
|
} catch (err) {
|
|
19553
19553
|
if (err.code === "ENOENT") return;
|
|
19554
19554
|
throw err;
|
|
@@ -19559,12 +19559,12 @@ var require_stat = __commonJS({
|
|
|
19559
19559
|
return checkParentPaths(src, srcStat, destParent, funcName);
|
|
19560
19560
|
}
|
|
19561
19561
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
19562
|
-
const srcParent =
|
|
19563
|
-
const destParent =
|
|
19564
|
-
if (destParent === srcParent || destParent ===
|
|
19562
|
+
const srcParent = path9.resolve(path9.dirname(src));
|
|
19563
|
+
const destParent = path9.resolve(path9.dirname(dest));
|
|
19564
|
+
if (destParent === srcParent || destParent === path9.parse(destParent).root) return;
|
|
19565
19565
|
let destStat;
|
|
19566
19566
|
try {
|
|
19567
|
-
destStat =
|
|
19567
|
+
destStat = fs8.statSync(destParent, { bigint: true });
|
|
19568
19568
|
} catch (err) {
|
|
19569
19569
|
if (err.code === "ENOENT") return;
|
|
19570
19570
|
throw err;
|
|
@@ -19578,8 +19578,8 @@ var require_stat = __commonJS({
|
|
|
19578
19578
|
return destStat.ino !== void 0 && destStat.dev !== void 0 && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
|
19579
19579
|
}
|
|
19580
19580
|
function isSrcSubdir(src, dest) {
|
|
19581
|
-
const srcArr =
|
|
19582
|
-
const destArr =
|
|
19581
|
+
const srcArr = path9.resolve(src).split(path9.sep).filter((i) => i);
|
|
19582
|
+
const destArr = path9.resolve(dest).split(path9.sep).filter((i) => i);
|
|
19583
19583
|
return srcArr.every((cur, i) => destArr[i] === cur);
|
|
19584
19584
|
}
|
|
19585
19585
|
function errMsg(src, dest, funcName) {
|
|
@@ -19631,8 +19631,8 @@ var require_async = __commonJS({
|
|
|
19631
19631
|
var require_copy = __commonJS({
|
|
19632
19632
|
"../../node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
|
|
19633
19633
|
"use strict";
|
|
19634
|
-
var
|
|
19635
|
-
var
|
|
19634
|
+
var fs8 = require_fs();
|
|
19635
|
+
var path9 = require("path");
|
|
19636
19636
|
var { mkdirs } = require_mkdirs();
|
|
19637
19637
|
var { pathExists } = require_path_exists();
|
|
19638
19638
|
var { utimesMillis } = require_utimes();
|
|
@@ -19655,7 +19655,7 @@ var require_copy = __commonJS({
|
|
|
19655
19655
|
await stat.checkParentPaths(src, srcStat, dest, "copy");
|
|
19656
19656
|
const include = await runFilter(src, dest, opts);
|
|
19657
19657
|
if (!include) return;
|
|
19658
|
-
const destParent =
|
|
19658
|
+
const destParent = path9.dirname(dest);
|
|
19659
19659
|
const dirExists = await pathExists(destParent);
|
|
19660
19660
|
if (!dirExists) {
|
|
19661
19661
|
await mkdirs(destParent);
|
|
@@ -19667,7 +19667,7 @@ var require_copy = __commonJS({
|
|
|
19667
19667
|
return opts.filter(src, dest);
|
|
19668
19668
|
}
|
|
19669
19669
|
async function getStatsAndPerformCopy(destStat, src, dest, opts) {
|
|
19670
|
-
const statFn = opts.dereference ?
|
|
19670
|
+
const statFn = opts.dereference ? fs8.stat : fs8.lstat;
|
|
19671
19671
|
const srcStat = await statFn(src);
|
|
19672
19672
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
|
|
19673
19673
|
if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
|
|
@@ -19679,7 +19679,7 @@ var require_copy = __commonJS({
|
|
|
19679
19679
|
async function onFile(srcStat, destStat, src, dest, opts) {
|
|
19680
19680
|
if (!destStat) return copyFile(srcStat, src, dest, opts);
|
|
19681
19681
|
if (opts.overwrite) {
|
|
19682
|
-
await
|
|
19682
|
+
await fs8.unlink(dest);
|
|
19683
19683
|
return copyFile(srcStat, src, dest, opts);
|
|
19684
19684
|
}
|
|
19685
19685
|
if (opts.errorOnExist) {
|
|
@@ -19687,29 +19687,29 @@ var require_copy = __commonJS({
|
|
|
19687
19687
|
}
|
|
19688
19688
|
}
|
|
19689
19689
|
async function copyFile(srcStat, src, dest, opts) {
|
|
19690
|
-
await
|
|
19690
|
+
await fs8.copyFile(src, dest);
|
|
19691
19691
|
if (opts.preserveTimestamps) {
|
|
19692
19692
|
if (fileIsNotWritable(srcStat.mode)) {
|
|
19693
19693
|
await makeFileWritable(dest, srcStat.mode);
|
|
19694
19694
|
}
|
|
19695
|
-
const updatedSrcStat = await
|
|
19695
|
+
const updatedSrcStat = await fs8.stat(src);
|
|
19696
19696
|
await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
19697
19697
|
}
|
|
19698
|
-
return
|
|
19698
|
+
return fs8.chmod(dest, srcStat.mode);
|
|
19699
19699
|
}
|
|
19700
19700
|
function fileIsNotWritable(srcMode) {
|
|
19701
19701
|
return (srcMode & 128) === 0;
|
|
19702
19702
|
}
|
|
19703
19703
|
function makeFileWritable(dest, srcMode) {
|
|
19704
|
-
return
|
|
19704
|
+
return fs8.chmod(dest, srcMode | 128);
|
|
19705
19705
|
}
|
|
19706
19706
|
async function onDir(srcStat, destStat, src, dest, opts) {
|
|
19707
19707
|
if (!destStat) {
|
|
19708
|
-
await
|
|
19708
|
+
await fs8.mkdir(dest);
|
|
19709
19709
|
}
|
|
19710
|
-
await asyncIteratorConcurrentProcess(await
|
|
19711
|
-
const srcItem =
|
|
19712
|
-
const destItem =
|
|
19710
|
+
await asyncIteratorConcurrentProcess(await fs8.opendir(src), async (item) => {
|
|
19711
|
+
const srcItem = path9.join(src, item.name);
|
|
19712
|
+
const destItem = path9.join(dest, item.name);
|
|
19713
19713
|
const include = await runFilter(srcItem, destItem, opts);
|
|
19714
19714
|
if (include) {
|
|
19715
19715
|
const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
|
|
@@ -19717,26 +19717,26 @@ var require_copy = __commonJS({
|
|
|
19717
19717
|
}
|
|
19718
19718
|
});
|
|
19719
19719
|
if (!destStat) {
|
|
19720
|
-
await
|
|
19720
|
+
await fs8.chmod(dest, srcStat.mode);
|
|
19721
19721
|
}
|
|
19722
19722
|
}
|
|
19723
19723
|
async function onLink(destStat, src, dest, opts) {
|
|
19724
|
-
let resolvedSrc = await
|
|
19724
|
+
let resolvedSrc = await fs8.readlink(src);
|
|
19725
19725
|
if (opts.dereference) {
|
|
19726
|
-
resolvedSrc =
|
|
19726
|
+
resolvedSrc = path9.resolve(process.cwd(), resolvedSrc);
|
|
19727
19727
|
}
|
|
19728
19728
|
if (!destStat) {
|
|
19729
|
-
return
|
|
19729
|
+
return fs8.symlink(resolvedSrc, dest);
|
|
19730
19730
|
}
|
|
19731
19731
|
let resolvedDest = null;
|
|
19732
19732
|
try {
|
|
19733
|
-
resolvedDest = await
|
|
19733
|
+
resolvedDest = await fs8.readlink(dest);
|
|
19734
19734
|
} catch (e) {
|
|
19735
|
-
if (e.code === "EINVAL" || e.code === "UNKNOWN") return
|
|
19735
|
+
if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs8.symlink(resolvedSrc, dest);
|
|
19736
19736
|
throw e;
|
|
19737
19737
|
}
|
|
19738
19738
|
if (opts.dereference) {
|
|
19739
|
-
resolvedDest =
|
|
19739
|
+
resolvedDest = path9.resolve(process.cwd(), resolvedDest);
|
|
19740
19740
|
}
|
|
19741
19741
|
if (resolvedSrc !== resolvedDest) {
|
|
19742
19742
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
@@ -19746,8 +19746,8 @@ var require_copy = __commonJS({
|
|
|
19746
19746
|
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
19747
19747
|
}
|
|
19748
19748
|
}
|
|
19749
|
-
await
|
|
19750
|
-
return
|
|
19749
|
+
await fs8.unlink(dest);
|
|
19750
|
+
return fs8.symlink(resolvedSrc, dest);
|
|
19751
19751
|
}
|
|
19752
19752
|
module2.exports = copy;
|
|
19753
19753
|
}
|
|
@@ -19757,8 +19757,8 @@ var require_copy = __commonJS({
|
|
|
19757
19757
|
var require_copy_sync = __commonJS({
|
|
19758
19758
|
"../../node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
|
|
19759
19759
|
"use strict";
|
|
19760
|
-
var
|
|
19761
|
-
var
|
|
19760
|
+
var fs8 = require_graceful_fs();
|
|
19761
|
+
var path9 = require("path");
|
|
19762
19762
|
var mkdirsSync = require_mkdirs().mkdirsSync;
|
|
19763
19763
|
var utimesMillisSync = require_utimes().utimesMillisSync;
|
|
19764
19764
|
var stat = require_stat();
|
|
@@ -19779,12 +19779,12 @@ var require_copy_sync = __commonJS({
|
|
|
19779
19779
|
const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
|
|
19780
19780
|
stat.checkParentPathsSync(src, srcStat, dest, "copy");
|
|
19781
19781
|
if (opts.filter && !opts.filter(src, dest)) return;
|
|
19782
|
-
const destParent =
|
|
19783
|
-
if (!
|
|
19782
|
+
const destParent = path9.dirname(dest);
|
|
19783
|
+
if (!fs8.existsSync(destParent)) mkdirsSync(destParent);
|
|
19784
19784
|
return getStats(destStat, src, dest, opts);
|
|
19785
19785
|
}
|
|
19786
19786
|
function getStats(destStat, src, dest, opts) {
|
|
19787
|
-
const statSync2 = opts.dereference ?
|
|
19787
|
+
const statSync2 = opts.dereference ? fs8.statSync : fs8.lstatSync;
|
|
19788
19788
|
const srcStat = statSync2(src);
|
|
19789
19789
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
|
|
19790
19790
|
else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
|
|
@@ -19799,14 +19799,14 @@ var require_copy_sync = __commonJS({
|
|
|
19799
19799
|
}
|
|
19800
19800
|
function mayCopyFile(srcStat, src, dest, opts) {
|
|
19801
19801
|
if (opts.overwrite) {
|
|
19802
|
-
|
|
19802
|
+
fs8.unlinkSync(dest);
|
|
19803
19803
|
return copyFile(srcStat, src, dest, opts);
|
|
19804
19804
|
} else if (opts.errorOnExist) {
|
|
19805
19805
|
throw new Error(`'${dest}' already exists`);
|
|
19806
19806
|
}
|
|
19807
19807
|
}
|
|
19808
19808
|
function copyFile(srcStat, src, dest, opts) {
|
|
19809
|
-
|
|
19809
|
+
fs8.copyFileSync(src, dest);
|
|
19810
19810
|
if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
|
|
19811
19811
|
return setDestMode(dest, srcStat.mode);
|
|
19812
19812
|
}
|
|
@@ -19821,10 +19821,10 @@ var require_copy_sync = __commonJS({
|
|
|
19821
19821
|
return setDestMode(dest, srcMode | 128);
|
|
19822
19822
|
}
|
|
19823
19823
|
function setDestMode(dest, srcMode) {
|
|
19824
|
-
return
|
|
19824
|
+
return fs8.chmodSync(dest, srcMode);
|
|
19825
19825
|
}
|
|
19826
19826
|
function setDestTimestamps(src, dest) {
|
|
19827
|
-
const updatedSrcStat =
|
|
19827
|
+
const updatedSrcStat = fs8.statSync(src);
|
|
19828
19828
|
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
19829
19829
|
}
|
|
19830
19830
|
function onDir(srcStat, destStat, src, dest, opts) {
|
|
@@ -19832,12 +19832,12 @@ var require_copy_sync = __commonJS({
|
|
|
19832
19832
|
return copyDir(src, dest, opts);
|
|
19833
19833
|
}
|
|
19834
19834
|
function mkDirAndCopy(srcMode, src, dest, opts) {
|
|
19835
|
-
|
|
19835
|
+
fs8.mkdirSync(dest);
|
|
19836
19836
|
copyDir(src, dest, opts);
|
|
19837
19837
|
return setDestMode(dest, srcMode);
|
|
19838
19838
|
}
|
|
19839
19839
|
function copyDir(src, dest, opts) {
|
|
19840
|
-
const dir =
|
|
19840
|
+
const dir = fs8.opendirSync(src);
|
|
19841
19841
|
try {
|
|
19842
19842
|
let dirent;
|
|
19843
19843
|
while ((dirent = dir.readSync()) !== null) {
|
|
@@ -19848,29 +19848,29 @@ var require_copy_sync = __commonJS({
|
|
|
19848
19848
|
}
|
|
19849
19849
|
}
|
|
19850
19850
|
function copyDirItem(item, src, dest, opts) {
|
|
19851
|
-
const srcItem =
|
|
19852
|
-
const destItem =
|
|
19851
|
+
const srcItem = path9.join(src, item);
|
|
19852
|
+
const destItem = path9.join(dest, item);
|
|
19853
19853
|
if (opts.filter && !opts.filter(srcItem, destItem)) return;
|
|
19854
19854
|
const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
|
|
19855
19855
|
return getStats(destStat, srcItem, destItem, opts);
|
|
19856
19856
|
}
|
|
19857
19857
|
function onLink(destStat, src, dest, opts) {
|
|
19858
|
-
let resolvedSrc =
|
|
19858
|
+
let resolvedSrc = fs8.readlinkSync(src);
|
|
19859
19859
|
if (opts.dereference) {
|
|
19860
|
-
resolvedSrc =
|
|
19860
|
+
resolvedSrc = path9.resolve(process.cwd(), resolvedSrc);
|
|
19861
19861
|
}
|
|
19862
19862
|
if (!destStat) {
|
|
19863
|
-
return
|
|
19863
|
+
return fs8.symlinkSync(resolvedSrc, dest);
|
|
19864
19864
|
} else {
|
|
19865
19865
|
let resolvedDest;
|
|
19866
19866
|
try {
|
|
19867
|
-
resolvedDest =
|
|
19867
|
+
resolvedDest = fs8.readlinkSync(dest);
|
|
19868
19868
|
} catch (err) {
|
|
19869
|
-
if (err.code === "EINVAL" || err.code === "UNKNOWN") return
|
|
19869
|
+
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs8.symlinkSync(resolvedSrc, dest);
|
|
19870
19870
|
throw err;
|
|
19871
19871
|
}
|
|
19872
19872
|
if (opts.dereference) {
|
|
19873
|
-
resolvedDest =
|
|
19873
|
+
resolvedDest = path9.resolve(process.cwd(), resolvedDest);
|
|
19874
19874
|
}
|
|
19875
19875
|
if (resolvedSrc !== resolvedDest) {
|
|
19876
19876
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
@@ -19884,8 +19884,8 @@ var require_copy_sync = __commonJS({
|
|
|
19884
19884
|
}
|
|
19885
19885
|
}
|
|
19886
19886
|
function copyLink(resolvedSrc, dest) {
|
|
19887
|
-
|
|
19888
|
-
return
|
|
19887
|
+
fs8.unlinkSync(dest);
|
|
19888
|
+
return fs8.symlinkSync(resolvedSrc, dest);
|
|
19889
19889
|
}
|
|
19890
19890
|
module2.exports = copySync;
|
|
19891
19891
|
}
|
|
@@ -19907,13 +19907,13 @@ var require_copy2 = __commonJS({
|
|
|
19907
19907
|
var require_remove = __commonJS({
|
|
19908
19908
|
"../../node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
|
|
19909
19909
|
"use strict";
|
|
19910
|
-
var
|
|
19910
|
+
var fs8 = require_graceful_fs();
|
|
19911
19911
|
var u = require_universalify().fromCallback;
|
|
19912
|
-
function remove(
|
|
19913
|
-
|
|
19912
|
+
function remove(path9, callback) {
|
|
19913
|
+
fs8.rm(path9, { recursive: true, force: true }, callback);
|
|
19914
19914
|
}
|
|
19915
|
-
function removeSync(
|
|
19916
|
-
|
|
19915
|
+
function removeSync(path9) {
|
|
19916
|
+
fs8.rmSync(path9, { recursive: true, force: true });
|
|
19917
19917
|
}
|
|
19918
19918
|
module2.exports = {
|
|
19919
19919
|
remove: u(remove),
|
|
@@ -19927,28 +19927,28 @@ var require_empty = __commonJS({
|
|
|
19927
19927
|
"../../node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
|
|
19928
19928
|
"use strict";
|
|
19929
19929
|
var u = require_universalify().fromPromise;
|
|
19930
|
-
var
|
|
19931
|
-
var
|
|
19930
|
+
var fs8 = require_fs();
|
|
19931
|
+
var path9 = require("path");
|
|
19932
19932
|
var mkdir = require_mkdirs();
|
|
19933
19933
|
var remove = require_remove();
|
|
19934
19934
|
var emptyDir = u(async function emptyDir2(dir) {
|
|
19935
19935
|
let items;
|
|
19936
19936
|
try {
|
|
19937
|
-
items = await
|
|
19937
|
+
items = await fs8.readdir(dir);
|
|
19938
19938
|
} catch {
|
|
19939
19939
|
return mkdir.mkdirs(dir);
|
|
19940
19940
|
}
|
|
19941
|
-
return Promise.all(items.map((item) => remove.remove(
|
|
19941
|
+
return Promise.all(items.map((item) => remove.remove(path9.join(dir, item))));
|
|
19942
19942
|
});
|
|
19943
19943
|
function emptyDirSync(dir) {
|
|
19944
19944
|
let items;
|
|
19945
19945
|
try {
|
|
19946
|
-
items =
|
|
19946
|
+
items = fs8.readdirSync(dir);
|
|
19947
19947
|
} catch {
|
|
19948
19948
|
return mkdir.mkdirsSync(dir);
|
|
19949
19949
|
}
|
|
19950
19950
|
items.forEach((item) => {
|
|
19951
|
-
item =
|
|
19951
|
+
item = path9.join(dir, item);
|
|
19952
19952
|
remove.removeSync(item);
|
|
19953
19953
|
});
|
|
19954
19954
|
}
|
|
@@ -19966,52 +19966,52 @@ var require_file = __commonJS({
|
|
|
19966
19966
|
"../../node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) {
|
|
19967
19967
|
"use strict";
|
|
19968
19968
|
var u = require_universalify().fromPromise;
|
|
19969
|
-
var
|
|
19970
|
-
var
|
|
19969
|
+
var path9 = require("path");
|
|
19970
|
+
var fs8 = require_fs();
|
|
19971
19971
|
var mkdir = require_mkdirs();
|
|
19972
19972
|
async function createFile(file) {
|
|
19973
19973
|
let stats;
|
|
19974
19974
|
try {
|
|
19975
|
-
stats = await
|
|
19975
|
+
stats = await fs8.stat(file);
|
|
19976
19976
|
} catch {
|
|
19977
19977
|
}
|
|
19978
19978
|
if (stats && stats.isFile()) return;
|
|
19979
|
-
const dir =
|
|
19979
|
+
const dir = path9.dirname(file);
|
|
19980
19980
|
let dirStats = null;
|
|
19981
19981
|
try {
|
|
19982
|
-
dirStats = await
|
|
19982
|
+
dirStats = await fs8.stat(dir);
|
|
19983
19983
|
} catch (err) {
|
|
19984
19984
|
if (err.code === "ENOENT") {
|
|
19985
19985
|
await mkdir.mkdirs(dir);
|
|
19986
|
-
await
|
|
19986
|
+
await fs8.writeFile(file, "");
|
|
19987
19987
|
return;
|
|
19988
19988
|
} else {
|
|
19989
19989
|
throw err;
|
|
19990
19990
|
}
|
|
19991
19991
|
}
|
|
19992
19992
|
if (dirStats.isDirectory()) {
|
|
19993
|
-
await
|
|
19993
|
+
await fs8.writeFile(file, "");
|
|
19994
19994
|
} else {
|
|
19995
|
-
await
|
|
19995
|
+
await fs8.readdir(dir);
|
|
19996
19996
|
}
|
|
19997
19997
|
}
|
|
19998
19998
|
function createFileSync(file) {
|
|
19999
19999
|
let stats;
|
|
20000
20000
|
try {
|
|
20001
|
-
stats =
|
|
20001
|
+
stats = fs8.statSync(file);
|
|
20002
20002
|
} catch {
|
|
20003
20003
|
}
|
|
20004
20004
|
if (stats && stats.isFile()) return;
|
|
20005
|
-
const dir =
|
|
20005
|
+
const dir = path9.dirname(file);
|
|
20006
20006
|
try {
|
|
20007
|
-
if (!
|
|
20008
|
-
|
|
20007
|
+
if (!fs8.statSync(dir).isDirectory()) {
|
|
20008
|
+
fs8.readdirSync(dir);
|
|
20009
20009
|
}
|
|
20010
20010
|
} catch (err) {
|
|
20011
20011
|
if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
|
|
20012
20012
|
else throw err;
|
|
20013
20013
|
}
|
|
20014
|
-
|
|
20014
|
+
fs8.writeFileSync(file, "");
|
|
20015
20015
|
}
|
|
20016
20016
|
module2.exports = {
|
|
20017
20017
|
createFile: u(createFile),
|
|
@@ -20025,50 +20025,50 @@ var require_link = __commonJS({
|
|
|
20025
20025
|
"../../node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) {
|
|
20026
20026
|
"use strict";
|
|
20027
20027
|
var u = require_universalify().fromPromise;
|
|
20028
|
-
var
|
|
20029
|
-
var
|
|
20028
|
+
var path9 = require("path");
|
|
20029
|
+
var fs8 = require_fs();
|
|
20030
20030
|
var mkdir = require_mkdirs();
|
|
20031
20031
|
var { pathExists } = require_path_exists();
|
|
20032
20032
|
var { areIdentical } = require_stat();
|
|
20033
20033
|
async function createLink(srcpath, dstpath) {
|
|
20034
20034
|
let dstStat;
|
|
20035
20035
|
try {
|
|
20036
|
-
dstStat = await
|
|
20036
|
+
dstStat = await fs8.lstat(dstpath);
|
|
20037
20037
|
} catch {
|
|
20038
20038
|
}
|
|
20039
20039
|
let srcStat;
|
|
20040
20040
|
try {
|
|
20041
|
-
srcStat = await
|
|
20041
|
+
srcStat = await fs8.lstat(srcpath);
|
|
20042
20042
|
} catch (err) {
|
|
20043
20043
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
20044
20044
|
throw err;
|
|
20045
20045
|
}
|
|
20046
20046
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
20047
|
-
const dir =
|
|
20047
|
+
const dir = path9.dirname(dstpath);
|
|
20048
20048
|
const dirExists = await pathExists(dir);
|
|
20049
20049
|
if (!dirExists) {
|
|
20050
20050
|
await mkdir.mkdirs(dir);
|
|
20051
20051
|
}
|
|
20052
|
-
await
|
|
20052
|
+
await fs8.link(srcpath, dstpath);
|
|
20053
20053
|
}
|
|
20054
20054
|
function createLinkSync(srcpath, dstpath) {
|
|
20055
20055
|
let dstStat;
|
|
20056
20056
|
try {
|
|
20057
|
-
dstStat =
|
|
20057
|
+
dstStat = fs8.lstatSync(dstpath);
|
|
20058
20058
|
} catch {
|
|
20059
20059
|
}
|
|
20060
20060
|
try {
|
|
20061
|
-
const srcStat =
|
|
20061
|
+
const srcStat = fs8.lstatSync(srcpath);
|
|
20062
20062
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
20063
20063
|
} catch (err) {
|
|
20064
20064
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
20065
20065
|
throw err;
|
|
20066
20066
|
}
|
|
20067
|
-
const dir =
|
|
20068
|
-
const dirExists =
|
|
20069
|
-
if (dirExists) return
|
|
20067
|
+
const dir = path9.dirname(dstpath);
|
|
20068
|
+
const dirExists = fs8.existsSync(dir);
|
|
20069
|
+
if (dirExists) return fs8.linkSync(srcpath, dstpath);
|
|
20070
20070
|
mkdir.mkdirsSync(dir);
|
|
20071
|
-
return
|
|
20071
|
+
return fs8.linkSync(srcpath, dstpath);
|
|
20072
20072
|
}
|
|
20073
20073
|
module2.exports = {
|
|
20074
20074
|
createLink: u(createLink),
|
|
@@ -20081,14 +20081,14 @@ var require_link = __commonJS({
|
|
|
20081
20081
|
var require_symlink_paths = __commonJS({
|
|
20082
20082
|
"../../node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
|
|
20083
20083
|
"use strict";
|
|
20084
|
-
var
|
|
20085
|
-
var
|
|
20084
|
+
var path9 = require("path");
|
|
20085
|
+
var fs8 = require_fs();
|
|
20086
20086
|
var { pathExists } = require_path_exists();
|
|
20087
20087
|
var u = require_universalify().fromPromise;
|
|
20088
20088
|
async function symlinkPaths(srcpath, dstpath) {
|
|
20089
|
-
if (
|
|
20089
|
+
if (path9.isAbsolute(srcpath)) {
|
|
20090
20090
|
try {
|
|
20091
|
-
await
|
|
20091
|
+
await fs8.lstat(srcpath);
|
|
20092
20092
|
} catch (err) {
|
|
20093
20093
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
20094
20094
|
throw err;
|
|
@@ -20098,8 +20098,8 @@ var require_symlink_paths = __commonJS({
|
|
|
20098
20098
|
toDst: srcpath
|
|
20099
20099
|
};
|
|
20100
20100
|
}
|
|
20101
|
-
const dstdir =
|
|
20102
|
-
const relativeToDst =
|
|
20101
|
+
const dstdir = path9.dirname(dstpath);
|
|
20102
|
+
const relativeToDst = path9.join(dstdir, srcpath);
|
|
20103
20103
|
const exists = await pathExists(relativeToDst);
|
|
20104
20104
|
if (exists) {
|
|
20105
20105
|
return {
|
|
@@ -20108,39 +20108,39 @@ var require_symlink_paths = __commonJS({
|
|
|
20108
20108
|
};
|
|
20109
20109
|
}
|
|
20110
20110
|
try {
|
|
20111
|
-
await
|
|
20111
|
+
await fs8.lstat(srcpath);
|
|
20112
20112
|
} catch (err) {
|
|
20113
20113
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
20114
20114
|
throw err;
|
|
20115
20115
|
}
|
|
20116
20116
|
return {
|
|
20117
20117
|
toCwd: srcpath,
|
|
20118
|
-
toDst:
|
|
20118
|
+
toDst: path9.relative(dstdir, srcpath)
|
|
20119
20119
|
};
|
|
20120
20120
|
}
|
|
20121
20121
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
20122
|
-
if (
|
|
20123
|
-
const exists2 =
|
|
20122
|
+
if (path9.isAbsolute(srcpath)) {
|
|
20123
|
+
const exists2 = fs8.existsSync(srcpath);
|
|
20124
20124
|
if (!exists2) throw new Error("absolute srcpath does not exist");
|
|
20125
20125
|
return {
|
|
20126
20126
|
toCwd: srcpath,
|
|
20127
20127
|
toDst: srcpath
|
|
20128
20128
|
};
|
|
20129
20129
|
}
|
|
20130
|
-
const dstdir =
|
|
20131
|
-
const relativeToDst =
|
|
20132
|
-
const exists =
|
|
20130
|
+
const dstdir = path9.dirname(dstpath);
|
|
20131
|
+
const relativeToDst = path9.join(dstdir, srcpath);
|
|
20132
|
+
const exists = fs8.existsSync(relativeToDst);
|
|
20133
20133
|
if (exists) {
|
|
20134
20134
|
return {
|
|
20135
20135
|
toCwd: relativeToDst,
|
|
20136
20136
|
toDst: srcpath
|
|
20137
20137
|
};
|
|
20138
20138
|
}
|
|
20139
|
-
const srcExists =
|
|
20139
|
+
const srcExists = fs8.existsSync(srcpath);
|
|
20140
20140
|
if (!srcExists) throw new Error("relative srcpath does not exist");
|
|
20141
20141
|
return {
|
|
20142
20142
|
toCwd: srcpath,
|
|
20143
|
-
toDst:
|
|
20143
|
+
toDst: path9.relative(dstdir, srcpath)
|
|
20144
20144
|
};
|
|
20145
20145
|
}
|
|
20146
20146
|
module2.exports = {
|
|
@@ -20154,13 +20154,13 @@ var require_symlink_paths = __commonJS({
|
|
|
20154
20154
|
var require_symlink_type = __commonJS({
|
|
20155
20155
|
"../../node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
|
|
20156
20156
|
"use strict";
|
|
20157
|
-
var
|
|
20157
|
+
var fs8 = require_fs();
|
|
20158
20158
|
var u = require_universalify().fromPromise;
|
|
20159
20159
|
async function symlinkType(srcpath, type) {
|
|
20160
20160
|
if (type) return type;
|
|
20161
20161
|
let stats;
|
|
20162
20162
|
try {
|
|
20163
|
-
stats = await
|
|
20163
|
+
stats = await fs8.lstat(srcpath);
|
|
20164
20164
|
} catch {
|
|
20165
20165
|
return "file";
|
|
20166
20166
|
}
|
|
@@ -20170,7 +20170,7 @@ var require_symlink_type = __commonJS({
|
|
|
20170
20170
|
if (type) return type;
|
|
20171
20171
|
let stats;
|
|
20172
20172
|
try {
|
|
20173
|
-
stats =
|
|
20173
|
+
stats = fs8.lstatSync(srcpath);
|
|
20174
20174
|
} catch {
|
|
20175
20175
|
return "file";
|
|
20176
20176
|
}
|
|
@@ -20188,8 +20188,8 @@ var require_symlink = __commonJS({
|
|
|
20188
20188
|
"../../node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) {
|
|
20189
20189
|
"use strict";
|
|
20190
20190
|
var u = require_universalify().fromPromise;
|
|
20191
|
-
var
|
|
20192
|
-
var
|
|
20191
|
+
var path9 = require("path");
|
|
20192
|
+
var fs8 = require_fs();
|
|
20193
20193
|
var { mkdirs, mkdirsSync } = require_mkdirs();
|
|
20194
20194
|
var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
|
|
20195
20195
|
var { symlinkType, symlinkTypeSync } = require_symlink_type();
|
|
@@ -20198,44 +20198,44 @@ var require_symlink = __commonJS({
|
|
|
20198
20198
|
async function createSymlink(srcpath, dstpath, type) {
|
|
20199
20199
|
let stats;
|
|
20200
20200
|
try {
|
|
20201
|
-
stats = await
|
|
20201
|
+
stats = await fs8.lstat(dstpath);
|
|
20202
20202
|
} catch {
|
|
20203
20203
|
}
|
|
20204
20204
|
if (stats && stats.isSymbolicLink()) {
|
|
20205
20205
|
const [srcStat, dstStat] = await Promise.all([
|
|
20206
|
-
|
|
20207
|
-
|
|
20206
|
+
fs8.stat(srcpath),
|
|
20207
|
+
fs8.stat(dstpath)
|
|
20208
20208
|
]);
|
|
20209
20209
|
if (areIdentical(srcStat, dstStat)) return;
|
|
20210
20210
|
}
|
|
20211
20211
|
const relative2 = await symlinkPaths(srcpath, dstpath);
|
|
20212
20212
|
srcpath = relative2.toDst;
|
|
20213
20213
|
const toType = await symlinkType(relative2.toCwd, type);
|
|
20214
|
-
const dir =
|
|
20214
|
+
const dir = path9.dirname(dstpath);
|
|
20215
20215
|
if (!await pathExists(dir)) {
|
|
20216
20216
|
await mkdirs(dir);
|
|
20217
20217
|
}
|
|
20218
|
-
return
|
|
20218
|
+
return fs8.symlink(srcpath, dstpath, toType);
|
|
20219
20219
|
}
|
|
20220
20220
|
function createSymlinkSync(srcpath, dstpath, type) {
|
|
20221
20221
|
let stats;
|
|
20222
20222
|
try {
|
|
20223
|
-
stats =
|
|
20223
|
+
stats = fs8.lstatSync(dstpath);
|
|
20224
20224
|
} catch {
|
|
20225
20225
|
}
|
|
20226
20226
|
if (stats && stats.isSymbolicLink()) {
|
|
20227
|
-
const srcStat =
|
|
20228
|
-
const dstStat =
|
|
20227
|
+
const srcStat = fs8.statSync(srcpath);
|
|
20228
|
+
const dstStat = fs8.statSync(dstpath);
|
|
20229
20229
|
if (areIdentical(srcStat, dstStat)) return;
|
|
20230
20230
|
}
|
|
20231
20231
|
const relative2 = symlinkPathsSync(srcpath, dstpath);
|
|
20232
20232
|
srcpath = relative2.toDst;
|
|
20233
20233
|
type = symlinkTypeSync(relative2.toCwd, type);
|
|
20234
|
-
const dir =
|
|
20235
|
-
const exists =
|
|
20236
|
-
if (exists) return
|
|
20234
|
+
const dir = path9.dirname(dstpath);
|
|
20235
|
+
const exists = fs8.existsSync(dir);
|
|
20236
|
+
if (exists) return fs8.symlinkSync(srcpath, dstpath, type);
|
|
20237
20237
|
mkdirsSync(dir);
|
|
20238
|
-
return
|
|
20238
|
+
return fs8.symlinkSync(srcpath, dstpath, type);
|
|
20239
20239
|
}
|
|
20240
20240
|
module2.exports = {
|
|
20241
20241
|
createSymlink: u(createSymlink),
|
|
@@ -20302,9 +20302,9 @@ var require_jsonfile = __commonJS({
|
|
|
20302
20302
|
if (typeof options === "string") {
|
|
20303
20303
|
options = { encoding: options };
|
|
20304
20304
|
}
|
|
20305
|
-
const
|
|
20305
|
+
const fs8 = options.fs || _fs;
|
|
20306
20306
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
20307
|
-
let data = await universalify.fromCallback(
|
|
20307
|
+
let data = await universalify.fromCallback(fs8.readFile)(file, options);
|
|
20308
20308
|
data = stripBom(data);
|
|
20309
20309
|
let obj;
|
|
20310
20310
|
try {
|
|
@@ -20320,14 +20320,14 @@ var require_jsonfile = __commonJS({
|
|
|
20320
20320
|
return obj;
|
|
20321
20321
|
}
|
|
20322
20322
|
var readFile = universalify.fromPromise(_readFile);
|
|
20323
|
-
function
|
|
20323
|
+
function readFileSync6(file, options = {}) {
|
|
20324
20324
|
if (typeof options === "string") {
|
|
20325
20325
|
options = { encoding: options };
|
|
20326
20326
|
}
|
|
20327
|
-
const
|
|
20327
|
+
const fs8 = options.fs || _fs;
|
|
20328
20328
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
20329
20329
|
try {
|
|
20330
|
-
let content =
|
|
20330
|
+
let content = fs8.readFileSync(file, options);
|
|
20331
20331
|
content = stripBom(content);
|
|
20332
20332
|
return JSON.parse(content, options.reviver);
|
|
20333
20333
|
} catch (err) {
|
|
@@ -20340,21 +20340,21 @@ var require_jsonfile = __commonJS({
|
|
|
20340
20340
|
}
|
|
20341
20341
|
}
|
|
20342
20342
|
async function _writeFile(file, obj, options = {}) {
|
|
20343
|
-
const
|
|
20343
|
+
const fs8 = options.fs || _fs;
|
|
20344
20344
|
const str = stringify(obj, options);
|
|
20345
|
-
await universalify.fromCallback(
|
|
20345
|
+
await universalify.fromCallback(fs8.writeFile)(file, str, options);
|
|
20346
20346
|
}
|
|
20347
20347
|
var writeFile = universalify.fromPromise(_writeFile);
|
|
20348
|
-
function
|
|
20349
|
-
const
|
|
20348
|
+
function writeFileSync7(file, obj, options = {}) {
|
|
20349
|
+
const fs8 = options.fs || _fs;
|
|
20350
20350
|
const str = stringify(obj, options);
|
|
20351
|
-
return
|
|
20351
|
+
return fs8.writeFileSync(file, str, options);
|
|
20352
20352
|
}
|
|
20353
20353
|
module2.exports = {
|
|
20354
20354
|
readFile,
|
|
20355
|
-
readFileSync:
|
|
20355
|
+
readFileSync: readFileSync6,
|
|
20356
20356
|
writeFile,
|
|
20357
|
-
writeFileSync:
|
|
20357
|
+
writeFileSync: writeFileSync7
|
|
20358
20358
|
};
|
|
20359
20359
|
}
|
|
20360
20360
|
});
|
|
@@ -20379,23 +20379,23 @@ var require_output_file = __commonJS({
|
|
|
20379
20379
|
"../../node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) {
|
|
20380
20380
|
"use strict";
|
|
20381
20381
|
var u = require_universalify().fromPromise;
|
|
20382
|
-
var
|
|
20383
|
-
var
|
|
20382
|
+
var fs8 = require_fs();
|
|
20383
|
+
var path9 = require("path");
|
|
20384
20384
|
var mkdir = require_mkdirs();
|
|
20385
20385
|
var pathExists = require_path_exists().pathExists;
|
|
20386
20386
|
async function outputFile(file, data, encoding = "utf-8") {
|
|
20387
|
-
const dir =
|
|
20387
|
+
const dir = path9.dirname(file);
|
|
20388
20388
|
if (!await pathExists(dir)) {
|
|
20389
20389
|
await mkdir.mkdirs(dir);
|
|
20390
20390
|
}
|
|
20391
|
-
return
|
|
20391
|
+
return fs8.writeFile(file, data, encoding);
|
|
20392
20392
|
}
|
|
20393
20393
|
function outputFileSync(file, ...args) {
|
|
20394
|
-
const dir =
|
|
20395
|
-
if (!
|
|
20394
|
+
const dir = path9.dirname(file);
|
|
20395
|
+
if (!fs8.existsSync(dir)) {
|
|
20396
20396
|
mkdir.mkdirsSync(dir);
|
|
20397
20397
|
}
|
|
20398
|
-
|
|
20398
|
+
fs8.writeFileSync(file, ...args);
|
|
20399
20399
|
}
|
|
20400
20400
|
module2.exports = {
|
|
20401
20401
|
outputFile: u(outputFile),
|
|
@@ -20454,8 +20454,8 @@ var require_json = __commonJS({
|
|
|
20454
20454
|
var require_move = __commonJS({
|
|
20455
20455
|
"../../node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
|
|
20456
20456
|
"use strict";
|
|
20457
|
-
var
|
|
20458
|
-
var
|
|
20457
|
+
var fs8 = require_fs();
|
|
20458
|
+
var path9 = require("path");
|
|
20459
20459
|
var { copy } = require_copy2();
|
|
20460
20460
|
var { remove } = require_remove();
|
|
20461
20461
|
var { mkdirp } = require_mkdirs();
|
|
@@ -20465,8 +20465,8 @@ var require_move = __commonJS({
|
|
|
20465
20465
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
20466
20466
|
const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
|
|
20467
20467
|
await stat.checkParentPaths(src, srcStat, dest, "move");
|
|
20468
|
-
const destParent =
|
|
20469
|
-
const parsedParentPath =
|
|
20468
|
+
const destParent = path9.dirname(dest);
|
|
20469
|
+
const parsedParentPath = path9.parse(destParent);
|
|
20470
20470
|
if (parsedParentPath.root !== destParent) {
|
|
20471
20471
|
await mkdirp(destParent);
|
|
20472
20472
|
}
|
|
@@ -20481,7 +20481,7 @@ var require_move = __commonJS({
|
|
|
20481
20481
|
}
|
|
20482
20482
|
}
|
|
20483
20483
|
try {
|
|
20484
|
-
await
|
|
20484
|
+
await fs8.rename(src, dest);
|
|
20485
20485
|
} catch (err) {
|
|
20486
20486
|
if (err.code !== "EXDEV") {
|
|
20487
20487
|
throw err;
|
|
@@ -20506,8 +20506,8 @@ var require_move = __commonJS({
|
|
|
20506
20506
|
var require_move_sync = __commonJS({
|
|
20507
20507
|
"../../node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
|
|
20508
20508
|
"use strict";
|
|
20509
|
-
var
|
|
20510
|
-
var
|
|
20509
|
+
var fs8 = require_graceful_fs();
|
|
20510
|
+
var path9 = require("path");
|
|
20511
20511
|
var copySync = require_copy2().copySync;
|
|
20512
20512
|
var removeSync = require_remove().removeSync;
|
|
20513
20513
|
var mkdirpSync = require_mkdirs().mkdirpSync;
|
|
@@ -20517,12 +20517,12 @@ var require_move_sync = __commonJS({
|
|
|
20517
20517
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
20518
20518
|
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
|
|
20519
20519
|
stat.checkParentPathsSync(src, srcStat, dest, "move");
|
|
20520
|
-
if (!isParentRoot(dest)) mkdirpSync(
|
|
20520
|
+
if (!isParentRoot(dest)) mkdirpSync(path9.dirname(dest));
|
|
20521
20521
|
return doRename(src, dest, overwrite, isChangingCase);
|
|
20522
20522
|
}
|
|
20523
20523
|
function isParentRoot(dest) {
|
|
20524
|
-
const parent =
|
|
20525
|
-
const parsedPath =
|
|
20524
|
+
const parent = path9.dirname(dest);
|
|
20525
|
+
const parsedPath = path9.parse(parent);
|
|
20526
20526
|
return parsedPath.root === parent;
|
|
20527
20527
|
}
|
|
20528
20528
|
function doRename(src, dest, overwrite, isChangingCase) {
|
|
@@ -20531,12 +20531,12 @@ var require_move_sync = __commonJS({
|
|
|
20531
20531
|
removeSync(dest);
|
|
20532
20532
|
return rename(src, dest, overwrite);
|
|
20533
20533
|
}
|
|
20534
|
-
if (
|
|
20534
|
+
if (fs8.existsSync(dest)) throw new Error("dest already exists.");
|
|
20535
20535
|
return rename(src, dest, overwrite);
|
|
20536
20536
|
}
|
|
20537
20537
|
function rename(src, dest, overwrite) {
|
|
20538
20538
|
try {
|
|
20539
|
-
|
|
20539
|
+
fs8.renameSync(src, dest);
|
|
20540
20540
|
} catch (err) {
|
|
20541
20541
|
if (err.code !== "EXDEV") throw err;
|
|
20542
20542
|
return moveAcrossDevice(src, dest, overwrite);
|
|
@@ -26340,10 +26340,10 @@ var require_lib6 = __commonJS({
|
|
|
26340
26340
|
exports2.analyse = analyse;
|
|
26341
26341
|
var detectFile = (filepath, opts = {}) => new Promise((resolve4, reject) => {
|
|
26342
26342
|
let fd;
|
|
26343
|
-
const
|
|
26343
|
+
const fs8 = (0, node_1.default)();
|
|
26344
26344
|
const handler = (err, buffer) => {
|
|
26345
26345
|
if (fd) {
|
|
26346
|
-
|
|
26346
|
+
fs8.closeSync(fd);
|
|
26347
26347
|
}
|
|
26348
26348
|
if (err) {
|
|
26349
26349
|
reject(err);
|
|
@@ -26355,9 +26355,9 @@ var require_lib6 = __commonJS({
|
|
|
26355
26355
|
};
|
|
26356
26356
|
const sampleSize = (opts === null || opts === void 0 ? void 0 : opts.sampleSize) || 0;
|
|
26357
26357
|
if (sampleSize > 0) {
|
|
26358
|
-
fd =
|
|
26358
|
+
fd = fs8.openSync(filepath, "r");
|
|
26359
26359
|
let sample = Buffer.allocUnsafe(sampleSize);
|
|
26360
|
-
|
|
26360
|
+
fs8.read(fd, sample, 0, sampleSize, opts.offset, (err, bytesRead) => {
|
|
26361
26361
|
if (err) {
|
|
26362
26362
|
handler(err, null);
|
|
26363
26363
|
} else {
|
|
@@ -26369,22 +26369,22 @@ var require_lib6 = __commonJS({
|
|
|
26369
26369
|
});
|
|
26370
26370
|
return;
|
|
26371
26371
|
}
|
|
26372
|
-
|
|
26372
|
+
fs8.readFile(filepath, handler);
|
|
26373
26373
|
});
|
|
26374
26374
|
exports2.detectFile = detectFile;
|
|
26375
26375
|
var detectFileSync = (filepath, opts = {}) => {
|
|
26376
|
-
const
|
|
26376
|
+
const fs8 = (0, node_1.default)();
|
|
26377
26377
|
if (opts && opts.sampleSize) {
|
|
26378
|
-
const fd =
|
|
26378
|
+
const fd = fs8.openSync(filepath, "r");
|
|
26379
26379
|
let sample = Buffer.allocUnsafe(opts.sampleSize);
|
|
26380
|
-
const bytesRead =
|
|
26380
|
+
const bytesRead = fs8.readSync(fd, sample, 0, opts.sampleSize, opts.offset);
|
|
26381
26381
|
if (bytesRead < opts.sampleSize) {
|
|
26382
26382
|
sample = sample.subarray(0, bytesRead);
|
|
26383
26383
|
}
|
|
26384
|
-
|
|
26384
|
+
fs8.closeSync(fd);
|
|
26385
26385
|
return (0, exports2.detect)(sample);
|
|
26386
26386
|
}
|
|
26387
|
-
return (0, exports2.detect)(
|
|
26387
|
+
return (0, exports2.detect)(fs8.readFileSync(filepath));
|
|
26388
26388
|
};
|
|
26389
26389
|
exports2.detectFileSync = detectFileSync;
|
|
26390
26390
|
exports2.default = {
|
|
@@ -39927,21 +39927,21 @@ function camelCase(input, options) {
|
|
|
39927
39927
|
|
|
39928
39928
|
// src/commands/init/v2/index.ts
|
|
39929
39929
|
var spawn = __toESM(require_cross_spawn(), 1);
|
|
39930
|
-
var
|
|
39930
|
+
var fs7 = __toESM(require("fs"), 1);
|
|
39931
39931
|
var os2 = __toESM(require("os"), 1);
|
|
39932
|
-
var
|
|
39932
|
+
var path7 = __toESM(require("path"), 1);
|
|
39933
39933
|
|
|
39934
39934
|
// package.json
|
|
39935
|
-
var version = "3.
|
|
39935
|
+
var version = "3.9.1";
|
|
39936
39936
|
|
|
39937
39937
|
// src/helpers/index.ts
|
|
39938
39938
|
var fs2 = __toESM(require("fs"), 1);
|
|
39939
39939
|
var isAlphaNumericAndHyphens = (str) => {
|
|
39940
39940
|
return /^[a-zA-Z0-9-]+$/.test(str);
|
|
39941
39941
|
};
|
|
39942
|
-
function isEmptyDir(
|
|
39942
|
+
function isEmptyDir(path9) {
|
|
39943
39943
|
try {
|
|
39944
|
-
const directory = fs2.opendirSync(
|
|
39944
|
+
const directory = fs2.opendirSync(path9);
|
|
39945
39945
|
const entry = directory.readSync();
|
|
39946
39946
|
directory.closeSync();
|
|
39947
39947
|
return entry === null;
|
|
@@ -44143,12 +44143,12 @@ var PathBase = class {
|
|
|
44143
44143
|
/**
|
|
44144
44144
|
* Get the Path object referenced by the string path, resolved from this Path
|
|
44145
44145
|
*/
|
|
44146
|
-
resolve(
|
|
44147
|
-
if (!
|
|
44146
|
+
resolve(path9) {
|
|
44147
|
+
if (!path9) {
|
|
44148
44148
|
return this;
|
|
44149
44149
|
}
|
|
44150
|
-
const rootPath = this.getRootString(
|
|
44151
|
-
const dir =
|
|
44150
|
+
const rootPath = this.getRootString(path9);
|
|
44151
|
+
const dir = path9.substring(rootPath.length);
|
|
44152
44152
|
const dirParts = dir.split(this.splitSep);
|
|
44153
44153
|
const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
|
|
44154
44154
|
return result;
|
|
@@ -44900,8 +44900,8 @@ var PathWin32 = class _PathWin32 extends PathBase {
|
|
|
44900
44900
|
/**
|
|
44901
44901
|
* @internal
|
|
44902
44902
|
*/
|
|
44903
|
-
getRootString(
|
|
44904
|
-
return import_node_path.win32.parse(
|
|
44903
|
+
getRootString(path9) {
|
|
44904
|
+
return import_node_path.win32.parse(path9).root;
|
|
44905
44905
|
}
|
|
44906
44906
|
/**
|
|
44907
44907
|
* @internal
|
|
@@ -44947,8 +44947,8 @@ var PathPosix = class _PathPosix extends PathBase {
|
|
|
44947
44947
|
/**
|
|
44948
44948
|
* @internal
|
|
44949
44949
|
*/
|
|
44950
|
-
getRootString(
|
|
44951
|
-
return
|
|
44950
|
+
getRootString(path9) {
|
|
44951
|
+
return path9.startsWith("/") ? "/" : "";
|
|
44952
44952
|
}
|
|
44953
44953
|
/**
|
|
44954
44954
|
* @internal
|
|
@@ -44997,8 +44997,8 @@ var PathScurryBase = class {
|
|
|
44997
44997
|
*
|
|
44998
44998
|
* @internal
|
|
44999
44999
|
*/
|
|
45000
|
-
constructor(cwd = process.cwd(), pathImpl, sep3, { nocase, childrenCacheSize = 16 * 1024, fs:
|
|
45001
|
-
this.#fs = fsFromOption(
|
|
45000
|
+
constructor(cwd = process.cwd(), pathImpl, sep3, { nocase, childrenCacheSize = 16 * 1024, fs: fs8 = defaultFS } = {}) {
|
|
45001
|
+
this.#fs = fsFromOption(fs8);
|
|
45002
45002
|
if (cwd instanceof URL || cwd.startsWith("file://")) {
|
|
45003
45003
|
cwd = (0, import_node_url.fileURLToPath)(cwd);
|
|
45004
45004
|
}
|
|
@@ -45037,11 +45037,11 @@ var PathScurryBase = class {
|
|
|
45037
45037
|
/**
|
|
45038
45038
|
* Get the depth of a provided path, string, or the cwd
|
|
45039
45039
|
*/
|
|
45040
|
-
depth(
|
|
45041
|
-
if (typeof
|
|
45042
|
-
|
|
45040
|
+
depth(path9 = this.cwd) {
|
|
45041
|
+
if (typeof path9 === "string") {
|
|
45042
|
+
path9 = this.cwd.resolve(path9);
|
|
45043
45043
|
}
|
|
45044
|
-
return
|
|
45044
|
+
return path9.depth();
|
|
45045
45045
|
}
|
|
45046
45046
|
/**
|
|
45047
45047
|
* Return the cache of child entries. Exposed so subclasses can create
|
|
@@ -45528,9 +45528,9 @@ var PathScurryBase = class {
|
|
|
45528
45528
|
process4();
|
|
45529
45529
|
return results;
|
|
45530
45530
|
}
|
|
45531
|
-
chdir(
|
|
45531
|
+
chdir(path9 = this.cwd) {
|
|
45532
45532
|
const oldCwd = this.cwd;
|
|
45533
|
-
this.cwd = typeof
|
|
45533
|
+
this.cwd = typeof path9 === "string" ? this.cwd.resolve(path9) : path9;
|
|
45534
45534
|
this.cwd[setAsCwd](oldCwd);
|
|
45535
45535
|
}
|
|
45536
45536
|
};
|
|
@@ -45556,8 +45556,8 @@ var PathScurryWin32 = class extends PathScurryBase {
|
|
|
45556
45556
|
/**
|
|
45557
45557
|
* @internal
|
|
45558
45558
|
*/
|
|
45559
|
-
newRoot(
|
|
45560
|
-
return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs:
|
|
45559
|
+
newRoot(fs8) {
|
|
45560
|
+
return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs8 });
|
|
45561
45561
|
}
|
|
45562
45562
|
/**
|
|
45563
45563
|
* Return true if the provided path string is an absolute path
|
|
@@ -45585,8 +45585,8 @@ var PathScurryPosix = class extends PathScurryBase {
|
|
|
45585
45585
|
/**
|
|
45586
45586
|
* @internal
|
|
45587
45587
|
*/
|
|
45588
|
-
newRoot(
|
|
45589
|
-
return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs:
|
|
45588
|
+
newRoot(fs8) {
|
|
45589
|
+
return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs8 });
|
|
45590
45590
|
}
|
|
45591
45591
|
/**
|
|
45592
45592
|
* Return true if the provided path string is an absolute path
|
|
@@ -45886,8 +45886,8 @@ var MatchRecord = class {
|
|
|
45886
45886
|
}
|
|
45887
45887
|
// match, absolute, ifdir
|
|
45888
45888
|
entries() {
|
|
45889
|
-
return [...this.store.entries()].map(([
|
|
45890
|
-
|
|
45889
|
+
return [...this.store.entries()].map(([path9, n]) => [
|
|
45890
|
+
path9,
|
|
45891
45891
|
!!(n & 2),
|
|
45892
45892
|
!!(n & 1)
|
|
45893
45893
|
]);
|
|
@@ -46092,9 +46092,9 @@ var GlobUtil = class {
|
|
|
46092
46092
|
signal;
|
|
46093
46093
|
maxDepth;
|
|
46094
46094
|
includeChildMatches;
|
|
46095
|
-
constructor(patterns,
|
|
46095
|
+
constructor(patterns, path9, opts) {
|
|
46096
46096
|
this.patterns = patterns;
|
|
46097
|
-
this.path =
|
|
46097
|
+
this.path = path9;
|
|
46098
46098
|
this.opts = opts;
|
|
46099
46099
|
this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
|
|
46100
46100
|
this.includeChildMatches = opts.includeChildMatches !== false;
|
|
@@ -46113,11 +46113,11 @@ var GlobUtil = class {
|
|
|
46113
46113
|
});
|
|
46114
46114
|
}
|
|
46115
46115
|
}
|
|
46116
|
-
#ignored(
|
|
46117
|
-
return this.seen.has(
|
|
46116
|
+
#ignored(path9) {
|
|
46117
|
+
return this.seen.has(path9) || !!this.#ignore?.ignored?.(path9);
|
|
46118
46118
|
}
|
|
46119
|
-
#childrenIgnored(
|
|
46120
|
-
return !!this.#ignore?.childrenIgnored?.(
|
|
46119
|
+
#childrenIgnored(path9) {
|
|
46120
|
+
return !!this.#ignore?.childrenIgnored?.(path9);
|
|
46121
46121
|
}
|
|
46122
46122
|
// backpressure mechanism
|
|
46123
46123
|
pause() {
|
|
@@ -46332,8 +46332,8 @@ var GlobUtil = class {
|
|
|
46332
46332
|
};
|
|
46333
46333
|
var GlobWalker = class extends GlobUtil {
|
|
46334
46334
|
matches = /* @__PURE__ */ new Set();
|
|
46335
|
-
constructor(patterns,
|
|
46336
|
-
super(patterns,
|
|
46335
|
+
constructor(patterns, path9, opts) {
|
|
46336
|
+
super(patterns, path9, opts);
|
|
46337
46337
|
}
|
|
46338
46338
|
matchEmit(e) {
|
|
46339
46339
|
this.matches.add(e);
|
|
@@ -46370,8 +46370,8 @@ var GlobWalker = class extends GlobUtil {
|
|
|
46370
46370
|
};
|
|
46371
46371
|
var GlobStream = class extends GlobUtil {
|
|
46372
46372
|
results;
|
|
46373
|
-
constructor(patterns,
|
|
46374
|
-
super(patterns,
|
|
46373
|
+
constructor(patterns, path9, opts) {
|
|
46374
|
+
super(patterns, path9, opts);
|
|
46375
46375
|
this.results = new Minipass({
|
|
46376
46376
|
signal: this.signal,
|
|
46377
46377
|
objectMode: true
|
|
@@ -48035,8 +48035,8 @@ JSONPath.prototype._getPreferredOutput = function(ea) {
|
|
|
48035
48035
|
const resultType = this.currResultType;
|
|
48036
48036
|
switch (resultType) {
|
|
48037
48037
|
case "all": {
|
|
48038
|
-
const
|
|
48039
|
-
ea.pointer = JSONPath.toPointer(
|
|
48038
|
+
const path9 = Array.isArray(ea.path) ? ea.path : JSONPath.toPathArray(ea.path);
|
|
48039
|
+
ea.pointer = JSONPath.toPointer(path9);
|
|
48040
48040
|
ea.path = typeof ea.path === "string" ? ea.path : JSONPath.toPathString(ea.path);
|
|
48041
48041
|
return ea;
|
|
48042
48042
|
}
|
|
@@ -48059,11 +48059,11 @@ JSONPath.prototype._handleCallback = function(fullRetObj, callback, type) {
|
|
|
48059
48059
|
callback(preferredOutput, type, fullRetObj);
|
|
48060
48060
|
}
|
|
48061
48061
|
};
|
|
48062
|
-
JSONPath.prototype._trace = function(expr, val,
|
|
48062
|
+
JSONPath.prototype._trace = function(expr, val, path9, parent, parentPropName, callback, hasArrExpr, literalPriority) {
|
|
48063
48063
|
let retObj;
|
|
48064
48064
|
if (!expr.length) {
|
|
48065
48065
|
retObj = {
|
|
48066
|
-
path:
|
|
48066
|
+
path: path9,
|
|
48067
48067
|
value: val,
|
|
48068
48068
|
parent,
|
|
48069
48069
|
parentProperty: parentPropName,
|
|
@@ -48084,28 +48084,28 @@ JSONPath.prototype._trace = function(expr, val, path8, parent, parentPropName, c
|
|
|
48084
48084
|
}
|
|
48085
48085
|
}
|
|
48086
48086
|
if ((typeof loc !== "string" || literalPriority) && val && Object.hasOwn(val, loc)) {
|
|
48087
|
-
addRet(this._trace(x, val[loc], push(
|
|
48087
|
+
addRet(this._trace(x, val[loc], push(path9, loc), val, loc, callback, hasArrExpr));
|
|
48088
48088
|
} else if (loc === "*") {
|
|
48089
48089
|
this._walk(val, (m) => {
|
|
48090
|
-
addRet(this._trace(x, val[m], push(
|
|
48090
|
+
addRet(this._trace(x, val[m], push(path9, m), val, m, callback, true, true));
|
|
48091
48091
|
});
|
|
48092
48092
|
} else if (loc === "..") {
|
|
48093
|
-
addRet(this._trace(x, val,
|
|
48093
|
+
addRet(this._trace(x, val, path9, parent, parentPropName, callback, hasArrExpr));
|
|
48094
48094
|
this._walk(val, (m) => {
|
|
48095
48095
|
if (typeof val[m] === "object") {
|
|
48096
|
-
addRet(this._trace(expr.slice(), val[m], push(
|
|
48096
|
+
addRet(this._trace(expr.slice(), val[m], push(path9, m), val, m, callback, true));
|
|
48097
48097
|
}
|
|
48098
48098
|
});
|
|
48099
48099
|
} else if (loc === "^") {
|
|
48100
48100
|
this._hasParentSelector = true;
|
|
48101
48101
|
return {
|
|
48102
|
-
path:
|
|
48102
|
+
path: path9.slice(0, -1),
|
|
48103
48103
|
expr: x,
|
|
48104
48104
|
isParentSelector: true
|
|
48105
48105
|
};
|
|
48106
48106
|
} else if (loc === "~") {
|
|
48107
48107
|
retObj = {
|
|
48108
|
-
path: push(
|
|
48108
|
+
path: push(path9, loc),
|
|
48109
48109
|
value: parentPropName,
|
|
48110
48110
|
parent,
|
|
48111
48111
|
parentProperty: null
|
|
@@ -48113,9 +48113,9 @@ JSONPath.prototype._trace = function(expr, val, path8, parent, parentPropName, c
|
|
|
48113
48113
|
this._handleCallback(retObj, callback, "property");
|
|
48114
48114
|
return retObj;
|
|
48115
48115
|
} else if (loc === "$") {
|
|
48116
|
-
addRet(this._trace(x, val,
|
|
48116
|
+
addRet(this._trace(x, val, path9, null, null, callback, hasArrExpr));
|
|
48117
48117
|
} else if (/^(-?\d*):(-?\d*):?(\d*)$/u.test(loc)) {
|
|
48118
|
-
addRet(this._slice(loc, x, val,
|
|
48118
|
+
addRet(this._slice(loc, x, val, path9, parent, parentPropName, callback));
|
|
48119
48119
|
} else if (loc.indexOf("?(") === 0) {
|
|
48120
48120
|
if (this.currEval === false) {
|
|
48121
48121
|
throw new Error("Eval [?(expr)] prevented in JSONPath expression.");
|
|
@@ -48126,15 +48126,15 @@ JSONPath.prototype._trace = function(expr, val, path8, parent, parentPropName, c
|
|
|
48126
48126
|
this._walk(val, (m) => {
|
|
48127
48127
|
const npath = [nested[2]];
|
|
48128
48128
|
const nvalue = nested[1] ? val[m][nested[1]] : val[m];
|
|
48129
|
-
const filterResults = this._trace(npath, nvalue,
|
|
48129
|
+
const filterResults = this._trace(npath, nvalue, path9, parent, parentPropName, callback, true);
|
|
48130
48130
|
if (filterResults.length > 0) {
|
|
48131
|
-
addRet(this._trace(x, val[m], push(
|
|
48131
|
+
addRet(this._trace(x, val[m], push(path9, m), val, m, callback, true));
|
|
48132
48132
|
}
|
|
48133
48133
|
});
|
|
48134
48134
|
} else {
|
|
48135
48135
|
this._walk(val, (m) => {
|
|
48136
|
-
if (this._eval(safeLoc, val[m], m,
|
|
48137
|
-
addRet(this._trace(x, val[m], push(
|
|
48136
|
+
if (this._eval(safeLoc, val[m], m, path9, parent, parentPropName)) {
|
|
48137
|
+
addRet(this._trace(x, val[m], push(path9, m), val, m, callback, true));
|
|
48138
48138
|
}
|
|
48139
48139
|
});
|
|
48140
48140
|
}
|
|
@@ -48142,7 +48142,7 @@ JSONPath.prototype._trace = function(expr, val, path8, parent, parentPropName, c
|
|
|
48142
48142
|
if (this.currEval === false) {
|
|
48143
48143
|
throw new Error("Eval [(expr)] prevented in JSONPath expression.");
|
|
48144
48144
|
}
|
|
48145
|
-
addRet(this._trace(unshift(this._eval(loc, val,
|
|
48145
|
+
addRet(this._trace(unshift(this._eval(loc, val, path9.at(-1), path9.slice(0, -1), parent, parentPropName), x), val, path9, parent, parentPropName, callback, hasArrExpr));
|
|
48146
48146
|
} else if (loc[0] === "@") {
|
|
48147
48147
|
let addType = false;
|
|
48148
48148
|
const valueType = loc.slice(1, -2);
|
|
@@ -48186,7 +48186,7 @@ JSONPath.prototype._trace = function(expr, val, path8, parent, parentPropName, c
|
|
|
48186
48186
|
}
|
|
48187
48187
|
break;
|
|
48188
48188
|
case "other":
|
|
48189
|
-
addType = this.currOtherTypeCallback(val,
|
|
48189
|
+
addType = this.currOtherTypeCallback(val, path9, parent, parentPropName);
|
|
48190
48190
|
break;
|
|
48191
48191
|
case "null":
|
|
48192
48192
|
if (val === null) {
|
|
@@ -48199,7 +48199,7 @@ JSONPath.prototype._trace = function(expr, val, path8, parent, parentPropName, c
|
|
|
48199
48199
|
}
|
|
48200
48200
|
if (addType) {
|
|
48201
48201
|
retObj = {
|
|
48202
|
-
path:
|
|
48202
|
+
path: path9,
|
|
48203
48203
|
value: val,
|
|
48204
48204
|
parent,
|
|
48205
48205
|
parentProperty: parentPropName
|
|
@@ -48209,14 +48209,14 @@ JSONPath.prototype._trace = function(expr, val, path8, parent, parentPropName, c
|
|
|
48209
48209
|
}
|
|
48210
48210
|
} else if (loc[0] === "`" && val && Object.hasOwn(val, loc.slice(1))) {
|
|
48211
48211
|
const locProp = loc.slice(1);
|
|
48212
|
-
addRet(this._trace(x, val[locProp], push(
|
|
48212
|
+
addRet(this._trace(x, val[locProp], push(path9, locProp), val, locProp, callback, hasArrExpr, true));
|
|
48213
48213
|
} else if (loc.includes(",")) {
|
|
48214
48214
|
const parts = loc.split(",");
|
|
48215
48215
|
for (const part of parts) {
|
|
48216
|
-
addRet(this._trace(unshift(part, x), val,
|
|
48216
|
+
addRet(this._trace(unshift(part, x), val, path9, parent, parentPropName, callback, true));
|
|
48217
48217
|
}
|
|
48218
48218
|
} else if (!literalPriority && val && Object.hasOwn(val, loc)) {
|
|
48219
|
-
addRet(this._trace(x, val[loc], push(
|
|
48219
|
+
addRet(this._trace(x, val[loc], push(path9, loc), val, loc, callback, hasArrExpr, true));
|
|
48220
48220
|
}
|
|
48221
48221
|
if (this._hasParentSelector) {
|
|
48222
48222
|
for (let t = 0; t < ret.length; t++) {
|
|
@@ -48250,7 +48250,7 @@ JSONPath.prototype._walk = function(val, f) {
|
|
|
48250
48250
|
});
|
|
48251
48251
|
}
|
|
48252
48252
|
};
|
|
48253
|
-
JSONPath.prototype._slice = function(loc, expr, val,
|
|
48253
|
+
JSONPath.prototype._slice = function(loc, expr, val, path9, parent, parentPropName, callback) {
|
|
48254
48254
|
if (!Array.isArray(val)) {
|
|
48255
48255
|
return void 0;
|
|
48256
48256
|
}
|
|
@@ -48260,14 +48260,14 @@ JSONPath.prototype._slice = function(loc, expr, val, path8, parent, parentPropNa
|
|
|
48260
48260
|
end = end < 0 ? Math.max(0, end + len) : Math.min(len, end);
|
|
48261
48261
|
const ret = [];
|
|
48262
48262
|
for (let i = start; i < end; i += step) {
|
|
48263
|
-
const tmp = this._trace(unshift(i, expr), val,
|
|
48263
|
+
const tmp = this._trace(unshift(i, expr), val, path9, parent, parentPropName, callback, true);
|
|
48264
48264
|
tmp.forEach((t) => {
|
|
48265
48265
|
ret.push(t);
|
|
48266
48266
|
});
|
|
48267
48267
|
}
|
|
48268
48268
|
return ret;
|
|
48269
48269
|
};
|
|
48270
|
-
JSONPath.prototype._eval = function(code, _v, _vname,
|
|
48270
|
+
JSONPath.prototype._eval = function(code, _v, _vname, path9, parent, parentPropName) {
|
|
48271
48271
|
this.currSandbox._$_parentProperty = parentPropName;
|
|
48272
48272
|
this.currSandbox._$_parent = parent;
|
|
48273
48273
|
this.currSandbox._$_property = _vname;
|
|
@@ -48275,7 +48275,7 @@ JSONPath.prototype._eval = function(code, _v, _vname, path8, parent, parentPropN
|
|
|
48275
48275
|
this.currSandbox._$_v = _v;
|
|
48276
48276
|
const containsPath = code.includes("@path");
|
|
48277
48277
|
if (containsPath) {
|
|
48278
|
-
this.currSandbox._$_path = JSONPath.toPathString(
|
|
48278
|
+
this.currSandbox._$_path = JSONPath.toPathString(path9.concat([_vname]));
|
|
48279
48279
|
}
|
|
48280
48280
|
const scriptCacheKey = this.currEval + "Script:" + code;
|
|
48281
48281
|
if (!JSONPath.cache[scriptCacheKey]) {
|
|
@@ -48718,10 +48718,32 @@ var SeekaAppScaffolder = class {
|
|
|
48718
48718
|
}
|
|
48719
48719
|
};
|
|
48720
48720
|
|
|
48721
|
-
// src/
|
|
48722
|
-
var
|
|
48723
|
-
var
|
|
48721
|
+
// src/helpers/zip.ts
|
|
48722
|
+
var fs4 = __toESM(require("fs"), 1);
|
|
48723
|
+
var path4 = __toESM(require("path"), 1);
|
|
48724
48724
|
var import_jszip = __toESM(require_lib3(), 1);
|
|
48725
|
+
async function extractZipToDirectory(zipBuffer, destDir) {
|
|
48726
|
+
const zip = await import_jszip.default.loadAsync(zipBuffer);
|
|
48727
|
+
const entries = Object.entries(zip.files);
|
|
48728
|
+
for (const [relativePath, zipEntry] of entries) {
|
|
48729
|
+
const destPath = path4.join(destDir, relativePath);
|
|
48730
|
+
if (zipEntry.dir) {
|
|
48731
|
+
fs4.mkdirSync(destPath, { recursive: true });
|
|
48732
|
+
} else {
|
|
48733
|
+
fs4.mkdirSync(path4.dirname(destPath), { recursive: true });
|
|
48734
|
+
const content = await zipEntry.async("nodebuffer");
|
|
48735
|
+
fs4.writeFileSync(destPath, content);
|
|
48736
|
+
}
|
|
48737
|
+
}
|
|
48738
|
+
}
|
|
48739
|
+
async function extractZipFileToDirectory(zipPath, destDir) {
|
|
48740
|
+
const zipBuffer = fs4.readFileSync(zipPath);
|
|
48741
|
+
await extractZipToDirectory(zipBuffer, destDir);
|
|
48742
|
+
}
|
|
48743
|
+
|
|
48744
|
+
// src/commands/ai/context/index.ts
|
|
48745
|
+
var fs6 = __toESM(require("fs"), 1);
|
|
48746
|
+
var path6 = __toESM(require("path"), 1);
|
|
48725
48747
|
|
|
48726
48748
|
// src/helpers/config/index.ts
|
|
48727
48749
|
var import_path = __toESM(require("path"), 1);
|
|
@@ -48758,34 +48780,20 @@ async function downloadFile(url) {
|
|
|
48758
48780
|
const arrayBuffer = await response.arrayBuffer();
|
|
48759
48781
|
return Buffer.from(arrayBuffer);
|
|
48760
48782
|
}
|
|
48761
|
-
async function extractZipToDirectory(zipBuffer, destDir) {
|
|
48762
|
-
const zip = await import_jszip.default.loadAsync(zipBuffer);
|
|
48763
|
-
const entries = Object.entries(zip.files);
|
|
48764
|
-
for (const [relativePath, zipEntry] of entries) {
|
|
48765
|
-
const destPath = path5.join(destDir, relativePath);
|
|
48766
|
-
if (zipEntry.dir) {
|
|
48767
|
-
fs5.mkdirSync(destPath, { recursive: true });
|
|
48768
|
-
} else {
|
|
48769
|
-
fs5.mkdirSync(path5.dirname(destPath), { recursive: true });
|
|
48770
|
-
const content = await zipEntry.async("nodebuffer");
|
|
48771
|
-
fs5.writeFileSync(destPath, content);
|
|
48772
|
-
}
|
|
48773
|
-
}
|
|
48774
|
-
}
|
|
48775
48783
|
var aiContextCommand = async (options = {}) => {
|
|
48776
48784
|
const targetDir = options.targetDir || process.cwd();
|
|
48777
|
-
const contextDestDir =
|
|
48785
|
+
const contextDestDir = path6.join(targetDir, ".seeka", "ai", "context");
|
|
48778
48786
|
const contextUrl = getContextPackageUrl(targetDir, options.contextPackageUrl);
|
|
48779
48787
|
console.log("Seeka AI Context");
|
|
48780
48788
|
console.log("================");
|
|
48781
48789
|
console.log("");
|
|
48782
48790
|
console.log(`Target: ${contextDestDir}`);
|
|
48783
48791
|
console.log("");
|
|
48784
|
-
if (
|
|
48792
|
+
if (fs6.existsSync(contextDestDir)) {
|
|
48785
48793
|
console.log("Removing existing AI context...");
|
|
48786
|
-
|
|
48794
|
+
fs6.rmSync(contextDestDir, { recursive: true, force: true });
|
|
48787
48795
|
}
|
|
48788
|
-
|
|
48796
|
+
fs6.mkdirSync(contextDestDir, { recursive: true });
|
|
48789
48797
|
console.log("Downloading AI context package...");
|
|
48790
48798
|
let zipBuffer;
|
|
48791
48799
|
try {
|
|
@@ -48823,8 +48831,8 @@ var aiContextCommand = async (options = {}) => {
|
|
|
48823
48831
|
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
48824
48832
|
source: options.contextPackageUrl ? "custom" : "public"
|
|
48825
48833
|
};
|
|
48826
|
-
const metaPath =
|
|
48827
|
-
|
|
48834
|
+
const metaPath = path6.join(contextDestDir, "meta.json");
|
|
48835
|
+
fs6.writeFileSync(metaPath, JSON.stringify(metaJson, null, 2), "utf-8");
|
|
48828
48836
|
console.log("");
|
|
48829
48837
|
console.log("\u2713 AI context installed successfully!");
|
|
48830
48838
|
console.log("");
|
|
@@ -48859,35 +48867,38 @@ var initCommandV2 = async (options) => {
|
|
|
48859
48867
|
}
|
|
48860
48868
|
const orgName = options.orgName.toLowerCase();
|
|
48861
48869
|
const projectPascalCase = camelCase(projectName, { pascalCase: true });
|
|
48862
|
-
const projectDir =
|
|
48870
|
+
const projectDir = path7.resolve(options.outputDirectory, !options.skipSubDir ? options.directoryName || projectName : "");
|
|
48863
48871
|
console.log(`Creating new ${options.template.replace(/-/gi, " ")} Seeka app in ${projectDir}`);
|
|
48864
48872
|
console.log("");
|
|
48865
|
-
if (!options.skipSubDir &&
|
|
48873
|
+
if (!options.skipSubDir && fs7.existsSync(projectDir) && isEmptyDir(projectDir) === false) {
|
|
48866
48874
|
if (options.force) {
|
|
48867
48875
|
console.log("--force was used and destination directory is not empty. Clearing out the directory");
|
|
48868
|
-
const gitDirPath =
|
|
48869
|
-
const gitDirExists =
|
|
48876
|
+
const gitDirPath = path7.resolve(projectDir, ".git");
|
|
48877
|
+
const gitDirExists = fs7.existsSync(gitDirPath);
|
|
48870
48878
|
if (gitDirExists) {
|
|
48871
48879
|
console.info(".git directory found in directory, I will preserve it and remove all other files and directories to prepare for the app creation");
|
|
48872
48880
|
}
|
|
48873
|
-
const items =
|
|
48881
|
+
const items = fs7.readdirSync(projectDir);
|
|
48874
48882
|
for (const item of items) {
|
|
48875
48883
|
if (item === ".git") {
|
|
48876
48884
|
continue;
|
|
48877
48885
|
}
|
|
48878
|
-
const itemPath =
|
|
48879
|
-
|
|
48886
|
+
const itemPath = path7.resolve(projectDir, item);
|
|
48887
|
+
fs7.rmSync(itemPath, { recursive: true, force: true });
|
|
48880
48888
|
}
|
|
48881
48889
|
} else {
|
|
48882
48890
|
console.error("Directory is not empty. Use --force to create app in non-empty directory");
|
|
48883
48891
|
return;
|
|
48884
48892
|
}
|
|
48885
48893
|
}
|
|
48886
|
-
if (!
|
|
48887
|
-
|
|
48894
|
+
if (!fs7.existsSync(projectDir)) {
|
|
48895
|
+
fs7.mkdirSync(projectDir, { recursive: true });
|
|
48888
48896
|
}
|
|
48889
|
-
const
|
|
48890
|
-
const
|
|
48897
|
+
const templateZipPath = path7.resolve(__dirname, "init-template.zip");
|
|
48898
|
+
const templateDir = fs7.mkdtempSync(path7.join(os2.tmpdir(), "seeka-init-template-"));
|
|
48899
|
+
console.log("Extracting template...");
|
|
48900
|
+
await extractZipFileToDirectory(templateZipPath, templateDir);
|
|
48901
|
+
const scaffoldOutputDir = options.skipSubDir ? fs7.mkdtempSync(path7.join(os2.tmpdir(), "seeka-app-init-v2-")) : projectDir;
|
|
48891
48902
|
const scaffolder = new SeekaAppScaffolder();
|
|
48892
48903
|
await scaffolder.scaffoldSeekaApp({
|
|
48893
48904
|
templateDir,
|
|
@@ -48895,6 +48906,12 @@ var initCommandV2 = async (options) => {
|
|
|
48895
48906
|
environmentVariables: options.environmentVariables,
|
|
48896
48907
|
destinationDir: scaffoldOutputDir,
|
|
48897
48908
|
force: options.force,
|
|
48909
|
+
fileRenames: [
|
|
48910
|
+
options.template === "azure-function" ? {
|
|
48911
|
+
sourcePath: "./README.azurefunc.md",
|
|
48912
|
+
newPath: "README.md"
|
|
48913
|
+
} : null
|
|
48914
|
+
].filter(Boolean),
|
|
48898
48915
|
textReplacements: [
|
|
48899
48916
|
{
|
|
48900
48917
|
sourcePath: "**/*",
|
|
@@ -48926,6 +48943,16 @@ var initCommandV2 = async (options) => {
|
|
|
48926
48943
|
findText: "server-azurefunc",
|
|
48927
48944
|
replaceText: "server"
|
|
48928
48945
|
},
|
|
48946
|
+
{
|
|
48947
|
+
sourcePath: "README.md",
|
|
48948
|
+
findText: "server-azurefunc",
|
|
48949
|
+
replaceText: "server"
|
|
48950
|
+
},
|
|
48951
|
+
{
|
|
48952
|
+
sourcePath: "app/ui/vite.config.mts",
|
|
48953
|
+
findText: "server-azurefunc",
|
|
48954
|
+
replaceText: "server"
|
|
48955
|
+
},
|
|
48929
48956
|
{
|
|
48930
48957
|
sourcePath: "app/browser/scripts/esbuild/build-browser-plugin.mjs",
|
|
48931
48958
|
findText: "server-azurefunc",
|
|
@@ -48989,8 +49016,8 @@ var initCommandV2 = async (options) => {
|
|
|
48989
49016
|
]
|
|
48990
49017
|
});
|
|
48991
49018
|
if (options.skipSubDir) {
|
|
48992
|
-
|
|
48993
|
-
|
|
49019
|
+
fs7.cpSync(scaffoldOutputDir, projectDir, { recursive: true });
|
|
49020
|
+
fs7.rmSync(scaffoldOutputDir, { recursive: true, force: true });
|
|
48994
49021
|
}
|
|
48995
49022
|
if (options.installDependencies) {
|
|
48996
49023
|
console.info("Installing package dependencies");
|
|
@@ -49000,7 +49027,7 @@ var initCommandV2 = async (options) => {
|
|
|
49000
49027
|
console.error("Error installing package dependencies", err);
|
|
49001
49028
|
}
|
|
49002
49029
|
}
|
|
49003
|
-
const yarnRcFilePath =
|
|
49030
|
+
const yarnRcFilePath = path7.resolve(projectDir, ".yarnrc.yml");
|
|
49004
49031
|
let npmAuthToken = "<< GET TOKEN FROM https://seeka.app/settings/integrations/api >>";
|
|
49005
49032
|
if (!options.npmUsername || !options.npmPassword) {
|
|
49006
49033
|
console.warn('npmUsername and npmPassword was not provided. Either delete the "browser" directory from the app template before installing dependencies or get your NPM login from https://seeka.app/settings/integrations/api');
|
|
@@ -49008,7 +49035,7 @@ var initCommandV2 = async (options) => {
|
|
|
49008
49035
|
console.log("Using NPM registry username " + options.npmUsername);
|
|
49009
49036
|
npmAuthToken = `${options.npmUsername}:${options.npmPassword}`;
|
|
49010
49037
|
}
|
|
49011
|
-
|
|
49038
|
+
fs7.writeFileSync(
|
|
49012
49039
|
yarnRcFilePath,
|
|
49013
49040
|
`nodeLinker: node-modules
|
|
49014
49041
|
|
|
@@ -49019,14 +49046,14 @@ npmScopes:
|
|
|
49019
49046
|
npmRegistryServer: "https://npm.packages.seeka.services"`,
|
|
49020
49047
|
{ encoding: "utf8" }
|
|
49021
49048
|
);
|
|
49022
|
-
const yarnLockFilePath =
|
|
49023
|
-
|
|
49024
|
-
const seekaDir =
|
|
49025
|
-
if (!
|
|
49026
|
-
|
|
49049
|
+
const yarnLockFilePath = path7.resolve(projectDir, "yarn.lock");
|
|
49050
|
+
fs7.writeFileSync(yarnLockFilePath, "", { encoding: "utf8" });
|
|
49051
|
+
const seekaDir = path7.join(projectDir, ".seeka");
|
|
49052
|
+
if (!fs7.existsSync(seekaDir)) {
|
|
49053
|
+
fs7.mkdirSync(seekaDir, { recursive: true });
|
|
49027
49054
|
}
|
|
49028
49055
|
const { environmentVariables, ...otherOptions } = options;
|
|
49029
|
-
const configPath =
|
|
49056
|
+
const configPath = path7.join(seekaDir, "init.app.seeka.cli.config.json");
|
|
49030
49057
|
const configOutput = {
|
|
49031
49058
|
...otherOptions,
|
|
49032
49059
|
sdk: {
|
|
@@ -49035,12 +49062,12 @@ npmScopes:
|
|
|
49035
49062
|
};
|
|
49036
49063
|
delete configOutput.textReplacements;
|
|
49037
49064
|
delete configOutput.jsonActions;
|
|
49038
|
-
|
|
49039
|
-
const secretsConfigPath =
|
|
49065
|
+
fs7.writeFileSync(configPath, JSON.stringify(configOutput, null, 2), { encoding: "utf8" });
|
|
49066
|
+
const secretsConfigPath = path7.join(seekaDir, "init.app.secrets.seeka.cli.config.json");
|
|
49040
49067
|
const secretsConfigOutput = {
|
|
49041
49068
|
environmentVariables: environmentVariables || {}
|
|
49042
49069
|
};
|
|
49043
|
-
|
|
49070
|
+
fs7.writeFileSync(secretsConfigPath, JSON.stringify(secretsConfigOutput, null, 2), { encoding: "utf8" });
|
|
49044
49071
|
console.log("");
|
|
49045
49072
|
console.log("Installing AI context...");
|
|
49046
49073
|
try {
|
|
@@ -49056,7 +49083,7 @@ npmScopes:
|
|
|
49056
49083
|
console.log(`Created ${projectName} in ${projectDir}`);
|
|
49057
49084
|
console.log("Boom! Your new Seeka app is ready!");
|
|
49058
49085
|
writeSeparator();
|
|
49059
|
-
const relativePath = options.skipSubDir ? projectDir :
|
|
49086
|
+
const relativePath = options.skipSubDir ? projectDir : path7.relative(process.cwd(), projectDir);
|
|
49060
49087
|
console.log(`Run "cd ${relativePath}" to change to your apps directory and start creating some magic!`);
|
|
49061
49088
|
console.log("");
|
|
49062
49089
|
console.log("");
|
|
@@ -51895,9 +51922,9 @@ var import_rxjs = __toESM(require_cjs(), 1);
|
|
|
51895
51922
|
var import_run_async = __toESM(require_run_async(), 1);
|
|
51896
51923
|
var import_mute_stream2 = __toESM(require_lib5(), 1);
|
|
51897
51924
|
var _ = {
|
|
51898
|
-
set: (obj,
|
|
51925
|
+
set: (obj, path9 = "", value) => {
|
|
51899
51926
|
let pointer = obj;
|
|
51900
|
-
|
|
51927
|
+
path9.split(".").forEach((key, index2, arr) => {
|
|
51901
51928
|
if (key === "__proto__" || key === "constructor")
|
|
51902
51929
|
return;
|
|
51903
51930
|
if (index2 === arr.length - 1) {
|
|
@@ -51908,8 +51935,8 @@ var _ = {
|
|
|
51908
51935
|
pointer = pointer[key];
|
|
51909
51936
|
});
|
|
51910
51937
|
},
|
|
51911
|
-
get: (obj,
|
|
51912
|
-
const travel = (regexp) => String.prototype.split.call(
|
|
51938
|
+
get: (obj, path9 = "", defaultValue) => {
|
|
51939
|
+
const travel = (regexp) => String.prototype.split.call(path9, regexp).filter(Boolean).reduce(
|
|
51913
51940
|
// @ts-expect-error implicit any on res[key]
|
|
51914
51941
|
(res, key) => res == null ? res : res[key],
|
|
51915
51942
|
obj
|
|
@@ -52299,6 +52326,188 @@ var interactiveMenu = {
|
|
|
52299
52326
|
aiContext: "Install AI context files"
|
|
52300
52327
|
}
|
|
52301
52328
|
};
|
|
52329
|
+
var sharedEnvConfigPrompts = {
|
|
52330
|
+
seekaAppId: {
|
|
52331
|
+
message: "Enter SEEKA_APP_ID:",
|
|
52332
|
+
validation: {
|
|
52333
|
+
required: "SEEKA_APP_ID is required"
|
|
52334
|
+
}
|
|
52335
|
+
},
|
|
52336
|
+
seekaAppSecret: {
|
|
52337
|
+
message: "Enter SEEKA_APP_SECRET:",
|
|
52338
|
+
validation: {
|
|
52339
|
+
required: "SEEKA_APP_SECRET is required"
|
|
52340
|
+
}
|
|
52341
|
+
},
|
|
52342
|
+
dataEncryptionKey: {
|
|
52343
|
+
message: "Enter DATA_ENCRYPTION_KEY (leave empty to auto-generate):"
|
|
52344
|
+
},
|
|
52345
|
+
redisConnectionHost: {
|
|
52346
|
+
message: "Enter REDIS_CONNECTION_HOST:",
|
|
52347
|
+
validation: {
|
|
52348
|
+
required: "REDIS_CONNECTION_HOST is required"
|
|
52349
|
+
}
|
|
52350
|
+
},
|
|
52351
|
+
redisConnectionPort: {
|
|
52352
|
+
message: "Enter REDIS_CONNECTION_PORT:"
|
|
52353
|
+
},
|
|
52354
|
+
redisConnectionUser: {
|
|
52355
|
+
message: "Enter REDIS_CONNECTION_USER:"
|
|
52356
|
+
},
|
|
52357
|
+
redisConnectionPassword: {
|
|
52358
|
+
message: "Enter REDIS_CONNECTION_PASSWORD:",
|
|
52359
|
+
validation: {
|
|
52360
|
+
required: "REDIS_CONNECTION_PASSWORD is required"
|
|
52361
|
+
}
|
|
52362
|
+
},
|
|
52363
|
+
redisConnectionTls: {
|
|
52364
|
+
message: "Enter REDIS_CONNECTION_TLS:"
|
|
52365
|
+
},
|
|
52366
|
+
otelExporterOtlpLogsEndpoint: {
|
|
52367
|
+
message: "Enter OTEL_EXPORTER_OTLP_LOGS_ENDPOINT (optional):"
|
|
52368
|
+
},
|
|
52369
|
+
otelExporterOtlpLogsHeaders: {
|
|
52370
|
+
message: "Enter OTEL_EXPORTER_OTLP_LOGS_HEADERS (optional):"
|
|
52371
|
+
},
|
|
52372
|
+
selfHostBaseUrl: {
|
|
52373
|
+
message: "Enter SELF_HOST_BASEURL:"
|
|
52374
|
+
}
|
|
52375
|
+
};
|
|
52376
|
+
var initAppCommand = {
|
|
52377
|
+
description: "Initialize a new Seeka app with GitHub repository and Azure deployment configuration",
|
|
52378
|
+
interactive: {
|
|
52379
|
+
localAppPath: {
|
|
52380
|
+
message: "Enter local directory path where the app will be stored:",
|
|
52381
|
+
validation: {
|
|
52382
|
+
required: "Local app path is required"
|
|
52383
|
+
}
|
|
52384
|
+
},
|
|
52385
|
+
azureFunctionResourceGroupName: {
|
|
52386
|
+
message: "Enter Azure Function Resource Group Name:",
|
|
52387
|
+
validation: {
|
|
52388
|
+
required: "Azure Function Resource Group Name is required"
|
|
52389
|
+
}
|
|
52390
|
+
},
|
|
52391
|
+
viteBaseUrl: {
|
|
52392
|
+
message: "Enter VITE_BASE_URL:",
|
|
52393
|
+
validation: {
|
|
52394
|
+
required: "VITE_BASE_URL is required"
|
|
52395
|
+
}
|
|
52396
|
+
},
|
|
52397
|
+
selectedOwner: {
|
|
52398
|
+
message: "Where do you want to create the repository?"
|
|
52399
|
+
},
|
|
52400
|
+
developerName: {
|
|
52401
|
+
message: "Enter developer name:",
|
|
52402
|
+
validation: {
|
|
52403
|
+
required: "Developer name is required"
|
|
52404
|
+
}
|
|
52405
|
+
},
|
|
52406
|
+
developerEmail: {
|
|
52407
|
+
message: "Enter developer email:",
|
|
52408
|
+
validation: {
|
|
52409
|
+
required: "Developer email is required"
|
|
52410
|
+
}
|
|
52411
|
+
},
|
|
52412
|
+
npmUsername: {
|
|
52413
|
+
message: "Enter NPM username (optional):"
|
|
52414
|
+
},
|
|
52415
|
+
npmPassword: {
|
|
52416
|
+
message: "Enter NPM password (optional):"
|
|
52417
|
+
},
|
|
52418
|
+
...sharedEnvConfigPrompts
|
|
52419
|
+
}
|
|
52420
|
+
};
|
|
52421
|
+
var addEnvCommand = {
|
|
52422
|
+
description: "Add a new environment to an existing GitHub repository",
|
|
52423
|
+
interactive: {
|
|
52424
|
+
owner: {
|
|
52425
|
+
message: "Enter GitHub repository owner (username or organization):",
|
|
52426
|
+
validation: {
|
|
52427
|
+
required: "Repository owner is required"
|
|
52428
|
+
}
|
|
52429
|
+
},
|
|
52430
|
+
repo: {
|
|
52431
|
+
message: "Enter GitHub repository name:",
|
|
52432
|
+
validation: {
|
|
52433
|
+
required: "Repository name is required"
|
|
52434
|
+
}
|
|
52435
|
+
},
|
|
52436
|
+
environmentName: {
|
|
52437
|
+
message: "Enter environment name:",
|
|
52438
|
+
validation: {
|
|
52439
|
+
required: "Environment name is required"
|
|
52440
|
+
}
|
|
52441
|
+
},
|
|
52442
|
+
azureFunctionResourceGroupName: {
|
|
52443
|
+
message: "Enter Azure Function Resource Group Name:",
|
|
52444
|
+
validation: {
|
|
52445
|
+
required: "Azure Function Resource Group Name is required"
|
|
52446
|
+
}
|
|
52447
|
+
},
|
|
52448
|
+
azureFuncSlotName: {
|
|
52449
|
+
message: "Enter AZURE_FUNC_SLOT_NAME (empty for production):"
|
|
52450
|
+
},
|
|
52451
|
+
viteBaseUrl: {
|
|
52452
|
+
message: "Enter VITE_BASE_URL:",
|
|
52453
|
+
validation: {
|
|
52454
|
+
required: "VITE_BASE_URL is required"
|
|
52455
|
+
}
|
|
52456
|
+
},
|
|
52457
|
+
viteUrlsSeekaApiCore: {
|
|
52458
|
+
message: "Enter VITE_URLS_SEEKA_API_CORE (optional):"
|
|
52459
|
+
},
|
|
52460
|
+
viteUrlsSeekaAppCoreOrigin: {
|
|
52461
|
+
message: "Enter VITE_URLS_SEEKA_APP_CORE_ORIGIN (optional):"
|
|
52462
|
+
},
|
|
52463
|
+
hostingEnvName: {
|
|
52464
|
+
message: "Enter HOSTING_ENV_NAME:",
|
|
52465
|
+
validation: {
|
|
52466
|
+
required: "HOSTING_ENV_NAME is required"
|
|
52467
|
+
}
|
|
52468
|
+
},
|
|
52469
|
+
...sharedEnvConfigPrompts
|
|
52470
|
+
}
|
|
52471
|
+
};
|
|
52472
|
+
var updateEnvCommand = {
|
|
52473
|
+
description: "Update all environment variables and secrets, overwriting existing values",
|
|
52474
|
+
interactive: {
|
|
52475
|
+
owner: {
|
|
52476
|
+
message: "Enter GitHub repository owner (username or organization):",
|
|
52477
|
+
validation: {
|
|
52478
|
+
required: "Repository owner is required"
|
|
52479
|
+
}
|
|
52480
|
+
},
|
|
52481
|
+
repo: {
|
|
52482
|
+
message: "Enter GitHub repository name:",
|
|
52483
|
+
validation: {
|
|
52484
|
+
required: "Repository name is required"
|
|
52485
|
+
}
|
|
52486
|
+
},
|
|
52487
|
+
environmentName: {
|
|
52488
|
+
message: "Enter environment name:",
|
|
52489
|
+
validation: {
|
|
52490
|
+
required: "Environment name is required"
|
|
52491
|
+
}
|
|
52492
|
+
},
|
|
52493
|
+
azureFunctionResourceGroupName: {
|
|
52494
|
+
message: "Enter Azure Function Resource Group Name:",
|
|
52495
|
+
validation: {
|
|
52496
|
+
required: "Azure Function Resource Group Name is required"
|
|
52497
|
+
}
|
|
52498
|
+
},
|
|
52499
|
+
azureFuncSlotName: {
|
|
52500
|
+
message: "Enter AZURE_FUNC_SLOT_NAME (empty for production):"
|
|
52501
|
+
},
|
|
52502
|
+
...sharedEnvConfigPrompts
|
|
52503
|
+
},
|
|
52504
|
+
confirmOverwrite: {
|
|
52505
|
+
variable: (name, oldValue, newValue) => `Overwrite variable "${name}"?
|
|
52506
|
+
Old: ${oldValue}
|
|
52507
|
+
New: ${newValue}`,
|
|
52508
|
+
secret: (name) => `Overwrite secret "${name}"? (value hidden for security)`
|
|
52509
|
+
}
|
|
52510
|
+
};
|
|
52302
52511
|
function formatPromptMessage(message, hint) {
|
|
52303
52512
|
return hint ? `${message} ${hint}` : message;
|
|
52304
52513
|
}
|