@sanity/cli 3.65.2-corel.472 → 3.66.0
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 +445 -1082
- package/lib/_chunks-cjs/cli.js.map +1 -1
- package/lib/index.d.mts +0 -1
- package/lib/index.d.ts +0 -1
- package/package.json +7 -7
- package/src/CommandRunner.ts +1 -2
- package/src/actions/init-project/bootstrapRemoteTemplate.ts +10 -7
- package/src/actions/init-project/initProject.ts +1 -17
- package/src/commands/index.ts +0 -2
- package/src/commands/init/initCommand.ts +0 -9
- package/src/types.ts +0 -1
- package/src/util/remoteTemplate.ts +16 -0
- package/src/actions/init-plugin/initPlugin.ts +0 -119
- package/src/actions/init-plugin/pluginTemplates.ts +0 -38
- package/src/actions/init-project/reconfigureV2Project.ts +0 -446
- package/src/commands/upgrade/upgradeCommand.ts +0 -38
- package/src/commands/upgrade/upgradeDependencies.ts +0 -289
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$2 = require("node:path"), chalk = require("chalk"), loadEnv = require("./loadEnv.js"), require$$0$4 = require("path"), require$$1$2 = require("module"), require$$0$5 = 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$$0$b = 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$$5$1 = require("assert"), require$$0$a = 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$$
|
2
|
+
var fs$1 = require("node:fs"), os = require("node:os"), path$2 = require("node:path"), chalk = require("chalk"), loadEnv = require("./loadEnv.js"), require$$0$4 = require("path"), require$$1$2 = require("module"), require$$0$5 = 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$$0$b = 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$$5$1 = require("assert"), require$$0$a = 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"), silverFleece = require("silver-fleece"), getCliConfig = require("./getCliConfig.js"), journeyConfig = require("./journeyConfig.js"), node_stream = require("node:stream"), promises = require("node:stream/promises"), require$$0$e = require("zlib"), require$$7$1 = require("process"), yaml = require("yaml"), http = require("node:http"), traverse = require("@babel/traverse"), process$1 = require("node:process"), require$$2$2 = 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
|
}
|
@@ -18,7 +18,7 @@ function _mergeNamespaces(n, m) {
|
|
18
18
|
});
|
19
19
|
}), Object.freeze(n);
|
20
20
|
}
|
21
|
-
var fs__default = /* @__PURE__ */ _interopDefaultCompat(fs$1), os__default = /* @__PURE__ */ _interopDefaultCompat(os), path__default = /* @__PURE__ */ _interopDefaultCompat(path$2), chalk__default = /* @__PURE__ */ _interopDefaultCompat(chalk), require$$0__default = /* @__PURE__ */ _interopDefaultCompat(require$$0$4), require$$1__default = /* @__PURE__ */ _interopDefaultCompat(require$$1$2), require$$0__default$1 = /* @__PURE__ */ _interopDefaultCompat(require$$0$5), childProcess__default = /* @__PURE__ */ _interopDefaultCompat(childProcess), fs__default$1 = /* @__PURE__ */ _interopDefaultCompat(fs), util__default = /* @__PURE__ */ _interopDefaultCompat(util$4), require$$0__default$2 = /* @__PURE__ */ _interopDefaultCompat(require$$0$6), require$$0__default$7 = /* @__PURE__ */ _interopDefaultCompat(require$$0$b), 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$$5__default = /* @__PURE__ */ _interopDefaultCompat(require$$5$1), require$$0__default$6 = /* @__PURE__ */ _interopDefaultCompat(require$$0$a), 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$$
|
21
|
+
var fs__default = /* @__PURE__ */ _interopDefaultCompat(fs$1), os__default = /* @__PURE__ */ _interopDefaultCompat(os), path__default = /* @__PURE__ */ _interopDefaultCompat(path$2), chalk__default = /* @__PURE__ */ _interopDefaultCompat(chalk), require$$0__default = /* @__PURE__ */ _interopDefaultCompat(require$$0$4), require$$1__default = /* @__PURE__ */ _interopDefaultCompat(require$$1$2), require$$0__default$1 = /* @__PURE__ */ _interopDefaultCompat(require$$0$5), childProcess__default = /* @__PURE__ */ _interopDefaultCompat(childProcess), fs__default$1 = /* @__PURE__ */ _interopDefaultCompat(fs), util__default = /* @__PURE__ */ _interopDefaultCompat(util$4), require$$0__default$2 = /* @__PURE__ */ _interopDefaultCompat(require$$0$6), require$$0__default$7 = /* @__PURE__ */ _interopDefaultCompat(require$$0$b), 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$$5__default = /* @__PURE__ */ _interopDefaultCompat(require$$5$1), require$$0__default$6 = /* @__PURE__ */ _interopDefaultCompat(require$$0$a), 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), 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$1), require$$2__default$1 = /* @__PURE__ */ _interopDefaultCompat(require$$2$2), require$$0__default$b = /* @__PURE__ */ _interopDefaultCompat(require$$0$f), resolveFrom$1 = { exports: {} }, hasRequiredResolveFrom;
|
22
22
|
function requireResolveFrom() {
|
23
23
|
if (hasRequiredResolveFrom) return resolveFrom$1.exports;
|
24
24
|
hasRequiredResolveFrom = 1;
|
@@ -3877,7 +3877,7 @@ function ensureNpx() {
|
|
3877
3877
|
);
|
3878
3878
|
}
|
3879
3879
|
}
|
3880
|
-
const helpText$
|
3880
|
+
const helpText$9 = `
|
3881
3881
|
Runs a given code modification script on the current studio folder.
|
3882
3882
|
Running the command without a specified codemod name will list available transformations.
|
3883
3883
|
|
@@ -3899,7 +3899,7 @@ Examples
|
|
3899
3899
|
name: "codemod",
|
3900
3900
|
signature: "[CODEMOD_NAME]",
|
3901
3901
|
description: "Updates Sanity Studio codebase with a code modification script",
|
3902
|
-
helpText: helpText$
|
3902
|
+
helpText: helpText$9,
|
3903
3903
|
action: codemodAction
|
3904
3904
|
};
|
3905
3905
|
var lodash_isplainobject, hasRequiredLodash_isplainobject;
|
@@ -5818,13 +5818,13 @@ function requireSrc() {
|
|
5818
5818
|
retry2({ shouldRetry })
|
5819
5819
|
]);
|
5820
5820
|
async function getLatestVersion(pkgName, opts) {
|
5821
|
-
const options2 = typeof opts == "string" ? { range: opts, auth: !0 } : Object.assign({ range: "latest", auth: !0 }, opts), regUrl = resolveRegistryUrl(pkgName, options2), pkgUrl = url.resolve(regUrl, encodeURIComponent(pkgName).replace(/^%40/, "@")), authInfo = options2.auth && registryAuthToken2(regUrl, { recursive: !0 }),
|
5821
|
+
const options2 = typeof opts == "string" ? { range: opts, auth: !0 } : Object.assign({ range: "latest", auth: !0 }, opts), regUrl = resolveRegistryUrl(pkgName, options2), pkgUrl = url.resolve(regUrl, encodeURIComponent(pkgName).replace(/^%40/, "@")), authInfo = options2.auth && registryAuthToken2(regUrl, { recursive: !0 }), request = options2.request || httpRequest, headers = {
|
5822
5822
|
accept: "application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"
|
5823
5823
|
};
|
5824
5824
|
authInfo && (headers.authorization = `${authInfo.type} ${authInfo.token}`);
|
5825
5825
|
let res;
|
5826
5826
|
try {
|
5827
|
-
res = await
|
5827
|
+
res = await request({ url: pkgUrl, headers });
|
5828
5828
|
} catch (err) {
|
5829
5829
|
throw err.response && err.response.statusCode === 404 ? new Error(`Package \`${pkgName}\` doesn't exist`) : err;
|
5830
5830
|
}
|
@@ -7263,7 +7263,7 @@ var open_1, hasRequiredOpen;
|
|
7263
7263
|
function requireOpen() {
|
7264
7264
|
if (hasRequiredOpen) return open_1;
|
7265
7265
|
hasRequiredOpen = 1;
|
7266
|
-
const path2 = require$$0__default.default, childProcess2 = require$$
|
7266
|
+
const path2 = require$$0__default.default, childProcess2 = require$$1__default$2.default, { promises: fs2, constants: fsConstants } = require$$0__default$1.default, isWsl2 = requireIsWsl(), isDocker = requireIsDocker(), defineLazyProperty = requireDefineLazyProp(), localXdgOpenPath = path2.join(__dirname, "xdg-open"), { platform, arch } = process, hasContainerEnv = () => {
|
7267
7267
|
try {
|
7268
7268
|
return fs2.statSync("/run/.containerenv"), !0;
|
7269
7269
|
} catch {
|
@@ -7480,11 +7480,11 @@ const commonMistakes = { get: "list" }, levenThreshold = 3, coreCommands = [
|
|
7480
7480
|
"undeploy",
|
7481
7481
|
"uninstall",
|
7482
7482
|
"users"
|
7483
|
-
], discouragedCommands = ["upgrade", "check", "configcheck", "uninstall"], helpText$
|
7483
|
+
], discouragedCommands = ["upgrade", "check", "configcheck", "uninstall"], helpText$8 = `
|
7484
7484
|
Run the command again within a Sanity project directory, where "sanity"
|
7485
7485
|
is installed as a dependency.`;
|
7486
7486
|
function getNoSuchCommandText(cmdName, parentGroupName, groups) {
|
7487
|
-
return parentGroupName && groups && groups[parentGroupName] ? suggestCommand(cmdName, groups[parentGroupName], parentGroupName) : coreCommands.includes(cmdName) ? `Command "${cmdName}" is not available outside of a Sanity project context.${helpText$
|
7487
|
+
return parentGroupName && groups && groups[parentGroupName] ? suggestCommand(cmdName, groups[parentGroupName], parentGroupName) : coreCommands.includes(cmdName) ? `Command "${cmdName}" is not available outside of a Sanity project context.${helpText$8}` : suggestCommand(cmdName, groups ? groups.default : []);
|
7488
7488
|
}
|
7489
7489
|
function suggestCommand(cmdName, group, parentGroupName = null) {
|
7490
7490
|
const closest = group.filter((command2) => !discouragedCommands.includes(command2.name)).map((command2) => leven(command2.name, cmdName)).reduce(
|
@@ -13565,7 +13565,7 @@ var detectFramework = {}, hasRequiredDetectFramework;
|
|
13565
13565
|
function requireDetectFramework() {
|
13566
13566
|
if (hasRequiredDetectFramework) return detectFramework;
|
13567
13567
|
hasRequiredDetectFramework = 1, Object.defineProperty(detectFramework, "__esModule", { value: !0 }), detectFramework.detectFrameworkVersion = detectFramework.detectFrameworkRecord = detectFramework.detectFrameworks = detectFramework.detectFramework = void 0;
|
13568
|
-
const child_process_1 = require$$
|
13568
|
+
const child_process_1 = require$$1__default$2.default;
|
13569
13569
|
async function matches(fs2, framework) {
|
13570
13570
|
const { detectors } = framework;
|
13571
13571
|
if (!detectors)
|
@@ -13735,7 +13735,7 @@ function requireLocalFileSystemDetector() {
|
|
13735
13735
|
return mod && mod.__esModule ? mod : { default: mod };
|
13736
13736
|
};
|
13737
13737
|
Object.defineProperty(localFileSystemDetector, "__esModule", { value: !0 }), localFileSystemDetector.LocalFileSystemDetector = void 0;
|
13738
|
-
const promises_1 = __importDefault2(require$$0__default$
|
13738
|
+
const promises_1 = __importDefault2(require$$0__default$8.default), path_1 = require$$0__default.default, filesystem_1 = requireFilesystem(), error_utils_1 = requireDist$1();
|
13739
13739
|
class LocalFileSystemDetector extends filesystem_1.DetectorFilesystem {
|
13740
13740
|
constructor(rootPath) {
|
13741
13741
|
super(), this.rootPath = rootPath;
|
@@ -17968,195 +17968,7 @@ function requireDist() {
|
|
17968
17968
|
} }), __exportStar2(requireGetMonorepoDefaultSettings(), exports2);
|
17969
17969
|
}(dist$1)), dist$1;
|
17970
17970
|
}
|
17971
|
-
var distExports = requireDist();
|
17972
|
-
const request = require$$1$3.getIt([require$$2$1.promise()]);
|
17973
|
-
async function bootstrapFromTemplate(context, url) {
|
17974
|
-
const { prompt: prompt2, workDir } = context, cliVersion = await getCliVersion();
|
17975
|
-
let inProjectContext = !1;
|
17976
|
-
try {
|
17977
|
-
inProjectContext = !!(await readJson(path__default.default.join(workDir, "sanity.json"))).root;
|
17978
|
-
} catch {
|
17979
|
-
}
|
17980
|
-
loadEnv.debug(inProjectContext ? "Project context found" : "Not in project context");
|
17981
|
-
let zip2;
|
17982
|
-
try {
|
17983
|
-
loadEnv.debug("Fetching zip from %s", url), zip2 = await getZip(url), loadEnv.debug("Zip finished downloading");
|
17984
|
-
} catch (err) {
|
17985
|
-
throw err.message = `Failed to get template: ${err.message}`, err;
|
17986
|
-
}
|
17987
|
-
loadEnv.debug("Looking up template manifest from zip");
|
17988
|
-
const manifest = zip2.find(
|
17989
|
-
(file) => path__default.default.basename(file.path) === "package.json" && !file.path.includes("node_modules")
|
17990
|
-
);
|
17991
|
-
if (!manifest)
|
17992
|
-
throw new Error("Could not find `package.json` in template");
|
17993
|
-
const baseDir = `${path__default.default.dirname(manifest.path)}/template`;
|
17994
|
-
loadEnv.debug("Manifest path resolved to %s", manifest.path), loadEnv.debug("Base directory resolved to %s", baseDir);
|
17995
|
-
const templateFiles = zip2.filter(
|
17996
|
-
(file) => file.type === "file" && file.path.indexOf(baseDir) === 0
|
17997
|
-
);
|
17998
|
-
loadEnv.debug("%d files found in template", templateFiles.length);
|
17999
|
-
const tplVars = parseJson(manifest.data.toString())?.sanityTemplate || {}, { minimumBaseVersion, minimumCliVersion } = tplVars;
|
18000
|
-
if (minimumBaseVersion) {
|
18001
|
-
loadEnv.debug("Template requires Sanity version %s", minimumBaseVersion);
|
18002
|
-
const installed = getSanityVersion(workDir, cliVersion);
|
18003
|
-
if (loadEnv.debug("Installed Sanity version is %s", installed), semver__default.default.lt(installed, minimumBaseVersion))
|
18004
|
-
throw new Error(
|
18005
|
-
`Template requires Sanity at version ${minimumBaseVersion}, installed is ${installed}`
|
18006
|
-
);
|
18007
|
-
}
|
18008
|
-
if (minimumCliVersion && (loadEnv.debug("Template requires Sanity CLI version %s", minimumCliVersion), loadEnv.debug("Installed CLI version is %s", cliVersion), semver__default.default.lt(cliVersion, minimumCliVersion)))
|
18009
|
-
throw new Error(
|
18010
|
-
`Template requires @sanity/cli at version ${minimumCliVersion}, installed is ${cliVersion}`
|
18011
|
-
);
|
18012
|
-
const name = await prompt2.single({
|
18013
|
-
type: "input",
|
18014
|
-
message: "Plugin name:",
|
18015
|
-
default: tplVars.suggestedName || "",
|
18016
|
-
validate: async (pkgName) => {
|
18017
|
-
const { validForNewPackages } = validateNpmPackageName__default.default(pkgName);
|
18018
|
-
if (!validForNewPackages)
|
18019
|
-
return "Name must be a valid npm package name (https://docs.npmjs.com/files/package.json#name)";
|
18020
|
-
const outputPath2 = path__default.default.join(workDir, "plugins", pkgName), isEmpty2 = await fs$2.pathIsEmpty(outputPath2);
|
18021
|
-
return inProjectContext && !isEmpty2 ? "Plugin with given name already exists in project" : !0;
|
18022
|
-
}
|
18023
|
-
});
|
18024
|
-
let outputPath = path__default.default.join(workDir, "plugins", name);
|
18025
|
-
if (!inProjectContext) {
|
18026
|
-
const cwdIsEmpty = await fs$2.pathIsEmpty(workDir);
|
18027
|
-
outputPath = await prompt2.single({
|
18028
|
-
type: "input",
|
18029
|
-
message: "Output path:",
|
18030
|
-
default: cwdIsEmpty ? workDir : path__default.default.join(workDir, name),
|
18031
|
-
validate: validateEmptyPath$1,
|
18032
|
-
filter: fs$2.absolutify
|
18033
|
-
});
|
18034
|
-
}
|
18035
|
-
loadEnv.debug("Output path set to %s", outputPath);
|
18036
|
-
let createConfig = tplVars.requiresConfig;
|
18037
|
-
return typeof createConfig > "u" && (createConfig = await prompt2.single({
|
18038
|
-
type: "confirm",
|
18039
|
-
message: "Does the plugin need a configuration file?",
|
18040
|
-
default: !1
|
18041
|
-
})), loadEnv.debug("Ensuring directory exists: %s", outputPath), await fs__default$1.default.mkdir(outputPath, { recursive: !0 }), await Promise.all(
|
18042
|
-
templateFiles.map((file) => {
|
18043
|
-
const filename = file.path.slice(baseDir.length);
|
18044
|
-
return loadEnv.debug('Writing template file "%s" to "%s"', filename, outputPath), fs__default$1.default.writeFile(path__default.default.join(outputPath, filename), file.data);
|
18045
|
-
})
|
18046
|
-
), { name, outputPath, inPluginsPath: inProjectContext, dependencies: tplVars.dependencies };
|
18047
|
-
}
|
18048
|
-
async function validateEmptyPath$1(dir) {
|
18049
|
-
return await fs$2.pathIsEmpty(dir) ? !0 : "Path is not empty";
|
18050
|
-
}
|
18051
|
-
function getZip(url) {
|
18052
|
-
return request({ url, rawBody: !0 }).then(
|
18053
|
-
(res) => {
|
18054
|
-
if (res.statusCode > 299) {
|
18055
|
-
const httpErr = ["HTTP", res.statusCode, res.statusMessage].filter(Boolean).join(" ");
|
18056
|
-
throw new Error(`${httpErr} trying to download ${url}`);
|
18057
|
-
}
|
18058
|
-
return decompress__default.default(res.body);
|
18059
|
-
}
|
18060
|
-
);
|
18061
|
-
}
|
18062
|
-
function parseJson(json2) {
|
18063
|
-
try {
|
18064
|
-
return JSON.parse(json2);
|
18065
|
-
} catch {
|
18066
|
-
return;
|
18067
|
-
}
|
18068
|
-
}
|
18069
|
-
function getSanityVersion(workDir, fallback) {
|
18070
|
-
const basePkg = resolveFrom.silent(workDir, "@sanity/base/package.json");
|
18071
|
-
return basePkg ? getCliConfig.dynamicRequire(basePkg).version : fallback;
|
18072
|
-
}
|
18073
|
-
const pluginTemplates = [
|
18074
|
-
{
|
18075
|
-
value: "logo",
|
18076
|
-
name: "Studio logo",
|
18077
|
-
url: "https://github.com/sanity-io/plugin-template-logo/archive/master.zip"
|
18078
|
-
},
|
18079
|
-
{
|
18080
|
-
value: "tool",
|
18081
|
-
name: "Basic, empty tool",
|
18082
|
-
url: "https://github.com/sanity-io/plugin-template-tool/archive/master.zip"
|
18083
|
-
},
|
18084
|
-
{
|
18085
|
-
value: "toolWithRouting",
|
18086
|
-
name: "Tool with basic routing",
|
18087
|
-
url: "https://github.com/sanity-io/plugin-template-tool-with-routing/archive/master.zip"
|
18088
|
-
},
|
18089
|
-
{
|
18090
|
-
value: "chessInput",
|
18091
|
-
name: "Chess board input component w/ block preview",
|
18092
|
-
url: "https://github.com/sanity-io/plugin-template-chess-input/archive/master.zip"
|
18093
|
-
},
|
18094
|
-
{
|
18095
|
-
value: "dashboardWidget",
|
18096
|
-
name: "A Dashboard widget with cats",
|
18097
|
-
url: "https://github.com/sanity-io/plugin-template-dashboard-widget-cats/archive/master.zip"
|
18098
|
-
},
|
18099
|
-
{
|
18100
|
-
value: "assetSource",
|
18101
|
-
name: "Custom asset source plugin",
|
18102
|
-
url: "https://github.com/sanity-io/plugin-template-asset-source/archive/master.zip"
|
18103
|
-
}
|
18104
|
-
];
|
18105
|
-
async function initPlugin(args, context) {
|
18106
|
-
const { output, prompt: prompt2 } = context, [, specifiedTemplateUrl] = args.argsWithoutOptions;
|
18107
|
-
if (output.print("This utility will walk you through creating a new Sanity plugin."), output.print(`Press ^C at any time to quit.
|
18108
|
-
`), /^https?:\/\//.test(specifiedTemplateUrl || ""))
|
18109
|
-
return loadEnv.debug("User provided template URL: %s", specifiedTemplateUrl), bootstrapFromUrl(context, specifiedTemplateUrl);
|
18110
|
-
let specifiedTemplate = null;
|
18111
|
-
if (specifiedTemplateUrl && (specifiedTemplate = pluginTemplates.find((tpl) => tpl.value === specifiedTemplateUrl)), specifiedTemplate)
|
18112
|
-
return loadEnv.debug(
|
18113
|
-
'User wanted template "%s", match found at %s',
|
18114
|
-
specifiedTemplateUrl,
|
18115
|
-
specifiedTemplate.url
|
18116
|
-
), bootstrapFromUrl(context, specifiedTemplate.url);
|
18117
|
-
if (specifiedTemplateUrl)
|
18118
|
-
throw new Error(`Cannot find template with name "${specifiedTemplateUrl}"`);
|
18119
|
-
const templateChoices = pluginTemplates.map(({ value, name }) => ({ value, name })), selected = await prompt2.single({
|
18120
|
-
message: "Select template to use",
|
18121
|
-
type: "list",
|
18122
|
-
choices: templateChoices
|
18123
|
-
});
|
18124
|
-
if (specifiedTemplate = pluginTemplates.find((tpl) => tpl.value === selected), !specifiedTemplate)
|
18125
|
-
throw new Error("No template selected");
|
18126
|
-
return loadEnv.debug("User selected template URL: %s", specifiedTemplate.url), bootstrapFromUrl(context, specifiedTemplate.url);
|
18127
|
-
}
|
18128
|
-
async function bootstrapFromUrl(context, url) {
|
18129
|
-
const { output, prompt: prompt2, yarn, workDir } = context;
|
18130
|
-
loadEnv.debug("Bootstrapping from URL: %s", url);
|
18131
|
-
const { name, outputPath, inPluginsPath, dependencies } = await bootstrapFromTemplate(context, url);
|
18132
|
-
if (inPluginsPath && await prompt2.single({
|
18133
|
-
type: "confirm",
|
18134
|
-
message: "Enable plugin in current Sanity installation?",
|
18135
|
-
default: !0
|
18136
|
-
}) && await addPluginToManifest(workDir, name.replace(/^sanity-plugin-/, "")), dependencies) {
|
18137
|
-
const dependencyString = JSON.stringify(dependencies, null, 2).split(`
|
18138
|
-
`).slice(1, -1).join(`
|
18139
|
-
`).replace(/"/g, "");
|
18140
|
-
output.print(`
|
18141
|
-
The following dependencies are required for this template:`), output.print(`${dependencyString}
|
18142
|
-
`);
|
18143
|
-
}
|
18144
|
-
if (dependencies && inPluginsPath && await prompt2.single({
|
18145
|
-
type: "confirm",
|
18146
|
-
message: "Install dependencies in current project?",
|
18147
|
-
default: !0
|
18148
|
-
})) {
|
18149
|
-
const deps = Object.keys(dependencies).map((dep) => `${dep}@${dependencies[dep]}`);
|
18150
|
-
await yarn(["add"].concat(deps), { ...output, rootDir: workDir }), output.print("Dependencies installed."), output.print("Remember to remove them from `package.json` if you no longer need them!");
|
18151
|
-
}
|
18152
|
-
output.print(`
|
18153
|
-
Success! Plugin initialized at ${outputPath}`);
|
18154
|
-
}
|
18155
|
-
async function addPluginToManifest(sanityDir, pluginName) {
|
18156
|
-
const manifestPath = path__default.default.join(sanityDir, "sanity.json"), manifest = JSON.parse(await fs__default$1.default.readFile(manifestPath, "utf8"));
|
18157
|
-
return manifest.plugins = manifest.plugins || [], manifest.plugins.indexOf(pluginName) === -1 && manifest.plugins.push(pluginName), await fs__default$1.default.writeFile(manifestPath, JSON.stringify(manifest, null, 2)), manifest;
|
18158
|
-
}
|
18159
|
-
var execa$1 = { exports: {} }, crossSpawn = { exports: {} }, windows, hasRequiredWindows;
|
17971
|
+
var distExports = requireDist(), execa$1 = { exports: {} }, crossSpawn = { exports: {} }, windows, hasRequiredWindows;
|
18160
17972
|
function requireWindows() {
|
18161
17973
|
if (hasRequiredWindows) return windows;
|
18162
17974
|
hasRequiredWindows = 1, windows = isexe, isexe.sync = sync2;
|
@@ -18467,7 +18279,7 @@ var hasRequiredCrossSpawn;
|
|
18467
18279
|
function requireCrossSpawn() {
|
18468
18280
|
if (hasRequiredCrossSpawn) return crossSpawn.exports;
|
18469
18281
|
hasRequiredCrossSpawn = 1;
|
18470
|
-
const cp = require$$
|
18282
|
+
const cp = require$$1__default$2.default, parse3 = requireParse$3(), enoent2 = requireEnoent();
|
18471
18283
|
function spawn(command2, args, options2) {
|
18472
18284
|
const parsed = parse3(command2, args, options2), spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
18473
18285
|
return enoent2.hookChildProcess(spawned, parsed), spawned;
|
@@ -18774,7 +18586,7 @@ var hasRequiredGetStream;
|
|
18774
18586
|
function requireGetStream() {
|
18775
18587
|
if (hasRequiredGetStream) return getStream.exports;
|
18776
18588
|
hasRequiredGetStream = 1;
|
18777
|
-
const { constants: BufferConstants } = require$$0__default$
|
18589
|
+
const { constants: BufferConstants } = require$$0__default$9.default, pump = requirePump(), bufferStream2 = requireBufferStream();
|
18778
18590
|
class MaxBufferError extends Error {
|
18779
18591
|
constructor() {
|
18780
18592
|
super("maxBuffer exceeded"), this.name = "MaxBufferError";
|
@@ -18920,7 +18732,7 @@ var hasRequiredExeca;
|
|
18920
18732
|
function requireExeca() {
|
18921
18733
|
if (hasRequiredExeca) return execa$1.exports;
|
18922
18734
|
hasRequiredExeca = 1;
|
18923
|
-
const path2 = require$$0__default.default, childProcess2 = require$$
|
18735
|
+
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 }) => {
|
18924
18736
|
const env = extendEnv ? { ...process.env, ...envOption } : envOption;
|
18925
18737
|
return preferLocal ? npmRunPath2.env({ env, cwd: localDir }) : env;
|
18926
18738
|
}, handleArgs = (file, args, options2 = {}) => {
|
@@ -20987,24 +20799,24 @@ function requireLocatePath() {
|
|
20987
20799
|
}
|
20988
20800
|
}, locatePath.exports;
|
20989
20801
|
}
|
20990
|
-
var pathExists
|
20802
|
+
var pathExists = { exports: {} }, hasRequiredPathExists;
|
20991
20803
|
function requirePathExists() {
|
20992
|
-
if (hasRequiredPathExists) return pathExists
|
20804
|
+
if (hasRequiredPathExists) return pathExists.exports;
|
20993
20805
|
hasRequiredPathExists = 1;
|
20994
20806
|
const fs2 = require$$0__default$1.default, { promisify } = require$$0__default$5.default, pAccess = promisify(fs2.access);
|
20995
|
-
return pathExists
|
20807
|
+
return pathExists.exports = async (path2) => {
|
20996
20808
|
try {
|
20997
20809
|
return await pAccess(path2), !0;
|
20998
20810
|
} catch {
|
20999
20811
|
return !1;
|
21000
20812
|
}
|
21001
|
-
}, pathExists
|
20813
|
+
}, pathExists.exports.sync = (path2) => {
|
21002
20814
|
try {
|
21003
20815
|
return fs2.accessSync(path2), !0;
|
21004
20816
|
} catch {
|
21005
20817
|
return !1;
|
21006
20818
|
}
|
21007
|
-
}, pathExists
|
20819
|
+
}, pathExists.exports;
|
21008
20820
|
}
|
21009
20821
|
var hasRequiredFindUp;
|
21010
20822
|
function requireFindUp() {
|
@@ -23014,39 +22826,6 @@ async function installNewPackages(options2, context) {
|
|
23014
22826
|
if (result?.exitCode || result?.failed)
|
23015
22827
|
throw new Error("Package installation failed");
|
23016
22828
|
}
|
23017
|
-
async function uninstallPackages(options2, context) {
|
23018
|
-
const { packageManager, packages } = options2, { output, workDir } = context, execOptions = {
|
23019
|
-
encoding: "utf8",
|
23020
|
-
env: getPartialEnvWithNpmPath(workDir),
|
23021
|
-
cwd: workDir,
|
23022
|
-
stdio: "inherit"
|
23023
|
-
}, npmArgs = ["uninstall", ...packages];
|
23024
|
-
let result;
|
23025
|
-
if (packageManager === "npm")
|
23026
|
-
output.print(`Running 'npm ${npmArgs.join(" ")}'`), result = await execa("npm", npmArgs, execOptions);
|
23027
|
-
else if (packageManager === "yarn") {
|
23028
|
-
const yarnArgs = ["remove", ...packages];
|
23029
|
-
output.print(`Running 'yarn ${yarnArgs.join(" ")}'`), result = await execa("yarn", yarnArgs, execOptions);
|
23030
|
-
} else if (packageManager === "pnpm") {
|
23031
|
-
const pnpmArgs = ["remove", ...packages];
|
23032
|
-
output.print(`Running 'pnpm ${pnpmArgs.join(" ")}'`), result = await execa("pnpm", pnpmArgs, execOptions);
|
23033
|
-
} else packageManager === "manual" && output.print(`Manual installation selected - run 'npm ${npmArgs.join(" ")}' or equivalent`);
|
23034
|
-
if (result?.exitCode || result?.failed)
|
23035
|
-
throw new Error("Package installation failed");
|
23036
|
-
}
|
23037
|
-
function getYarnStub(context) {
|
23038
|
-
return async function(args, options2) {
|
23039
|
-
const workDir = options2?.rootDir || context.workDir, yarnContext = { workDir, output: context.output }, { chosen } = await getPackageManagerChoice(workDir, { interactive: !1 }), [command2, ...packages] = args;
|
23040
|
-
if (command2 === "add")
|
23041
|
-
await installNewPackages({ packageManager: chosen, packages }, yarnContext);
|
23042
|
-
else if (command2 === "remove")
|
23043
|
-
await uninstallPackages({ packageManager: chosen, packages }, yarnContext);
|
23044
|
-
else if (command2 === "install")
|
23045
|
-
await installDeclaredPackages(workDir, chosen, yarnContext);
|
23046
|
-
else
|
23047
|
-
throw new Error(`Unsupported package manager command "${command2}"`);
|
23048
|
-
};
|
23049
|
-
}
|
23050
22829
|
const cliPackageManager = {
|
23051
22830
|
getInstallCommand,
|
23052
22831
|
getPackageManagerChoice,
|
@@ -23401,7 +23180,7 @@ var minipass$1 = {}, string_decoder = {}, safeBuffer = { exports: {} };
|
|
23401
23180
|
var hasRequiredSafeBuffer;
|
23402
23181
|
function requireSafeBuffer() {
|
23403
23182
|
return hasRequiredSafeBuffer || (hasRequiredSafeBuffer = 1, function(module2, exports2) {
|
23404
|
-
var buffer2 = require$$0__default$
|
23183
|
+
var buffer2 = require$$0__default$9.default, Buffer2 = buffer2.Buffer;
|
23405
23184
|
function copyProps(src2, dst) {
|
23406
23185
|
for (var key2 in src2)
|
23407
23186
|
dst[key2] = src2[key2];
|
@@ -23876,7 +23655,7 @@ var minizlib = {}, constants, hasRequiredConstants;
|
|
23876
23655
|
function requireConstants() {
|
23877
23656
|
if (hasRequiredConstants) return constants;
|
23878
23657
|
hasRequiredConstants = 1;
|
23879
|
-
const realZlibConstants = require$$0__default$
|
23658
|
+
const realZlibConstants = require$$0__default$a.default.constants || /* istanbul ignore next */
|
23880
23659
|
{ ZLIB_VERNUM: 4736 };
|
23881
23660
|
return constants = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), {
|
23882
23661
|
Z_NO_FLUSH: 0,
|
@@ -24243,7 +24022,7 @@ var hasRequiredMinizlib;
|
|
24243
24022
|
function requireMinizlib() {
|
24244
24023
|
if (hasRequiredMinizlib) return minizlib;
|
24245
24024
|
hasRequiredMinizlib = 1;
|
24246
|
-
const assert = require$$5__default.default, Buffer2 = require$$0__default$
|
24025
|
+
const assert = require$$5__default.default, Buffer2 = require$$0__default$9.default.Buffer, realZlib = require$$0__default$a.default, constants2 = minizlib.constants = requireConstants(), Minipass = requireMinipass(), OriginalBufferConcat = Buffer2.concat, _superWrite = Symbol("_superWrite");
|
24247
24026
|
class ZlibError extends Error {
|
24248
24027
|
constructor(err) {
|
24249
24028
|
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);
|
@@ -27201,6 +26980,16 @@ async function isNextJsTemplate(root2) {
|
|
27201
26980
|
return !1;
|
27202
26981
|
}
|
27203
26982
|
}
|
26983
|
+
async function checkNeedsReadToken(root2) {
|
26984
|
+
try {
|
26985
|
+
const templatePath = await Promise.any(
|
26986
|
+
ENV_TEMPLATE_FILES.map(async (file) => (await fs.access(path$2.join(root2, file)), file))
|
26987
|
+
);
|
26988
|
+
return (await fs.readFile(path$2.join(root2, templatePath), "utf8")).includes(ENV_VAR.READ_TOKEN);
|
26989
|
+
} catch {
|
26990
|
+
return !1;
|
26991
|
+
}
|
26992
|
+
}
|
27204
26993
|
async function applyEnvVariables(root2, envData, targetName = ".env") {
|
27205
26994
|
const templatePath = await Promise.any(
|
27206
26995
|
ENV_TEMPLATE_FILES.map(async (file) => (await fs.access(path$2.join(root2, file)), file))
|
@@ -29272,10 +29061,10 @@ function requirePathVisitor() {
|
|
29272
29061
|
}, PVp.abort = function() {
|
29273
29062
|
var visitor = this;
|
29274
29063
|
visitor._abortRequested = !0;
|
29275
|
-
var
|
29276
|
-
throw
|
29064
|
+
var request = new visitor.AbortRequest();
|
29065
|
+
throw request.cancel = function() {
|
29277
29066
|
visitor._abortRequested = !1;
|
29278
|
-
},
|
29067
|
+
}, request;
|
29279
29068
|
}, PVp.reset = function(_path) {
|
29280
29069
|
}, PVp.visitWithoutReset = function(path2) {
|
29281
29070
|
if (this instanceof this.Context)
|
@@ -48276,7 +48065,7 @@ function requireRimraf() {
|
|
48276
48065
|
};
|
48277
48066
|
return rimraf_1 = rimraf2, rimraf2.sync = rimrafSync, rimraf_1;
|
48278
48067
|
}
|
48279
|
-
var rimrafExports = requireRimraf(),
|
48068
|
+
var rimrafExports = requireRimraf(), rimraf = /* @__PURE__ */ loadEnv.getDefaultExportFromCjs(rimrafExports);
|
48280
48069
|
const defaultCommitMessage = "feat: bootstrap sanity studio";
|
48281
48070
|
function tryGitInit(rootDir, commitMessage) {
|
48282
48071
|
const execOptions = { stdio: "ignore", cwd: rootDir };
|
@@ -48289,7 +48078,7 @@ function tryGitInit(rootDir, commitMessage) {
|
|
48289
48078
|
} catch {
|
48290
48079
|
if (didInit)
|
48291
48080
|
try {
|
48292
|
-
|
48081
|
+
rimraf.sync(path__default.default.join(rootDir, ".git"));
|
48293
48082
|
} catch {
|
48294
48083
|
}
|
48295
48084
|
return !1;
|
@@ -48311,15 +48100,15 @@ function isInMercurialRepository(rootDir) {
|
|
48311
48100
|
}
|
48312
48101
|
const INITIAL_COMMIT_MESSAGE = "Initial commit from Sanity CLI";
|
48313
48102
|
async function bootstrapRemoteTemplate(opts, context) {
|
48314
|
-
const { outputPath, repoInfo, bearerToken, variables, packageName
|
48103
|
+
const { outputPath, repoInfo, bearerToken, variables, packageName } = opts, { output, apiClient } = context, name = [repoInfo.username, repoInfo.name, repoInfo.filePath].filter(Boolean).join("/"), spinner = output.spinner(`Bootstrapping files from template "${name}"`).start();
|
48315
48104
|
loadEnv.debug("Validating remote template");
|
48316
48105
|
const packages = await getMonoRepo(repoInfo, bearerToken);
|
48317
|
-
await validateRemoteTemplate(repoInfo, packages, bearerToken), loadEnv.debug('Create new directory "%s"', outputPath), await fs.mkdir(outputPath, { recursive: !0 }), loadEnv.debug("Downloading and extracting repo to %s", outputPath), await downloadAndExtractRepo(outputPath, repoInfo, bearerToken), loadEnv.debug("
|
48318
|
-
const
|
48319
|
-
|
48320
|
-
|
48321
|
-
|
48322
|
-
), envName = await isNextJsTemplate(outputPath) ? ".env.local" : ".env";
|
48106
|
+
await validateRemoteTemplate(repoInfo, packages, bearerToken), loadEnv.debug('Create new directory "%s"', outputPath), await fs.mkdir(outputPath, { recursive: !0 }), loadEnv.debug("Downloading and extracting repo to %s", outputPath), await downloadAndExtractRepo(outputPath, repoInfo, bearerToken), loadEnv.debug("Checking if template needs read token");
|
48107
|
+
const needsReadToken = await Promise.all(
|
48108
|
+
(packages ?? [""]).map((pkg) => checkNeedsReadToken(path$2.join(outputPath, pkg)))
|
48109
|
+
).then((results) => results.some(Boolean));
|
48110
|
+
loadEnv.debug("Applying environment variables");
|
48111
|
+
const readToken = needsReadToken ? await generateSanityApiReadToken("API Read Token", variables.projectId, apiClient) : void 0, envName = await isNextJsTemplate(outputPath) ? ".env.local" : ".env";
|
48323
48112
|
for (const folder of packages ?? [""]) {
|
48324
48113
|
const path2 = path$2.join(outputPath, folder);
|
48325
48114
|
await applyEnvVariables(path2, { ...variables, readToken }, envName);
|
@@ -48469,236 +48258,6 @@ function readPackageJson(filePath) {
|
|
48469
48258
|
return;
|
48470
48259
|
}
|
48471
48260
|
}
|
48472
|
-
async function pathExists(filePath) {
|
48473
|
-
try {
|
48474
|
-
return await fs__default$1.default.access(filePath), !0;
|
48475
|
-
} catch (err) {
|
48476
|
-
if (err.code === "ENOENT")
|
48477
|
-
return !1;
|
48478
|
-
throw err;
|
48479
|
-
}
|
48480
|
-
}
|
48481
|
-
function writeJson$1(filePath, content) {
|
48482
|
-
const serialized = JSON.stringify(content, null, 2);
|
48483
|
-
return fs.writeFile(filePath, serialized, "utf8");
|
48484
|
-
}
|
48485
|
-
const isCI$1 = process.env.CI;
|
48486
|
-
async function reconfigureV2Project(args, context) {
|
48487
|
-
const { output, prompt: prompt2, workDir, apiClient, yarn, chalk: chalk2 } = context, cliFlags = args.extOptions, unattended = cliFlags.y || cliFlags.yes, print = unattended ? lodashExports.noop : output.print;
|
48488
|
-
let defaultConfig = cliFlags["dataset-default"], showDefaultConfigPrompt = !defaultConfig;
|
48489
|
-
const manifestPath = path__default.default.join(workDir, "sanity.json");
|
48490
|
-
let projectManifest = await readJson(manifestPath);
|
48491
|
-
const hasProjectId = projectManifest && projectManifest.api && projectManifest.api.projectId;
|
48492
|
-
print("The Sanity Studio in this folder will be tied to a new project on Sanity.io!"), hasProjectId && print("The previous project configuration will be overwritten."), print("We're first going to make sure you have an account with Sanity.io. Hang on."), print(`Press ctrl + C at any time to quit.
|
48493
|
-
`);
|
48494
|
-
const hasToken = getUserConfig().get("authToken");
|
48495
|
-
loadEnv.debug(hasToken ? "User already has a token" : "User has no token"), hasToken ? print(`Looks like you already have a Sanity-account. Sweet!
|
48496
|
-
`) : unattended || await getOrCreateUser();
|
48497
|
-
const flags = await prepareFlags();
|
48498
|
-
loadEnv.debug("Prompting user to select or create a project");
|
48499
|
-
const { projectId, displayName, isFirstProject } = await getOrCreateProject();
|
48500
|
-
loadEnv.debug(`Project with name ${displayName} selected`), loadEnv.debug("Prompting user to select or create a dataset");
|
48501
|
-
const { datasetName } = await getOrCreateDataset({
|
48502
|
-
projectId,
|
48503
|
-
displayName,
|
48504
|
-
dataset: flags.dataset,
|
48505
|
-
aclMode: flags.visibility,
|
48506
|
-
defaultConfig: flags["dataset-default"]
|
48507
|
-
});
|
48508
|
-
loadEnv.debug(`Dataset with name ${datasetName} selected`);
|
48509
|
-
const outputPath = workDir, projectInfo = projectManifest.project || {}, newProps = {
|
48510
|
-
root: !0,
|
48511
|
-
api: {
|
48512
|
-
...projectManifest.api || {},
|
48513
|
-
projectId,
|
48514
|
-
dataset: datasetName
|
48515
|
-
},
|
48516
|
-
project: {
|
48517
|
-
...projectInfo,
|
48518
|
-
// Keep original name if present
|
48519
|
-
name: projectInfo.name || displayName
|
48520
|
-
}
|
48521
|
-
};
|
48522
|
-
if (projectManifest = {
|
48523
|
-
...newProps,
|
48524
|
-
...projectManifest,
|
48525
|
-
...newProps
|
48526
|
-
}, await writeJson$1(manifestPath, projectManifest), await pathExists(path__default.default.join(workDir, "node_modules")))
|
48527
|
-
print("Skipping installation of dependencies since node_modules exists."), print("Run sanity install to reinstall dependencies");
|
48528
|
-
else
|
48529
|
-
try {
|
48530
|
-
await yarn(["install"], { ...output, rootDir: workDir });
|
48531
|
-
} catch (err) {
|
48532
|
-
throw err;
|
48533
|
-
}
|
48534
|
-
print(`
|
48535
|
-
${chalk2.green("Success!")} Now what?
|
48536
|
-
`), outputPath === process.cwd() || print(`\u25AA ${chalk2.cyan(`cd ${outputPath}`)}, then:`), print(`\u25AA ${chalk2.cyan("sanity docs")} to open the documentation in a browser`), print(`\u25AA ${chalk2.cyan("sanity manage")} to open the project settings in a browser`), print(`\u25AA ${chalk2.cyan("sanity help")} to explore the CLI manual`), print(`\u25AA ${chalk2.green("sanity start")} to run your studio
|
48537
|
-
`), isFirstProject && await prompt2.single({
|
48538
|
-
type: "confirm",
|
48539
|
-
message: "We have an excellent developer community, would you like us to send you an invitation to join?",
|
48540
|
-
default: !0
|
48541
|
-
}) && apiClient({ requireProject: !1 }).request({
|
48542
|
-
uri: "/invitations/community",
|
48543
|
-
method: "POST"
|
48544
|
-
}).catch(lodashExports.noop);
|
48545
|
-
async function getOrCreateUser() {
|
48546
|
-
print("We can't find any auth credentials in your Sanity config"), print(`- log in or create a new account
|
48547
|
-
`);
|
48548
|
-
const { extOptions, ...otherArgs } = args, loginArgs = { ...otherArgs, extOptions: {} };
|
48549
|
-
await login(loginArgs, context), print("Good stuff, you're now authenticated. You'll need a project to keep your"), print("datasets and collaborators safe and snug.");
|
48550
|
-
}
|
48551
|
-
async function getOrCreateProject() {
|
48552
|
-
let projects;
|
48553
|
-
try {
|
48554
|
-
projects = await apiClient({ requireProject: !1 }).projects.list({ includeMembers: !1 });
|
48555
|
-
} catch (err) {
|
48556
|
-
if (unattended && flags.project)
|
48557
|
-
return { projectId: flags.project, displayName: "Unknown project", isFirstProject: !1 };
|
48558
|
-
throw new Error(`Failed to communicate with the Sanity API:
|
48559
|
-
${err.message}`);
|
48560
|
-
}
|
48561
|
-
if (projects.length === 0 && unattended)
|
48562
|
-
throw new Error("No projects found for current user");
|
48563
|
-
if (flags.project) {
|
48564
|
-
const project = projects.find((proj) => proj.id === flags.project);
|
48565
|
-
if (!project && !unattended)
|
48566
|
-
throw new Error(
|
48567
|
-
`Given project ID (${flags.project}) not found, or you do not have access to it`
|
48568
|
-
);
|
48569
|
-
return {
|
48570
|
-
projectId: flags.project,
|
48571
|
-
displayName: project ? project.displayName : "Unknown project",
|
48572
|
-
isFirstProject: !1
|
48573
|
-
};
|
48574
|
-
}
|
48575
|
-
const isUsersFirstProject = projects.length === 0;
|
48576
|
-
if (isUsersFirstProject) {
|
48577
|
-
loadEnv.debug("No projects found for user, prompting for name");
|
48578
|
-
const projectName = await prompt2.single({ type: "input", message: "Project name:" });
|
48579
|
-
return createProject(apiClient, {
|
48580
|
-
displayName: projectName,
|
48581
|
-
subscription: void 0
|
48582
|
-
}).then((response) => ({
|
48583
|
-
...response,
|
48584
|
-
isFirstProject: isUsersFirstProject
|
48585
|
-
}));
|
48586
|
-
}
|
48587
|
-
loadEnv.debug(`User has ${projects.length} project(s) already, showing list of choices`);
|
48588
|
-
const projectChoices = projects.map((project) => ({
|
48589
|
-
value: project.id,
|
48590
|
-
name: `${project.displayName} [${project.id}]`
|
48591
|
-
})), selected = await prompt2.single({
|
48592
|
-
message: "Select project to use",
|
48593
|
-
type: "list",
|
48594
|
-
choices: [
|
48595
|
-
{ value: "new", name: "Create new project" },
|
48596
|
-
new prompt2.Separator(),
|
48597
|
-
...projectChoices
|
48598
|
-
]
|
48599
|
-
});
|
48600
|
-
return selected === "new" ? (loadEnv.debug("User wants to create a new project, prompting for name"), createProject(apiClient, {
|
48601
|
-
displayName: await prompt2.single({
|
48602
|
-
type: "input",
|
48603
|
-
message: "Your project name:",
|
48604
|
-
default: "My Sanity Project"
|
48605
|
-
}),
|
48606
|
-
subscription: void 0
|
48607
|
-
}).then((response) => ({
|
48608
|
-
...response,
|
48609
|
-
isFirstProject: isUsersFirstProject
|
48610
|
-
}))) : (loadEnv.debug(`Returning selected project (${selected})`), {
|
48611
|
-
projectId: selected,
|
48612
|
-
displayName: projects.find((proj) => proj.id === selected)?.displayName || "",
|
48613
|
-
isFirstProject: isUsersFirstProject
|
48614
|
-
});
|
48615
|
-
}
|
48616
|
-
async function getOrCreateDataset(opts) {
|
48617
|
-
if (opts.dataset && isCI$1)
|
48618
|
-
return { datasetName: opts.dataset };
|
48619
|
-
const client2 = apiClient({ api: { projectId: opts.projectId } }), [datasets, projectFeatures] = await Promise.all([
|
48620
|
-
client2.datasets.list(),
|
48621
|
-
client2.request({ uri: "/features" })
|
48622
|
-
]), privateDatasetsAllowed = projectFeatures.includes("privateDataset"), allowedModes = privateDatasetsAllowed ? ["public", "private"] : ["public"];
|
48623
|
-
if (opts.aclMode && !allowedModes.includes(opts.aclMode))
|
48624
|
-
throw new Error(`Visibility mode "${opts.aclMode}" not allowed`);
|
48625
|
-
const getAclMode = async () => opts.aclMode ? opts.aclMode : unattended || !privateDatasetsAllowed || defaultConfig ? "public" : privateDatasetsAllowed ? await promptForAclMode(prompt2, output) : "public";
|
48626
|
-
if (opts.dataset) {
|
48627
|
-
if (loadEnv.debug("User has specified dataset through a flag (%s)", opts.dataset), !datasets.find((ds) => ds.name === opts.dataset)) {
|
48628
|
-
loadEnv.debug("Specified dataset not found, creating it");
|
48629
|
-
const aclMode = await getAclMode(), spinner = context.output.spinner("Creating dataset").start();
|
48630
|
-
await client2.datasets.create(opts.dataset, { aclMode }), spinner.succeed();
|
48631
|
-
}
|
48632
|
-
return { datasetName: opts.dataset };
|
48633
|
-
}
|
48634
|
-
const datasetInfo = `Your content will be stored in a dataset that can be public or private, depending on
|
48635
|
-
whether you want to query your content with or without authentication.
|
48636
|
-
The default dataset configuration has a public dataset named "production".`;
|
48637
|
-
if (datasets.length === 0) {
|
48638
|
-
loadEnv.debug("No datasets found for project, prompting for name"), showDefaultConfigPrompt && (output.print(datasetInfo), defaultConfig = await promptForDefaultConfig(prompt2));
|
48639
|
-
const name = defaultConfig ? "production" : await promptForDatasetName(prompt2, {
|
48640
|
-
message: "Name of your first dataset:"
|
48641
|
-
}), aclMode = await getAclMode(), spinner = context.output.spinner("Creating dataset").start();
|
48642
|
-
return await client2.datasets.create(name, { aclMode }), spinner.succeed(), { datasetName: name };
|
48643
|
-
}
|
48644
|
-
loadEnv.debug(`User has ${datasets.length} dataset(s) already, showing list of choices`);
|
48645
|
-
const datasetChoices = datasets.map((dataset) => ({ value: dataset.name })), selected = await prompt2.single({
|
48646
|
-
message: "Select dataset to use",
|
48647
|
-
type: "list",
|
48648
|
-
choices: [
|
48649
|
-
{ value: "new", name: "Create new dataset" },
|
48650
|
-
new prompt2.Separator(),
|
48651
|
-
...datasetChoices
|
48652
|
-
]
|
48653
|
-
});
|
48654
|
-
if (selected === "new") {
|
48655
|
-
const existingDatasetNames = datasets.map((ds) => ds.name);
|
48656
|
-
loadEnv.debug("User wants to create a new dataset, prompting for name"), showDefaultConfigPrompt && !existingDatasetNames.includes("production") && (output.print(datasetInfo), defaultConfig = await promptForDefaultConfig(prompt2));
|
48657
|
-
const newDatasetName = defaultConfig ? "production" : await promptForDatasetName(
|
48658
|
-
prompt2,
|
48659
|
-
{
|
48660
|
-
message: "Dataset name:"
|
48661
|
-
},
|
48662
|
-
existingDatasetNames
|
48663
|
-
), aclMode = await getAclMode(), spinner = context.output.spinner("Creating dataset").start();
|
48664
|
-
return await client2.datasets.create(newDatasetName, { aclMode }), spinner.succeed(), { datasetName: newDatasetName };
|
48665
|
-
}
|
48666
|
-
return loadEnv.debug(`Returning selected dataset (${selected})`), { datasetName: selected };
|
48667
|
-
}
|
48668
|
-
async function prepareFlags() {
|
48669
|
-
const createProjectName = cliFlags["create-project"];
|
48670
|
-
if ((cliFlags.dataset || cliFlags.visibility || cliFlags["dataset-default"] || unattended) && (showDefaultConfigPrompt = !1), cliFlags.project && createProjectName)
|
48671
|
-
throw new Error(
|
48672
|
-
"Both `--project` and `--create-project` specified, only a single is supported"
|
48673
|
-
);
|
48674
|
-
if (createProjectName === !0)
|
48675
|
-
throw new Error("Please specify a project name (`--create-project <name>`)");
|
48676
|
-
if (typeof createProjectName == "string" && createProjectName.trim().length === 0)
|
48677
|
-
throw new Error("Please specify a project name (`--create-project <name>`)");
|
48678
|
-
if (unattended && (loadEnv.debug("Unattended mode, validating required options"), ["dataset", "output-path"].forEach((flag) => {
|
48679
|
-
if (!cliFlags[flag])
|
48680
|
-
throw new Error(`\`--${flag}\` must be specified in unattended mode`);
|
48681
|
-
}), !cliFlags.project && !createProjectName))
|
48682
|
-
throw new Error(
|
48683
|
-
"`--project <id>` or `--create-project <name>` must be specified in unattended mode"
|
48684
|
-
);
|
48685
|
-
if (createProjectName) {
|
48686
|
-
loadEnv.debug("--create-project specified, creating a new project");
|
48687
|
-
const createdProject = await createProject(apiClient, {
|
48688
|
-
displayName: createProjectName.trim(),
|
48689
|
-
subscription: void 0
|
48690
|
-
});
|
48691
|
-
if (loadEnv.debug("Project with ID %s created", createdProject.projectId), cliFlags.dataset) {
|
48692
|
-
loadEnv.debug("--dataset specified, creating dataset (%s)", cliFlags.dataset);
|
48693
|
-
const client2 = apiClient({ api: { projectId: createdProject.projectId } }), spinner = context.output.spinner("Creating dataset").start(), createBody = cliFlags.visibility ? { aclMode: cliFlags.visibility } : {};
|
48694
|
-
await client2.datasets.create(cliFlags.dataset, createBody), spinner.succeed();
|
48695
|
-
}
|
48696
|
-
const newFlags = { ...cliFlags, project: createdProject.projectId };
|
48697
|
-
return delete newFlags["create-project"], newFlags;
|
48698
|
-
}
|
48699
|
-
return cliFlags;
|
48700
|
-
}
|
48701
|
-
}
|
48702
48261
|
const authorType = `import {UserIcon} from '@sanity/icons'
|
48703
48262
|
import {defineArrayMember, defineField, defineType} from 'sanity'
|
48704
48263
|
|
@@ -49126,16 +48685,7 @@ export const urlFor = (source) => {
|
|
49126
48685
|
}, structure["structure."] = useTypeScript ? structureTS : structureJS), structure;
|
49127
48686
|
}, isCI = !!process.env.CI;
|
49128
48687
|
async function initSanity(args, context) {
|
49129
|
-
const {
|
49130
|
-
output,
|
49131
|
-
prompt: prompt2,
|
49132
|
-
workDir,
|
49133
|
-
apiClient,
|
49134
|
-
chalk: chalk2,
|
49135
|
-
sanityMajorVersion,
|
49136
|
-
telemetry: telemetry2,
|
49137
|
-
detectedFramework
|
49138
|
-
} = context, trace = telemetry2.trace(CLIInitStepCompleted), cliFlags = args.extOptions, unattended = cliFlags.y || cliFlags.yes, print = unattended ? lodashExports.noop : output.print, warn = (msg) => output.warn(chalk2.yellow.bgBlack(msg)), intendedPlan = cliFlags["project-plan"], intendedCoupon = cliFlags.coupon, reconfigure = cliFlags.reconfigure, commitMessage = cliFlags.git, useGit = typeof commitMessage > "u" ? !0 : !!commitMessage, bareOutput = cliFlags.bare, env = cliFlags.env, packageManager = cliFlags["package-manager"];
|
48688
|
+
const { output, prompt: prompt2, workDir, apiClient, chalk: chalk2, telemetry: telemetry2, detectedFramework } = context, trace = telemetry2.trace(CLIInitStepCompleted), cliFlags = args.extOptions, unattended = cliFlags.y || cliFlags.yes, print = unattended ? lodashExports.noop : output.print, warn = (msg) => output.warn(chalk2.yellow.bgBlack(msg)), intendedPlan = cliFlags["project-plan"], intendedCoupon = cliFlags.coupon, reconfigure = cliFlags.reconfigure, commitMessage = cliFlags.git, useGit = typeof commitMessage > "u" ? !0 : !!commitMessage, bareOutput = cliFlags.bare, env = cliFlags.env, packageManager = cliFlags["package-manager"];
|
49139
48689
|
let remoteTemplateInfo;
|
49140
48690
|
cliFlags.template && checkIsRemoteTemplate(cliFlags.template) && (remoteTemplateInfo = await getGitHubRepoInfo(cliFlags.template, cliFlags["template-token"]));
|
49141
48691
|
let defaultConfig = cliFlags["dataset-default"], showDefaultConfigPrompt = !defaultConfig;
|
@@ -49151,11 +48701,7 @@ async function initSanity(args, context) {
|
|
49151
48701
|
bare: bareOutput,
|
49152
48702
|
env
|
49153
48703
|
}
|
49154
|
-
}),
|
49155
|
-
await reconfigureV2Project(args, context);
|
49156
|
-
return;
|
49157
|
-
}
|
49158
|
-
if (detectedFramework && detectedFramework.slug !== "sanity" && remoteTemplateInfo)
|
48704
|
+
}), detectedFramework && detectedFramework.slug !== "sanity" && remoteTemplateInfo)
|
49159
48705
|
throw new Error(
|
49160
48706
|
`A remote template cannot be used with a detected framework. Detected: ${detectedFramework.name}`
|
49161
48707
|
);
|
@@ -49694,8 +49240,7 @@ The default dataset configuration has a public dataset named "production".`;
|
|
49694
49240
|
packageName: sluggedName,
|
49695
49241
|
repoInfo: remoteTemplateInfo,
|
49696
49242
|
bearerToken: cliFlags["template-token"],
|
49697
|
-
variables: bootstrapVariables
|
49698
|
-
isCI
|
49243
|
+
variables: bootstrapVariables
|
49699
49244
|
},
|
49700
49245
|
context
|
49701
49246
|
) : bootstrapLocalTemplate(
|
@@ -49950,7 +49495,7 @@ async function hasGlobalCli() {
|
|
49950
49495
|
return !1;
|
49951
49496
|
}
|
49952
49497
|
}
|
49953
|
-
const helpText$
|
49498
|
+
const helpText$7 = `
|
49954
49499
|
Options
|
49955
49500
|
-y, --yes Use unattended mode, accepting defaults and using only flags for choices
|
49956
49501
|
--project <projectId> Project ID to use for the studio
|
@@ -49995,14 +49540,9 @@ Examples
|
|
49995
49540
|
name: "init",
|
49996
49541
|
signature: "",
|
49997
49542
|
description: "Initializes a new Sanity Studio and/or project",
|
49998
|
-
helpText: helpText$
|
49543
|
+
helpText: helpText$7,
|
49999
49544
|
action: async (args, context) => {
|
50000
49545
|
const [type2] = args.argsWithoutOptions;
|
50001
|
-
if (type2 === "plugin")
|
50002
|
-
return context.sanityMajorVersion === 2 ? (
|
50003
|
-
// don't bother with telemetry here, as it's not supported in v3
|
50004
|
-
initPlugin(args, context)
|
50005
|
-
) : Promise.reject(new Error("'sanity init plugin' is not available in modern studios"));
|
50006
49546
|
if (type2)
|
50007
49547
|
return Promise.reject(new Error(`Unknown init type "${type2}"`));
|
50008
49548
|
const detectedFramework = await distExports.detectFrameworkRecord({
|
@@ -50038,7 +49578,7 @@ Examples
|
|
50038
49578
|
const { output } = context, { print } = output, url = "https://www.sanity.io/learn";
|
50039
49579
|
print(`Opening ${url}`), await open(url);
|
50040
49580
|
}
|
50041
|
-
}, helpText$
|
49581
|
+
}, helpText$6 = `
|
50042
49582
|
Options
|
50043
49583
|
--sso <slug> Log in using Single Sign On, using the given slug
|
50044
49584
|
--provider <providerId> Authenticate against a specific provider
|
@@ -50056,16 +49596,16 @@ Examples
|
|
50056
49596
|
`, loginCommand = {
|
50057
49597
|
name: "login",
|
50058
49598
|
signature: "[--sso <slug>] [--provider <providerId>] [--no-open]",
|
50059
|
-
helpText: helpText$
|
49599
|
+
helpText: helpText$6,
|
50060
49600
|
description: "Authenticates the CLI for access to Sanity projects",
|
50061
49601
|
action: login
|
50062
|
-
}, helpText$
|
49602
|
+
}, helpText$5 = `
|
50063
49603
|
Examples
|
50064
49604
|
# Log out of the CLI
|
50065
49605
|
sanity logout
|
50066
49606
|
`, logoutCommand = {
|
50067
49607
|
name: "logout",
|
50068
|
-
helpText: helpText$
|
49608
|
+
helpText: helpText$5,
|
50069
49609
|
signature: "logout",
|
50070
49610
|
description: "Logs out the CLI from the current user session",
|
50071
49611
|
async action(args, { output, apiClient }) {
|
@@ -50095,7 +49635,7 @@ ${err.message}`));
|
|
50095
49635
|
const { output, cliConfig } = context, { print } = output, projectId = cliConfig?.api?.projectId, url = projectId ? `https://www.sanity.io/manage/project/${projectId}` : "https://www.sanity.io/manage/";
|
50096
49636
|
print(`Opening ${url}`), await open(url);
|
50097
49637
|
}
|
50098
|
-
}, headings = ["id", "members", "name", "url", "created"], helpText$
|
49638
|
+
}, headings = ["id", "members", "name", "url", "created"], helpText$4 = `
|
50099
49639
|
Options
|
50100
49640
|
--sort <field> Sort output by specified column
|
50101
49641
|
--order <asc/desc> Sort output ascending/descending
|
@@ -50113,7 +49653,7 @@ Examples
|
|
50113
49653
|
name: "list",
|
50114
49654
|
group: "projects",
|
50115
49655
|
signature: "",
|
50116
|
-
helpText: helpText$
|
49656
|
+
helpText: helpText$4,
|
50117
49657
|
description: "Lists projects connected to your user",
|
50118
49658
|
action: async (args, context) => {
|
50119
49659
|
const { apiClient, output, chalk: chalk2 } = context, flags = { ...defaultFlags, ...args.extOptions }, projects = await apiClient({
|
@@ -50136,7 +49676,7 @@ Examples
|
|
50136
49676
|
signature: "[COMMAND]",
|
50137
49677
|
isGroupRoot: !0,
|
50138
49678
|
description: "Lists all projects associated with your logged-in account"
|
50139
|
-
}, helpText$
|
49679
|
+
}, helpText$3 = `
|
50140
49680
|
Examples
|
50141
49681
|
# Check telemetry consent status for your logged in user
|
50142
49682
|
sanity telemetry status
|
@@ -50167,7 +49707,7 @@ ${url}`;
|
|
50167
49707
|
const telemetryStatusCommand = {
|
50168
49708
|
name: "status",
|
50169
49709
|
group: "telemetry",
|
50170
|
-
helpText: helpText$
|
49710
|
+
helpText: helpText$3,
|
50171
49711
|
signature: "",
|
50172
49712
|
description: "Check telemetry consent status for your logged in user",
|
50173
49713
|
action: async (_, context) => {
|
@@ -50256,25 +49796,25 @@ function createSetTelemetryConsentAction(status) {
|
|
50256
49796
|
${telemetryLearnMoreMessage(status)}`);
|
50257
49797
|
};
|
50258
49798
|
}
|
50259
|
-
const helpText$
|
49799
|
+
const helpText$2 = `
|
50260
49800
|
Examples
|
50261
49801
|
# Disable telemetry for your logged in user
|
50262
49802
|
sanity telemetry disable
|
50263
49803
|
`, disableTelemetryCommand = {
|
50264
49804
|
name: "disable",
|
50265
49805
|
group: "telemetry",
|
50266
|
-
helpText: helpText$
|
49806
|
+
helpText: helpText$2,
|
50267
49807
|
signature: "",
|
50268
49808
|
description: "Disable telemetry for your logged in user",
|
50269
49809
|
action: createSetTelemetryConsentAction("denied")
|
50270
|
-
}, helpText$
|
49810
|
+
}, helpText$1 = `
|
50271
49811
|
Examples
|
50272
49812
|
# Enable telemetry for your logged in user
|
50273
49813
|
sanity telemetry enable
|
50274
49814
|
`, enableTelemetryCommand = {
|
50275
49815
|
name: "enable",
|
50276
49816
|
group: "telemetry",
|
50277
|
-
helpText: helpText$
|
49817
|
+
helpText: helpText$1,
|
50278
49818
|
signature: "",
|
50279
49819
|
description: "Enable telemetry for your logged in user",
|
50280
49820
|
action: createSetTelemetryConsentAction("granted")
|
@@ -50283,7 +49823,7 @@ Examples
|
|
50283
49823
|
signature: "[COMMAND]",
|
50284
49824
|
isGroupRoot: !0,
|
50285
49825
|
description: "Manages telemetry settings, opting in or out of data collection"
|
50286
|
-
}, description = "Generates TypeScript types from schema types and GROQ queries", helpText
|
49826
|
+
}, description = "Generates TypeScript types from schema types and GROQ queries", helpText = `
|
50287
49827
|
Sanity TypeGen (Beta)
|
50288
49828
|
This command is currently in beta and may undergo significant changes. Feedback is welcome!
|
50289
49829
|
|
@@ -50324,7 +49864,7 @@ Note:
|
|
50324
49864
|
group: "typegen",
|
50325
49865
|
signature: "",
|
50326
49866
|
description,
|
50327
|
-
helpText
|
49867
|
+
helpText,
|
50328
49868
|
action: async (args, context) => (await Promise.resolve().then(function() {
|
50329
49869
|
return require("./generateAction.js");
|
50330
49870
|
})).default(args, context)
|
@@ -50333,506 +49873,6 @@ Note:
|
|
50333
49873
|
signature: "[COMMAND]",
|
50334
49874
|
isGroupRoot: !0,
|
50335
49875
|
description: "Beta: Generate TypeScript types for schema and GROQ"
|
50336
|
-
};
|
50337
|
-
var boxen$1 = { exports: {} }, stringWidth$2 = { exports: {} }, ansiRegex$3, hasRequiredAnsiRegex$2;
|
50338
|
-
function requireAnsiRegex$2() {
|
50339
|
-
return hasRequiredAnsiRegex$2 || (hasRequiredAnsiRegex$2 = 1, ansiRegex$3 = ({ onlyFirst = !1 } = {}) => {
|
50340
|
-
const pattern = [
|
50341
|
-
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
50342
|
-
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
50343
|
-
].join("|");
|
50344
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
50345
|
-
}), ansiRegex$3;
|
50346
|
-
}
|
50347
|
-
var stripAnsi$3, hasRequiredStripAnsi$2;
|
50348
|
-
function requireStripAnsi$2() {
|
50349
|
-
if (hasRequiredStripAnsi$2) return stripAnsi$3;
|
50350
|
-
hasRequiredStripAnsi$2 = 1;
|
50351
|
-
const ansiRegex2 = requireAnsiRegex$2();
|
50352
|
-
return stripAnsi$3 = (string) => typeof string == "string" ? string.replace(ansiRegex2(), "") : string, stripAnsi$3;
|
50353
|
-
}
|
50354
|
-
var isFullwidthCodePoint$1 = { exports: {} }, hasRequiredIsFullwidthCodePoint$1;
|
50355
|
-
function requireIsFullwidthCodePoint$1() {
|
50356
|
-
if (hasRequiredIsFullwidthCodePoint$1) return isFullwidthCodePoint$1.exports;
|
50357
|
-
hasRequiredIsFullwidthCodePoint$1 = 1;
|
50358
|
-
const isFullwidthCodePoint2 = (codePoint) => Number.isNaN(codePoint) ? !1 : codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
|
50359
|
-
codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
|
50360
|
-
codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
|
50361
|
-
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
50362
|
-
11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
50363
|
-
12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
|
50364
|
-
19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
|
50365
|
-
43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
|
50366
|
-
44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
|
50367
|
-
63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
|
50368
|
-
65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
|
50369
|
-
65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
|
50370
|
-
65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
|
50371
|
-
110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
|
50372
|
-
127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
50373
|
-
131072 <= codePoint && codePoint <= 262141);
|
50374
|
-
return isFullwidthCodePoint$1.exports = isFullwidthCodePoint2, isFullwidthCodePoint$1.exports.default = isFullwidthCodePoint2, isFullwidthCodePoint$1.exports;
|
50375
|
-
}
|
50376
|
-
var emojiRegex$1, hasRequiredEmojiRegex;
|
50377
|
-
function requireEmojiRegex() {
|
50378
|
-
return hasRequiredEmojiRegex || (hasRequiredEmojiRegex = 1, emojiRegex$1 = function() {
|
50379
|
-
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
50380
|
-
}), emojiRegex$1;
|
50381
|
-
}
|
50382
|
-
var hasRequiredStringWidth$1;
|
50383
|
-
function requireStringWidth$1() {
|
50384
|
-
if (hasRequiredStringWidth$1) return stringWidth$2.exports;
|
50385
|
-
hasRequiredStringWidth$1 = 1;
|
50386
|
-
const stripAnsi2 = requireStripAnsi$2(), isFullwidthCodePoint2 = requireIsFullwidthCodePoint$1(), emojiRegex2 = requireEmojiRegex(), stringWidth2 = (string) => {
|
50387
|
-
if (typeof string != "string" || string.length === 0 || (string = stripAnsi2(string), string.length === 0))
|
50388
|
-
return 0;
|
50389
|
-
string = string.replace(emojiRegex2(), " ");
|
50390
|
-
let width = 0;
|
50391
|
-
for (let i = 0; i < string.length; i++) {
|
50392
|
-
const code = string.codePointAt(i);
|
50393
|
-
code <= 31 || code >= 127 && code <= 159 || code >= 768 && code <= 879 || (code > 65535 && i++, width += isFullwidthCodePoint2(code) ? 2 : 1);
|
50394
|
-
}
|
50395
|
-
return width;
|
50396
|
-
};
|
50397
|
-
return stringWidth$2.exports = stringWidth2, stringWidth$2.exports.default = stringWidth2, stringWidth$2.exports;
|
50398
|
-
}
|
50399
|
-
var widestLine = { exports: {} }, hasRequiredWidestLine;
|
50400
|
-
function requireWidestLine() {
|
50401
|
-
if (hasRequiredWidestLine) return widestLine.exports;
|
50402
|
-
hasRequiredWidestLine = 1;
|
50403
|
-
const stringWidth2 = requireStringWidth$1(), widestLine$1 = (input2) => {
|
50404
|
-
let max2 = 0;
|
50405
|
-
for (const line3 of input2.split(`
|
50406
|
-
`))
|
50407
|
-
max2 = Math.max(max2, stringWidth2(line3));
|
50408
|
-
return max2;
|
50409
|
-
};
|
50410
|
-
return widestLine.exports = widestLine$1, widestLine.exports.default = widestLine$1, widestLine.exports;
|
50411
|
-
}
|
50412
|
-
var cliBoxes = { exports: {} }, single$1 = {
|
50413
|
-
topLeft: "\u250C",
|
50414
|
-
topRight: "\u2510",
|
50415
|
-
bottomRight: "\u2518",
|
50416
|
-
bottomLeft: "\u2514",
|
50417
|
-
vertical: "\u2502",
|
50418
|
-
horizontal: "\u2500"
|
50419
|
-
}, double = {
|
50420
|
-
topLeft: "\u2554",
|
50421
|
-
topRight: "\u2557",
|
50422
|
-
bottomRight: "\u255D",
|
50423
|
-
bottomLeft: "\u255A",
|
50424
|
-
vertical: "\u2551",
|
50425
|
-
horizontal: "\u2550"
|
50426
|
-
}, round = {
|
50427
|
-
topLeft: "\u256D",
|
50428
|
-
topRight: "\u256E",
|
50429
|
-
bottomRight: "\u256F",
|
50430
|
-
bottomLeft: "\u2570",
|
50431
|
-
vertical: "\u2502",
|
50432
|
-
horizontal: "\u2500"
|
50433
|
-
}, bold = {
|
50434
|
-
topLeft: "\u250F",
|
50435
|
-
topRight: "\u2513",
|
50436
|
-
bottomRight: "\u251B",
|
50437
|
-
bottomLeft: "\u2517",
|
50438
|
-
vertical: "\u2503",
|
50439
|
-
horizontal: "\u2501"
|
50440
|
-
}, singleDouble = {
|
50441
|
-
topLeft: "\u2553",
|
50442
|
-
topRight: "\u2556",
|
50443
|
-
bottomRight: "\u255C",
|
50444
|
-
bottomLeft: "\u2559",
|
50445
|
-
vertical: "\u2551",
|
50446
|
-
horizontal: "\u2500"
|
50447
|
-
}, doubleSingle = {
|
50448
|
-
topLeft: "\u2552",
|
50449
|
-
topRight: "\u2555",
|
50450
|
-
bottomRight: "\u255B",
|
50451
|
-
bottomLeft: "\u2558",
|
50452
|
-
vertical: "\u2502",
|
50453
|
-
horizontal: "\u2550"
|
50454
|
-
}, classic = {
|
50455
|
-
topLeft: "+",
|
50456
|
-
topRight: "+",
|
50457
|
-
bottomRight: "+",
|
50458
|
-
bottomLeft: "+",
|
50459
|
-
vertical: "|",
|
50460
|
-
horizontal: "-"
|
50461
|
-
}, require$$0$2 = {
|
50462
|
-
single: single$1,
|
50463
|
-
double,
|
50464
|
-
round,
|
50465
|
-
bold,
|
50466
|
-
singleDouble,
|
50467
|
-
doubleSingle,
|
50468
|
-
classic
|
50469
|
-
}, hasRequiredCliBoxes;
|
50470
|
-
function requireCliBoxes() {
|
50471
|
-
if (hasRequiredCliBoxes) return cliBoxes.exports;
|
50472
|
-
hasRequiredCliBoxes = 1;
|
50473
|
-
const cliBoxes$1 = require$$0$2;
|
50474
|
-
return cliBoxes.exports = cliBoxes$1, cliBoxes.exports.default = cliBoxes$1, cliBoxes.exports;
|
50475
|
-
}
|
50476
|
-
var camelcase = { exports: {} }, hasRequiredCamelcase;
|
50477
|
-
function requireCamelcase() {
|
50478
|
-
if (hasRequiredCamelcase) return camelcase.exports;
|
50479
|
-
hasRequiredCamelcase = 1;
|
50480
|
-
const preserveCamelCase = (string) => {
|
50481
|
-
let isLastCharLower = !1, isLastCharUpper = !1, isLastLastCharUpper = !1;
|
50482
|
-
for (let i = 0; i < string.length; i++) {
|
50483
|
-
const character = string[i];
|
50484
|
-
isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character ? (string = string.slice(0, i) + "-" + string.slice(i), isLastCharLower = !1, isLastLastCharUpper = isLastCharUpper, isLastCharUpper = !0, i++) : isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character ? (string = string.slice(0, i - 1) + "-" + string.slice(i - 1), isLastLastCharUpper = isLastCharUpper, isLastCharUpper = !1, isLastCharLower = !0) : (isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character, isLastLastCharUpper = isLastCharUpper, isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character);
|
50485
|
-
}
|
50486
|
-
return string;
|
50487
|
-
}, camelCase = (input2, options2) => {
|
50488
|
-
if (!(typeof input2 == "string" || Array.isArray(input2)))
|
50489
|
-
throw new TypeError("Expected the input to be `string | string[]`");
|
50490
|
-
options2 = Object.assign({
|
50491
|
-
pascalCase: !1
|
50492
|
-
}, options2);
|
50493
|
-
const postProcess = (x) => options2.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x;
|
50494
|
-
return Array.isArray(input2) ? input2 = input2.map((x) => x.trim()).filter((x) => x.length).join("-") : input2 = input2.trim(), input2.length === 0 ? "" : input2.length === 1 ? options2.pascalCase ? input2.toUpperCase() : input2.toLowerCase() : (input2 !== input2.toLowerCase() && (input2 = preserveCamelCase(input2)), input2 = input2.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()).replace(/\d+(\w|$)/g, (m) => m.toUpperCase()), postProcess(input2));
|
50495
|
-
};
|
50496
|
-
return camelcase.exports = camelCase, camelcase.exports.default = camelCase, camelcase.exports;
|
50497
|
-
}
|
50498
|
-
var ansiAlign_1, hasRequiredAnsiAlign;
|
50499
|
-
function requireAnsiAlign() {
|
50500
|
-
if (hasRequiredAnsiAlign) return ansiAlign_1;
|
50501
|
-
hasRequiredAnsiAlign = 1;
|
50502
|
-
const stringWidth2 = requireStringWidth$1();
|
50503
|
-
function ansiAlign(text, opts) {
|
50504
|
-
if (!text) return text;
|
50505
|
-
opts = opts || {};
|
50506
|
-
const align = opts.align || "center";
|
50507
|
-
if (align === "left") return text;
|
50508
|
-
const split = opts.split || `
|
50509
|
-
`, pad = opts.pad || " ", widthDiffFn = align !== "right" ? halfDiff : fullDiff;
|
50510
|
-
let returnString = !1;
|
50511
|
-
Array.isArray(text) || (returnString = !0, text = String(text).split(split));
|
50512
|
-
let width, maxWidth = 0;
|
50513
|
-
return text = text.map(function(str2) {
|
50514
|
-
return str2 = String(str2), width = stringWidth2(str2), maxWidth = Math.max(width, maxWidth), {
|
50515
|
-
str: str2,
|
50516
|
-
width
|
50517
|
-
};
|
50518
|
-
}).map(function(obj) {
|
50519
|
-
return new Array(widthDiffFn(maxWidth, obj.width) + 1).join(pad) + obj.str;
|
50520
|
-
}), returnString ? text.join(split) : text;
|
50521
|
-
}
|
50522
|
-
ansiAlign.left = function(text) {
|
50523
|
-
return ansiAlign(text, { align: "left" });
|
50524
|
-
}, ansiAlign.center = function(text) {
|
50525
|
-
return ansiAlign(text, { align: "center" });
|
50526
|
-
}, ansiAlign.right = function(text) {
|
50527
|
-
return ansiAlign(text, { align: "right" });
|
50528
|
-
}, ansiAlign_1 = ansiAlign;
|
50529
|
-
function halfDiff(maxWidth, curWidth) {
|
50530
|
-
return Math.floor((maxWidth - curWidth) / 2);
|
50531
|
-
}
|
50532
|
-
function fullDiff(maxWidth, curWidth) {
|
50533
|
-
return maxWidth - curWidth;
|
50534
|
-
}
|
50535
|
-
return ansiAlign_1;
|
50536
|
-
}
|
50537
|
-
var termSize, hasRequiredTermSize;
|
50538
|
-
function requireTermSize() {
|
50539
|
-
if (hasRequiredTermSize) return termSize;
|
50540
|
-
hasRequiredTermSize = 1;
|
50541
|
-
const { execFileSync } = require$$0__default$8.default, path2 = require$$0__default.default, exec = (command2, arguments_, shell) => execFileSync(command2, arguments_, { encoding: "utf8", shell }).trim(), create = (columns, rows) => ({
|
50542
|
-
columns: parseInt(columns, 10),
|
50543
|
-
rows: parseInt(rows, 10)
|
50544
|
-
});
|
50545
|
-
return termSize = () => {
|
50546
|
-
const { env, stdout, stderr } = process;
|
50547
|
-
if (stdout && stdout.columns && stdout.rows)
|
50548
|
-
return create(stdout.columns, stdout.rows);
|
50549
|
-
if (stderr && stderr.columns && stderr.rows)
|
50550
|
-
return create(stderr.columns, stderr.rows);
|
50551
|
-
if (env.COLUMNS && env.LINES)
|
50552
|
-
return create(env.COLUMNS, env.LINES);
|
50553
|
-
if (process.platform === "win32")
|
50554
|
-
try {
|
50555
|
-
const size = exec(path2.join(__dirname, "vendor/windows/term-size.exe")).split(/\r?\n/);
|
50556
|
-
if (size.length === 2)
|
50557
|
-
return create(size[0], size[1]);
|
50558
|
-
} catch {
|
50559
|
-
}
|
50560
|
-
else {
|
50561
|
-
if (process.platform === "darwin")
|
50562
|
-
try {
|
50563
|
-
const size = exec(path2.join(__dirname, "vendor/macos/term-size"), [], !0).split(/\r?\n/);
|
50564
|
-
if (size.length === 2)
|
50565
|
-
return create(size[0], size[1]);
|
50566
|
-
} catch {
|
50567
|
-
}
|
50568
|
-
try {
|
50569
|
-
const size = exec("resize", ["-u"]).match(/\d+/g);
|
50570
|
-
if (size.length === 2)
|
50571
|
-
return create(size[0], size[1]);
|
50572
|
-
} catch {
|
50573
|
-
}
|
50574
|
-
if (process.env.TERM)
|
50575
|
-
try {
|
50576
|
-
const columns = exec("tput", ["cols"]), rows = exec("tput", ["lines"]);
|
50577
|
-
if (columns && rows)
|
50578
|
-
return create(columns, rows);
|
50579
|
-
} catch {
|
50580
|
-
}
|
50581
|
-
}
|
50582
|
-
return create(80, 24);
|
50583
|
-
}, termSize;
|
50584
|
-
}
|
50585
|
-
var hasRequiredBoxen;
|
50586
|
-
function requireBoxen() {
|
50587
|
-
if (hasRequiredBoxen) return boxen$1.exports;
|
50588
|
-
hasRequiredBoxen = 1;
|
50589
|
-
const stringWidth2 = requireStringWidth$1(), chalk2 = chalk__default.default, widestLine2 = requireWidestLine(), cliBoxes2 = requireCliBoxes(), camelCase = requireCamelcase(), ansiAlign = requireAnsiAlign(), termSize2 = requireTermSize(), getObject = (detail) => {
|
50590
|
-
let object;
|
50591
|
-
return typeof detail == "number" ? object = {
|
50592
|
-
top: detail,
|
50593
|
-
right: detail * 3,
|
50594
|
-
bottom: detail,
|
50595
|
-
left: detail * 3
|
50596
|
-
} : object = {
|
50597
|
-
top: 0,
|
50598
|
-
right: 0,
|
50599
|
-
bottom: 0,
|
50600
|
-
left: 0,
|
50601
|
-
...detail
|
50602
|
-
}, object;
|
50603
|
-
}, getBorderChars = (borderStyle) => {
|
50604
|
-
const sides = [
|
50605
|
-
"topLeft",
|
50606
|
-
"topRight",
|
50607
|
-
"bottomRight",
|
50608
|
-
"bottomLeft",
|
50609
|
-
"vertical",
|
50610
|
-
"horizontal"
|
50611
|
-
];
|
50612
|
-
let chararacters;
|
50613
|
-
if (typeof borderStyle == "string") {
|
50614
|
-
if (chararacters = cliBoxes2[borderStyle], !chararacters)
|
50615
|
-
throw new TypeError(`Invalid border style: ${borderStyle}`);
|
50616
|
-
} else {
|
50617
|
-
for (const side of sides)
|
50618
|
-
if (!borderStyle[side] || typeof borderStyle[side] != "string")
|
50619
|
-
throw new TypeError(`Invalid border style: ${side}`);
|
50620
|
-
chararacters = borderStyle;
|
50621
|
-
}
|
50622
|
-
return chararacters;
|
50623
|
-
}, isHex = (color) => color.match(/^#[0-f]{3}(?:[0-f]{3})?$/i), isColorValid = (color) => typeof color == "string" && (chalk2[color] || isHex(color)), getColorFn = (color) => isHex(color) ? chalk2.hex(color) : chalk2[color], getBGColorFn = (color) => isHex(color) ? chalk2.bgHex(color) : chalk2[camelCase(["bg", color])];
|
50624
|
-
return boxen$1.exports = (text, options2) => {
|
50625
|
-
if (options2 = {
|
50626
|
-
padding: 0,
|
50627
|
-
borderStyle: "single",
|
50628
|
-
dimBorder: !1,
|
50629
|
-
align: "left",
|
50630
|
-
float: "left",
|
50631
|
-
...options2
|
50632
|
-
}, options2.borderColor && !isColorValid(options2.borderColor))
|
50633
|
-
throw new Error(`${options2.borderColor} is not a valid borderColor`);
|
50634
|
-
if (options2.backgroundColor && !isColorValid(options2.backgroundColor))
|
50635
|
-
throw new Error(`${options2.backgroundColor} is not a valid backgroundColor`);
|
50636
|
-
const chars = getBorderChars(options2.borderStyle), padding = getObject(options2.padding), margin = getObject(options2.margin), colorizeBorder = (border) => {
|
50637
|
-
const newBorder = options2.borderColor ? getColorFn(options2.borderColor)(border) : border;
|
50638
|
-
return options2.dimBorder ? chalk2.dim(newBorder) : newBorder;
|
50639
|
-
}, colorizeContent = (content) => options2.backgroundColor ? getBGColorFn(options2.backgroundColor)(content) : content;
|
50640
|
-
text = ansiAlign(text, { align: options2.align });
|
50641
|
-
const NL = `
|
50642
|
-
`, PAD = " ";
|
50643
|
-
let lines2 = text.split(NL);
|
50644
|
-
padding.top > 0 && (lines2 = new Array(padding.top).fill("").concat(lines2)), padding.bottom > 0 && (lines2 = lines2.concat(new Array(padding.bottom).fill("")));
|
50645
|
-
const contentWidth = widestLine2(text) + padding.left + padding.right, paddingLeft = PAD.repeat(padding.left), { columns } = termSize2();
|
50646
|
-
let marginLeft = PAD.repeat(margin.left);
|
50647
|
-
if (options2.float === "center") {
|
50648
|
-
const padWidth = Math.max((columns - contentWidth) / 2, 0);
|
50649
|
-
marginLeft = PAD.repeat(padWidth);
|
50650
|
-
} else if (options2.float === "right") {
|
50651
|
-
const padWidth = Math.max(columns - contentWidth - margin.right - 2, 0);
|
50652
|
-
marginLeft = PAD.repeat(padWidth);
|
50653
|
-
}
|
50654
|
-
const horizontal = chars.horizontal.repeat(contentWidth), top = colorizeBorder(NL.repeat(margin.top) + marginLeft + chars.topLeft + horizontal + chars.topRight), bottom = colorizeBorder(marginLeft + chars.bottomLeft + horizontal + chars.bottomRight + NL.repeat(margin.bottom)), side = colorizeBorder(chars.vertical), middle = lines2.map((line3) => {
|
50655
|
-
const paddingRight = PAD.repeat(contentWidth - stringWidth2(line3) - padding.left);
|
50656
|
-
return marginLeft + side + colorizeContent(paddingLeft + line3 + paddingRight) + side;
|
50657
|
-
}).join(NL);
|
50658
|
-
return top + NL + middle + NL + bottom;
|
50659
|
-
}, boxen$1.exports._borderStyles = cliBoxes2, boxen$1.exports;
|
50660
|
-
}
|
50661
|
-
var boxenExports = requireBoxen(), boxen = /* @__PURE__ */ loadEnv.getDefaultExportFromCjs(boxenExports);
|
50662
|
-
const rimraf = util__default.default.promisify(rimrafCb), unsupportedMessage = `
|
50663
|
-
\`sanity upgrade\` is not supported as of sanity v3.
|
50664
|
-
Use npm-check-updates or similar (https://www.npmjs.com/package/npm-check-updates)
|
50665
|
-
`.trim(), upgradeDependencies = async function(args, context) {
|
50666
|
-
const { output, workDir, yarn, chalk: chalk2, sanityMajorVersion } = context;
|
50667
|
-
if (sanityMajorVersion >= 3)
|
50668
|
-
throw new Error(unsupportedMessage);
|
50669
|
-
const { extOptions, argsWithoutOptions } = args, modules = argsWithoutOptions.slice(), { range: range2, tag } = extOptions, saveExact = extOptions["save-exact"], targetRange = tag || range2;
|
50670
|
-
if (range2 && tag)
|
50671
|
-
throw new Error("Both --tag and --range specified, can only use one");
|
50672
|
-
if (range2 && !semver__default.default.validRange(range2))
|
50673
|
-
throw new Error(`Invalid semver range "${range2}"`);
|
50674
|
-
const versions = await findSanityModuleVersions(context, {
|
50675
|
-
target: targetRange,
|
50676
|
-
includeCli: !1
|
50677
|
-
}), allNeedsUpdate = versions.filter((mod) => mod.needsUpdate);
|
50678
|
-
loadEnv.debug("In need of update: %s", allNeedsUpdate.map((mod) => mod.name).join(", "));
|
50679
|
-
const needsUpdate = modules.length === 0 ? allNeedsUpdate : allNeedsUpdate.filter((outOfDate) => modules.indexOf(outOfDate.name) !== -1), semverBreakingUpgrades = versions.filter(hasSemverBreakingUpgrade), baseMajorUpgrade = semverBreakingUpgrades.find((mod) => mod.name === "@sanity/base"), majorUpgrades = semverBreakingUpgrades.filter((mod) => mod.name !== "@sanity/base");
|
50680
|
-
if (schedulePrintMajorUpgrades({ baseMajorUpgrade, majorUpgrades }, context), needsUpdate.length === 0) {
|
50681
|
-
const specified = modules.length === 0 ? "All" : "All *specified*";
|
50682
|
-
context.output.print(
|
50683
|
-
`${chalk2.green("\u2714")} ${specified} Sanity modules are at latest compatible versions`
|
50684
|
-
);
|
50685
|
-
return;
|
50686
|
-
}
|
50687
|
-
const pinned = needsUpdate.filter((mod) => mod.isPinned), nonPinned = needsUpdate.filter((mod) => !mod.isPinned), pinnedNames = pinned.map((mod) => mod.name).join(`
|
50688
|
-
- `);
|
50689
|
-
if (nonPinned.length === 0) {
|
50690
|
-
context.output.warn(
|
50691
|
-
`${chalk2.yellow(
|
50692
|
-
"\u26A0"
|
50693
|
-
)} All modules are pinned to specific versions, not upgrading:
|
50694
|
-
- ${pinnedNames}`
|
50695
|
-
);
|
50696
|
-
return;
|
50697
|
-
}
|
50698
|
-
pinned.length > 0 && context.output.warn(
|
50699
|
-
`${chalk2.yellow(
|
50700
|
-
"\u26A0"
|
50701
|
-
)} The follow modules are pinned to specific versions, not upgrading:
|
50702
|
-
- ${pinnedNames}`
|
50703
|
-
), await maybeDeleteReactAce(nonPinned, workDir), await Promise.all(
|
50704
|
-
nonPinned.map(
|
50705
|
-
(mod) => deleteIfNotSymlink(
|
50706
|
-
path__default.default.join(context.workDir, "node_modules", mod.name.replace(/\//g, path__default.default.sep))
|
50707
|
-
)
|
50708
|
-
)
|
50709
|
-
);
|
50710
|
-
const versionPrefix = saveExact ? "" : "^", oldManifest = await readLocalManifest(workDir), newManifest = nonPinned.reduce((target, mod) => (oldManifest.dependencies && oldManifest.dependencies[mod.name] && (target.dependencies[mod.name] = mod.latestInRange === "unknown" ? oldManifest.dependencies[mod.name] : versionPrefix + mod.latestInRange), oldManifest.devDependencies && oldManifest.devDependencies[mod.name] && (target.devDependencies[mod.name] = mod.latestInRange === "unknown" ? oldManifest.devDependencies[mod.name] : versionPrefix + mod.latestInRange), target), oldManifest), manifestPath = path__default.default.join(context.workDir, "package.json");
|
50711
|
-
await writeJson(manifestPath, newManifest);
|
50712
|
-
const flags = extOptions.offline ? ["--offline"] : [], cmd = ["install"].concat(flags);
|
50713
|
-
loadEnv.debug("Running yarn %s", cmd.join(" ")), await yarn(cmd, { ...output, rootDir: workDir }), context.output.print(""), context.output.print(`${chalk2.green("\u2714")} Modules upgraded:`);
|
50714
|
-
const { versionLength, formatName } = getFormatters(nonPinned);
|
50715
|
-
nonPinned.forEach((mod) => {
|
50716
|
-
const current = chalk2.yellow(lodashExports.padStart(mod.installed || "<missing>", versionLength)), latest = chalk2.green(mod.latestInRange);
|
50717
|
-
context.output.print(`${formatName(mod.name)} ${current} \u2192 ${latest}`);
|
50718
|
-
});
|
50719
|
-
};
|
50720
|
-
function writeJson(filePath, data) {
|
50721
|
-
return fs$1.promises.writeFile(filePath, `${JSON.stringify(data, null, 2)}
|
50722
|
-
`);
|
50723
|
-
}
|
50724
|
-
async function deleteIfNotSymlink(modPath) {
|
50725
|
-
const stats = await fs$1.promises.lstat(modPath).catch(lodashExports.noop);
|
50726
|
-
return !stats || stats.isSymbolicLink() ? null : rimraf(modPath);
|
50727
|
-
}
|
50728
|
-
function hasSemverBreakingUpgrade(mod) {
|
50729
|
-
const current = mod.installed || semver__default.default.minVersion(mod.declared)?.toString() || "";
|
50730
|
-
return !semver__default.default.satisfies(mod.latest, `^${current}`) && semver__default.default.gt(mod.latest, current);
|
50731
|
-
}
|
50732
|
-
function getMajorUpgradeText(mods2, chalk2) {
|
50733
|
-
return [
|
50734
|
-
`The following modules has new major versions
|
50735
|
-
`,
|
50736
|
-
`released and will have to be manually upgraded:
|
50737
|
-
|
50738
|
-
`,
|
50739
|
-
` - ${mods2.map((mod) => `${mod.name} (v${semver__default.default.major(mod.latest)})`).join(`
|
50740
|
-
- `)}
|
50741
|
-
|
50742
|
-
`,
|
50743
|
-
chalk2.yellow("\u26A0"),
|
50744
|
-
` Note that major versions can contain backwards
|
50745
|
-
`,
|
50746
|
-
" incompatible changes and should be handled with care."
|
50747
|
-
].join("");
|
50748
|
-
}
|
50749
|
-
function getMajorStudioUpgradeText(mod, chalk2) {
|
50750
|
-
const prev = semver__default.default.major(mod.installed || semver__default.default.minVersion(mod.declared)?.toString() || ""), next = semver__default.default.major(mod.latest);
|
50751
|
-
return [
|
50752
|
-
"There is now a new major version of Sanity Studio!",
|
50753
|
-
"",
|
50754
|
-
"Read more about the new version and how to upgrade:",
|
50755
|
-
chalk2.blueBright(`https://www.sanity.io/changelog/studio?from=v${prev}&to=v${next}`)
|
50756
|
-
].join(`
|
50757
|
-
`);
|
50758
|
-
}
|
50759
|
-
function schedulePrintMajorUpgrades({
|
50760
|
-
baseMajorUpgrade,
|
50761
|
-
majorUpgrades
|
50762
|
-
}, { chalk: chalk2, output }) {
|
50763
|
-
majorUpgrades.length === 0 && !baseMajorUpgrade || process.on("beforeExit", () => {
|
50764
|
-
if (output.print(""), baseMajorUpgrade) {
|
50765
|
-
output.warn(
|
50766
|
-
boxen(getMajorStudioUpgradeText(baseMajorUpgrade, chalk2), {
|
50767
|
-
borderColor: "green",
|
50768
|
-
padding: 1
|
50769
|
-
})
|
50770
|
-
);
|
50771
|
-
return;
|
50772
|
-
}
|
50773
|
-
output.warn(
|
50774
|
-
boxen(getMajorUpgradeText(majorUpgrades, chalk2), {
|
50775
|
-
borderColor: "yellow",
|
50776
|
-
padding: 1
|
50777
|
-
})
|
50778
|
-
);
|
50779
|
-
});
|
50780
|
-
}
|
50781
|
-
async function maybeDeleteReactAce(toUpgrade, workDir) {
|
50782
|
-
const codeInputUpdate = toUpgrade.find((mod) => mod.name === "@sanity/code-input");
|
50783
|
-
if (!codeInputUpdate)
|
50784
|
-
return;
|
50785
|
-
const installed = codeInputUpdate.installed ? codeInputUpdate.installed : "2.4.0", upgradeTo = codeInputUpdate.latestInRange;
|
50786
|
-
if (!(semver__default.default.lte(installed, "2.24.0") && semver__default.default.gte(upgradeTo, "2.24.1")))
|
50787
|
-
return;
|
50788
|
-
const depRootPath = path__default.default.join(workDir, "node_modules"), closestReactAcePath = getModulePath("react-ace", path__default.default.join(depRootPath, "@sanity", "code-input")) || path__default.default.join(depRootPath, "react-ace");
|
50789
|
-
await rimraf(closestReactAcePath);
|
50790
|
-
}
|
50791
|
-
function getModulePath(modName, fromPath) {
|
50792
|
-
const manifestFile = `${modName.replace(/\//g, path__default.default.sep)}/package.json`, manifestPath = resolveFrom.silent(fromPath, manifestFile);
|
50793
|
-
return manifestPath ? path__default.default.dirname(manifestPath) : void 0;
|
50794
|
-
}
|
50795
|
-
async function readLocalManifest(dirName, fileName = "package.json") {
|
50796
|
-
try {
|
50797
|
-
const content = await fs$1.promises.readFile(path__default.default.join(dirName, fileName), "utf8");
|
50798
|
-
return JSON.parse(content);
|
50799
|
-
} catch (err) {
|
50800
|
-
if (err.code === "ENOENT")
|
50801
|
-
return {};
|
50802
|
-
throw new Error(`Error while attempting to read projects "${fileName}":
|
50803
|
-
${err.message}`);
|
50804
|
-
}
|
50805
|
-
}
|
50806
|
-
const helpText = `
|
50807
|
-
Upgrades installed Sanity modules to the latest available version within the
|
50808
|
-
semantic versioning range specified in "package.json".
|
50809
|
-
|
50810
|
-
If a specific module name is provided, only that module will be upgraded.
|
50811
|
-
|
50812
|
-
Options
|
50813
|
-
--range [range] Version range to upgrade to, eg '^2.2.7' or '2.1.x'
|
50814
|
-
--tag [tag] Tagged release to upgrade to, eg 'canary' or 'some-feature'
|
50815
|
-
--save-exact Pin the resolved version numbers in package.json (no ^ prefix)
|
50816
|
-
|
50817
|
-
Examples
|
50818
|
-
# Upgrade modules to the latest semver compatible versions
|
50819
|
-
sanity upgrade
|
50820
|
-
|
50821
|
-
# Update to the latest within the 2.2 range
|
50822
|
-
sanity upgrade --range 2.2.x
|
50823
|
-
|
50824
|
-
# Update to the latest semver compatible versions and pin the versions
|
50825
|
-
sanity upgrade --save-exact
|
50826
|
-
|
50827
|
-
# Update to the latest 'canary' npm tag
|
50828
|
-
sanity upgrade --tag canary
|
50829
|
-
`, upgradeCommand = {
|
50830
|
-
name: "upgrade",
|
50831
|
-
signature: "[--tag DIST_TAG] [--range SEMVER_RANGE] [--save-exact]",
|
50832
|
-
description: "Upgrades all (or some) Sanity modules to their latest versions",
|
50833
|
-
action: upgradeDependencies,
|
50834
|
-
hideFromHelp: !0,
|
50835
|
-
helpText
|
50836
49876
|
}, help = `
|
50837
49877
|
Shows a list of installed Sanity modules and their respective versions, and
|
50838
49878
|
checks the npm registry for the latest available versions.`;
|
@@ -50848,7 +49888,6 @@ const baseCommands = [
|
|
50848
49888
|
loginCommand,
|
50849
49889
|
logoutCommand,
|
50850
49890
|
installCommand,
|
50851
|
-
upgradeCommand,
|
50852
49891
|
versionsCommand,
|
50853
49892
|
docsCommand,
|
50854
49893
|
manageCommand,
|
@@ -52416,7 +51455,7 @@ var dots = {
|
|
52416
51455
|
" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ",
|
52417
51456
|
" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "
|
52418
51457
|
]
|
52419
|
-
}, require$$0$
|
51458
|
+
}, require$$0$2 = {
|
52420
51459
|
dots,
|
52421
51460
|
dots2,
|
52422
51461
|
dots3,
|
@@ -52507,7 +51546,7 @@ var dots = {
|
|
52507
51546
|
function requireCliSpinners() {
|
52508
51547
|
if (hasRequiredCliSpinners) return cliSpinners$1;
|
52509
51548
|
hasRequiredCliSpinners = 1;
|
52510
|
-
const spinners = Object.assign({}, require$$0$
|
51549
|
+
const spinners = Object.assign({}, require$$0$2), spinnersList = Object.keys(spinners);
|
52511
51550
|
return Object.defineProperty(spinners, "random", {
|
52512
51551
|
get() {
|
52513
51552
|
const randomIndex = Math.floor(Math.random() * spinnersList.length), spinnerName = spinnersList[randomIndex];
|
@@ -52522,15 +51561,15 @@ const logSymbols = {
|
|
52522
51561
|
warning: "\u26A0\uFE0F",
|
52523
51562
|
error: "\u274C\uFE0F"
|
52524
51563
|
};
|
52525
|
-
function ansiRegex$
|
51564
|
+
function ansiRegex$3({ onlyFirst = !1 } = {}) {
|
52526
51565
|
const pattern = [
|
52527
51566
|
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
52528
51567
|
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
52529
51568
|
].join("|");
|
52530
51569
|
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
52531
51570
|
}
|
52532
|
-
const regex = ansiRegex$
|
52533
|
-
function stripAnsi$
|
51571
|
+
const regex = ansiRegex$3();
|
51572
|
+
function stripAnsi$3(string) {
|
52534
51573
|
if (typeof string != "string")
|
52535
51574
|
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
52536
51575
|
return string.replace(regex, "");
|
@@ -52551,23 +51590,23 @@ function validate(codePoint) {
|
|
52551
51590
|
function eastAsianWidth(codePoint, { ambiguousAsWide = !1 } = {}) {
|
52552
51591
|
return validate(codePoint), isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint) ? 2 : 1;
|
52553
51592
|
}
|
52554
|
-
var emojiRegex = () => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
51593
|
+
var emojiRegex$1 = () => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
52555
51594
|
const segmenter = new Intl.Segmenter(), defaultIgnorableCodePointRegex = new RegExp("^\\p{Default_Ignorable_Code_Point}$", "u");
|
52556
|
-
function stringWidth$
|
51595
|
+
function stringWidth$2(string, options2 = {}) {
|
52557
51596
|
if (typeof string != "string" || string.length === 0)
|
52558
51597
|
return 0;
|
52559
51598
|
const {
|
52560
51599
|
ambiguousIsNarrow = !0,
|
52561
51600
|
countAnsiEscapeCodes = !1
|
52562
51601
|
} = options2;
|
52563
|
-
if (countAnsiEscapeCodes || (string = stripAnsi$
|
51602
|
+
if (countAnsiEscapeCodes || (string = stripAnsi$3(string)), string.length === 0)
|
52564
51603
|
return 0;
|
52565
51604
|
let width = 0;
|
52566
51605
|
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
52567
51606
|
for (const { segment: character } of segmenter.segment(string)) {
|
52568
51607
|
const codePoint = character.codePointAt(0);
|
52569
51608
|
if (!(codePoint <= 31 || codePoint >= 127 && codePoint <= 159) && !(codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) && !(codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) && !(codePoint >= 55296 && codePoint <= 57343) && !(codePoint >= 65024 && codePoint <= 65039) && !defaultIgnorableCodePointRegex.test(character)) {
|
52570
|
-
if (emojiRegex().test(character)) {
|
51609
|
+
if (emojiRegex$1().test(character)) {
|
52571
51610
|
width += 2;
|
52572
51611
|
continue;
|
52573
51612
|
}
|
@@ -52705,9 +51744,9 @@ class Ora {
|
|
52705
51744
|
#updateLineCount() {
|
52706
51745
|
const columns = this.#stream.columns ?? 80, fullPrefixText = this.#getFullPrefixText(this.#prefixText, "-"), fullSuffixText = this.#getFullSuffixText(this.#suffixText, "-"), fullText = " ".repeat(this.#indent) + fullPrefixText + "--" + this.#text + "--" + fullSuffixText;
|
52707
51746
|
this.#lineCount = 0;
|
52708
|
-
for (const line3 of stripAnsi$
|
51747
|
+
for (const line3 of stripAnsi$3(fullText).split(`
|
52709
51748
|
`))
|
52710
|
-
this.#lineCount += Math.max(1, Math.ceil(stringWidth$
|
51749
|
+
this.#lineCount += Math.max(1, Math.ceil(stringWidth$2(line3, { countAnsiEscapeCodes: !0 }) / columns));
|
52711
51750
|
}
|
52712
51751
|
get isEnabled() {
|
52713
51752
|
return this.#isEnabled && !this.#isSilent;
|
@@ -57210,7 +56249,7 @@ function shareReplayOperator(_a) {
|
|
57210
56249
|
});
|
57211
56250
|
};
|
57212
56251
|
}
|
57213
|
-
function single(predicate) {
|
56252
|
+
function single$1(predicate) {
|
57214
56253
|
return function(source2) {
|
57215
56254
|
return source2.lift(new SingleOperator(predicate, source2));
|
57216
56255
|
};
|
@@ -58128,7 +57167,7 @@ var operators = /* @__PURE__ */ Object.freeze({
|
|
58128
57167
|
sequenceEqual,
|
58129
57168
|
share,
|
58130
57169
|
shareReplay,
|
58131
|
-
single,
|
57170
|
+
single: single$1,
|
58132
57171
|
skip,
|
58133
57172
|
skipLast,
|
58134
57173
|
skipUntil,
|
@@ -58441,7 +57480,7 @@ function requireCliWidth() {
|
|
58441
57480
|
var defaultOpts = {
|
58442
57481
|
defaultWidth: 0,
|
58443
57482
|
output: process.stdout,
|
58444
|
-
tty: require$$0__default$
|
57483
|
+
tty: require$$0__default$b.default
|
58445
57484
|
};
|
58446
57485
|
return options2 ? (Object.keys(defaultOpts).forEach(function(key2) {
|
58447
57486
|
options2[key2] || (options2[key2] = defaultOpts[key2]);
|
@@ -58464,9 +57503,9 @@ function requireCliWidth() {
|
|
58464
57503
|
}
|
58465
57504
|
}(cliWidth)), cliWidth.exports;
|
58466
57505
|
}
|
58467
|
-
var stripAnsi$
|
58468
|
-
function requireAnsiRegex$
|
58469
|
-
return hasRequiredAnsiRegex$
|
57506
|
+
var stripAnsi$2 = { exports: {} }, ansiRegex$2, hasRequiredAnsiRegex$2;
|
57507
|
+
function requireAnsiRegex$2() {
|
57508
|
+
return hasRequiredAnsiRegex$2 || (hasRequiredAnsiRegex$2 = 1, ansiRegex$2 = (options2) => {
|
58470
57509
|
options2 = Object.assign({
|
58471
57510
|
onlyFirst: !1
|
58472
57511
|
}, options2);
|
@@ -58475,35 +57514,35 @@ function requireAnsiRegex$1() {
|
|
58475
57514
|
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
58476
57515
|
].join("|");
|
58477
57516
|
return new RegExp(pattern, options2.onlyFirst ? void 0 : "g");
|
58478
|
-
}), ansiRegex$
|
57517
|
+
}), ansiRegex$2;
|
58479
57518
|
}
|
58480
|
-
var hasRequiredStripAnsi$
|
58481
|
-
function requireStripAnsi$
|
58482
|
-
if (hasRequiredStripAnsi$
|
58483
|
-
hasRequiredStripAnsi$
|
58484
|
-
const ansiRegex2 = requireAnsiRegex$
|
58485
|
-
return stripAnsi$
|
57519
|
+
var hasRequiredStripAnsi$2;
|
57520
|
+
function requireStripAnsi$2() {
|
57521
|
+
if (hasRequiredStripAnsi$2) return stripAnsi$2.exports;
|
57522
|
+
hasRequiredStripAnsi$2 = 1;
|
57523
|
+
const ansiRegex2 = requireAnsiRegex$2(), stripAnsi2 = (string) => typeof string == "string" ? string.replace(ansiRegex2(), "") : string;
|
57524
|
+
return stripAnsi$2.exports = stripAnsi2, stripAnsi$2.exports.default = stripAnsi2, stripAnsi$2.exports;
|
58486
57525
|
}
|
58487
|
-
var ansiRegex, hasRequiredAnsiRegex;
|
58488
|
-
function requireAnsiRegex() {
|
58489
|
-
return hasRequiredAnsiRegex || (hasRequiredAnsiRegex = 1, ansiRegex = () => {
|
57526
|
+
var ansiRegex$1, hasRequiredAnsiRegex$1;
|
57527
|
+
function requireAnsiRegex$1() {
|
57528
|
+
return hasRequiredAnsiRegex$1 || (hasRequiredAnsiRegex$1 = 1, ansiRegex$1 = () => {
|
58490
57529
|
const pattern = [
|
58491
57530
|
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[a-zA-Z\\d]*)*)?\\u0007)",
|
58492
57531
|
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"
|
58493
57532
|
].join("|");
|
58494
57533
|
return new RegExp(pattern, "g");
|
58495
|
-
}), ansiRegex;
|
57534
|
+
}), ansiRegex$1;
|
58496
57535
|
}
|
58497
|
-
var stripAnsi, hasRequiredStripAnsi;
|
58498
|
-
function requireStripAnsi() {
|
58499
|
-
if (hasRequiredStripAnsi) return stripAnsi;
|
58500
|
-
hasRequiredStripAnsi = 1;
|
58501
|
-
const ansiRegex2 = requireAnsiRegex();
|
58502
|
-
return stripAnsi = (input2) => typeof input2 == "string" ? input2.replace(ansiRegex2(), "") : input2, stripAnsi;
|
57536
|
+
var stripAnsi$1, hasRequiredStripAnsi$1;
|
57537
|
+
function requireStripAnsi$1() {
|
57538
|
+
if (hasRequiredStripAnsi$1) return stripAnsi$1;
|
57539
|
+
hasRequiredStripAnsi$1 = 1;
|
57540
|
+
const ansiRegex2 = requireAnsiRegex$1();
|
57541
|
+
return stripAnsi$1 = (input2) => typeof input2 == "string" ? input2.replace(ansiRegex2(), "") : input2, stripAnsi$1;
|
58503
57542
|
}
|
58504
|
-
var isFullwidthCodePoint, hasRequiredIsFullwidthCodePoint;
|
58505
|
-
function requireIsFullwidthCodePoint() {
|
58506
|
-
return hasRequiredIsFullwidthCodePoint || (hasRequiredIsFullwidthCodePoint = 1, isFullwidthCodePoint = (x) => Number.isNaN(x) ? !1 : x >= 4352 && (x <= 4447 || // Hangul Jamo
|
57543
|
+
var isFullwidthCodePoint$1, hasRequiredIsFullwidthCodePoint$1;
|
57544
|
+
function requireIsFullwidthCodePoint$1() {
|
57545
|
+
return hasRequiredIsFullwidthCodePoint$1 || (hasRequiredIsFullwidthCodePoint$1 = 1, isFullwidthCodePoint$1 = (x) => Number.isNaN(x) ? !1 : x >= 4352 && (x <= 4447 || // Hangul Jamo
|
58507
57546
|
x === 9001 || // LEFT-POINTING ANGLE BRACKET
|
58508
57547
|
x === 9002 || // RIGHT-POINTING ANGLE BRACKET
|
58509
57548
|
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
@@ -58518,14 +57557,14 @@ function requireIsFullwidthCodePoint() {
|
|
58518
57557
|
65281 <= x && x <= 65376 || 65504 <= x && x <= 65510 || // Kana Supplement
|
58519
57558
|
110592 <= x && x <= 110593 || // Enclosed Ideographic Supplement
|
58520
57559
|
127488 <= x && x <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
58521
|
-
131072 <= x && x <= 262141)), isFullwidthCodePoint;
|
57560
|
+
131072 <= x && x <= 262141)), isFullwidthCodePoint$1;
|
58522
57561
|
}
|
58523
|
-
var stringWidth, hasRequiredStringWidth;
|
58524
|
-
function requireStringWidth() {
|
58525
|
-
if (hasRequiredStringWidth) return stringWidth;
|
58526
|
-
hasRequiredStringWidth = 1;
|
58527
|
-
const stripAnsi2 = requireStripAnsi(), isFullwidthCodePoint2 = requireIsFullwidthCodePoint();
|
58528
|
-
return stringWidth = (str2) => {
|
57562
|
+
var stringWidth$1, hasRequiredStringWidth$1;
|
57563
|
+
function requireStringWidth$1() {
|
57564
|
+
if (hasRequiredStringWidth$1) return stringWidth$1;
|
57565
|
+
hasRequiredStringWidth$1 = 1;
|
57566
|
+
const stripAnsi2 = requireStripAnsi$1(), isFullwidthCodePoint2 = requireIsFullwidthCodePoint$1();
|
57567
|
+
return stringWidth$1 = (str2) => {
|
58529
57568
|
if (typeof str2 != "string" || str2.length === 0)
|
58530
57569
|
return 0;
|
58531
57570
|
str2 = stripAnsi2(str2);
|
@@ -58535,13 +57574,13 @@ function requireStringWidth() {
|
|
58535
57574
|
code <= 31 || code >= 127 && code <= 159 || code >= 768 && code <= 879 || (code > 65535 && i++, width += isFullwidthCodePoint2(code) ? 2 : 1);
|
58536
57575
|
}
|
58537
57576
|
return width;
|
58538
|
-
}, stringWidth;
|
57577
|
+
}, stringWidth$1;
|
58539
57578
|
}
|
58540
57579
|
var screenManager, hasRequiredScreenManager;
|
58541
57580
|
function requireScreenManager() {
|
58542
57581
|
if (hasRequiredScreenManager) return screenManager;
|
58543
57582
|
hasRequiredScreenManager = 1;
|
58544
|
-
var _ = requireLodash(), util2 = requireReadline(), cliWidth2 = requireCliWidth(), stripAnsi2 = requireStripAnsi$
|
57583
|
+
var _ = requireLodash(), util2 = requireReadline(), cliWidth2 = requireCliWidth(), stripAnsi2 = requireStripAnsi$2(), stringWidth2 = requireStringWidth$1();
|
58545
57584
|
function height(content) {
|
58546
57585
|
return content.split(`
|
58547
57586
|
`).length;
|
@@ -64481,7 +63520,7 @@ var lib = { exports: {} }, safer_1, hasRequiredSafer;
|
|
64481
63520
|
function requireSafer() {
|
64482
63521
|
if (hasRequiredSafer) return safer_1;
|
64483
63522
|
hasRequiredSafer = 1;
|
64484
|
-
var buffer2 = require$$0__default$
|
63523
|
+
var buffer2 = require$$0__default$9.default, Buffer2 = buffer2.Buffer, safer = {}, key2;
|
64485
63524
|
for (key2 in buffer2)
|
64486
63525
|
buffer2.hasOwnProperty(key2) && (key2 === "SlowBuffer" || key2 === "Buffer" || (safer[key2] = buffer2[key2]));
|
64487
63526
|
var Safer = safer.Buffer = {};
|
@@ -65632,7 +64671,7 @@ function requireDbcsCodec() {
|
|
65632
64671
|
}
|
65633
64672
|
return dbcsCodec;
|
65634
64673
|
}
|
65635
|
-
var require$$0 = [
|
64674
|
+
var require$$0$1 = [
|
65636
64675
|
[
|
65637
64676
|
"0",
|
65638
64677
|
"\0",
|
@@ -73932,7 +72971,7 @@ function requireDbcsData() {
|
|
73932
72971
|
shiftjis: {
|
73933
72972
|
type: "_dbcs",
|
73934
72973
|
table: function() {
|
73935
|
-
return require$$0;
|
72974
|
+
return require$$0$1;
|
73936
72975
|
},
|
73937
72976
|
encodeAdd: { "\xA5": 92, "\u203E": 126 },
|
73938
72977
|
encodeSkipVals: [{ from: 60736, to: 63808 }]
|
@@ -74090,7 +73129,7 @@ var streams, hasRequiredStreams;
|
|
74090
73129
|
function requireStreams() {
|
74091
73130
|
if (hasRequiredStreams) return streams;
|
74092
73131
|
hasRequiredStreams = 1;
|
74093
|
-
var Buffer2 = require$$0__default$
|
73132
|
+
var Buffer2 = require$$0__default$9.default.Buffer, Transform = require$$0__default$4.default.Transform;
|
74094
73133
|
streams = function(iconv) {
|
74095
73134
|
iconv.encodeStream = function(encoding, options2) {
|
74096
73135
|
return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options2), options2);
|
@@ -74161,7 +73200,7 @@ var extendNode, hasRequiredExtendNode;
|
|
74161
73200
|
function requireExtendNode() {
|
74162
73201
|
if (hasRequiredExtendNode) return extendNode;
|
74163
73202
|
hasRequiredExtendNode = 1;
|
74164
|
-
var Buffer2 = require$$0__default$
|
73203
|
+
var Buffer2 = require$$0__default$9.default.Buffer;
|
74165
73204
|
return extendNode = function(iconv) {
|
74166
73205
|
var original = void 0;
|
74167
73206
|
iconv.supportsNodeEncodingsExtension = !(Buffer2.from || new Buffer2(0) instanceof Uint8Array), iconv.extendNodeEncodings = function() {
|
@@ -74185,7 +73224,7 @@ function requireExtendNode() {
|
|
74185
73224
|
Buffer2.isNativeEncoding = function(enc) {
|
74186
73225
|
return enc && nodeNativeEncodings[enc.toLowerCase()];
|
74187
73226
|
};
|
74188
|
-
var SlowBuffer = require$$0__default$
|
73227
|
+
var SlowBuffer = require$$0__default$9.default.SlowBuffer;
|
74189
73228
|
if (original.SlowBufferToString = SlowBuffer.prototype.toString, SlowBuffer.prototype.toString = function(encoding, start, end) {
|
74190
73229
|
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));
|
74191
73230
|
}, original.SlowBufferWrite = SlowBuffer.prototype.write, SlowBuffer.prototype.write = function(string, offset, length, encoding) {
|
@@ -74237,7 +73276,7 @@ function requireExtendNode() {
|
|
74237
73276
|
if (!original)
|
74238
73277
|
throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.");
|
74239
73278
|
delete Buffer2.isNativeEncoding;
|
74240
|
-
var SlowBuffer = require$$0__default$
|
73279
|
+
var SlowBuffer = require$$0__default$9.default.SlowBuffer;
|
74241
73280
|
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) {
|
74242
73281
|
var Readable = require$$0__default$4.default.Readable;
|
74243
73282
|
Readable.prototype.setEncoding = original.ReadableSetEncoding, delete Readable.prototype.collect;
|
@@ -74658,7 +73697,7 @@ var hasRequiredMain;
|
|
74658
73697
|
function requireMain() {
|
74659
73698
|
if (hasRequiredMain) return main;
|
74660
73699
|
hasRequiredMain = 1, Object.defineProperty(main, "__esModule", { value: !0 });
|
74661
|
-
var chardet_1 = requireChardet(), child_process_1 = require$$
|
73700
|
+
var chardet_1 = requireChardet(), child_process_1 = require$$1__default$2.default, fs_1 = require$$0__default$1.default, iconv_lite_1 = requireLib(), tmp_1 = requireTmp(), CreateFileError_1 = requireCreateFileError();
|
74662
73701
|
main.CreateFileError = CreateFileError_1.CreateFileError;
|
74663
73702
|
var LaunchEditorError_1 = requireLaunchEditorError();
|
74664
73703
|
main.LaunchEditorError = LaunchEditorError_1.LaunchEditorError;
|
@@ -74887,7 +73926,6 @@ class CommandRunner {
|
|
74887
73926
|
cliPackageManager,
|
74888
73927
|
...commandOptions,
|
74889
73928
|
commandRunner: this,
|
74890
|
-
yarn: getYarnStub({ output, workDir: commandOptions.workDir }),
|
74891
73929
|
...getVersionedContextParams(cliConfig)
|
74892
73930
|
};
|
74893
73931
|
if (isCommandGroup(command2))
|
@@ -75058,6 +74096,331 @@ function parseArguments(argv = process.argv) {
|
|
75058
74096
|
}
|
75059
74097
|
};
|
75060
74098
|
}
|
74099
|
+
var boxen$1 = { exports: {} }, stringWidth = { exports: {} }, ansiRegex, hasRequiredAnsiRegex;
|
74100
|
+
function requireAnsiRegex() {
|
74101
|
+
return hasRequiredAnsiRegex || (hasRequiredAnsiRegex = 1, ansiRegex = ({ onlyFirst = !1 } = {}) => {
|
74102
|
+
const pattern = [
|
74103
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
74104
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
74105
|
+
].join("|");
|
74106
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
74107
|
+
}), ansiRegex;
|
74108
|
+
}
|
74109
|
+
var stripAnsi, hasRequiredStripAnsi;
|
74110
|
+
function requireStripAnsi() {
|
74111
|
+
if (hasRequiredStripAnsi) return stripAnsi;
|
74112
|
+
hasRequiredStripAnsi = 1;
|
74113
|
+
const ansiRegex2 = requireAnsiRegex();
|
74114
|
+
return stripAnsi = (string) => typeof string == "string" ? string.replace(ansiRegex2(), "") : string, stripAnsi;
|
74115
|
+
}
|
74116
|
+
var isFullwidthCodePoint = { exports: {} }, hasRequiredIsFullwidthCodePoint;
|
74117
|
+
function requireIsFullwidthCodePoint() {
|
74118
|
+
if (hasRequiredIsFullwidthCodePoint) return isFullwidthCodePoint.exports;
|
74119
|
+
hasRequiredIsFullwidthCodePoint = 1;
|
74120
|
+
const isFullwidthCodePoint$12 = (codePoint) => Number.isNaN(codePoint) ? !1 : codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
|
74121
|
+
codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
|
74122
|
+
codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
|
74123
|
+
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
74124
|
+
11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
74125
|
+
12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
|
74126
|
+
19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
|
74127
|
+
43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
|
74128
|
+
44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
|
74129
|
+
63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
|
74130
|
+
65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
|
74131
|
+
65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
|
74132
|
+
65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
|
74133
|
+
110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
|
74134
|
+
127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
74135
|
+
131072 <= codePoint && codePoint <= 262141);
|
74136
|
+
return isFullwidthCodePoint.exports = isFullwidthCodePoint$12, isFullwidthCodePoint.exports.default = isFullwidthCodePoint$12, isFullwidthCodePoint.exports;
|
74137
|
+
}
|
74138
|
+
var emojiRegex, hasRequiredEmojiRegex;
|
74139
|
+
function requireEmojiRegex() {
|
74140
|
+
return hasRequiredEmojiRegex || (hasRequiredEmojiRegex = 1, emojiRegex = function() {
|
74141
|
+
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
74142
|
+
}), emojiRegex;
|
74143
|
+
}
|
74144
|
+
var hasRequiredStringWidth;
|
74145
|
+
function requireStringWidth() {
|
74146
|
+
if (hasRequiredStringWidth) return stringWidth.exports;
|
74147
|
+
hasRequiredStringWidth = 1;
|
74148
|
+
const stripAnsi2 = requireStripAnsi(), isFullwidthCodePoint2 = requireIsFullwidthCodePoint(), emojiRegex2 = requireEmojiRegex(), stringWidth$12 = (string) => {
|
74149
|
+
if (typeof string != "string" || string.length === 0 || (string = stripAnsi2(string), string.length === 0))
|
74150
|
+
return 0;
|
74151
|
+
string = string.replace(emojiRegex2(), " ");
|
74152
|
+
let width = 0;
|
74153
|
+
for (let i = 0; i < string.length; i++) {
|
74154
|
+
const code = string.codePointAt(i);
|
74155
|
+
code <= 31 || code >= 127 && code <= 159 || code >= 768 && code <= 879 || (code > 65535 && i++, width += isFullwidthCodePoint2(code) ? 2 : 1);
|
74156
|
+
}
|
74157
|
+
return width;
|
74158
|
+
};
|
74159
|
+
return stringWidth.exports = stringWidth$12, stringWidth.exports.default = stringWidth$12, stringWidth.exports;
|
74160
|
+
}
|
74161
|
+
var widestLine = { exports: {} }, hasRequiredWidestLine;
|
74162
|
+
function requireWidestLine() {
|
74163
|
+
if (hasRequiredWidestLine) return widestLine.exports;
|
74164
|
+
hasRequiredWidestLine = 1;
|
74165
|
+
const stringWidth2 = requireStringWidth(), widestLine$1 = (input2) => {
|
74166
|
+
let max2 = 0;
|
74167
|
+
for (const line3 of input2.split(`
|
74168
|
+
`))
|
74169
|
+
max2 = Math.max(max2, stringWidth2(line3));
|
74170
|
+
return max2;
|
74171
|
+
};
|
74172
|
+
return widestLine.exports = widestLine$1, widestLine.exports.default = widestLine$1, widestLine.exports;
|
74173
|
+
}
|
74174
|
+
var cliBoxes = { exports: {} }, single = {
|
74175
|
+
topLeft: "\u250C",
|
74176
|
+
topRight: "\u2510",
|
74177
|
+
bottomRight: "\u2518",
|
74178
|
+
bottomLeft: "\u2514",
|
74179
|
+
vertical: "\u2502",
|
74180
|
+
horizontal: "\u2500"
|
74181
|
+
}, double = {
|
74182
|
+
topLeft: "\u2554",
|
74183
|
+
topRight: "\u2557",
|
74184
|
+
bottomRight: "\u255D",
|
74185
|
+
bottomLeft: "\u255A",
|
74186
|
+
vertical: "\u2551",
|
74187
|
+
horizontal: "\u2550"
|
74188
|
+
}, round = {
|
74189
|
+
topLeft: "\u256D",
|
74190
|
+
topRight: "\u256E",
|
74191
|
+
bottomRight: "\u256F",
|
74192
|
+
bottomLeft: "\u2570",
|
74193
|
+
vertical: "\u2502",
|
74194
|
+
horizontal: "\u2500"
|
74195
|
+
}, bold = {
|
74196
|
+
topLeft: "\u250F",
|
74197
|
+
topRight: "\u2513",
|
74198
|
+
bottomRight: "\u251B",
|
74199
|
+
bottomLeft: "\u2517",
|
74200
|
+
vertical: "\u2503",
|
74201
|
+
horizontal: "\u2501"
|
74202
|
+
}, singleDouble = {
|
74203
|
+
topLeft: "\u2553",
|
74204
|
+
topRight: "\u2556",
|
74205
|
+
bottomRight: "\u255C",
|
74206
|
+
bottomLeft: "\u2559",
|
74207
|
+
vertical: "\u2551",
|
74208
|
+
horizontal: "\u2500"
|
74209
|
+
}, doubleSingle = {
|
74210
|
+
topLeft: "\u2552",
|
74211
|
+
topRight: "\u2555",
|
74212
|
+
bottomRight: "\u255B",
|
74213
|
+
bottomLeft: "\u2558",
|
74214
|
+
vertical: "\u2502",
|
74215
|
+
horizontal: "\u2550"
|
74216
|
+
}, classic = {
|
74217
|
+
topLeft: "+",
|
74218
|
+
topRight: "+",
|
74219
|
+
bottomRight: "+",
|
74220
|
+
bottomLeft: "+",
|
74221
|
+
vertical: "|",
|
74222
|
+
horizontal: "-"
|
74223
|
+
}, require$$0 = {
|
74224
|
+
single,
|
74225
|
+
double,
|
74226
|
+
round,
|
74227
|
+
bold,
|
74228
|
+
singleDouble,
|
74229
|
+
doubleSingle,
|
74230
|
+
classic
|
74231
|
+
}, hasRequiredCliBoxes;
|
74232
|
+
function requireCliBoxes() {
|
74233
|
+
if (hasRequiredCliBoxes) return cliBoxes.exports;
|
74234
|
+
hasRequiredCliBoxes = 1;
|
74235
|
+
const cliBoxes$1 = require$$0;
|
74236
|
+
return cliBoxes.exports = cliBoxes$1, cliBoxes.exports.default = cliBoxes$1, cliBoxes.exports;
|
74237
|
+
}
|
74238
|
+
var camelcase = { exports: {} }, hasRequiredCamelcase;
|
74239
|
+
function requireCamelcase() {
|
74240
|
+
if (hasRequiredCamelcase) return camelcase.exports;
|
74241
|
+
hasRequiredCamelcase = 1;
|
74242
|
+
const preserveCamelCase = (string) => {
|
74243
|
+
let isLastCharLower = !1, isLastCharUpper = !1, isLastLastCharUpper = !1;
|
74244
|
+
for (let i = 0; i < string.length; i++) {
|
74245
|
+
const character = string[i];
|
74246
|
+
isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character ? (string = string.slice(0, i) + "-" + string.slice(i), isLastCharLower = !1, isLastLastCharUpper = isLastCharUpper, isLastCharUpper = !0, i++) : isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character ? (string = string.slice(0, i - 1) + "-" + string.slice(i - 1), isLastLastCharUpper = isLastCharUpper, isLastCharUpper = !1, isLastCharLower = !0) : (isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character, isLastLastCharUpper = isLastCharUpper, isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character);
|
74247
|
+
}
|
74248
|
+
return string;
|
74249
|
+
}, camelCase = (input2, options2) => {
|
74250
|
+
if (!(typeof input2 == "string" || Array.isArray(input2)))
|
74251
|
+
throw new TypeError("Expected the input to be `string | string[]`");
|
74252
|
+
options2 = Object.assign({
|
74253
|
+
pascalCase: !1
|
74254
|
+
}, options2);
|
74255
|
+
const postProcess = (x) => options2.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x;
|
74256
|
+
return Array.isArray(input2) ? input2 = input2.map((x) => x.trim()).filter((x) => x.length).join("-") : input2 = input2.trim(), input2.length === 0 ? "" : input2.length === 1 ? options2.pascalCase ? input2.toUpperCase() : input2.toLowerCase() : (input2 !== input2.toLowerCase() && (input2 = preserveCamelCase(input2)), input2 = input2.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()).replace(/\d+(\w|$)/g, (m) => m.toUpperCase()), postProcess(input2));
|
74257
|
+
};
|
74258
|
+
return camelcase.exports = camelCase, camelcase.exports.default = camelCase, camelcase.exports;
|
74259
|
+
}
|
74260
|
+
var ansiAlign_1, hasRequiredAnsiAlign;
|
74261
|
+
function requireAnsiAlign() {
|
74262
|
+
if (hasRequiredAnsiAlign) return ansiAlign_1;
|
74263
|
+
hasRequiredAnsiAlign = 1;
|
74264
|
+
const stringWidth2 = requireStringWidth();
|
74265
|
+
function ansiAlign(text, opts) {
|
74266
|
+
if (!text) return text;
|
74267
|
+
opts = opts || {};
|
74268
|
+
const align = opts.align || "center";
|
74269
|
+
if (align === "left") return text;
|
74270
|
+
const split = opts.split || `
|
74271
|
+
`, pad = opts.pad || " ", widthDiffFn = align !== "right" ? halfDiff : fullDiff;
|
74272
|
+
let returnString = !1;
|
74273
|
+
Array.isArray(text) || (returnString = !0, text = String(text).split(split));
|
74274
|
+
let width, maxWidth = 0;
|
74275
|
+
return text = text.map(function(str2) {
|
74276
|
+
return str2 = String(str2), width = stringWidth2(str2), maxWidth = Math.max(width, maxWidth), {
|
74277
|
+
str: str2,
|
74278
|
+
width
|
74279
|
+
};
|
74280
|
+
}).map(function(obj) {
|
74281
|
+
return new Array(widthDiffFn(maxWidth, obj.width) + 1).join(pad) + obj.str;
|
74282
|
+
}), returnString ? text.join(split) : text;
|
74283
|
+
}
|
74284
|
+
ansiAlign.left = function(text) {
|
74285
|
+
return ansiAlign(text, { align: "left" });
|
74286
|
+
}, ansiAlign.center = function(text) {
|
74287
|
+
return ansiAlign(text, { align: "center" });
|
74288
|
+
}, ansiAlign.right = function(text) {
|
74289
|
+
return ansiAlign(text, { align: "right" });
|
74290
|
+
}, ansiAlign_1 = ansiAlign;
|
74291
|
+
function halfDiff(maxWidth, curWidth) {
|
74292
|
+
return Math.floor((maxWidth - curWidth) / 2);
|
74293
|
+
}
|
74294
|
+
function fullDiff(maxWidth, curWidth) {
|
74295
|
+
return maxWidth - curWidth;
|
74296
|
+
}
|
74297
|
+
return ansiAlign_1;
|
74298
|
+
}
|
74299
|
+
var termSize, hasRequiredTermSize;
|
74300
|
+
function requireTermSize() {
|
74301
|
+
if (hasRequiredTermSize) return termSize;
|
74302
|
+
hasRequiredTermSize = 1;
|
74303
|
+
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) => ({
|
74304
|
+
columns: parseInt(columns, 10),
|
74305
|
+
rows: parseInt(rows, 10)
|
74306
|
+
});
|
74307
|
+
return termSize = () => {
|
74308
|
+
const { env, stdout, stderr } = process;
|
74309
|
+
if (stdout && stdout.columns && stdout.rows)
|
74310
|
+
return create(stdout.columns, stdout.rows);
|
74311
|
+
if (stderr && stderr.columns && stderr.rows)
|
74312
|
+
return create(stderr.columns, stderr.rows);
|
74313
|
+
if (env.COLUMNS && env.LINES)
|
74314
|
+
return create(env.COLUMNS, env.LINES);
|
74315
|
+
if (process.platform === "win32")
|
74316
|
+
try {
|
74317
|
+
const size = exec(path2.join(__dirname, "vendor/windows/term-size.exe")).split(/\r?\n/);
|
74318
|
+
if (size.length === 2)
|
74319
|
+
return create(size[0], size[1]);
|
74320
|
+
} catch {
|
74321
|
+
}
|
74322
|
+
else {
|
74323
|
+
if (process.platform === "darwin")
|
74324
|
+
try {
|
74325
|
+
const size = exec(path2.join(__dirname, "vendor/macos/term-size"), [], !0).split(/\r?\n/);
|
74326
|
+
if (size.length === 2)
|
74327
|
+
return create(size[0], size[1]);
|
74328
|
+
} catch {
|
74329
|
+
}
|
74330
|
+
try {
|
74331
|
+
const size = exec("resize", ["-u"]).match(/\d+/g);
|
74332
|
+
if (size.length === 2)
|
74333
|
+
return create(size[0], size[1]);
|
74334
|
+
} catch {
|
74335
|
+
}
|
74336
|
+
if (process.env.TERM)
|
74337
|
+
try {
|
74338
|
+
const columns = exec("tput", ["cols"]), rows = exec("tput", ["lines"]);
|
74339
|
+
if (columns && rows)
|
74340
|
+
return create(columns, rows);
|
74341
|
+
} catch {
|
74342
|
+
}
|
74343
|
+
}
|
74344
|
+
return create(80, 24);
|
74345
|
+
}, termSize;
|
74346
|
+
}
|
74347
|
+
var hasRequiredBoxen;
|
74348
|
+
function requireBoxen() {
|
74349
|
+
if (hasRequiredBoxen) return boxen$1.exports;
|
74350
|
+
hasRequiredBoxen = 1;
|
74351
|
+
const stringWidth2 = requireStringWidth(), chalk2 = chalk__default.default, widestLine2 = requireWidestLine(), cliBoxes2 = requireCliBoxes(), camelCase = requireCamelcase(), ansiAlign = requireAnsiAlign(), termSize2 = requireTermSize(), getObject = (detail) => {
|
74352
|
+
let object;
|
74353
|
+
return typeof detail == "number" ? object = {
|
74354
|
+
top: detail,
|
74355
|
+
right: detail * 3,
|
74356
|
+
bottom: detail,
|
74357
|
+
left: detail * 3
|
74358
|
+
} : object = {
|
74359
|
+
top: 0,
|
74360
|
+
right: 0,
|
74361
|
+
bottom: 0,
|
74362
|
+
left: 0,
|
74363
|
+
...detail
|
74364
|
+
}, object;
|
74365
|
+
}, getBorderChars = (borderStyle) => {
|
74366
|
+
const sides = [
|
74367
|
+
"topLeft",
|
74368
|
+
"topRight",
|
74369
|
+
"bottomRight",
|
74370
|
+
"bottomLeft",
|
74371
|
+
"vertical",
|
74372
|
+
"horizontal"
|
74373
|
+
];
|
74374
|
+
let chararacters;
|
74375
|
+
if (typeof borderStyle == "string") {
|
74376
|
+
if (chararacters = cliBoxes2[borderStyle], !chararacters)
|
74377
|
+
throw new TypeError(`Invalid border style: ${borderStyle}`);
|
74378
|
+
} else {
|
74379
|
+
for (const side of sides)
|
74380
|
+
if (!borderStyle[side] || typeof borderStyle[side] != "string")
|
74381
|
+
throw new TypeError(`Invalid border style: ${side}`);
|
74382
|
+
chararacters = borderStyle;
|
74383
|
+
}
|
74384
|
+
return chararacters;
|
74385
|
+
}, isHex = (color) => color.match(/^#[0-f]{3}(?:[0-f]{3})?$/i), isColorValid = (color) => typeof color == "string" && (chalk2[color] || isHex(color)), getColorFn = (color) => isHex(color) ? chalk2.hex(color) : chalk2[color], getBGColorFn = (color) => isHex(color) ? chalk2.bgHex(color) : chalk2[camelCase(["bg", color])];
|
74386
|
+
return boxen$1.exports = (text, options2) => {
|
74387
|
+
if (options2 = {
|
74388
|
+
padding: 0,
|
74389
|
+
borderStyle: "single",
|
74390
|
+
dimBorder: !1,
|
74391
|
+
align: "left",
|
74392
|
+
float: "left",
|
74393
|
+
...options2
|
74394
|
+
}, options2.borderColor && !isColorValid(options2.borderColor))
|
74395
|
+
throw new Error(`${options2.borderColor} is not a valid borderColor`);
|
74396
|
+
if (options2.backgroundColor && !isColorValid(options2.backgroundColor))
|
74397
|
+
throw new Error(`${options2.backgroundColor} is not a valid backgroundColor`);
|
74398
|
+
const chars = getBorderChars(options2.borderStyle), padding = getObject(options2.padding), margin = getObject(options2.margin), colorizeBorder = (border) => {
|
74399
|
+
const newBorder = options2.borderColor ? getColorFn(options2.borderColor)(border) : border;
|
74400
|
+
return options2.dimBorder ? chalk2.dim(newBorder) : newBorder;
|
74401
|
+
}, colorizeContent = (content) => options2.backgroundColor ? getBGColorFn(options2.backgroundColor)(content) : content;
|
74402
|
+
text = ansiAlign(text, { align: options2.align });
|
74403
|
+
const NL = `
|
74404
|
+
`, PAD = " ";
|
74405
|
+
let lines2 = text.split(NL);
|
74406
|
+
padding.top > 0 && (lines2 = new Array(padding.top).fill("").concat(lines2)), padding.bottom > 0 && (lines2 = lines2.concat(new Array(padding.bottom).fill("")));
|
74407
|
+
const contentWidth = widestLine2(text) + padding.left + padding.right, paddingLeft = PAD.repeat(padding.left), { columns } = termSize2();
|
74408
|
+
let marginLeft = PAD.repeat(margin.left);
|
74409
|
+
if (options2.float === "center") {
|
74410
|
+
const padWidth = Math.max((columns - contentWidth) / 2, 0);
|
74411
|
+
marginLeft = PAD.repeat(padWidth);
|
74412
|
+
} else if (options2.float === "right") {
|
74413
|
+
const padWidth = Math.max(columns - contentWidth - margin.right - 2, 0);
|
74414
|
+
marginLeft = PAD.repeat(padWidth);
|
74415
|
+
}
|
74416
|
+
const horizontal = chars.horizontal.repeat(contentWidth), top = colorizeBorder(NL.repeat(margin.top) + marginLeft + chars.topLeft + horizontal + chars.topRight), bottom = colorizeBorder(marginLeft + chars.bottomLeft + horizontal + chars.bottomRight + NL.repeat(margin.bottom)), side = colorizeBorder(chars.vertical), middle = lines2.map((line3) => {
|
74417
|
+
const paddingRight = PAD.repeat(contentWidth - stringWidth2(line3) - padding.left);
|
74418
|
+
return marginLeft + side + colorizeContent(paddingLeft + line3 + paddingRight) + side;
|
74419
|
+
}).join(NL);
|
74420
|
+
return top + NL + middle + NL + bottom;
|
74421
|
+
}, boxen$1.exports._borderStyles = cliBoxes2, boxen$1.exports;
|
74422
|
+
}
|
74423
|
+
var boxenExports = requireBoxen(), boxen = /* @__PURE__ */ loadEnv.getDefaultExportFromCjs(boxenExports);
|
75061
74424
|
const TELEMETRY_DISCLOSED_CONFIG_KEY = "telemetryDisclosed";
|
75062
74425
|
function telemetryDisclosure() {
|
75063
74426
|
const userConfig = getUserConfig();
|
@@ -75169,14 +74532,14 @@ function runUpdateCheck(options2) {
|
|
75169
74532
|
loadEnv.debug(`New version is ${newVersion || "unknown"}, current is ${version}. Falling back.`);
|
75170
74533
|
return;
|
75171
74534
|
}
|
75172
|
-
const
|
74535
|
+
const upgradeCommand = await getCliUpgradeCommand({ cwd, workDir }), message = [
|
75173
74536
|
"Update available ",
|
75174
74537
|
chalk__default.default.dim(version),
|
75175
74538
|
chalk__default.default.reset(" \u2192 "),
|
75176
74539
|
chalk__default.default.green(newVersion),
|
75177
74540
|
`
|
75178
74541
|
Run `,
|
75179
|
-
chalk__default.default.cyan(
|
74542
|
+
chalk__default.default.cyan(upgradeCommand),
|
75180
74543
|
" to update"
|
75181
74544
|
].join("");
|
75182
74545
|
console.error(`
|