@shopify/cli 3.63.1 → 3.64.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/dist/assets/cli-ruby/lib/shopify_cli/reporting_configuration_controller.rb +2 -37
- package/dist/assets/cli-ruby/lib/shopify_cli/theme/file.rb +12 -30
- package/dist/assets/dev-console/extensions/dev-console/assets/index-Cgb-oKsM.css +1 -0
- package/dist/assets/dev-console/extensions/dev-console/assets/{index-Dui3DO9f.js → index-D7F9wNys.js} +12 -12
- package/dist/assets/dev-console/index.html +2 -2
- package/dist/assets/hydrogen/starter/CHANGELOG.md +98 -5
- package/dist/assets/hydrogen/starter/app/components/AddToCartButton.tsx +37 -0
- package/dist/assets/hydrogen/starter/app/components/CartLineItem.tsx +150 -0
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +68 -0
- package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +101 -0
- package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -3
- package/dist/assets/hydrogen/starter/app/components/PageLayout.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +80 -0
- package/dist/assets/hydrogen/starter/app/components/ProductImage.tsx +23 -0
- package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +27 -0
- package/dist/assets/hydrogen/starter/app/components/Search.tsx +1 -0
- package/dist/assets/hydrogen/starter/app/root.tsx +11 -17
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +51 -232
- package/dist/assets/hydrogen/starter/package.json +11 -11
- package/dist/assets/hydrogen/tailwind/package.json +1 -6
- package/dist/assets/hydrogen/tailwind/tailwind.css +6 -3
- package/dist/assets/hydrogen/vanilla-extract/package.json +2 -3
- package/dist/assets/hydrogen/virtual-routes/components/{Layout.jsx → PageLayout.jsx} +2 -2
- package/dist/assets/hydrogen/virtual-routes/virtual-root.jsx +8 -30
- package/dist/{chunk-TD4ZV7BS.js → chunk-2TZRSXDZ.js} +3 -3
- package/dist/{chunk-EARPFFS7.js → chunk-5A6QTLMF.js} +241 -4
- package/dist/{chunk-SRLLZENE.js → chunk-6LPAIJ4Y.js} +2 -2
- package/dist/{chunk-TYOQQCHN.js → chunk-6TPBPH6V.js} +905 -896
- package/dist/{chunk-UZ3EKGD4.js → chunk-7GYETEC3.js} +3 -3
- package/dist/{chunk-UNPXLODI.js → chunk-B7RN7IRD.js} +3 -4
- package/dist/{chunk-SML7F4EL.js → chunk-BKBHZTOE.js} +3 -3
- package/dist/{chunk-A2UVOX6O.js → chunk-C2AKAEMR.js} +7066 -6051
- package/dist/{chunk-HZUY7I72.js → chunk-CLBFKLWA.js} +4 -4
- package/dist/{chunk-6UDFXWNE.js → chunk-EJITPGUJ.js} +21 -4
- package/dist/{chunk-SCKZAIMH.js → chunk-G4TC4KHZ.js} +3 -3
- package/dist/{chunk-ZSWSHFDT.js → chunk-GEAZ65AU.js} +1429 -2847
- package/dist/{chunk-HCYSYR53.js → chunk-GUB3OCYR.js} +4 -4
- package/dist/{chunk-QCB66M7L.js → chunk-H66NIXGL.js} +9 -14
- package/dist/chunk-I6HNYSMO.js +29 -0
- package/dist/{chunk-GICOHCP4.js → chunk-JSLLI5MY.js} +3 -3
- package/dist/{chunk-N5XLVLT2.js → chunk-KDK32T2A.js} +5 -5
- package/dist/{chunk-CBNQDBKA.js → chunk-L5WUZYLP.js} +5 -5
- package/dist/{chunk-OVW3UN2A.js → chunk-LHP5F5LY.js} +4 -4
- package/dist/{chunk-TOO3W2BY.js → chunk-LP2H26NY.js} +3 -3
- package/dist/{chunk-NIEJLNRY.js → chunk-LQX3GDBO.js} +2 -2
- package/dist/{chunk-WJ6UGHRU.js → chunk-LVLKZYIC.js} +3 -3
- package/dist/{chunk-WADS2TV5.js → chunk-NO7MYZEO.js} +5 -4
- package/dist/{chunk-LH533WG4.js → chunk-NPH2SXRO.js} +2 -2
- package/dist/{chunk-IJ3PP7ZN.js → chunk-PIJQNKK6.js} +5 -5
- package/dist/{chunk-S4VBXFXP.js → chunk-PWYMBX34.js} +220 -16
- package/dist/{chunk-DIRL62CL.js → chunk-QCK4QLB3.js} +17912 -17444
- package/dist/{chunk-5D3LUZSS.js → chunk-QI5O2CU6.js} +5 -5
- package/dist/{chunk-BZUV56IY.js → chunk-RX7VCI62.js} +4 -4
- package/dist/{chunk-HULX6T4O.js → chunk-T7DHXEC7.js} +3 -3
- package/dist/{chunk-VB3O7QTH.js → chunk-TCQUNDAY.js} +3 -3
- package/dist/{chunk-CM4H6QMH.js → chunk-TSZPIP7J.js} +3 -3
- package/dist/{chunk-OHZL7KKD.js → chunk-UTXBNNRZ.js} +4 -4
- package/dist/{chunk-QAB3YP77.js → chunk-VPPZXHAK.js} +2 -2
- package/dist/{chunk-ARLG6JTK.js → chunk-W26344X5.js} +3 -3
- package/dist/{chunk-EQPYUHNM.js → chunk-WIG6CPGR.js} +1497 -112
- package/dist/{chunk-MMRWTLF3.js → chunk-X34BQYQP.js} +2 -2
- package/dist/chunk-YLPSXWEZ.js +12 -0
- package/dist/cli/commands/auth/logout.js +14 -19
- package/dist/cli/commands/auth/logout.test.js +17 -21
- package/dist/cli/commands/debug/command-flags.js +11 -15
- package/dist/cli/commands/demo/catalog.js +13 -18
- package/dist/cli/commands/demo/generate-file.js +13 -18
- package/dist/cli/commands/demo/index.js +13 -18
- package/dist/cli/commands/demo/print-ai-prompt.js +13 -18
- package/dist/cli/commands/docs/generate.js +11 -15
- package/dist/cli/commands/docs/generate.test.js +11 -15
- package/dist/cli/commands/help.js +11 -15
- package/dist/cli/commands/kitchen-sink/async.js +12 -16
- package/dist/cli/commands/kitchen-sink/async.test.js +12 -16
- package/dist/cli/commands/kitchen-sink/index.js +14 -18
- package/dist/cli/commands/kitchen-sink/index.test.js +14 -18
- package/dist/cli/commands/kitchen-sink/prompts.js +12 -16
- package/dist/cli/commands/kitchen-sink/prompts.test.js +12 -16
- package/dist/cli/commands/kitchen-sink/static.js +12 -16
- package/dist/cli/commands/kitchen-sink/static.test.js +12 -16
- package/dist/cli/commands/search.js +12 -16
- package/dist/cli/commands/upgrade.js +11 -15
- package/dist/cli/commands/version.js +12 -16
- package/dist/cli/commands/version.test.js +12 -16
- package/dist/cli/services/commands/search.js +4 -4
- package/dist/cli/services/commands/search.test.js +4 -4
- package/dist/cli/services/commands/version.js +6 -7
- package/dist/cli/services/commands/version.test.js +7 -8
- package/dist/cli/services/demo.js +5 -6
- package/dist/cli/services/demo.test.js +5 -6
- package/dist/cli/services/kitchen-sink/async.js +4 -4
- package/dist/cli/services/kitchen-sink/prompts.js +4 -4
- package/dist/cli/services/kitchen-sink/static.js +4 -4
- package/dist/cli/services/upgrade.js +5 -6
- package/dist/cli/services/upgrade.test.js +7 -8
- package/dist/{constants-3CLHB4LQ.js → constants-EVER32LA.js} +3 -3
- package/dist/{custom-oclif-loader-T44V63XJ.js → custom-oclif-loader-F5UKFNJS.js} +13 -6
- package/dist/{error-handler-5KEL3EJC.js → error-handler-GCSQB44R.js} +10 -8
- package/dist/hooks/postrun.js +12 -14
- package/dist/hooks/prerun.js +8 -11
- package/dist/index.js +7708 -7452
- package/dist/{local-LBAOYPL4.js → local-VDSO2Y52.js} +4 -4
- package/dist/{morph-6NYGHGNT.js → morph-DQWX4LPS.js} +9 -9
- package/dist/{node-3X5EZ2GL.js → node-3B62KLPY.js} +21 -19
- package/dist/{node-package-manager-BU3KHLYT.js → node-package-manager-QLAS6UPG.js} +5 -6
- package/dist/{path-JVVXOELJ.js → path-KUSF6CYC.js} +2 -2
- package/dist/{system-GPQDWNIQ.js → system-CPU6ZDBW.js} +4 -4
- package/dist/templates/ui-extensions/projects/web_pixel_extension/package.json.liquid +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-4ZQNF2YQ.js → ui-Y4GW3DUK.js} +4 -4
- package/dist/{workerd-66AMV47V.js → workerd-LSXMDY5M.js} +22 -19
- package/oclif.manifest.json +265 -4
- package/package.json +7 -10
- package/dist/assets/dev-console/extensions/dev-console/assets/index-Bi7y6lI5.css +0 -1
- package/dist/assets/hydrogen/css-modules/package.json +0 -6
- package/dist/assets/hydrogen/postcss/package.json +0 -10
- package/dist/assets/hydrogen/postcss/postcss.config.js +0 -8
- package/dist/assets/hydrogen/starter/app/components/Cart.tsx +0 -364
- package/dist/assets/hydrogen/tailwind/postcss.config.js +0 -10
- package/dist/assets/hydrogen/tailwind/tailwind.config.js +0 -8
- package/dist/chunk-6EIVOQYP.js +0 -1070
- package/dist/chunk-GITQBCE5.js +0 -4385
- package/dist/chunk-HNAZOLMG.js +0 -1453
- package/dist/chunk-MO3UHUJB.js +0 -221
- package/dist/chunk-NBSFQYKI.js +0 -496
- package/dist/chunk-NVFSN34M.js +0 -265
- package/dist/chunk-QOUOFEGO.js +0 -35
- package/dist/chunk-WLZZJLBE.js +0 -12
- package/dist/error-handler-QVRMTAG7.js +0 -43
|
@@ -1,6 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
errorHandler,
|
|
3
|
+
registerCleanBugsnagErrorsFromWithinPlugins
|
|
4
|
+
} from "./chunk-PWYMBX34.js";
|
|
5
|
+
import {
|
|
6
|
+
hashString
|
|
7
|
+
} from "./chunk-H66NIXGL.js";
|
|
8
|
+
import {
|
|
9
|
+
AbortError,
|
|
10
|
+
addPublicMetadata,
|
|
11
|
+
addSensitiveMetadata,
|
|
12
|
+
findPathUp,
|
|
13
|
+
isDevelopment,
|
|
14
|
+
isTruthy,
|
|
15
|
+
outputContent,
|
|
16
|
+
outputInfo,
|
|
17
|
+
outputToken,
|
|
18
|
+
readFile,
|
|
19
|
+
renderInfo,
|
|
20
|
+
renderWarning,
|
|
21
|
+
terminalSupportsRawMode,
|
|
22
|
+
underscore
|
|
23
|
+
} from "./chunk-6TPBPH6V.js";
|
|
24
|
+
import {
|
|
25
|
+
require_lib
|
|
26
|
+
} from "./chunk-GEN4RXTD.js";
|
|
27
|
+
import {
|
|
28
|
+
cwd
|
|
29
|
+
} from "./chunk-B7RN7IRD.js";
|
|
1
30
|
import {
|
|
2
31
|
__commonJS,
|
|
3
32
|
__require,
|
|
33
|
+
__toESM,
|
|
4
34
|
init_cjs_shims
|
|
5
35
|
} from "./chunk-ZPL24Y2D.js";
|
|
6
36
|
|
|
@@ -1778,9 +1808,9 @@ var require_stringify = __commonJS({
|
|
|
1778
1808
|
"../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/stringify.js"(exports2, module2) {
|
|
1779
1809
|
"use strict";
|
|
1780
1810
|
init_cjs_shims();
|
|
1781
|
-
module2.exports =
|
|
1811
|
+
module2.exports = stringify2;
|
|
1782
1812
|
module2.exports.value = stringifyInline;
|
|
1783
|
-
function
|
|
1813
|
+
function stringify2(obj) {
|
|
1784
1814
|
if (obj === null)
|
|
1785
1815
|
throw typeError("null");
|
|
1786
1816
|
if (obj === void 0)
|
|
@@ -2057,7 +2087,214 @@ var require_toml = __commonJS({
|
|
|
2057
2087
|
}
|
|
2058
2088
|
});
|
|
2059
2089
|
|
|
2090
|
+
// ../cli-kit/dist/public/node/base-command.js
|
|
2091
|
+
init_cjs_shims();
|
|
2092
|
+
|
|
2093
|
+
// ../cli-kit/dist/public/node/environments.js
|
|
2094
|
+
init_cjs_shims();
|
|
2095
|
+
|
|
2096
|
+
// ../cli-kit/dist/public/node/toml.js
|
|
2097
|
+
init_cjs_shims();
|
|
2098
|
+
var toml = __toESM(require_toml(), 1);
|
|
2099
|
+
function decodeToml(input) {
|
|
2100
|
+
const normalizedInput = input.replace(/\r\n$/g, "\n");
|
|
2101
|
+
return toml.parse(normalizedInput);
|
|
2102
|
+
}
|
|
2103
|
+
function encodeToml(content) {
|
|
2104
|
+
const tomlSafeContent = content;
|
|
2105
|
+
return toml.stringify(tomlSafeContent);
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
// ../cli-kit/dist/public/node/environments.js
|
|
2109
|
+
async function loadEnvironment(environmentName, fileName, options) {
|
|
2110
|
+
const basePath = options?.from && options?.from !== "." ? options.from : cwd();
|
|
2111
|
+
const filePath = await findPathUp(fileName, {
|
|
2112
|
+
cwd: basePath,
|
|
2113
|
+
type: "file"
|
|
2114
|
+
});
|
|
2115
|
+
if (!filePath) {
|
|
2116
|
+
renderWarning({ body: "Environment file not found." });
|
|
2117
|
+
return void 0;
|
|
2118
|
+
}
|
|
2119
|
+
const environmentsJson = decodeToml(await readFile(filePath));
|
|
2120
|
+
const environments = environmentsJson.environments;
|
|
2121
|
+
if (!environments) {
|
|
2122
|
+
renderWarning({
|
|
2123
|
+
body: ["No environments found in", { command: filePath }, { char: "." }]
|
|
2124
|
+
});
|
|
2125
|
+
return void 0;
|
|
2126
|
+
}
|
|
2127
|
+
const environment = environments[environmentName];
|
|
2128
|
+
if (!environment)
|
|
2129
|
+
renderWarning({
|
|
2130
|
+
body: ["Environment", { command: environmentName }, "not found."]
|
|
2131
|
+
});
|
|
2132
|
+
await addSensitiveMetadata(() => ({
|
|
2133
|
+
environmentFlags: JSON.stringify(environment)
|
|
2134
|
+
}));
|
|
2135
|
+
return environment;
|
|
2136
|
+
}
|
|
2137
|
+
|
|
2138
|
+
// ../cli-kit/dist/public/node/base-command.js
|
|
2139
|
+
var import_core = __toESM(require_lib());
|
|
2140
|
+
var BaseCommand = class extends import_core.Command {
|
|
2141
|
+
// Replace markdown links to plain text like: "link label" (url)
|
|
2142
|
+
static descriptionWithoutMarkdown() {
|
|
2143
|
+
return (this.descriptionWithMarkdown ?? "").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm, '"$2" ($5)');
|
|
2144
|
+
}
|
|
2145
|
+
static analyticsNameOverride() {
|
|
2146
|
+
return void 0;
|
|
2147
|
+
}
|
|
2148
|
+
static analyticsStopCommand() {
|
|
2149
|
+
return void 0;
|
|
2150
|
+
}
|
|
2151
|
+
async catch(error) {
|
|
2152
|
+
error.skipOclifErrorHandling = true;
|
|
2153
|
+
await errorHandler(error, this.config);
|
|
2154
|
+
return import_core.Errors.handle(error);
|
|
2155
|
+
}
|
|
2156
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2157
|
+
async init() {
|
|
2158
|
+
this.exitWithTimestampWhenEnvVariablePresent();
|
|
2159
|
+
if (!isDevelopment()) {
|
|
2160
|
+
await registerCleanBugsnagErrorsFromWithinPlugins(this.config);
|
|
2161
|
+
}
|
|
2162
|
+
this.showNpmFlagWarning();
|
|
2163
|
+
return super.init();
|
|
2164
|
+
}
|
|
2165
|
+
// NPM creates an environment variable for every flag passed to a script.
|
|
2166
|
+
// This function checks for the presence of any of the available CLI flags
|
|
2167
|
+
// and warns the user to use the `--` separator.
|
|
2168
|
+
showNpmFlagWarning() {
|
|
2169
|
+
const commandVariables = this.constructor;
|
|
2170
|
+
const commandFlags = Object.keys(commandVariables.flags || {});
|
|
2171
|
+
const possibleNpmEnvVars = commandFlags.map((key) => `npm_config_${underscore(key).replace(/^no_/, "")}`);
|
|
2172
|
+
if (possibleNpmEnvVars.some((flag) => process.env[flag] !== void 0)) {
|
|
2173
|
+
renderWarning({
|
|
2174
|
+
body: [
|
|
2175
|
+
"NPM scripts require an extra",
|
|
2176
|
+
{ command: "--" },
|
|
2177
|
+
"separator to pass the flags. Example:",
|
|
2178
|
+
{ command: "npm run dev -- --reset" }
|
|
2179
|
+
]
|
|
2180
|
+
});
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
2184
|
+
exitWithTimestampWhenEnvVariablePresent() {
|
|
2185
|
+
if (isTruthy(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)) {
|
|
2186
|
+
outputInfo(`
|
|
2187
|
+
SHOPIFY_CLI_TIMESTAMP_START
|
|
2188
|
+
{ "timestamp": ${Date.now()} }
|
|
2189
|
+
SHOPIFY_CLI_TIMESTAMP_END
|
|
2190
|
+
`);
|
|
2191
|
+
process.exit(0);
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
async parse(options, argv) {
|
|
2195
|
+
let result = await super.parse(options, argv);
|
|
2196
|
+
result = await this.resultWithEnvironment(result, options, argv);
|
|
2197
|
+
await addFromParsedFlags(result.flags);
|
|
2198
|
+
return { ...result, ...{ argv: result.argv } };
|
|
2199
|
+
}
|
|
2200
|
+
environmentsFilename() {
|
|
2201
|
+
return void 0;
|
|
2202
|
+
}
|
|
2203
|
+
failMissingNonTTYFlags(flags, requiredFlags) {
|
|
2204
|
+
if (terminalSupportsRawMode())
|
|
2205
|
+
return;
|
|
2206
|
+
requiredFlags.forEach((name) => {
|
|
2207
|
+
if (!(name in flags)) {
|
|
2208
|
+
throw new AbortError(outputContent`Flag not specified:
|
|
2209
|
+
|
|
2210
|
+
${outputToken.cyan(name)}
|
|
2211
|
+
|
|
2212
|
+
This flag is required in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`, "To resolve this, specify the option in the command, or run the command in an interactive environment such as your local terminal.");
|
|
2213
|
+
}
|
|
2214
|
+
});
|
|
2215
|
+
}
|
|
2216
|
+
async resultWithEnvironment(originalResult, options, argv) {
|
|
2217
|
+
const flags = originalResult.flags;
|
|
2218
|
+
const environmentsFileName = this.environmentsFilename();
|
|
2219
|
+
if (!flags.environment || !environmentsFileName)
|
|
2220
|
+
return originalResult;
|
|
2221
|
+
const environment = await loadEnvironment(flags.environment, environmentsFileName, { from: flags.path });
|
|
2222
|
+
if (!environment)
|
|
2223
|
+
return originalResult;
|
|
2224
|
+
const noDefaultsResult = await super.parse(noDefaultsOptions(options), argv);
|
|
2225
|
+
const result = await super.parse(options, [
|
|
2226
|
+
// Need to specify argv default because we're merging with argsFromEnvironment.
|
|
2227
|
+
...argv || this.argv,
|
|
2228
|
+
...argsFromEnvironment(environment, options, noDefaultsResult)
|
|
2229
|
+
]);
|
|
2230
|
+
reportEnvironmentApplication(noDefaultsResult.flags, result.flags, flags.environment, environment);
|
|
2231
|
+
return result;
|
|
2232
|
+
}
|
|
2233
|
+
};
|
|
2234
|
+
BaseCommand.baseFlags = {};
|
|
2235
|
+
async function addFromParsedFlags(flags) {
|
|
2236
|
+
await addPublicMetadata(() => ({
|
|
2237
|
+
cmd_all_verbose: flags.verbose,
|
|
2238
|
+
cmd_all_path_override: flags.path !== void 0,
|
|
2239
|
+
cmd_all_path_override_hash: flags.path === void 0 ? void 0 : hashString(flags.path)
|
|
2240
|
+
}));
|
|
2241
|
+
}
|
|
2242
|
+
function reportEnvironmentApplication(noDefaultsFlags, flagsWithEnvironments, environmentName, environment) {
|
|
2243
|
+
const changes = {};
|
|
2244
|
+
for (const [name, value] of Object.entries(flagsWithEnvironments)) {
|
|
2245
|
+
const userSpecifiedThisFlag = Object.prototype.hasOwnProperty.call(noDefaultsFlags, name);
|
|
2246
|
+
const environmentContainsFlag = Object.prototype.hasOwnProperty.call(environment, name);
|
|
2247
|
+
if (!userSpecifiedThisFlag && environmentContainsFlag) {
|
|
2248
|
+
const valueToReport = name === "password" ? `********${value.substr(-4)}` : value;
|
|
2249
|
+
changes[name] = valueToReport;
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
if (Object.keys(changes).length === 0)
|
|
2253
|
+
return;
|
|
2254
|
+
const items = Object.entries(changes).map(([name, value]) => `${name}: ${value}`);
|
|
2255
|
+
renderInfo({
|
|
2256
|
+
headline: ["Using applicable flags from", { userInput: environmentName }, "environment:"],
|
|
2257
|
+
body: [{ list: { items } }]
|
|
2258
|
+
});
|
|
2259
|
+
}
|
|
2260
|
+
function noDefaultsOptions(options) {
|
|
2261
|
+
if (!options?.flags)
|
|
2262
|
+
return options;
|
|
2263
|
+
return {
|
|
2264
|
+
...options,
|
|
2265
|
+
flags: Object.fromEntries(Object.entries(options.flags).map(([label, settings]) => {
|
|
2266
|
+
const copiedSettings = { ...settings };
|
|
2267
|
+
delete copiedSettings.default;
|
|
2268
|
+
return [label, copiedSettings];
|
|
2269
|
+
}))
|
|
2270
|
+
};
|
|
2271
|
+
}
|
|
2272
|
+
function argsFromEnvironment(environment, options, noDefaultsResult) {
|
|
2273
|
+
const args = [];
|
|
2274
|
+
for (const [label, value] of Object.entries(environment)) {
|
|
2275
|
+
const flagIsRelevantToCommand = options?.flags && Object.prototype.hasOwnProperty.call(options.flags, label);
|
|
2276
|
+
const userSpecifiedThisFlag = noDefaultsResult.flags && Object.prototype.hasOwnProperty.call(noDefaultsResult.flags, label);
|
|
2277
|
+
if (flagIsRelevantToCommand && !userSpecifiedThisFlag) {
|
|
2278
|
+
if (typeof value === "boolean") {
|
|
2279
|
+
if (value === true) {
|
|
2280
|
+
args.push(`--${label}`);
|
|
2281
|
+
} else {
|
|
2282
|
+
throw new AbortError(outputContent`Environments can only specify true for boolean flags. Attempted to set ${outputToken.yellow(label)} to false.`);
|
|
2283
|
+
}
|
|
2284
|
+
} else if (Array.isArray(value)) {
|
|
2285
|
+
value.forEach((element) => args.push(`--${label}`, `${element}`));
|
|
2286
|
+
} else {
|
|
2287
|
+
args.push(`--${label}`, `${value}`);
|
|
2288
|
+
}
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
return args;
|
|
2292
|
+
}
|
|
2293
|
+
var base_command_default = BaseCommand;
|
|
2294
|
+
|
|
2060
2295
|
export {
|
|
2061
|
-
|
|
2296
|
+
decodeToml,
|
|
2297
|
+
encodeToml,
|
|
2298
|
+
base_command_default
|
|
2062
2299
|
};
|
|
2063
|
-
//# sourceMappingURL=chunk-
|
|
2300
|
+
//# sourceMappingURL=chunk-5A6QTLMF.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openURL
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6TPBPH6V.js";
|
|
4
4
|
import {
|
|
5
5
|
init_cjs_shims
|
|
6
6
|
} from "./chunk-ZPL24Y2D.js";
|
|
@@ -16,4 +16,4 @@ async function searchService(query) {
|
|
|
16
16
|
export {
|
|
17
17
|
searchService
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
19
|
+
//# sourceMappingURL=chunk-6LPAIJ4Y.js.map
|