@sanity/cli 3.74.2-coreui.20 → 3.75.1-canary.110
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 +262 -258
- 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 +3 -0
- package/lib/index.d.ts +3 -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 +9 -9
- package/src/actions/init-project/bootstrapLocalTemplate.ts +4 -1
- package/src/actions/init-project/createCoreAppCliConfig.ts +2 -1
- package/src/actions/init-project/createStudioConfig.ts +1 -0
- package/src/actions/init-project/initProject.ts +29 -16
- package/src/cli.ts +14 -4
- package/src/types.ts +3 -0
- package/src/util/resolveRootDir.ts +9 -8
- package/templates/core-app/src/App.tsx +8 -7
- package/templates/core-app/src/ExampleComponent.tsx +11 -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))
|
@@ -46573,7 +46584,8 @@ import {defineCliConfig} from 'sanity/cli'
|
|
46573
46584
|
|
46574
46585
|
export default defineCliConfig({
|
46575
46586
|
__experimental_coreAppConfiguration: {
|
46576
|
-
|
46587
|
+
organizationId: '%organizationId%',
|
46588
|
+
appLocation: '%appLocation%',
|
46577
46589
|
},
|
46578
46590
|
})
|
46579
46591
|
`;
|
@@ -46997,7 +47009,10 @@ async function bootstrapLocalTemplate(opts, context) {
|
|
46997
47009
|
}), studioConfig = createStudioConfig({
|
46998
47010
|
template: template.configTemplate,
|
46999
47011
|
variables
|
47000
|
-
}), cliConfig = isCoreAppTemplate ? createCoreAppCliConfig({
|
47012
|
+
}), cliConfig = isCoreAppTemplate ? createCoreAppCliConfig({
|
47013
|
+
appLocation: template.appLocation,
|
47014
|
+
organizationId: variables.organizationId
|
47015
|
+
}) : createCliConfig({
|
47001
47016
|
projectId: variables.projectId,
|
47002
47017
|
dataset: variables.dataset,
|
47003
47018
|
autoUpdates: variables.autoUpdates
|
@@ -49394,11 +49409,11 @@ class Minipass extends node_events.EventEmitter {
|
|
49394
49409
|
return isStream;
|
49395
49410
|
}
|
49396
49411
|
}
|
49397
|
-
const realpathSync = require$$0$
|
49398
|
-
lstatSync: require$$0$
|
49399
|
-
readdir: require$$0$
|
49400
|
-
readdirSync: require$$0$
|
49401
|
-
readlinkSync: require$$0$
|
49412
|
+
const realpathSync = require$$0$4.realpathSync.native, defaultFS = {
|
49413
|
+
lstatSync: require$$0$4.lstatSync,
|
49414
|
+
readdir: require$$0$4.readdir,
|
49415
|
+
readdirSync: require$$0$4.readdirSync,
|
49416
|
+
readlinkSync: require$$0$4.readlinkSync,
|
49402
49417
|
realpathSync,
|
49403
49418
|
promises: {
|
49404
49419
|
lstat: fs.lstat,
|
@@ -51492,7 +51507,7 @@ var platform = process.env.__TESTING_RIMRAF_PLATFORM__ || process.platform;
|
|
51492
51507
|
const pathArg = (path2, opt = {}) => {
|
51493
51508
|
const type2 = typeof path2;
|
51494
51509
|
if (type2 !== "string") {
|
51495
|
-
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$
|
51510
|
+
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}`}`;
|
51496
51511
|
throw Object.assign(new TypeError(msg), {
|
51497
51512
|
path: path2,
|
51498
51513
|
code: "ERR_INVALID_ARG_TYPE"
|
@@ -51505,8 +51520,8 @@ const pathArg = (path2, opt = {}) => {
|
|
51505
51520
|
code: "ERR_INVALID_ARG_VALUE"
|
51506
51521
|
});
|
51507
51522
|
}
|
51508
|
-
path2 = require$$0$
|
51509
|
-
const { root: root2 } = require$$0$
|
51523
|
+
path2 = require$$0$5.resolve(path2);
|
51524
|
+
const { root: root2 } = require$$0$5.parse(path2);
|
51510
51525
|
if (path2 === root2 && opt.preserveRoot !== !1) {
|
51511
51526
|
const msg = "refusing to remove root directory without preserveRoot:false";
|
51512
51527
|
throw Object.assign(new Error(msg), {
|
@@ -51515,7 +51530,7 @@ const pathArg = (path2, opt = {}) => {
|
|
51515
51530
|
});
|
51516
51531
|
}
|
51517
51532
|
if (platform === "win32") {
|
51518
|
-
const badWinChars = /[*|"<>?:]/, { root: root3 } = require$$0$
|
51533
|
+
const badWinChars = /[*|"<>?:]/, { root: root3 } = require$$0$5.parse(path2);
|
51519
51534
|
if (badWinChars.test(path2.substring(root3.length)))
|
51520
51535
|
throw Object.assign(new Error("Illegal characters in path."), {
|
51521
51536
|
path: path2,
|
@@ -51523,9 +51538,8 @@ const pathArg = (path2, opt = {}) => {
|
|
51523
51538
|
});
|
51524
51539
|
}
|
51525
51540
|
return path2;
|
51526
|
-
}, readdirSync = (path2) => require$$0$
|
51541
|
+
}, 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 = {
|
51527
51542
|
chmod: chmod$2,
|
51528
|
-
mkdir,
|
51529
51543
|
readdir: readdir$1,
|
51530
51544
|
rename: rename$1,
|
51531
51545
|
rm: rm$1,
|
@@ -51563,7 +51577,7 @@ const pathArg = (path2, opt = {}) => {
|
|
51563
51577
|
if (opt?.signal?.aborted)
|
51564
51578
|
throw opt.signal.reason;
|
51565
51579
|
try {
|
51566
|
-
return rimrafPosixDirSync(path2, opt, require$$0$
|
51580
|
+
return rimrafPosixDirSync(path2, opt, require$$0$4.lstatSync(path2));
|
51567
51581
|
} catch (er) {
|
51568
51582
|
if (er?.code === "ENOENT")
|
51569
51583
|
return !0;
|
@@ -51582,7 +51596,7 @@ const pathArg = (path2, opt = {}) => {
|
|
51582
51596
|
}
|
51583
51597
|
return opt.filter && !await opt.filter(path2, ent) ? !1 : (await ignoreENOENT(unlink$2(path2)), !0);
|
51584
51598
|
}
|
51585
|
-
return !(await Promise.all(entries.map((ent2) => rimrafPosixDir(require$$0$
|
51599
|
+
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);
|
51586
51600
|
}, rimrafPosixDirSync = (path2, opt, ent) => {
|
51587
51601
|
if (opt?.signal?.aborted)
|
51588
51602
|
throw opt.signal.reason;
|
@@ -51594,14 +51608,14 @@ const pathArg = (path2, opt = {}) => {
|
|
51594
51608
|
if (entries.code !== "ENOTDIR")
|
51595
51609
|
throw entries;
|
51596
51610
|
}
|
51597
|
-
return opt.filter && !opt.filter(path2, ent) ? !1 : (ignoreENOENTSync(() => require$$0$
|
51611
|
+
return opt.filter && !opt.filter(path2, ent) ? !1 : (ignoreENOENTSync(() => require$$0$4.unlinkSync(path2)), !0);
|
51598
51612
|
}
|
51599
51613
|
let removedAll = !0;
|
51600
51614
|
for (const ent2 of entries) {
|
51601
|
-
const p = require$$0$
|
51615
|
+
const p = require$$0$5.resolve(path2, ent2.name);
|
51602
51616
|
removedAll = rimrafPosixDirSync(p, opt, ent2) && removedAll;
|
51603
51617
|
}
|
51604
|
-
return opt.preserveRoot === !1 && path2 === require$$0$
|
51618
|
+
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);
|
51605
51619
|
}, { chmod: chmod$1 } = promises, fixEPERM = (fn) => async (path2) => {
|
51606
51620
|
try {
|
51607
51621
|
return await fn(path2);
|
@@ -51630,7 +51644,7 @@ const pathArg = (path2, opt = {}) => {
|
|
51630
51644
|
return;
|
51631
51645
|
if (fer?.code === "EPERM") {
|
51632
51646
|
try {
|
51633
|
-
require$$0$
|
51647
|
+
require$$0$4.chmodSync(path2, 438);
|
51634
51648
|
} catch (er2) {
|
51635
51649
|
if (er2?.code === "ENOENT")
|
51636
51650
|
return;
|
@@ -51681,23 +51695,23 @@ const pathArg = (path2, opt = {}) => {
|
|
51681
51695
|
}
|
51682
51696
|
}, { stat } = promises, isDirSync = (path2) => {
|
51683
51697
|
try {
|
51684
|
-
return require$$0$
|
51698
|
+
return require$$0$4.statSync(path2).isDirectory();
|
51685
51699
|
} catch {
|
51686
51700
|
return !1;
|
51687
51701
|
}
|
51688
51702
|
}, isDir = (path2) => stat(path2).then((st) => st.isDirectory(), () => !1), win32DefaultTmp = async (path2) => {
|
51689
|
-
const { root: root2 } = require$$0$
|
51703
|
+
const { root: root2 } = require$$0$5.parse(path2), tmp2 = require$$0$6.tmpdir(), { root: tmpRoot } = require$$0$5.parse(tmp2);
|
51690
51704
|
if (root2.toLowerCase() === tmpRoot.toLowerCase())
|
51691
51705
|
return tmp2;
|
51692
|
-
const driveTmp = require$$0$
|
51706
|
+
const driveTmp = require$$0$5.resolve(root2, "/temp");
|
51693
51707
|
return await isDir(driveTmp) ? driveTmp : root2;
|
51694
51708
|
}, win32DefaultTmpSync = (path2) => {
|
51695
|
-
const { root: root2 } = require$$0$
|
51709
|
+
const { root: root2 } = require$$0$5.parse(path2), tmp2 = require$$0$6.tmpdir(), { root: tmpRoot } = require$$0$5.parse(tmp2);
|
51696
51710
|
if (root2.toLowerCase() === tmpRoot.toLowerCase())
|
51697
51711
|
return tmp2;
|
51698
|
-
const driveTmp = require$$0$
|
51712
|
+
const driveTmp = require$$0$5.resolve(root2, "/temp");
|
51699
51713
|
return isDirSync(driveTmp) ? driveTmp : root2;
|
51700
|
-
}, 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$
|
51714
|
+
}, 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) => {
|
51701
51715
|
if (er.code === "EPERM")
|
51702
51716
|
return chmod(path2, 438).then(() => unlink$1(path2), (er2) => {
|
51703
51717
|
if (er2.code !== "ENOENT")
|
@@ -51708,11 +51722,11 @@ const pathArg = (path2, opt = {}) => {
|
|
51708
51722
|
throw er;
|
51709
51723
|
}), unlinkFixEPERMSync = (path2) => {
|
51710
51724
|
try {
|
51711
|
-
require$$0$
|
51725
|
+
require$$0$4.unlinkSync(path2);
|
51712
51726
|
} catch (er) {
|
51713
51727
|
if (er?.code === "EPERM")
|
51714
51728
|
try {
|
51715
|
-
return require$$0$
|
51729
|
+
return require$$0$4.chmodSync(path2, 438);
|
51716
51730
|
} catch (er2) {
|
51717
51731
|
if (er2?.code === "ENOENT")
|
51718
51732
|
return;
|
@@ -51737,7 +51751,7 @@ const pathArg = (path2, opt = {}) => {
|
|
51737
51751
|
throw opt.signal.reason;
|
51738
51752
|
if (!opt.tmp)
|
51739
51753
|
return rimrafMoveRemoveDir(path2, { ...opt, tmp: await defaultTmp(path2) }, ent);
|
51740
|
-
if (path2 === opt.tmp && require$$0$
|
51754
|
+
if (path2 === opt.tmp && require$$0$5.parse(path2).root !== path2)
|
51741
51755
|
throw new Error("cannot delete temp directory used for deletion");
|
51742
51756
|
const entries = ent.isDirectory() ? await readdirOrError(path2) : null;
|
51743
51757
|
if (!Array.isArray(entries)) {
|
@@ -51749,15 +51763,15 @@ const pathArg = (path2, opt = {}) => {
|
|
51749
51763
|
}
|
51750
51764
|
return opt.filter && !await opt.filter(path2, ent) ? !1 : (await ignoreENOENT(tmpUnlink(path2, opt.tmp, unlinkFixEPERM)), !0);
|
51751
51765
|
}
|
51752
|
-
return !(await Promise.all(entries.map((ent2) => rimrafMoveRemoveDir(require$$0$
|
51766
|
+
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);
|
51753
51767
|
}, tmpUnlink = async (path2, tmp2, rm2) => {
|
51754
|
-
const tmpFile = require$$0$
|
51768
|
+
const tmpFile = require$$0$5.resolve(tmp2, uniqueFilename(path2));
|
51755
51769
|
return await rename(path2, tmpFile), await rm2(tmpFile);
|
51756
51770
|
}, rimrafMoveRemoveSync = (path2, opt) => {
|
51757
51771
|
if (opt?.signal?.aborted)
|
51758
51772
|
throw opt.signal.reason;
|
51759
51773
|
try {
|
51760
|
-
return rimrafMoveRemoveDirSync(path2, opt, require$$0$
|
51774
|
+
return rimrafMoveRemoveDirSync(path2, opt, require$$0$4.lstatSync(path2));
|
51761
51775
|
} catch (er) {
|
51762
51776
|
if (er?.code === "ENOENT")
|
51763
51777
|
return !0;
|
@@ -51769,7 +51783,7 @@ const pathArg = (path2, opt = {}) => {
|
|
51769
51783
|
if (!opt.tmp)
|
51770
51784
|
return rimrafMoveRemoveDirSync(path2, { ...opt, tmp: defaultTmpSync(path2) }, ent);
|
51771
51785
|
const tmp2 = opt.tmp;
|
51772
|
-
if (path2 === opt.tmp && require$$0$
|
51786
|
+
if (path2 === opt.tmp && require$$0$5.parse(path2).root !== path2)
|
51773
51787
|
throw new Error("cannot delete temp directory used for deletion");
|
51774
51788
|
const entries = ent.isDirectory() ? readdirOrErrorSync(path2) : null;
|
51775
51789
|
if (!Array.isArray(entries)) {
|
@@ -51783,14 +51797,14 @@ const pathArg = (path2, opt = {}) => {
|
|
51783
51797
|
}
|
51784
51798
|
let removedAll = !0;
|
51785
51799
|
for (const ent2 of entries) {
|
51786
|
-
const p = require$$0$
|
51800
|
+
const p = require$$0$5.resolve(path2, ent2.name);
|
51787
51801
|
removedAll = rimrafMoveRemoveDirSync(p, opt, ent2) && removedAll;
|
51788
51802
|
}
|
51789
|
-
return !removedAll || opt.preserveRoot === !1 && path2 === require$$0$
|
51803
|
+
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);
|
51790
51804
|
}, tmpUnlinkSync = (path2, tmp2, rmSync) => {
|
51791
|
-
const tmpFile = require$$0$
|
51792
|
-
return require$$0$
|
51793
|
-
}, { unlink, rmdir, lstat } = promises, rimrafWindowsFile = retryBusy(fixEPERM(unlink)), rimrafWindowsFileSync = retryBusySync(fixEPERMSync(require$$0$
|
51805
|
+
const tmpFile = require$$0$5.resolve(tmp2, uniqueFilename(path2));
|
51806
|
+
return require$$0$4.renameSync(path2, tmpFile), rmSync(tmpFile);
|
51807
|
+
}, { 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) => {
|
51794
51808
|
if (opt?.signal?.aborted)
|
51795
51809
|
throw opt.signal.reason;
|
51796
51810
|
const { filter: filter2, ...options2 } = opt;
|
@@ -51826,7 +51840,7 @@ const pathArg = (path2, opt = {}) => {
|
|
51826
51840
|
if (opt?.signal?.aborted)
|
51827
51841
|
throw opt.signal.reason;
|
51828
51842
|
try {
|
51829
|
-
return rimrafWindowsDirSync(path2, opt, require$$0$
|
51843
|
+
return rimrafWindowsDirSync(path2, opt, require$$0$4.lstatSync(path2), START);
|
51830
51844
|
} catch (er) {
|
51831
51845
|
if (er?.code === "ENOENT")
|
51832
51846
|
return !0;
|
@@ -51845,11 +51859,11 @@ const pathArg = (path2, opt = {}) => {
|
|
51845
51859
|
}
|
51846
51860
|
return opt.filter && !await opt.filter(path2, ent) ? !1 : (await ignoreENOENT(rimrafWindowsFile(path2, opt)), !0);
|
51847
51861
|
}
|
51848
|
-
const s = state === START ? CHILD : state, removedAll = (await Promise.all(entries.map((ent2) => rimrafWindowsDir(require$$0$
|
51862
|
+
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);
|
51849
51863
|
if (state === START)
|
51850
51864
|
return rimrafWindowsDir(path2, opt, ent, FINISH);
|
51851
51865
|
if (state === FINISH) {
|
51852
|
-
if (opt.preserveRoot === !1 && path2 === require$$0$
|
51866
|
+
if (opt.preserveRoot === !1 && path2 === require$$0$5.parse(path2).root || !removedAll || opt.filter && !await opt.filter(path2, ent))
|
51853
51867
|
return !1;
|
51854
51868
|
await ignoreENOENT(rimrafWindowsDirMoveRemoveFallback(path2, opt));
|
51855
51869
|
}
|
@@ -51867,13 +51881,13 @@ const pathArg = (path2, opt = {}) => {
|
|
51867
51881
|
}
|
51868
51882
|
let removedAll = !0;
|
51869
51883
|
for (const ent2 of entries) {
|
51870
|
-
const s = state === START ? CHILD : state, p = require$$0$
|
51884
|
+
const s = state === START ? CHILD : state, p = require$$0$5.resolve(path2, ent2.name);
|
51871
51885
|
removedAll = rimrafWindowsDirSync(p, opt, ent2, s) && removedAll;
|
51872
51886
|
}
|
51873
51887
|
if (state === START)
|
51874
51888
|
return rimrafWindowsDirSync(path2, opt, ent, FINISH);
|
51875
51889
|
if (state === FINISH) {
|
51876
|
-
if (opt.preserveRoot === !1 && path2 === require$$0$
|
51890
|
+
if (opt.preserveRoot === !1 && path2 === require$$0$5.parse(path2).root || !removedAll || opt.filter && !opt.filter(path2, ent))
|
51877
51891
|
return !1;
|
51878
51892
|
ignoreENOENTSync(() => {
|
51879
51893
|
rimrafWindowsDirMoveRemoveFallbackSync(path2, opt);
|
@@ -51884,7 +51898,7 @@ const pathArg = (path2, opt = {}) => {
|
|
51884
51898
|
...opt,
|
51885
51899
|
force: !0,
|
51886
51900
|
recursive: !0
|
51887
|
-
}), !0), rimrafNativeSync = (path2, opt) => (require$$0$
|
51901
|
+
}), !0), rimrafNativeSync = (path2, opt) => (require$$0$4.rmSync(path2, {
|
51888
51902
|
...opt,
|
51889
51903
|
force: !0,
|
51890
51904
|
recursive: !0
|
@@ -52632,9 +52646,10 @@ ${err.message}`);
|
|
52632
52646
|
const user = await getUserData(apiClient);
|
52633
52647
|
success("You are logged in as %s using %s", user.email, getProviderName(user.provider));
|
52634
52648
|
} else unattended || (trace.log({ step: "login" }), await getOrCreateUser());
|
52649
|
+
const isCoreAppTemplate = cliFlags.template ? determineCoreAppTemplate(cliFlags.template) : !1;
|
52635
52650
|
let introMessage = "Fetching existing projects";
|
52636
|
-
cliFlags.quickstart && (introMessage = "Eject your existing project's Sanity configuration"), success(introMessage), print("");
|
52637
|
-
const flags = await prepareFlags(),
|
52651
|
+
cliFlags.quickstart && (introMessage = "Eject your existing project's Sanity configuration"), isCoreAppTemplate || (success(introMessage), print(""));
|
52652
|
+
const flags = await prepareFlags(), { projectId, displayName, isFirstProject, datasetName, schemaUrl, organizationId } = await getProjectDetails(), sluggedName = lodashExports.deburr(displayName.toLowerCase()).replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "");
|
52638
52653
|
if (bareOutput) {
|
52639
52654
|
success("Below are your project details"), print(""), print(`Project ID: ${chalk2.cyan(projectId)}`), print(`Dataset: ${chalk2.cyan(datasetName)}`), print(
|
52640
52655
|
`
|
@@ -52843,9 +52858,7 @@ ${chalk2.green("Success!")} Now, use these commands to continue:
|
|
52843
52858
|
method: "POST"
|
52844
52859
|
}).catch(lodashExports.noop)), trace.complete();
|
52845
52860
|
async function getOrCreateUser() {
|
52846
|
-
warn("No authentication credentials found in your Sanity config"), print("");
|
52847
|
-
const { extOptions, ...otherArgs } = args, loginArgs = { ...otherArgs, extOptions: {} };
|
52848
|
-
await login(loginArgs, { ...context, telemetry: trace.newContext("login") });
|
52861
|
+
warn("No authentication credentials found in your Sanity config"), print(""), await login({ extOptions: {} }, { ...context, telemetry: trace.newContext("login") });
|
52849
52862
|
}
|
52850
52863
|
async function getProjectDetails() {
|
52851
52864
|
if (flags.quickstart) {
|
@@ -52859,22 +52872,23 @@ ${chalk2.green("Success!")} Now, use these commands to continue:
|
|
52859
52872
|
isFirstProject: data.isFirstProject
|
52860
52873
|
}), data;
|
52861
52874
|
}
|
52862
|
-
if (isCoreAppTemplate)
|
52875
|
+
if (isCoreAppTemplate) {
|
52876
|
+
const organizations = await apiClient({ requireUser: !0, requireProject: !1 }).request({ uri: "/organizations" });
|
52863
52877
|
return {
|
52864
52878
|
projectId: "",
|
52865
52879
|
displayName: "",
|
52880
|
+
datasetName: "",
|
52866
52881
|
isFirstProject: !1,
|
52867
|
-
|
52882
|
+
organizationId: await getOrganizationId(organizations)
|
52868
52883
|
};
|
52884
|
+
}
|
52869
52885
|
loadEnv.debug("Prompting user to select or create a project");
|
52870
52886
|
const project = await getOrCreateProject();
|
52871
52887
|
loadEnv.debug(`Project with name ${project.displayName} selected`), loadEnv.debug("Prompting user to select or create a dataset");
|
52872
52888
|
const dataset = await getOrCreateDataset({
|
52873
52889
|
projectId: project.projectId,
|
52874
|
-
displayName: project.displayName,
|
52875
52890
|
dataset: flags.dataset,
|
52876
|
-
aclMode: flags.visibility
|
52877
|
-
defaultConfig: flags["dataset-default"]
|
52891
|
+
aclMode: flags.visibility
|
52878
52892
|
});
|
52879
52893
|
return loadEnv.debug(`Dataset with name ${dataset.datasetName} selected`), trace.log({
|
52880
52894
|
step: "createOrSelectDataset",
|
@@ -53084,7 +53098,8 @@ The default dataset configuration has a public dataset named "production".`;
|
|
53084
53098
|
autoUpdates,
|
53085
53099
|
dataset: datasetName,
|
53086
53100
|
projectId,
|
53087
|
-
projectName: displayName || answers.projectName
|
53101
|
+
projectName: displayName || answers.projectName,
|
53102
|
+
organizationId
|
53088
53103
|
};
|
53089
53104
|
return remoteTemplateInfo ? bootstrapRemoteTemplate(
|
53090
53105
|
{
|
@@ -53170,10 +53185,10 @@ The default dataset configuration has a public dataset named "production".`;
|
|
53170
53185
|
return cliFlags;
|
53171
53186
|
}
|
53172
53187
|
async function getOrganizationId(organizations) {
|
53173
|
-
let
|
53188
|
+
let orgId = flags.organization;
|
53174
53189
|
if (unattended)
|
53175
|
-
return
|
53176
|
-
if (organizations.length > 0 && !
|
53190
|
+
return orgId || void 0;
|
53191
|
+
if (organizations.length > 0 && !orgId) {
|
53177
53192
|
loadEnv.debug(`User has ${organizations.length} organization(s), checking attach access`);
|
53178
53193
|
const withGrant = await getOrganizationsWithAttachGrant(organizations);
|
53179
53194
|
if (withGrant.length === 0) {
|
@@ -53193,13 +53208,13 @@ The default dataset configuration has a public dataset named "production".`;
|
|
53193
53208
|
type: "list",
|
53194
53209
|
choices: organizationChoices
|
53195
53210
|
});
|
53196
|
-
chosenOrg && chosenOrg !== "none" && (
|
53197
|
-
} else
|
53198
|
-
return
|
53211
|
+
chosenOrg && chosenOrg !== "none" && (orgId = chosenOrg);
|
53212
|
+
} else orgId ? loadEnv.debug("User has defined organization flag explicitly (%s)", orgId) : organizations.length === 0 && loadEnv.debug("User has no organizations, skipping selection prompt");
|
53213
|
+
return orgId || void 0;
|
53199
53214
|
}
|
53200
|
-
async function hasProjectAttachGrant(
|
53215
|
+
async function hasProjectAttachGrant(orgId) {
|
53201
53216
|
const requiredGrantGroup = "sanity.organization.projects", requiredGrant = "attach";
|
53202
|
-
return ((await apiClient({ requireProject: !1, requireUser: !0 }).clone().config({ apiVersion: "v2021-06-07" }).request({ uri: `organizations/${
|
53217
|
+
return ((await apiClient({ requireProject: !1, requireUser: !0 }).clone().config({ apiVersion: "v2021-06-07" }).request({ uri: `organizations/${orgId}/grants` }))[requiredGrantGroup] || []).some(
|
53203
53218
|
(resource) => resource.grants && resource.grants.some((grant) => grant.name === requiredGrant)
|
53204
53219
|
);
|
53205
53220
|
}
|
@@ -53952,23 +53967,7 @@ const process$1 = globalThis.process, {
|
|
53952
53967
|
*
|
53953
53968
|
* Returns a function that may be used to unload signal-exit.
|
53954
53969
|
*/
|
53955
|
-
onExit
|
53956
|
-
/**
|
53957
|
-
* Load the listeners. Likely you never need to call this, unless
|
53958
|
-
* doing a rather deep integration with signal-exit functionality.
|
53959
|
-
* Mostly exposed for the benefit of testing.
|
53960
|
-
*
|
53961
|
-
* @internal
|
53962
|
-
*/
|
53963
|
-
load,
|
53964
|
-
/**
|
53965
|
-
* Unload the listeners. Likely you never need to call this, unless
|
53966
|
-
* doing a rather deep integration with signal-exit functionality.
|
53967
|
-
* Mostly exposed for the benefit of testing.
|
53968
|
-
*
|
53969
|
-
* @internal
|
53970
|
-
*/
|
53971
|
-
unload
|
53970
|
+
onExit
|
53972
53971
|
} = 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(() => {
|
53973
53972
|
onExit(() => {
|
53974
53973
|
terminal.write("\x1B[?25h");
|
@@ -61476,7 +61475,7 @@ var choices, hasRequiredChoices;
|
|
61476
61475
|
function requireChoices() {
|
61477
61476
|
if (hasRequiredChoices) return choices;
|
61478
61477
|
hasRequiredChoices = 1;
|
61479
|
-
var assert = require$$0__default$
|
61478
|
+
var assert = require$$0__default$6.default, _ = requireLodash(), Separator = requireSeparator(), Choice = requireChoice();
|
61480
61479
|
return choices = class {
|
61481
61480
|
constructor(choices2, answers) {
|
61482
61481
|
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", {
|
@@ -61554,7 +61553,7 @@ function requireCliWidth() {
|
|
61554
61553
|
var defaultOpts = {
|
61555
61554
|
defaultWidth: 0,
|
61556
61555
|
output: process.stdout,
|
61557
|
-
tty: require$$0__default$
|
61556
|
+
tty: require$$0__default$b.default
|
61558
61557
|
};
|
61559
61558
|
return options2 ? (Object.keys(defaultOpts).forEach(function(key2) {
|
61560
61559
|
options2[key2] || (options2[key2] = defaultOpts[key2]);
|
@@ -62537,7 +62536,7 @@ function requireUtf8() {
|
|
62537
62536
|
var unicode = { exports: {} }, hasRequiredUnicode;
|
62538
62537
|
function requireUnicode() {
|
62539
62538
|
return hasRequiredUnicode || (hasRequiredUnicode = 1, function(module2) {
|
62540
|
-
var util2 = require$$0__default$
|
62539
|
+
var util2 = require$$0__default$5.default, Match = requireMatch();
|
62541
62540
|
module2.exports.UTF_16BE = function() {
|
62542
62541
|
this.name = function() {
|
62543
62542
|
return "UTF-16BE";
|
@@ -62583,7 +62582,7 @@ function requireUnicode() {
|
|
62583
62582
|
var mbcs = { exports: {} }, hasRequiredMbcs;
|
62584
62583
|
function requireMbcs() {
|
62585
62584
|
return hasRequiredMbcs || (hasRequiredMbcs = 1, function(module2) {
|
62586
|
-
var util2 = require$$0__default$
|
62585
|
+
var util2 = require$$0__default$5.default, Match = requireMatch();
|
62587
62586
|
function binarySearch2(arr, searchValue) {
|
62588
62587
|
function find2(arr2, searchValue2, left, right) {
|
62589
62588
|
if (right < left)
|
@@ -63192,7 +63191,7 @@ function requireMbcs() {
|
|
63192
63191
|
var sbcs = { exports: {} }, hasRequiredSbcs;
|
63193
63192
|
function requireSbcs() {
|
63194
63193
|
return hasRequiredSbcs || (hasRequiredSbcs = 1, function(module2) {
|
63195
|
-
var util2 = require$$0__default$
|
63194
|
+
var util2 = require$$0__default$5.default, Match = requireMatch();
|
63196
63195
|
function NGramParser(theNgramList, theByteMap) {
|
63197
63196
|
var N_GRAM_MASK = 16777215;
|
63198
63197
|
this.byteIndex = 0, this.ngram = 0, this.ngramList = theNgramList, this.byteMap = theByteMap, this.ngramCount = 0, this.hitCount = 0, this.search = function(table, value) {
|
@@ -67420,7 +67419,7 @@ function requireSbcs() {
|
|
67420
67419
|
var iso2022 = { exports: {} }, hasRequiredIso2022;
|
67421
67420
|
function requireIso2022() {
|
67422
67421
|
return hasRequiredIso2022 || (hasRequiredIso2022 = 1, function(module2) {
|
67423
|
-
var util2 = require$$0__default$
|
67422
|
+
var util2 = require$$0__default$5.default, Match = requireMatch();
|
67424
67423
|
function ISO_2022() {
|
67425
67424
|
}
|
67426
67425
|
ISO_2022.prototype.match = function(det) {
|
@@ -67513,7 +67512,7 @@ var hasRequiredChardet;
|
|
67513
67512
|
function requireChardet() {
|
67514
67513
|
if (hasRequiredChardet) return chardet;
|
67515
67514
|
hasRequiredChardet = 1;
|
67516
|
-
var fs2 = require$$0__default
|
67515
|
+
var fs2 = require$$0__default.default, utf82 = requireUtf8(), unicode2 = requireUnicode(), mbcs2 = requireMbcs(), sbcs2 = requireSbcs(), iso20222 = requireIso2022(), self2 = chardet, recognisers = [
|
67517
67516
|
new utf82(),
|
67518
67517
|
new unicode2.UTF_16BE(),
|
67519
67518
|
new unicode2.UTF_16LE(),
|
@@ -67594,7 +67593,7 @@ var lib = { exports: {} }, safer_1, hasRequiredSafer;
|
|
67594
67593
|
function requireSafer() {
|
67595
67594
|
if (hasRequiredSafer) return safer_1;
|
67596
67595
|
hasRequiredSafer = 1;
|
67597
|
-
var buffer2 = require$$0__default$
|
67596
|
+
var buffer2 = require$$0__default$9.default, Buffer2 = buffer2.Buffer, safer = {}, key2;
|
67598
67597
|
for (key2 in buffer2)
|
67599
67598
|
buffer2.hasOwnProperty(key2) && (key2 === "SlowBuffer" || key2 === "Buffer" || (safer[key2] = buffer2[key2]));
|
67600
67599
|
var Safer = safer.Buffer = {};
|
@@ -77203,7 +77202,7 @@ var streams, hasRequiredStreams;
|
|
77203
77202
|
function requireStreams() {
|
77204
77203
|
if (hasRequiredStreams) return streams;
|
77205
77204
|
hasRequiredStreams = 1;
|
77206
|
-
var Buffer2 = require$$0__default$
|
77205
|
+
var Buffer2 = require$$0__default$9.default.Buffer, Transform = require$$0__default$4.default.Transform;
|
77207
77206
|
streams = function(iconv) {
|
77208
77207
|
iconv.encodeStream = function(encoding, options2) {
|
77209
77208
|
return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options2), options2);
|
@@ -77274,7 +77273,7 @@ var extendNode, hasRequiredExtendNode;
|
|
77274
77273
|
function requireExtendNode() {
|
77275
77274
|
if (hasRequiredExtendNode) return extendNode;
|
77276
77275
|
hasRequiredExtendNode = 1;
|
77277
|
-
var Buffer2 = require$$0__default$
|
77276
|
+
var Buffer2 = require$$0__default$9.default.Buffer;
|
77278
77277
|
return extendNode = function(iconv) {
|
77279
77278
|
var original = void 0;
|
77280
77279
|
iconv.supportsNodeEncodingsExtension = !(Buffer2.from || new Buffer2(0) instanceof Uint8Array), iconv.extendNodeEncodings = function() {
|
@@ -77298,7 +77297,7 @@ function requireExtendNode() {
|
|
77298
77297
|
Buffer2.isNativeEncoding = function(enc) {
|
77299
77298
|
return enc && nodeNativeEncodings[enc.toLowerCase()];
|
77300
77299
|
};
|
77301
|
-
var SlowBuffer = require$$0__default$
|
77300
|
+
var SlowBuffer = require$$0__default$9.default.SlowBuffer;
|
77302
77301
|
if (original.SlowBufferToString = SlowBuffer.prototype.toString, SlowBuffer.prototype.toString = function(encoding, start, end) {
|
77303
77302
|
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));
|
77304
77303
|
}, original.SlowBufferWrite = SlowBuffer.prototype.write, SlowBuffer.prototype.write = function(string, offset, length, encoding) {
|
@@ -77350,7 +77349,7 @@ function requireExtendNode() {
|
|
77350
77349
|
if (!original)
|
77351
77350
|
throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.");
|
77352
77351
|
delete Buffer2.isNativeEncoding;
|
77353
|
-
var SlowBuffer = require$$0__default$
|
77352
|
+
var SlowBuffer = require$$0__default$9.default.SlowBuffer;
|
77354
77353
|
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) {
|
77355
77354
|
var Readable = require$$0__default$4.default.Readable;
|
77356
77355
|
Readable.prototype.setEncoding = original.ReadableSetEncoding, delete Readable.prototype.collect;
|
@@ -77437,7 +77436,7 @@ var hasRequiredTmp;
|
|
77437
77436
|
function requireTmp() {
|
77438
77437
|
if (hasRequiredTmp) return tmp;
|
77439
77438
|
hasRequiredTmp = 1;
|
77440
|
-
const fs2 = require$$0__default
|
77439
|
+
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 = [];
|
77441
77440
|
var _gracefulCleanup = !1, _uncaughtException = !1;
|
77442
77441
|
function _randomChars(howMany) {
|
77443
77442
|
var value = [], rnd = null;
|
@@ -77627,7 +77626,7 @@ var CreateFileError = {}, hasRequiredCreateFileError;
|
|
77627
77626
|
function requireCreateFileError() {
|
77628
77627
|
if (hasRequiredCreateFileError) return CreateFileError;
|
77629
77628
|
hasRequiredCreateFileError = 1;
|
77630
|
-
var __extends2 = CreateFileError.__extends || /* @__PURE__ */ function() {
|
77629
|
+
var __extends2 = CreateFileError && CreateFileError.__extends || /* @__PURE__ */ function() {
|
77631
77630
|
var extendStatics2 = function(d, b) {
|
77632
77631
|
return extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
77633
77632
|
d2.__proto__ = b2;
|
@@ -77663,7 +77662,7 @@ var LaunchEditorError = {}, hasRequiredLaunchEditorError;
|
|
77663
77662
|
function requireLaunchEditorError() {
|
77664
77663
|
if (hasRequiredLaunchEditorError) return LaunchEditorError;
|
77665
77664
|
hasRequiredLaunchEditorError = 1;
|
77666
|
-
var __extends2 = LaunchEditorError.__extends || /* @__PURE__ */ function() {
|
77665
|
+
var __extends2 = LaunchEditorError && LaunchEditorError.__extends || /* @__PURE__ */ function() {
|
77667
77666
|
var extendStatics2 = function(d, b) {
|
77668
77667
|
return extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
77669
77668
|
d2.__proto__ = b2;
|
@@ -77699,7 +77698,7 @@ var ReadFileError = {}, hasRequiredReadFileError;
|
|
77699
77698
|
function requireReadFileError() {
|
77700
77699
|
if (hasRequiredReadFileError) return ReadFileError;
|
77701
77700
|
hasRequiredReadFileError = 1;
|
77702
|
-
var __extends2 = ReadFileError.__extends || /* @__PURE__ */ function() {
|
77701
|
+
var __extends2 = ReadFileError && ReadFileError.__extends || /* @__PURE__ */ function() {
|
77703
77702
|
var extendStatics2 = function(d, b) {
|
77704
77703
|
return extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
77705
77704
|
d2.__proto__ = b2;
|
@@ -77735,7 +77734,7 @@ var RemoveFileError = {}, hasRequiredRemoveFileError;
|
|
77735
77734
|
function requireRemoveFileError() {
|
77736
77735
|
if (hasRequiredRemoveFileError) return RemoveFileError;
|
77737
77736
|
hasRequiredRemoveFileError = 1;
|
77738
|
-
var __extends2 = RemoveFileError.__extends || /* @__PURE__ */ function() {
|
77737
|
+
var __extends2 = RemoveFileError && RemoveFileError.__extends || /* @__PURE__ */ function() {
|
77739
77738
|
var extendStatics2 = function(d, b) {
|
77740
77739
|
return extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
77741
77740
|
d2.__proto__ = b2;
|
@@ -77771,7 +77770,7 @@ var hasRequiredMain;
|
|
77771
77770
|
function requireMain() {
|
77772
77771
|
if (hasRequiredMain) return main;
|
77773
77772
|
hasRequiredMain = 1, Object.defineProperty(main, "__esModule", { value: !0 });
|
77774
|
-
var chardet_1 = requireChardet(), child_process_1 = require$$1__default$2.default, fs_1 = require$$0__default
|
77773
|
+
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();
|
77775
77774
|
main.CreateFileError = CreateFileError_1.CreateFileError;
|
77776
77775
|
var LaunchEditorError_1 = requireLaunchEditorError();
|
77777
77776
|
main.LaunchEditorError = LaunchEditorError_1.LaunchEditorError;
|
@@ -78086,7 +78085,7 @@ function detectRuntime() {
|
|
78086
78085
|
async function mergeCommands(baseCommands2, corePath, options2) {
|
78087
78086
|
if (!corePath)
|
78088
78087
|
return baseCommands2;
|
78089
|
-
const {
|
78088
|
+
const { cliVersion } = options2, coreImport = getCliConfig.dynamicRequire(corePath);
|
78090
78089
|
semver__default.default.coerce(cliVersion);
|
78091
78090
|
const core2 = "cliProjectCommands" in coreImport ? coreImport.cliProjectCommands : coreImport;
|
78092
78091
|
return baseCommands2.concat(core2.commands).map(addDefaultGroup).reverse().reduce(
|
@@ -78374,7 +78373,7 @@ var termSize, hasRequiredTermSize;
|
|
78374
78373
|
function requireTermSize() {
|
78375
78374
|
if (hasRequiredTermSize) return termSize;
|
78376
78375
|
hasRequiredTermSize = 1;
|
78377
|
-
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) => ({
|
78376
|
+
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) => ({
|
78378
78377
|
columns: parseInt(columns, 10),
|
78379
78378
|
rows: parseInt(rows, 10)
|
78380
78379
|
});
|
@@ -78658,14 +78657,14 @@ function installProcessExitHack(finalTask) {
|
|
78658
78657
|
}
|
78659
78658
|
async function runCli(cliRoot, { cliVersion }) {
|
78660
78659
|
installUnhandledRejectionsHandler();
|
78661
|
-
const pkg = { name: "@sanity/cli", version: cliVersion }, args = parseArguments(), isInit = args.groupOrCommand === "init" && args.argsWithoutOptions[0] !== "plugin", cwd = getCurrentWorkingDirectory();
|
78660
|
+
const pkg = { name: "@sanity/cli", version: cliVersion }, args = parseArguments(), isInit = args.groupOrCommand === "init" && args.argsWithoutOptions[0] !== "plugin", isCoreApp = args.groupOrCommand === "app", cwd = getCurrentWorkingDirectory();
|
78662
78661
|
let workDir;
|
78663
78662
|
try {
|
78664
|
-
workDir = isInit ? process.cwd() : loadEnv.resolveRootDir(cwd);
|
78663
|
+
workDir = isInit ? process.cwd() : loadEnv.resolveRootDir(cwd, isCoreApp);
|
78665
78664
|
} catch (err) {
|
78666
78665
|
console.error(chalk__default.default.red(err.message)), process.exit(1);
|
78667
78666
|
}
|
78668
|
-
loadAndSetEnvFromDotEnvFiles({ workDir, cmd: args.groupOrCommand }), maybeFixMissingWindowsEnvVar(), await runUpdateCheck({ pkg, cwd, workDir }).notify(), telemetryDisclosure(), loadEnv.debug(`Reading CLI config from "${workDir}"`);
|
78667
|
+
loadAndSetEnvFromDotEnvFiles({ workDir, cmd: args.groupOrCommand, isCoreApp }), maybeFixMissingWindowsEnvVar(), await runUpdateCheck({ pkg, cwd, workDir }).notify(), telemetryDisclosure(), loadEnv.debug(`Reading CLI config from "${workDir}"`);
|
78669
78668
|
const cliConfig = await getCliConfig.getCliConfig(workDir, { forked: !0 });
|
78670
78669
|
cliConfig || loadEnv.debug("No CLI config found");
|
78671
78670
|
const { logger: telemetry2, flush: flushTelemetry } = createTelemetryStore({
|
@@ -78691,10 +78690,11 @@ async function runCli(cliRoot, { cliVersion }) {
|
|
78691
78690
|
workDir,
|
78692
78691
|
corePath: await getCoreModulePath(workDir, cliConfig),
|
78693
78692
|
cliConfig,
|
78694
|
-
telemetry: telemetry2
|
78693
|
+
telemetry: telemetry2,
|
78694
|
+
isCoreApp
|
78695
78695
|
};
|
78696
78696
|
warnOnNonProductionEnvironment(), warnOnInferredProjectDir(isInit, cwd, workDir);
|
78697
|
-
const core2 = args.coreOptions, commands = await mergeCommands(baseCommands, options2.corePath, { cliVersion
|
78697
|
+
const core2 = args.coreOptions, commands = await mergeCommands(baseCommands, options2.corePath, { cliVersion });
|
78698
78698
|
(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();
|
78699
78699
|
const cliRunner = getCliRunner(commands), cliCommandTrace = telemetry2.trace(CliCommand, {
|
78700
78700
|
groupOrCommand: args.groupOrCommand,
|
@@ -78791,7 +78791,11 @@ function warnOnNonProductionEnvironment() {
|
|
78791
78791
|
)
|
78792
78792
|
);
|
78793
78793
|
}
|
78794
|
-
function loadAndSetEnvFromDotEnvFiles({
|
78794
|
+
function loadAndSetEnvFromDotEnvFiles({
|
78795
|
+
workDir,
|
78796
|
+
cmd,
|
78797
|
+
isCoreApp
|
78798
|
+
}) {
|
78795
78799
|
if (fs$1.existsSync(path__default.default.join(workDir, "sanity.json"))) {
|
78796
78800
|
loadEnv.debug("sanity.json exists, assuming v2 project and loading .env files using old behavior");
|
78797
78801
|
const env = process.env.SANITY_ACTIVE_ENV || process.env.NODE_ENV || "development";
|
@@ -78803,7 +78807,7 @@ function loadAndSetEnvFromDotEnvFiles({ workDir, cmd }) {
|
|
78803
78807
|
let mode2 = process.env.SANITY_ACTIVE_ENV;
|
78804
78808
|
!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
|
78805
78809
|
`)), loadEnv.debug("Loading environment files using %s mode", mode2);
|
78806
|
-
const studioEnv = loadEnv.loadEnv(mode2, workDir, ["SANITY_STUDIO_"]);
|
78810
|
+
const studioEnv = loadEnv.loadEnv(mode2, workDir, isCoreApp ? ["VITE_"] : ["SANITY_STUDIO_"]);
|
78807
78811
|
process.env = { ...process.env, ...studioEnv };
|
78808
78812
|
}
|
78809
78813
|
function maybeFixMissingWindowsEnvVar() {
|