@sanity/cli 3.74.1 → 3.74.2-canary.89
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/lib/_chunks-cjs/cli.js +367 -317
- package/lib/_chunks-cjs/cli.js.map +1 -1
- package/lib/_chunks-cjs/loadEnv.js +15 -73
- package/lib/_chunks-cjs/loadEnv.js.map +1 -1
- package/lib/index.d.mts +12 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.esm.js +12 -70
- package/lib/index.esm.js.map +1 -1
- package/lib/index.mjs +12 -70
- package/lib/index.mjs.map +1 -1
- package/package.json +10 -10
- package/src/actions/init-project/bootstrapLocalTemplate.ts +32 -20
- package/src/actions/init-project/createCliConfig.ts +5 -47
- package/src/actions/init-project/createCoreAppCliConfig.ts +23 -0
- package/src/actions/init-project/createPackageManifest.ts +1 -1
- package/src/actions/init-project/createStudioConfig.ts +4 -27
- package/src/actions/init-project/determineCoreAppTemplate.ts +13 -0
- package/src/actions/init-project/initProject.ts +27 -4
- package/src/actions/init-project/processTemplate.ts +55 -0
- package/src/actions/init-project/templates/coreApp.ts +31 -0
- package/src/actions/init-project/templates/index.ts +2 -0
- package/src/cli.ts +15 -5
- package/src/types.ts +13 -0
- package/src/util/resolveRootDir.ts +9 -8
- package/templates/core-app/src/App.tsx +26 -0
package/lib/_chunks-cjs/cli.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
"use strict";
|
2
|
-
var fs$1 = require("node:fs"), os = require("node:os"), path$3 = require("node:path"), chalk = require("chalk"), loadEnv = require("./loadEnv.js"), require$$0$
|
2
|
+
var fs$1 = require("node:fs"), os = require("node:os"), path$3 = require("node:path"), chalk = require("chalk"), loadEnv = require("./loadEnv.js"), require$$0$5 = require("path"), require$$1$2 = require("module"), require$$0$4 = require("fs"), telemetry = require("@sanity/telemetry"), childProcess = require("node:child_process"), fs = require("node:fs/promises"), util$4 = require("node:util"), require$$0$6 = require("os"), require$$5$1 = require("url"), require$$1$3 = require("get-it"), require$$2$1 = require("get-it/middleware"), require$$0$7 = require("constants"), require$$0$8 = require("stream"), require$$0$9 = require("util"), require$$0$a = require("assert"), require$$0$b = require("events"), require$$6$1 = require("http"), semver = require("semver"), pkgDir = require("pkg-dir"), client$1 = require("@sanity/client"), require$$3$1 = require("crypto"), require$$1$4 = require("child_process"), require$$0$c = require("fs/promises"), require$$0$d = require("buffer"), getCliConfig = require("./getCliConfig.js"), journeyConfig = require("./journeyConfig.js"), Stream = require("node:stream"), promises$1 = require("node:stream/promises"), templateValidator = require("@sanity/template-validator"), require$$2$2 = require("string_decoder"), require$$0$e = require("zlib"), require$$7$1 = require("process"), http = require("node:http"), traverse = require("@babel/traverse"), node_url = require("node:url"), node_events = require("node:events"), node_string_decoder = require("node:string_decoder"), process$2 = require("node:process"), require$$2$3 = require("readline"), require$$0$f = require("tty");
|
3
3
|
function _interopDefaultCompat(e) {
|
4
4
|
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
5
5
|
}
|
@@ -33,11 +33,11 @@ function _mergeNamespaces(n, m) {
|
|
33
33
|
});
|
34
34
|
}), Object.freeze(n);
|
35
35
|
}
|
36
|
-
var fs__namespace = /* @__PURE__ */ _interopNamespaceCompat(fs$1), os__default = /* @__PURE__ */ _interopDefaultCompat(os), path__default = /* @__PURE__ */ _interopDefaultCompat(path$3), chalk__default = /* @__PURE__ */ _interopDefaultCompat(chalk), require$$0__default = /* @__PURE__ */ _interopDefaultCompat(require$$0$
|
36
|
+
var fs__namespace = /* @__PURE__ */ _interopNamespaceCompat(fs$1), os__default = /* @__PURE__ */ _interopDefaultCompat(os), path__default = /* @__PURE__ */ _interopDefaultCompat(path$3), chalk__default = /* @__PURE__ */ _interopDefaultCompat(chalk), require$$0__default$1 = /* @__PURE__ */ _interopDefaultCompat(require$$0$5), require$$1__default = /* @__PURE__ */ _interopDefaultCompat(require$$1$2), require$$0__default = /* @__PURE__ */ _interopDefaultCompat(require$$0$4), childProcess__default = /* @__PURE__ */ _interopDefaultCompat(childProcess), fs__default = /* @__PURE__ */ _interopDefaultCompat(fs), util__default = /* @__PURE__ */ _interopDefaultCompat(util$4), require$$0__default$2 = /* @__PURE__ */ _interopDefaultCompat(require$$0$6), require$$5__default = /* @__PURE__ */ _interopDefaultCompat(require$$5$1), require$$1__default$1 = /* @__PURE__ */ _interopDefaultCompat(require$$1$3), require$$2__default = /* @__PURE__ */ _interopDefaultCompat(require$$2$1), require$$0__default$3 = /* @__PURE__ */ _interopDefaultCompat(require$$0$7), require$$0__default$4 = /* @__PURE__ */ _interopDefaultCompat(require$$0$8), require$$0__default$5 = /* @__PURE__ */ _interopDefaultCompat(require$$0$9), require$$0__default$6 = /* @__PURE__ */ _interopDefaultCompat(require$$0$a), require$$0__default$7 = /* @__PURE__ */ _interopDefaultCompat(require$$0$b), require$$6__default = /* @__PURE__ */ _interopDefaultCompat(require$$6$1), semver__default = /* @__PURE__ */ _interopDefaultCompat(semver), pkgDir__default = /* @__PURE__ */ _interopDefaultCompat(pkgDir), require$$3__default = /* @__PURE__ */ _interopDefaultCompat(require$$3$1), require$$1__default$2 = /* @__PURE__ */ _interopDefaultCompat(require$$1$4), require$$0__default$8 = /* @__PURE__ */ _interopDefaultCompat(require$$0$c), require$$0__default$9 = /* @__PURE__ */ _interopDefaultCompat(require$$0$d), Stream__default = /* @__PURE__ */ _interopDefaultCompat(Stream), require$$2__default$1 = /* @__PURE__ */ _interopDefaultCompat(require$$2$2), require$$0__default$a = /* @__PURE__ */ _interopDefaultCompat(require$$0$e), require$$7__default = /* @__PURE__ */ _interopDefaultCompat(require$$7$1), http__default = /* @__PURE__ */ _interopDefaultCompat(http), traverse__default = /* @__PURE__ */ _interopDefaultCompat(traverse), process__default = /* @__PURE__ */ _interopDefaultCompat(process$2), require$$2__default$2 = /* @__PURE__ */ _interopDefaultCompat(require$$2$3), require$$0__default$b = /* @__PURE__ */ _interopDefaultCompat(require$$0$f), resolveFrom$1 = { exports: {} }, hasRequiredResolveFrom;
|
37
37
|
function requireResolveFrom() {
|
38
38
|
if (hasRequiredResolveFrom) return resolveFrom$1.exports;
|
39
39
|
hasRequiredResolveFrom = 1;
|
40
|
-
const path2 = require$$0__default.default, Module = require$$1__default.default, fs2 = require$$0__default
|
40
|
+
const path2 = require$$0__default$1.default, Module = require$$1__default.default, fs2 = require$$0__default.default, resolveFrom2 = (fromDirectory, moduleId, silent) => {
|
41
41
|
if (typeof fromDirectory != "string")
|
42
42
|
throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDirectory}\``);
|
43
43
|
if (typeof moduleId != "string")
|
@@ -3979,7 +3979,7 @@ function requirePromisePropsRecursive() {
|
|
3979
3979
|
var promisePropsRecursiveExports = requirePromisePropsRecursive(), promiseProps = /* @__PURE__ */ loadEnv.getDefaultExportFromCjs(promisePropsRecursiveExports), xdgBasedir$1 = {}, hasRequiredXdgBasedir;
|
3980
3980
|
function requireXdgBasedir() {
|
3981
3981
|
return hasRequiredXdgBasedir || (hasRequiredXdgBasedir = 1, function(exports2) {
|
3982
|
-
const os2 = require$$0__default$2.default, path2 = require$$0__default.default, homeDirectory = os2.homedir(), { env } = process;
|
3982
|
+
const os2 = require$$0__default$2.default, path2 = require$$0__default$1.default, homeDirectory = os2.homedir(), { env } = process;
|
3983
3983
|
exports2.data = env.XDG_DATA_HOME || (homeDirectory ? path2.join(homeDirectory, ".local", "share") : void 0), exports2.config = env.XDG_CONFIG_HOME || (homeDirectory ? path2.join(homeDirectory, ".config") : void 0), exports2.cache = env.XDG_CACHE_HOME || (homeDirectory ? path2.join(homeDirectory, ".cache") : void 0), exports2.runtime = env.XDG_RUNTIME_DIR || void 0, exports2.dataDirs = (env.XDG_DATA_DIRS || "/usr/local/share/:/usr/share/").split(":"), exports2.data && exports2.dataDirs.unshift(exports2.data), exports2.configDirs = (env.XDG_CONFIG_DIRS || "/etc/xdg").split(":"), exports2.config && exports2.configDirs.unshift(exports2.config);
|
3984
3984
|
}(xdgBasedir$1)), xdgBasedir$1;
|
3985
3985
|
}
|
@@ -4133,7 +4133,7 @@ var hasRequiredUtils$3;
|
|
4133
4133
|
function requireUtils$3() {
|
4134
4134
|
if (hasRequiredUtils$3) return utils$3;
|
4135
4135
|
hasRequiredUtils$3 = 1;
|
4136
|
-
var fs2 = require$$0__default
|
4136
|
+
var fs2 = require$$0__default.default, ini2 = requireIni$1(), path2 = require$$0__default$1.default, stripJsonComments2 = requireStripJsonComments(), parse3 = utils$3.parse = function(content) {
|
4137
4137
|
return /^\s*{/.test(content) ? JSON.parse(stripJsonComments2(content)) : ini2.parse(content);
|
4138
4138
|
}, file = utils$3.file = function() {
|
4139
4139
|
var args = [].slice.call(arguments).filter(function(arg) {
|
@@ -4386,7 +4386,7 @@ var rc, hasRequiredRc;
|
|
4386
4386
|
function requireRc() {
|
4387
4387
|
if (hasRequiredRc) return rc;
|
4388
4388
|
hasRequiredRc = 1;
|
4389
|
-
var cc = requireUtils$3(), join = require$$0__default.default.join, deepExtend2 = requireDeepExtend(), etc = "/etc", win = process.platform === "win32", home = win ? process.env.USERPROFILE : process.env.HOME;
|
4389
|
+
var cc = requireUtils$3(), join = require$$0__default$1.default.join, deepExtend2 = requireDeepExtend(), etc = "/etc", win = process.platform === "win32", home = win ? process.env.USERPROFILE : process.env.HOME;
|
4390
4390
|
return rc = function(name, defaults2, argv, parse3) {
|
4391
4391
|
if (typeof name != "string")
|
4392
4392
|
throw new Error("rc(name): name *must* be string");
|
@@ -4703,7 +4703,7 @@ var gracefulFs$1, hasRequiredGracefulFs$1;
|
|
4703
4703
|
function requireGracefulFs$1() {
|
4704
4704
|
if (hasRequiredGracefulFs$1) return gracefulFs$1;
|
4705
4705
|
hasRequiredGracefulFs$1 = 1;
|
4706
|
-
var fs2 = require$$0__default
|
4706
|
+
var fs2 = require$$0__default.default, polyfills2 = requirePolyfills$1(), legacy = requireLegacyStreams$1(), clone = requireClone$1(), util2 = require$$0__default$5.default, gracefulQueue, previousSymbol;
|
4707
4707
|
typeof Symbol == "function" && typeof Symbol.for == "function" ? (gracefulQueue = Symbol.for("graceful-fs.queue"), previousSymbol = Symbol.for("graceful-fs.previous")) : (gracefulQueue = "___graceful-fs.queue", previousSymbol = "___graceful-fs.previous");
|
4708
4708
|
function noop2() {
|
4709
4709
|
}
|
@@ -4738,7 +4738,7 @@ GFS4: `), console.error(m);
|
|
4738
4738
|
value: fs$closeSync
|
4739
4739
|
}), closeSync;
|
4740
4740
|
}(fs2.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() {
|
4741
|
-
debug2(fs2[gracefulQueue]), require$$0__default$
|
4741
|
+
debug2(fs2[gracefulQueue]), require$$0__default$6.default.equal(fs2[gracefulQueue].length, 0);
|
4742
4742
|
});
|
4743
4743
|
}
|
4744
4744
|
loadEnv.commonjsGlobal[gracefulQueue] || publishQueue(loadEnv.commonjsGlobal, fs2[gracefulQueue]), gracefulFs$1 = patch(clone(fs2)), process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched && (gracefulFs$1 = patch(fs2), fs2.__patched = !0);
|
@@ -4932,7 +4932,7 @@ var hasRequiredCaFile;
|
|
4932
4932
|
function requireCaFile() {
|
4933
4933
|
if (hasRequiredCaFile) return caFile;
|
4934
4934
|
hasRequiredCaFile = 1;
|
4935
|
-
var __importDefault2 = caFile.__importDefault || function(mod) {
|
4935
|
+
var __importDefault2 = caFile && caFile.__importDefault || function(mod) {
|
4936
4936
|
return mod && mod.__esModule ? mod : { default: mod };
|
4937
4937
|
};
|
4938
4938
|
Object.defineProperty(caFile, "__esModule", { value: !0 }), caFile.readCAFileSync = void 0;
|
@@ -4952,7 +4952,7 @@ function requireCaFile() {
|
|
4952
4952
|
var hasRequiredDist$3;
|
4953
4953
|
function requireDist$3() {
|
4954
4954
|
return hasRequiredDist$3 || (hasRequiredDist$3 = 1, function(exports2) {
|
4955
|
-
var __createBinding2 = dist$4.__createBinding || (Object.create ? function(o, m, k, k2) {
|
4955
|
+
var __createBinding2 = dist$4 && dist$4.__createBinding || (Object.create ? function(o, m, k, k2) {
|
4956
4956
|
k2 === void 0 && (k2 = k);
|
4957
4957
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
4958
4958
|
(!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { enumerable: !0, get: function() {
|
@@ -4960,7 +4960,7 @@ function requireDist$3() {
|
|
4960
4960
|
} }), Object.defineProperty(o, k2, desc);
|
4961
4961
|
} : function(o, m, k, k2) {
|
4962
4962
|
k2 === void 0 && (k2 = k), o[k2] = m[k];
|
4963
|
-
}), __exportStar2 = dist$4.__exportStar || function(m, exports3) {
|
4963
|
+
}), __exportStar2 = dist$4 && dist$4.__exportStar || function(m, exports3) {
|
4964
4964
|
for (var p in m) p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p) && __createBinding2(exports3, m, p);
|
4965
4965
|
};
|
4966
4966
|
Object.defineProperty(exports2, "__esModule", { value: !0 }), __exportStar2(requireCaFile(), exports2);
|
@@ -5042,7 +5042,7 @@ var hasRequiredConfigChain;
|
|
5042
5042
|
function requireConfigChain() {
|
5043
5043
|
if (hasRequiredConfigChain) return configChain.exports;
|
5044
5044
|
hasRequiredConfigChain = 1;
|
5045
|
-
var ProtoList = requireProtoList(), path2 = require$$0__default.default, fs2 = require$$0__default
|
5045
|
+
var ProtoList = requireProtoList(), path2 = require$$0__default$1.default, fs2 = require$$0__default.default, ini2 = requireIni$1(), EE = require$$0__default$7.default.EventEmitter, url = require$$5__default.default, http2 = require$$6__default.default, exports2 = configChain.exports = function() {
|
5046
5046
|
for (var args = [].slice.call(arguments), conf2 = new ConfigChain(); args.length; ) {
|
5047
5047
|
var a = args.shift();
|
5048
5048
|
a && conf2.push(typeof a == "string" ? json2(a) : a);
|
@@ -5241,7 +5241,7 @@ var hasRequiredUtil$2;
|
|
5241
5241
|
function requireUtil$2() {
|
5242
5242
|
if (hasRequiredUtil$2) return util$3;
|
5243
5243
|
hasRequiredUtil$2 = 1;
|
5244
|
-
const fs2 = require$$0__default
|
5244
|
+
const fs2 = require$$0__default.default, path2 = require$$0__default$1.default, { envReplace: envReplace2 } = requireDist$2(), parseKey = (key2) => typeof key2 != "string" ? key2 : envReplace2(key2, process.env), parseField = (types2, field, key2) => {
|
5245
5245
|
if (typeof field != "string")
|
5246
5246
|
return field;
|
5247
5247
|
const typeList = [].concat(types2[key2]), isPath = typeList.indexOf(path2) !== -1, isBool = typeList.indexOf(Boolean) !== -1, isString = typeList.indexOf(String) !== -1, isNumber2 = typeList.indexOf(Number) !== -1;
|
@@ -5299,7 +5299,7 @@ var types$4 = {}, hasRequiredTypes$3;
|
|
5299
5299
|
function requireTypes$3() {
|
5300
5300
|
if (hasRequiredTypes$3) return types$4;
|
5301
5301
|
hasRequiredTypes$3 = 1;
|
5302
|
-
const path2 = require$$0__default.default, Stream2 = require$$0__default$4.default.Stream, url = require$$
|
5302
|
+
const path2 = require$$0__default$1.default, Stream2 = require$$0__default$4.default.Stream, url = require$$5__default.default, Umask = () => {
|
5303
5303
|
}, getLocalAddresses = () => [], semver2 = () => {
|
5304
5304
|
};
|
5305
5305
|
return types$4.types = {
|
@@ -5431,7 +5431,7 @@ var conf, hasRequiredConf;
|
|
5431
5431
|
function requireConf() {
|
5432
5432
|
if (hasRequiredConf) return conf;
|
5433
5433
|
hasRequiredConf = 1;
|
5434
|
-
const { readCAFileSync } = requireDist$3(), fs2 = require$$0__default
|
5434
|
+
const { readCAFileSync } = requireDist$3(), fs2 = require$$0__default.default, path2 = require$$0__default$1.default, { ConfigChain } = requireConfigChain(), envKeyToSetting2 = requireEnvKeyToSetting(), util2 = requireUtil$2();
|
5435
5435
|
class Conf extends ConfigChain {
|
5436
5436
|
// https://github.com/npm/cli/blob/latest/lib/config/core.js#L203-L217
|
5437
5437
|
constructor(base2, types2) {
|
@@ -5555,7 +5555,7 @@ function requireConf() {
|
|
5555
5555
|
var defaults$3 = {}, hasRequiredDefaults;
|
5556
5556
|
function requireDefaults() {
|
5557
5557
|
return hasRequiredDefaults || (hasRequiredDefaults = 1, function(exports2) {
|
5558
|
-
const os2 = require$$0__default$2.default, path2 = require$$0__default.default, temp = os2.tmpdir(), uidOrPid = process.getuid ? process.getuid() : process.pid, hasUnicode = () => !0, isWindows = process.platform === "win32", osenv = {
|
5558
|
+
const os2 = require$$0__default$2.default, path2 = require$$0__default$1.default, temp = os2.tmpdir(), uidOrPid = process.getuid ? process.getuid() : process.pid, hasUnicode = () => !0, isWindows = process.platform === "win32", osenv = {
|
5559
5559
|
editor: () => process.env.EDITOR || process.env.VISUAL || (isWindows ? "notepad.exe" : "vi"),
|
5560
5560
|
shell: () => isWindows ? process.env.COMSPEC || "cmd.exe" : process.env.SHELL || "/bin/bash"
|
5561
5561
|
}, umask = {
|
@@ -5695,7 +5695,7 @@ function requireDefaults() {
|
|
5695
5695
|
var hasRequiredNpmConf;
|
5696
5696
|
function requireNpmConf() {
|
5697
5697
|
return hasRequiredNpmConf || (hasRequiredNpmConf = 1, function(module2) {
|
5698
|
-
const path2 = require$$0__default.default, Conf = requireConf(), _defaults = requireDefaults();
|
5698
|
+
const path2 = require$$0__default$1.default, Conf = requireConf(), _defaults = requireDefaults();
|
5699
5699
|
module2.exports = (opts, types2, defaults2) => {
|
5700
5700
|
const conf2 = new Conf(Object.assign({}, _defaults.defaults, defaults2), types2);
|
5701
5701
|
conf2.add(Object.assign({}, opts), "cli");
|
@@ -5740,7 +5740,7 @@ var registryAuthToken, hasRequiredRegistryAuthToken;
|
|
5740
5740
|
function requireRegistryAuthToken() {
|
5741
5741
|
if (hasRequiredRegistryAuthToken) return registryAuthToken;
|
5742
5742
|
hasRequiredRegistryAuthToken = 1;
|
5743
|
-
const
|
5743
|
+
const npmConf2 = requireNpmConf(), tokenKey = ":_authToken", legacyTokenKey = ":_auth", userKey = ":username", passwordKey = ":_password";
|
5744
5744
|
registryAuthToken = function() {
|
5745
5745
|
let checkUrl, options2;
|
5746
5746
|
arguments.length >= 2 ? (checkUrl = arguments[0], options2 = Object.assign({}, arguments[1])) : typeof arguments[0] == "string" ? checkUrl = arguments[0] : options2 = Object.assign({}, arguments[0]), options2 = options2 || {};
|
@@ -5751,17 +5751,24 @@ function requireRegistryAuthToken() {
|
|
5751
5751
|
}
|
5752
5752
|
} : npmConf2()).config, checkUrl = checkUrl || options2.npmrc.get("registry") || npmConf2.defaults.registry, getRegistryAuthInfo(checkUrl, options2) || getLegacyAuthInfo(options2.npmrc);
|
5753
5753
|
};
|
5754
|
+
function urlResolve(from2, to) {
|
5755
|
+
const resolvedUrl = new URL(to, new URL(from2.startsWith("//") ? `./${from2}` : from2, "resolve://"));
|
5756
|
+
if (resolvedUrl.protocol === "resolve:") {
|
5757
|
+
const { pathname, search, hash } = resolvedUrl;
|
5758
|
+
return pathname + search + hash;
|
5759
|
+
}
|
5760
|
+
return resolvedUrl.toString();
|
5761
|
+
}
|
5754
5762
|
function getRegistryAuthInfo(checkUrl, options2) {
|
5755
|
-
|
5756
|
-
let pathname;
|
5763
|
+
let parsed = checkUrl instanceof URL ? checkUrl : new URL(checkUrl.startsWith("//") ? `http:${checkUrl}` : checkUrl), pathname;
|
5757
5764
|
for (; pathname !== "/" && parsed.pathname !== pathname; ) {
|
5758
5765
|
pathname = parsed.pathname || "/";
|
5759
5766
|
const regUrl = "//" + parsed.host + pathname.replace(/\/$/, ""), authInfo = getAuthInfoForUrl(regUrl, options2.npmrc);
|
5760
5767
|
if (authInfo)
|
5761
5768
|
return authInfo;
|
5762
5769
|
if (!options2.recursive)
|
5763
|
-
return /\/$/.test(checkUrl) ? void 0 : getRegistryAuthInfo(
|
5764
|
-
parsed.pathname =
|
5770
|
+
return /\/$/.test(checkUrl) ? void 0 : getRegistryAuthInfo(new URL("./", parsed), options2);
|
5771
|
+
parsed.pathname = urlResolve(normalizePath(pathname), "..") || "/";
|
5765
5772
|
}
|
5766
5773
|
}
|
5767
5774
|
function getLegacyAuthInfo(npmrc) {
|
@@ -5809,7 +5816,7 @@ var src, hasRequiredSrc;
|
|
5809
5816
|
function requireSrc() {
|
5810
5817
|
if (hasRequiredSrc) return src;
|
5811
5818
|
hasRequiredSrc = 1;
|
5812
|
-
const url = require$$
|
5819
|
+
const url = require$$5__default.default, { getIt } = require$$1__default$1.default, { debug: debug2, retry: retry2, promise: promise2, httpErrors, jsonResponse } = require$$2__default.default, registryUrl2 = requireRegistryUrl(), registryAuthToken2 = requireRegistryAuthToken(), semver2 = semver__default.default, isJson = (contentType) => /(application\/json|\+json)/.test(contentType || "");
|
5813
5820
|
function shouldRetry(err, num, options2) {
|
5814
5821
|
const response = err.response || { statusCode: 500, headers: {} };
|
5815
5822
|
return (
|
@@ -6248,7 +6255,7 @@ var gracefulFs, hasRequiredGracefulFs;
|
|
6248
6255
|
function requireGracefulFs() {
|
6249
6256
|
if (hasRequiredGracefulFs) return gracefulFs;
|
6250
6257
|
hasRequiredGracefulFs = 1;
|
6251
|
-
var fs2 = require$$0__default
|
6258
|
+
var fs2 = require$$0__default.default, polyfills2 = requirePolyfills(), legacy = requireLegacyStreams(), clone = requireClone(), util2 = require$$0__default$5.default, gracefulQueue, previousSymbol;
|
6252
6259
|
typeof Symbol == "function" && typeof Symbol.for == "function" ? (gracefulQueue = Symbol.for("graceful-fs.queue"), previousSymbol = Symbol.for("graceful-fs.previous")) : (gracefulQueue = "___graceful-fs.queue", previousSymbol = "___graceful-fs.previous");
|
6253
6260
|
function noop2() {
|
6254
6261
|
}
|
@@ -6283,7 +6290,7 @@ GFS4: `), console.error(m);
|
|
6283
6290
|
value: fs$closeSync
|
6284
6291
|
}), closeSync;
|
6285
6292
|
}(fs2.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() {
|
6286
|
-
debug2(fs2[gracefulQueue]), require$$0__default$
|
6293
|
+
debug2(fs2[gracefulQueue]), require$$0__default$6.default.equal(fs2[gracefulQueue].length, 0);
|
6287
6294
|
});
|
6288
6295
|
}
|
6289
6296
|
loadEnv.commonjsGlobal[gracefulQueue] || publishQueue(loadEnv.commonjsGlobal, fs2[gracefulQueue]), gracefulFs = patch(clone(fs2)), process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched && (gracefulFs = patch(fs2), fs2.__patched = !0);
|
@@ -6477,7 +6484,7 @@ var makeDir = { exports: {} }, hasRequiredMakeDir;
|
|
6477
6484
|
function requireMakeDir() {
|
6478
6485
|
if (hasRequiredMakeDir) return makeDir.exports;
|
6479
6486
|
hasRequiredMakeDir = 1;
|
6480
|
-
const fs2 = require$$0__default
|
6487
|
+
const fs2 = require$$0__default.default, path2 = require$$0__default$1.default, { promisify } = require$$0__default$5.default, useNativeRecursiveOption = semver__default.default.satisfies(process.version, ">=10.12.0"), checkPath = (pth) => {
|
6481
6488
|
if (process.platform === "win32" && /[<>:"|?*]/.test(pth.replace(path2.parse(pth).root, ""))) {
|
6482
6489
|
const error2 = new Error(`Path contains invalid characters: ${pth}`);
|
6483
6490
|
throw error2.code = "EINVAL", error2;
|
@@ -6659,22 +6666,22 @@ function requireSignalExit() {
|
|
6659
6666
|
};
|
6660
6667
|
};
|
6661
6668
|
else {
|
6662
|
-
var assert = require$$0__default$
|
6669
|
+
var assert = require$$0__default$6.default, signals2 = requireSignals(), isWin = /^win/i.test(process2.platform), EE = require$$0__default$7.default;
|
6663
6670
|
typeof EE != "function" && (EE = EE.EventEmitter);
|
6664
6671
|
var emitter;
|
6665
6672
|
process2.__signal_exit_emitter__ ? emitter = process2.__signal_exit_emitter__ : (emitter = process2.__signal_exit_emitter__ = new EE(), emitter.count = 0, emitter.emitted = {}), emitter.infinite || (emitter.setMaxListeners(1 / 0), emitter.infinite = !0), signalExit.exports = function(cb, opts) {
|
6666
6673
|
if (!processOk2(loadEnv.commonjsGlobal.process))
|
6667
6674
|
return function() {
|
6668
6675
|
};
|
6669
|
-
assert.equal(typeof cb, "function", "a callback must be provided for exit handler"), loaded === !1 &&
|
6676
|
+
assert.equal(typeof cb, "function", "a callback must be provided for exit handler"), loaded === !1 && load();
|
6670
6677
|
var ev = "exit";
|
6671
6678
|
opts && opts.alwaysLast && (ev = "afterexit");
|
6672
6679
|
var remove = function() {
|
6673
|
-
emitter.removeListener(ev, cb), emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0 &&
|
6680
|
+
emitter.removeListener(ev, cb), emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0 && unload();
|
6674
6681
|
};
|
6675
6682
|
return emitter.on(ev, cb), remove;
|
6676
6683
|
};
|
6677
|
-
var
|
6684
|
+
var unload = function() {
|
6678
6685
|
!loaded || !processOk2(loadEnv.commonjsGlobal.process) || (loaded = !1, signals2.forEach(function(sig) {
|
6679
6686
|
try {
|
6680
6687
|
process2.removeListener(sig, sigListeners[sig]);
|
@@ -6682,7 +6689,7 @@ function requireSignalExit() {
|
|
6682
6689
|
}
|
6683
6690
|
}), process2.emit = originalProcessEmit, process2.reallyExit = originalProcessReallyExit, emitter.count -= 1);
|
6684
6691
|
};
|
6685
|
-
signalExit.exports.unload =
|
6692
|
+
signalExit.exports.unload = unload;
|
6686
6693
|
var emit = function(event, code, signal) {
|
6687
6694
|
emitter.emitted[event] || (emitter.emitted[event] = !0, emitter.emit(event, code, signal));
|
6688
6695
|
}, sigListeners = {};
|
@@ -6690,13 +6697,13 @@ function requireSignalExit() {
|
|
6690
6697
|
sigListeners[sig] = function() {
|
6691
6698
|
if (processOk2(loadEnv.commonjsGlobal.process)) {
|
6692
6699
|
var listeners = process2.listeners(sig);
|
6693
|
-
listeners.length === emitter.count && (
|
6700
|
+
listeners.length === emitter.count && (unload(), emit("exit", null, sig), emit("afterexit", null, sig), isWin && sig === "SIGHUP" && (sig = "SIGINT"), process2.kill(process2.pid, sig));
|
6694
6701
|
}
|
6695
6702
|
};
|
6696
6703
|
}), signalExit.exports.signals = function() {
|
6697
6704
|
return signals2;
|
6698
6705
|
};
|
6699
|
-
var loaded = !1,
|
6706
|
+
var loaded = !1, load = function() {
|
6700
6707
|
loaded || !processOk2(loadEnv.commonjsGlobal.process) || (loaded = !0, emitter.count += 1, signals2 = signals2.filter(function(sig) {
|
6701
6708
|
try {
|
6702
6709
|
return process2.on(sig, sigListeners[sig]), !0;
|
@@ -6705,7 +6712,7 @@ function requireSignalExit() {
|
|
6705
6712
|
}
|
6706
6713
|
}), process2.emit = processEmit, process2.reallyExit = processReallyExit);
|
6707
6714
|
};
|
6708
|
-
signalExit.exports.load =
|
6715
|
+
signalExit.exports.load = load;
|
6709
6716
|
var originalProcessReallyExit = process2.reallyExit, processReallyExit = function(code) {
|
6710
6717
|
processOk2(loadEnv.commonjsGlobal.process) && (process2.exitCode = code || /* istanbul ignore next */
|
6711
6718
|
0, emit("exit", process2.exitCode, null), emit("afterexit", process2.exitCode, null), originalProcessReallyExit.call(process2, process2.exitCode));
|
@@ -6763,7 +6770,7 @@ var hasRequiredWriteFileAtomic;
|
|
6763
6770
|
function requireWriteFileAtomic() {
|
6764
6771
|
if (hasRequiredWriteFileAtomic) return writeFileAtomic.exports;
|
6765
6772
|
hasRequiredWriteFileAtomic = 1, writeFileAtomic.exports = writeFile, writeFileAtomic.exports.sync = writeFileSync, writeFileAtomic.exports._getTmpname = getTmpname, writeFileAtomic.exports._cleanupOnExit = cleanupOnExit;
|
6766
|
-
const fs2 = require$$0__default
|
6773
|
+
const fs2 = require$$0__default.default, MurmurHash3 = requireImurmurhash(), onExit2 = requireSignalExit(), path2 = require$$0__default$1.default, isTypedArray = requireIsTypedarray(), typedArrayToBuffer = requireTypedarrayToBuffer(), { promisify } = require$$0__default$5.default, activeFiles = {}, threadId = function() {
|
6767
6774
|
try {
|
6768
6775
|
return require("worker_threads").threadId;
|
6769
6776
|
} catch {
|
@@ -6971,7 +6978,7 @@ var configstore, hasRequiredConfigstore;
|
|
6971
6978
|
function requireConfigstore() {
|
6972
6979
|
if (hasRequiredConfigstore) return configstore;
|
6973
6980
|
hasRequiredConfigstore = 1;
|
6974
|
-
const path2 = require$$0__default.default, os2 = require$$0__default$2.default, fs2 = requireGracefulFs(), makeDir2 = requireMakeDir(), xdgBasedir2 = requireXdgBasedir(), writeFileAtomic2 = requireWriteFileAtomic(), dotProp2 = requireDotProp(), uniqueString2 = requireUniqueString(), configDirectory = xdgBasedir2.config || path2.join(os2.tmpdir(), uniqueString2()), permissionError = "You don't have access to this file.", makeDirOptions = { mode: 448 }, writeFileOptions = { mode: 384 };
|
6981
|
+
const path2 = require$$0__default$1.default, os2 = require$$0__default$2.default, fs2 = requireGracefulFs(), makeDir2 = requireMakeDir(), xdgBasedir2 = requireXdgBasedir(), writeFileAtomic2 = requireWriteFileAtomic(), dotProp2 = requireDotProp(), uniqueString2 = requireUniqueString(), configDirectory = xdgBasedir2.config || path2.join(os2.tmpdir(), uniqueString2()), permissionError = "You don't have access to this file.", makeDirOptions = { mode: 448 }, writeFileOptions = { mode: 384 };
|
6975
6982
|
class Configstore {
|
6976
6983
|
constructor(id, defaults2, options2 = {}) {
|
6977
6984
|
const pathPrefix = options2.globalConfigPath ? path2.join(id, "config.json") : path2.join("configstore", `${id}.json`);
|
@@ -7221,7 +7228,7 @@ var isWsl = { exports: {} }, isDocker_1, hasRequiredIsDocker;
|
|
7221
7228
|
function requireIsDocker() {
|
7222
7229
|
if (hasRequiredIsDocker) return isDocker_1;
|
7223
7230
|
hasRequiredIsDocker = 1;
|
7224
|
-
const fs2 = require$$0__default
|
7231
|
+
const fs2 = require$$0__default.default;
|
7225
7232
|
let isDocker;
|
7226
7233
|
function hasDockerEnv() {
|
7227
7234
|
try {
|
@@ -7243,7 +7250,7 @@ var hasRequiredIsWsl;
|
|
7243
7250
|
function requireIsWsl() {
|
7244
7251
|
if (hasRequiredIsWsl) return isWsl.exports;
|
7245
7252
|
hasRequiredIsWsl = 1;
|
7246
|
-
const os2 = require$$0__default$2.default, fs2 = require$$0__default
|
7253
|
+
const os2 = require$$0__default$2.default, fs2 = require$$0__default.default, isDocker = requireIsDocker(), isWsl$1 = () => {
|
7247
7254
|
if (process.platform !== "linux")
|
7248
7255
|
return !1;
|
7249
7256
|
if (os2.release().toLowerCase().includes("microsoft"))
|
@@ -7277,7 +7284,7 @@ var open_1, hasRequiredOpen;
|
|
7277
7284
|
function requireOpen() {
|
7278
7285
|
if (hasRequiredOpen) return open_1;
|
7279
7286
|
hasRequiredOpen = 1;
|
7280
|
-
const path2 = require$$0__default.default, childProcess2 = require$$1__default$2.default, { promises: fs2, constants: fsConstants } = require$$0__default
|
7287
|
+
const path2 = require$$0__default$1.default, childProcess2 = require$$1__default$2.default, { promises: fs2, constants: fsConstants } = require$$0__default.default, isWsl2 = requireIsWsl(), isDocker = requireIsDocker(), defineLazyProperty = requireDefineLazyProp(), localXdgOpenPath = path2.join(__dirname, "xdg-open"), { platform: platform2, arch } = process, hasContainerEnv = () => {
|
7281
7288
|
try {
|
7282
7289
|
return fs2.statSync("/run/.containerenv"), !0;
|
7283
7290
|
} catch {
|
@@ -8760,7 +8767,7 @@ function requireLoader$2() {
|
|
8760
8767
|
for (index = 0, length = documents.length; index < length; index += 1)
|
8761
8768
|
iterator2(documents[index]);
|
8762
8769
|
}
|
8763
|
-
function
|
8770
|
+
function load(input2, options2) {
|
8764
8771
|
var documents = loadDocuments(input2, options2);
|
8765
8772
|
if (documents.length !== 0) {
|
8766
8773
|
if (documents.length === 1)
|
@@ -8775,9 +8782,9 @@ function requireLoader$2() {
|
|
8775
8782
|
return loadAll(input2, common2.extend({ schema: DEFAULT_SAFE_SCHEMA }, options2));
|
8776
8783
|
}
|
8777
8784
|
function safeLoad(input2, options2) {
|
8778
|
-
return
|
8785
|
+
return load(input2, common2.extend({ schema: DEFAULT_SAFE_SCHEMA }, options2));
|
8779
8786
|
}
|
8780
|
-
return loader$2.loadAll = loadAll, loader$2.load =
|
8787
|
+
return loader$2.loadAll = loadAll, loader$2.load = load, loader$2.safeLoadAll = safeLoadAll, loader$2.safeLoad = safeLoad, loader$2;
|
8781
8788
|
}
|
8782
8789
|
var dumper$2 = {}, hasRequiredDumper$2;
|
8783
8790
|
function requireDumper$2() {
|
@@ -10512,11 +10519,11 @@ var hasRequiredReadConfigFile;
|
|
10512
10519
|
function requireReadConfigFile() {
|
10513
10520
|
if (hasRequiredReadConfigFile) return readConfigFile;
|
10514
10521
|
hasRequiredReadConfigFile = 1;
|
10515
|
-
var __importDefault2 = readConfigFile.__importDefault || function(mod) {
|
10522
|
+
var __importDefault2 = readConfigFile && readConfigFile.__importDefault || function(mod) {
|
10516
10523
|
return mod && mod.__esModule ? mod : { default: mod };
|
10517
10524
|
};
|
10518
10525
|
Object.defineProperty(readConfigFile, "__esModule", { value: !0 }), readConfigFile.readConfigFile = void 0;
|
10519
|
-
const js_yaml_1 = __importDefault2(requireJsYaml$3()), toml_1 = __importDefault2(requireToml()), fs_1 = require$$0__default
|
10526
|
+
const js_yaml_1 = __importDefault2(requireJsYaml$3()), toml_1 = __importDefault2(requireToml()), fs_1 = require$$0__default.default, error_utils_1 = requireDist$1(), { readFile } = fs_1.promises;
|
10520
10527
|
async function readFileOrNull(file) {
|
10521
10528
|
try {
|
10522
10529
|
return await readFile(file);
|
@@ -10551,7 +10558,7 @@ function requireTypes$2() {
|
|
10551
10558
|
var hasRequiredFrameworks;
|
10552
10559
|
function requireFrameworks() {
|
10553
10560
|
return hasRequiredFrameworks || (hasRequiredFrameworks = 1, function(exports2) {
|
10554
|
-
var __createBinding2 = frameworks.__createBinding || (Object.create ? function(o, m, k, k2) {
|
10561
|
+
var __createBinding2 = frameworks && frameworks.__createBinding || (Object.create ? function(o, m, k, k2) {
|
10555
10562
|
k2 === void 0 && (k2 = k);
|
10556
10563
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
10557
10564
|
(!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { enumerable: !0, get: function() {
|
@@ -10559,11 +10566,11 @@ function requireFrameworks() {
|
|
10559
10566
|
} }), Object.defineProperty(o, k2, desc);
|
10560
10567
|
} : function(o, m, k, k2) {
|
10561
10568
|
k2 === void 0 && (k2 = k), o[k2] = m[k];
|
10562
|
-
}), __exportStar2 = frameworks.__exportStar || function(m, exports3) {
|
10569
|
+
}), __exportStar2 = frameworks && frameworks.__exportStar || function(m, exports3) {
|
10563
10570
|
for (var p in m) p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p) && __createBinding2(exports3, m, p);
|
10564
10571
|
};
|
10565
10572
|
Object.defineProperty(exports2, "__esModule", { value: !0 }), exports2.frameworks = void 0;
|
10566
|
-
const path_1 = require$$0__default.default, fs_1 = require$$0__default
|
10573
|
+
const path_1 = require$$0__default$1.default, fs_1 = require$$0__default.default, read_config_file_1 = requireReadConfigFile();
|
10567
10574
|
__exportStar2(requireTypes$2(), exports2);
|
10568
10575
|
const { readdir: readdir2, readFile, unlink: unlink2 } = fs_1.promises;
|
10569
10576
|
exports2.frameworks = [
|
@@ -12989,11 +12996,11 @@ var hasRequiredDetectBuilders;
|
|
12989
12996
|
function requireDetectBuilders() {
|
12990
12997
|
if (hasRequiredDetectBuilders) return detectBuilders;
|
12991
12998
|
hasRequiredDetectBuilders = 1;
|
12992
|
-
var __importDefault2 = detectBuilders.__importDefault || function(mod) {
|
12999
|
+
var __importDefault2 = detectBuilders && detectBuilders.__importDefault || function(mod) {
|
12993
13000
|
return mod && mod.__esModule ? mod : { default: mod };
|
12994
13001
|
};
|
12995
13002
|
Object.defineProperty(detectBuilders, "__esModule", { value: !0 }), detectBuilders.detectBuilders = detectBuilders.detectOutputDirectory = detectBuilders.detectApiDirectory = detectBuilders.detectApiExtensions = detectBuilders.sortFiles = void 0;
|
12996
|
-
const minimatch_12 = __importDefault2(requireMinimatch$1()), semver_1 = semver__default.default, path_1 = require$$0__default.default, frameworks_1 = __importDefault2(requireFrameworks()), is_official_runtime_1 = requireIsOfficialRuntime(), slugToFramework = new Map(frameworks_1.default.map((f) => [f.slug, f]));
|
13003
|
+
const minimatch_12 = __importDefault2(requireMinimatch$1()), semver_1 = semver__default.default, path_1 = require$$0__default$1.default, frameworks_1 = __importDefault2(requireFrameworks()), is_official_runtime_1 = requireIsOfficialRuntime(), slugToFramework = new Map(frameworks_1.default.map((f) => [f.slug, f]));
|
12997
13004
|
function sortFiles(fileA, fileB) {
|
12998
13005
|
return fileA.localeCompare(fileB);
|
12999
13006
|
}
|
@@ -13399,7 +13406,7 @@ function requireDetectBuilders() {
|
|
13399
13406
|
}
|
13400
13407
|
function getRouteResult(apiRoutes, dynamicRoutes, outputDirectory, apiBuilders, frontendBuilder, options2) {
|
13401
13408
|
const defaultRoutes = [], redirectRoutes = [], rewriteRoutes = [], errorRoutes = [], framework = frontendBuilder?.config?.framework || "", isNextjs = framework === "nextjs" || (0, is_official_runtime_1.isOfficialRuntime)("next", frontendBuilder?.use), ignoreRuntimes = slugToFramework.get(framework)?.ignoreRuntimes;
|
13402
|
-
if (apiRoutes.length > 0)
|
13409
|
+
if (apiRoutes && apiRoutes.length > 0)
|
13403
13410
|
if (options2.featHandleMiss) {
|
13404
13411
|
const extSet = detectApiExtensions(apiBuilders);
|
13405
13412
|
if (extSet.size > 0) {
|
@@ -13460,7 +13467,7 @@ var detectFileSystemApi = {}, hasRequiredDetectFileSystemApi;
|
|
13460
13467
|
function requireDetectFileSystemApi() {
|
13461
13468
|
if (hasRequiredDetectFileSystemApi) return detectFileSystemApi;
|
13462
13469
|
hasRequiredDetectFileSystemApi = 1;
|
13463
|
-
var __importDefault2 = detectFileSystemApi.__importDefault || function(mod) {
|
13470
|
+
var __importDefault2 = detectFileSystemApi && detectFileSystemApi.__importDefault || function(mod) {
|
13464
13471
|
return mod && mod.__esModule ? mod : { default: mod };
|
13465
13472
|
};
|
13466
13473
|
Object.defineProperty(detectFileSystemApi, "__esModule", { value: !0 }), detectFileSystemApi.detectFileSystemAPI = void 0;
|
@@ -13680,7 +13687,7 @@ function requireDetectFramework() {
|
|
13680
13687
|
var getProjectPaths = {}, hasRequiredGetProjectPaths;
|
13681
13688
|
function requireGetProjectPaths() {
|
13682
13689
|
return hasRequiredGetProjectPaths || (hasRequiredGetProjectPaths = 1, function(exports2) {
|
13683
|
-
var __importDefault2 = getProjectPaths.__importDefault || function(mod) {
|
13690
|
+
var __importDefault2 = getProjectPaths && getProjectPaths.__importDefault || function(mod) {
|
13684
13691
|
return mod && mod.__esModule ? mod : { default: mod };
|
13685
13692
|
};
|
13686
13693
|
Object.defineProperty(exports2, "__esModule", { value: !0 }), exports2.getProjectPaths = void 0;
|
@@ -13711,7 +13718,7 @@ var filesystem = {}, hasRequiredFilesystem;
|
|
13711
13718
|
function requireFilesystem() {
|
13712
13719
|
if (hasRequiredFilesystem) return filesystem;
|
13713
13720
|
hasRequiredFilesystem = 1, Object.defineProperty(filesystem, "__esModule", { value: !0 }), filesystem.DetectorFilesystem = void 0;
|
13714
|
-
const path_1 = require$$0__default.default;
|
13721
|
+
const path_1 = require$$0__default$1.default;
|
13715
13722
|
class DetectorFilesystem {
|
13716
13723
|
constructor() {
|
13717
13724
|
this.hasPath = async (path2) => {
|
@@ -13748,11 +13755,11 @@ var localFileSystemDetector = {}, hasRequiredLocalFileSystemDetector;
|
|
13748
13755
|
function requireLocalFileSystemDetector() {
|
13749
13756
|
if (hasRequiredLocalFileSystemDetector) return localFileSystemDetector;
|
13750
13757
|
hasRequiredLocalFileSystemDetector = 1;
|
13751
|
-
var __importDefault2 = localFileSystemDetector.__importDefault || function(mod) {
|
13758
|
+
var __importDefault2 = localFileSystemDetector && localFileSystemDetector.__importDefault || function(mod) {
|
13752
13759
|
return mod && mod.__esModule ? mod : { default: mod };
|
13753
13760
|
};
|
13754
13761
|
Object.defineProperty(localFileSystemDetector, "__esModule", { value: !0 }), localFileSystemDetector.LocalFileSystemDetector = void 0;
|
13755
|
-
const promises_1 = __importDefault2(require$$0__default$
|
13762
|
+
const promises_1 = __importDefault2(require$$0__default$8.default), path_1 = require$$0__default$1.default, filesystem_1 = requireFilesystem(), error_utils_1 = requireDist$1();
|
13756
13763
|
class LocalFileSystemDetector extends filesystem_1.DetectorFilesystem {
|
13757
13764
|
constructor(rootPath) {
|
13758
13765
|
super(), this.rootPath = rootPath;
|
@@ -13885,11 +13892,11 @@ var getWorkspaces = {}, hasRequiredGetWorkspaces;
|
|
13885
13892
|
function requireGetWorkspaces() {
|
13886
13893
|
if (hasRequiredGetWorkspaces) return getWorkspaces;
|
13887
13894
|
hasRequiredGetWorkspaces = 1;
|
13888
|
-
var __importDefault2 = getWorkspaces.__importDefault || function(mod) {
|
13895
|
+
var __importDefault2 = getWorkspaces && getWorkspaces.__importDefault || function(mod) {
|
13889
13896
|
return mod && mod.__esModule ? mod : { default: mod };
|
13890
13897
|
};
|
13891
13898
|
Object.defineProperty(getWorkspaces, "__esModule", { value: !0 }), getWorkspaces.getWorkspaces = void 0;
|
13892
|
-
const path_1 = __importDefault2(require$$0__default.default), workspace_managers_1 = requireWorkspaceManagers(), detect_framework_1 = requireDetectFramework(), MAX_DEPTH_TRAVERSE = 3, posixPath = path_1.default.posix;
|
13899
|
+
const path_1 = __importDefault2(require$$0__default$1.default), workspace_managers_1 = requireWorkspaceManagers(), detect_framework_1 = requireDetectFramework(), MAX_DEPTH_TRAVERSE = 3, posixPath = path_1.default.posix;
|
13893
13900
|
async function getWorkspaces$1({ fs: fs2, depth = MAX_DEPTH_TRAVERSE, cwd = "/" }) {
|
13894
13901
|
if (depth === 0)
|
13895
13902
|
return [];
|
@@ -15011,7 +15018,7 @@ function requireLoader$1() {
|
|
15011
15018
|
for (var index = 0, length = documents.length; index < length; index += 1)
|
15012
15019
|
iterator2(documents[index]);
|
15013
15020
|
}
|
15014
|
-
function
|
15021
|
+
function load(input2, options2) {
|
15015
15022
|
var documents = loadDocuments(input2, options2);
|
15016
15023
|
if (documents.length !== 0) {
|
15017
15024
|
if (documents.length === 1)
|
@@ -15019,7 +15026,7 @@ function requireLoader$1() {
|
|
15019
15026
|
throw new YAMLException("expected a single document in the stream, but found more");
|
15020
15027
|
}
|
15021
15028
|
}
|
15022
|
-
return loader$1.loadAll = loadAll, loader$1.load =
|
15029
|
+
return loader$1.loadAll = loadAll, loader$1.load = load, loader$1;
|
15023
15030
|
}
|
15024
15031
|
var dumper$1 = {}, hasRequiredDumper$1;
|
15025
15032
|
function requireDumper$1() {
|
@@ -15346,7 +15353,7 @@ var old = {}, hasRequiredOld;
|
|
15346
15353
|
function requireOld() {
|
15347
15354
|
if (hasRequiredOld) return old;
|
15348
15355
|
hasRequiredOld = 1;
|
15349
|
-
var pathModule = require$$0__default.default, isWindows = process.platform === "win32", fs2 = require$$0__default
|
15356
|
+
var pathModule = require$$0__default$1.default, isWindows = process.platform === "win32", fs2 = require$$0__default.default, DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
|
15350
15357
|
function rethrow() {
|
15351
15358
|
var callback;
|
15352
15359
|
if (DEBUG) {
|
@@ -15462,7 +15469,7 @@ var fs_realpath, hasRequiredFs_realpath;
|
|
15462
15469
|
function requireFs_realpath() {
|
15463
15470
|
if (hasRequiredFs_realpath) return fs_realpath;
|
15464
15471
|
hasRequiredFs_realpath = 1, fs_realpath = realpath, realpath.realpath = realpath, realpath.sync = realpathSync2, realpath.realpathSync = realpathSync2, realpath.monkeypatch = monkeypatch, realpath.unmonkeypatch = unmonkeypatch;
|
15465
|
-
var fs2 = require$$0__default
|
15472
|
+
var fs2 = require$$0__default.default, origRealpath = fs2.realpath, origRealpathSync = fs2.realpathSync, version2 = process.version, ok = /^v[0-5]\./.test(version2), old2 = requireOld();
|
15466
15473
|
function newError(er) {
|
15467
15474
|
return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG");
|
15468
15475
|
}
|
@@ -15954,7 +15961,7 @@ function requireCommon$1() {
|
|
15954
15961
|
function ownProp(obj, field) {
|
15955
15962
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
15956
15963
|
}
|
15957
|
-
var fs2 = require$$0__default
|
15964
|
+
var fs2 = require$$0__default.default, path2 = require$$0__default$1.default, minimatch2 = requireMinimatch(), isAbsolute = require$$0__default$1.default.isAbsolute, Minimatch2 = minimatch2.Minimatch;
|
15958
15965
|
function alphasort(a, b) {
|
15959
15966
|
return a.localeCompare(b, "en");
|
15960
15967
|
}
|
@@ -16042,7 +16049,7 @@ function requireSync() {
|
|
16042
16049
|
hasRequiredSync = 1, sync$1 = globSync2, globSync2.GlobSync = GlobSync;
|
16043
16050
|
var rp = requireFs_realpath(), minimatch2 = requireMinimatch();
|
16044
16051
|
requireGlob().Glob;
|
16045
|
-
var path2 = require$$0__default.default, assert = require$$0__default$
|
16052
|
+
var path2 = require$$0__default$1.default, assert = require$$0__default$6.default, isAbsolute = require$$0__default$1.default.isAbsolute, common2 = requireCommon$1(), setopts = common2.setopts, ownProp = common2.ownProp, childrenIgnored = common2.childrenIgnored, isIgnored = common2.isIgnored;
|
16046
16053
|
function globSync2(pattern, options2) {
|
16047
16054
|
if (typeof options2 == "function" || arguments.length === 3)
|
16048
16055
|
throw new TypeError(`callback provided to sync glob
|
@@ -16359,7 +16366,7 @@ var glob_1, hasRequiredGlob;
|
|
16359
16366
|
function requireGlob() {
|
16360
16367
|
if (hasRequiredGlob) return glob_1;
|
16361
16368
|
hasRequiredGlob = 1, glob_1 = glob2;
|
16362
|
-
var rp = requireFs_realpath(), minimatch2 = requireMinimatch(), inherits2 = requireInherits(), EE = require$$0__default$7.default.EventEmitter, path2 = require$$0__default.default, assert = require$$0__default$
|
16369
|
+
var rp = requireFs_realpath(), minimatch2 = requireMinimatch(), inherits2 = requireInherits(), EE = require$$0__default$7.default.EventEmitter, path2 = require$$0__default$1.default, assert = require$$0__default$6.default, isAbsolute = require$$0__default$1.default.isAbsolute, globSync2 = requireSync(), common2 = requireCommon$1(), setopts = common2.setopts, ownProp = common2.ownProp, inflight = requireInflight(), childrenIgnored = common2.childrenIgnored, isIgnored = common2.isIgnored, once2 = requireOnce();
|
16363
16370
|
function glob2(pattern, options2, cb) {
|
16364
16371
|
if (typeof options2 == "function" && (cb = options2, options2 = {}), options2 || (options2 = {}), options2.sync) {
|
16365
16372
|
if (cb)
|
@@ -17540,11 +17547,11 @@ var lib$2 = JSON5, dist = /* @__PURE__ */ Object.freeze({
|
|
17540
17547
|
function requireGetGlobFs() {
|
17541
17548
|
if (hasRequiredGetGlobFs) return getGlobFs;
|
17542
17549
|
hasRequiredGetGlobFs = 1;
|
17543
|
-
var __importDefault2 = getGlobFs.__importDefault || function(mod) {
|
17550
|
+
var __importDefault2 = getGlobFs && getGlobFs.__importDefault || function(mod) {
|
17544
17551
|
return mod && mod.__esModule ? mod : { default: mod };
|
17545
17552
|
};
|
17546
17553
|
Object.defineProperty(getGlobFs, "__esModule", { value: !0 }), getGlobFs.getGlobFs = void 0;
|
17547
|
-
const fs_1 = __importDefault2(require$$0__default
|
17554
|
+
const fs_1 = __importDefault2(require$$0__default.default);
|
17548
17555
|
function removeWindowsPrefix(path2) {
|
17549
17556
|
return path2.replace(/^[a-zA-Z]:/, "");
|
17550
17557
|
}
|
@@ -17602,11 +17609,11 @@ var hasRequiredGetWorkspacePackagePaths;
|
|
17602
17609
|
function requireGetWorkspacePackagePaths() {
|
17603
17610
|
if (hasRequiredGetWorkspacePackagePaths) return getWorkspacePackagePaths;
|
17604
17611
|
hasRequiredGetWorkspacePackagePaths = 1;
|
17605
|
-
var __importDefault2 = getWorkspacePackagePaths.__importDefault || function(mod) {
|
17612
|
+
var __importDefault2 = getWorkspacePackagePaths && getWorkspacePackagePaths.__importDefault || function(mod) {
|
17606
17613
|
return mod && mod.__esModule ? mod : { default: mod };
|
17607
17614
|
};
|
17608
17615
|
Object.defineProperty(getWorkspacePackagePaths, "__esModule", { value: !0 }), getWorkspacePackagePaths.getWorkspacePackagePaths = void 0;
|
17609
|
-
const path_1 = __importDefault2(require$$0__default.default), js_yaml_1 = __importDefault2(requireJsYaml$2()), glob_12 = __importDefault2(requireGlob()), json5_1 = __importDefault2(require$$4$2), get_glob_fs_1 = requireGetGlobFs(), posixPath = path_1.default.posix;
|
17616
|
+
const path_1 = __importDefault2(require$$0__default$1.default), js_yaml_1 = __importDefault2(requireJsYaml$2()), glob_12 = __importDefault2(requireGlob()), json5_1 = __importDefault2(require$$4$2), get_glob_fs_1 = requireGetGlobFs(), posixPath = path_1.default.posix;
|
17610
17617
|
async function getWorkspacePackagePaths$1({ fs: fs2, workspace }) {
|
17611
17618
|
const { type: type2, rootPath } = workspace, workspaceFs = fs2.chdir(rootPath);
|
17612
17619
|
let results = [];
|
@@ -17820,11 +17827,11 @@ var getMonorepoDefaultSettings = {}, hasRequiredGetMonorepoDefaultSettings;
|
|
17820
17827
|
function requireGetMonorepoDefaultSettings() {
|
17821
17828
|
if (hasRequiredGetMonorepoDefaultSettings) return getMonorepoDefaultSettings;
|
17822
17829
|
hasRequiredGetMonorepoDefaultSettings = 1;
|
17823
|
-
var __importDefault2 = getMonorepoDefaultSettings.__importDefault || function(mod) {
|
17830
|
+
var __importDefault2 = getMonorepoDefaultSettings && getMonorepoDefaultSettings.__importDefault || function(mod) {
|
17824
17831
|
return mod && mod.__esModule ? mod : { default: mod };
|
17825
17832
|
};
|
17826
17833
|
Object.defineProperty(getMonorepoDefaultSettings, "__esModule", { value: !0 }), getMonorepoDefaultSettings.getMonorepoDefaultSettings = getMonorepoDefaultSettings.MissingBuildTarget = getMonorepoDefaultSettings.MissingBuildPipeline = void 0;
|
17827
|
-
const path_1 = require$$0__default.default, monorepo_managers_1 = requireMonorepoManagers(), package_managers_1 = requirePackageManagers(), detect_framework_1 = requireDetectFramework(), json5_1 = __importDefault2(require$$4$2), semver_1 = __importDefault2(semver__default.default);
|
17834
|
+
const path_1 = require$$0__default$1.default, monorepo_managers_1 = requireMonorepoManagers(), package_managers_1 = requirePackageManagers(), detect_framework_1 = requireDetectFramework(), json5_1 = __importDefault2(require$$4$2), semver_1 = __importDefault2(semver__default.default);
|
17828
17835
|
class MissingBuildPipeline extends Error {
|
17829
17836
|
constructor() {
|
17830
17837
|
super("Missing required `build` pipeline in turbo.json or package.json Turbo configuration.");
|
@@ -17909,7 +17916,7 @@ function requireGetMonorepoDefaultSettings() {
|
|
17909
17916
|
var hasRequiredDist;
|
17910
17917
|
function requireDist() {
|
17911
17918
|
return hasRequiredDist || (hasRequiredDist = 1, function(exports2) {
|
17912
|
-
var __createBinding2 = dist$1.__createBinding || (Object.create ? function(o, m, k, k2) {
|
17919
|
+
var __createBinding2 = dist$1 && dist$1.__createBinding || (Object.create ? function(o, m, k, k2) {
|
17913
17920
|
k2 === void 0 && (k2 = k);
|
17914
17921
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
17915
17922
|
(!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { enumerable: !0, get: function() {
|
@@ -17917,7 +17924,7 @@ function requireDist() {
|
|
17917
17924
|
} }), Object.defineProperty(o, k2, desc);
|
17918
17925
|
} : function(o, m, k, k2) {
|
17919
17926
|
k2 === void 0 && (k2 = k), o[k2] = m[k];
|
17920
|
-
}), __exportStar2 = dist$1.__exportStar || function(m, exports3) {
|
17927
|
+
}), __exportStar2 = dist$1 && dist$1.__exportStar || function(m, exports3) {
|
17921
17928
|
for (var p in m) p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p) && __createBinding2(exports3, m, p);
|
17922
17929
|
};
|
17923
17930
|
Object.defineProperty(exports2, "__esModule", { value: !0 }), exports2.packageManagers = exports2.isStaticRuntime = exports2.isOfficialRuntime = exports2.monorepoManagers = exports2.getWorkspacePackagePaths = exports2.getWorkspaces = exports2.workspaceManagers = exports2.LocalFileSystemDetector = exports2.DetectorFilesystem = exports2.getProjectPaths = exports2.detectFrameworkVersion = exports2.detectFrameworkRecord = exports2.detectFrameworks = exports2.detectFramework = exports2.detectFileSystemAPI = exports2.detectApiExtensions = exports2.detectApiDirectory = exports2.detectOutputDirectory = exports2.detectBuilders = void 0;
|
@@ -17989,7 +17996,7 @@ var distExports = requireDist(), execa$1 = { exports: {} }, crossSpawn = { expor
|
|
17989
17996
|
function requireWindows() {
|
17990
17997
|
if (hasRequiredWindows) return windows$1;
|
17991
17998
|
hasRequiredWindows = 1, windows$1 = isexe, isexe.sync = sync2;
|
17992
|
-
var fs2 = require$$0__default
|
17999
|
+
var fs2 = require$$0__default.default;
|
17993
18000
|
function checkPathExt(path2, options2) {
|
17994
18001
|
var pathext = options2.pathExt !== void 0 ? options2.pathExt : process.env.PATHEXT;
|
17995
18002
|
if (!pathext || (pathext = pathext.split(";"), pathext.indexOf("") !== -1))
|
@@ -18018,7 +18025,7 @@ var mode, hasRequiredMode;
|
|
18018
18025
|
function requireMode() {
|
18019
18026
|
if (hasRequiredMode) return mode;
|
18020
18027
|
hasRequiredMode = 1, mode = isexe, isexe.sync = sync2;
|
18021
|
-
var fs2 = require$$0__default
|
18028
|
+
var fs2 = require$$0__default.default;
|
18022
18029
|
function isexe(path2, options2, cb) {
|
18023
18030
|
fs2.stat(path2, function(er, stat2) {
|
18024
18031
|
cb(er, er ? !1 : checkStat(stat2, options2));
|
@@ -18071,7 +18078,7 @@ var which_1, hasRequiredWhich;
|
|
18071
18078
|
function requireWhich() {
|
18072
18079
|
if (hasRequiredWhich) return which_1;
|
18073
18080
|
hasRequiredWhich = 1;
|
18074
|
-
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", path2 = require$$0__default.default, COLON = isWindows ? ";" : ":", isexe = requireIsexe(), getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), getPathInfo = (cmd, opt) => {
|
18081
|
+
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", path2 = require$$0__default$1.default, COLON = isWindows ? ";" : ":", isexe = requireIsexe(), getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), getPathInfo = (cmd, opt) => {
|
18075
18082
|
const colon = opt.colon || COLON, pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [
|
18076
18083
|
// windows always checks the cwd first
|
18077
18084
|
...isWindows ? [process.cwd()] : [],
|
@@ -18143,7 +18150,7 @@ var resolveCommand_1, hasRequiredResolveCommand;
|
|
18143
18150
|
function requireResolveCommand() {
|
18144
18151
|
if (hasRequiredResolveCommand) return resolveCommand_1;
|
18145
18152
|
hasRequiredResolveCommand = 1;
|
18146
|
-
const path2 = require$$0__default.default, which2 = requireWhich(), getPathKey = requirePathKey();
|
18153
|
+
const path2 = require$$0__default$1.default, which2 = requireWhich(), getPathKey = requirePathKey();
|
18147
18154
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
18148
18155
|
const env = parsed.options.env || process.env, cwd = process.cwd(), hasCustomCwd = parsed.options.cwd != null, shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
|
18149
18156
|
if (shouldSwitchCwd)
|
@@ -18202,7 +18209,7 @@ var readShebang_1, hasRequiredReadShebang;
|
|
18202
18209
|
function requireReadShebang() {
|
18203
18210
|
if (hasRequiredReadShebang) return readShebang_1;
|
18204
18211
|
hasRequiredReadShebang = 1;
|
18205
|
-
const fs2 = require$$0__default
|
18212
|
+
const fs2 = require$$0__default.default, shebangCommand2 = requireShebangCommand();
|
18206
18213
|
function readShebang(command2) {
|
18207
18214
|
const buffer2 = Buffer.alloc(150);
|
18208
18215
|
let fd;
|
@@ -18218,7 +18225,7 @@ var parse_1$2, hasRequiredParse$3;
|
|
18218
18225
|
function requireParse$3() {
|
18219
18226
|
if (hasRequiredParse$3) return parse_1$2;
|
18220
18227
|
hasRequiredParse$3 = 1;
|
18221
|
-
const path2 = require$$0__default.default, resolveCommand = requireResolveCommand(), escape2 = require_escape(), readShebang = requireReadShebang(), isWin = process.platform === "win32", isExecutableRegExp = /\.(?:com|exe)$/i, isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
18228
|
+
const path2 = require$$0__default$1.default, resolveCommand = requireResolveCommand(), escape2 = require_escape(), readShebang = requireReadShebang(), isWin = process.platform === "win32", isExecutableRegExp = /\.(?:com|exe)$/i, isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
18222
18229
|
function detectShebang(parsed) {
|
18223
18230
|
parsed.file = resolveCommand(parsed);
|
18224
18231
|
const shebang = parsed.file && readShebang(parsed.file);
|
@@ -18318,7 +18325,7 @@ function requireStripFinalNewline() {
|
|
18318
18325
|
var npmRunPath = { exports: {} }, hasRequiredNpmRunPath;
|
18319
18326
|
function requireNpmRunPath() {
|
18320
18327
|
return hasRequiredNpmRunPath || (hasRequiredNpmRunPath = 1, function(module2) {
|
18321
|
-
const path2 = require$$0__default.default, pathKey2 = requirePathKey(), npmRunPath2 = (options2) => {
|
18328
|
+
const path2 = require$$0__default$1.default, pathKey2 = requirePathKey(), npmRunPath2 = (options2) => {
|
18322
18329
|
options2 = {
|
18323
18330
|
cwd: process.cwd(),
|
18324
18331
|
path: process.env[pathKey2()],
|
@@ -18378,7 +18385,7 @@ var error, hasRequiredError;
|
|
18378
18385
|
function requireError() {
|
18379
18386
|
if (hasRequiredError) return error;
|
18380
18387
|
hasRequiredError = 1;
|
18381
|
-
const os2 = require$$0__default$2.default, util2 = require$$0__default$
|
18388
|
+
const os2 = require$$0__default$2.default, util2 = require$$0__default$5.default, getCode = (error2, code) => error2 && error2.code ? [error2.code, os2.constants.errno[error2.code]] : Number.isInteger(code) ? [util2.getSystemErrorName(-code), code] : [], getErrorPrefix = ({ timedOut, timeout: timeout2, signal, exitCodeName, exitCode, isCanceled }) => timedOut ? `timed out after ${timeout2} milliseconds` : isCanceled ? "was canceled" : signal ? `was killed with ${signal}` : exitCode !== void 0 ? `failed with exit code ${exitCode} (${exitCodeName})` : "failed";
|
18382
18389
|
return error = ({
|
18383
18390
|
stdout,
|
18384
18391
|
stderr,
|
@@ -18608,7 +18615,7 @@ var hasRequiredGetStream;
|
|
18608
18615
|
function requireGetStream() {
|
18609
18616
|
if (hasRequiredGetStream) return getStream.exports;
|
18610
18617
|
hasRequiredGetStream = 1;
|
18611
|
-
const { constants: BufferConstants } = require$$0__default$
|
18618
|
+
const { constants: BufferConstants } = require$$0__default$9.default, pump = requirePump(), bufferStream2 = requireBufferStream();
|
18612
18619
|
class MaxBufferError extends Error {
|
18613
18620
|
constructor() {
|
18614
18621
|
super("maxBuffer exceeded"), this.name = "MaxBufferError";
|
@@ -18754,7 +18761,7 @@ var hasRequiredExeca;
|
|
18754
18761
|
function requireExeca() {
|
18755
18762
|
if (hasRequiredExeca) return execa$1.exports;
|
18756
18763
|
hasRequiredExeca = 1;
|
18757
|
-
const path2 = require$$0__default.default, childProcess2 = require$$1__default$2.default, crossSpawn2 = requireCrossSpawn(), stripFinalNewline2 = requireStripFinalNewline(), npmRunPath2 = requireNpmRunPath(), onetime2 = requireOnetime$1(), makeError = requireError(), normalizeStdio = requireStdio(), { spawnedKill, spawnedCancel, setupTimeout, setExitHandler } = requireKill(), { handleInput, getSpawnedResult, makeAllStream, validateInputSync } = requireStream(), { mergePromise, getSpawnedPromise } = requirePromise(), { joinCommand, parseCommand } = requireCommand(), DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100, getEnv = ({ env: envOption, extendEnv, preferLocal, localDir }) => {
|
18764
|
+
const path2 = require$$0__default$1.default, childProcess2 = require$$1__default$2.default, crossSpawn2 = requireCrossSpawn(), stripFinalNewline2 = requireStripFinalNewline(), npmRunPath2 = requireNpmRunPath(), onetime2 = requireOnetime$1(), makeError = requireError(), normalizeStdio = requireStdio(), { spawnedKill, spawnedCancel, setupTimeout, setExitHandler } = requireKill(), { handleInput, getSpawnedResult, makeAllStream, validateInputSync } = requireStream(), { mergePromise, getSpawnedPromise } = requirePromise(), { joinCommand, parseCommand } = requireCommand(), DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100, getEnv = ({ env: envOption, extendEnv, preferLocal, localDir }) => {
|
18758
18765
|
const env = extendEnv ? { ...process.env, ...envOption } : envOption;
|
18759
18766
|
return preferLocal ? npmRunPath2.env({ env, cwd: localDir }) : env;
|
18760
18767
|
}, handleArgs = (file, args, options2 = {}) => {
|
@@ -19042,7 +19049,7 @@ function requireToRegexRange() {
|
|
19042
19049
|
return b >= 0 && (positives = splitToPatterns(a, b, state, opts)), state.negatives = negatives, state.positives = positives, state.result = collatePatterns(negatives, positives), opts.capture === !0 ? state.result = `(${state.result})` : opts.wrap !== !1 && positives.length + negatives.length > 1 && (state.result = `(?:${state.result})`), toRegexRange.cache[cacheKey] = state, state.result;
|
19043
19050
|
};
|
19044
19051
|
function collatePatterns(neg, pos2, options2) {
|
19045
|
-
let onlyNegative = filterPatterns(neg, pos2, "-", !1), onlyPositive = filterPatterns(pos2, neg, "", !1), intersected = filterPatterns(neg, pos2, "-?", !0);
|
19052
|
+
let onlyNegative = filterPatterns(neg, pos2, "-", !1) || [], onlyPositive = filterPatterns(pos2, neg, "", !1) || [], intersected = filterPatterns(neg, pos2, "-?", !0) || [];
|
19046
19053
|
return onlyNegative.concat(intersected).concat(onlyPositive).join("|");
|
19047
19054
|
}
|
19048
19055
|
function splitToRanges(min2, max2) {
|
@@ -19137,7 +19144,7 @@ var fillRange, hasRequiredFillRange;
|
|
19137
19144
|
function requireFillRange() {
|
19138
19145
|
if (hasRequiredFillRange) return fillRange;
|
19139
19146
|
hasRequiredFillRange = 1;
|
19140
|
-
const util2 = require$$0__default$
|
19147
|
+
const util2 = require$$0__default$5.default, toRegexRange = requireToRegexRange(), isObject2 = (val) => val !== null && typeof val == "object" && !Array.isArray(val), transform = (toNumber) => (value) => toNumber === !0 ? Number(value) : String(value), isValidValue = (value) => typeof value == "number" || typeof value == "string" && value !== "", isNumber2 = (num) => Number.isInteger(+num), zeros = (input2) => {
|
19141
19148
|
let value = `${input2}`, index = -1;
|
19142
19149
|
if (value[0] === "-" && (value = value.slice(1)), value === "0") return !1;
|
19143
19150
|
for (; value[++index] === "0"; ) ;
|
@@ -19615,7 +19622,7 @@ var utils$1 = {}, constants$1, hasRequiredConstants$1;
|
|
19615
19622
|
function requireConstants$1() {
|
19616
19623
|
if (hasRequiredConstants$1) return constants$1;
|
19617
19624
|
hasRequiredConstants$1 = 1;
|
19618
|
-
const path2 = require$$0__default.default, WIN_SLASH = "\\\\/", WIN_NO_SLASH = `[^${WIN_SLASH}]`, DOT_LITERAL = "\\.", PLUS_LITERAL = "\\+", QMARK_LITERAL = "\\?", SLASH_LITERAL = "\\/", ONE_CHAR = "(?=.)", QMARK = "[^/]", END_ANCHOR = `(?:${SLASH_LITERAL}|$)`, START_ANCHOR = `(?:^|${SLASH_LITERAL})`, DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`, NO_DOT = `(?!${DOT_LITERAL})`, NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`, NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`, NO_DOTS_SLASH = `(?!${DOTS_SLASH})`, QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`, STAR = `${QMARK}*?`, POSIX_CHARS = {
|
19625
|
+
const path2 = require$$0__default$1.default, WIN_SLASH = "\\\\/", WIN_NO_SLASH = `[^${WIN_SLASH}]`, DOT_LITERAL = "\\.", PLUS_LITERAL = "\\+", QMARK_LITERAL = "\\?", SLASH_LITERAL = "\\/", ONE_CHAR = "(?=.)", QMARK = "[^/]", END_ANCHOR = `(?:${SLASH_LITERAL}|$)`, START_ANCHOR = `(?:^|${SLASH_LITERAL})`, DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`, NO_DOT = `(?!${DOT_LITERAL})`, NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`, NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`, NO_DOTS_SLASH = `(?!${DOTS_SLASH})`, QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`, STAR = `${QMARK}*?`, POSIX_CHARS = {
|
19619
19626
|
DOT_LITERAL,
|
19620
19627
|
PLUS_LITERAL,
|
19621
19628
|
QMARK_LITERAL,
|
@@ -19789,7 +19796,7 @@ function requireConstants$1() {
|
|
19789
19796
|
var hasRequiredUtils$1;
|
19790
19797
|
function requireUtils$1() {
|
19791
19798
|
return hasRequiredUtils$1 || (hasRequiredUtils$1 = 1, function(exports2) {
|
19792
|
-
const path2 = require$$0__default.default, win32 = process.platform === "win32", {
|
19799
|
+
const path2 = require$$0__default$1.default, win32 = process.platform === "win32", {
|
19793
19800
|
REGEX_BACKSLASH,
|
19794
19801
|
REGEX_REMOVE_BACKSLASH,
|
19795
19802
|
REGEX_SPECIAL_CHARS,
|
@@ -20452,7 +20459,7 @@ var picomatch_1, hasRequiredPicomatch$1;
|
|
20452
20459
|
function requirePicomatch$1() {
|
20453
20460
|
if (hasRequiredPicomatch$1) return picomatch_1;
|
20454
20461
|
hasRequiredPicomatch$1 = 1;
|
20455
|
-
const path2 = require$$0__default.default, scan2 = requireScan(), parse3 = requireParse$1(), utils2 = requireUtils$1(), constants2 = requireConstants$1(), isObject2 = (val) => val && typeof val == "object" && !Array.isArray(val), picomatch2 = (glob2, options2, returnState = !1) => {
|
20462
|
+
const path2 = require$$0__default$1.default, scan2 = requireScan(), parse3 = requireParse$1(), utils2 = requireUtils$1(), constants2 = requireConstants$1(), isObject2 = (val) => val && typeof val == "object" && !Array.isArray(val), picomatch2 = (glob2, options2, returnState = !1) => {
|
20456
20463
|
if (Array.isArray(glob2)) {
|
20457
20464
|
const fns = glob2.map((input2) => picomatch2(input2, options2, returnState));
|
20458
20465
|
return (str2) => {
|
@@ -20518,7 +20525,7 @@ var micromatch_1, hasRequiredMicromatch;
|
|
20518
20525
|
function requireMicromatch() {
|
20519
20526
|
if (hasRequiredMicromatch) return micromatch_1;
|
20520
20527
|
hasRequiredMicromatch = 1;
|
20521
|
-
const util2 = require$$0__default$
|
20528
|
+
const util2 = require$$0__default$5.default, braces = requireBraces(), picomatch2 = requirePicomatch(), utils2 = requireUtils$1(), isEmptyString = (v) => v === "" || v === "./", hasBraces = (v) => {
|
20522
20529
|
const index = v.indexOf("{");
|
20523
20530
|
return index > -1 && v.indexOf("}", index) > -1;
|
20524
20531
|
}, micromatch = (list2, patterns, options2) => {
|
@@ -20611,11 +20618,11 @@ var hasRequiredCore$3;
|
|
20611
20618
|
function requireCore$3() {
|
20612
20619
|
if (hasRequiredCore$3) return core$3;
|
20613
20620
|
hasRequiredCore$3 = 1;
|
20614
|
-
var __importDefault2 = core$3.__importDefault || function(mod) {
|
20621
|
+
var __importDefault2 = core$3 && core$3.__importDefault || function(mod) {
|
20615
20622
|
return mod && mod.__esModule ? mod : { default: mod };
|
20616
20623
|
};
|
20617
20624
|
Object.defineProperty(core$3, "__esModule", { value: !0 }), core$3.readPackageJSON = core$3.extractWorkspaces = core$3.isMatchWorkspaces = core$3.checkWorkspaces = core$3.findWorkspaceRoot = void 0;
|
20618
|
-
const path_1 = __importDefault2(require$$0__default.default), pkg_dir_1 = __importDefault2(pkgDir__default.default), fs_1 = require$$0__default
|
20625
|
+
const path_1 = __importDefault2(require$$0__default$1.default), pkg_dir_1 = __importDefault2(pkgDir__default.default), fs_1 = require$$0__default.default, micromatch_12 = __importDefault2(requireMicromatch());
|
20619
20626
|
function findWorkspaceRoot(initial) {
|
20620
20627
|
initial || (initial = process.cwd());
|
20621
20628
|
let _pkg = pkg_dir_1.default.sync(initial);
|
@@ -20782,7 +20789,7 @@ var hasRequiredLocatePath;
|
|
20782
20789
|
function requireLocatePath() {
|
20783
20790
|
if (hasRequiredLocatePath) return locatePath.exports;
|
20784
20791
|
hasRequiredLocatePath = 1;
|
20785
|
-
const path2 = require$$0__default.default, fs2 = require$$0__default
|
20792
|
+
const path2 = require$$0__default$1.default, fs2 = require$$0__default.default, { promisify } = require$$0__default$5.default, pLocate = requirePLocate(), fsStat = promisify(fs2.stat), fsLStat = promisify(fs2.lstat), typeMappings = {
|
20786
20793
|
directory: "isDirectory",
|
20787
20794
|
file: "isFile"
|
20788
20795
|
};
|
@@ -20828,7 +20835,7 @@ var pathExists = { exports: {} }, hasRequiredPathExists;
|
|
20828
20835
|
function requirePathExists() {
|
20829
20836
|
if (hasRequiredPathExists) return pathExists.exports;
|
20830
20837
|
hasRequiredPathExists = 1;
|
20831
|
-
const fs2 = require$$0__default
|
20838
|
+
const fs2 = require$$0__default.default, { promisify } = require$$0__default$5.default, pAccess = promisify(fs2.access);
|
20832
20839
|
return pathExists.exports = async (path2) => {
|
20833
20840
|
try {
|
20834
20841
|
return await pAccess(path2), !0;
|
@@ -20846,7 +20853,7 @@ function requirePathExists() {
|
|
20846
20853
|
var hasRequiredFindUp;
|
20847
20854
|
function requireFindUp() {
|
20848
20855
|
return hasRequiredFindUp || (hasRequiredFindUp = 1, function(module2) {
|
20849
|
-
const path2 = require$$0__default.default, locatePath2 = requireLocatePath(), pathExists2 = requirePathExists(), stop = Symbol("findUp.stop");
|
20856
|
+
const path2 = require$$0__default$1.default, locatePath2 = requireLocatePath(), pathExists2 = requirePathExists(), stop = Symbol("findUp.stop");
|
20850
20857
|
module2.exports = async (name, options2 = {}) => {
|
20851
20858
|
let directory = path2.resolve(options2.cwd || "");
|
20852
20859
|
const { root: root2 } = path2.parse(directory), paths = [].concat(name), runMatcher = async (locateOptions) => {
|
@@ -22106,7 +22113,7 @@ function requireLoader() {
|
|
22106
22113
|
for (var index = 0, length = documents.length; index < length; index += 1)
|
22107
22114
|
iterator2(documents[index]);
|
22108
22115
|
}
|
22109
|
-
function
|
22116
|
+
function load(input2, options2) {
|
22110
22117
|
var documents = loadDocuments(input2, options2);
|
22111
22118
|
if (documents.length !== 0) {
|
22112
22119
|
if (documents.length === 1)
|
@@ -22118,9 +22125,9 @@ function requireLoader() {
|
|
22118
22125
|
return typeof iterator2 == "object" && iterator2 !== null && typeof options2 > "u" && (options2 = iterator2, iterator2 = null), loadAll(input2, iterator2, common2.extend({ schema: DEFAULT_SAFE_SCHEMA }, options2));
|
22119
22126
|
}
|
22120
22127
|
function safeLoad(input2, options2) {
|
22121
|
-
return
|
22128
|
+
return load(input2, common2.extend({ schema: DEFAULT_SAFE_SCHEMA }, options2));
|
22122
22129
|
}
|
22123
|
-
return loader.loadAll = loadAll, loader.load =
|
22130
|
+
return loader.loadAll = loadAll, loader.load = load, loader.safeLoadAll = safeLoadAll, loader.safeLoad = safeLoad, loader;
|
22124
22131
|
}
|
22125
22132
|
var dumper = {}, hasRequiredDumper;
|
22126
22133
|
function requireDumper() {
|
@@ -22426,7 +22433,7 @@ var whichPm, hasRequiredWhichPm;
|
|
22426
22433
|
function requireWhichPm() {
|
22427
22434
|
if (hasRequiredWhichPm) return whichPm;
|
22428
22435
|
hasRequiredWhichPm = 1;
|
22429
|
-
const path2 = require$$0__default.default, pathExists2 = requirePathExists(), loadYamlFile2 = requireLoadYamlFile();
|
22436
|
+
const path2 = require$$0__default$1.default, pathExists2 = requirePathExists(), loadYamlFile2 = requireLoadYamlFile();
|
22430
22437
|
whichPm = async function(pkgPath) {
|
22431
22438
|
const modulesPath = path2.join(pkgPath, "node_modules");
|
22432
22439
|
if (await pathExists2(path2.join(modulesPath, ".yarn-integrity"))) return { name: "yarn" };
|
@@ -22459,7 +22466,7 @@ var preferredPm, hasRequiredPreferredPm;
|
|
22459
22466
|
function requirePreferredPm() {
|
22460
22467
|
if (hasRequiredPreferredPm) return preferredPm;
|
22461
22468
|
hasRequiredPreferredPm = 1;
|
22462
|
-
const findYarnWorkspaceRoot = requireFindYarnWorkspaceRoot2(), findUp2 = requireFindUp(), path2 = require$$0__default.default, pathExists2 = requirePathExists(), whichPM = requireWhichPm();
|
22469
|
+
const findYarnWorkspaceRoot = requireFindYarnWorkspaceRoot2(), findUp2 = requireFindUp(), path2 = require$$0__default$1.default, pathExists2 = requirePathExists(), whichPM = requireWhichPm();
|
22463
22470
|
return preferredPm = async function(pkgPath) {
|
22464
22471
|
if (typeof pkgPath != "string")
|
22465
22472
|
throw new TypeError(`pkgPath should be a string, got ${typeof pkgPath}`);
|
@@ -22710,7 +22717,7 @@ function requireIni() {
|
|
22710
22717
|
var hasRequiredGlobalDirs;
|
22711
22718
|
function requireGlobalDirs() {
|
22712
22719
|
return hasRequiredGlobalDirs || (hasRequiredGlobalDirs = 1, function(exports2) {
|
22713
|
-
const path2 = require$$0__default.default, os2 = require$$0__default$2.default, fs2 = require$$0__default
|
22720
|
+
const path2 = require$$0__default$1.default, os2 = require$$0__default$2.default, fs2 = require$$0__default.default, ini2 = requireIni(), isWindows = process.platform === "win32", readRc = (filePath) => {
|
22714
22721
|
try {
|
22715
22722
|
return ini2.parse(fs2.readFileSync(filePath, "utf8")).prefix;
|
22716
22723
|
} catch {
|
@@ -22771,7 +22778,7 @@ var isPathInside, hasRequiredIsPathInside;
|
|
22771
22778
|
function requireIsPathInside() {
|
22772
22779
|
if (hasRequiredIsPathInside) return isPathInside;
|
22773
22780
|
hasRequiredIsPathInside = 1;
|
22774
|
-
const path2 = require$$0__default.default;
|
22781
|
+
const path2 = require$$0__default$1.default;
|
22775
22782
|
return isPathInside = (childPath, parentPath) => {
|
22776
22783
|
const relation = path2.relative(parentPath, childPath);
|
22777
22784
|
return !!(relation && relation !== ".." && !relation.startsWith(`..${path2.sep}`) && relation !== path2.resolve(childPath));
|
@@ -22781,7 +22788,7 @@ var isInstalledGlobally$1, hasRequiredIsInstalledGlobally;
|
|
22781
22788
|
function requireIsInstalledGlobally() {
|
22782
22789
|
if (hasRequiredIsInstalledGlobally) return isInstalledGlobally$1;
|
22783
22790
|
hasRequiredIsInstalledGlobally = 1;
|
22784
|
-
const fs2 = require$$0__default
|
22791
|
+
const fs2 = require$$0__default.default, globalDirs2 = requireGlobalDirs(), isPathInside2 = requireIsPathInside();
|
22785
22792
|
return isInstalledGlobally$1 = (() => {
|
22786
22793
|
try {
|
22787
22794
|
return isPathInside2(__dirname, globalDirs2.yarn.packages) || isPathInside2(__dirname, fs2.realpathSync(globalDirs2.npm.packages));
|
@@ -22860,7 +22867,7 @@ var gitconfiglocal, hasRequiredGitconfiglocal;
|
|
22860
22867
|
function requireGitconfiglocal() {
|
22861
22868
|
if (hasRequiredGitconfiglocal) return gitconfiglocal;
|
22862
22869
|
hasRequiredGitconfiglocal = 1;
|
22863
|
-
const fs2 = require$$0__default
|
22870
|
+
const fs2 = require$$0__default.default.promises, ini2 = requireIni$1(), path2 = require$$0__default$1.default;
|
22864
22871
|
gitconfiglocal = async function(dir, options2 = {}) {
|
22865
22872
|
const config2 = await findGit(dir, options2);
|
22866
22873
|
if (!config2) throw new Error("no gitconfig to be found at " + dir);
|
@@ -22904,7 +22911,7 @@ var fsExistsSync, hasRequiredFsExistsSync;
|
|
22904
22911
|
function requireFsExistsSync() {
|
22905
22912
|
if (hasRequiredFsExistsSync) return fsExistsSync;
|
22906
22913
|
hasRequiredFsExistsSync = 1;
|
22907
|
-
var fs2 = require$$0__default
|
22914
|
+
var fs2 = require$$0__default.default;
|
22908
22915
|
return fsExistsSync = function(filepath) {
|
22909
22916
|
try {
|
22910
22917
|
return (fs2.accessSync || fs2.statSync)(filepath), !0;
|
@@ -22977,7 +22984,7 @@ var polyfill, hasRequiredPolyfill;
|
|
22977
22984
|
function requirePolyfill() {
|
22978
22985
|
if (hasRequiredPolyfill) return polyfill;
|
22979
22986
|
hasRequiredPolyfill = 1;
|
22980
|
-
var fs2 = require$$0__default
|
22987
|
+
var fs2 = require$$0__default.default, parse3 = requireParsePasswd();
|
22981
22988
|
function homedir() {
|
22982
22989
|
if (process.platform === "win32")
|
22983
22990
|
return process.env.USERPROFILE ? process.env.USERPROFILE : process.env.HOMEDRIVE && process.env.HOMEPATH ? process.env.HOMEDRIVE + process.env.HOMEPATH : process.env.HOME ? process.env.HOME : null;
|
@@ -23023,7 +23030,7 @@ var gitConfigPath, hasRequiredGitConfigPath;
|
|
23023
23030
|
function requireGitConfigPath() {
|
23024
23031
|
if (hasRequiredGitConfigPath) return gitConfigPath;
|
23025
23032
|
hasRequiredGitConfigPath = 1;
|
23026
|
-
var path2 = require$$0__default.default, exists = requireFsExistsSync(), extend = requireExtendShallow(), homedir = requireHomedirPolyfill();
|
23033
|
+
var path2 = require$$0__default$1.default, exists = requireFsExistsSync(), extend = requireExtendShallow(), homedir = requireHomedirPolyfill();
|
23027
23034
|
return gitConfigPath = function(type2, options2) {
|
23028
23035
|
typeof type2 != "string" && (options2 = type2, type2 = null);
|
23029
23036
|
var opts = extend({ cwd: process.cwd() }, options2);
|
@@ -23047,7 +23054,7 @@ var parseGitConfig, hasRequiredParseGitConfig;
|
|
23047
23054
|
function requireParseGitConfig() {
|
23048
23055
|
if (hasRequiredParseGitConfig) return parseGitConfig;
|
23049
23056
|
hasRequiredParseGitConfig = 1;
|
23050
|
-
var fs2 = require$$0__default
|
23057
|
+
var fs2 = require$$0__default.default, path2 = require$$0__default$1.default, exists = requireFsExistsSync(), extend = requireExtendShallow(), configPath = requireGitConfigPath(), ini2 = requireIni$1();
|
23051
23058
|
function parse3(options2, cb) {
|
23052
23059
|
if (typeof options2 == "function" && (cb = options2, options2 = {}), typeof cb != "function")
|
23053
23060
|
throw new TypeError("parse-git-config async expects a callback function.");
|
@@ -23119,9 +23126,9 @@ function getProjectDefaults(workDir, { isPlugin, context }) {
|
|
23119
23126
|
license: "UNLICENSED",
|
23120
23127
|
author: getUserInfo(context),
|
23121
23128
|
// Don't try to use git remote from main Sanity project for plugins
|
23122
|
-
gitRemote:
|
23129
|
+
gitRemote: resolveGitRemote(cwd),
|
23123
23130
|
// Don't try to guess plugin name if we're initing from Sanity root
|
23124
|
-
projectName:
|
23131
|
+
projectName: path__default.default.basename(cwd),
|
23125
23132
|
// If we're initing a plugin, don't use description from Sanity readme
|
23126
23133
|
description: getProjectDescription({ isSanityRoot, isPlugin, outputDir: cwd })
|
23127
23134
|
});
|
@@ -23158,7 +23165,7 @@ async function getProjectDescription({
|
|
23158
23165
|
isPlugin,
|
23159
23166
|
outputDir
|
23160
23167
|
}) {
|
23161
|
-
if (!
|
23168
|
+
if (!isSanityRoot)
|
23162
23169
|
return Promise.resolve("");
|
23163
23170
|
try {
|
23164
23171
|
const readmePath = path__default.default.join(outputDir, "README.md"), match2 = (await fs__default.default.readFile(readmePath, { encoding: "utf8" })).match(/^# .*?\n+(\w.*?)(?:$|\n)/);
|
@@ -23488,7 +23495,7 @@ var minizlib = {}, constants, hasRequiredConstants;
|
|
23488
23495
|
function requireConstants() {
|
23489
23496
|
if (hasRequiredConstants) return constants;
|
23490
23497
|
hasRequiredConstants = 1;
|
23491
|
-
const realZlibConstants = require$$0__default$
|
23498
|
+
const realZlibConstants = require$$0__default$a.default.constants || /* istanbul ignore next */
|
23492
23499
|
{ ZLIB_VERNUM: 4736 };
|
23493
23500
|
return constants = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), {
|
23494
23501
|
Z_NO_FLUSH: 0,
|
@@ -23855,7 +23862,7 @@ var hasRequiredMinizlib;
|
|
23855
23862
|
function requireMinizlib() {
|
23856
23863
|
if (hasRequiredMinizlib) return minizlib;
|
23857
23864
|
hasRequiredMinizlib = 1;
|
23858
|
-
const assert = require$$0__default$
|
23865
|
+
const assert = require$$0__default$6.default, Buffer2 = require$$0__default$9.default.Buffer, realZlib = require$$0__default$a.default, constants2 = minizlib.constants = requireConstants(), Minipass2 = requireMinipass(), OriginalBufferConcat = Buffer2.concat, _superWrite = Symbol("_superWrite");
|
23859
23866
|
class ZlibError extends Error {
|
23860
23867
|
constructor(err) {
|
23861
23868
|
super("zlib: " + err.message), this.code = err.code, this.errno = err.errno, this.code || (this.code = "ZLIB_ERROR"), this.message = "zlib: " + err.message, Error.captureStackTrace(this, this.constructor);
|
@@ -24160,7 +24167,7 @@ var header, hasRequiredHeader;
|
|
24160
24167
|
function requireHeader() {
|
24161
24168
|
if (hasRequiredHeader) return header;
|
24162
24169
|
hasRequiredHeader = 1;
|
24163
|
-
const types2 = requireTypes$1(), pathModule = require$$0__default.default.posix, large = requireLargeNumbers(), SLURP = Symbol("slurp"), TYPE = Symbol("type");
|
24170
|
+
const types2 = requireTypes$1(), pathModule = require$$0__default$1.default.posix, large = requireLargeNumbers(), SLURP = Symbol("slurp"), TYPE = Symbol("type");
|
24164
24171
|
class Header {
|
24165
24172
|
constructor(data, off, ex, gex) {
|
24166
24173
|
this.cksumValid = !1, this.needPax = !1, this.nullBlock = !1, this.block = null, this.path = null, this.mode = null, this.uid = null, this.gid = null, this.size = null, this.mtime = null, this.cksum = null, this[TYPE] = "0", this.linkpath = null, this.uname = null, this.gname = null, this.devmaj = 0, this.devmin = 0, this.atime = null, this.ctime = null, Buffer.isBuffer(data) ? this.decode(data, off || 0, ex, gex) : data && this.set(data);
|
@@ -24239,7 +24246,7 @@ var pax, hasRequiredPax;
|
|
24239
24246
|
function requirePax() {
|
24240
24247
|
if (hasRequiredPax) return pax;
|
24241
24248
|
hasRequiredPax = 1;
|
24242
|
-
const Header = requireHeader(), path2 = require$$0__default.default;
|
24249
|
+
const Header = requireHeader(), path2 = require$$0__default$1.default;
|
24243
24250
|
class Pax {
|
24244
24251
|
constructor(obj, global2) {
|
24245
24252
|
this.atime = obj.atime || null, this.charset = obj.charset || null, this.comment = obj.comment || null, this.ctime = obj.ctime || null, this.gid = obj.gid || null, this.gname = obj.gname || null, this.linkpath = obj.linkpath || null, this.mtime = obj.mtime || null, this.path = obj.path || null, this.size = obj.size || null, this.uid = obj.uid || null, this.uname = obj.uname || null, this.dev = obj.dev || null, this.ino = obj.ino || null, this.nlink = obj.nlink || null, this.global = global2 || !1;
|
@@ -24338,7 +24345,7 @@ var stripAbsolutePath, hasRequiredStripAbsolutePath;
|
|
24338
24345
|
function requireStripAbsolutePath() {
|
24339
24346
|
if (hasRequiredStripAbsolutePath) return stripAbsolutePath;
|
24340
24347
|
hasRequiredStripAbsolutePath = 1;
|
24341
|
-
const { isAbsolute, parse: parse3 } = require$$0__default.default.win32;
|
24348
|
+
const { isAbsolute, parse: parse3 } = require$$0__default$1.default.win32;
|
24342
24349
|
return stripAbsolutePath = (path2) => {
|
24343
24350
|
let r = "", parsed = parse3(path2);
|
24344
24351
|
for (; isAbsolute(path2) || parsed.root; ) {
|
@@ -24356,7 +24363,7 @@ var writeEntry, hasRequiredWriteEntry;
|
|
24356
24363
|
function requireWriteEntry() {
|
24357
24364
|
if (hasRequiredWriteEntry) return writeEntry;
|
24358
24365
|
hasRequiredWriteEntry = 1;
|
24359
|
-
const { Minipass: Minipass2 } = requireMinipass$1(), Pax = requirePax(), Header = requireHeader(), fs2 = require$$0__default
|
24366
|
+
const { Minipass: Minipass2 } = requireMinipass$1(), Pax = requirePax(), Header = requireHeader(), fs2 = require$$0__default.default, path2 = require$$0__default$1.default, normPath = requireNormalizeWindowsPath(), stripSlash = requireStripTrailingSlashes(), prefixPath = (path3, prefix) => prefix ? (path3 = normPath(path3).replace(/^\.(\/|$)/, ""), stripSlash(prefix) + "/" + path3) : normPath(path3), maxReadSize = 16 * 1024 * 1024, PROCESS2 = Symbol("process"), FILE = Symbol("file"), DIRECTORY = Symbol("directory"), SYMLINK = Symbol("symlink"), HARDLINK = Symbol("hardlink"), HEADER = Symbol("header"), READ2 = Symbol("read"), LSTAT = Symbol("lstat"), ONLSTAT = Symbol("onlstat"), ONREAD = Symbol("onread"), ONREADLINK = Symbol("onreadlink"), OPENFILE = Symbol("openfile"), ONOPENFILE = Symbol("onopenfile"), CLOSE = Symbol("close"), MODE = Symbol("mode"), AWAITDRAIN = Symbol("awaitDrain"), ONDRAIN = Symbol("ondrain"), PREFIX = Symbol("prefix"), HAD_ERROR = Symbol("hadError"), warner = requireWarnMixin(), winchars2 = requireWinchars(), stripAbsolutePath2 = requireStripAbsolutePath(), modeFix2 = requireModeFix(), WriteEntry = warner(class extends Minipass2 {
|
24360
24367
|
constructor(p, opt) {
|
24361
24368
|
if (opt = opt || {}, super(opt), typeof p != "string")
|
24362
24369
|
throw new TypeError("path is required");
|
@@ -24797,7 +24804,7 @@ function requirePack() {
|
|
24797
24804
|
this.path = path3 || "./", this.absolute = absolute, this.entry = null, this.stat = null, this.readdir = null, this.pending = !1, this.ignore = !1, this.piped = !1;
|
24798
24805
|
}
|
24799
24806
|
}
|
24800
|
-
const { Minipass: Minipass2 } = requireMinipass$1(), zlib = requireMinizlib(), ReadEntry = requireReadEntry(), WriteEntry = requireWriteEntry(), WriteEntrySync = WriteEntry.Sync, WriteEntryTar = WriteEntry.Tar, Yallist = requireYallist(), EOF2 = Buffer.alloc(1024), ONSTAT = Symbol("onStat"), ENDED = Symbol("ended"), QUEUE = Symbol("queue"), CURRENT = Symbol("current"), PROCESS2 = Symbol("process"), PROCESSING = Symbol("processing"), PROCESSJOB = Symbol("processJob"), JOBS = Symbol("jobs"), JOBDONE = Symbol("jobDone"), ADDFSENTRY = Symbol("addFSEntry"), ADDTARENTRY = Symbol("addTarEntry"), STAT = Symbol("stat"), READDIR = Symbol("readdir"), ONREADDIR = Symbol("onreaddir"), PIPE = Symbol("pipe"), ENTRY = Symbol("entry"), ENTRYOPT = Symbol("entryOpt"), WRITEENTRYCLASS = Symbol("writeEntryClass"), WRITE = Symbol("write"), ONDRAIN = Symbol("ondrain"), fs2 = require$$0__default
|
24807
|
+
const { Minipass: Minipass2 } = requireMinipass$1(), zlib = requireMinizlib(), ReadEntry = requireReadEntry(), WriteEntry = requireWriteEntry(), WriteEntrySync = WriteEntry.Sync, WriteEntryTar = WriteEntry.Tar, Yallist = requireYallist(), EOF2 = Buffer.alloc(1024), ONSTAT = Symbol("onStat"), ENDED = Symbol("ended"), QUEUE = Symbol("queue"), CURRENT = Symbol("current"), PROCESS2 = Symbol("process"), PROCESSING = Symbol("processing"), PROCESSJOB = Symbol("processJob"), JOBS = Symbol("jobs"), JOBDONE = Symbol("jobDone"), ADDFSENTRY = Symbol("addFSEntry"), ADDTARENTRY = Symbol("addTarEntry"), STAT = Symbol("stat"), READDIR = Symbol("readdir"), ONREADDIR = Symbol("onreaddir"), PIPE = Symbol("pipe"), ENTRY = Symbol("entry"), ENTRYOPT = Symbol("entryOpt"), WRITEENTRYCLASS = Symbol("writeEntryClass"), WRITE = Symbol("write"), ONDRAIN = Symbol("ondrain"), fs2 = require$$0__default.default, path2 = require$$0__default$1.default, warner = requireWarnMixin(), normPath = requireNormalizeWindowsPath(), Pack = warner(class extends Minipass2 {
|
24801
24808
|
constructor(opt) {
|
24802
24809
|
if (super(opt), opt = opt || /* @__PURE__ */ Object.create(null), this.opt = opt, this.file = opt.file || "", this.cwd = opt.cwd || process.cwd(), this.maxReadSize = opt.maxReadSize, this.preservePaths = !!opt.preservePaths, this.strict = !!opt.strict, this.noPax = !!opt.noPax, this.prefix = normPath(opt.prefix || ""), this.linkCache = opt.linkCache || /* @__PURE__ */ new Map(), this.statCache = opt.statCache || /* @__PURE__ */ new Map(), this.readdirCache = opt.readdirCache || /* @__PURE__ */ new Map(), this[WRITEENTRYCLASS] = WriteEntry, typeof opt.onwarn == "function" && this.on("warn", opt.onwarn), this.portable = !!opt.portable, this.zip = null, opt.gzip || opt.brotli) {
|
24803
24810
|
if (opt.gzip && opt.brotli)
|
@@ -24967,7 +24974,7 @@ var fsMinipass = {}, hasRequiredFsMinipass;
|
|
24967
24974
|
function requireFsMinipass() {
|
24968
24975
|
if (hasRequiredFsMinipass) return fsMinipass;
|
24969
24976
|
hasRequiredFsMinipass = 1;
|
24970
|
-
const MiniPass = requireMinipass(), EE = require$$0__default$7.default.EventEmitter, fs2 = require$$0__default
|
24977
|
+
const MiniPass = requireMinipass(), EE = require$$0__default$7.default.EventEmitter, fs2 = require$$0__default.default;
|
24971
24978
|
let writev = fs2.writev;
|
24972
24979
|
if (!writev) {
|
24973
24980
|
const binding = process.binding("fs"), FSReqWrap = binding.FSReqWrap || binding.FSReqCallback;
|
@@ -25383,7 +25390,7 @@ var list_1, hasRequiredList$1;
|
|
25383
25390
|
function requireList$1() {
|
25384
25391
|
if (hasRequiredList$1) return list_1;
|
25385
25392
|
hasRequiredList$1 = 1;
|
25386
|
-
const hlo = requireHighLevelOpt(), Parser = requireParse(), fs2 = require$$0__default
|
25393
|
+
const hlo = requireHighLevelOpt(), Parser = requireParse(), fs2 = require$$0__default.default, fsm = requireFsMinipass(), path2 = require$$0__default$1.default, stripSlash = requireStripTrailingSlashes();
|
25387
25394
|
list_1 = (opt_, files, cb) => {
|
25388
25395
|
typeof opt_ == "function" ? (cb = opt_, files = null, opt_ = {}) : Array.isArray(opt_) && (files = opt_, opt_ = {}), typeof files == "function" && (cb = files, files = null), files ? files = Array.from(files) : files = [];
|
25389
25396
|
const opt = hlo(opt_);
|
@@ -25450,7 +25457,7 @@ var create_1, hasRequiredCreate;
|
|
25450
25457
|
function requireCreate() {
|
25451
25458
|
if (hasRequiredCreate) return create_1;
|
25452
25459
|
hasRequiredCreate = 1;
|
25453
|
-
const hlo = requireHighLevelOpt(), Pack = requirePack(), fsm = requireFsMinipass(), t = requireList$1(), path2 = require$$0__default.default;
|
25460
|
+
const hlo = requireHighLevelOpt(), Pack = requirePack(), fsm = requireFsMinipass(), t = requireList$1(), path2 = require$$0__default$1.default;
|
25454
25461
|
create_1 = (opt_, files, cb) => {
|
25455
25462
|
if (typeof files == "function" && (cb = files), Array.isArray(opt_) && (files = opt_, opt_ = {}), !files || !Array.isArray(files) || !files.length)
|
25456
25463
|
throw new TypeError("no files or directories specified");
|
@@ -25510,7 +25517,7 @@ var replace_1, hasRequiredReplace;
|
|
25510
25517
|
function requireReplace() {
|
25511
25518
|
if (hasRequiredReplace) return replace_1;
|
25512
25519
|
hasRequiredReplace = 1;
|
25513
|
-
const hlo = requireHighLevelOpt(), Pack = requirePack(), fs2 = require$$0__default
|
25520
|
+
const hlo = requireHighLevelOpt(), Pack = requirePack(), fs2 = require$$0__default.default, fsm = requireFsMinipass(), t = requireList$1(), path2 = require$$0__default$1.default, Header = requireHeader();
|
25514
25521
|
replace_1 = (opt_, files, cb) => {
|
25515
25522
|
const opt = hlo(opt_);
|
25516
25523
|
if (!opt.file)
|
@@ -25674,11 +25681,11 @@ function requireUpdate() {
|
|
25674
25681
|
};
|
25675
25682
|
return update;
|
25676
25683
|
}
|
25677
|
-
var mkdir
|
25684
|
+
var mkdir = { exports: {} }, optsArg_1, hasRequiredOptsArg;
|
25678
25685
|
function requireOptsArg() {
|
25679
25686
|
if (hasRequiredOptsArg) return optsArg_1;
|
25680
25687
|
hasRequiredOptsArg = 1;
|
25681
|
-
const { promisify } = require$$0__default$
|
25688
|
+
const { promisify } = require$$0__default$5.default, fs2 = require$$0__default.default;
|
25682
25689
|
return optsArg_1 = (opts) => {
|
25683
25690
|
if (!opts)
|
25684
25691
|
opts = { mode: 511, fs: fs2 };
|
@@ -25697,7 +25704,7 @@ var pathArg_1, hasRequiredPathArg;
|
|
25697
25704
|
function requirePathArg() {
|
25698
25705
|
if (hasRequiredPathArg) return pathArg_1;
|
25699
25706
|
hasRequiredPathArg = 1;
|
25700
|
-
const platform2 = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform, { resolve, parse: parse3 } = require$$0__default.default;
|
25707
|
+
const platform2 = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform, { resolve, parse: parse3 } = require$$0__default$1.default;
|
25701
25708
|
return pathArg_1 = (path2) => {
|
25702
25709
|
if (/\0/.test(path2))
|
25703
25710
|
throw Object.assign(
|
@@ -25722,7 +25729,7 @@ var findMade_1, hasRequiredFindMade;
|
|
25722
25729
|
function requireFindMade() {
|
25723
25730
|
if (hasRequiredFindMade) return findMade_1;
|
25724
25731
|
hasRequiredFindMade = 1;
|
25725
|
-
const { dirname } = require$$0__default.default, findMade = (opts, parent, path2 = void 0) => path2 === parent ? Promise.resolve() : opts.statAsync(parent).then(
|
25732
|
+
const { dirname } = require$$0__default$1.default, findMade = (opts, parent, path2 = void 0) => path2 === parent ? Promise.resolve() : opts.statAsync(parent).then(
|
25726
25733
|
(st) => st.isDirectory() ? path2 : void 0,
|
25727
25734
|
// will fail later
|
25728
25735
|
(er) => er.code === "ENOENT" ? findMade(opts, dirname(parent), parent) : void 0
|
@@ -25740,7 +25747,7 @@ var mkdirpManual_1, hasRequiredMkdirpManual;
|
|
25740
25747
|
function requireMkdirpManual() {
|
25741
25748
|
if (hasRequiredMkdirpManual) return mkdirpManual_1;
|
25742
25749
|
hasRequiredMkdirpManual = 1;
|
25743
|
-
const { dirname } = require$$0__default.default, mkdirpManual = (path2, opts, made) => {
|
25750
|
+
const { dirname } = require$$0__default$1.default, mkdirpManual = (path2, opts, made) => {
|
25744
25751
|
opts.recursive = !1;
|
25745
25752
|
const parent = dirname(path2);
|
25746
25753
|
return parent === path2 ? opts.mkdirAsync(path2, opts).catch((er) => {
|
@@ -25790,7 +25797,7 @@ var mkdirpNative_1, hasRequiredMkdirpNative;
|
|
25790
25797
|
function requireMkdirpNative() {
|
25791
25798
|
if (hasRequiredMkdirpNative) return mkdirpNative_1;
|
25792
25799
|
hasRequiredMkdirpNative = 1;
|
25793
|
-
const { dirname } = require$$0__default.default, { findMade, findMadeSync } = requireFindMade(), { mkdirpManual, mkdirpManualSync } = requireMkdirpManual();
|
25800
|
+
const { dirname } = require$$0__default$1.default, { findMade, findMadeSync } = requireFindMade(), { mkdirpManual, mkdirpManualSync } = requireMkdirpManual();
|
25794
25801
|
return mkdirpNative_1 = { mkdirpNative: (path2, opts) => (opts.recursive = !0, dirname(path2) === path2 ? opts.mkdirAsync(path2, opts) : findMade(opts, path2).then((made) => opts.mkdirAsync(path2, opts).then(() => made).catch((er) => {
|
25795
25802
|
if (er.code === "ENOENT")
|
25796
25803
|
return mkdirpManual(path2, opts);
|
@@ -25812,7 +25819,7 @@ var useNative_1, hasRequiredUseNative;
|
|
25812
25819
|
function requireUseNative() {
|
25813
25820
|
if (hasRequiredUseNative) return useNative_1;
|
25814
25821
|
hasRequiredUseNative = 1;
|
25815
|
-
const fs2 = require$$0__default
|
25822
|
+
const fs2 = require$$0__default.default, versArr2 = (process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version).replace(/^v/, "").split("."), hasNative2 = +versArr2[0] > 10 || +versArr2[0] == 10 && +versArr2[1] >= 12;
|
25816
25823
|
return useNative_1 = { useNative: hasNative2 ? (opts) => opts.mkdir === fs2.mkdir : () => !1, useNativeSync: hasNative2 ? (opts) => opts.mkdirSync === fs2.mkdirSync : () => !1 }, useNative_1;
|
25817
25824
|
}
|
25818
25825
|
var mkdirp_1, hasRequiredMkdirp;
|
@@ -25826,7 +25833,7 @@ var chownr_1, hasRequiredChownr;
|
|
25826
25833
|
function requireChownr() {
|
25827
25834
|
if (hasRequiredChownr) return chownr_1;
|
25828
25835
|
hasRequiredChownr = 1;
|
25829
|
-
const fs2 = require$$0__default
|
25836
|
+
const fs2 = require$$0__default.default, path2 = require$$0__default$1.default, LCHOWN = fs2.lchown ? "lchown" : "chown", LCHOWNSYNC = fs2.lchownSync ? "lchownSync" : "chownSync", needEISDIRHandled = fs2.lchown && !process.version.match(/v1[1-9]+\./) && !process.version.match(/v10\.[6-9]/), lchownSync = (path3, uid, gid) => {
|
25830
25837
|
try {
|
25831
25838
|
return fs2[LCHOWNSYNC](path3, uid, gid);
|
25832
25839
|
} catch (er) {
|
@@ -25924,9 +25931,9 @@ function requireChownr() {
|
|
25924
25931
|
}
|
25925
25932
|
var hasRequiredMkdir;
|
25926
25933
|
function requireMkdir() {
|
25927
|
-
if (hasRequiredMkdir) return mkdir
|
25934
|
+
if (hasRequiredMkdir) return mkdir.exports;
|
25928
25935
|
hasRequiredMkdir = 1;
|
25929
|
-
const mkdirp = requireMkdirp(), fs2 = require$$0__default
|
25936
|
+
const mkdirp = requireMkdirp(), fs2 = require$$0__default.default, path2 = require$$0__default$1.default, chownr = requireChownr(), normPath = requireNormalizeWindowsPath();
|
25930
25937
|
class SymlinkError extends Error {
|
25931
25938
|
constructor(symlink, path3) {
|
25932
25939
|
super("Cannot extract through symbolic link"), this.path = path3, this.symlink = symlink;
|
@@ -25948,7 +25955,7 @@ function requireMkdir() {
|
|
25948
25955
|
(er || !st.isDirectory()) && (er = new CwdError(dir, er && er.code || "ENOTDIR")), cb(er);
|
25949
25956
|
});
|
25950
25957
|
};
|
25951
|
-
mkdir
|
25958
|
+
mkdir.exports = (dir, opt, cb) => {
|
25952
25959
|
dir = normPath(dir);
|
25953
25960
|
const umask = opt.umask, mode2 = opt.mode | 448, needChmod = (mode2 & umask) !== 0, uid = opt.uid, gid = opt.gid, doChown = typeof uid == "number" && typeof gid == "number" && (uid !== opt.processUid || gid !== opt.processGid), preserve = opt.preserve, unlink2 = opt.unlink, cache = opt.cache, cwd = normPath(opt.cwd), done = (er, created) => {
|
25954
25961
|
er ? cb(er) : (cSet(cache, dir, !0), created && doChown ? chownr(created, uid, gid, (er2) => done(er2)) : needChmod ? fs2.chmod(dir, mode2, cb) : cb());
|
@@ -25998,7 +26005,7 @@ function requireMkdir() {
|
|
25998
26005
|
throw new CwdError(dir, code);
|
25999
26006
|
}
|
26000
26007
|
};
|
26001
|
-
return mkdir
|
26008
|
+
return mkdir.exports.sync = (dir, opt) => {
|
26002
26009
|
dir = normPath(dir);
|
26003
26010
|
const umask = opt.umask, mode2 = opt.mode | 448, needChmod = (mode2 & umask) !== 0, uid = opt.uid, gid = opt.gid, doChown = typeof uid == "number" && typeof gid == "number" && (uid !== opt.processUid || gid !== opt.processGid), preserve = opt.preserve, unlink2 = opt.unlink, cache = opt.cache, cwd = normPath(opt.cwd), done = (created2) => {
|
26004
26011
|
cSet(cache, dir, !0), created2 && doChown && chownr.sync(created2, uid, gid), needChmod && fs2.chmodSync(dir, mode2);
|
@@ -26027,7 +26034,7 @@ function requireMkdir() {
|
|
26027
26034
|
return new SymlinkError(part, part + "/" + parts.join("/"));
|
26028
26035
|
}
|
26029
26036
|
return done(created);
|
26030
|
-
}, mkdir
|
26037
|
+
}, mkdir.exports;
|
26031
26038
|
}
|
26032
26039
|
var normalizeUnicode, hasRequiredNormalizeUnicode;
|
26033
26040
|
function requireNormalizeUnicode() {
|
@@ -26040,7 +26047,7 @@ var pathReservations, hasRequiredPathReservations;
|
|
26040
26047
|
function requirePathReservations() {
|
26041
26048
|
if (hasRequiredPathReservations) return pathReservations;
|
26042
26049
|
hasRequiredPathReservations = 1;
|
26043
|
-
const assert = require$$0__default$
|
26050
|
+
const assert = require$$0__default$6.default, normalize2 = requireNormalizeUnicode(), stripSlashes = requireStripTrailingSlashes(), { join } = require$$0__default$1.default, isWindows = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
26044
26051
|
return pathReservations = () => {
|
26045
26052
|
const queues = /* @__PURE__ */ new Map(), reservations = /* @__PURE__ */ new Map(), getDirs = (path2) => path2.split("/").slice(0, -1).reduce((set2, path3) => (set2.length && (path3 = join(set2[set2.length - 1], path3)), set2.push(path3 || "/"), set2), []), running = /* @__PURE__ */ new Set(), getQueues = (fn) => {
|
26046
26053
|
const res = reservations.get(fn);
|
@@ -26084,14 +26091,14 @@ var getWriteFlag, hasRequiredGetWriteFlag;
|
|
26084
26091
|
function requireGetWriteFlag() {
|
26085
26092
|
if (hasRequiredGetWriteFlag) return getWriteFlag;
|
26086
26093
|
hasRequiredGetWriteFlag = 1;
|
26087
|
-
const isWindows = (process.env.__FAKE_PLATFORM__ || process.platform) === "win32", fs2 = loadEnv.commonjsGlobal.__FAKE_TESTING_FS__ || require$$0__default
|
26094
|
+
const isWindows = (process.env.__FAKE_PLATFORM__ || process.platform) === "win32", fs2 = loadEnv.commonjsGlobal.__FAKE_TESTING_FS__ || require$$0__default.default, { O_CREAT, O_TRUNC, O_WRONLY, UV_FS_O_FILEMAP = 0 } = fs2.constants, fMapEnabled = isWindows && !!UV_FS_O_FILEMAP, fMapLimit = 512 * 1024, fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY;
|
26088
26095
|
return getWriteFlag = fMapEnabled ? (size) => size < fMapLimit ? fMapFlag : "w" : () => "w", getWriteFlag;
|
26089
26096
|
}
|
26090
26097
|
var unpack, hasRequiredUnpack;
|
26091
26098
|
function requireUnpack() {
|
26092
26099
|
if (hasRequiredUnpack) return unpack;
|
26093
26100
|
hasRequiredUnpack = 1;
|
26094
|
-
const assert = require$$0__default$
|
26101
|
+
const assert = require$$0__default$6.default, Parser = requireParse(), fs2 = require$$0__default.default, fsm = requireFsMinipass(), path2 = require$$0__default$1.default, mkdir2 = requireMkdir(), wc = requireWinchars(), pathReservations2 = requirePathReservations(), stripAbsolutePath2 = requireStripAbsolutePath(), normPath = requireNormalizeWindowsPath(), stripSlash = requireStripTrailingSlashes(), normalize2 = requireNormalizeUnicode(), ONENTRY = Symbol("onEntry"), CHECKFS = Symbol("checkFs"), CHECKFS2 = Symbol("checkFs2"), PRUNECACHE = Symbol("pruneCache"), ISREUSABLE = Symbol("isReusable"), MAKEFS = Symbol("makeFs"), FILE = Symbol("file"), DIRECTORY = Symbol("directory"), LINK = Symbol("link"), SYMLINK = Symbol("symlink"), HARDLINK = Symbol("hardlink"), UNSUPPORTED = Symbol("unsupported"), CHECKPATH = Symbol("checkPath"), MKDIR = Symbol("mkdir"), ONERROR = Symbol("onError"), PENDING = Symbol("pending"), PEND = Symbol("pend"), UNPEND = Symbol("unpend"), ENDED = Symbol("ended"), MAYBECLOSE = Symbol("maybeClose"), SKIP = Symbol("skip"), DOCHOWN = Symbol("doChown"), UID = Symbol("uid"), GID = Symbol("gid"), CHECKED_CWD = Symbol("checkedCwd"), crypto = require$$3__default.default, getFlag = requireGetWriteFlag(), isWindows = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32", DEFAULT_MAX_DEPTH = 1024, unlinkFile = (path3, cb) => {
|
26095
26102
|
if (!isWindows)
|
26096
26103
|
return fs2.unlink(path3, cb);
|
26097
26104
|
const name = path3 + ".DELETE." + crypto.randomBytes(16).toString("hex");
|
@@ -26550,7 +26557,7 @@ var extract_1, hasRequiredExtract;
|
|
26550
26557
|
function requireExtract() {
|
26551
26558
|
if (hasRequiredExtract) return extract_1;
|
26552
26559
|
hasRequiredExtract = 1;
|
26553
|
-
const hlo = requireHighLevelOpt(), Unpack = requireUnpack(), fs2 = require$$0__default
|
26560
|
+
const hlo = requireHighLevelOpt(), Unpack = requireUnpack(), fs2 = require$$0__default.default, fsm = requireFsMinipass(), path2 = require$$0__default$1.default, stripSlash = requireStripTrailingSlashes();
|
26554
26561
|
extract_1 = (opt_, files, cb) => {
|
26555
26562
|
typeof opt_ == "function" ? (cb = opt_, files = null, opt_ = {}) : Array.isArray(opt_) && (files = opt_, opt_ = {}), typeof files == "function" && (cb = files, files = null), files ? files = Array.from(files) : files = [];
|
26556
26563
|
const opt = hlo(opt_);
|
@@ -35916,7 +35923,6 @@ function requirePrinter() {
|
|
35916
35923
|
function printGenerically(path3) {
|
35917
35924
|
return (0, comments_1.printComments)(path3, function(path4) {
|
35918
35925
|
return genericPrint(path4, config2, {
|
35919
|
-
includeComments: !0,
|
35920
35926
|
avoidRootParens: !1
|
35921
35927
|
}, printGenerically);
|
35922
35928
|
});
|
@@ -37218,7 +37224,7 @@ var hasRequiredMain$1;
|
|
37218
37224
|
function requireMain$1() {
|
37219
37225
|
return hasRequiredMain$1 || (hasRequiredMain$1 = 1, function(exports2) {
|
37220
37226
|
Object.defineProperty(exports2, "__esModule", { value: !0 }), exports2.run = exports2.prettyPrint = exports2.print = exports2.visit = exports2.types = exports2.parse = void 0;
|
37221
|
-
var tslib_1 = require$$0$3, fs_1 = tslib_1.__importDefault(require$$0__default
|
37227
|
+
var tslib_1 = require$$0$3, fs_1 = tslib_1.__importDefault(require$$0__default.default), types2 = tslib_1.__importStar(requireMain$2());
|
37222
37228
|
exports2.types = types2;
|
37223
37229
|
var parser_1 = requireParser();
|
37224
37230
|
Object.defineProperty(exports2, "parse", { enumerable: !0, get: function() {
|
@@ -42940,28 +42946,28 @@ function requireLib$1() {
|
|
42940
42946
|
}), this.finishNode(node, "TSTupleType");
|
42941
42947
|
}
|
42942
42948
|
tsParseTupleElementType() {
|
42943
|
-
const {
|
42949
|
+
const restStartLoc = this.state.startLoc, rest = this.eat(21), {
|
42944
42950
|
startLoc
|
42945
|
-
} = this.state
|
42951
|
+
} = this.state;
|
42946
42952
|
let labeled, label, optional, type2;
|
42947
42953
|
const chAfterWord = tokenIsKeywordOrIdentifier(this.state.type) ? this.lookaheadCharCode() : null;
|
42948
42954
|
if (chAfterWord === 58)
|
42949
42955
|
labeled = !0, optional = !1, label = this.parseIdentifier(!0), this.expect(14), type2 = this.tsParseType();
|
42950
42956
|
else if (chAfterWord === 63) {
|
42951
42957
|
optional = !0;
|
42952
|
-
const
|
42953
|
-
this.lookaheadCharCode() === 58 ? (labeled = !0, label = this.createIdentifier(this.startNodeAt(
|
42958
|
+
const wordName = this.state.value, typeOrLabel = this.tsParseNonArrayType();
|
42959
|
+
this.lookaheadCharCode() === 58 ? (labeled = !0, label = this.createIdentifier(this.startNodeAt(startLoc), wordName), this.expect(17), this.expect(14), type2 = this.tsParseType()) : (labeled = !1, type2 = typeOrLabel, this.expect(17));
|
42954
42960
|
} else
|
42955
42961
|
type2 = this.tsParseType(), optional = this.eat(17), labeled = this.eat(14);
|
42956
42962
|
if (labeled) {
|
42957
42963
|
let labeledNode;
|
42958
|
-
label ? (labeledNode = this.
|
42964
|
+
label ? (labeledNode = this.startNodeAt(startLoc), labeledNode.optional = optional, labeledNode.label = label, labeledNode.elementType = type2, this.eat(17) && (labeledNode.optional = !0, this.raise(TSErrors.TupleOptionalAfterType, this.state.lastTokStartLoc))) : (labeledNode = this.startNodeAt(startLoc), labeledNode.optional = optional, this.raise(TSErrors.InvalidTupleMemberLabel, type2), labeledNode.label = type2, labeledNode.elementType = this.tsParseType()), type2 = this.finishNode(labeledNode, "TSNamedTupleMember");
|
42959
42965
|
} else if (optional) {
|
42960
|
-
const optionalTypeNode = this.
|
42966
|
+
const optionalTypeNode = this.startNodeAt(startLoc);
|
42961
42967
|
optionalTypeNode.typeAnnotation = type2, type2 = this.finishNode(optionalTypeNode, "TSOptionalType");
|
42962
42968
|
}
|
42963
42969
|
if (rest) {
|
42964
|
-
const restNode = this.startNodeAt(
|
42970
|
+
const restNode = this.startNodeAt(restStartLoc);
|
42965
42971
|
restNode.typeAnnotation = type2, type2 = this.finishNode(restNode, "TSRestType");
|
42966
42972
|
}
|
42967
42973
|
return type2;
|
@@ -42990,8 +42996,10 @@ function requireLib$1() {
|
|
42990
42996
|
return this.finishNode(node, "TSLiteralType");
|
42991
42997
|
}
|
42992
42998
|
tsParseTemplateLiteralType() {
|
42993
|
-
|
42994
|
-
|
42999
|
+
{
|
43000
|
+
const node = this.startNode();
|
43001
|
+
return node.literal = super.parseTemplate(!1), this.finishNode(node, "TSLiteralType");
|
43002
|
+
}
|
42995
43003
|
}
|
42996
43004
|
parseTemplateSubstitution() {
|
42997
43005
|
return this.state.inType ? this.tsParseType() : super.parseTemplateSubstitution();
|
@@ -43046,13 +43054,16 @@ function requireLib$1() {
|
|
43046
43054
|
this.unexpected();
|
43047
43055
|
}
|
43048
43056
|
tsParseArrayTypeOrHigher() {
|
43057
|
+
const {
|
43058
|
+
startLoc
|
43059
|
+
} = this.state;
|
43049
43060
|
let type2 = this.tsParseNonArrayType();
|
43050
43061
|
for (; !this.hasPrecedingLineBreak() && this.eat(0); )
|
43051
43062
|
if (this.match(3)) {
|
43052
|
-
const node = this.
|
43063
|
+
const node = this.startNodeAt(startLoc);
|
43053
43064
|
node.elementType = type2, this.expect(3), type2 = this.finishNode(node, "TSArrayType");
|
43054
43065
|
} else {
|
43055
|
-
const node = this.
|
43066
|
+
const node = this.startNodeAt(startLoc);
|
43056
43067
|
node.objectType = type2, node.indexType = this.tsParseType(), this.expect(3), type2 = this.finishNode(node, "TSIndexedAccessType");
|
43057
43068
|
}
|
43058
43069
|
return type2;
|
@@ -43575,8 +43586,8 @@ function requireLib$1() {
|
|
43575
43586
|
}
|
43576
43587
|
parseExport(node, decorators) {
|
43577
43588
|
if (this.match(83)) {
|
43578
|
-
this.next();
|
43579
43589
|
const nodeImportEquals = node;
|
43590
|
+
this.next();
|
43580
43591
|
let maybeDefaultIdentifier = null;
|
43581
43592
|
return this.isContextual(130) && this.isPotentialImportPhase(!1) ? maybeDefaultIdentifier = this.parseMaybeImportPhase(nodeImportEquals, !1) : nodeImportEquals.importKind = "value", this.tsParseImportEqualsDeclaration(nodeImportEquals, maybeDefaultIdentifier, !0);
|
43582
43593
|
} else if (this.eat(29)) {
|
@@ -43691,7 +43702,7 @@ function requireLib$1() {
|
|
43691
43702
|
if (isDeclare && (this.isContextual(125) || !this.shouldParseExportDeclaration()))
|
43692
43703
|
throw this.raise(TSErrors.ExpectedAmbientAfterExportDeclare, this.state.startLoc);
|
43693
43704
|
const declaration = tokenIsIdentifier(this.state.type) && this.tsTryParseExportDeclaration() || super.parseExportDeclaration(node);
|
43694
|
-
return declaration ? ((declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare) && (node.exportKind = "type"), isDeclare && (this.resetStartLocation(declaration, startLoc), declaration.declare = !0), declaration) : null;
|
43705
|
+
return declaration ? ((declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare) && (node.exportKind = "type"), isDeclare && declaration.type !== "TSImportEqualsDeclaration" && (this.resetStartLocation(declaration, startLoc), declaration.declare = !0), declaration) : null;
|
43695
43706
|
}
|
43696
43707
|
parseClassId(node, isStatement, optionalId, bindingType) {
|
43697
43708
|
if ((!isStatement || optionalId) && this.isContextual(113))
|
@@ -46514,23 +46525,8 @@ var typescriptExports = requireTypescript(), typescript = /* @__PURE__ */ loadEn
|
|
46514
46525
|
__proto__: null,
|
46515
46526
|
default: typescript
|
46516
46527
|
}, [typescriptExports]);
|
46517
|
-
|
46518
|
-
|
46519
|
-
|
46520
|
-
export default defineCliConfig({
|
46521
|
-
api: {
|
46522
|
-
projectId: '%projectId%',
|
46523
|
-
dataset: '%dataset%'
|
46524
|
-
},
|
46525
|
-
/**
|
46526
|
-
* Enable auto-updates for studios.
|
46527
|
-
* Learn more at https://www.sanity.io/docs/cli#auto-updates
|
46528
|
-
*/
|
46529
|
-
autoUpdates: __BOOL__autoUpdates__,
|
46530
|
-
})
|
46531
|
-
`;
|
46532
|
-
function createCliConfig(options2) {
|
46533
|
-
const variables = options2, template = defaultTemplate$1.trimStart(), ast = mainExports.parse(template, { parser });
|
46528
|
+
function processTemplate(options2) {
|
46529
|
+
const { template, variables, includeBooleanTransform = !1 } = options2, ast = mainExports.parse(template.trimStart(), { parser });
|
46534
46530
|
return traverse__default.default(ast, {
|
46535
46531
|
StringLiteral: {
|
46536
46532
|
enter({ node }) {
|
@@ -46544,24 +46540,60 @@ function createCliConfig(options2) {
|
|
46544
46540
|
node.value = typeof newValue == "string" ? newValue : "";
|
46545
46541
|
}
|
46546
46542
|
},
|
46547
|
-
|
46548
|
-
|
46549
|
-
|
46550
|
-
|
46551
|
-
|
46552
|
-
/^__BOOL__(.+?)__$/,
|
46553
|
-
|
46554
|
-
|
46555
|
-
|
46556
|
-
|
46557
|
-
|
46558
|
-
|
46559
|
-
|
46560
|
-
path2.replaceWith({ type: "BooleanLiteral", value });
|
46543
|
+
...includeBooleanTransform && {
|
46544
|
+
Identifier: {
|
46545
|
+
enter(path2) {
|
46546
|
+
if (!path2.node.name.startsWith("__BOOL__"))
|
46547
|
+
return;
|
46548
|
+
const variableName = path2.node.name.replace(/^__BOOL__(.+?)__$/, "$1");
|
46549
|
+
if (!(variableName in variables))
|
46550
|
+
throw new Error(`Template variable '${variableName.toString()}' not defined`);
|
46551
|
+
const value = variables[variableName];
|
46552
|
+
if (typeof value != "boolean")
|
46553
|
+
throw new Error(`Expected boolean value for '${variableName.toString()}'`);
|
46554
|
+
path2.replaceWith({ type: "BooleanLiteral", value });
|
46555
|
+
}
|
46561
46556
|
}
|
46562
46557
|
}
|
46563
46558
|
}), mainExports.print(ast, { quote: "single" }).code;
|
46564
46559
|
}
|
46560
|
+
const defaultTemplate$1 = `
|
46561
|
+
import {defineCliConfig} from 'sanity/cli'
|
46562
|
+
|
46563
|
+
export default defineCliConfig({
|
46564
|
+
api: {
|
46565
|
+
projectId: '%projectId%',
|
46566
|
+
dataset: '%dataset%'
|
46567
|
+
},
|
46568
|
+
/**
|
46569
|
+
* Enable auto-updates for studios.
|
46570
|
+
* Learn more at https://www.sanity.io/docs/cli#auto-updates
|
46571
|
+
*/
|
46572
|
+
autoUpdates: __BOOL__autoUpdates__,
|
46573
|
+
})
|
46574
|
+
`;
|
46575
|
+
function createCliConfig(options2) {
|
46576
|
+
return processTemplate({
|
46577
|
+
template: defaultTemplate$1,
|
46578
|
+
variables: options2,
|
46579
|
+
includeBooleanTransform: !0
|
46580
|
+
});
|
46581
|
+
}
|
46582
|
+
const defaultCoreAppTemplate = `
|
46583
|
+
import {defineCliConfig} from 'sanity/cli'
|
46584
|
+
|
46585
|
+
export default defineCliConfig({
|
46586
|
+
__experimental_coreAppConfiguration: {
|
46587
|
+
appLocation: '%appLocation%'
|
46588
|
+
},
|
46589
|
+
})
|
46590
|
+
`;
|
46591
|
+
function createCoreAppCliConfig(options2) {
|
46592
|
+
return processTemplate({
|
46593
|
+
template: defaultCoreAppTemplate,
|
46594
|
+
variables: options2
|
46595
|
+
});
|
46596
|
+
}
|
46565
46597
|
/*!
|
46566
46598
|
* isobject <https://github.com/jonschlinkert/isobject>
|
46567
46599
|
*
|
@@ -46630,7 +46662,7 @@ function createPackageManifest(data) {
|
|
46630
46662
|
...getCommonManifest(data),
|
46631
46663
|
main: "package.json",
|
46632
46664
|
keywords: ["sanity"],
|
46633
|
-
scripts: {
|
46665
|
+
scripts: data.scripts || {
|
46634
46666
|
dev: "sanity dev",
|
46635
46667
|
start: "sanity start",
|
46636
46668
|
build: "sanity build",
|
@@ -46699,25 +46731,42 @@ export default defineConfig({
|
|
46699
46731
|
};
|
46700
46732
|
function createStudioConfig(options2) {
|
46701
46733
|
const variables = { ...defaultVariables, ...options2.variables };
|
46702
|
-
|
46703
|
-
|
46704
|
-
|
46705
|
-
|
46706
|
-
|
46707
|
-
|
46708
|
-
|
46709
|
-
|
46710
|
-
return;
|
46711
|
-
const variableName = value.slice(1, -1);
|
46712
|
-
if (!(variableName in variables))
|
46713
|
-
throw new Error(`Template variable '${value}' not defined`);
|
46714
|
-
const newValue = variables[variableName];
|
46715
|
-
node.value = typeof newValue == "string" ? newValue : "";
|
46716
|
-
}
|
46717
|
-
}
|
46718
|
-
}), mainExports.print(ast, { quote: "single" }).code;
|
46734
|
+
return typeof options2.template == "function" ? options2.template(variables).trimStart() : processTemplate({
|
46735
|
+
template: options2.template || defaultTemplate,
|
46736
|
+
variables
|
46737
|
+
});
|
46738
|
+
}
|
46739
|
+
const coreAppTemplates = ["core-app"];
|
46740
|
+
function determineCoreAppTemplate(templateName) {
|
46741
|
+
return coreAppTemplates.includes(templateName);
|
46719
46742
|
}
|
46720
|
-
const blogTemplate = {}, cleanTemplate = {},
|
46743
|
+
const blogTemplate = {}, cleanTemplate = {}, coreAppTemplate = {
|
46744
|
+
dependencies: {
|
46745
|
+
"@sanity/sdk": "^0.0.0-alpha",
|
46746
|
+
"@sanity/sdk-react": "^0.0.0-alpha",
|
46747
|
+
react: "^19",
|
46748
|
+
"react-dom": "^19"
|
46749
|
+
},
|
46750
|
+
devDependencies: {
|
46751
|
+
/*
|
46752
|
+
* this will be changed to eslint-config sanity,
|
46753
|
+
* eslint.config generation will be a fast follow
|
46754
|
+
*/
|
46755
|
+
"@sanity/eslint-config-studio": "^5.0.1",
|
46756
|
+
"@types/react": "^18.0.25",
|
46757
|
+
eslint: "^9.9.0",
|
46758
|
+
prettier: "^3.0.2",
|
46759
|
+
sanity: "^3",
|
46760
|
+
typescript: "^5.1.6"
|
46761
|
+
},
|
46762
|
+
appLocation: "./src/App.tsx",
|
46763
|
+
scripts: {
|
46764
|
+
// this will eventually run a concurrently process with another in-flight utility
|
46765
|
+
dev: "sanity app dev",
|
46766
|
+
build: "sanity app build",
|
46767
|
+
start: "sanity app start"
|
46768
|
+
}
|
46769
|
+
}, configTemplate$3 = `
|
46721
46770
|
import {defineConfig, isDev} from 'sanity'
|
46722
46771
|
import {visionTool} from '@sanity/vision'
|
46723
46772
|
import {structureTool} from 'sanity/structure'
|
@@ -46895,6 +46944,7 @@ export default defineConfig({
|
|
46895
46944
|
}, templates = {
|
46896
46945
|
blog: blogTemplate,
|
46897
46946
|
clean: cleanTemplate,
|
46947
|
+
"core-app": coreAppTemplate,
|
46898
46948
|
"get-started": getStartedTemplate,
|
46899
46949
|
moviedb: movieTemplate,
|
46900
46950
|
shopify: shopifyTemplate$1,
|
@@ -46915,7 +46965,7 @@ async function updateInitialTemplateMetadata(apiClient, projectId, templateName)
|
|
46915
46965
|
}
|
46916
46966
|
}
|
46917
46967
|
async function bootstrapLocalTemplate(opts, context) {
|
46918
|
-
const { apiClient, cliRoot, output } = context, templatesDir = path__default.default.join(cliRoot, "templates"), { outputPath, templateName, useTypeScript, packageName, variables } = opts, sourceDir = path__default.default.join(templatesDir, templateName), sharedDir = path__default.default.join(templatesDir, "shared"), template = templates[templateName];
|
46968
|
+
const { apiClient, cliRoot, output } = context, templatesDir = path__default.default.join(cliRoot, "templates"), { outputPath, templateName, useTypeScript, packageName, variables } = opts, sourceDir = path__default.default.join(templatesDir, templateName), sharedDir = path__default.default.join(templatesDir, "shared"), isCoreAppTemplate = determineCoreAppTemplate(templateName), template = templates[templateName];
|
46919
46969
|
if (!template)
|
46920
46970
|
throw new Error(`Template "${templateName}" not defined`);
|
46921
46971
|
loadEnv.debug('Copying files from template "%s" to "%s"', templateName, outputPath);
|
@@ -46930,19 +46980,20 @@ async function bootstrapLocalTemplate(opts, context) {
|
|
46930
46980
|
schemaUrl: opts.schemaUrl
|
46931
46981
|
})), spinner.succeed(), spinner = output.spinner("Resolving latest module versions").start();
|
46932
46982
|
const dependencyVersions = await resolveLatestVersions({
|
46933
|
-
...studioDependencies.dependencies,
|
46934
|
-
...studioDependencies.devDependencies,
|
46935
|
-
...template.dependencies || {}
|
46983
|
+
...isCoreAppTemplate ? {} : studioDependencies.dependencies,
|
46984
|
+
...isCoreAppTemplate ? {} : studioDependencies.devDependencies,
|
46985
|
+
...template.dependencies || {},
|
46986
|
+
...template.devDependencies || {}
|
46936
46987
|
});
|
46937
46988
|
spinner.succeed();
|
46938
46989
|
const dependencies = Object.keys({
|
46939
|
-
...studioDependencies.dependencies,
|
46990
|
+
...isCoreAppTemplate ? {} : studioDependencies.dependencies,
|
46940
46991
|
...template.dependencies
|
46941
46992
|
}).reduce(
|
46942
46993
|
(deps, dependency) => (deps[dependency] = dependencyVersions[dependency], deps),
|
46943
46994
|
{}
|
46944
46995
|
), devDependencies = Object.keys({
|
46945
|
-
...studioDependencies.devDependencies,
|
46996
|
+
...isCoreAppTemplate ? {} : studioDependencies.devDependencies,
|
46946
46997
|
...template.devDependencies
|
46947
46998
|
}).reduce(
|
46948
46999
|
(deps, dependency) => (deps[dependency] = dependencyVersions[dependency], deps),
|
@@ -46952,27 +47003,30 @@ async function bootstrapLocalTemplate(opts, context) {
|
|
46952
47003
|
const packageManifest = await createPackageManifest({
|
46953
47004
|
name: packageName,
|
46954
47005
|
dependencies,
|
46955
|
-
devDependencies
|
46956
|
-
|
47006
|
+
devDependencies,
|
47007
|
+
scripts: template.scripts
|
47008
|
+
}), studioConfig = createStudioConfig({
|
46957
47009
|
template: template.configTemplate,
|
46958
47010
|
variables
|
46959
|
-
}), cliConfig =
|
47011
|
+
}), cliConfig = isCoreAppTemplate ? createCoreAppCliConfig({ appLocation: template.appLocation }) : createCliConfig({
|
46960
47012
|
projectId: variables.projectId,
|
46961
47013
|
dataset: variables.dataset,
|
46962
47014
|
autoUpdates: variables.autoUpdates
|
46963
47015
|
}), codeExt = useTypeScript ? "ts" : "js";
|
46964
|
-
return await Promise.all(
|
46965
|
-
|
46966
|
-
|
46967
|
-
|
46968
|
-
|
46969
|
-
|
46970
|
-
|
47016
|
+
return await Promise.all(
|
47017
|
+
[
|
47018
|
+
isCoreAppTemplate ? Promise.resolve(null) : writeFileIfNotExists(`sanity.config.${codeExt}`, studioConfig),
|
47019
|
+
writeFileIfNotExists(`sanity.cli.${codeExt}`, cliConfig),
|
47020
|
+
writeFileIfNotExists("package.json", packageManifest),
|
47021
|
+
writeFileIfNotExists(
|
47022
|
+
"eslint.config.mjs",
|
47023
|
+
`import studio from '@sanity/eslint-config-studio'
|
46971
47024
|
|
46972
47025
|
export default [...studio]
|
46973
47026
|
`
|
46974
|
-
|
46975
|
-
|
47027
|
+
)
|
47028
|
+
].filter(Boolean)
|
47029
|
+
), loadEnv.debug("Updating initial template metadata"), await updateInitialTemplateMetadata(apiClient, variables.projectId, `cli-${templateName}`), spinner.succeed(), template;
|
46976
47030
|
async function writeFileIfNotExists(fileName, content) {
|
46977
47031
|
const filePath = path__default.default.join(outputPath, fileName);
|
46978
47032
|
try {
|
@@ -49351,11 +49405,11 @@ class Minipass extends node_events.EventEmitter {
|
|
49351
49405
|
return isStream;
|
49352
49406
|
}
|
49353
49407
|
}
|
49354
|
-
const realpathSync = require$$0$
|
49355
|
-
lstatSync: require$$0$
|
49356
|
-
readdir: require$$0$
|
49357
|
-
readdirSync: require$$0$
|
49358
|
-
readlinkSync: require$$0$
|
49408
|
+
const realpathSync = require$$0$4.realpathSync.native, defaultFS = {
|
49409
|
+
lstatSync: require$$0$4.lstatSync,
|
49410
|
+
readdir: require$$0$4.readdir,
|
49411
|
+
readdirSync: require$$0$4.readdirSync,
|
49412
|
+
readlinkSync: require$$0$4.readlinkSync,
|
49359
49413
|
realpathSync,
|
49360
49414
|
promises: {
|
49361
49415
|
lstat: fs.lstat,
|
@@ -51449,7 +51503,7 @@ var platform = process.env.__TESTING_RIMRAF_PLATFORM__ || process.platform;
|
|
51449
51503
|
const pathArg = (path2, opt = {}) => {
|
51450
51504
|
const type2 = typeof path2;
|
51451
51505
|
if (type2 !== "string") {
|
51452
|
-
const ctor = path2 && type2 === "object" && path2.constructor, msg = `The "path" argument must be of type string. Received ${ctor && ctor.name ? `an instance of ${ctor.name}` : type2 === "object" ? require$$0$
|
51506
|
+
const ctor = path2 && type2 === "object" && path2.constructor, msg = `The "path" argument must be of type string. Received ${ctor && ctor.name ? `an instance of ${ctor.name}` : type2 === "object" ? require$$0$9.inspect(path2) : `type ${type2} ${path2}`}`;
|
51453
51507
|
throw Object.assign(new TypeError(msg), {
|
51454
51508
|
path: path2,
|
51455
51509
|
code: "ERR_INVALID_ARG_TYPE"
|
@@ -51462,8 +51516,8 @@ const pathArg = (path2, opt = {}) => {
|
|
51462
51516
|
code: "ERR_INVALID_ARG_VALUE"
|
51463
51517
|
});
|
51464
51518
|
}
|
51465
|
-
path2 = require$$0$
|
51466
|
-
const { root: root2 } = require$$0$
|
51519
|
+
path2 = require$$0$5.resolve(path2);
|
51520
|
+
const { root: root2 } = require$$0$5.parse(path2);
|
51467
51521
|
if (path2 === root2 && opt.preserveRoot !== !1) {
|
51468
51522
|
const msg = "refusing to remove root directory without preserveRoot:false";
|
51469
51523
|
throw Object.assign(new Error(msg), {
|
@@ -51472,7 +51526,7 @@ const pathArg = (path2, opt = {}) => {
|
|
51472
51526
|
});
|
51473
51527
|
}
|
51474
51528
|
if (platform === "win32") {
|
51475
|
-
const badWinChars = /[*|"<>?:]/, { root: root3 } = require$$0$
|
51529
|
+
const badWinChars = /[*|"<>?:]/, { root: root3 } = require$$0$5.parse(path2);
|
51476
51530
|
if (badWinChars.test(path2.substring(root3.length)))
|
51477
51531
|
throw Object.assign(new Error("Illegal characters in path."), {
|
51478
51532
|
path: path2,
|
@@ -51480,9 +51534,8 @@ const pathArg = (path2, opt = {}) => {
|
|
51480
51534
|
});
|
51481
51535
|
}
|
51482
51536
|
return path2;
|
51483
|
-
}, readdirSync = (path2) => require$$0$
|
51537
|
+
}, readdirSync = (path2) => require$$0$4.readdirSync(path2, { withFileTypes: !0 }), chmod$2 = (path2, mode2) => new Promise((res, rej) => require$$0__default.default.chmod(path2, mode2, (er, ...d) => er ? rej(er) : res(...d))), readdir$1 = (path2) => new Promise((res, rej) => require$$0__default.default.readdir(path2, { withFileTypes: !0 }, (er, data) => er ? rej(er) : res(data))), rename$1 = (oldPath, newPath) => new Promise((res, rej) => require$$0__default.default.rename(oldPath, newPath, (er, ...d) => er ? rej(er) : res(...d))), rm$1 = (path2, options2) => new Promise((res, rej) => require$$0__default.default.rm(path2, options2, (er, ...d) => er ? rej(er) : res(...d))), rmdir$3 = (path2) => new Promise((res, rej) => require$$0__default.default.rmdir(path2, (er, ...d) => er ? rej(er) : res(...d))), stat$1 = (path2) => new Promise((res, rej) => require$$0__default.default.stat(path2, (er, data) => er ? rej(er) : res(data))), lstat$3 = (path2) => new Promise((res, rej) => require$$0__default.default.lstat(path2, (er, data) => er ? rej(er) : res(data))), unlink$3 = (path2) => new Promise((res, rej) => require$$0__default.default.unlink(path2, (er, ...d) => er ? rej(er) : res(...d))), promises = {
|
51484
51538
|
chmod: chmod$2,
|
51485
|
-
mkdir,
|
51486
51539
|
readdir: readdir$1,
|
51487
51540
|
rename: rename$1,
|
51488
51541
|
rm: rm$1,
|
@@ -51520,7 +51573,7 @@ const pathArg = (path2, opt = {}) => {
|
|
51520
51573
|
if (opt?.signal?.aborted)
|
51521
51574
|
throw opt.signal.reason;
|
51522
51575
|
try {
|
51523
|
-
return rimrafPosixDirSync(path2, opt, require$$0$
|
51576
|
+
return rimrafPosixDirSync(path2, opt, require$$0$4.lstatSync(path2));
|
51524
51577
|
} catch (er) {
|
51525
51578
|
if (er?.code === "ENOENT")
|
51526
51579
|
return !0;
|
@@ -51539,7 +51592,7 @@ const pathArg = (path2, opt = {}) => {
|
|
51539
51592
|
}
|
51540
51593
|
return opt.filter && !await opt.filter(path2, ent) ? !1 : (await ignoreENOENT(unlink$2(path2)), !0);
|
51541
51594
|
}
|
51542
|
-
return !(await Promise.all(entries.map((ent2) => rimrafPosixDir(require$$0$
|
51595
|
+
return !(await Promise.all(entries.map((ent2) => rimrafPosixDir(require$$0$5.resolve(path2, ent2.name), opt, ent2)))).reduce((a, b) => a && b, !0) || opt.preserveRoot === !1 && path2 === require$$0$5.parse(path2).root || opt.filter && !await opt.filter(path2, ent) ? !1 : (await ignoreENOENT(rmdir$2(path2)), !0);
|
51543
51596
|
}, rimrafPosixDirSync = (path2, opt, ent) => {
|
51544
51597
|
if (opt?.signal?.aborted)
|
51545
51598
|
throw opt.signal.reason;
|
@@ -51551,14 +51604,14 @@ const pathArg = (path2, opt = {}) => {
|
|
51551
51604
|
if (entries.code !== "ENOTDIR")
|
51552
51605
|
throw entries;
|
51553
51606
|
}
|
51554
|
-
return opt.filter && !opt.filter(path2, ent) ? !1 : (ignoreENOENTSync(() => require$$0$
|
51607
|
+
return opt.filter && !opt.filter(path2, ent) ? !1 : (ignoreENOENTSync(() => require$$0$4.unlinkSync(path2)), !0);
|
51555
51608
|
}
|
51556
51609
|
let removedAll = !0;
|
51557
51610
|
for (const ent2 of entries) {
|
51558
|
-
const p = require$$0$
|
51611
|
+
const p = require$$0$5.resolve(path2, ent2.name);
|
51559
51612
|
removedAll = rimrafPosixDirSync(p, opt, ent2) && removedAll;
|
51560
51613
|
}
|
51561
|
-
return opt.preserveRoot === !1 && path2 === require$$0$
|
51614
|
+
return opt.preserveRoot === !1 && path2 === require$$0$5.parse(path2).root || !removedAll || opt.filter && !opt.filter(path2, ent) ? !1 : (ignoreENOENTSync(() => require$$0$4.rmdirSync(path2)), !0);
|
51562
51615
|
}, { chmod: chmod$1 } = promises, fixEPERM = (fn) => async (path2) => {
|
51563
51616
|
try {
|
51564
51617
|
return await fn(path2);
|
@@ -51587,7 +51640,7 @@ const pathArg = (path2, opt = {}) => {
|
|
51587
51640
|
return;
|
51588
51641
|
if (fer?.code === "EPERM") {
|
51589
51642
|
try {
|
51590
|
-
require$$0$
|
51643
|
+
require$$0$4.chmodSync(path2, 438);
|
51591
51644
|
} catch (er2) {
|
51592
51645
|
if (er2?.code === "ENOENT")
|
51593
51646
|
return;
|
@@ -51638,23 +51691,23 @@ const pathArg = (path2, opt = {}) => {
|
|
51638
51691
|
}
|
51639
51692
|
}, { stat } = promises, isDirSync = (path2) => {
|
51640
51693
|
try {
|
51641
|
-
return require$$0$
|
51694
|
+
return require$$0$4.statSync(path2).isDirectory();
|
51642
51695
|
} catch {
|
51643
51696
|
return !1;
|
51644
51697
|
}
|
51645
51698
|
}, isDir = (path2) => stat(path2).then((st) => st.isDirectory(), () => !1), win32DefaultTmp = async (path2) => {
|
51646
|
-
const { root: root2 } = require$$0$
|
51699
|
+
const { root: root2 } = require$$0$5.parse(path2), tmp2 = require$$0$6.tmpdir(), { root: tmpRoot } = require$$0$5.parse(tmp2);
|
51647
51700
|
if (root2.toLowerCase() === tmpRoot.toLowerCase())
|
51648
51701
|
return tmp2;
|
51649
|
-
const driveTmp = require$$0$
|
51702
|
+
const driveTmp = require$$0$5.resolve(root2, "/temp");
|
51650
51703
|
return await isDir(driveTmp) ? driveTmp : root2;
|
51651
51704
|
}, win32DefaultTmpSync = (path2) => {
|
51652
|
-
const { root: root2 } = require$$0$
|
51705
|
+
const { root: root2 } = require$$0$5.parse(path2), tmp2 = require$$0$6.tmpdir(), { root: tmpRoot } = require$$0$5.parse(tmp2);
|
51653
51706
|
if (root2.toLowerCase() === tmpRoot.toLowerCase())
|
51654
51707
|
return tmp2;
|
51655
|
-
const driveTmp = require$$0$
|
51708
|
+
const driveTmp = require$$0$5.resolve(root2, "/temp");
|
51656
51709
|
return isDirSync(driveTmp) ? driveTmp : root2;
|
51657
|
-
}, posixDefaultTmp = async () => require$$0$6.tmpdir(), posixDefaultTmpSync = () => require$$0$6.tmpdir(), defaultTmp = platform === "win32" ? win32DefaultTmp : posixDefaultTmp, defaultTmpSync = platform === "win32" ? win32DefaultTmpSync : posixDefaultTmpSync, { lstat: lstat$1, rename, unlink: unlink$1, rmdir: rmdir$1, chmod } = promises, uniqueFilename = (path2) => `.${require$$0$
|
51710
|
+
}, posixDefaultTmp = async () => require$$0$6.tmpdir(), posixDefaultTmpSync = () => require$$0$6.tmpdir(), defaultTmp = platform === "win32" ? win32DefaultTmp : posixDefaultTmp, defaultTmpSync = platform === "win32" ? win32DefaultTmpSync : posixDefaultTmpSync, { lstat: lstat$1, rename, unlink: unlink$1, rmdir: rmdir$1, chmod } = promises, uniqueFilename = (path2) => `.${require$$0$5.basename(path2)}.${Math.random()}`, unlinkFixEPERM = async (path2) => unlink$1(path2).catch((er) => {
|
51658
51711
|
if (er.code === "EPERM")
|
51659
51712
|
return chmod(path2, 438).then(() => unlink$1(path2), (er2) => {
|
51660
51713
|
if (er2.code !== "ENOENT")
|
@@ -51665,11 +51718,11 @@ const pathArg = (path2, opt = {}) => {
|
|
51665
51718
|
throw er;
|
51666
51719
|
}), unlinkFixEPERMSync = (path2) => {
|
51667
51720
|
try {
|
51668
|
-
require$$0$
|
51721
|
+
require$$0$4.unlinkSync(path2);
|
51669
51722
|
} catch (er) {
|
51670
51723
|
if (er?.code === "EPERM")
|
51671
51724
|
try {
|
51672
|
-
return require$$0$
|
51725
|
+
return require$$0$4.chmodSync(path2, 438);
|
51673
51726
|
} catch (er2) {
|
51674
51727
|
if (er2?.code === "ENOENT")
|
51675
51728
|
return;
|
@@ -51694,7 +51747,7 @@ const pathArg = (path2, opt = {}) => {
|
|
51694
51747
|
throw opt.signal.reason;
|
51695
51748
|
if (!opt.tmp)
|
51696
51749
|
return rimrafMoveRemoveDir(path2, { ...opt, tmp: await defaultTmp(path2) }, ent);
|
51697
|
-
if (path2 === opt.tmp && require$$0$
|
51750
|
+
if (path2 === opt.tmp && require$$0$5.parse(path2).root !== path2)
|
51698
51751
|
throw new Error("cannot delete temp directory used for deletion");
|
51699
51752
|
const entries = ent.isDirectory() ? await readdirOrError(path2) : null;
|
51700
51753
|
if (!Array.isArray(entries)) {
|
@@ -51706,15 +51759,15 @@ const pathArg = (path2, opt = {}) => {
|
|
51706
51759
|
}
|
51707
51760
|
return opt.filter && !await opt.filter(path2, ent) ? !1 : (await ignoreENOENT(tmpUnlink(path2, opt.tmp, unlinkFixEPERM)), !0);
|
51708
51761
|
}
|
51709
|
-
return !(await Promise.all(entries.map((ent2) => rimrafMoveRemoveDir(require$$0$
|
51762
|
+
return !(await Promise.all(entries.map((ent2) => rimrafMoveRemoveDir(require$$0$5.resolve(path2, ent2.name), opt, ent2)))).reduce((a, b) => a && b, !0) || opt.preserveRoot === !1 && path2 === require$$0$5.parse(path2).root || opt.filter && !await opt.filter(path2, ent) ? !1 : (await ignoreENOENT(tmpUnlink(path2, opt.tmp, rmdir$1)), !0);
|
51710
51763
|
}, tmpUnlink = async (path2, tmp2, rm2) => {
|
51711
|
-
const tmpFile = require$$0$
|
51764
|
+
const tmpFile = require$$0$5.resolve(tmp2, uniqueFilename(path2));
|
51712
51765
|
return await rename(path2, tmpFile), await rm2(tmpFile);
|
51713
51766
|
}, rimrafMoveRemoveSync = (path2, opt) => {
|
51714
51767
|
if (opt?.signal?.aborted)
|
51715
51768
|
throw opt.signal.reason;
|
51716
51769
|
try {
|
51717
|
-
return rimrafMoveRemoveDirSync(path2, opt, require$$0$
|
51770
|
+
return rimrafMoveRemoveDirSync(path2, opt, require$$0$4.lstatSync(path2));
|
51718
51771
|
} catch (er) {
|
51719
51772
|
if (er?.code === "ENOENT")
|
51720
51773
|
return !0;
|
@@ -51726,7 +51779,7 @@ const pathArg = (path2, opt = {}) => {
|
|
51726
51779
|
if (!opt.tmp)
|
51727
51780
|
return rimrafMoveRemoveDirSync(path2, { ...opt, tmp: defaultTmpSync(path2) }, ent);
|
51728
51781
|
const tmp2 = opt.tmp;
|
51729
|
-
if (path2 === opt.tmp && require$$0$
|
51782
|
+
if (path2 === opt.tmp && require$$0$5.parse(path2).root !== path2)
|
51730
51783
|
throw new Error("cannot delete temp directory used for deletion");
|
51731
51784
|
const entries = ent.isDirectory() ? readdirOrErrorSync(path2) : null;
|
51732
51785
|
if (!Array.isArray(entries)) {
|
@@ -51740,14 +51793,14 @@ const pathArg = (path2, opt = {}) => {
|
|
51740
51793
|
}
|
51741
51794
|
let removedAll = !0;
|
51742
51795
|
for (const ent2 of entries) {
|
51743
|
-
const p = require$$0$
|
51796
|
+
const p = require$$0$5.resolve(path2, ent2.name);
|
51744
51797
|
removedAll = rimrafMoveRemoveDirSync(p, opt, ent2) && removedAll;
|
51745
51798
|
}
|
51746
|
-
return !removedAll || opt.preserveRoot === !1 && path2 === require$$0$
|
51799
|
+
return !removedAll || opt.preserveRoot === !1 && path2 === require$$0$5.parse(path2).root || opt.filter && !opt.filter(path2, ent) ? !1 : (ignoreENOENTSync(() => tmpUnlinkSync(path2, tmp2, require$$0$4.rmdirSync)), !0);
|
51747
51800
|
}, tmpUnlinkSync = (path2, tmp2, rmSync) => {
|
51748
|
-
const tmpFile = require$$0$
|
51749
|
-
return require$$0$
|
51750
|
-
}, { unlink, rmdir, lstat } = promises, rimrafWindowsFile = retryBusy(fixEPERM(unlink)), rimrafWindowsFileSync = retryBusySync(fixEPERMSync(require$$0$
|
51801
|
+
const tmpFile = require$$0$5.resolve(tmp2, uniqueFilename(path2));
|
51802
|
+
return require$$0$4.renameSync(path2, tmpFile), rmSync(tmpFile);
|
51803
|
+
}, { unlink, rmdir, lstat } = promises, rimrafWindowsFile = retryBusy(fixEPERM(unlink)), rimrafWindowsFileSync = retryBusySync(fixEPERMSync(require$$0$4.unlinkSync)), rimrafWindowsDirRetry = retryBusy(fixEPERM(rmdir)), rimrafWindowsDirRetrySync = retryBusySync(fixEPERMSync(require$$0$4.rmdirSync)), rimrafWindowsDirMoveRemoveFallback = async (path2, opt) => {
|
51751
51804
|
if (opt?.signal?.aborted)
|
51752
51805
|
throw opt.signal.reason;
|
51753
51806
|
const { filter: filter2, ...options2 } = opt;
|
@@ -51783,7 +51836,7 @@ const pathArg = (path2, opt = {}) => {
|
|
51783
51836
|
if (opt?.signal?.aborted)
|
51784
51837
|
throw opt.signal.reason;
|
51785
51838
|
try {
|
51786
|
-
return rimrafWindowsDirSync(path2, opt, require$$0$
|
51839
|
+
return rimrafWindowsDirSync(path2, opt, require$$0$4.lstatSync(path2), START);
|
51787
51840
|
} catch (er) {
|
51788
51841
|
if (er?.code === "ENOENT")
|
51789
51842
|
return !0;
|
@@ -51802,11 +51855,11 @@ const pathArg = (path2, opt = {}) => {
|
|
51802
51855
|
}
|
51803
51856
|
return opt.filter && !await opt.filter(path2, ent) ? !1 : (await ignoreENOENT(rimrafWindowsFile(path2, opt)), !0);
|
51804
51857
|
}
|
51805
|
-
const s = state === START ? CHILD : state, removedAll = (await Promise.all(entries.map((ent2) => rimrafWindowsDir(require$$0$
|
51858
|
+
const s = state === START ? CHILD : state, removedAll = (await Promise.all(entries.map((ent2) => rimrafWindowsDir(require$$0$5.resolve(path2, ent2.name), opt, ent2, s)))).reduce((a, b) => a && b, !0);
|
51806
51859
|
if (state === START)
|
51807
51860
|
return rimrafWindowsDir(path2, opt, ent, FINISH);
|
51808
51861
|
if (state === FINISH) {
|
51809
|
-
if (opt.preserveRoot === !1 && path2 === require$$0$
|
51862
|
+
if (opt.preserveRoot === !1 && path2 === require$$0$5.parse(path2).root || !removedAll || opt.filter && !await opt.filter(path2, ent))
|
51810
51863
|
return !1;
|
51811
51864
|
await ignoreENOENT(rimrafWindowsDirMoveRemoveFallback(path2, opt));
|
51812
51865
|
}
|
@@ -51824,13 +51877,13 @@ const pathArg = (path2, opt = {}) => {
|
|
51824
51877
|
}
|
51825
51878
|
let removedAll = !0;
|
51826
51879
|
for (const ent2 of entries) {
|
51827
|
-
const s = state === START ? CHILD : state, p = require$$0$
|
51880
|
+
const s = state === START ? CHILD : state, p = require$$0$5.resolve(path2, ent2.name);
|
51828
51881
|
removedAll = rimrafWindowsDirSync(p, opt, ent2, s) && removedAll;
|
51829
51882
|
}
|
51830
51883
|
if (state === START)
|
51831
51884
|
return rimrafWindowsDirSync(path2, opt, ent, FINISH);
|
51832
51885
|
if (state === FINISH) {
|
51833
|
-
if (opt.preserveRoot === !1 && path2 === require$$0$
|
51886
|
+
if (opt.preserveRoot === !1 && path2 === require$$0$5.parse(path2).root || !removedAll || opt.filter && !opt.filter(path2, ent))
|
51834
51887
|
return !1;
|
51835
51888
|
ignoreENOENTSync(() => {
|
51836
51889
|
rimrafWindowsDirMoveRemoveFallbackSync(path2, opt);
|
@@ -51841,7 +51894,7 @@ const pathArg = (path2, opt = {}) => {
|
|
51841
51894
|
...opt,
|
51842
51895
|
force: !0,
|
51843
51896
|
recursive: !0
|
51844
|
-
}), !0), rimrafNativeSync = (path2, opt) => (require$$0$
|
51897
|
+
}), !0), rimrafNativeSync = (path2, opt) => (require$$0$4.rmSync(path2, {
|
51845
51898
|
...opt,
|
51846
51899
|
force: !0,
|
51847
51900
|
recursive: !0
|
@@ -52589,8 +52642,9 @@ ${err.message}`);
|
|
52589
52642
|
const user = await getUserData(apiClient);
|
52590
52643
|
success("You are logged in as %s using %s", user.email, getProviderName(user.provider));
|
52591
52644
|
} else unattended || (trace.log({ step: "login" }), await getOrCreateUser());
|
52645
|
+
const isCoreAppTemplate = cliFlags.template ? determineCoreAppTemplate(cliFlags.template) : !1;
|
52592
52646
|
let introMessage = "Fetching existing projects";
|
52593
|
-
cliFlags.quickstart && (introMessage = "Eject your existing project's Sanity configuration"), success(introMessage), print("");
|
52647
|
+
cliFlags.quickstart && (introMessage = "Eject your existing project's Sanity configuration"), isCoreAppTemplate || (success(introMessage), print(""));
|
52594
52648
|
const flags = await prepareFlags(), { projectId, displayName, isFirstProject, datasetName, schemaUrl } = await getProjectDetails(), sluggedName = lodashExports.deburr(displayName.toLowerCase()).replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "");
|
52595
52649
|
if (bareOutput) {
|
52596
52650
|
success("Below are your project details"), print(""), print(`Project ID: ${chalk2.cyan(projectId)}`), print(`Dataset: ${chalk2.cyan(datasetName)}`), print(
|
@@ -52781,11 +52835,15 @@ ${chalk2.green("Success!")} Your Sanity configuration files has been added to th
|
|
52781
52835
|
}[pkgManager];
|
52782
52836
|
outputPath === process.cwd() ? (print(`
|
52783
52837
|
${chalk2.green("Success!")} Now, use this command to continue:
|
52784
|
-
`), print(
|
52785
|
-
|
52838
|
+
`), print(
|
52839
|
+
`${chalk2.cyan(devCommand)} - to run ${isCoreAppTemplate ? "your Sanity application" : "Sanity Studio"}
|
52840
|
+
`
|
52841
|
+
)) : (print(`
|
52786
52842
|
${chalk2.green("Success!")} Now, use these commands to continue:
|
52787
|
-
`), print(`First: ${chalk2.cyan(`cd ${outputPath}`)} - to enter project\u2019s directory`), print(
|
52788
|
-
`
|
52843
|
+
`), print(`First: ${chalk2.cyan(`cd ${outputPath}`)} - to enter project\u2019s directory`), print(
|
52844
|
+
`Then: ${chalk2.cyan(devCommand)} -to run ${isCoreAppTemplate ? "your Sanity application" : "Sanity Studio"}
|
52845
|
+
`
|
52846
|
+
)), print("Other helpful commands"), print("npx sanity docs - to open the documentation in a browser"), print("npx sanity manage - to open the project settings in a browser"), print("npx sanity help - to explore the CLI manual");
|
52789
52847
|
const sendInvite = isFirstProject && await prompt2.single({
|
52790
52848
|
type: "confirm",
|
52791
52849
|
message: "We have an excellent developer community, would you like us to send you an invitation to join?",
|
@@ -52796,9 +52854,7 @@ ${chalk2.green("Success!")} Now, use these commands to continue:
|
|
52796
52854
|
method: "POST"
|
52797
52855
|
}).catch(lodashExports.noop)), trace.complete();
|
52798
52856
|
async function getOrCreateUser() {
|
52799
|
-
warn("No authentication credentials found in your Sanity config"), print("");
|
52800
|
-
const { extOptions, ...otherArgs } = args, loginArgs = { ...otherArgs, extOptions: {} };
|
52801
|
-
await login(loginArgs, { ...context, telemetry: trace.newContext("login") });
|
52857
|
+
warn("No authentication credentials found in your Sanity config"), print(""), await login({ extOptions: {} }, { ...context, telemetry: trace.newContext("login") });
|
52802
52858
|
}
|
52803
52859
|
async function getProjectDetails() {
|
52804
52860
|
if (flags.quickstart) {
|
@@ -52812,15 +52868,20 @@ ${chalk2.green("Success!")} Now, use these commands to continue:
|
|
52812
52868
|
isFirstProject: data.isFirstProject
|
52813
52869
|
}), data;
|
52814
52870
|
}
|
52871
|
+
if (isCoreAppTemplate)
|
52872
|
+
return {
|
52873
|
+
projectId: "",
|
52874
|
+
displayName: "",
|
52875
|
+
isFirstProject: !1,
|
52876
|
+
datasetName: ""
|
52877
|
+
};
|
52815
52878
|
loadEnv.debug("Prompting user to select or create a project");
|
52816
52879
|
const project = await getOrCreateProject();
|
52817
52880
|
loadEnv.debug(`Project with name ${project.displayName} selected`), loadEnv.debug("Prompting user to select or create a dataset");
|
52818
52881
|
const dataset = await getOrCreateDataset({
|
52819
52882
|
projectId: project.projectId,
|
52820
|
-
displayName: project.displayName,
|
52821
52883
|
dataset: flags.dataset,
|
52822
|
-
aclMode: flags.visibility
|
52823
|
-
defaultConfig: flags["dataset-default"]
|
52884
|
+
aclMode: flags.visibility
|
52824
52885
|
});
|
52825
52886
|
return loadEnv.debug(`Dataset with name ${dataset.datasetName} selected`), trace.log({
|
52826
52887
|
step: "createOrSelectDataset",
|
@@ -53898,23 +53959,7 @@ const process$1 = globalThis.process, {
|
|
53898
53959
|
*
|
53899
53960
|
* Returns a function that may be used to unload signal-exit.
|
53900
53961
|
*/
|
53901
|
-
onExit
|
53902
|
-
/**
|
53903
|
-
* Load the listeners. Likely you never need to call this, unless
|
53904
|
-
* doing a rather deep integration with signal-exit functionality.
|
53905
|
-
* Mostly exposed for the benefit of testing.
|
53906
|
-
*
|
53907
|
-
* @internal
|
53908
|
-
*/
|
53909
|
-
load,
|
53910
|
-
/**
|
53911
|
-
* Unload the listeners. Likely you never need to call this, unless
|
53912
|
-
* doing a rather deep integration with signal-exit functionality.
|
53913
|
-
* Mostly exposed for the benefit of testing.
|
53914
|
-
*
|
53915
|
-
* @internal
|
53916
|
-
*/
|
53917
|
-
unload
|
53962
|
+
onExit
|
53918
53963
|
} = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback()), terminal = process__default.default.stderr.isTTY ? process__default.default.stderr : process__default.default.stdout.isTTY ? process__default.default.stdout : void 0, restoreCursor$1 = terminal ? onetime$1(() => {
|
53919
53964
|
onExit(() => {
|
53920
53965
|
terminal.write("\x1B[?25h");
|
@@ -61422,7 +61467,7 @@ var choices, hasRequiredChoices;
|
|
61422
61467
|
function requireChoices() {
|
61423
61468
|
if (hasRequiredChoices) return choices;
|
61424
61469
|
hasRequiredChoices = 1;
|
61425
|
-
var assert = require$$0__default$
|
61470
|
+
var assert = require$$0__default$6.default, _ = requireLodash(), Separator = requireSeparator(), Choice = requireChoice();
|
61426
61471
|
return choices = class {
|
61427
61472
|
constructor(choices2, answers) {
|
61428
61473
|
this.choices = choices2.map((val) => val.type === "separator" ? (val instanceof Separator || (val = new Separator(val.line)), val) : new Choice(val, answers)), this.realChoices = this.choices.filter(Separator.exclude).filter((item) => !item.disabled), Object.defineProperty(this, "length", {
|
@@ -61500,7 +61545,7 @@ function requireCliWidth() {
|
|
61500
61545
|
var defaultOpts = {
|
61501
61546
|
defaultWidth: 0,
|
61502
61547
|
output: process.stdout,
|
61503
|
-
tty: require$$0__default$
|
61548
|
+
tty: require$$0__default$b.default
|
61504
61549
|
};
|
61505
61550
|
return options2 ? (Object.keys(defaultOpts).forEach(function(key2) {
|
61506
61551
|
options2[key2] || (options2[key2] = defaultOpts[key2]);
|
@@ -62483,7 +62528,7 @@ function requireUtf8() {
|
|
62483
62528
|
var unicode = { exports: {} }, hasRequiredUnicode;
|
62484
62529
|
function requireUnicode() {
|
62485
62530
|
return hasRequiredUnicode || (hasRequiredUnicode = 1, function(module2) {
|
62486
|
-
var util2 = require$$0__default$
|
62531
|
+
var util2 = require$$0__default$5.default, Match = requireMatch();
|
62487
62532
|
module2.exports.UTF_16BE = function() {
|
62488
62533
|
this.name = function() {
|
62489
62534
|
return "UTF-16BE";
|
@@ -62529,7 +62574,7 @@ function requireUnicode() {
|
|
62529
62574
|
var mbcs = { exports: {} }, hasRequiredMbcs;
|
62530
62575
|
function requireMbcs() {
|
62531
62576
|
return hasRequiredMbcs || (hasRequiredMbcs = 1, function(module2) {
|
62532
|
-
var util2 = require$$0__default$
|
62577
|
+
var util2 = require$$0__default$5.default, Match = requireMatch();
|
62533
62578
|
function binarySearch2(arr, searchValue) {
|
62534
62579
|
function find2(arr2, searchValue2, left, right) {
|
62535
62580
|
if (right < left)
|
@@ -63138,7 +63183,7 @@ function requireMbcs() {
|
|
63138
63183
|
var sbcs = { exports: {} }, hasRequiredSbcs;
|
63139
63184
|
function requireSbcs() {
|
63140
63185
|
return hasRequiredSbcs || (hasRequiredSbcs = 1, function(module2) {
|
63141
|
-
var util2 = require$$0__default$
|
63186
|
+
var util2 = require$$0__default$5.default, Match = requireMatch();
|
63142
63187
|
function NGramParser(theNgramList, theByteMap) {
|
63143
63188
|
var N_GRAM_MASK = 16777215;
|
63144
63189
|
this.byteIndex = 0, this.ngram = 0, this.ngramList = theNgramList, this.byteMap = theByteMap, this.ngramCount = 0, this.hitCount = 0, this.search = function(table, value) {
|
@@ -67366,7 +67411,7 @@ function requireSbcs() {
|
|
67366
67411
|
var iso2022 = { exports: {} }, hasRequiredIso2022;
|
67367
67412
|
function requireIso2022() {
|
67368
67413
|
return hasRequiredIso2022 || (hasRequiredIso2022 = 1, function(module2) {
|
67369
|
-
var util2 = require$$0__default$
|
67414
|
+
var util2 = require$$0__default$5.default, Match = requireMatch();
|
67370
67415
|
function ISO_2022() {
|
67371
67416
|
}
|
67372
67417
|
ISO_2022.prototype.match = function(det) {
|
@@ -67459,7 +67504,7 @@ var hasRequiredChardet;
|
|
67459
67504
|
function requireChardet() {
|
67460
67505
|
if (hasRequiredChardet) return chardet;
|
67461
67506
|
hasRequiredChardet = 1;
|
67462
|
-
var fs2 = require$$0__default
|
67507
|
+
var fs2 = require$$0__default.default, utf82 = requireUtf8(), unicode2 = requireUnicode(), mbcs2 = requireMbcs(), sbcs2 = requireSbcs(), iso20222 = requireIso2022(), self2 = chardet, recognisers = [
|
67463
67508
|
new utf82(),
|
67464
67509
|
new unicode2.UTF_16BE(),
|
67465
67510
|
new unicode2.UTF_16LE(),
|
@@ -67540,7 +67585,7 @@ var lib = { exports: {} }, safer_1, hasRequiredSafer;
|
|
67540
67585
|
function requireSafer() {
|
67541
67586
|
if (hasRequiredSafer) return safer_1;
|
67542
67587
|
hasRequiredSafer = 1;
|
67543
|
-
var buffer2 = require$$0__default$
|
67588
|
+
var buffer2 = require$$0__default$9.default, Buffer2 = buffer2.Buffer, safer = {}, key2;
|
67544
67589
|
for (key2 in buffer2)
|
67545
67590
|
buffer2.hasOwnProperty(key2) && (key2 === "SlowBuffer" || key2 === "Buffer" || (safer[key2] = buffer2[key2]));
|
67546
67591
|
var Safer = safer.Buffer = {};
|
@@ -77149,7 +77194,7 @@ var streams, hasRequiredStreams;
|
|
77149
77194
|
function requireStreams() {
|
77150
77195
|
if (hasRequiredStreams) return streams;
|
77151
77196
|
hasRequiredStreams = 1;
|
77152
|
-
var Buffer2 = require$$0__default$
|
77197
|
+
var Buffer2 = require$$0__default$9.default.Buffer, Transform = require$$0__default$4.default.Transform;
|
77153
77198
|
streams = function(iconv) {
|
77154
77199
|
iconv.encodeStream = function(encoding, options2) {
|
77155
77200
|
return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options2), options2);
|
@@ -77220,7 +77265,7 @@ var extendNode, hasRequiredExtendNode;
|
|
77220
77265
|
function requireExtendNode() {
|
77221
77266
|
if (hasRequiredExtendNode) return extendNode;
|
77222
77267
|
hasRequiredExtendNode = 1;
|
77223
|
-
var Buffer2 = require$$0__default$
|
77268
|
+
var Buffer2 = require$$0__default$9.default.Buffer;
|
77224
77269
|
return extendNode = function(iconv) {
|
77225
77270
|
var original = void 0;
|
77226
77271
|
iconv.supportsNodeEncodingsExtension = !(Buffer2.from || new Buffer2(0) instanceof Uint8Array), iconv.extendNodeEncodings = function() {
|
@@ -77244,7 +77289,7 @@ function requireExtendNode() {
|
|
77244
77289
|
Buffer2.isNativeEncoding = function(enc) {
|
77245
77290
|
return enc && nodeNativeEncodings[enc.toLowerCase()];
|
77246
77291
|
};
|
77247
|
-
var SlowBuffer = require$$0__default$
|
77292
|
+
var SlowBuffer = require$$0__default$9.default.SlowBuffer;
|
77248
77293
|
if (original.SlowBufferToString = SlowBuffer.prototype.toString, SlowBuffer.prototype.toString = function(encoding, start, end) {
|
77249
77294
|
return encoding = String(encoding || "utf8").toLowerCase(), Buffer2.isNativeEncoding(encoding) ? original.SlowBufferToString.call(this, encoding, start, end) : (typeof start > "u" && (start = 0), typeof end > "u" && (end = this.length), iconv.decode(this.slice(start, end), encoding));
|
77250
77295
|
}, original.SlowBufferWrite = SlowBuffer.prototype.write, SlowBuffer.prototype.write = function(string, offset, length, encoding) {
|
@@ -77296,7 +77341,7 @@ function requireExtendNode() {
|
|
77296
77341
|
if (!original)
|
77297
77342
|
throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.");
|
77298
77343
|
delete Buffer2.isNativeEncoding;
|
77299
|
-
var SlowBuffer = require$$0__default$
|
77344
|
+
var SlowBuffer = require$$0__default$9.default.SlowBuffer;
|
77300
77345
|
if (SlowBuffer.prototype.toString = original.SlowBufferToString, SlowBuffer.prototype.write = original.SlowBufferWrite, Buffer2.isEncoding = original.BufferIsEncoding, Buffer2.byteLength = original.BufferByteLength, Buffer2.prototype.toString = original.BufferToString, Buffer2.prototype.write = original.BufferWrite, iconv.supportsStreams) {
|
77301
77346
|
var Readable = require$$0__default$4.default.Readable;
|
77302
77347
|
Readable.prototype.setEncoding = original.ReadableSetEncoding, delete Readable.prototype.collect;
|
@@ -77383,7 +77428,7 @@ var hasRequiredTmp;
|
|
77383
77428
|
function requireTmp() {
|
77384
77429
|
if (hasRequiredTmp) return tmp;
|
77385
77430
|
hasRequiredTmp = 1;
|
77386
|
-
const fs2 = require$$0__default
|
77431
|
+
const fs2 = require$$0__default.default, path2 = require$$0__default$1.default, crypto = require$$3__default.default, osTmpDir = requireOsTmpdir(), _c = process.binding("constants"), tmpDir = osTmpDir(), RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", TEMPLATE_PATTERN = /XXXXXX/, DEFAULT_TRIES = 3, CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR), EBADF = _c.EBADF || _c.os.errno.EBADF, ENOENT2 = _c.ENOENT || _c.os.errno.ENOENT, DIR_MODE = 448, FILE_MODE = 384, _removeObjects = [];
|
77387
77432
|
var _gracefulCleanup = !1, _uncaughtException = !1;
|
77388
77433
|
function _randomChars(howMany) {
|
77389
77434
|
var value = [], rnd = null;
|
@@ -77573,7 +77618,7 @@ var CreateFileError = {}, hasRequiredCreateFileError;
|
|
77573
77618
|
function requireCreateFileError() {
|
77574
77619
|
if (hasRequiredCreateFileError) return CreateFileError;
|
77575
77620
|
hasRequiredCreateFileError = 1;
|
77576
|
-
var __extends2 = CreateFileError.__extends || /* @__PURE__ */ function() {
|
77621
|
+
var __extends2 = CreateFileError && CreateFileError.__extends || /* @__PURE__ */ function() {
|
77577
77622
|
var extendStatics2 = function(d, b) {
|
77578
77623
|
return extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
77579
77624
|
d2.__proto__ = b2;
|
@@ -77609,7 +77654,7 @@ var LaunchEditorError = {}, hasRequiredLaunchEditorError;
|
|
77609
77654
|
function requireLaunchEditorError() {
|
77610
77655
|
if (hasRequiredLaunchEditorError) return LaunchEditorError;
|
77611
77656
|
hasRequiredLaunchEditorError = 1;
|
77612
|
-
var __extends2 = LaunchEditorError.__extends || /* @__PURE__ */ function() {
|
77657
|
+
var __extends2 = LaunchEditorError && LaunchEditorError.__extends || /* @__PURE__ */ function() {
|
77613
77658
|
var extendStatics2 = function(d, b) {
|
77614
77659
|
return extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
77615
77660
|
d2.__proto__ = b2;
|
@@ -77645,7 +77690,7 @@ var ReadFileError = {}, hasRequiredReadFileError;
|
|
77645
77690
|
function requireReadFileError() {
|
77646
77691
|
if (hasRequiredReadFileError) return ReadFileError;
|
77647
77692
|
hasRequiredReadFileError = 1;
|
77648
|
-
var __extends2 = ReadFileError.__extends || /* @__PURE__ */ function() {
|
77693
|
+
var __extends2 = ReadFileError && ReadFileError.__extends || /* @__PURE__ */ function() {
|
77649
77694
|
var extendStatics2 = function(d, b) {
|
77650
77695
|
return extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
77651
77696
|
d2.__proto__ = b2;
|
@@ -77681,7 +77726,7 @@ var RemoveFileError = {}, hasRequiredRemoveFileError;
|
|
77681
77726
|
function requireRemoveFileError() {
|
77682
77727
|
if (hasRequiredRemoveFileError) return RemoveFileError;
|
77683
77728
|
hasRequiredRemoveFileError = 1;
|
77684
|
-
var __extends2 = RemoveFileError.__extends || /* @__PURE__ */ function() {
|
77729
|
+
var __extends2 = RemoveFileError && RemoveFileError.__extends || /* @__PURE__ */ function() {
|
77685
77730
|
var extendStatics2 = function(d, b) {
|
77686
77731
|
return extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
77687
77732
|
d2.__proto__ = b2;
|
@@ -77717,7 +77762,7 @@ var hasRequiredMain;
|
|
77717
77762
|
function requireMain() {
|
77718
77763
|
if (hasRequiredMain) return main;
|
77719
77764
|
hasRequiredMain = 1, Object.defineProperty(main, "__esModule", { value: !0 });
|
77720
|
-
var chardet_1 = requireChardet(), child_process_1 = require$$1__default$2.default, fs_1 = require$$0__default
|
77765
|
+
var chardet_1 = requireChardet(), child_process_1 = require$$1__default$2.default, fs_1 = require$$0__default.default, iconv_lite_1 = requireLib(), tmp_1 = requireTmp(), CreateFileError_1 = requireCreateFileError();
|
77721
77766
|
main.CreateFileError = CreateFileError_1.CreateFileError;
|
77722
77767
|
var LaunchEditorError_1 = requireLaunchEditorError();
|
77723
77768
|
main.LaunchEditorError = LaunchEditorError_1.LaunchEditorError;
|
@@ -78032,7 +78077,7 @@ function detectRuntime() {
|
|
78032
78077
|
async function mergeCommands(baseCommands2, corePath, options2) {
|
78033
78078
|
if (!corePath)
|
78034
78079
|
return baseCommands2;
|
78035
|
-
const {
|
78080
|
+
const { cliVersion } = options2, coreImport = getCliConfig.dynamicRequire(corePath);
|
78036
78081
|
semver__default.default.coerce(cliVersion);
|
78037
78082
|
const core2 = "cliProjectCommands" in coreImport ? coreImport.cliProjectCommands : coreImport;
|
78038
78083
|
return baseCommands2.concat(core2.commands).map(addDefaultGroup).reverse().reduce(
|
@@ -78320,7 +78365,7 @@ var termSize, hasRequiredTermSize;
|
|
78320
78365
|
function requireTermSize() {
|
78321
78366
|
if (hasRequiredTermSize) return termSize;
|
78322
78367
|
hasRequiredTermSize = 1;
|
78323
|
-
const { execFileSync } = require$$1__default$2.default, path2 = require$$0__default.default, exec = (command2, arguments_, shell) => execFileSync(command2, arguments_, { encoding: "utf8", shell }).trim(), create = (columns, rows) => ({
|
78368
|
+
const { execFileSync } = require$$1__default$2.default, path2 = require$$0__default$1.default, exec = (command2, arguments_, shell) => execFileSync(command2, arguments_, { encoding: "utf8", shell }).trim(), create = (columns, rows) => ({
|
78324
78369
|
columns: parseInt(columns, 10),
|
78325
78370
|
rows: parseInt(rows, 10)
|
78326
78371
|
});
|
@@ -78604,14 +78649,14 @@ function installProcessExitHack(finalTask) {
|
|
78604
78649
|
}
|
78605
78650
|
async function runCli(cliRoot, { cliVersion }) {
|
78606
78651
|
installUnhandledRejectionsHandler();
|
78607
|
-
const pkg = { name: "@sanity/cli", version: cliVersion }, args = parseArguments(), isInit = args.groupOrCommand === "init" && args.argsWithoutOptions[0] !== "plugin", cwd = getCurrentWorkingDirectory();
|
78652
|
+
const pkg = { name: "@sanity/cli", version: cliVersion }, args = parseArguments(), isInit = args.groupOrCommand === "init" && args.argsWithoutOptions[0] !== "plugin", isCoreApp = args.groupOrCommand === "app", cwd = getCurrentWorkingDirectory();
|
78608
78653
|
let workDir;
|
78609
78654
|
try {
|
78610
|
-
workDir = isInit ? process.cwd() : loadEnv.resolveRootDir(cwd);
|
78655
|
+
workDir = isInit ? process.cwd() : loadEnv.resolveRootDir(cwd, isCoreApp);
|
78611
78656
|
} catch (err) {
|
78612
78657
|
console.error(chalk__default.default.red(err.message)), process.exit(1);
|
78613
78658
|
}
|
78614
|
-
loadAndSetEnvFromDotEnvFiles({ workDir, cmd: args.groupOrCommand }), maybeFixMissingWindowsEnvVar(), await runUpdateCheck({ pkg, cwd, workDir }).notify(), telemetryDisclosure(), loadEnv.debug(`Reading CLI config from "${workDir}"`);
|
78659
|
+
loadAndSetEnvFromDotEnvFiles({ workDir, cmd: args.groupOrCommand, isCoreApp }), maybeFixMissingWindowsEnvVar(), await runUpdateCheck({ pkg, cwd, workDir }).notify(), telemetryDisclosure(), loadEnv.debug(`Reading CLI config from "${workDir}"`);
|
78615
78660
|
const cliConfig = await getCliConfig.getCliConfig(workDir, { forked: !0 });
|
78616
78661
|
cliConfig || loadEnv.debug("No CLI config found");
|
78617
78662
|
const { logger: telemetry2, flush: flushTelemetry } = createTelemetryStore({
|
@@ -78637,10 +78682,11 @@ async function runCli(cliRoot, { cliVersion }) {
|
|
78637
78682
|
workDir,
|
78638
78683
|
corePath: await getCoreModulePath(workDir, cliConfig),
|
78639
78684
|
cliConfig,
|
78640
|
-
telemetry: telemetry2
|
78685
|
+
telemetry: telemetry2,
|
78686
|
+
isCoreApp
|
78641
78687
|
};
|
78642
78688
|
warnOnNonProductionEnvironment(), warnOnInferredProjectDir(isInit, cwd, workDir);
|
78643
|
-
const core2 = args.coreOptions, commands = await mergeCommands(baseCommands, options2.corePath, { cliVersion
|
78689
|
+
const core2 = args.coreOptions, commands = await mergeCommands(baseCommands, options2.corePath, { cliVersion });
|
78644
78690
|
(core2.v || core2.version) && (console.log(`${pkg.name} version ${pkg.version}`), process.exit()), (core2.h || core2.help) && (args.groupOrCommand && args.argsWithoutOptions.unshift(args.groupOrCommand), args.groupOrCommand = "help"), args.groupOrCommand === "logout" && await flushTelemetry();
|
78645
78691
|
const cliRunner = getCliRunner(commands), cliCommandTrace = telemetry2.trace(CliCommand, {
|
78646
78692
|
groupOrCommand: args.groupOrCommand,
|
@@ -78737,8 +78783,12 @@ function warnOnNonProductionEnvironment() {
|
|
78737
78783
|
)
|
78738
78784
|
);
|
78739
78785
|
}
|
78740
|
-
function loadAndSetEnvFromDotEnvFiles({
|
78741
|
-
|
78786
|
+
function loadAndSetEnvFromDotEnvFiles({
|
78787
|
+
workDir,
|
78788
|
+
cmd,
|
78789
|
+
isCoreApp
|
78790
|
+
}) {
|
78791
|
+
if (fs$1.existsSync(path__default.default.join(workDir, "sanity.json")) && !isCoreApp) {
|
78742
78792
|
loadEnv.debug("sanity.json exists, assuming v2 project and loading .env files using old behavior");
|
78743
78793
|
const env = process.env.SANITY_ACTIVE_ENV || process.env.NODE_ENV || "development";
|
78744
78794
|
loadEnv.debug("Loading environment files using %s mode", env), loadEnv.dotenv.config({ path: path__default.default.join(workDir, `.env.${env}`) });
|
@@ -78749,7 +78799,7 @@ function loadAndSetEnvFromDotEnvFiles({ workDir, cmd }) {
|
|
78749
78799
|
let mode2 = process.env.SANITY_ACTIVE_ENV;
|
78750
78800
|
!mode2 && (isProdCmd || process.env.NODE_ENV === "production") ? mode2 = "production" : mode2 || (mode2 = "development"), mode2 === "production" && !isProdCmd && console.warn(chalk__default.default.yellow(`[WARN] Running in ${sanityEnv} environment mode
|
78751
78801
|
`)), loadEnv.debug("Loading environment files using %s mode", mode2);
|
78752
|
-
const studioEnv = loadEnv.loadEnv(mode2, workDir, ["SANITY_STUDIO_"]);
|
78802
|
+
const studioEnv = loadEnv.loadEnv(mode2, workDir, isCoreApp ? ["VITE_"] : ["SANITY_STUDIO_"]);
|
78753
78803
|
process.env = { ...process.env, ...studioEnv };
|
78754
78804
|
}
|
78755
78805
|
function maybeFixMissingWindowsEnvVar() {
|