@base44-preview/cli 0.0.7-pr.67.6d69683 → 0.0.7-pr.67.6f3d00e
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 +352 -339
- 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 path, { 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, { dirname as dirname$1, parse } from "path";
|
|
16
|
+
import path$1, { 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$16 = __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$16.resolve(baseDir, baseName);
|
|
1744
1744
|
if (fs$10.existsSync(localBin)) return localBin;
|
|
1745
|
-
if (sourceExt.includes(path$
|
|
1745
|
+
if (sourceExt.includes(path$16.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$16.resolve(path$16.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$16.basename(this._scriptPath, path$16.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$16.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$16.basename(filename, path$16.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$17) {
|
|
2491
|
+
if (path$17 === void 0) return this._executableDir;
|
|
2492
|
+
this._executableDir = path$17;
|
|
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$17, 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$17);
|
|
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$15 = __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$15.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$15.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$15.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$17 of optionPaths) try {
|
|
9388
|
+
const parsed = DotenvModule.parse(fs$9.readFileSync(path$17, { 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$17} ${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$15.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$14 = __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$14.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$13 = __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$13.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$12 = __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$12.sep === "\\";
|
|
11199
11199
|
};
|
|
11200
11200
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
11201
11201
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -12342,7 +12342,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
12342
12342
|
if (opts$1.noglobstar === true) return star;
|
|
12343
12343
|
return `(${capture}(?:(?!${START_ANCHOR}${opts$1.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
|
|
12344
12344
|
};
|
|
12345
|
-
const create$
|
|
12345
|
+
const create$1 = (str) => {
|
|
12346
12346
|
switch (str) {
|
|
12347
12347
|
case "*": return `${nodot}${ONE_CHAR}${star}`;
|
|
12348
12348
|
case ".*": return `${DOT_LITERAL}${ONE_CHAR}${star}`;
|
|
@@ -12355,13 +12355,13 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
12355
12355
|
default: {
|
|
12356
12356
|
const match = /^(.*?)\.(\w+)$/.exec(str);
|
|
12357
12357
|
if (!match) return;
|
|
12358
|
-
const source$1 = create$
|
|
12358
|
+
const source$1 = create$1(match[1]);
|
|
12359
12359
|
if (!source$1) return;
|
|
12360
12360
|
return source$1 + DOT_LITERAL + match[2];
|
|
12361
12361
|
}
|
|
12362
12362
|
}
|
|
12363
12363
|
};
|
|
12364
|
-
let source = create$
|
|
12364
|
+
let source = create$1(utils.removePrefix(input, state));
|
|
12365
12365
|
if (source && opts.strictSlashes !== true) source += `${SLASH_LITERAL}?`;
|
|
12366
12366
|
return source;
|
|
12367
12367
|
};
|
|
@@ -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$11 = __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$11.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$10 = __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$10.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$10.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$17, settings, callback) {
|
|
13497
|
+
settings.fs.lstat(path$17, (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$17, (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$17, settings) {
|
|
13535
|
+
const lstat = settings.fs.lstatSync(path$17);
|
|
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$17);
|
|
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$17, optionsOrSettingsOrCallback, callback) {
|
|
13598
13598
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
13599
|
-
async.read(path$
|
|
13599
|
+
async.read(path$17, getSettings(), optionsOrSettingsOrCallback);
|
|
13600
13600
|
return;
|
|
13601
13601
|
}
|
|
13602
|
-
async.read(path$
|
|
13602
|
+
async.read(path$17, getSettings(optionsOrSettingsOrCallback), callback);
|
|
13603
13603
|
}
|
|
13604
13604
|
exports.stat = stat;
|
|
13605
|
-
function statSync(path$
|
|
13605
|
+
function statSync(path$17, optionsOrSettings) {
|
|
13606
13606
|
const settings = getSettings(optionsOrSettings);
|
|
13607
|
-
return sync.read(path$
|
|
13607
|
+
return sync.read(path$17, 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$17 = common.joinPathSegments(directory, name$1, settings.pathSegmentSeparator);
|
|
13807
13807
|
return (done) => {
|
|
13808
|
-
fsStat.stat(path$
|
|
13808
|
+
fsStat.stat(path$17, 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$17,
|
|
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$9 = __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$9.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$17, optionsOrSettingsOrCallback, callback) {
|
|
13946
13946
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
13947
|
-
async.read(path$
|
|
13947
|
+
async.read(path$17, getSettings(), optionsOrSettingsOrCallback);
|
|
13948
13948
|
return;
|
|
13949
13949
|
}
|
|
13950
|
-
async.read(path$
|
|
13950
|
+
async.read(path$17, getSettings(optionsOrSettingsOrCallback), callback);
|
|
13951
13951
|
}
|
|
13952
13952
|
exports.scandir = scandir;
|
|
13953
|
-
function scandirSync(path$
|
|
13953
|
+
function scandirSync(path$17, optionsOrSettings) {
|
|
13954
13954
|
const settings = getSettings(optionsOrSettings);
|
|
13955
|
-
return sync.read(path$
|
|
13955
|
+
return sync.read(path$17, 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$8 = __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$8.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$7 = __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$7.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$6 = __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$6.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$17, 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$17)) 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$17, originalPath, doThrow) => {
|
|
15437
|
+
if (!isString(path$17)) return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
|
|
15438
|
+
if (!path$17) return doThrow(`path must not be empty`, TypeError);
|
|
15439
|
+
if (checkPath.isNotRelative(path$17)) 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$17) => REGEX_TEST_INVALID_PATH.test(path$17);
|
|
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$17 = originalPath && checkPath.convert(originalPath);
|
|
15466
|
+
checkPath(path$17, originalPath, this._strictPathCheck ? throwError : RETURN_FALSE);
|
|
15467
|
+
return this._t(path$17, cache$1, checkUnignored, slices);
|
|
15468
15468
|
}
|
|
15469
|
-
checkIgnore(path$
|
|
15470
|
-
if (!REGEX_TEST_TRAILING_SLASH.test(path$
|
|
15471
|
-
const slices = path$
|
|
15469
|
+
checkIgnore(path$17) {
|
|
15470
|
+
if (!REGEX_TEST_TRAILING_SLASH.test(path$17)) return this.test(path$17);
|
|
15471
|
+
const slices = path$17.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$17, false, MODE_CHECK_IGNORE);
|
|
15478
15478
|
}
|
|
15479
|
-
_t(path$
|
|
15480
|
-
if (path$
|
|
15481
|
-
if (!slices) slices = path$
|
|
15479
|
+
_t(path$17, cache$1, checkUnignored, slices) {
|
|
15480
|
+
if (path$17 in cache$1) return cache$1[path$17];
|
|
15481
|
+
if (!slices) slices = path$17.split(SLASH).filter(Boolean);
|
|
15482
15482
|
slices.pop();
|
|
15483
|
-
if (!slices.length) return cache$1[path$
|
|
15483
|
+
if (!slices.length) return cache$1[path$17] = this._rules.test(path$17, 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$17] = parent.ignored ? parent : this._rules.test(path$17, checkUnignored, MODE_IGNORE);
|
|
15486
15486
|
}
|
|
15487
|
-
ignores(path$
|
|
15488
|
-
return this._test(path$
|
|
15487
|
+
ignores(path$17) {
|
|
15488
|
+
return this._test(path$17, this._ignoreCache, false).ignored;
|
|
15489
15489
|
}
|
|
15490
15490
|
createFilter() {
|
|
15491
|
-
return (path$
|
|
15491
|
+
return (path$17) => !this.ignores(path$17);
|
|
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$17) {
|
|
15497
|
+
return this._test(path$17, this._testCache, true);
|
|
15498
15498
|
}
|
|
15499
15499
|
};
|
|
15500
15500
|
const factory = (options) => new Ignore(options);
|
|
15501
|
-
const isPathValid = (path$
|
|
15501
|
+
const isPathValid = (path$17) => checkPath(path$17 && checkPath.convert(path$17), path$17, 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$17) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path$17) || isNotRelative(path$17);
|
|
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 = path.relative(parentPath, childPath);
|
|
15522
|
+
return Boolean(relation && relation !== ".." && !relation.startsWith(`..${path.sep}`) && relation !== path.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$17) {
|
|
15528
|
+
if (path$17.startsWith("\\\\?\\")) return path$17;
|
|
15529
|
+
return path$17.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 = path.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 = path.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 = path.resolve(cwd);
|
|
15634
|
+
const { root } = path.parse(currentPath);
|
|
15635
15635
|
const chain = buildPathChain(currentPath, root);
|
|
15636
15636
|
for (const directory of chain) {
|
|
15637
|
-
const gitPath =
|
|
15637
|
+
const gitPath = path.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 = path.resolve(cwd);
|
|
15651
|
+
const { root } = path.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 = path.resolve(gitRoot);
|
|
15667
|
+
const resolvedCwd = path.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(path.resolve(cwd), path.resolve(gitRoot))].reverse().map((directory) => path.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 = path.posix.join(base, "**", cleanPattern);
|
|
15783
|
+
else if (cleanPattern.startsWith("/")) result = path.posix.join(base, cleanPattern.slice(1));
|
|
15784
|
+
else result = path.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(path.relative(cwd, path.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 (path.isAbsolute(fileOrDirectory)) {
|
|
15793
|
+
const relativePath = path.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 = path.normalize(path.resolve(cwd));
|
|
15804
|
+
const resolvedBaseDir = path.normalize(path.resolve(baseDir));
|
|
15805
15805
|
return (fileOrDirectory) => {
|
|
15806
15806
|
fileOrDirectory = toPath$1(fileOrDirectory);
|
|
15807
|
-
if (
|
|
15807
|
+
if (path.normalize(path.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$17, fsImplementation) => {
|
|
15883
15883
|
try {
|
|
15884
|
-
return (await getStatMethod(fsImplementation)(path$
|
|
15884
|
+
return (await getStatMethod(fsImplementation)(path$17)).isDirectory();
|
|
15885
15885
|
} catch {
|
|
15886
15886
|
return false;
|
|
15887
15887
|
}
|
|
15888
15888
|
};
|
|
15889
|
-
const isDirectorySync = (path$
|
|
15889
|
+
const isDirectorySync = (path$17, fsImplementation) => {
|
|
15890
15890
|
try {
|
|
15891
|
-
return getStatSyncMethod(fsImplementation)(path$
|
|
15891
|
+
return getStatSyncMethod(fsImplementation)(path$17).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$17 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
|
|
15898
|
+
return path.isAbsolute(path$17) ? path$17 : path.join(cwd, path$17);
|
|
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 = path.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) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.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 = path.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 = path.isAbsolute(pathKey$1) ? pathKey$1 : path.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$17) {
|
|
17104
17104
|
try {
|
|
17105
|
-
await access(path$
|
|
17105
|
+
await access(path$17);
|
|
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$5 = __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$5.dirname;
|
|
17679
|
+
var extname = path$5.extname;
|
|
17680
|
+
var resolve$1 = path$5.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$17, 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$17);
|
|
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$17 = path$17.replace(/^\/*/, "");
|
|
17713
|
+
if (Array.isArray(options.root)) includePath = resolvePaths(path$17, options.root);
|
|
17714
|
+
else includePath = exports.resolveInclude(path$17, options.root || "/", true);
|
|
17715
17715
|
} else {
|
|
17716
17716
|
if (options.filename) {
|
|
17717
|
-
filePath = exports.resolveInclude(path$
|
|
17717
|
+
filePath = exports.resolveInclude(path$17, 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$17, views);
|
|
17721
|
+
if (!includePath && typeof options.includer !== "function") throw new Error("Could not find the include file \"" + options.escapeFunction(path$17) + "\"");
|
|
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$17, options) {
|
|
17814
17814
|
var opts = utils.shallowCopy(utils.createNullProtoObjWherePossible(), options);
|
|
17815
|
-
opts.filename = getIncludePath(path$
|
|
17815
|
+
opts.filename = getIncludePath(path$17, opts);
|
|
17816
17816
|
if (typeof options.includer === "function") {
|
|
17817
|
-
var includerResult = options.includer(path$
|
|
17817
|
+
var includerResult = options.includer(path$17, 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$17, 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$17, 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$5.basename(filename, path$5.extname(filename));
|
|
18083
18083
|
try {
|
|
18084
18084
|
Object.defineProperty(returnedFn, "name", {
|
|
18085
18085
|
value: basename$1,
|
|
@@ -27384,15 +27384,15 @@ var ReadStream = class extends Minipass {
|
|
|
27384
27384
|
[_size];
|
|
27385
27385
|
[_remain];
|
|
27386
27386
|
[_autoClose];
|
|
27387
|
-
constructor(path$
|
|
27387
|
+
constructor(path$17, opt) {
|
|
27388
27388
|
opt = opt || {};
|
|
27389
27389
|
super(opt);
|
|
27390
27390
|
this.readable = true;
|
|
27391
27391
|
this.writable = false;
|
|
27392
|
-
if (typeof path$
|
|
27392
|
+
if (typeof path$17 !== "string") throw new TypeError("path must be a string");
|
|
27393
27393
|
this[_errored] = false;
|
|
27394
27394
|
this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0;
|
|
27395
|
-
this[_path] = path$
|
|
27395
|
+
this[_path] = path$17;
|
|
27396
27396
|
this[_readSize] = opt.readSize || 16 * 1024 * 1024;
|
|
27397
27397
|
this[_reading] = false;
|
|
27398
27398
|
this[_size] = typeof opt.size === "number" ? opt.size : Infinity;
|
|
@@ -27534,10 +27534,10 @@ var WriteStream = class extends EE {
|
|
|
27534
27534
|
[_flags];
|
|
27535
27535
|
[_finished] = false;
|
|
27536
27536
|
[_pos];
|
|
27537
|
-
constructor(path$
|
|
27537
|
+
constructor(path$17, opt) {
|
|
27538
27538
|
opt = opt || {};
|
|
27539
27539
|
super(opt);
|
|
27540
|
-
this[_path] = path$
|
|
27540
|
+
this[_path] = path$17;
|
|
27541
27541
|
this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0;
|
|
27542
27542
|
this[_mode] = opt.mode === void 0 ? 438 : opt.mode;
|
|
27543
27543
|
this[_pos] = typeof opt.start === "number" ? opt.start : void 0;
|
|
@@ -28296,10 +28296,10 @@ var Header = class {
|
|
|
28296
28296
|
if (!(buf.length >= off + 512)) throw new Error("need 512 bytes for header");
|
|
28297
28297
|
const prefixSize = this.ctime || this.atime ? 130 : 155;
|
|
28298
28298
|
const split = splitPrefix(this.path || "", prefixSize);
|
|
28299
|
-
const path$
|
|
28299
|
+
const path$17 = split[0];
|
|
28300
28300
|
const prefix = split[1];
|
|
28301
28301
|
this.needPax = !!split[2];
|
|
28302
|
-
this.needPax = encString(buf, off, 100, path$
|
|
28302
|
+
this.needPax = encString(buf, off, 100, path$17) || this.needPax;
|
|
28303
28303
|
this.needPax = encNumber(buf, off + 100, 8, this.mode) || this.needPax;
|
|
28304
28304
|
this.needPax = encNumber(buf, off + 108, 8, this.uid) || this.needPax;
|
|
28305
28305
|
this.needPax = encNumber(buf, off + 116, 8, this.gid) || this.needPax;
|
|
@@ -29138,16 +29138,16 @@ const modeFix = (mode, isDir, portable) => {
|
|
|
29138
29138
|
//#endregion
|
|
29139
29139
|
//#region node_modules/tar/dist/esm/strip-absolute-path.js
|
|
29140
29140
|
const { isAbsolute, parse: parse$1 } = win32;
|
|
29141
|
-
const stripAbsolutePath = (path$
|
|
29141
|
+
const stripAbsolutePath = (path$17) => {
|
|
29142
29142
|
let r$1 = "";
|
|
29143
|
-
let parsed = parse$1(path$
|
|
29144
|
-
while (isAbsolute(path$
|
|
29145
|
-
const root = path$
|
|
29146
|
-
path$
|
|
29143
|
+
let parsed = parse$1(path$17);
|
|
29144
|
+
while (isAbsolute(path$17) || parsed.root) {
|
|
29145
|
+
const root = path$17.charAt(0) === "/" && path$17.slice(0, 4) !== "//?/" ? "/" : parsed.root;
|
|
29146
|
+
path$17 = path$17.slice(root.length);
|
|
29147
29147
|
r$1 += root;
|
|
29148
|
-
parsed = parse$1(path$
|
|
29148
|
+
parsed = parse$1(path$17);
|
|
29149
29149
|
}
|
|
29150
|
-
return [r$1, path$
|
|
29150
|
+
return [r$1, path$17];
|
|
29151
29151
|
};
|
|
29152
29152
|
|
|
29153
29153
|
//#endregion
|
|
@@ -29167,10 +29167,10 @@ const decode = (s) => win.reduce((s$1, c$1) => s$1.split(c$1).join(toRaw.get(c$1
|
|
|
29167
29167
|
|
|
29168
29168
|
//#endregion
|
|
29169
29169
|
//#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$
|
|
29170
|
+
const prefixPath = (path$17, prefix) => {
|
|
29171
|
+
if (!prefix) return normalizeWindowsPath(path$17);
|
|
29172
|
+
path$17 = normalizeWindowsPath(path$17).replace(/^\.(\/|$)/, "");
|
|
29173
|
+
return stripTrailingSlashes(prefix) + "/" + path$17;
|
|
29174
29174
|
};
|
|
29175
29175
|
const maxReadSize = 16 * 1024 * 1024;
|
|
29176
29176
|
const PROCESS$1 = Symbol("process");
|
|
@@ -29252,7 +29252,7 @@ var WriteEntry = class extends Minipass {
|
|
|
29252
29252
|
this.path = decode(this.path.replace(/\\/g, "/"));
|
|
29253
29253
|
p$1 = p$1.replace(/\\/g, "/");
|
|
29254
29254
|
}
|
|
29255
|
-
this.absolute = normalizeWindowsPath(opt.absolute || path.resolve(this.cwd, p$1));
|
|
29255
|
+
this.absolute = normalizeWindowsPath(opt.absolute || path$1.resolve(this.cwd, p$1));
|
|
29256
29256
|
if (this.path === "") this.path = "./";
|
|
29257
29257
|
if (pathWarn) this.warn("TAR_ENTRY_INFO", `stripping ${pathWarn} from absolute path`, {
|
|
29258
29258
|
entry: this,
|
|
@@ -29294,8 +29294,8 @@ var WriteEntry = class extends Minipass {
|
|
|
29294
29294
|
[MODE](mode) {
|
|
29295
29295
|
return modeFix(mode, this.type === "Directory", this.portable);
|
|
29296
29296
|
}
|
|
29297
|
-
[PREFIX](path$
|
|
29298
|
-
return prefixPath(path$
|
|
29297
|
+
[PREFIX](path$17) {
|
|
29298
|
+
return prefixPath(path$17, this.prefix);
|
|
29299
29299
|
}
|
|
29300
29300
|
[HEADER]() {
|
|
29301
29301
|
/* c8 ignore start */
|
|
@@ -29361,7 +29361,7 @@ var WriteEntry = class extends Minipass {
|
|
|
29361
29361
|
if (!this.stat) throw new Error("cannot create link entry without stat");
|
|
29362
29362
|
/* c8 ignore stop */
|
|
29363
29363
|
this.type = "Link";
|
|
29364
|
-
this.linkpath = normalizeWindowsPath(path.relative(this.cwd, linkpath));
|
|
29364
|
+
this.linkpath = normalizeWindowsPath(path$1.relative(this.cwd, linkpath));
|
|
29365
29365
|
this.stat.size = 0;
|
|
29366
29366
|
this[HEADER]();
|
|
29367
29367
|
this.end();
|
|
@@ -29627,8 +29627,8 @@ var WriteEntryTar = class extends Minipass {
|
|
|
29627
29627
|
super.write(b$2);
|
|
29628
29628
|
readEntry.pipe(this);
|
|
29629
29629
|
}
|
|
29630
|
-
[PREFIX](path$
|
|
29631
|
-
return prefixPath(path$
|
|
29630
|
+
[PREFIX](path$17) {
|
|
29631
|
+
return prefixPath(path$17, this.prefix);
|
|
29632
29632
|
}
|
|
29633
29633
|
[MODE](mode) {
|
|
29634
29634
|
return modeFix(mode, this.type === "Directory", this.portable);
|
|
@@ -29937,8 +29937,8 @@ var PackJob = class {
|
|
|
29937
29937
|
pending = false;
|
|
29938
29938
|
ignore = false;
|
|
29939
29939
|
piped = false;
|
|
29940
|
-
constructor(path$
|
|
29941
|
-
this.path = path$
|
|
29940
|
+
constructor(path$17, absolute) {
|
|
29941
|
+
this.path = path$17 || "./";
|
|
29942
29942
|
this.absolute = absolute;
|
|
29943
29943
|
}
|
|
29944
29944
|
};
|
|
@@ -30043,36 +30043,36 @@ var Pack = class extends Minipass {
|
|
|
30043
30043
|
[WRITE](chunk) {
|
|
30044
30044
|
return super.write(chunk);
|
|
30045
30045
|
}
|
|
30046
|
-
add(path$
|
|
30047
|
-
this.write(path$
|
|
30046
|
+
add(path$17) {
|
|
30047
|
+
this.write(path$17);
|
|
30048
30048
|
return this;
|
|
30049
30049
|
}
|
|
30050
|
-
end(path$
|
|
30050
|
+
end(path$17, encoding, cb) {
|
|
30051
30051
|
/* c8 ignore start */
|
|
30052
|
-
if (typeof path$
|
|
30053
|
-
cb = path$
|
|
30054
|
-
path$
|
|
30052
|
+
if (typeof path$17 === "function") {
|
|
30053
|
+
cb = path$17;
|
|
30054
|
+
path$17 = void 0;
|
|
30055
30055
|
}
|
|
30056
30056
|
if (typeof encoding === "function") {
|
|
30057
30057
|
cb = encoding;
|
|
30058
30058
|
encoding = void 0;
|
|
30059
30059
|
}
|
|
30060
30060
|
/* c8 ignore stop */
|
|
30061
|
-
if (path$
|
|
30061
|
+
if (path$17) this.add(path$17);
|
|
30062
30062
|
this[ENDED$1] = true;
|
|
30063
30063
|
this[PROCESS]();
|
|
30064
30064
|
/* c8 ignore next */
|
|
30065
30065
|
if (cb) cb();
|
|
30066
30066
|
return this;
|
|
30067
30067
|
}
|
|
30068
|
-
write(path$
|
|
30068
|
+
write(path$17) {
|
|
30069
30069
|
if (this[ENDED$1]) throw new Error("write after end");
|
|
30070
|
-
if (path$
|
|
30071
|
-
else this[ADDFSENTRY](path$
|
|
30070
|
+
if (path$17 instanceof ReadEntry) this[ADDTARENTRY](path$17);
|
|
30071
|
+
else this[ADDFSENTRY](path$17);
|
|
30072
30072
|
return this.flowing;
|
|
30073
30073
|
}
|
|
30074
30074
|
[ADDTARENTRY](p$1) {
|
|
30075
|
-
const absolute = normalizeWindowsPath(path.resolve(this.cwd, p$1.path));
|
|
30075
|
+
const absolute = normalizeWindowsPath(path$1.resolve(this.cwd, p$1.path));
|
|
30076
30076
|
if (!this.filter(p$1.path, p$1)) p$1.resume();
|
|
30077
30077
|
else {
|
|
30078
30078
|
const job = new PackJob(p$1.path, absolute);
|
|
@@ -30084,7 +30084,7 @@ var Pack = class extends Minipass {
|
|
|
30084
30084
|
this[PROCESS]();
|
|
30085
30085
|
}
|
|
30086
30086
|
[ADDFSENTRY](p$1) {
|
|
30087
|
-
const absolute = normalizeWindowsPath(path.resolve(this.cwd, p$1));
|
|
30087
|
+
const absolute = normalizeWindowsPath(path$1.resolve(this.cwd, p$1));
|
|
30088
30088
|
this[QUEUE].push(new PackJob(p$1, absolute));
|
|
30089
30089
|
this[PROCESS]();
|
|
30090
30090
|
}
|
|
@@ -30285,7 +30285,7 @@ const createFile = (opt, files) => {
|
|
|
30285
30285
|
const addFilesSync$1 = (p$1, files) => {
|
|
30286
30286
|
files.forEach((file) => {
|
|
30287
30287
|
if (file.charAt(0) === "@") list({
|
|
30288
|
-
file:
|
|
30288
|
+
file: path.resolve(p$1.cwd, file.slice(1)),
|
|
30289
30289
|
sync: true,
|
|
30290
30290
|
noResume: true,
|
|
30291
30291
|
onReadEntry: (entry) => p$1.add(entry)
|
|
@@ -30298,7 +30298,7 @@ const addFilesAsync$1 = async (p$1, files) => {
|
|
|
30298
30298
|
for (let i$1 = 0; i$1 < files.length; i$1++) {
|
|
30299
30299
|
const file = String(files[i$1]);
|
|
30300
30300
|
if (file.charAt(0) === "@") await list({
|
|
30301
|
-
file:
|
|
30301
|
+
file: path.resolve(String(p$1.cwd), file.slice(1)),
|
|
30302
30302
|
noResume: true,
|
|
30303
30303
|
onReadEntry: (entry) => {
|
|
30304
30304
|
p$1.add(entry);
|
|
@@ -30318,7 +30318,7 @@ const createAsync = (opt, files) => {
|
|
|
30318
30318
|
addFilesAsync$1(p$1, files);
|
|
30319
30319
|
return p$1;
|
|
30320
30320
|
};
|
|
30321
|
-
const create
|
|
30321
|
+
const create = makeCommand(createFileSync, createFile, createSync, createAsync, (_opt, files) => {
|
|
30322
30322
|
if (!files?.length) throw new TypeError("no paths specified to add to archive");
|
|
30323
30323
|
});
|
|
30324
30324
|
|
|
@@ -30336,9 +30336,9 @@ const getWriteFlag = !fMapEnabled ? () => "w" : (size) => size < fMapLimit ? fMa
|
|
|
30336
30336
|
|
|
30337
30337
|
//#endregion
|
|
30338
30338
|
//#region node_modules/chownr/dist/esm/index.js
|
|
30339
|
-
const lchownSync = (path$
|
|
30339
|
+
const lchownSync = (path$17, uid, gid) => {
|
|
30340
30340
|
try {
|
|
30341
|
-
return fs.lchownSync(path$
|
|
30341
|
+
return fs.lchownSync(path$17, uid, gid);
|
|
30342
30342
|
} catch (er) {
|
|
30343
30343
|
if (er?.code !== "ENOENT") throw er;
|
|
30344
30344
|
}
|
|
@@ -30349,11 +30349,11 @@ const chown = (cpath, uid, gid, cb) => {
|
|
|
30349
30349
|
});
|
|
30350
30350
|
};
|
|
30351
30351
|
const chownrKid = (p$1, child, uid, gid, cb) => {
|
|
30352
|
-
if (child.isDirectory()) chownr(
|
|
30352
|
+
if (child.isDirectory()) chownr(path.resolve(p$1, child.name), uid, gid, (er) => {
|
|
30353
30353
|
if (er) return cb(er);
|
|
30354
|
-
chown(
|
|
30354
|
+
chown(path.resolve(p$1, child.name), uid, gid, cb);
|
|
30355
30355
|
});
|
|
30356
|
-
else chown(
|
|
30356
|
+
else chown(path.resolve(p$1, child.name), uid, gid, cb);
|
|
30357
30357
|
};
|
|
30358
30358
|
const chownr = (p$1, uid, gid, cb) => {
|
|
30359
30359
|
fs.readdir(p$1, { withFileTypes: true }, (er, children) => {
|
|
@@ -30375,8 +30375,8 @@ const chownr = (p$1, uid, gid, cb) => {
|
|
|
30375
30375
|
});
|
|
30376
30376
|
};
|
|
30377
30377
|
const chownrKidSync = (p$1, child, uid, gid) => {
|
|
30378
|
-
if (child.isDirectory()) chownrSync(
|
|
30379
|
-
lchownSync(
|
|
30378
|
+
if (child.isDirectory()) chownrSync(path.resolve(p$1, child.name), uid, gid);
|
|
30379
|
+
lchownSync(path.resolve(p$1, child.name), uid, gid);
|
|
30380
30380
|
};
|
|
30381
30381
|
const chownrSync = (p$1, uid, gid) => {
|
|
30382
30382
|
let children;
|
|
@@ -30398,9 +30398,9 @@ var CwdError = class extends Error {
|
|
|
30398
30398
|
path;
|
|
30399
30399
|
code;
|
|
30400
30400
|
syscall = "chdir";
|
|
30401
|
-
constructor(path$
|
|
30402
|
-
super(`${code$1}: Cannot cd into '${path$
|
|
30403
|
-
this.path = path$
|
|
30401
|
+
constructor(path$17, code$1) {
|
|
30402
|
+
super(`${code$1}: Cannot cd into '${path$17}'`);
|
|
30403
|
+
this.path = path$17;
|
|
30404
30404
|
this.code = code$1;
|
|
30405
30405
|
}
|
|
30406
30406
|
get name() {
|
|
@@ -30415,10 +30415,10 @@ var SymlinkError = class extends Error {
|
|
|
30415
30415
|
symlink;
|
|
30416
30416
|
syscall = "symlink";
|
|
30417
30417
|
code = "TAR_SYMLINK_ERROR";
|
|
30418
|
-
constructor(symlink, path$
|
|
30418
|
+
constructor(symlink, path$17) {
|
|
30419
30419
|
super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link");
|
|
30420
30420
|
this.symlink = symlink;
|
|
30421
|
-
this.path = path$
|
|
30421
|
+
this.path = path$17;
|
|
30422
30422
|
}
|
|
30423
30423
|
get name() {
|
|
30424
30424
|
return "SymlinkError";
|
|
@@ -30464,12 +30464,12 @@ const mkdir$1 = (dir, opt, cb) => {
|
|
|
30464
30464
|
mode,
|
|
30465
30465
|
recursive: true
|
|
30466
30466
|
}).then((made) => done(null, made ?? void 0), done);
|
|
30467
|
-
mkdir_(cwd, normalizeWindowsPath(
|
|
30467
|
+
mkdir_(cwd, normalizeWindowsPath(path.relative(cwd, dir)).split("/"), mode, unlink$1, cwd, void 0, done);
|
|
30468
30468
|
};
|
|
30469
30469
|
const mkdir_ = (base, parts, mode, unlink$1, cwd, created, cb) => {
|
|
30470
30470
|
if (!parts.length) return cb(null, created);
|
|
30471
30471
|
const p$1 = parts.shift();
|
|
30472
|
-
const part = normalizeWindowsPath(
|
|
30472
|
+
const part = normalizeWindowsPath(path.resolve(base + "/" + p$1));
|
|
30473
30473
|
fs.mkdir(part, mode, onmkdir(part, parts, mode, unlink$1, cwd, created, cb));
|
|
30474
30474
|
};
|
|
30475
30475
|
const onmkdir = (part, parts, mode, unlink$1, cwd, created, cb) => (er) => {
|
|
@@ -30525,10 +30525,10 @@ const mkdirSync = (dir, opt) => {
|
|
|
30525
30525
|
mode,
|
|
30526
30526
|
recursive: true
|
|
30527
30527
|
}) ?? void 0);
|
|
30528
|
-
const parts = normalizeWindowsPath(
|
|
30528
|
+
const parts = normalizeWindowsPath(path.relative(cwd, dir)).split("/");
|
|
30529
30529
|
let created = void 0;
|
|
30530
30530
|
for (let p$1 = parts.shift(), part = cwd; p$1 && (part += "/" + p$1); p$1 = parts.shift()) {
|
|
30531
|
-
part = normalizeWindowsPath(
|
|
30531
|
+
part = normalizeWindowsPath(path.resolve(part));
|
|
30532
30532
|
try {
|
|
30533
30533
|
fs.mkdirSync(part, mode);
|
|
30534
30534
|
created = created || part;
|
|
@@ -30568,11 +30568,11 @@ const normalizeUnicode = (s) => {
|
|
|
30568
30568
|
//#endregion
|
|
30569
30569
|
//#region node_modules/tar/dist/esm/path-reservations.js
|
|
30570
30570
|
const isWindows$1 = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
30571
|
-
const getDirs = (path$
|
|
30572
|
-
return path$
|
|
30571
|
+
const getDirs = (path$17) => {
|
|
30572
|
+
return path$17.split("/").slice(0, -1).reduce((set, path$18) => {
|
|
30573
30573
|
const s = set[set.length - 1];
|
|
30574
|
-
if (s !== void 0) path$
|
|
30575
|
-
set.push(path$
|
|
30574
|
+
if (s !== void 0) path$18 = join(s, path$18);
|
|
30575
|
+
set.push(path$18 || "/");
|
|
30576
30576
|
return set;
|
|
30577
30577
|
}, []);
|
|
30578
30578
|
};
|
|
@@ -30584,7 +30584,7 @@ var PathReservations = class {
|
|
|
30584
30584
|
paths = isWindows$1 ? ["win32 parallelization disabled"] : paths.map((p$1) => {
|
|
30585
30585
|
return stripTrailingSlashes(join(normalizeUnicode(p$1))).toLowerCase();
|
|
30586
30586
|
});
|
|
30587
|
-
const dirs = new Set(paths.map((path$
|
|
30587
|
+
const dirs = new Set(paths.map((path$17) => getDirs(path$17)).reduce((a$1, b$2) => a$1.concat(b$2)));
|
|
30588
30588
|
this.#reservations.set(fn, {
|
|
30589
30589
|
dirs,
|
|
30590
30590
|
paths
|
|
@@ -30611,8 +30611,8 @@ var PathReservations = class {
|
|
|
30611
30611
|
if (!res) throw new Error("function does not have any path reservations");
|
|
30612
30612
|
/* c8 ignore stop */
|
|
30613
30613
|
return {
|
|
30614
|
-
paths: res.paths.map((path$
|
|
30615
|
-
dirs: [...res.dirs].map((path$
|
|
30614
|
+
paths: res.paths.map((path$17) => this.#queues.get(path$17)),
|
|
30615
|
+
dirs: [...res.dirs].map((path$17) => this.#queues.get(path$17))
|
|
30616
30616
|
};
|
|
30617
30617
|
}
|
|
30618
30618
|
check(fn) {
|
|
@@ -30633,14 +30633,14 @@ var PathReservations = class {
|
|
|
30633
30633
|
/* c8 ignore stop */
|
|
30634
30634
|
const { paths, dirs } = res;
|
|
30635
30635
|
const next = /* @__PURE__ */ new Set();
|
|
30636
|
-
for (const path$
|
|
30637
|
-
const q$2 = this.#queues.get(path$
|
|
30636
|
+
for (const path$17 of paths) {
|
|
30637
|
+
const q$2 = this.#queues.get(path$17);
|
|
30638
30638
|
/* c8 ignore start */
|
|
30639
30639
|
if (!q$2 || q$2?.[0] !== fn) continue;
|
|
30640
30640
|
/* c8 ignore stop */
|
|
30641
30641
|
const q0 = q$2[1];
|
|
30642
30642
|
if (!q0) {
|
|
30643
|
-
this.#queues.delete(path$
|
|
30643
|
+
this.#queues.delete(path$17);
|
|
30644
30644
|
continue;
|
|
30645
30645
|
}
|
|
30646
30646
|
q$2.shift();
|
|
@@ -30696,20 +30696,20 @@ const CHECKED_CWD = Symbol("checkedCwd");
|
|
|
30696
30696
|
const isWindows = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
30697
30697
|
const DEFAULT_MAX_DEPTH = 1024;
|
|
30698
30698
|
/* c8 ignore start */
|
|
30699
|
-
const unlinkFile = (path$
|
|
30700
|
-
if (!isWindows) return fs.unlink(path$
|
|
30701
|
-
const name$1 = path$
|
|
30702
|
-
fs.rename(path$
|
|
30699
|
+
const unlinkFile = (path$17, cb) => {
|
|
30700
|
+
if (!isWindows) return fs.unlink(path$17, cb);
|
|
30701
|
+
const name$1 = path$17 + ".DELETE." + randomBytes(16).toString("hex");
|
|
30702
|
+
fs.rename(path$17, name$1, (er) => {
|
|
30703
30703
|
if (er) return cb(er);
|
|
30704
30704
|
fs.unlink(name$1, cb);
|
|
30705
30705
|
});
|
|
30706
30706
|
};
|
|
30707
30707
|
/* c8 ignore stop */
|
|
30708
30708
|
/* c8 ignore start */
|
|
30709
|
-
const unlinkFileSync = (path$
|
|
30710
|
-
if (!isWindows) return fs.unlinkSync(path$
|
|
30711
|
-
const name$1 = path$
|
|
30712
|
-
fs.renameSync(path$
|
|
30709
|
+
const unlinkFileSync = (path$17) => {
|
|
30710
|
+
if (!isWindows) return fs.unlinkSync(path$17);
|
|
30711
|
+
const name$1 = path$17 + ".DELETE." + randomBytes(16).toString("hex");
|
|
30712
|
+
fs.renameSync(path$17, name$1);
|
|
30713
30713
|
fs.unlinkSync(name$1);
|
|
30714
30714
|
};
|
|
30715
30715
|
/* c8 ignore stop */
|
|
@@ -30774,7 +30774,7 @@ var Unpack = class extends Parser {
|
|
|
30774
30774
|
this.noMtime = !!opt.noMtime;
|
|
30775
30775
|
this.preservePaths = !!opt.preservePaths;
|
|
30776
30776
|
this.unlink = !!opt.unlink;
|
|
30777
|
-
this.cwd = normalizeWindowsPath(
|
|
30777
|
+
this.cwd = normalizeWindowsPath(path.resolve(opt.cwd || process.cwd()));
|
|
30778
30778
|
this.strip = Number(opt.strip) || 0;
|
|
30779
30779
|
this.processUmask = !this.chmod ? 0 : typeof opt.processUmask === "number" ? opt.processUmask : process.umask();
|
|
30780
30780
|
this.umask = typeof opt.umask === "number" ? opt.umask : this.processUmask;
|
|
@@ -30832,8 +30832,8 @@ var Unpack = class extends Parser {
|
|
|
30832
30832
|
});
|
|
30833
30833
|
}
|
|
30834
30834
|
}
|
|
30835
|
-
if (
|
|
30836
|
-
else entry.absolute = normalizeWindowsPath(
|
|
30835
|
+
if (path.isAbsolute(entry.path)) entry.absolute = normalizeWindowsPath(path.resolve(entry.path));
|
|
30836
|
+
else entry.absolute = normalizeWindowsPath(path.resolve(this.cwd, entry.path));
|
|
30837
30837
|
/* c8 ignore start - defense in depth */
|
|
30838
30838
|
if (!this.preservePaths && typeof entry.absolute === "string" && entry.absolute.indexOf(this.cwd + "/") !== 0 && entry.absolute !== this.cwd) {
|
|
30839
30839
|
this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", {
|
|
@@ -30847,9 +30847,9 @@ var Unpack = class extends Parser {
|
|
|
30847
30847
|
/* c8 ignore stop */
|
|
30848
30848
|
if (entry.absolute === this.cwd && entry.type !== "Directory" && entry.type !== "GNUDumpDir") return false;
|
|
30849
30849
|
if (this.win32) {
|
|
30850
|
-
const { root: aRoot } =
|
|
30850
|
+
const { root: aRoot } = path.win32.parse(String(entry.absolute));
|
|
30851
30851
|
entry.absolute = aRoot + encode(String(entry.absolute).slice(aRoot.length));
|
|
30852
|
-
const { root: pRoot } =
|
|
30852
|
+
const { root: pRoot } = path.win32.parse(entry.path);
|
|
30853
30853
|
entry.path = pRoot + encode(entry.path.slice(pRoot.length));
|
|
30854
30854
|
}
|
|
30855
30855
|
return true;
|
|
@@ -30995,7 +30995,7 @@ var Unpack = class extends Parser {
|
|
|
30995
30995
|
this[LINK](entry, String(entry.linkpath), "symlink", done);
|
|
30996
30996
|
}
|
|
30997
30997
|
[HARDLINK](entry, done) {
|
|
30998
|
-
const linkpath = normalizeWindowsPath(
|
|
30998
|
+
const linkpath = normalizeWindowsPath(path.resolve(this.cwd, String(entry.linkpath)));
|
|
30999
30999
|
this[LINK](entry, linkpath, "link", done);
|
|
31000
31000
|
}
|
|
31001
31001
|
[PEND]() {
|
|
@@ -31035,7 +31035,7 @@ var Unpack = class extends Parser {
|
|
|
31035
31035
|
};
|
|
31036
31036
|
const start = () => {
|
|
31037
31037
|
if (entry.absolute !== this.cwd) {
|
|
31038
|
-
const parent = normalizeWindowsPath(
|
|
31038
|
+
const parent = normalizeWindowsPath(path.dirname(String(entry.absolute)));
|
|
31039
31039
|
if (parent !== this.cwd) return this[MKDIR](parent, this.dmode, (er) => {
|
|
31040
31040
|
if (er) {
|
|
31041
31041
|
this[ONERROR](er, entry);
|
|
@@ -31117,7 +31117,7 @@ var UnpackSync = class extends Unpack {
|
|
|
31117
31117
|
this[CHECKED_CWD] = true;
|
|
31118
31118
|
}
|
|
31119
31119
|
if (entry.absolute !== this.cwd) {
|
|
31120
|
-
const parent = normalizeWindowsPath(
|
|
31120
|
+
const parent = normalizeWindowsPath(path.dirname(String(entry.absolute)));
|
|
31121
31121
|
if (parent !== this.cwd) {
|
|
31122
31122
|
const mkParent = this[MKDIR](parent, this.dmode);
|
|
31123
31123
|
if (mkParent) return this[ONERROR](mkParent, entry);
|
|
@@ -31389,7 +31389,7 @@ const replaceAsync = (opt, files) => {
|
|
|
31389
31389
|
const addFilesSync = (p$1, files) => {
|
|
31390
31390
|
files.forEach((file) => {
|
|
31391
31391
|
if (file.charAt(0) === "@") list({
|
|
31392
|
-
file:
|
|
31392
|
+
file: path.resolve(p$1.cwd, file.slice(1)),
|
|
31393
31393
|
sync: true,
|
|
31394
31394
|
noResume: true,
|
|
31395
31395
|
onReadEntry: (entry) => p$1.add(entry)
|
|
@@ -31402,7 +31402,7 @@ const addFilesAsync = async (p$1, files) => {
|
|
|
31402
31402
|
for (let i$1 = 0; i$1 < files.length; i$1++) {
|
|
31403
31403
|
const file = String(files[i$1]);
|
|
31404
31404
|
if (file.charAt(0) === "@") await list({
|
|
31405
|
-
file:
|
|
31405
|
+
file: path.resolve(String(p$1.cwd), file.slice(1)),
|
|
31406
31406
|
noResume: true,
|
|
31407
31407
|
onReadEntry: (entry) => p$1.add(entry)
|
|
31408
31408
|
});
|
|
@@ -31437,7 +31437,7 @@ const update = makeCommand(replace.syncFile, replace.asyncFile, replace.syncNoFi
|
|
|
31437
31437
|
const mtimeFilter = (opt) => {
|
|
31438
31438
|
const filter = opt.filter;
|
|
31439
31439
|
if (!opt.mtimeCache) opt.mtimeCache = /* @__PURE__ */ new Map();
|
|
31440
|
-
opt.filter = filter ? (path$
|
|
31440
|
+
opt.filter = filter ? (path$17, stat) => filter(path$17, stat) && !((opt.mtimeCache?.get(path$17) ?? stat.mtime ?? 0) > (stat.mtime ?? 0)) : (path$17, stat) => !((opt.mtimeCache?.get(path$17) ?? stat.mtime ?? 0) > (stat.mtime ?? 0));
|
|
31441
31441
|
};
|
|
31442
31442
|
|
|
31443
31443
|
//#endregion
|
|
@@ -31454,7 +31454,7 @@ async function deploySite(siteOutputDir) {
|
|
|
31454
31454
|
}
|
|
31455
31455
|
}
|
|
31456
31456
|
async function createArchive(pathToArchive, targetArchivePath) {
|
|
31457
|
-
await create
|
|
31457
|
+
await create({
|
|
31458
31458
|
gzip: true,
|
|
31459
31459
|
file: targetArchivePath,
|
|
31460
31460
|
cwd: pathToArchive
|
|
@@ -32275,28 +32275,28 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32275
32275
|
module.exports = isexe;
|
|
32276
32276
|
isexe.sync = sync;
|
|
32277
32277
|
var fs$4 = __require("fs");
|
|
32278
|
-
function checkPathExt(path$
|
|
32278
|
+
function checkPathExt(path$17, options) {
|
|
32279
32279
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
32280
32280
|
if (!pathext) return true;
|
|
32281
32281
|
pathext = pathext.split(";");
|
|
32282
32282
|
if (pathext.indexOf("") !== -1) return true;
|
|
32283
32283
|
for (var i$1 = 0; i$1 < pathext.length; i$1++) {
|
|
32284
32284
|
var p$1 = pathext[i$1].toLowerCase();
|
|
32285
|
-
if (p$1 && path$
|
|
32285
|
+
if (p$1 && path$17.substr(-p$1.length).toLowerCase() === p$1) return true;
|
|
32286
32286
|
}
|
|
32287
32287
|
return false;
|
|
32288
32288
|
}
|
|
32289
|
-
function checkStat(stat, path$
|
|
32289
|
+
function checkStat(stat, path$17, options) {
|
|
32290
32290
|
if (!stat.isSymbolicLink() && !stat.isFile()) return false;
|
|
32291
|
-
return checkPathExt(path$
|
|
32291
|
+
return checkPathExt(path$17, options);
|
|
32292
32292
|
}
|
|
32293
|
-
function isexe(path$
|
|
32294
|
-
fs$4.stat(path$
|
|
32295
|
-
cb(er, er ? false : checkStat(stat, path$
|
|
32293
|
+
function isexe(path$17, options, cb) {
|
|
32294
|
+
fs$4.stat(path$17, function(er, stat) {
|
|
32295
|
+
cb(er, er ? false : checkStat(stat, path$17, options));
|
|
32296
32296
|
});
|
|
32297
32297
|
}
|
|
32298
|
-
function sync(path$
|
|
32299
|
-
return checkStat(fs$4.statSync(path$
|
|
32298
|
+
function sync(path$17, options) {
|
|
32299
|
+
return checkStat(fs$4.statSync(path$17), path$17, options);
|
|
32300
32300
|
}
|
|
32301
32301
|
}));
|
|
32302
32302
|
|
|
@@ -32306,13 +32306,13 @@ var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32306
32306
|
module.exports = isexe;
|
|
32307
32307
|
isexe.sync = sync;
|
|
32308
32308
|
var fs$3 = __require("fs");
|
|
32309
|
-
function isexe(path$
|
|
32310
|
-
fs$3.stat(path$
|
|
32309
|
+
function isexe(path$17, options, cb) {
|
|
32310
|
+
fs$3.stat(path$17, function(er, stat) {
|
|
32311
32311
|
cb(er, er ? false : checkStat(stat, options));
|
|
32312
32312
|
});
|
|
32313
32313
|
}
|
|
32314
|
-
function sync(path$
|
|
32315
|
-
return checkStat(fs$3.statSync(path$
|
|
32314
|
+
function sync(path$17, options) {
|
|
32315
|
+
return checkStat(fs$3.statSync(path$17), options);
|
|
32316
32316
|
}
|
|
32317
32317
|
function checkStat(stat, options) {
|
|
32318
32318
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -32340,7 +32340,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32340
32340
|
else core = require_mode();
|
|
32341
32341
|
module.exports = isexe;
|
|
32342
32342
|
isexe.sync = sync;
|
|
32343
|
-
function isexe(path$
|
|
32343
|
+
function isexe(path$17, options, cb) {
|
|
32344
32344
|
if (typeof options === "function") {
|
|
32345
32345
|
cb = options;
|
|
32346
32346
|
options = {};
|
|
@@ -32348,13 +32348,13 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32348
32348
|
if (!cb) {
|
|
32349
32349
|
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
32350
32350
|
return new Promise(function(resolve$1, reject) {
|
|
32351
|
-
isexe(path$
|
|
32351
|
+
isexe(path$17, options || {}, function(er, is) {
|
|
32352
32352
|
if (er) reject(er);
|
|
32353
32353
|
else resolve$1(is);
|
|
32354
32354
|
});
|
|
32355
32355
|
});
|
|
32356
32356
|
}
|
|
32357
|
-
core(path$
|
|
32357
|
+
core(path$17, options || {}, function(er, is) {
|
|
32358
32358
|
if (er) {
|
|
32359
32359
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
32360
32360
|
er = null;
|
|
@@ -32364,9 +32364,9 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32364
32364
|
cb(er, is);
|
|
32365
32365
|
});
|
|
32366
32366
|
}
|
|
32367
|
-
function sync(path$
|
|
32367
|
+
function sync(path$17, options) {
|
|
32368
32368
|
try {
|
|
32369
|
-
return core.sync(path$
|
|
32369
|
+
return core.sync(path$17, options || {});
|
|
32370
32370
|
} catch (er) {
|
|
32371
32371
|
if (options && options.ignoreErrors || er.code === "EACCES") return false;
|
|
32372
32372
|
else throw er;
|
|
@@ -32378,7 +32378,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32378
32378
|
//#region node_modules/which/which.js
|
|
32379
32379
|
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32380
32380
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
32381
|
-
const path$
|
|
32381
|
+
const path$4 = __require("path");
|
|
32382
32382
|
const COLON = isWindows ? ";" : ":";
|
|
32383
32383
|
const isexe = require_isexe();
|
|
32384
32384
|
const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -32408,7 +32408,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32408
32408
|
if (i$1 === pathEnv.length) return opt.all && found.length ? resolve$1(found) : reject(getNotFoundError(cmd));
|
|
32409
32409
|
const ppRaw = pathEnv[i$1];
|
|
32410
32410
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
32411
|
-
const pCmd = path$
|
|
32411
|
+
const pCmd = path$4.join(pathPart, cmd);
|
|
32412
32412
|
resolve$1(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i$1, 0));
|
|
32413
32413
|
});
|
|
32414
32414
|
const subStep = (p$1, i$1, ii) => new Promise((resolve$1, reject) => {
|
|
@@ -32429,7 +32429,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32429
32429
|
for (let i$1 = 0; i$1 < pathEnv.length; i$1++) {
|
|
32430
32430
|
const ppRaw = pathEnv[i$1];
|
|
32431
32431
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
32432
|
-
const pCmd = path$
|
|
32432
|
+
const pCmd = path$4.join(pathPart, cmd);
|
|
32433
32433
|
const p$1 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
32434
32434
|
for (let j = 0; j < pathExt.length; j++) {
|
|
32435
32435
|
const cur = p$1 + pathExt[j];
|
|
@@ -32462,7 +32462,7 @@ var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32462
32462
|
//#endregion
|
|
32463
32463
|
//#region node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
32464
32464
|
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32465
|
-
const path$
|
|
32465
|
+
const path$3 = __require("path");
|
|
32466
32466
|
const which = require_which();
|
|
32467
32467
|
const getPathKey = require_path_key();
|
|
32468
32468
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -32477,12 +32477,12 @@ var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
32477
32477
|
try {
|
|
32478
32478
|
resolved = which.sync(parsed.command, {
|
|
32479
32479
|
path: env$1[getPathKey({ env: env$1 })],
|
|
32480
|
-
pathExt: withoutPathExt ? path$
|
|
32480
|
+
pathExt: withoutPathExt ? path$3.delimiter : void 0
|
|
32481
32481
|
});
|
|
32482
32482
|
} catch (e$1) {} finally {
|
|
32483
32483
|
if (shouldSwitchCwd) process.chdir(cwd);
|
|
32484
32484
|
}
|
|
32485
|
-
if (resolved) resolved = path$
|
|
32485
|
+
if (resolved) resolved = path$3.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
32486
32486
|
return resolved;
|
|
32487
32487
|
}
|
|
32488
32488
|
function resolveCommand(parsed) {
|
|
@@ -32525,8 +32525,8 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
32525
32525
|
module.exports = (string$2 = "") => {
|
|
32526
32526
|
const match = string$2.match(shebangRegex);
|
|
32527
32527
|
if (!match) return null;
|
|
32528
|
-
const [path$
|
|
32529
|
-
const binary = path$
|
|
32528
|
+
const [path$17, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
32529
|
+
const binary = path$17.split("/").pop();
|
|
32530
32530
|
if (binary === "env") return argument;
|
|
32531
32531
|
return argument ? `${binary} ${argument}` : binary;
|
|
32532
32532
|
};
|
|
@@ -32554,7 +32554,7 @@ var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32554
32554
|
//#endregion
|
|
32555
32555
|
//#region node_modules/cross-spawn/lib/parse.js
|
|
32556
32556
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32557
|
-
const path$
|
|
32557
|
+
const path$2 = __require("path");
|
|
32558
32558
|
const resolveCommand = require_resolveCommand();
|
|
32559
32559
|
const escape = require_escape();
|
|
32560
32560
|
const readShebang = require_readShebang();
|
|
@@ -32577,7 +32577,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32577
32577
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
32578
32578
|
if (parsed.options.forceShell || needsShell) {
|
|
32579
32579
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
32580
|
-
parsed.command = path$
|
|
32580
|
+
parsed.command = path$2.normalize(parsed.command);
|
|
32581
32581
|
parsed.command = escape.command(parsed.command);
|
|
32582
32582
|
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
32583
32583
|
parsed.args = [
|
|
@@ -32695,12 +32695,12 @@ function toPath(urlOrPath) {
|
|
|
32695
32695
|
}
|
|
32696
32696
|
function traversePathUp(startPath) {
|
|
32697
32697
|
return { *[Symbol.iterator]() {
|
|
32698
|
-
let currentPath =
|
|
32698
|
+
let currentPath = path.resolve(toPath(startPath));
|
|
32699
32699
|
let previousPath;
|
|
32700
32700
|
while (previousPath !== currentPath) {
|
|
32701
32701
|
yield currentPath;
|
|
32702
32702
|
previousPath = currentPath;
|
|
32703
|
-
currentPath =
|
|
32703
|
+
currentPath = path.resolve(currentPath, "..");
|
|
32704
32704
|
}
|
|
32705
32705
|
} };
|
|
32706
32706
|
}
|
|
@@ -32709,21 +32709,21 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
32709
32709
|
//#endregion
|
|
32710
32710
|
//#region node_modules/npm-run-path/index.js
|
|
32711
32711
|
const npmRunPath = ({ cwd = y.cwd(), path: pathOption = y.env[pathKey()], preferLocal = true, execPath: execPath$1 = y.execPath, addExecPath = true } = {}) => {
|
|
32712
|
-
const cwdPath =
|
|
32712
|
+
const cwdPath = path.resolve(toPath(cwd));
|
|
32713
32713
|
const result = [];
|
|
32714
|
-
const pathParts = pathOption.split(
|
|
32714
|
+
const pathParts = pathOption.split(path.delimiter);
|
|
32715
32715
|
if (preferLocal) applyPreferLocal(result, pathParts, cwdPath);
|
|
32716
32716
|
if (addExecPath) applyExecPath(result, pathParts, execPath$1, cwdPath);
|
|
32717
|
-
return pathOption === "" || pathOption ===
|
|
32717
|
+
return pathOption === "" || pathOption === path.delimiter ? `${result.join(path.delimiter)}${pathOption}` : [...result, pathOption].join(path.delimiter);
|
|
32718
32718
|
};
|
|
32719
32719
|
const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
32720
32720
|
for (const directory of traversePathUp(cwdPath)) {
|
|
32721
|
-
const pathPart =
|
|
32721
|
+
const pathPart = path.join(directory, "node_modules/.bin");
|
|
32722
32722
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
32723
32723
|
}
|
|
32724
32724
|
};
|
|
32725
32725
|
const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
|
|
32726
|
-
const pathPart =
|
|
32726
|
+
const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
|
|
32727
32727
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
32728
32728
|
};
|
|
32729
32729
|
const npmRunPathEnv = ({ env: env$1 = y.env, ...options } = {}) => {
|
|
@@ -33755,10 +33755,10 @@ const mapNode = ({ options }) => {
|
|
|
33755
33755
|
node: true
|
|
33756
33756
|
} };
|
|
33757
33757
|
};
|
|
33758
|
-
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath
|
|
33758
|
+
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = execPath, nodeOptions = execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath, ...options }) => {
|
|
33759
33759
|
if (formerNodePath !== void 0) throw new TypeError("The \"execPath\" option has been removed. Please use the \"nodePath\" option instead.");
|
|
33760
|
-
const normalizedNodePath = safeNormalizeFileUrl(nodePath
|
|
33761
|
-
const resolvedNodePath =
|
|
33760
|
+
const normalizedNodePath = safeNormalizeFileUrl(nodePath, "The \"nodePath\" option");
|
|
33761
|
+
const resolvedNodePath = path.resolve(cwd, normalizedNodePath);
|
|
33762
33762
|
const newOptions = {
|
|
33763
33763
|
...options,
|
|
33764
33764
|
nodePath: resolvedNodePath,
|
|
@@ -33770,7 +33770,7 @@ const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = fal
|
|
|
33770
33770
|
commandArguments,
|
|
33771
33771
|
newOptions
|
|
33772
33772
|
];
|
|
33773
|
-
if (
|
|
33773
|
+
if (path.basename(file, ".exe") === "node") throw new TypeError("When the \"node\" option is true, the first argument does not need to be \"node\".");
|
|
33774
33774
|
return [
|
|
33775
33775
|
resolvedNodePath,
|
|
33776
33776
|
[
|
|
@@ -33857,7 +33857,7 @@ const serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encod
|
|
|
33857
33857
|
//#region node_modules/execa/lib/arguments/cwd.js
|
|
33858
33858
|
const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
33859
33859
|
const cwdString = safeNormalizeFileUrl(cwd, "The \"cwd\" option");
|
|
33860
|
-
return
|
|
33860
|
+
return path.resolve(cwdString);
|
|
33861
33861
|
};
|
|
33862
33862
|
const getDefaultCwd = () => {
|
|
33863
33863
|
try {
|
|
@@ -33896,7 +33896,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
33896
33896
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
33897
33897
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
33898
33898
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
33899
|
-
if (y.platform === "win32" &&
|
|
33899
|
+
if (y.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
33900
33900
|
return {
|
|
33901
33901
|
file,
|
|
33902
33902
|
commandArguments,
|
|
@@ -33921,7 +33921,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
33921
33921
|
ipc,
|
|
33922
33922
|
serialization
|
|
33923
33923
|
});
|
|
33924
|
-
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath
|
|
33924
|
+
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
33925
33925
|
const env$1 = extendEnv ? {
|
|
33926
33926
|
...y.env,
|
|
33927
33927
|
...envOption
|
|
@@ -33929,7 +33929,7 @@ const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory,
|
|
|
33929
33929
|
if (preferLocal || node) return npmRunPathEnv({
|
|
33930
33930
|
env: env$1,
|
|
33931
33931
|
cwd: localDirectory,
|
|
33932
|
-
execPath: nodePath
|
|
33932
|
+
execPath: nodePath,
|
|
33933
33933
|
preferLocal,
|
|
33934
33934
|
addExecPath: node
|
|
33935
33935
|
});
|
|
@@ -35674,12 +35674,12 @@ const logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encodin
|
|
|
35674
35674
|
}
|
|
35675
35675
|
};
|
|
35676
35676
|
const writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
35677
|
-
for (const { path: path$
|
|
35678
|
-
const pathString = typeof path$
|
|
35679
|
-
if (append || outputFiles.has(pathString)) appendFileSync(path$
|
|
35677
|
+
for (const { path: path$17, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
|
|
35678
|
+
const pathString = typeof path$17 === "string" ? path$17 : path$17.toString();
|
|
35679
|
+
if (append || outputFiles.has(pathString)) appendFileSync(path$17, serializedResult);
|
|
35680
35680
|
else {
|
|
35681
35681
|
outputFiles.add(pathString);
|
|
35682
|
-
writeFileSync(path$
|
|
35682
|
+
writeFileSync(path$17, serializedResult);
|
|
35683
35683
|
}
|
|
35684
35684
|
}
|
|
35685
35685
|
};
|
|
@@ -38152,61 +38152,81 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38152
38152
|
var import_lodash = /* @__PURE__ */ __toESM(require_lodash(), 1);
|
|
38153
38153
|
const orange = source_default.hex("#E86B3C");
|
|
38154
38154
|
const cyan = source_default.hex("#00D4FF");
|
|
38155
|
-
|
|
38156
|
-
|
|
38157
|
-
const
|
|
38155
|
+
const DEFAULT_TEMPLATE_NAME = "backend-only";
|
|
38156
|
+
async function getDefaultTemplate() {
|
|
38157
|
+
const template = (await listTemplates()).find((t) => t.name === DEFAULT_TEMPLATE_NAME);
|
|
38158
|
+
if (!template) throw new Error(`Default template "${DEFAULT_TEMPLATE_NAME}" not found`);
|
|
38159
|
+
return template;
|
|
38160
|
+
}
|
|
38161
|
+
function validateNonInteractiveFlags(command) {
|
|
38162
|
+
const { name: name$1, path: path$17 } = command.opts();
|
|
38163
|
+
const providedCount = [name$1, path$17].filter(Boolean).length;
|
|
38164
|
+
if (providedCount > 0 && providedCount < 2) command.error("Non-interactive mode requires all flags: --name, --path");
|
|
38165
|
+
}
|
|
38166
|
+
async function chooseCreate(options) {
|
|
38167
|
+
if (!!(options.name && options.path)) await runCommand(() => createNonInteractive(options), { requireAuth: true });
|
|
38168
|
+
else await runCommand(() => createInteractive(options), {
|
|
38169
|
+
fullBanner: true,
|
|
38170
|
+
requireAuth: true
|
|
38171
|
+
});
|
|
38172
|
+
}
|
|
38173
|
+
async function createInteractive(options) {
|
|
38174
|
+
const templateOptions = (await listTemplates()).map((t) => ({
|
|
38158
38175
|
value: t,
|
|
38159
38176
|
label: t.name,
|
|
38160
38177
|
hint: t.description
|
|
38161
38178
|
}));
|
|
38162
|
-
|
|
38163
|
-
|
|
38164
|
-
|
|
38165
|
-
|
|
38166
|
-
|
|
38167
|
-
|
|
38168
|
-
|
|
38169
|
-
|
|
38170
|
-
|
|
38171
|
-
|
|
38172
|
-
description = options.description;
|
|
38173
|
-
projectPath = options.path || `./${(0, import_lodash.default)(options.name)}`;
|
|
38174
|
-
} else {
|
|
38175
|
-
const result = await Ce({
|
|
38176
|
-
template: () => ve({
|
|
38177
|
-
message: "Pick a template",
|
|
38178
|
-
options: templateOptions
|
|
38179
|
-
}),
|
|
38180
|
-
name: () => he({
|
|
38181
|
-
message: "What is the name of your project?",
|
|
38182
|
-
placeholder: "my-app",
|
|
38183
|
-
validate: (value) => {
|
|
38184
|
-
if (!value || value.trim().length === 0) return "Every project deserves a name";
|
|
38185
|
-
}
|
|
38186
|
-
}),
|
|
38187
|
-
description: () => he({
|
|
38188
|
-
message: "Description (optional)",
|
|
38189
|
-
placeholder: "A brief description of your project"
|
|
38190
|
-
}),
|
|
38191
|
-
projectPath: async ({ results }) => {
|
|
38192
|
-
const suggestedPath = `./${(0, import_lodash.default)(results.name)}`;
|
|
38193
|
-
return he({
|
|
38194
|
-
message: "Where should we create the base44 folder?",
|
|
38195
|
-
placeholder: suggestedPath,
|
|
38196
|
-
initialValue: suggestedPath
|
|
38197
|
-
});
|
|
38179
|
+
const result = await Ce({
|
|
38180
|
+
template: () => ve({
|
|
38181
|
+
message: "Pick a template",
|
|
38182
|
+
options: templateOptions
|
|
38183
|
+
}),
|
|
38184
|
+
name: () => he({
|
|
38185
|
+
message: "What is the name of your project?",
|
|
38186
|
+
placeholder: "my-app",
|
|
38187
|
+
validate: (value) => {
|
|
38188
|
+
if (!value || value.trim().length === 0) return "Every project deserves a name";
|
|
38198
38189
|
}
|
|
38199
|
-
},
|
|
38200
|
-
|
|
38201
|
-
|
|
38202
|
-
|
|
38203
|
-
|
|
38204
|
-
|
|
38190
|
+
}),
|
|
38191
|
+
description: () => he({
|
|
38192
|
+
message: "Description (optional)",
|
|
38193
|
+
placeholder: "A brief description of your project"
|
|
38194
|
+
}),
|
|
38195
|
+
projectPath: async ({ results }) => {
|
|
38196
|
+
const suggestedPath = `./${(0, import_lodash.default)(results.name)}`;
|
|
38197
|
+
return he({
|
|
38198
|
+
message: "Where should we create the base44 folder?",
|
|
38199
|
+
placeholder: suggestedPath,
|
|
38200
|
+
initialValue: suggestedPath
|
|
38201
|
+
});
|
|
38202
|
+
}
|
|
38203
|
+
}, { onCancel: onPromptCancel });
|
|
38204
|
+
return await executeCreate({
|
|
38205
|
+
template: result.template,
|
|
38206
|
+
name: result.name,
|
|
38207
|
+
description: result.description || void 0,
|
|
38208
|
+
projectPath: result.projectPath,
|
|
38209
|
+
deploy: options.deploy,
|
|
38210
|
+
isInteractive: true
|
|
38211
|
+
});
|
|
38212
|
+
}
|
|
38213
|
+
async function createNonInteractive(options) {
|
|
38214
|
+
return await executeCreate({
|
|
38215
|
+
template: await getDefaultTemplate(),
|
|
38216
|
+
name: options.name,
|
|
38217
|
+
description: options.description,
|
|
38218
|
+
projectPath: options.path,
|
|
38219
|
+
deploy: options.deploy,
|
|
38220
|
+
isInteractive: false
|
|
38221
|
+
});
|
|
38222
|
+
}
|
|
38223
|
+
async function executeCreate({ template, name: rawName, description, projectPath, deploy, isInteractive }) {
|
|
38224
|
+
const name$1 = rawName.trim();
|
|
38205
38225
|
const resolvedPath = resolve(projectPath);
|
|
38206
38226
|
const { projectId } = await runTask("Setting up your project...", async () => {
|
|
38207
38227
|
return await createProjectFiles({
|
|
38208
|
-
name: name$1
|
|
38209
|
-
description: description
|
|
38228
|
+
name: name$1,
|
|
38229
|
+
description: description?.trim(),
|
|
38210
38230
|
path: resolvedPath,
|
|
38211
38231
|
template
|
|
38212
38232
|
});
|
|
@@ -38219,11 +38239,10 @@ async function create(options) {
|
|
|
38219
38239
|
let finalAppUrl;
|
|
38220
38240
|
if (entities.length > 0) {
|
|
38221
38241
|
let shouldPushEntities;
|
|
38222
|
-
if (
|
|
38223
|
-
else {
|
|
38242
|
+
if (isInteractive) {
|
|
38224
38243
|
const result = await ye({ message: "Would you like to push entities now?" });
|
|
38225
38244
|
shouldPushEntities = !pD(result) && result;
|
|
38226
|
-
}
|
|
38245
|
+
} else shouldPushEntities = !!deploy;
|
|
38227
38246
|
if (shouldPushEntities) await runTask(`Pushing ${entities.length} entities to Base44...`, async () => {
|
|
38228
38247
|
await pushEntities(entities);
|
|
38229
38248
|
}, {
|
|
@@ -38232,15 +38251,12 @@ async function create(options) {
|
|
|
38232
38251
|
});
|
|
38233
38252
|
}
|
|
38234
38253
|
if (project.site) {
|
|
38235
|
-
const installCommand = project.site
|
|
38236
|
-
const buildCommand = project.site.buildCommand;
|
|
38237
|
-
const outputDirectory = project.site.outputDirectory;
|
|
38254
|
+
const { installCommand, buildCommand, outputDirectory } = project.site;
|
|
38238
38255
|
let shouldDeploy;
|
|
38239
|
-
if (
|
|
38240
|
-
else {
|
|
38256
|
+
if (isInteractive) {
|
|
38241
38257
|
const result = await ye({ message: "Would you like to deploy the site now?" });
|
|
38242
38258
|
shouldDeploy = !pD(result) && result;
|
|
38243
|
-
}
|
|
38259
|
+
} else shouldDeploy = !!deploy;
|
|
38244
38260
|
if (shouldDeploy && installCommand && buildCommand && outputDirectory) {
|
|
38245
38261
|
const { appUrl } = await runTask("Installing dependencies...", async (updateMessage) => {
|
|
38246
38262
|
await execa({
|
|
@@ -38262,16 +38278,13 @@ async function create(options) {
|
|
|
38262
38278
|
}
|
|
38263
38279
|
}
|
|
38264
38280
|
const dashboardUrl = `${getBase44ApiUrl()}/apps/${projectId}/editor/preview`;
|
|
38265
|
-
M.message(`${source_default.dim("Project")}: ${orange(name$1
|
|
38281
|
+
M.message(`${source_default.dim("Project")}: ${orange(name$1)}`);
|
|
38266
38282
|
M.message(`${source_default.dim("Dashboard")}: ${cyan(dashboardUrl)}`);
|
|
38267
38283
|
if (finalAppUrl) M.message(`${source_default.dim("Site")}: ${cyan(finalAppUrl)}`);
|
|
38268
38284
|
return { outroMessage: "Your project is set and ready to use" };
|
|
38269
38285
|
}
|
|
38270
|
-
const createCommand = new Command("create").description("Create a new Base44 project").option("-
|
|
38271
|
-
await
|
|
38272
|
-
fullBanner: true,
|
|
38273
|
-
requireAuth: true
|
|
38274
|
-
});
|
|
38286
|
+
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) => {
|
|
38287
|
+
await chooseCreate(options);
|
|
38275
38288
|
});
|
|
38276
38289
|
|
|
38277
38290
|
//#endregion
|