@base44-preview/cli 0.0.8-pr.71.464d92e → 0.0.9-pr.74.2f7b0bf
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/cli/index.js +308 -302
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:events";
|
|
4
4
|
import { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
|
|
5
|
-
import
|
|
5
|
+
import nodePath, { basename, dirname, join, posix, resolve, win32 } from "node:path";
|
|
6
6
|
import fs, { appendFileSync, createReadStream, createWriteStream, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
7
7
|
import y, { execArgv, execPath, hrtime, platform, stdin, stdout } from "node:process";
|
|
8
8
|
import os, { constants, homedir, tmpdir } from "node:os";
|
|
@@ -13,7 +13,7 @@ import O from "node:readline";
|
|
|
13
13
|
import Stream, { Duplex, PassThrough, Readable, Transform, Writable, getDefaultHighWaterMark } from "node:stream";
|
|
14
14
|
import { fileURLToPath } from "node:url";
|
|
15
15
|
import fs$1 from "fs";
|
|
16
|
-
import path
|
|
16
|
+
import path, { dirname as dirname$1, parse } from "path";
|
|
17
17
|
import { finished } from "node:stream/promises";
|
|
18
18
|
import EE, { EventEmitter as EventEmitter$1 } from "events";
|
|
19
19
|
import fsPromises, { access, copyFile, mkdir, readFile, unlink, writeFile } from "node:fs/promises";
|
|
@@ -892,7 +892,7 @@ var require_suggestSimilar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
892
892
|
var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
893
893
|
const EventEmitter$2 = __require("node:events").EventEmitter;
|
|
894
894
|
const childProcess = __require("node:child_process");
|
|
895
|
-
const path$
|
|
895
|
+
const path$15 = __require("node:path");
|
|
896
896
|
const fs$10 = __require("node:fs");
|
|
897
897
|
const process$3 = __require("node:process");
|
|
898
898
|
const { Argument, humanReadableArgName } = require_argument();
|
|
@@ -1740,9 +1740,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1740
1740
|
".cjs"
|
|
1741
1741
|
];
|
|
1742
1742
|
function findFile(baseDir, baseName) {
|
|
1743
|
-
const localBin = path$
|
|
1743
|
+
const localBin = path$15.resolve(baseDir, baseName);
|
|
1744
1744
|
if (fs$10.existsSync(localBin)) return localBin;
|
|
1745
|
-
if (sourceExt.includes(path$
|
|
1745
|
+
if (sourceExt.includes(path$15.extname(baseName))) return void 0;
|
|
1746
1746
|
const foundExt = sourceExt.find((ext) => fs$10.existsSync(`${localBin}${ext}`));
|
|
1747
1747
|
if (foundExt) return `${localBin}${foundExt}`;
|
|
1748
1748
|
}
|
|
@@ -1757,17 +1757,17 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1757
1757
|
} catch (err) {
|
|
1758
1758
|
resolvedScriptPath = this._scriptPath;
|
|
1759
1759
|
}
|
|
1760
|
-
executableDir = path$
|
|
1760
|
+
executableDir = path$15.resolve(path$15.dirname(resolvedScriptPath), executableDir);
|
|
1761
1761
|
}
|
|
1762
1762
|
if (executableDir) {
|
|
1763
1763
|
let localFile = findFile(executableDir, executableFile);
|
|
1764
1764
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
1765
|
-
const legacyName = path$
|
|
1765
|
+
const legacyName = path$15.basename(this._scriptPath, path$15.extname(this._scriptPath));
|
|
1766
1766
|
if (legacyName !== this._name) localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
|
|
1767
1767
|
}
|
|
1768
1768
|
executableFile = localFile || executableFile;
|
|
1769
1769
|
}
|
|
1770
|
-
launchWithNode = sourceExt.includes(path$
|
|
1770
|
+
launchWithNode = sourceExt.includes(path$15.extname(executableFile));
|
|
1771
1771
|
let proc$1;
|
|
1772
1772
|
if (process$3.platform !== "win32") if (launchWithNode) {
|
|
1773
1773
|
args.unshift(executableFile);
|
|
@@ -2473,7 +2473,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2473
2473
|
* @return {Command}
|
|
2474
2474
|
*/
|
|
2475
2475
|
nameFromFilename(filename) {
|
|
2476
|
-
this._name = path$
|
|
2476
|
+
this._name = path$15.basename(filename, path$15.extname(filename));
|
|
2477
2477
|
return this;
|
|
2478
2478
|
}
|
|
2479
2479
|
/**
|
|
@@ -2487,9 +2487,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2487
2487
|
* @param {string} [path]
|
|
2488
2488
|
* @return {(string|null|Command)}
|
|
2489
2489
|
*/
|
|
2490
|
-
executableDir(path$
|
|
2491
|
-
if (path$
|
|
2492
|
-
this._executableDir = path$
|
|
2490
|
+
executableDir(path$16) {
|
|
2491
|
+
if (path$16 === void 0) return this._executableDir;
|
|
2492
|
+
this._executableDir = path$16;
|
|
2493
2493
|
return this;
|
|
2494
2494
|
}
|
|
2495
2495
|
/**
|
|
@@ -4701,11 +4701,11 @@ function aborted$1(x$2, startIndex = 0) {
|
|
|
4701
4701
|
for (let i$1 = startIndex; i$1 < x$2.issues.length; i$1++) if (x$2.issues[i$1]?.continue !== true) return true;
|
|
4702
4702
|
return false;
|
|
4703
4703
|
}
|
|
4704
|
-
function prefixIssues(path$
|
|
4704
|
+
function prefixIssues(path$16, issues) {
|
|
4705
4705
|
return issues.map((iss) => {
|
|
4706
4706
|
var _a$1;
|
|
4707
4707
|
(_a$1 = iss).path ?? (_a$1.path = []);
|
|
4708
|
-
iss.path.unshift(path$
|
|
4708
|
+
iss.path.unshift(path$16);
|
|
4709
4709
|
return iss;
|
|
4710
4710
|
});
|
|
4711
4711
|
}
|
|
@@ -9212,7 +9212,7 @@ var require_package$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9212
9212
|
//#region node_modules/dotenv/lib/main.js
|
|
9213
9213
|
var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9214
9214
|
const fs$9 = __require("fs");
|
|
9215
|
-
const path$
|
|
9215
|
+
const path$14 = __require("path");
|
|
9216
9216
|
const os$3 = __require("os");
|
|
9217
9217
|
const crypto = __require("crypto");
|
|
9218
9218
|
const version = require_package$1().version;
|
|
@@ -9350,12 +9350,12 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9350
9350
|
if (options && options.path && options.path.length > 0) if (Array.isArray(options.path)) {
|
|
9351
9351
|
for (const filepath of options.path) if (fs$9.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
|
|
9352
9352
|
} else possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
9353
|
-
else possibleVaultPath = path$
|
|
9353
|
+
else possibleVaultPath = path$14.resolve(process.cwd(), ".env.vault");
|
|
9354
9354
|
if (fs$9.existsSync(possibleVaultPath)) return possibleVaultPath;
|
|
9355
9355
|
return null;
|
|
9356
9356
|
}
|
|
9357
9357
|
function _resolveHome(envPath) {
|
|
9358
|
-
return envPath[0] === "~" ? path$
|
|
9358
|
+
return envPath[0] === "~" ? path$14.join(os$3.homedir(), envPath.slice(1)) : envPath;
|
|
9359
9359
|
}
|
|
9360
9360
|
function _configVault(options) {
|
|
9361
9361
|
const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
@@ -9368,7 +9368,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9368
9368
|
return { parsed };
|
|
9369
9369
|
}
|
|
9370
9370
|
function configDotenv(options) {
|
|
9371
|
-
const dotenvPath = path$
|
|
9371
|
+
const dotenvPath = path$14.resolve(process.cwd(), ".env");
|
|
9372
9372
|
let encoding = "utf8";
|
|
9373
9373
|
let processEnv = process.env;
|
|
9374
9374
|
if (options && options.processEnv != null) processEnv = options.processEnv;
|
|
@@ -9384,11 +9384,11 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9384
9384
|
}
|
|
9385
9385
|
let lastError;
|
|
9386
9386
|
const parsedAll = {};
|
|
9387
|
-
for (const path$
|
|
9388
|
-
const parsed = DotenvModule.parse(fs$9.readFileSync(path$
|
|
9387
|
+
for (const path$16 of optionPaths) try {
|
|
9388
|
+
const parsed = DotenvModule.parse(fs$9.readFileSync(path$16, { encoding }));
|
|
9389
9389
|
DotenvModule.populate(parsedAll, parsed, options);
|
|
9390
9390
|
} catch (e$1) {
|
|
9391
|
-
if (debug) _debug(`Failed to load ${path$
|
|
9391
|
+
if (debug) _debug(`Failed to load ${path$16} ${e$1.message}`);
|
|
9392
9392
|
lastError = e$1;
|
|
9393
9393
|
}
|
|
9394
9394
|
const populated = DotenvModule.populate(processEnv, parsedAll, options);
|
|
@@ -9398,7 +9398,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9398
9398
|
const keysCount = Object.keys(populated).length;
|
|
9399
9399
|
const shortPaths = [];
|
|
9400
9400
|
for (const filePath of optionPaths) try {
|
|
9401
|
-
const relative = path$
|
|
9401
|
+
const relative = path$14.relative(process.cwd(), filePath);
|
|
9402
9402
|
shortPaths.push(relative);
|
|
9403
9403
|
} catch (e$1) {
|
|
9404
9404
|
if (debug) _debug(`Failed to load ${filePath} ${e$1.message}`);
|
|
@@ -9716,7 +9716,7 @@ var require_path = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9716
9716
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9717
9717
|
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
|
|
9718
9718
|
const os$2 = __require("os");
|
|
9719
|
-
const path$
|
|
9719
|
+
const path$13 = __require("path");
|
|
9720
9720
|
const IS_WINDOWS_PLATFORM = os$2.platform() === "win32";
|
|
9721
9721
|
const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
9722
9722
|
/**
|
|
@@ -9745,7 +9745,7 @@ var require_path = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9745
9745
|
}
|
|
9746
9746
|
exports.unixify = unixify;
|
|
9747
9747
|
function makeAbsolute(cwd, filepath) {
|
|
9748
|
-
return path$
|
|
9748
|
+
return path$13.resolve(cwd, filepath);
|
|
9749
9749
|
}
|
|
9750
9750
|
exports.makeAbsolute = makeAbsolute;
|
|
9751
9751
|
function removeLeadingDotSegment(entry) {
|
|
@@ -11011,7 +11011,7 @@ var require_braces = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11011
11011
|
//#endregion
|
|
11012
11012
|
//#region node_modules/micromatch/node_modules/picomatch/lib/constants.js
|
|
11013
11013
|
var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11014
|
-
const path$
|
|
11014
|
+
const path$12 = __require("path");
|
|
11015
11015
|
const WIN_SLASH = "\\\\/";
|
|
11016
11016
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
11017
11017
|
/**
|
|
@@ -11136,7 +11136,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11136
11136
|
CHAR_UNDERSCORE: 95,
|
|
11137
11137
|
CHAR_VERTICAL_LINE: 124,
|
|
11138
11138
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
11139
|
-
SEP: path$
|
|
11139
|
+
SEP: path$12.sep,
|
|
11140
11140
|
extglobChars(chars) {
|
|
11141
11141
|
return {
|
|
11142
11142
|
"!": {
|
|
@@ -11175,7 +11175,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11175
11175
|
//#endregion
|
|
11176
11176
|
//#region node_modules/micromatch/node_modules/picomatch/lib/utils.js
|
|
11177
11177
|
var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11178
|
-
const path$
|
|
11178
|
+
const path$11 = __require("path");
|
|
11179
11179
|
const win32 = process.platform === "win32";
|
|
11180
11180
|
const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants$1();
|
|
11181
11181
|
exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
@@ -11195,7 +11195,7 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11195
11195
|
};
|
|
11196
11196
|
exports.isWindows = (options) => {
|
|
11197
11197
|
if (options && typeof options.windows === "boolean") return options.windows;
|
|
11198
|
-
return win32 === true || path$
|
|
11198
|
+
return win32 === true || path$11.sep === "\\";
|
|
11199
11199
|
};
|
|
11200
11200
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
11201
11201
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -12371,7 +12371,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
12371
12371
|
//#endregion
|
|
12372
12372
|
//#region node_modules/micromatch/node_modules/picomatch/lib/picomatch.js
|
|
12373
12373
|
var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
12374
|
-
const path$
|
|
12374
|
+
const path$10 = __require("path");
|
|
12375
12375
|
const scan = require_scan();
|
|
12376
12376
|
const parse = require_parse$2();
|
|
12377
12377
|
const utils = require_utils$3();
|
|
@@ -12510,7 +12510,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
12510
12510
|
* @api public
|
|
12511
12511
|
*/
|
|
12512
12512
|
picomatch.matchBase = (input, glob, options, posix$1 = utils.isWindows(options)) => {
|
|
12513
|
-
return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path$
|
|
12513
|
+
return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path$10.basename(input));
|
|
12514
12514
|
};
|
|
12515
12515
|
/**
|
|
12516
12516
|
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|
|
@@ -13068,7 +13068,7 @@ var require_micromatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
13068
13068
|
var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13069
13069
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13070
13070
|
exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
|
|
13071
|
-
const path$
|
|
13071
|
+
const path$9 = __require("path");
|
|
13072
13072
|
const globParent = require_glob_parent();
|
|
13073
13073
|
const micromatch = require_micromatch();
|
|
13074
13074
|
const GLOBSTAR = "**";
|
|
@@ -13176,7 +13176,7 @@ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13176
13176
|
}
|
|
13177
13177
|
exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
13178
13178
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
13179
|
-
const basename$1 = path$
|
|
13179
|
+
const basename$1 = path$9.basename(pattern);
|
|
13180
13180
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename$1);
|
|
13181
13181
|
}
|
|
13182
13182
|
exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
@@ -13250,7 +13250,7 @@ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13250
13250
|
}
|
|
13251
13251
|
exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
13252
13252
|
function isAbsolute(pattern) {
|
|
13253
|
-
return path$
|
|
13253
|
+
return path$9.isAbsolute(pattern);
|
|
13254
13254
|
}
|
|
13255
13255
|
exports.isAbsolute = isAbsolute;
|
|
13256
13256
|
}));
|
|
@@ -13493,8 +13493,8 @@ var require_tasks = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13493
13493
|
var require_async$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13494
13494
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13495
13495
|
exports.read = void 0;
|
|
13496
|
-
function read(path$
|
|
13497
|
-
settings.fs.lstat(path$
|
|
13496
|
+
function read(path$16, settings, callback) {
|
|
13497
|
+
settings.fs.lstat(path$16, (lstatError, lstat) => {
|
|
13498
13498
|
if (lstatError !== null) {
|
|
13499
13499
|
callFailureCallback(callback, lstatError);
|
|
13500
13500
|
return;
|
|
@@ -13503,7 +13503,7 @@ var require_async$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13503
13503
|
callSuccessCallback(callback, lstat);
|
|
13504
13504
|
return;
|
|
13505
13505
|
}
|
|
13506
|
-
settings.fs.stat(path$
|
|
13506
|
+
settings.fs.stat(path$16, (statError, stat) => {
|
|
13507
13507
|
if (statError !== null) {
|
|
13508
13508
|
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
13509
13509
|
callFailureCallback(callback, statError);
|
|
@@ -13531,11 +13531,11 @@ var require_async$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13531
13531
|
var require_sync$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13532
13532
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13533
13533
|
exports.read = void 0;
|
|
13534
|
-
function read(path$
|
|
13535
|
-
const lstat = settings.fs.lstatSync(path$
|
|
13534
|
+
function read(path$16, settings) {
|
|
13535
|
+
const lstat = settings.fs.lstatSync(path$16);
|
|
13536
13536
|
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) return lstat;
|
|
13537
13537
|
try {
|
|
13538
|
-
const stat = settings.fs.statSync(path$
|
|
13538
|
+
const stat = settings.fs.statSync(path$16);
|
|
13539
13539
|
if (settings.markSymbolicLink) stat.isSymbolicLink = () => true;
|
|
13540
13540
|
return stat;
|
|
13541
13541
|
} catch (error) {
|
|
@@ -13594,17 +13594,17 @@ var require_out$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13594
13594
|
const sync = require_sync$5();
|
|
13595
13595
|
const settings_1 = require_settings$3();
|
|
13596
13596
|
exports.Settings = settings_1.default;
|
|
13597
|
-
function stat(path$
|
|
13597
|
+
function stat(path$16, optionsOrSettingsOrCallback, callback) {
|
|
13598
13598
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
13599
|
-
async.read(path$
|
|
13599
|
+
async.read(path$16, getSettings(), optionsOrSettingsOrCallback);
|
|
13600
13600
|
return;
|
|
13601
13601
|
}
|
|
13602
|
-
async.read(path$
|
|
13602
|
+
async.read(path$16, getSettings(optionsOrSettingsOrCallback), callback);
|
|
13603
13603
|
}
|
|
13604
13604
|
exports.stat = stat;
|
|
13605
|
-
function statSync(path$
|
|
13605
|
+
function statSync(path$16, optionsOrSettings) {
|
|
13606
13606
|
const settings = getSettings(optionsOrSettings);
|
|
13607
|
-
return sync.read(path$
|
|
13607
|
+
return sync.read(path$16, settings);
|
|
13608
13608
|
}
|
|
13609
13609
|
exports.statSync = statSync;
|
|
13610
13610
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -13803,16 +13803,16 @@ var require_async$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13803
13803
|
return;
|
|
13804
13804
|
}
|
|
13805
13805
|
rpl(names.map((name$1) => {
|
|
13806
|
-
const path$
|
|
13806
|
+
const path$16 = common.joinPathSegments(directory, name$1, settings.pathSegmentSeparator);
|
|
13807
13807
|
return (done) => {
|
|
13808
|
-
fsStat.stat(path$
|
|
13808
|
+
fsStat.stat(path$16, settings.fsStatSettings, (error, stats) => {
|
|
13809
13809
|
if (error !== null) {
|
|
13810
13810
|
done(error);
|
|
13811
13811
|
return;
|
|
13812
13812
|
}
|
|
13813
13813
|
const entry = {
|
|
13814
13814
|
name: name$1,
|
|
13815
|
-
path: path$
|
|
13815
|
+
path: path$16,
|
|
13816
13816
|
dirent: utils.fs.createDirentFromStats(name$1, stats)
|
|
13817
13817
|
};
|
|
13818
13818
|
if (settings.stats) entry.stats = stats;
|
|
@@ -13909,7 +13909,7 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13909
13909
|
//#region node_modules/@nodelib/fs.scandir/out/settings.js
|
|
13910
13910
|
var require_settings$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13911
13911
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13912
|
-
const path$
|
|
13912
|
+
const path$8 = __require("path");
|
|
13913
13913
|
const fsStat = require_out$3();
|
|
13914
13914
|
const fs = require_fs();
|
|
13915
13915
|
var Settings = class {
|
|
@@ -13917,7 +13917,7 @@ var require_settings$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13917
13917
|
this._options = _options;
|
|
13918
13918
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
13919
13919
|
this.fs = fs.createFileSystemAdapter(this._options.fs);
|
|
13920
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$
|
|
13920
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$8.sep);
|
|
13921
13921
|
this.stats = this._getValue(this._options.stats, false);
|
|
13922
13922
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
13923
13923
|
this.fsStatSettings = new fsStat.Settings({
|
|
@@ -13942,17 +13942,17 @@ var require_out$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13942
13942
|
const sync = require_sync$4();
|
|
13943
13943
|
const settings_1 = require_settings$2();
|
|
13944
13944
|
exports.Settings = settings_1.default;
|
|
13945
|
-
function scandir(path$
|
|
13945
|
+
function scandir(path$16, optionsOrSettingsOrCallback, callback) {
|
|
13946
13946
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
13947
|
-
async.read(path$
|
|
13947
|
+
async.read(path$16, getSettings(), optionsOrSettingsOrCallback);
|
|
13948
13948
|
return;
|
|
13949
13949
|
}
|
|
13950
|
-
async.read(path$
|
|
13950
|
+
async.read(path$16, getSettings(optionsOrSettingsOrCallback), callback);
|
|
13951
13951
|
}
|
|
13952
13952
|
exports.scandir = scandir;
|
|
13953
|
-
function scandirSync(path$
|
|
13953
|
+
function scandirSync(path$16, optionsOrSettings) {
|
|
13954
13954
|
const settings = getSettings(optionsOrSettings);
|
|
13955
|
-
return sync.read(path$
|
|
13955
|
+
return sync.read(path$16, settings);
|
|
13956
13956
|
}
|
|
13957
13957
|
exports.scandirSync = scandirSync;
|
|
13958
13958
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -14522,7 +14522,7 @@ var require_sync$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14522
14522
|
//#region node_modules/@nodelib/fs.walk/out/settings.js
|
|
14523
14523
|
var require_settings$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14524
14524
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14525
|
-
const path$
|
|
14525
|
+
const path$7 = __require("path");
|
|
14526
14526
|
const fsScandir = require_out$2();
|
|
14527
14527
|
var Settings = class {
|
|
14528
14528
|
constructor(_options = {}) {
|
|
@@ -14532,7 +14532,7 @@ var require_settings$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14532
14532
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
14533
14533
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
14534
14534
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
14535
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$
|
|
14535
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$7.sep);
|
|
14536
14536
|
this.fsScandirSettings = new fsScandir.Settings({
|
|
14537
14537
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
14538
14538
|
fs: this._options.fs,
|
|
@@ -14586,7 +14586,7 @@ var require_out$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14586
14586
|
//#region node_modules/fast-glob/out/readers/reader.js
|
|
14587
14587
|
var require_reader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14588
14588
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14589
|
-
const path$
|
|
14589
|
+
const path$6 = __require("path");
|
|
14590
14590
|
const fsStat = require_out$3();
|
|
14591
14591
|
const utils = require_utils$2();
|
|
14592
14592
|
var Reader = class {
|
|
@@ -14599,7 +14599,7 @@ var require_reader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14599
14599
|
});
|
|
14600
14600
|
}
|
|
14601
14601
|
_getFullEntryPath(filepath) {
|
|
14602
|
-
return path$
|
|
14602
|
+
return path$6.resolve(this._settings.cwd, filepath);
|
|
14603
14603
|
}
|
|
14604
14604
|
_makeEntry(stats, pattern) {
|
|
14605
14605
|
const entry = {
|
|
@@ -14943,7 +14943,7 @@ var require_entry = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14943
14943
|
//#region node_modules/fast-glob/out/providers/provider.js
|
|
14944
14944
|
var require_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14945
14945
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14946
|
-
const path$
|
|
14946
|
+
const path$5 = __require("path");
|
|
14947
14947
|
const deep_1 = require_deep();
|
|
14948
14948
|
const entry_1 = require_entry$1();
|
|
14949
14949
|
const error_1 = require_error();
|
|
@@ -14957,7 +14957,7 @@ var require_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14957
14957
|
this.entryTransformer = new entry_2.default(this._settings);
|
|
14958
14958
|
}
|
|
14959
14959
|
_getRootDirectory(task) {
|
|
14960
|
-
return path$
|
|
14960
|
+
return path$5.resolve(this._settings.cwd, task.base);
|
|
14961
14961
|
}
|
|
14962
14962
|
_getReaderOptions(task) {
|
|
14963
14963
|
const basePath = task.base === "." ? "" : task.base;
|
|
@@ -15410,14 +15410,14 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15410
15410
|
makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._add, this);
|
|
15411
15411
|
return this._added;
|
|
15412
15412
|
}
|
|
15413
|
-
test(path$
|
|
15413
|
+
test(path$16, checkUnignored, mode) {
|
|
15414
15414
|
let ignored = false;
|
|
15415
15415
|
let unignored = false;
|
|
15416
15416
|
let matchedRule;
|
|
15417
15417
|
this._rules.forEach((rule) => {
|
|
15418
15418
|
const { negative } = rule;
|
|
15419
15419
|
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) return;
|
|
15420
|
-
if (!rule[mode].test(path$
|
|
15420
|
+
if (!rule[mode].test(path$16)) return;
|
|
15421
15421
|
ignored = !negative;
|
|
15422
15422
|
unignored = negative;
|
|
15423
15423
|
matchedRule = negative ? UNDEFINED : rule;
|
|
@@ -15433,13 +15433,13 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15433
15433
|
const throwError = (message, Ctor) => {
|
|
15434
15434
|
throw new Ctor(message);
|
|
15435
15435
|
};
|
|
15436
|
-
const checkPath = (path$
|
|
15437
|
-
if (!isString(path$
|
|
15438
|
-
if (!path$
|
|
15439
|
-
if (checkPath.isNotRelative(path$
|
|
15436
|
+
const checkPath = (path$16, originalPath, doThrow) => {
|
|
15437
|
+
if (!isString(path$16)) return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
|
|
15438
|
+
if (!path$16) return doThrow(`path must not be empty`, TypeError);
|
|
15439
|
+
if (checkPath.isNotRelative(path$16)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError);
|
|
15440
15440
|
return true;
|
|
15441
15441
|
};
|
|
15442
|
-
const isNotRelative = (path$
|
|
15442
|
+
const isNotRelative = (path$16) => REGEX_TEST_INVALID_PATH.test(path$16);
|
|
15443
15443
|
checkPath.isNotRelative = isNotRelative;
|
|
15444
15444
|
/* istanbul ignore next */
|
|
15445
15445
|
checkPath.convert = (p$1) => p$1;
|
|
@@ -15462,49 +15462,49 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15462
15462
|
return this.add(pattern);
|
|
15463
15463
|
}
|
|
15464
15464
|
_test(originalPath, cache$1, checkUnignored, slices) {
|
|
15465
|
-
const path$
|
|
15466
|
-
checkPath(path$
|
|
15467
|
-
return this._t(path$
|
|
15465
|
+
const path$16 = originalPath && checkPath.convert(originalPath);
|
|
15466
|
+
checkPath(path$16, originalPath, this._strictPathCheck ? throwError : RETURN_FALSE);
|
|
15467
|
+
return this._t(path$16, cache$1, checkUnignored, slices);
|
|
15468
15468
|
}
|
|
15469
|
-
checkIgnore(path$
|
|
15470
|
-
if (!REGEX_TEST_TRAILING_SLASH.test(path$
|
|
15471
|
-
const slices = path$
|
|
15469
|
+
checkIgnore(path$16) {
|
|
15470
|
+
if (!REGEX_TEST_TRAILING_SLASH.test(path$16)) return this.test(path$16);
|
|
15471
|
+
const slices = path$16.split(SLASH).filter(Boolean);
|
|
15472
15472
|
slices.pop();
|
|
15473
15473
|
if (slices.length) {
|
|
15474
15474
|
const parent = this._t(slices.join(SLASH) + SLASH, this._testCache, true, slices);
|
|
15475
15475
|
if (parent.ignored) return parent;
|
|
15476
15476
|
}
|
|
15477
|
-
return this._rules.test(path$
|
|
15477
|
+
return this._rules.test(path$16, false, MODE_CHECK_IGNORE);
|
|
15478
15478
|
}
|
|
15479
|
-
_t(path$
|
|
15480
|
-
if (path$
|
|
15481
|
-
if (!slices) slices = path$
|
|
15479
|
+
_t(path$16, cache$1, checkUnignored, slices) {
|
|
15480
|
+
if (path$16 in cache$1) return cache$1[path$16];
|
|
15481
|
+
if (!slices) slices = path$16.split(SLASH).filter(Boolean);
|
|
15482
15482
|
slices.pop();
|
|
15483
|
-
if (!slices.length) return cache$1[path$
|
|
15483
|
+
if (!slices.length) return cache$1[path$16] = this._rules.test(path$16, checkUnignored, MODE_IGNORE);
|
|
15484
15484
|
const parent = this._t(slices.join(SLASH) + SLASH, cache$1, checkUnignored, slices);
|
|
15485
|
-
return cache$1[path$
|
|
15485
|
+
return cache$1[path$16] = parent.ignored ? parent : this._rules.test(path$16, checkUnignored, MODE_IGNORE);
|
|
15486
15486
|
}
|
|
15487
|
-
ignores(path$
|
|
15488
|
-
return this._test(path$
|
|
15487
|
+
ignores(path$16) {
|
|
15488
|
+
return this._test(path$16, this._ignoreCache, false).ignored;
|
|
15489
15489
|
}
|
|
15490
15490
|
createFilter() {
|
|
15491
|
-
return (path$
|
|
15491
|
+
return (path$16) => !this.ignores(path$16);
|
|
15492
15492
|
}
|
|
15493
15493
|
filter(paths) {
|
|
15494
15494
|
return makeArray(paths).filter(this.createFilter());
|
|
15495
15495
|
}
|
|
15496
|
-
test(path$
|
|
15497
|
-
return this._test(path$
|
|
15496
|
+
test(path$16) {
|
|
15497
|
+
return this._test(path$16, this._testCache, true);
|
|
15498
15498
|
}
|
|
15499
15499
|
};
|
|
15500
15500
|
const factory = (options) => new Ignore(options);
|
|
15501
|
-
const isPathValid = (path$
|
|
15501
|
+
const isPathValid = (path$16) => checkPath(path$16 && checkPath.convert(path$16), path$16, RETURN_FALSE);
|
|
15502
15502
|
/* istanbul ignore next */
|
|
15503
15503
|
const setupWindows = () => {
|
|
15504
15504
|
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
15505
15505
|
checkPath.convert = makePosix;
|
|
15506
15506
|
const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
15507
|
-
checkPath.isNotRelative = (path$
|
|
15507
|
+
checkPath.isNotRelative = (path$16) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path$16) || isNotRelative(path$16);
|
|
15508
15508
|
};
|
|
15509
15509
|
/* istanbul ignore next */
|
|
15510
15510
|
if (typeof process !== "undefined" && process.platform === "win32") setupWindows();
|
|
@@ -15518,15 +15518,15 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15518
15518
|
//#region node_modules/is-path-inside/index.js
|
|
15519
15519
|
var import_ignore = /* @__PURE__ */ __toESM(require_ignore(), 1);
|
|
15520
15520
|
function isPathInside(childPath, parentPath) {
|
|
15521
|
-
const relation =
|
|
15522
|
-
return Boolean(relation && relation !== ".." && !relation.startsWith(`..${
|
|
15521
|
+
const relation = nodePath.relative(parentPath, childPath);
|
|
15522
|
+
return Boolean(relation && relation !== ".." && !relation.startsWith(`..${nodePath.sep}`) && relation !== nodePath.resolve(childPath));
|
|
15523
15523
|
}
|
|
15524
15524
|
|
|
15525
15525
|
//#endregion
|
|
15526
15526
|
//#region node_modules/slash/index.js
|
|
15527
|
-
function slash(path$
|
|
15528
|
-
if (path$
|
|
15529
|
-
return path$
|
|
15527
|
+
function slash(path$16) {
|
|
15528
|
+
if (path$16.startsWith("\\\\?\\")) return path$16;
|
|
15529
|
+
return path$16.replace(/\\/g, "/");
|
|
15530
15530
|
}
|
|
15531
15531
|
|
|
15532
15532
|
//#endregion
|
|
@@ -15612,7 +15612,7 @@ const buildPathChain = (startPath, rootPath) => {
|
|
|
15612
15612
|
let currentPath = startPath;
|
|
15613
15613
|
chain.push(currentPath);
|
|
15614
15614
|
while (currentPath !== rootPath) {
|
|
15615
|
-
const parentPath =
|
|
15615
|
+
const parentPath = nodePath.dirname(currentPath);
|
|
15616
15616
|
if (parentPath === currentPath) break;
|
|
15617
15617
|
currentPath = parentPath;
|
|
15618
15618
|
chain.push(currentPath);
|
|
@@ -15621,7 +15621,7 @@ const buildPathChain = (startPath, rootPath) => {
|
|
|
15621
15621
|
};
|
|
15622
15622
|
const findGitRootInChain = async (paths, statMethod) => {
|
|
15623
15623
|
for (const directory of paths) {
|
|
15624
|
-
const gitPath =
|
|
15624
|
+
const gitPath = nodePath.join(directory, ".git");
|
|
15625
15625
|
try {
|
|
15626
15626
|
if (pathHasGitDirectory(await statMethod(gitPath))) return directory;
|
|
15627
15627
|
} catch {}
|
|
@@ -15630,11 +15630,11 @@ const findGitRootInChain = async (paths, statMethod) => {
|
|
|
15630
15630
|
const findGitRootSyncUncached = (cwd, fsImplementation) => {
|
|
15631
15631
|
const statSyncMethod = getStatSyncMethod$1(fsImplementation);
|
|
15632
15632
|
if (!statSyncMethod) return;
|
|
15633
|
-
const currentPath =
|
|
15634
|
-
const { root } =
|
|
15633
|
+
const currentPath = nodePath.resolve(cwd);
|
|
15634
|
+
const { root } = nodePath.parse(currentPath);
|
|
15635
15635
|
const chain = buildPathChain(currentPath, root);
|
|
15636
15636
|
for (const directory of chain) {
|
|
15637
|
-
const gitPath =
|
|
15637
|
+
const gitPath = nodePath.join(directory, ".git");
|
|
15638
15638
|
try {
|
|
15639
15639
|
if (pathHasGitDirectory(statSyncMethod(gitPath))) return directory;
|
|
15640
15640
|
} catch {}
|
|
@@ -15647,8 +15647,8 @@ const findGitRootSync = (cwd, fsImplementation) => {
|
|
|
15647
15647
|
const findGitRootAsyncUncached = async (cwd, fsImplementation) => {
|
|
15648
15648
|
const statMethod = getAsyncStatMethod(fsImplementation);
|
|
15649
15649
|
if (!statMethod) return findGitRootSync(cwd, fsImplementation);
|
|
15650
|
-
const currentPath =
|
|
15651
|
-
const { root } =
|
|
15650
|
+
const currentPath = nodePath.resolve(cwd);
|
|
15651
|
+
const { root } = nodePath.parse(currentPath);
|
|
15652
15652
|
return findGitRootInChain(buildPathChain(currentPath, root), statMethod);
|
|
15653
15653
|
};
|
|
15654
15654
|
const findGitRoot = async (cwd, fsImplementation) => {
|
|
@@ -15663,8 +15663,8 @@ Get paths to all .gitignore files from git root to cwd (inclusive).
|
|
|
15663
15663
|
@returns {string[]} Array of .gitignore file paths to search for.
|
|
15664
15664
|
*/
|
|
15665
15665
|
const isWithinGitRoot = (gitRoot, cwd) => {
|
|
15666
|
-
const resolvedGitRoot =
|
|
15667
|
-
const resolvedCwd =
|
|
15666
|
+
const resolvedGitRoot = nodePath.resolve(gitRoot);
|
|
15667
|
+
const resolvedCwd = nodePath.resolve(cwd);
|
|
15668
15668
|
return resolvedCwd === resolvedGitRoot || isPathInside(resolvedCwd, resolvedGitRoot);
|
|
15669
15669
|
};
|
|
15670
15670
|
const getParentGitignorePaths = (gitRoot, cwd) => {
|
|
@@ -15672,7 +15672,7 @@ const getParentGitignorePaths = (gitRoot, cwd) => {
|
|
|
15672
15672
|
if (typeof cwd !== "string") throw new TypeError("cwd must be a string");
|
|
15673
15673
|
if (!gitRoot) return [];
|
|
15674
15674
|
if (!isWithinGitRoot(gitRoot, cwd)) return [];
|
|
15675
|
-
return [...buildPathChain(
|
|
15675
|
+
return [...buildPathChain(nodePath.resolve(cwd), nodePath.resolve(gitRoot))].reverse().map((directory) => nodePath.join(directory, ".gitignore"));
|
|
15676
15676
|
};
|
|
15677
15677
|
/**
|
|
15678
15678
|
Convert ignore patterns to fast-glob compatible format.
|
|
@@ -15779,18 +15779,18 @@ const applyBaseToPattern = (pattern, base) => {
|
|
|
15779
15779
|
const slashIndex = cleanPattern.indexOf("/");
|
|
15780
15780
|
const hasNonTrailingSlash = slashIndex !== -1 && slashIndex !== cleanPattern.length - 1;
|
|
15781
15781
|
let result;
|
|
15782
|
-
if (!hasNonTrailingSlash) result =
|
|
15783
|
-
else if (cleanPattern.startsWith("/")) result =
|
|
15784
|
-
else result =
|
|
15782
|
+
if (!hasNonTrailingSlash) result = nodePath.posix.join(base, "**", cleanPattern);
|
|
15783
|
+
else if (cleanPattern.startsWith("/")) result = nodePath.posix.join(base, cleanPattern.slice(1));
|
|
15784
|
+
else result = nodePath.posix.join(base, cleanPattern);
|
|
15785
15785
|
return isNegative ? "!" + result : result;
|
|
15786
15786
|
};
|
|
15787
15787
|
const parseIgnoreFile = (file, cwd) => {
|
|
15788
|
-
const base = slash(
|
|
15788
|
+
const base = slash(nodePath.relative(cwd, nodePath.dirname(file.filePath)));
|
|
15789
15789
|
return file.content.split(/\r?\n/).filter((line) => line && !line.startsWith("#")).map((pattern) => applyBaseToPattern(pattern, base));
|
|
15790
15790
|
};
|
|
15791
15791
|
const toRelativePath = (fileOrDirectory, cwd) => {
|
|
15792
|
-
if (
|
|
15793
|
-
const relativePath =
|
|
15792
|
+
if (nodePath.isAbsolute(fileOrDirectory)) {
|
|
15793
|
+
const relativePath = nodePath.relative(cwd, fileOrDirectory);
|
|
15794
15794
|
if (relativePath && !isPathInside(fileOrDirectory, cwd)) return;
|
|
15795
15795
|
return relativePath;
|
|
15796
15796
|
}
|
|
@@ -15800,11 +15800,11 @@ const toRelativePath = (fileOrDirectory, cwd) => {
|
|
|
15800
15800
|
};
|
|
15801
15801
|
const createIgnorePredicate = (patterns, cwd, baseDir) => {
|
|
15802
15802
|
const ignores = (0, import_ignore.default)().add(patterns);
|
|
15803
|
-
const resolvedCwd =
|
|
15804
|
-
const resolvedBaseDir =
|
|
15803
|
+
const resolvedCwd = nodePath.normalize(nodePath.resolve(cwd));
|
|
15804
|
+
const resolvedBaseDir = nodePath.normalize(nodePath.resolve(baseDir));
|
|
15805
15805
|
return (fileOrDirectory) => {
|
|
15806
15806
|
fileOrDirectory = toPath$1(fileOrDirectory);
|
|
15807
|
-
if (
|
|
15807
|
+
if (nodePath.normalize(nodePath.resolve(fileOrDirectory)) === resolvedCwd) return false;
|
|
15808
15808
|
const relativePath = toRelativePath(fileOrDirectory, resolvedBaseDir);
|
|
15809
15809
|
if (relativePath === void 0) return false;
|
|
15810
15810
|
return relativePath ? ignores.ignores(slash(relativePath)) : false;
|
|
@@ -15879,35 +15879,35 @@ const assertPatternsInput = (patterns) => {
|
|
|
15879
15879
|
};
|
|
15880
15880
|
const getStatMethod = (fsImplementation) => bindFsMethod(fsImplementation?.promises, "stat") ?? bindFsMethod(fs.promises, "stat") ?? promisifyFsMethod(fsImplementation, "stat");
|
|
15881
15881
|
const getStatSyncMethod = (fsImplementation) => bindFsMethod(fsImplementation, "statSync") ?? bindFsMethod(fs, "statSync");
|
|
15882
|
-
const isDirectory = async (path$
|
|
15882
|
+
const isDirectory = async (path$16, fsImplementation) => {
|
|
15883
15883
|
try {
|
|
15884
|
-
return (await getStatMethod(fsImplementation)(path$
|
|
15884
|
+
return (await getStatMethod(fsImplementation)(path$16)).isDirectory();
|
|
15885
15885
|
} catch {
|
|
15886
15886
|
return false;
|
|
15887
15887
|
}
|
|
15888
15888
|
};
|
|
15889
|
-
const isDirectorySync = (path$
|
|
15889
|
+
const isDirectorySync = (path$16, fsImplementation) => {
|
|
15890
15890
|
try {
|
|
15891
|
-
return getStatSyncMethod(fsImplementation)(path$
|
|
15891
|
+
return getStatSyncMethod(fsImplementation)(path$16).isDirectory();
|
|
15892
15892
|
} catch {
|
|
15893
15893
|
return false;
|
|
15894
15894
|
}
|
|
15895
15895
|
};
|
|
15896
15896
|
const normalizePathForDirectoryGlob = (filePath, cwd) => {
|
|
15897
|
-
const path$
|
|
15898
|
-
return
|
|
15897
|
+
const path$16 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
|
|
15898
|
+
return nodePath.isAbsolute(path$16) ? path$16 : nodePath.join(cwd, path$16);
|
|
15899
15899
|
};
|
|
15900
15900
|
const shouldExpandGlobstarDirectory = (pattern) => {
|
|
15901
15901
|
const match = pattern?.match(/\*\*\/([^/]+)$/);
|
|
15902
15902
|
if (!match) return false;
|
|
15903
15903
|
const dirname$2 = match[1];
|
|
15904
15904
|
const hasWildcards = /[*?[\]{}]/.test(dirname$2);
|
|
15905
|
-
const hasExtension =
|
|
15905
|
+
const hasExtension = nodePath.extname(dirname$2) && !dirname$2.startsWith(".");
|
|
15906
15906
|
return !hasWildcards && !hasExtension;
|
|
15907
15907
|
};
|
|
15908
15908
|
const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
15909
15909
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
15910
|
-
return files ? files.map((file) =>
|
|
15910
|
+
return files ? files.map((file) => nodePath.posix.join(directoryPath, `**/${nodePath.extname(file) ? file : `${file}${extensionGlob}`}`)) : [nodePath.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
|
|
15911
15911
|
};
|
|
15912
15912
|
const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => {
|
|
15913
15913
|
return (await Promise.all(directoryPaths.map(async (directoryPath) => {
|
|
@@ -16022,12 +16022,12 @@ const createFilterFunction = (isIgnored, cwd) => {
|
|
|
16022
16022
|
const basePath = cwd || y.cwd();
|
|
16023
16023
|
const pathCache = /* @__PURE__ */ new Map();
|
|
16024
16024
|
return (fastGlobResult) => {
|
|
16025
|
-
const pathKey$1 =
|
|
16025
|
+
const pathKey$1 = nodePath.normalize(fastGlobResult.path ?? fastGlobResult);
|
|
16026
16026
|
if (seen.has(pathKey$1)) return false;
|
|
16027
16027
|
if (isIgnored) {
|
|
16028
16028
|
let absolutePath = pathCache.get(pathKey$1);
|
|
16029
16029
|
if (absolutePath === void 0) {
|
|
16030
|
-
absolutePath =
|
|
16030
|
+
absolutePath = nodePath.isAbsolute(pathKey$1) ? pathKey$1 : nodePath.resolve(basePath, pathKey$1);
|
|
16031
16031
|
pathCache.set(pathKey$1, absolutePath);
|
|
16032
16032
|
if (pathCache.size > 1e4) pathCache.clear();
|
|
16033
16033
|
}
|
|
@@ -17100,9 +17100,9 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17100
17100
|
//#endregion
|
|
17101
17101
|
//#region src/core/utils/fs.ts
|
|
17102
17102
|
var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
|
|
17103
|
-
async function pathExists(path$
|
|
17103
|
+
async function pathExists(path$16) {
|
|
17104
17104
|
try {
|
|
17105
|
-
await access(path$
|
|
17105
|
+
await access(path$16);
|
|
17106
17106
|
return true;
|
|
17107
17107
|
} catch {
|
|
17108
17108
|
return false;
|
|
@@ -17605,7 +17605,7 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17605
17605
|
* @public
|
|
17606
17606
|
*/
|
|
17607
17607
|
var fs$5 = __require("fs");
|
|
17608
|
-
var path$
|
|
17608
|
+
var path$4 = __require("path");
|
|
17609
17609
|
var utils = require_utils();
|
|
17610
17610
|
var scopeOptionWarned = false;
|
|
17611
17611
|
/** @type {string} */
|
|
@@ -17675,9 +17675,9 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17675
17675
|
* @return {String}
|
|
17676
17676
|
*/
|
|
17677
17677
|
exports.resolveInclude = function(name$1, filename, isDir) {
|
|
17678
|
-
var dirname$2 = path$
|
|
17679
|
-
var extname = path$
|
|
17680
|
-
var resolve$1 = path$
|
|
17678
|
+
var dirname$2 = path$4.dirname;
|
|
17679
|
+
var extname = path$4.extname;
|
|
17680
|
+
var resolve$1 = path$4.resolve;
|
|
17681
17681
|
var includePath = resolve$1(isDir ? filename : dirname$2(filename), name$1);
|
|
17682
17682
|
if (!extname(name$1)) includePath += ".ejs";
|
|
17683
17683
|
return includePath;
|
|
@@ -17703,22 +17703,22 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17703
17703
|
* @param {Options} options compilation options
|
|
17704
17704
|
* @return {String}
|
|
17705
17705
|
*/
|
|
17706
|
-
function getIncludePath(path$
|
|
17706
|
+
function getIncludePath(path$16, options) {
|
|
17707
17707
|
var includePath;
|
|
17708
17708
|
var filePath;
|
|
17709
17709
|
var views = options.views;
|
|
17710
|
-
var match = /^[A-Za-z]+:\\|^\//.exec(path$
|
|
17710
|
+
var match = /^[A-Za-z]+:\\|^\//.exec(path$16);
|
|
17711
17711
|
if (match && match.length) {
|
|
17712
|
-
path$
|
|
17713
|
-
if (Array.isArray(options.root)) includePath = resolvePaths(path$
|
|
17714
|
-
else includePath = exports.resolveInclude(path$
|
|
17712
|
+
path$16 = path$16.replace(/^\/*/, "");
|
|
17713
|
+
if (Array.isArray(options.root)) includePath = resolvePaths(path$16, options.root);
|
|
17714
|
+
else includePath = exports.resolveInclude(path$16, options.root || "/", true);
|
|
17715
17715
|
} else {
|
|
17716
17716
|
if (options.filename) {
|
|
17717
|
-
filePath = exports.resolveInclude(path$
|
|
17717
|
+
filePath = exports.resolveInclude(path$16, options.filename);
|
|
17718
17718
|
if (fs$5.existsSync(filePath)) includePath = filePath;
|
|
17719
17719
|
}
|
|
17720
|
-
if (!includePath && Array.isArray(views)) includePath = resolvePaths(path$
|
|
17721
|
-
if (!includePath && typeof options.includer !== "function") throw new Error("Could not find the include file \"" + options.escapeFunction(path$
|
|
17720
|
+
if (!includePath && Array.isArray(views)) includePath = resolvePaths(path$16, views);
|
|
17721
|
+
if (!includePath && typeof options.includer !== "function") throw new Error("Could not find the include file \"" + options.escapeFunction(path$16) + "\"");
|
|
17722
17722
|
}
|
|
17723
17723
|
return includePath;
|
|
17724
17724
|
}
|
|
@@ -17810,11 +17810,11 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17810
17810
|
* Depending on the value of `options.client`, either type might be returned
|
|
17811
17811
|
* @static
|
|
17812
17812
|
*/
|
|
17813
|
-
function includeFile(path$
|
|
17813
|
+
function includeFile(path$16, options) {
|
|
17814
17814
|
var opts = utils.shallowCopy(utils.createNullProtoObjWherePossible(), options);
|
|
17815
|
-
opts.filename = getIncludePath(path$
|
|
17815
|
+
opts.filename = getIncludePath(path$16, opts);
|
|
17816
17816
|
if (typeof options.includer === "function") {
|
|
17817
|
-
var includerResult = options.includer(path$
|
|
17817
|
+
var includerResult = options.includer(path$16, opts.filename);
|
|
17818
17818
|
if (includerResult) {
|
|
17819
17819
|
if (includerResult.filename) opts.filename = includerResult.filename;
|
|
17820
17820
|
if (includerResult.template) return handleCache(opts, includerResult.template);
|
|
@@ -18065,10 +18065,10 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18065
18065
|
throw e$1;
|
|
18066
18066
|
}
|
|
18067
18067
|
var returnedFn = opts.client ? fn : function anonymous(data) {
|
|
18068
|
-
var include = function(path$
|
|
18068
|
+
var include = function(path$16, includeData) {
|
|
18069
18069
|
var d$2 = utils.shallowCopy(utils.createNullProtoObjWherePossible(), data);
|
|
18070
18070
|
if (includeData) d$2 = utils.shallowCopy(d$2, includeData);
|
|
18071
|
-
return includeFile(path$
|
|
18071
|
+
return includeFile(path$16, opts)(d$2);
|
|
18072
18072
|
};
|
|
18073
18073
|
return fn.apply(opts.context, [
|
|
18074
18074
|
data || utils.createNullProtoObjWherePossible(),
|
|
@@ -18079,7 +18079,7 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18079
18079
|
};
|
|
18080
18080
|
if (opts.filename && typeof Object.defineProperty === "function") {
|
|
18081
18081
|
var filename = opts.filename;
|
|
18082
|
-
var basename$1 = path$
|
|
18082
|
+
var basename$1 = path$4.basename(filename, path$4.extname(filename));
|
|
18083
18083
|
try {
|
|
18084
18084
|
Object.defineProperty(returnedFn, "name", {
|
|
18085
18085
|
value: basename$1,
|
|
@@ -26187,10 +26187,20 @@ async function getUserInfo(accessToken) {
|
|
|
26187
26187
|
return result.data;
|
|
26188
26188
|
}
|
|
26189
26189
|
|
|
26190
|
+
//#endregion
|
|
26191
|
+
//#region src/cli/utils/theme.ts
|
|
26192
|
+
/**
|
|
26193
|
+
* Base44 theme configuration
|
|
26194
|
+
*/
|
|
26195
|
+
const theme = { colors: {
|
|
26196
|
+
orange: source_default.hex("#E86B3C"),
|
|
26197
|
+
cyan: source_default.hex("#00D4FF"),
|
|
26198
|
+
gold: source_default.hex("#FFD700"),
|
|
26199
|
+
base44Bg: source_default.bgHex("#E86B3C")
|
|
26200
|
+
} };
|
|
26201
|
+
|
|
26190
26202
|
//#endregion
|
|
26191
26203
|
//#region src/cli/utils/animate.ts
|
|
26192
|
-
const orange$2 = source_default.hex("#E86B3C");
|
|
26193
|
-
const gold = source_default.hex("#FFD700");
|
|
26194
26204
|
/**
|
|
26195
26205
|
* Sleep for a specified number of milliseconds.
|
|
26196
26206
|
*/
|
|
@@ -26207,13 +26217,13 @@ async function animateLineReveal(line, duration$2) {
|
|
|
26207
26217
|
const progress = step / steps;
|
|
26208
26218
|
const revealIndex = Math.floor(progress * line.length);
|
|
26209
26219
|
let output = "";
|
|
26210
|
-
for (let i$1 = 0; i$1 < line.length; i$1++) if (i$1 < revealIndex) output += orange
|
|
26211
|
-
else if (i$1 === revealIndex) output += gold(line[i$1]);
|
|
26220
|
+
for (let i$1 = 0; i$1 < line.length; i$1++) if (i$1 < revealIndex) output += theme.colors.orange(line[i$1]);
|
|
26221
|
+
else if (i$1 === revealIndex) output += theme.colors.gold(line[i$1]);
|
|
26212
26222
|
else output += source_default.dim(line[i$1]);
|
|
26213
26223
|
process.stdout.write(`\r${output}`);
|
|
26214
26224
|
await sleep(stepDuration);
|
|
26215
26225
|
}
|
|
26216
|
-
process.stdout.write(`\r${orange
|
|
26226
|
+
process.stdout.write(`\r${theme.colors.orange(line)}\n`);
|
|
26217
26227
|
}
|
|
26218
26228
|
/**
|
|
26219
26229
|
* Quick shimmer pass over the entire banner.
|
|
@@ -26230,15 +26240,15 @@ async function shimmerPass(lines, duration$2) {
|
|
|
26230
26240
|
let output = "";
|
|
26231
26241
|
for (let i$1 = 0; i$1 < line.length; i$1++) {
|
|
26232
26242
|
const dist = Math.abs(i$1 - shimmerPos);
|
|
26233
|
-
if (dist < 3) output += dist === 0 ? source_default.white(line[i$1]) : gold(line[i$1]);
|
|
26234
|
-
else output += orange
|
|
26243
|
+
if (dist < 3) output += dist === 0 ? source_default.white(line[i$1]) : theme.colors.gold(line[i$1]);
|
|
26244
|
+
else output += theme.colors.orange(line[i$1]);
|
|
26235
26245
|
}
|
|
26236
26246
|
console.log(output);
|
|
26237
26247
|
}
|
|
26238
26248
|
await sleep(stepDuration);
|
|
26239
26249
|
}
|
|
26240
26250
|
process.stdout.write(moveUp);
|
|
26241
|
-
for (const line of lines) console.log(orange
|
|
26251
|
+
for (const line of lines) console.log(theme.colors.orange(line));
|
|
26242
26252
|
}
|
|
26243
26253
|
/**
|
|
26244
26254
|
* Animate the output with a smooth line-by-line reveal.
|
|
@@ -26258,7 +26268,6 @@ async function printAnimatedLines(lines) {
|
|
|
26258
26268
|
|
|
26259
26269
|
//#endregion
|
|
26260
26270
|
//#region src/cli/utils/banner.ts
|
|
26261
|
-
const orange$1 = source_default.hex("#E86B3C");
|
|
26262
26271
|
const BANNER_LINES = [
|
|
26263
26272
|
"██████╗ █████╗ ███████╗███████╗ ██╗ ██╗██╗ ██╗",
|
|
26264
26273
|
"██╔══██╗██╔══██╗██╔════╝██╔════╝ ██║ ██║██║ ██║",
|
|
@@ -26273,12 +26282,11 @@ const BANNER_LINES = [
|
|
|
26273
26282
|
*/
|
|
26274
26283
|
async function printBanner() {
|
|
26275
26284
|
if (process.stdout.isTTY) await printAnimatedLines(BANNER_LINES);
|
|
26276
|
-
else console.log(orange
|
|
26285
|
+
else console.log(theme.colors.orange(BANNER_LINES.join("\n")));
|
|
26277
26286
|
}
|
|
26278
26287
|
|
|
26279
26288
|
//#endregion
|
|
26280
26289
|
//#region src/cli/utils/runCommand.ts
|
|
26281
|
-
const base44Color = source_default.bgHex("#E86B3C");
|
|
26282
26290
|
/**
|
|
26283
26291
|
* Wraps a command function with the Base44 intro/outro and error handling.
|
|
26284
26292
|
* All CLI commands should use this utility to ensure consistent branding.
|
|
@@ -26322,7 +26330,7 @@ async function runCommand(commandFn, options) {
|
|
|
26322
26330
|
if (options?.fullBanner) {
|
|
26323
26331
|
await printBanner();
|
|
26324
26332
|
Ie("");
|
|
26325
|
-
} else Ie(
|
|
26333
|
+
} else Ie(theme.colors.base44Bg(" Base 44 "));
|
|
26326
26334
|
await loadProjectEnv();
|
|
26327
26335
|
try {
|
|
26328
26336
|
if (options?.requireAuth) {
|
|
@@ -27384,15 +27392,15 @@ var ReadStream = class extends Minipass {
|
|
|
27384
27392
|
[_size];
|
|
27385
27393
|
[_remain];
|
|
27386
27394
|
[_autoClose];
|
|
27387
|
-
constructor(path$
|
|
27395
|
+
constructor(path$16, opt) {
|
|
27388
27396
|
opt = opt || {};
|
|
27389
27397
|
super(opt);
|
|
27390
27398
|
this.readable = true;
|
|
27391
27399
|
this.writable = false;
|
|
27392
|
-
if (typeof path$
|
|
27400
|
+
if (typeof path$16 !== "string") throw new TypeError("path must be a string");
|
|
27393
27401
|
this[_errored] = false;
|
|
27394
27402
|
this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0;
|
|
27395
|
-
this[_path] = path$
|
|
27403
|
+
this[_path] = path$16;
|
|
27396
27404
|
this[_readSize] = opt.readSize || 16 * 1024 * 1024;
|
|
27397
27405
|
this[_reading] = false;
|
|
27398
27406
|
this[_size] = typeof opt.size === "number" ? opt.size : Infinity;
|
|
@@ -27534,10 +27542,10 @@ var WriteStream = class extends EE {
|
|
|
27534
27542
|
[_flags];
|
|
27535
27543
|
[_finished] = false;
|
|
27536
27544
|
[_pos];
|
|
27537
|
-
constructor(path$
|
|
27545
|
+
constructor(path$16, opt) {
|
|
27538
27546
|
opt = opt || {};
|
|
27539
27547
|
super(opt);
|
|
27540
|
-
this[_path] = path$
|
|
27548
|
+
this[_path] = path$16;
|
|
27541
27549
|
this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0;
|
|
27542
27550
|
this[_mode] = opt.mode === void 0 ? 438 : opt.mode;
|
|
27543
27551
|
this[_pos] = typeof opt.start === "number" ? opt.start : void 0;
|
|
@@ -28296,10 +28304,10 @@ var Header = class {
|
|
|
28296
28304
|
if (!(buf.length >= off + 512)) throw new Error("need 512 bytes for header");
|
|
28297
28305
|
const prefixSize = this.ctime || this.atime ? 130 : 155;
|
|
28298
28306
|
const split = splitPrefix(this.path || "", prefixSize);
|
|
28299
|
-
const path$
|
|
28307
|
+
const path$16 = split[0];
|
|
28300
28308
|
const prefix = split[1];
|
|
28301
28309
|
this.needPax = !!split[2];
|
|
28302
|
-
this.needPax = encString(buf, off, 100, path$
|
|
28310
|
+
this.needPax = encString(buf, off, 100, path$16) || this.needPax;
|
|
28303
28311
|
this.needPax = encNumber(buf, off + 100, 8, this.mode) || this.needPax;
|
|
28304
28312
|
this.needPax = encNumber(buf, off + 108, 8, this.uid) || this.needPax;
|
|
28305
28313
|
this.needPax = encNumber(buf, off + 116, 8, this.gid) || this.needPax;
|
|
@@ -29138,16 +29146,16 @@ const modeFix = (mode, isDir, portable) => {
|
|
|
29138
29146
|
//#endregion
|
|
29139
29147
|
//#region node_modules/tar/dist/esm/strip-absolute-path.js
|
|
29140
29148
|
const { isAbsolute, parse: parse$1 } = win32;
|
|
29141
|
-
const stripAbsolutePath = (path$
|
|
29149
|
+
const stripAbsolutePath = (path$16) => {
|
|
29142
29150
|
let r$1 = "";
|
|
29143
|
-
let parsed = parse$1(path$
|
|
29144
|
-
while (isAbsolute(path$
|
|
29145
|
-
const root = path$
|
|
29146
|
-
path$
|
|
29151
|
+
let parsed = parse$1(path$16);
|
|
29152
|
+
while (isAbsolute(path$16) || parsed.root) {
|
|
29153
|
+
const root = path$16.charAt(0) === "/" && path$16.slice(0, 4) !== "//?/" ? "/" : parsed.root;
|
|
29154
|
+
path$16 = path$16.slice(root.length);
|
|
29147
29155
|
r$1 += root;
|
|
29148
|
-
parsed = parse$1(path$
|
|
29156
|
+
parsed = parse$1(path$16);
|
|
29149
29157
|
}
|
|
29150
|
-
return [r$1, path$
|
|
29158
|
+
return [r$1, path$16];
|
|
29151
29159
|
};
|
|
29152
29160
|
|
|
29153
29161
|
//#endregion
|
|
@@ -29167,10 +29175,10 @@ const decode = (s) => win.reduce((s$1, c$1) => s$1.split(c$1).join(toRaw.get(c$1
|
|
|
29167
29175
|
|
|
29168
29176
|
//#endregion
|
|
29169
29177
|
//#region node_modules/tar/dist/esm/write-entry.js
|
|
29170
|
-
const prefixPath = (path$
|
|
29171
|
-
if (!prefix) return normalizeWindowsPath(path$
|
|
29172
|
-
path$
|
|
29173
|
-
return stripTrailingSlashes(prefix) + "/" + path$
|
|
29178
|
+
const prefixPath = (path$16, prefix) => {
|
|
29179
|
+
if (!prefix) return normalizeWindowsPath(path$16);
|
|
29180
|
+
path$16 = normalizeWindowsPath(path$16).replace(/^\.(\/|$)/, "");
|
|
29181
|
+
return stripTrailingSlashes(prefix) + "/" + path$16;
|
|
29174
29182
|
};
|
|
29175
29183
|
const maxReadSize = 16 * 1024 * 1024;
|
|
29176
29184
|
const PROCESS$1 = Symbol("process");
|
|
@@ -29252,7 +29260,7 @@ var WriteEntry = class extends Minipass {
|
|
|
29252
29260
|
this.path = decode(this.path.replace(/\\/g, "/"));
|
|
29253
29261
|
p$1 = p$1.replace(/\\/g, "/");
|
|
29254
29262
|
}
|
|
29255
|
-
this.absolute = normalizeWindowsPath(opt.absolute || path
|
|
29263
|
+
this.absolute = normalizeWindowsPath(opt.absolute || path.resolve(this.cwd, p$1));
|
|
29256
29264
|
if (this.path === "") this.path = "./";
|
|
29257
29265
|
if (pathWarn) this.warn("TAR_ENTRY_INFO", `stripping ${pathWarn} from absolute path`, {
|
|
29258
29266
|
entry: this,
|
|
@@ -29294,8 +29302,8 @@ var WriteEntry = class extends Minipass {
|
|
|
29294
29302
|
[MODE](mode) {
|
|
29295
29303
|
return modeFix(mode, this.type === "Directory", this.portable);
|
|
29296
29304
|
}
|
|
29297
|
-
[PREFIX](path$
|
|
29298
|
-
return prefixPath(path$
|
|
29305
|
+
[PREFIX](path$16) {
|
|
29306
|
+
return prefixPath(path$16, this.prefix);
|
|
29299
29307
|
}
|
|
29300
29308
|
[HEADER]() {
|
|
29301
29309
|
/* c8 ignore start */
|
|
@@ -29361,7 +29369,7 @@ var WriteEntry = class extends Minipass {
|
|
|
29361
29369
|
if (!this.stat) throw new Error("cannot create link entry without stat");
|
|
29362
29370
|
/* c8 ignore stop */
|
|
29363
29371
|
this.type = "Link";
|
|
29364
|
-
this.linkpath = normalizeWindowsPath(path
|
|
29372
|
+
this.linkpath = normalizeWindowsPath(path.relative(this.cwd, linkpath));
|
|
29365
29373
|
this.stat.size = 0;
|
|
29366
29374
|
this[HEADER]();
|
|
29367
29375
|
this.end();
|
|
@@ -29627,8 +29635,8 @@ var WriteEntryTar = class extends Minipass {
|
|
|
29627
29635
|
super.write(b$2);
|
|
29628
29636
|
readEntry.pipe(this);
|
|
29629
29637
|
}
|
|
29630
|
-
[PREFIX](path$
|
|
29631
|
-
return prefixPath(path$
|
|
29638
|
+
[PREFIX](path$16) {
|
|
29639
|
+
return prefixPath(path$16, this.prefix);
|
|
29632
29640
|
}
|
|
29633
29641
|
[MODE](mode) {
|
|
29634
29642
|
return modeFix(mode, this.type === "Directory", this.portable);
|
|
@@ -29937,8 +29945,8 @@ var PackJob = class {
|
|
|
29937
29945
|
pending = false;
|
|
29938
29946
|
ignore = false;
|
|
29939
29947
|
piped = false;
|
|
29940
|
-
constructor(path$
|
|
29941
|
-
this.path = path$
|
|
29948
|
+
constructor(path$16, absolute) {
|
|
29949
|
+
this.path = path$16 || "./";
|
|
29942
29950
|
this.absolute = absolute;
|
|
29943
29951
|
}
|
|
29944
29952
|
};
|
|
@@ -30043,36 +30051,36 @@ var Pack = class extends Minipass {
|
|
|
30043
30051
|
[WRITE](chunk) {
|
|
30044
30052
|
return super.write(chunk);
|
|
30045
30053
|
}
|
|
30046
|
-
add(path$
|
|
30047
|
-
this.write(path$
|
|
30054
|
+
add(path$16) {
|
|
30055
|
+
this.write(path$16);
|
|
30048
30056
|
return this;
|
|
30049
30057
|
}
|
|
30050
|
-
end(path$
|
|
30058
|
+
end(path$16, encoding, cb) {
|
|
30051
30059
|
/* c8 ignore start */
|
|
30052
|
-
if (typeof path$
|
|
30053
|
-
cb = path$
|
|
30054
|
-
path$
|
|
30060
|
+
if (typeof path$16 === "function") {
|
|
30061
|
+
cb = path$16;
|
|
30062
|
+
path$16 = void 0;
|
|
30055
30063
|
}
|
|
30056
30064
|
if (typeof encoding === "function") {
|
|
30057
30065
|
cb = encoding;
|
|
30058
30066
|
encoding = void 0;
|
|
30059
30067
|
}
|
|
30060
30068
|
/* c8 ignore stop */
|
|
30061
|
-
if (path$
|
|
30069
|
+
if (path$16) this.add(path$16);
|
|
30062
30070
|
this[ENDED$1] = true;
|
|
30063
30071
|
this[PROCESS]();
|
|
30064
30072
|
/* c8 ignore next */
|
|
30065
30073
|
if (cb) cb();
|
|
30066
30074
|
return this;
|
|
30067
30075
|
}
|
|
30068
|
-
write(path$
|
|
30076
|
+
write(path$16) {
|
|
30069
30077
|
if (this[ENDED$1]) throw new Error("write after end");
|
|
30070
|
-
if (path$
|
|
30071
|
-
else this[ADDFSENTRY](path$
|
|
30078
|
+
if (path$16 instanceof ReadEntry) this[ADDTARENTRY](path$16);
|
|
30079
|
+
else this[ADDFSENTRY](path$16);
|
|
30072
30080
|
return this.flowing;
|
|
30073
30081
|
}
|
|
30074
30082
|
[ADDTARENTRY](p$1) {
|
|
30075
|
-
const absolute = normalizeWindowsPath(path
|
|
30083
|
+
const absolute = normalizeWindowsPath(path.resolve(this.cwd, p$1.path));
|
|
30076
30084
|
if (!this.filter(p$1.path, p$1)) p$1.resume();
|
|
30077
30085
|
else {
|
|
30078
30086
|
const job = new PackJob(p$1.path, absolute);
|
|
@@ -30084,7 +30092,7 @@ var Pack = class extends Minipass {
|
|
|
30084
30092
|
this[PROCESS]();
|
|
30085
30093
|
}
|
|
30086
30094
|
[ADDFSENTRY](p$1) {
|
|
30087
|
-
const absolute = normalizeWindowsPath(path
|
|
30095
|
+
const absolute = normalizeWindowsPath(path.resolve(this.cwd, p$1));
|
|
30088
30096
|
this[QUEUE].push(new PackJob(p$1, absolute));
|
|
30089
30097
|
this[PROCESS]();
|
|
30090
30098
|
}
|
|
@@ -30285,7 +30293,7 @@ const createFile = (opt, files) => {
|
|
|
30285
30293
|
const addFilesSync$1 = (p$1, files) => {
|
|
30286
30294
|
files.forEach((file) => {
|
|
30287
30295
|
if (file.charAt(0) === "@") list({
|
|
30288
|
-
file:
|
|
30296
|
+
file: nodePath.resolve(p$1.cwd, file.slice(1)),
|
|
30289
30297
|
sync: true,
|
|
30290
30298
|
noResume: true,
|
|
30291
30299
|
onReadEntry: (entry) => p$1.add(entry)
|
|
@@ -30298,7 +30306,7 @@ const addFilesAsync$1 = async (p$1, files) => {
|
|
|
30298
30306
|
for (let i$1 = 0; i$1 < files.length; i$1++) {
|
|
30299
30307
|
const file = String(files[i$1]);
|
|
30300
30308
|
if (file.charAt(0) === "@") await list({
|
|
30301
|
-
file:
|
|
30309
|
+
file: nodePath.resolve(String(p$1.cwd), file.slice(1)),
|
|
30302
30310
|
noResume: true,
|
|
30303
30311
|
onReadEntry: (entry) => {
|
|
30304
30312
|
p$1.add(entry);
|
|
@@ -30336,9 +30344,9 @@ const getWriteFlag = !fMapEnabled ? () => "w" : (size) => size < fMapLimit ? fMa
|
|
|
30336
30344
|
|
|
30337
30345
|
//#endregion
|
|
30338
30346
|
//#region node_modules/chownr/dist/esm/index.js
|
|
30339
|
-
const lchownSync = (path$
|
|
30347
|
+
const lchownSync = (path$16, uid, gid) => {
|
|
30340
30348
|
try {
|
|
30341
|
-
return fs.lchownSync(path$
|
|
30349
|
+
return fs.lchownSync(path$16, uid, gid);
|
|
30342
30350
|
} catch (er) {
|
|
30343
30351
|
if (er?.code !== "ENOENT") throw er;
|
|
30344
30352
|
}
|
|
@@ -30349,11 +30357,11 @@ const chown = (cpath, uid, gid, cb) => {
|
|
|
30349
30357
|
});
|
|
30350
30358
|
};
|
|
30351
30359
|
const chownrKid = (p$1, child, uid, gid, cb) => {
|
|
30352
|
-
if (child.isDirectory()) chownr(
|
|
30360
|
+
if (child.isDirectory()) chownr(nodePath.resolve(p$1, child.name), uid, gid, (er) => {
|
|
30353
30361
|
if (er) return cb(er);
|
|
30354
|
-
chown(
|
|
30362
|
+
chown(nodePath.resolve(p$1, child.name), uid, gid, cb);
|
|
30355
30363
|
});
|
|
30356
|
-
else chown(
|
|
30364
|
+
else chown(nodePath.resolve(p$1, child.name), uid, gid, cb);
|
|
30357
30365
|
};
|
|
30358
30366
|
const chownr = (p$1, uid, gid, cb) => {
|
|
30359
30367
|
fs.readdir(p$1, { withFileTypes: true }, (er, children) => {
|
|
@@ -30375,8 +30383,8 @@ const chownr = (p$1, uid, gid, cb) => {
|
|
|
30375
30383
|
});
|
|
30376
30384
|
};
|
|
30377
30385
|
const chownrKidSync = (p$1, child, uid, gid) => {
|
|
30378
|
-
if (child.isDirectory()) chownrSync(
|
|
30379
|
-
lchownSync(
|
|
30386
|
+
if (child.isDirectory()) chownrSync(nodePath.resolve(p$1, child.name), uid, gid);
|
|
30387
|
+
lchownSync(nodePath.resolve(p$1, child.name), uid, gid);
|
|
30380
30388
|
};
|
|
30381
30389
|
const chownrSync = (p$1, uid, gid) => {
|
|
30382
30390
|
let children;
|
|
@@ -30398,9 +30406,9 @@ var CwdError = class extends Error {
|
|
|
30398
30406
|
path;
|
|
30399
30407
|
code;
|
|
30400
30408
|
syscall = "chdir";
|
|
30401
|
-
constructor(path$
|
|
30402
|
-
super(`${code$1}: Cannot cd into '${path$
|
|
30403
|
-
this.path = path$
|
|
30409
|
+
constructor(path$16, code$1) {
|
|
30410
|
+
super(`${code$1}: Cannot cd into '${path$16}'`);
|
|
30411
|
+
this.path = path$16;
|
|
30404
30412
|
this.code = code$1;
|
|
30405
30413
|
}
|
|
30406
30414
|
get name() {
|
|
@@ -30415,10 +30423,10 @@ var SymlinkError = class extends Error {
|
|
|
30415
30423
|
symlink;
|
|
30416
30424
|
syscall = "symlink";
|
|
30417
30425
|
code = "TAR_SYMLINK_ERROR";
|
|
30418
|
-
constructor(symlink, path$
|
|
30426
|
+
constructor(symlink, path$16) {
|
|
30419
30427
|
super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link");
|
|
30420
30428
|
this.symlink = symlink;
|
|
30421
|
-
this.path = path$
|
|
30429
|
+
this.path = path$16;
|
|
30422
30430
|
}
|
|
30423
30431
|
get name() {
|
|
30424
30432
|
return "SymlinkError";
|
|
@@ -30464,12 +30472,12 @@ const mkdir$1 = (dir, opt, cb) => {
|
|
|
30464
30472
|
mode,
|
|
30465
30473
|
recursive: true
|
|
30466
30474
|
}).then((made) => done(null, made ?? void 0), done);
|
|
30467
|
-
mkdir_(cwd, normalizeWindowsPath(
|
|
30475
|
+
mkdir_(cwd, normalizeWindowsPath(nodePath.relative(cwd, dir)).split("/"), mode, unlink$1, cwd, void 0, done);
|
|
30468
30476
|
};
|
|
30469
30477
|
const mkdir_ = (base, parts, mode, unlink$1, cwd, created, cb) => {
|
|
30470
30478
|
if (!parts.length) return cb(null, created);
|
|
30471
30479
|
const p$1 = parts.shift();
|
|
30472
|
-
const part = normalizeWindowsPath(
|
|
30480
|
+
const part = normalizeWindowsPath(nodePath.resolve(base + "/" + p$1));
|
|
30473
30481
|
fs.mkdir(part, mode, onmkdir(part, parts, mode, unlink$1, cwd, created, cb));
|
|
30474
30482
|
};
|
|
30475
30483
|
const onmkdir = (part, parts, mode, unlink$1, cwd, created, cb) => (er) => {
|
|
@@ -30525,10 +30533,10 @@ const mkdirSync = (dir, opt) => {
|
|
|
30525
30533
|
mode,
|
|
30526
30534
|
recursive: true
|
|
30527
30535
|
}) ?? void 0);
|
|
30528
|
-
const parts = normalizeWindowsPath(
|
|
30536
|
+
const parts = normalizeWindowsPath(nodePath.relative(cwd, dir)).split("/");
|
|
30529
30537
|
let created = void 0;
|
|
30530
30538
|
for (let p$1 = parts.shift(), part = cwd; p$1 && (part += "/" + p$1); p$1 = parts.shift()) {
|
|
30531
|
-
part = normalizeWindowsPath(
|
|
30539
|
+
part = normalizeWindowsPath(nodePath.resolve(part));
|
|
30532
30540
|
try {
|
|
30533
30541
|
fs.mkdirSync(part, mode);
|
|
30534
30542
|
created = created || part;
|
|
@@ -30568,11 +30576,11 @@ const normalizeUnicode = (s) => {
|
|
|
30568
30576
|
//#endregion
|
|
30569
30577
|
//#region node_modules/tar/dist/esm/path-reservations.js
|
|
30570
30578
|
const isWindows$1 = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
30571
|
-
const getDirs = (path$
|
|
30572
|
-
return path$
|
|
30579
|
+
const getDirs = (path$16) => {
|
|
30580
|
+
return path$16.split("/").slice(0, -1).reduce((set, path$17) => {
|
|
30573
30581
|
const s = set[set.length - 1];
|
|
30574
|
-
if (s !== void 0) path$
|
|
30575
|
-
set.push(path$
|
|
30582
|
+
if (s !== void 0) path$17 = join(s, path$17);
|
|
30583
|
+
set.push(path$17 || "/");
|
|
30576
30584
|
return set;
|
|
30577
30585
|
}, []);
|
|
30578
30586
|
};
|
|
@@ -30584,7 +30592,7 @@ var PathReservations = class {
|
|
|
30584
30592
|
paths = isWindows$1 ? ["win32 parallelization disabled"] : paths.map((p$1) => {
|
|
30585
30593
|
return stripTrailingSlashes(join(normalizeUnicode(p$1))).toLowerCase();
|
|
30586
30594
|
});
|
|
30587
|
-
const dirs = new Set(paths.map((path$
|
|
30595
|
+
const dirs = new Set(paths.map((path$16) => getDirs(path$16)).reduce((a$1, b$2) => a$1.concat(b$2)));
|
|
30588
30596
|
this.#reservations.set(fn, {
|
|
30589
30597
|
dirs,
|
|
30590
30598
|
paths
|
|
@@ -30611,8 +30619,8 @@ var PathReservations = class {
|
|
|
30611
30619
|
if (!res) throw new Error("function does not have any path reservations");
|
|
30612
30620
|
/* c8 ignore stop */
|
|
30613
30621
|
return {
|
|
30614
|
-
paths: res.paths.map((path$
|
|
30615
|
-
dirs: [...res.dirs].map((path$
|
|
30622
|
+
paths: res.paths.map((path$16) => this.#queues.get(path$16)),
|
|
30623
|
+
dirs: [...res.dirs].map((path$16) => this.#queues.get(path$16))
|
|
30616
30624
|
};
|
|
30617
30625
|
}
|
|
30618
30626
|
check(fn) {
|
|
@@ -30633,14 +30641,14 @@ var PathReservations = class {
|
|
|
30633
30641
|
/* c8 ignore stop */
|
|
30634
30642
|
const { paths, dirs } = res;
|
|
30635
30643
|
const next = /* @__PURE__ */ new Set();
|
|
30636
|
-
for (const path$
|
|
30637
|
-
const q$2 = this.#queues.get(path$
|
|
30644
|
+
for (const path$16 of paths) {
|
|
30645
|
+
const q$2 = this.#queues.get(path$16);
|
|
30638
30646
|
/* c8 ignore start */
|
|
30639
30647
|
if (!q$2 || q$2?.[0] !== fn) continue;
|
|
30640
30648
|
/* c8 ignore stop */
|
|
30641
30649
|
const q0 = q$2[1];
|
|
30642
30650
|
if (!q0) {
|
|
30643
|
-
this.#queues.delete(path$
|
|
30651
|
+
this.#queues.delete(path$16);
|
|
30644
30652
|
continue;
|
|
30645
30653
|
}
|
|
30646
30654
|
q$2.shift();
|
|
@@ -30697,20 +30705,20 @@ const CHECKED_CWD = Symbol("checkedCwd");
|
|
|
30697
30705
|
const isWindows = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
30698
30706
|
const DEFAULT_MAX_DEPTH = 1024;
|
|
30699
30707
|
/* c8 ignore start */
|
|
30700
|
-
const unlinkFile = (path$
|
|
30701
|
-
if (!isWindows) return fs.unlink(path$
|
|
30702
|
-
const name$1 = path$
|
|
30703
|
-
fs.rename(path$
|
|
30708
|
+
const unlinkFile = (path$16, cb) => {
|
|
30709
|
+
if (!isWindows) return fs.unlink(path$16, cb);
|
|
30710
|
+
const name$1 = path$16 + ".DELETE." + randomBytes(16).toString("hex");
|
|
30711
|
+
fs.rename(path$16, name$1, (er) => {
|
|
30704
30712
|
if (er) return cb(er);
|
|
30705
30713
|
fs.unlink(name$1, cb);
|
|
30706
30714
|
});
|
|
30707
30715
|
};
|
|
30708
30716
|
/* c8 ignore stop */
|
|
30709
30717
|
/* c8 ignore start */
|
|
30710
|
-
const unlinkFileSync = (path$
|
|
30711
|
-
if (!isWindows) return fs.unlinkSync(path$
|
|
30712
|
-
const name$1 = path$
|
|
30713
|
-
fs.renameSync(path$
|
|
30718
|
+
const unlinkFileSync = (path$16) => {
|
|
30719
|
+
if (!isWindows) return fs.unlinkSync(path$16);
|
|
30720
|
+
const name$1 = path$16 + ".DELETE." + randomBytes(16).toString("hex");
|
|
30721
|
+
fs.renameSync(path$16, name$1);
|
|
30714
30722
|
fs.unlinkSync(name$1);
|
|
30715
30723
|
};
|
|
30716
30724
|
/* c8 ignore stop */
|
|
@@ -30775,7 +30783,7 @@ var Unpack = class extends Parser {
|
|
|
30775
30783
|
this.noMtime = !!opt.noMtime;
|
|
30776
30784
|
this.preservePaths = !!opt.preservePaths;
|
|
30777
30785
|
this.unlink = !!opt.unlink;
|
|
30778
|
-
this.cwd = normalizeWindowsPath(
|
|
30786
|
+
this.cwd = normalizeWindowsPath(nodePath.resolve(opt.cwd || process.cwd()));
|
|
30779
30787
|
this.strip = Number(opt.strip) || 0;
|
|
30780
30788
|
this.processUmask = !this.chmod ? 0 : typeof opt.processUmask === "number" ? opt.processUmask : process.umask();
|
|
30781
30789
|
this.umask = typeof opt.umask === "number" ? opt.umask : this.processUmask;
|
|
@@ -30795,22 +30803,22 @@ var Unpack = class extends Parser {
|
|
|
30795
30803
|
}
|
|
30796
30804
|
}
|
|
30797
30805
|
[STRIPABSOLUTEPATH](entry, field) {
|
|
30798
|
-
const path$
|
|
30799
|
-
if (!path$
|
|
30800
|
-
const parts = path$
|
|
30806
|
+
const path$16 = entry[field];
|
|
30807
|
+
if (!path$16 || this.preservePaths) return true;
|
|
30808
|
+
const parts = path$16.split("/");
|
|
30801
30809
|
if (parts.includes("..") || isWindows && /^[a-z]:\.\.$/i.test(parts[0] ?? "")) {
|
|
30802
30810
|
this.warn("TAR_ENTRY_ERROR", `${field} contains '..'`, {
|
|
30803
30811
|
entry,
|
|
30804
|
-
[field]: path$
|
|
30812
|
+
[field]: path$16
|
|
30805
30813
|
});
|
|
30806
30814
|
return false;
|
|
30807
30815
|
}
|
|
30808
|
-
const [root, stripped] = stripAbsolutePath(path$
|
|
30816
|
+
const [root, stripped] = stripAbsolutePath(path$16);
|
|
30809
30817
|
if (root) {
|
|
30810
30818
|
entry[field] = String(stripped);
|
|
30811
30819
|
this.warn("TAR_ENTRY_INFO", `stripping ${root} from absolute ${field}`, {
|
|
30812
30820
|
entry,
|
|
30813
|
-
[field]: path$
|
|
30821
|
+
[field]: path$16
|
|
30814
30822
|
});
|
|
30815
30823
|
}
|
|
30816
30824
|
return true;
|
|
@@ -30838,8 +30846,8 @@ var Unpack = class extends Parser {
|
|
|
30838
30846
|
return false;
|
|
30839
30847
|
}
|
|
30840
30848
|
if (!this[STRIPABSOLUTEPATH](entry, "path") || !this[STRIPABSOLUTEPATH](entry, "linkpath")) return false;
|
|
30841
|
-
if (
|
|
30842
|
-
else entry.absolute = normalizeWindowsPath(
|
|
30849
|
+
if (nodePath.isAbsolute(entry.path)) entry.absolute = normalizeWindowsPath(nodePath.resolve(entry.path));
|
|
30850
|
+
else entry.absolute = normalizeWindowsPath(nodePath.resolve(this.cwd, entry.path));
|
|
30843
30851
|
/* c8 ignore start - defense in depth */
|
|
30844
30852
|
if (!this.preservePaths && typeof entry.absolute === "string" && entry.absolute.indexOf(this.cwd + "/") !== 0 && entry.absolute !== this.cwd) {
|
|
30845
30853
|
this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", {
|
|
@@ -30853,9 +30861,9 @@ var Unpack = class extends Parser {
|
|
|
30853
30861
|
/* c8 ignore stop */
|
|
30854
30862
|
if (entry.absolute === this.cwd && entry.type !== "Directory" && entry.type !== "GNUDumpDir") return false;
|
|
30855
30863
|
if (this.win32) {
|
|
30856
|
-
const { root: aRoot } =
|
|
30864
|
+
const { root: aRoot } = nodePath.win32.parse(String(entry.absolute));
|
|
30857
30865
|
entry.absolute = aRoot + encode(String(entry.absolute).slice(aRoot.length));
|
|
30858
|
-
const { root: pRoot } =
|
|
30866
|
+
const { root: pRoot } = nodePath.win32.parse(entry.path);
|
|
30859
30867
|
entry.path = pRoot + encode(entry.path.slice(pRoot.length));
|
|
30860
30868
|
}
|
|
30861
30869
|
return true;
|
|
@@ -31001,7 +31009,7 @@ var Unpack = class extends Parser {
|
|
|
31001
31009
|
this[LINK](entry, String(entry.linkpath), "symlink", done);
|
|
31002
31010
|
}
|
|
31003
31011
|
[HARDLINK](entry, done) {
|
|
31004
|
-
const linkpath = normalizeWindowsPath(
|
|
31012
|
+
const linkpath = normalizeWindowsPath(nodePath.resolve(this.cwd, String(entry.linkpath)));
|
|
31005
31013
|
this[LINK](entry, linkpath, "link", done);
|
|
31006
31014
|
}
|
|
31007
31015
|
[PEND]() {
|
|
@@ -31041,7 +31049,7 @@ var Unpack = class extends Parser {
|
|
|
31041
31049
|
};
|
|
31042
31050
|
const start = () => {
|
|
31043
31051
|
if (entry.absolute !== this.cwd) {
|
|
31044
|
-
const parent = normalizeWindowsPath(
|
|
31052
|
+
const parent = normalizeWindowsPath(nodePath.dirname(String(entry.absolute)));
|
|
31045
31053
|
if (parent !== this.cwd) return this[MKDIR](parent, this.dmode, (er) => {
|
|
31046
31054
|
if (er) {
|
|
31047
31055
|
this[ONERROR](er, entry);
|
|
@@ -31123,7 +31131,7 @@ var UnpackSync = class extends Unpack {
|
|
|
31123
31131
|
this[CHECKED_CWD] = true;
|
|
31124
31132
|
}
|
|
31125
31133
|
if (entry.absolute !== this.cwd) {
|
|
31126
|
-
const parent = normalizeWindowsPath(
|
|
31134
|
+
const parent = normalizeWindowsPath(nodePath.dirname(String(entry.absolute)));
|
|
31127
31135
|
if (parent !== this.cwd) {
|
|
31128
31136
|
const mkParent = this[MKDIR](parent, this.dmode);
|
|
31129
31137
|
if (mkParent) return this[ONERROR](mkParent, entry);
|
|
@@ -31395,7 +31403,7 @@ const replaceAsync = (opt, files) => {
|
|
|
31395
31403
|
const addFilesSync = (p$1, files) => {
|
|
31396
31404
|
files.forEach((file) => {
|
|
31397
31405
|
if (file.charAt(0) === "@") list({
|
|
31398
|
-
file:
|
|
31406
|
+
file: nodePath.resolve(p$1.cwd, file.slice(1)),
|
|
31399
31407
|
sync: true,
|
|
31400
31408
|
noResume: true,
|
|
31401
31409
|
onReadEntry: (entry) => p$1.add(entry)
|
|
@@ -31408,7 +31416,7 @@ const addFilesAsync = async (p$1, files) => {
|
|
|
31408
31416
|
for (let i$1 = 0; i$1 < files.length; i$1++) {
|
|
31409
31417
|
const file = String(files[i$1]);
|
|
31410
31418
|
if (file.charAt(0) === "@") await list({
|
|
31411
|
-
file:
|
|
31419
|
+
file: nodePath.resolve(String(p$1.cwd), file.slice(1)),
|
|
31412
31420
|
noResume: true,
|
|
31413
31421
|
onReadEntry: (entry) => p$1.add(entry)
|
|
31414
31422
|
});
|
|
@@ -31443,7 +31451,7 @@ const update = makeCommand(replace.syncFile, replace.asyncFile, replace.syncNoFi
|
|
|
31443
31451
|
const mtimeFilter = (opt) => {
|
|
31444
31452
|
const filter = opt.filter;
|
|
31445
31453
|
if (!opt.mtimeCache) opt.mtimeCache = /* @__PURE__ */ new Map();
|
|
31446
|
-
opt.filter = filter ? (path$
|
|
31454
|
+
opt.filter = filter ? (path$16, stat) => filter(path$16, stat) && !((opt.mtimeCache?.get(path$16) ?? stat.mtime ?? 0) > (stat.mtime ?? 0)) : (path$16, stat) => !((opt.mtimeCache?.get(path$16) ?? stat.mtime ?? 0) > (stat.mtime ?? 0));
|
|
31447
31455
|
};
|
|
31448
31456
|
|
|
31449
31457
|
//#endregion
|
|
@@ -32112,7 +32120,7 @@ const green = format(32, 39);
|
|
|
32112
32120
|
const yellow = format(33, 39);
|
|
32113
32121
|
const blue = format(34, 39);
|
|
32114
32122
|
const magenta = format(35, 39);
|
|
32115
|
-
const cyan
|
|
32123
|
+
const cyan = format(36, 39);
|
|
32116
32124
|
const white = format(37, 39);
|
|
32117
32125
|
const gray = format(90, 39);
|
|
32118
32126
|
const bgBlack = format(40, 49);
|
|
@@ -32281,28 +32289,28 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32281
32289
|
module.exports = isexe;
|
|
32282
32290
|
isexe.sync = sync;
|
|
32283
32291
|
var fs$4 = __require("fs");
|
|
32284
|
-
function checkPathExt(path$
|
|
32292
|
+
function checkPathExt(path$16, options) {
|
|
32285
32293
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
32286
32294
|
if (!pathext) return true;
|
|
32287
32295
|
pathext = pathext.split(";");
|
|
32288
32296
|
if (pathext.indexOf("") !== -1) return true;
|
|
32289
32297
|
for (var i$1 = 0; i$1 < pathext.length; i$1++) {
|
|
32290
32298
|
var p$1 = pathext[i$1].toLowerCase();
|
|
32291
|
-
if (p$1 && path$
|
|
32299
|
+
if (p$1 && path$16.substr(-p$1.length).toLowerCase() === p$1) return true;
|
|
32292
32300
|
}
|
|
32293
32301
|
return false;
|
|
32294
32302
|
}
|
|
32295
|
-
function checkStat(stat, path$
|
|
32303
|
+
function checkStat(stat, path$16, options) {
|
|
32296
32304
|
if (!stat.isSymbolicLink() && !stat.isFile()) return false;
|
|
32297
|
-
return checkPathExt(path$
|
|
32305
|
+
return checkPathExt(path$16, options);
|
|
32298
32306
|
}
|
|
32299
|
-
function isexe(path$
|
|
32300
|
-
fs$4.stat(path$
|
|
32301
|
-
cb(er, er ? false : checkStat(stat, path$
|
|
32307
|
+
function isexe(path$16, options, cb) {
|
|
32308
|
+
fs$4.stat(path$16, function(er, stat) {
|
|
32309
|
+
cb(er, er ? false : checkStat(stat, path$16, options));
|
|
32302
32310
|
});
|
|
32303
32311
|
}
|
|
32304
|
-
function sync(path$
|
|
32305
|
-
return checkStat(fs$4.statSync(path$
|
|
32312
|
+
function sync(path$16, options) {
|
|
32313
|
+
return checkStat(fs$4.statSync(path$16), path$16, options);
|
|
32306
32314
|
}
|
|
32307
32315
|
}));
|
|
32308
32316
|
|
|
@@ -32312,13 +32320,13 @@ var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32312
32320
|
module.exports = isexe;
|
|
32313
32321
|
isexe.sync = sync;
|
|
32314
32322
|
var fs$3 = __require("fs");
|
|
32315
|
-
function isexe(path$
|
|
32316
|
-
fs$3.stat(path$
|
|
32323
|
+
function isexe(path$16, options, cb) {
|
|
32324
|
+
fs$3.stat(path$16, function(er, stat) {
|
|
32317
32325
|
cb(er, er ? false : checkStat(stat, options));
|
|
32318
32326
|
});
|
|
32319
32327
|
}
|
|
32320
|
-
function sync(path$
|
|
32321
|
-
return checkStat(fs$3.statSync(path$
|
|
32328
|
+
function sync(path$16, options) {
|
|
32329
|
+
return checkStat(fs$3.statSync(path$16), options);
|
|
32322
32330
|
}
|
|
32323
32331
|
function checkStat(stat, options) {
|
|
32324
32332
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -32346,7 +32354,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32346
32354
|
else core = require_mode();
|
|
32347
32355
|
module.exports = isexe;
|
|
32348
32356
|
isexe.sync = sync;
|
|
32349
|
-
function isexe(path$
|
|
32357
|
+
function isexe(path$16, options, cb) {
|
|
32350
32358
|
if (typeof options === "function") {
|
|
32351
32359
|
cb = options;
|
|
32352
32360
|
options = {};
|
|
@@ -32354,13 +32362,13 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32354
32362
|
if (!cb) {
|
|
32355
32363
|
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
32356
32364
|
return new Promise(function(resolve$1, reject) {
|
|
32357
|
-
isexe(path$
|
|
32365
|
+
isexe(path$16, options || {}, function(er, is) {
|
|
32358
32366
|
if (er) reject(er);
|
|
32359
32367
|
else resolve$1(is);
|
|
32360
32368
|
});
|
|
32361
32369
|
});
|
|
32362
32370
|
}
|
|
32363
|
-
core(path$
|
|
32371
|
+
core(path$16, options || {}, function(er, is) {
|
|
32364
32372
|
if (er) {
|
|
32365
32373
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
32366
32374
|
er = null;
|
|
@@ -32370,9 +32378,9 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32370
32378
|
cb(er, is);
|
|
32371
32379
|
});
|
|
32372
32380
|
}
|
|
32373
|
-
function sync(path$
|
|
32381
|
+
function sync(path$16, options) {
|
|
32374
32382
|
try {
|
|
32375
|
-
return core.sync(path$
|
|
32383
|
+
return core.sync(path$16, options || {});
|
|
32376
32384
|
} catch (er) {
|
|
32377
32385
|
if (options && options.ignoreErrors || er.code === "EACCES") return false;
|
|
32378
32386
|
else throw er;
|
|
@@ -32384,7 +32392,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32384
32392
|
//#region node_modules/which/which.js
|
|
32385
32393
|
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32386
32394
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
32387
|
-
const path$
|
|
32395
|
+
const path$3 = __require("path");
|
|
32388
32396
|
const COLON = isWindows ? ";" : ":";
|
|
32389
32397
|
const isexe = require_isexe();
|
|
32390
32398
|
const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -32414,7 +32422,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32414
32422
|
if (i$1 === pathEnv.length) return opt.all && found.length ? resolve$1(found) : reject(getNotFoundError(cmd));
|
|
32415
32423
|
const ppRaw = pathEnv[i$1];
|
|
32416
32424
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
32417
|
-
const pCmd = path$
|
|
32425
|
+
const pCmd = path$3.join(pathPart, cmd);
|
|
32418
32426
|
resolve$1(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i$1, 0));
|
|
32419
32427
|
});
|
|
32420
32428
|
const subStep = (p$1, i$1, ii) => new Promise((resolve$1, reject) => {
|
|
@@ -32435,7 +32443,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32435
32443
|
for (let i$1 = 0; i$1 < pathEnv.length; i$1++) {
|
|
32436
32444
|
const ppRaw = pathEnv[i$1];
|
|
32437
32445
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
32438
|
-
const pCmd = path$
|
|
32446
|
+
const pCmd = path$3.join(pathPart, cmd);
|
|
32439
32447
|
const p$1 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
32440
32448
|
for (let j = 0; j < pathExt.length; j++) {
|
|
32441
32449
|
const cur = p$1 + pathExt[j];
|
|
@@ -32468,7 +32476,7 @@ var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32468
32476
|
//#endregion
|
|
32469
32477
|
//#region node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
32470
32478
|
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32471
|
-
const path$
|
|
32479
|
+
const path$2 = __require("path");
|
|
32472
32480
|
const which = require_which();
|
|
32473
32481
|
const getPathKey = require_path_key();
|
|
32474
32482
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -32483,12 +32491,12 @@ var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
32483
32491
|
try {
|
|
32484
32492
|
resolved = which.sync(parsed.command, {
|
|
32485
32493
|
path: env$1[getPathKey({ env: env$1 })],
|
|
32486
|
-
pathExt: withoutPathExt ? path$
|
|
32494
|
+
pathExt: withoutPathExt ? path$2.delimiter : void 0
|
|
32487
32495
|
});
|
|
32488
32496
|
} catch (e$1) {} finally {
|
|
32489
32497
|
if (shouldSwitchCwd) process.chdir(cwd);
|
|
32490
32498
|
}
|
|
32491
|
-
if (resolved) resolved = path$
|
|
32499
|
+
if (resolved) resolved = path$2.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
32492
32500
|
return resolved;
|
|
32493
32501
|
}
|
|
32494
32502
|
function resolveCommand(parsed) {
|
|
@@ -32531,8 +32539,8 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
32531
32539
|
module.exports = (string$2 = "") => {
|
|
32532
32540
|
const match = string$2.match(shebangRegex);
|
|
32533
32541
|
if (!match) return null;
|
|
32534
|
-
const [path$
|
|
32535
|
-
const binary = path$
|
|
32542
|
+
const [path$16, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
32543
|
+
const binary = path$16.split("/").pop();
|
|
32536
32544
|
if (binary === "env") return argument;
|
|
32537
32545
|
return argument ? `${binary} ${argument}` : binary;
|
|
32538
32546
|
};
|
|
@@ -32560,7 +32568,7 @@ var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32560
32568
|
//#endregion
|
|
32561
32569
|
//#region node_modules/cross-spawn/lib/parse.js
|
|
32562
32570
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32563
|
-
const path$
|
|
32571
|
+
const path$1 = __require("path");
|
|
32564
32572
|
const resolveCommand = require_resolveCommand();
|
|
32565
32573
|
const escape = require_escape();
|
|
32566
32574
|
const readShebang = require_readShebang();
|
|
@@ -32583,7 +32591,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32583
32591
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
32584
32592
|
if (parsed.options.forceShell || needsShell) {
|
|
32585
32593
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
32586
|
-
parsed.command = path$
|
|
32594
|
+
parsed.command = path$1.normalize(parsed.command);
|
|
32587
32595
|
parsed.command = escape.command(parsed.command);
|
|
32588
32596
|
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
32589
32597
|
parsed.args = [
|
|
@@ -32701,12 +32709,12 @@ function toPath(urlOrPath) {
|
|
|
32701
32709
|
}
|
|
32702
32710
|
function traversePathUp(startPath) {
|
|
32703
32711
|
return { *[Symbol.iterator]() {
|
|
32704
|
-
let currentPath =
|
|
32712
|
+
let currentPath = nodePath.resolve(toPath(startPath));
|
|
32705
32713
|
let previousPath;
|
|
32706
32714
|
while (previousPath !== currentPath) {
|
|
32707
32715
|
yield currentPath;
|
|
32708
32716
|
previousPath = currentPath;
|
|
32709
|
-
currentPath =
|
|
32717
|
+
currentPath = nodePath.resolve(currentPath, "..");
|
|
32710
32718
|
}
|
|
32711
32719
|
} };
|
|
32712
32720
|
}
|
|
@@ -32715,21 +32723,21 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
32715
32723
|
//#endregion
|
|
32716
32724
|
//#region node_modules/npm-run-path/index.js
|
|
32717
32725
|
const npmRunPath = ({ cwd = y.cwd(), path: pathOption = y.env[pathKey()], preferLocal = true, execPath: execPath$1 = y.execPath, addExecPath = true } = {}) => {
|
|
32718
|
-
const cwdPath =
|
|
32726
|
+
const cwdPath = nodePath.resolve(toPath(cwd));
|
|
32719
32727
|
const result = [];
|
|
32720
|
-
const pathParts = pathOption.split(
|
|
32728
|
+
const pathParts = pathOption.split(nodePath.delimiter);
|
|
32721
32729
|
if (preferLocal) applyPreferLocal(result, pathParts, cwdPath);
|
|
32722
32730
|
if (addExecPath) applyExecPath(result, pathParts, execPath$1, cwdPath);
|
|
32723
|
-
return pathOption === "" || pathOption ===
|
|
32731
|
+
return pathOption === "" || pathOption === nodePath.delimiter ? `${result.join(nodePath.delimiter)}${pathOption}` : [...result, pathOption].join(nodePath.delimiter);
|
|
32724
32732
|
};
|
|
32725
32733
|
const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
32726
32734
|
for (const directory of traversePathUp(cwdPath)) {
|
|
32727
|
-
const pathPart =
|
|
32735
|
+
const pathPart = nodePath.join(directory, "node_modules/.bin");
|
|
32728
32736
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
32729
32737
|
}
|
|
32730
32738
|
};
|
|
32731
32739
|
const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
|
|
32732
|
-
const pathPart =
|
|
32740
|
+
const pathPart = nodePath.resolve(cwdPath, toPath(execPath$1), "..");
|
|
32733
32741
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
32734
32742
|
};
|
|
32735
32743
|
const npmRunPathEnv = ({ env: env$1 = y.env, ...options } = {}) => {
|
|
@@ -33761,10 +33769,10 @@ const mapNode = ({ options }) => {
|
|
|
33761
33769
|
node: true
|
|
33762
33770
|
} };
|
|
33763
33771
|
};
|
|
33764
|
-
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = execPath, nodeOptions = execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath, ...options }) => {
|
|
33772
|
+
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath: nodePath$1 = execPath, nodeOptions = execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath, ...options }) => {
|
|
33765
33773
|
if (formerNodePath !== void 0) throw new TypeError("The \"execPath\" option has been removed. Please use the \"nodePath\" option instead.");
|
|
33766
|
-
const normalizedNodePath = safeNormalizeFileUrl(nodePath, "The \"nodePath\" option");
|
|
33767
|
-
const resolvedNodePath =
|
|
33774
|
+
const normalizedNodePath = safeNormalizeFileUrl(nodePath$1, "The \"nodePath\" option");
|
|
33775
|
+
const resolvedNodePath = nodePath.resolve(cwd, normalizedNodePath);
|
|
33768
33776
|
const newOptions = {
|
|
33769
33777
|
...options,
|
|
33770
33778
|
nodePath: resolvedNodePath,
|
|
@@ -33776,7 +33784,7 @@ const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = fal
|
|
|
33776
33784
|
commandArguments,
|
|
33777
33785
|
newOptions
|
|
33778
33786
|
];
|
|
33779
|
-
if (
|
|
33787
|
+
if (nodePath.basename(file, ".exe") === "node") throw new TypeError("When the \"node\" option is true, the first argument does not need to be \"node\".");
|
|
33780
33788
|
return [
|
|
33781
33789
|
resolvedNodePath,
|
|
33782
33790
|
[
|
|
@@ -33863,7 +33871,7 @@ const serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encod
|
|
|
33863
33871
|
//#region node_modules/execa/lib/arguments/cwd.js
|
|
33864
33872
|
const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
33865
33873
|
const cwdString = safeNormalizeFileUrl(cwd, "The \"cwd\" option");
|
|
33866
|
-
return
|
|
33874
|
+
return nodePath.resolve(cwdString);
|
|
33867
33875
|
};
|
|
33868
33876
|
const getDefaultCwd = () => {
|
|
33869
33877
|
try {
|
|
@@ -33902,7 +33910,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
33902
33910
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
33903
33911
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
33904
33912
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
33905
|
-
if (y.platform === "win32" &&
|
|
33913
|
+
if (y.platform === "win32" && nodePath.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
33906
33914
|
return {
|
|
33907
33915
|
file,
|
|
33908
33916
|
commandArguments,
|
|
@@ -33927,7 +33935,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
33927
33935
|
ipc,
|
|
33928
33936
|
serialization
|
|
33929
33937
|
});
|
|
33930
|
-
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
33938
|
+
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath: nodePath$1 }) => {
|
|
33931
33939
|
const env$1 = extendEnv ? {
|
|
33932
33940
|
...y.env,
|
|
33933
33941
|
...envOption
|
|
@@ -33935,7 +33943,7 @@ const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory,
|
|
|
33935
33943
|
if (preferLocal || node) return npmRunPathEnv({
|
|
33936
33944
|
env: env$1,
|
|
33937
33945
|
cwd: localDirectory,
|
|
33938
|
-
execPath: nodePath,
|
|
33946
|
+
execPath: nodePath$1,
|
|
33939
33947
|
preferLocal,
|
|
33940
33948
|
addExecPath: node
|
|
33941
33949
|
});
|
|
@@ -35680,12 +35688,12 @@ const logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encodin
|
|
|
35680
35688
|
}
|
|
35681
35689
|
};
|
|
35682
35690
|
const writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
35683
|
-
for (const { path: path$
|
|
35684
|
-
const pathString = typeof path$
|
|
35685
|
-
if (append || outputFiles.has(pathString)) appendFileSync(path$
|
|
35691
|
+
for (const { path: path$16, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
|
|
35692
|
+
const pathString = typeof path$16 === "string" ? path$16 : path$16.toString();
|
|
35693
|
+
if (append || outputFiles.has(pathString)) appendFileSync(path$16, serializedResult);
|
|
35686
35694
|
else {
|
|
35687
35695
|
outputFiles.add(pathString);
|
|
35688
|
-
writeFileSync(path$
|
|
35696
|
+
writeFileSync(path$16, serializedResult);
|
|
35689
35697
|
}
|
|
35690
35698
|
}
|
|
35691
35699
|
};
|
|
@@ -38156,8 +38164,6 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38156
38164
|
//#endregion
|
|
38157
38165
|
//#region src/cli/commands/project/create.ts
|
|
38158
38166
|
var import_lodash = /* @__PURE__ */ __toESM(require_lodash(), 1);
|
|
38159
|
-
const orange = source_default.hex("#E86B3C");
|
|
38160
|
-
const cyan = source_default.hex("#00D4FF");
|
|
38161
38167
|
const DEFAULT_TEMPLATE_ID = "backend-only";
|
|
38162
38168
|
async function getDefaultTemplate() {
|
|
38163
38169
|
const template = (await listTemplates()).find((t) => t.id === DEFAULT_TEMPLATE_ID);
|
|
@@ -38165,8 +38171,8 @@ async function getDefaultTemplate() {
|
|
|
38165
38171
|
return template;
|
|
38166
38172
|
}
|
|
38167
38173
|
function validateNonInteractiveFlags(command) {
|
|
38168
|
-
const { name: name$1, path: path$
|
|
38169
|
-
const providedCount = [name$1, path$
|
|
38174
|
+
const { name: name$1, path: path$16 } = command.opts();
|
|
38175
|
+
const providedCount = [name$1, path$16].filter(Boolean).length;
|
|
38170
38176
|
if (providedCount > 0 && providedCount < 2) command.error("Non-interactive mode requires all flags: --name, --path");
|
|
38171
38177
|
}
|
|
38172
38178
|
async function chooseCreate(options) {
|
|
@@ -38237,7 +38243,7 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38237
38243
|
template
|
|
38238
38244
|
});
|
|
38239
38245
|
}, {
|
|
38240
|
-
successMessage: orange("Project created successfully"),
|
|
38246
|
+
successMessage: theme.colors.orange("Project created successfully"),
|
|
38241
38247
|
errorMessage: "Failed to create project"
|
|
38242
38248
|
});
|
|
38243
38249
|
await loadProjectEnv(resolvedPath);
|
|
@@ -38252,7 +38258,7 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38252
38258
|
if (shouldPushEntities) await runTask(`Pushing ${entities.length} entities to Base44...`, async () => {
|
|
38253
38259
|
await pushEntities(entities);
|
|
38254
38260
|
}, {
|
|
38255
|
-
successMessage: orange("Entities pushed successfully"),
|
|
38261
|
+
successMessage: theme.colors.orange("Entities pushed successfully"),
|
|
38256
38262
|
errorMessage: "Failed to push entities"
|
|
38257
38263
|
});
|
|
38258
38264
|
}
|
|
@@ -38277,16 +38283,16 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38277
38283
|
updateMessage("Deploying site...");
|
|
38278
38284
|
return await deploySite(join(resolvedPath, outputDirectory));
|
|
38279
38285
|
}, {
|
|
38280
|
-
successMessage: orange("Site deployed successfully"),
|
|
38286
|
+
successMessage: theme.colors.orange("Site deployed successfully"),
|
|
38281
38287
|
errorMessage: "Failed to deploy site"
|
|
38282
38288
|
});
|
|
38283
38289
|
finalAppUrl = appUrl;
|
|
38284
38290
|
}
|
|
38285
38291
|
}
|
|
38286
38292
|
const dashboardUrl = `${getBase44ApiUrl()}/apps/${projectId}/editor/preview`;
|
|
38287
|
-
M.message(`${source_default.dim("Project")}: ${orange(name$1)}`);
|
|
38288
|
-
M.message(`${source_default.dim("Dashboard")}: ${cyan(dashboardUrl)}`);
|
|
38289
|
-
if (finalAppUrl) M.message(`${source_default.dim("Site")}: ${cyan(finalAppUrl)}`);
|
|
38293
|
+
M.message(`${source_default.dim("Project")}: ${theme.colors.orange(name$1)}`);
|
|
38294
|
+
M.message(`${source_default.dim("Dashboard")}: ${theme.colors.cyan(dashboardUrl)}`);
|
|
38295
|
+
if (finalAppUrl) M.message(`${source_default.dim("Site")}: ${theme.colors.cyan(finalAppUrl)}`);
|
|
38290
38296
|
return { outroMessage: "Your project is set and ready to use" };
|
|
38291
38297
|
}
|
|
38292
38298
|
const createCommand = new Command("create").description("Create a new Base44 project").option("-n, --name <name>", "Project name").option("-d, --description <description>", "Project description").option("-p, --path <path>", "Path where to create the project").option("--deploy", "Build and deploy the site").hook("preAction", validateNonInteractiveFlags).action(async (options) => {
|
|
@@ -38316,7 +38322,7 @@ const siteDeployCommand = new Command("site").description("Manage site deploymen
|
|
|
38316
38322
|
|
|
38317
38323
|
//#endregion
|
|
38318
38324
|
//#region package.json
|
|
38319
|
-
var version = "0.0.
|
|
38325
|
+
var version = "0.0.9";
|
|
38320
38326
|
|
|
38321
38327
|
//#endregion
|
|
38322
38328
|
//#region src/cli/index.ts
|