UNPKG

@shopify/create-app

Version:

A CLI tool to create a new Shopify app.

1,375 lines (1,336 loc) • 11 MB
import { require_normalize_path } from "./chunk-X7YTIMNN.js"; import { import_websocket_server } from "./chunk-3GXB4ZRP.js"; import { errorHandler, registerCleanBugsnagErrorsFromWithinPlugins, require_end_of_stream } from "./chunk-B5LO3WJB.js"; import { setNextDeprecationDate } from "./chunk-CP3BRHWK.js"; import { fanoutHooks, getListOfTunnelPlugins, reportAnalyticsEvent, requestIdsCollection } from "./chunk-RJBI6YFS.js"; import { setCurrentCommandId, showNotificationsIfNeeded } from "./chunk-MF4CX3X6.js"; import { CLI_KIT_VERSION, ClientError, DevServerCore, FetchError, GraphQLClient, GraphQLClientError, abortSignalFromRequestBehaviour, adminFqdn, appDevFqdn, appManagementFqdn, blockPartnersAccess, buildHeaders, businessPlatformFqdn, developerDashboardFqdn, ensureAuthenticated, err, exchangeCliTokenForAppManagementAccessToken, exchangeCliTokenForBusinessPlatformAccessToken, exchangeCustomPartnerToken, fetch as fetch2, fileHash, formData, getBackendPort, getEnvironmentVariables, getPartnersToken, gql, hashString, httpsAgent, isThemeAccessSession, jsonOutputEnabled, nonRandomUUID, normalizeStoreFqdn, ok, partnersFqdn, randomUUID, requestMode, require_graphql, require_lib as require_lib3, require_mime_types, resolveRequestDocument, retryAwareRequest, sanitizeURL, sanitizedHeadersOutput, setLastSeenAuthMethod, setLastSeenUserIdAfterAuth, shopifyFetch, z } from "./chunk-FCIA744E.js"; import "./chunk-25IMI7TH.js"; import { LocalStorage, UnknownPackageManagerError, addNPMDependenciesIfNeeded, addResolutionOrOverride, cacheRetrieveOrRepopulate, findUpAndReadPackageJson, getDependencies, getPackageManager, getPackageName, getPackageVersion, inferPackageManager, installNPMDependenciesRecursively, installNodeModules, lockfiles, lockfilesByManager, readAndParsePackageJson, require_ajv, runAtMinimumInterval, timeIntervalToMilliseconds, usesWorkspaces, versionSatisfies, writePackageJSON } from "./chunk-RYX6V56V.js"; import { AbortController as AbortController2, AbortError, AbortSignal, AbortSilentError, Alert, Box_default, BugError, CancelExecution, ConcurrentOutput, Link, Static, Text, addPublicMetadata, addSensitiveMetadata, appHost, appPort, appendFile, asHumanFriendlyArray, camelize, capitalize, chmod, codespacePortForwardingDomain, codespaceURL, constantize, copyFile, createFileReadStream, createFileWriteStream, createRuntimeMetadataContainer, currentProcessIsGlobal, debounce, difference, environmentVariables, exec, fetchSpinPort, figures_default, fileExists, fileExistsSync, fileHasExecutablePermissions, fileLastUpdatedTimestamp, fileRealPath, fileSize, findPathUp, firstPartyDev, formatDate, formatLocalDate, formatPackageManagerCommand, formatSection, generateRandomNameForSubdirectory, getArrayRejectingUndefined, getRandomName, getThemeKitAccessDomain, gitpodURL, glob, globalCLIVersion, handleCtrlC, hasGit, hyphenate, import_ts_error, inTemporaryDirectory, init_tslib_es6, installGlobalCLIPrompt, installGlobalShopifyCLI, isCI, isDevelopment, isDirectory, isPreReleaseVersion, isShopify, isSpin, isSpinEnvironment, isTTY, isTerminalInteractive, isTruthy, isUnitTest, isVerbose, isWsl, itemToString, joinWithAnd, keypress, localCLIVersion, logsFolder, matchGlob, mkdir, moveFile, normalizeDelimitedString, openURL, outputCompleted, outputContent, outputDebug, outputInfo, outputNewline, outputResult, outputSuccess, outputToken, outputWarn, pascalize, platformAndArch, pluralize, readFile, readFileSync, readdir, removeFile, removeFileSync, render, renderAutocompletePrompt, renderConcurrent, renderConfirmationPrompt, renderDangerousConfirmationPrompt, renderError, renderFatalError, renderInfo, renderSelectPrompt, renderSuccess, renderTable, renderTasks, renderTextPrompt, renderWarning, require_Stack, require_Symbol, require_Uint8Array, require_arrayLikeKeys, require_arrayMap, require_arrayPush, require_baseDifference, require_baseEach, require_baseFlatten, require_baseForOwn, require_baseGet, require_baseGetAllKeys, require_baseIsEqual, require_baseIteratee, require_baseKeys, require_baseRest, require_baseUnary, require_castPath, require_defineProperty, require_eq, require_get, require_getAllKeys, require_getSymbols, require_getTag, require_isArguments, require_isArray, require_isArrayLike, require_isArrayLikeObject, require_isBuffer, require_isIndex, require_isObject, require_isObjectLike, require_isPrototype, require_isTypedArray, require_keys, require_lib, require_mapToArray, require_nodeUtil, require_overArg, require_react, require_root, require_scheduler, require_signal_exit, require_stubArray, require_toKey, require_toString, rmdir, runWithTimer, serviceEnvironment, shouldDisplayColors, sleep, slugify, source_default, spinFqdn, spinVariables, stringifyMessage, tempDirectory, terminalSupportsPrompting, themeKitAccessDomain, touchFile, treeKill, tryParseInt, tslib_es6_exports, underscore, uniq, uniqBy, unlinkFile, unstyled, useAbortSignal, useConcurrentOutputContext, use_input_default, use_stdin_default, username, writeFile, writeFileSync } from "./chunk-WQCCLXI7.js"; import { require_brace_expansion, require_commonjs, require_lib as require_lib2 } from "./chunk-H3GWNOGA.js"; import { require_ms, require_src } from "./chunk-UMUTXITN.js"; import { basename, cwd, dirname, extname, isSubpath, joinPath, moduleDirectory, normalizePath, relativePath, relativizePath, resolvePath, sniffForJson } from "./chunk-Y2JP6WFP.js"; import { require_fs, require_glob, require_inflight, require_inherits } from "./chunk-O4KAJGU5.js"; import { require_once } from "./chunk-SHWOPMLQ.js"; import { require_graceful_fs } from "./chunk-75LV6AQS.js"; import "./chunk-LABBARNJ.js"; import "./chunk-G2ZZKGSV.js"; import { __commonJS, __esm, __export, __require, __toCommonJS, __toESM, init_cjs_shims } from "./chunk-PKR7KJ6P.js"; // ../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js var require_cjs = __commonJS({ "../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js"(exports2, module2) { "use strict"; init_cjs_shims(); var isMergeableObject = function(value) { return isNonNullObject(value) && !isSpecial(value); }; function isNonNullObject(value) { return !!value && typeof value == "object"; } function isSpecial(value) { var stringValue = Object.prototype.toString.call(value); return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value); } var canUseSymbol = typeof Symbol == "function" && Symbol.for, REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103; function isReactElement(value) { return value.$$typeof === REACT_ELEMENT_TYPE; } function emptyTarget(val) { return Array.isArray(val) ? [] : {}; } function cloneUnlessOtherwiseSpecified(value, options2) { return options2.clone !== !1 && options2.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options2) : value; } function defaultArrayMerge(target, source, options2) { return target.concat(source).map(function(element) { return cloneUnlessOtherwiseSpecified(element, options2); }); } function getMergeFunction(key, options2) { if (!options2.customMerge) return deepmerge; var customMerge = options2.customMerge(key); return typeof customMerge == "function" ? customMerge : deepmerge; } function getEnumerableOwnPropertySymbols(target) { return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) { return Object.propertyIsEnumerable.call(target, symbol); }) : []; } function getKeys(target) { return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target)); } function propertyIsOnObject(object, property) { try { return property in object; } catch { return !1; } } function propertyIsUnsafe(target, key) { return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key)); } function mergeObject(target, source, options2) { var destination = {}; return options2.isMergeableObject(target) && getKeys(target).forEach(function(key) { destination[key] = cloneUnlessOtherwiseSpecified(target[key], options2); }), getKeys(source).forEach(function(key) { propertyIsUnsafe(target, key) || (propertyIsOnObject(target, key) && options2.isMergeableObject(source[key]) ? destination[key] = getMergeFunction(key, options2)(target[key], source[key], options2) : destination[key] = cloneUnlessOtherwiseSpecified(source[key], options2)); }), destination; } function deepmerge(target, source, options2) { options2 = options2 || {}, options2.arrayMerge = options2.arrayMerge || defaultArrayMerge, options2.isMergeableObject = options2.isMergeableObject || isMergeableObject, options2.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified; var sourceIsArray = Array.isArray(source), targetIsArray = Array.isArray(target), sourceAndTargetTypesMatch = sourceIsArray === targetIsArray; return sourceAndTargetTypesMatch ? sourceIsArray ? options2.arrayMerge(target, source, options2) : mergeObject(target, source, options2) : cloneUnlessOtherwiseSpecified(source, options2); } deepmerge.all = function(array, options2) { if (!Array.isArray(array)) throw new Error("first argument should be an array"); return array.reduce(function(prev, next) { return deepmerge(prev, next, options2); }, {}); }; var deepmerge_1 = deepmerge; module2.exports = deepmerge_1; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js var require_baseAssignValue = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js"(exports2, module2) { init_cjs_shims(); var defineProperty2 = require_defineProperty(); function baseAssignValue(object, key, value) { key == "__proto__" && defineProperty2 ? defineProperty2(object, key, { configurable: !0, enumerable: !0, value, writable: !0 }) : object[key] = value; } module2.exports = baseAssignValue; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js var require_assignValue = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js"(exports2, module2) { init_cjs_shims(); var baseAssignValue = require_baseAssignValue(), eq = require_eq(), objectProto = Object.prototype, hasOwnProperty2 = objectProto.hasOwnProperty; function assignValue(object, key, value) { var objValue = object[key]; (!(hasOwnProperty2.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) && baseAssignValue(object, key, value); } module2.exports = assignValue; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSet.js var require_baseSet = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSet.js"(exports2, module2) { init_cjs_shims(); var assignValue = require_assignValue(), castPath = require_castPath(), isIndex = require_isIndex(), isObject4 = require_isObject(), toKey = require_toKey(); function baseSet(object, path, value, customizer) { if (!isObject4(object)) return object; path = castPath(path, object); for (var index = -1, length = path.length, lastIndex = length - 1, nested = object; nested != null && ++index < length; ) { var key = toKey(path[index]), newValue = value; if (key === "__proto__" || key === "constructor" || key === "prototype") return object; if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : void 0, newValue === void 0 && (newValue = isObject4(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {}); } assignValue(nested, key, newValue), nested = nested[key]; } return object; } module2.exports = baseSet; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePickBy.js var require_basePickBy = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePickBy.js"(exports2, module2) { init_cjs_shims(); var baseGet = require_baseGet(), baseSet = require_baseSet(), castPath = require_castPath(); function basePickBy(object, paths, predicate) { for (var index = -1, length = paths.length, result = {}; ++index < length; ) { var path = paths[index], value = baseGet(object, path); predicate(value, path) && baseSet(result, castPath(path, object), value); } return result; } module2.exports = basePickBy; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getPrototype.js var require_getPrototype = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getPrototype.js"(exports2, module2) { init_cjs_shims(); var overArg = require_overArg(), getPrototype = overArg(Object.getPrototypeOf, Object); module2.exports = getPrototype; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getSymbolsIn.js var require_getSymbolsIn = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getSymbolsIn.js"(exports2, module2) { init_cjs_shims(); var arrayPush = require_arrayPush(), getPrototype = require_getPrototype(), getSymbols = require_getSymbols(), stubArray = require_stubArray(), nativeGetSymbols = Object.getOwnPropertySymbols, getSymbolsIn = nativeGetSymbols ? function(object) { for (var result = []; object; ) arrayPush(result, getSymbols(object)), object = getPrototype(object); return result; } : stubArray; module2.exports = getSymbolsIn; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeysIn.js var require_nativeKeysIn = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeysIn.js"(exports2, module2) { init_cjs_shims(); function nativeKeysIn(object) { var result = []; if (object != null) for (var key in Object(object)) result.push(key); return result; } module2.exports = nativeKeysIn; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeysIn.js var require_baseKeysIn = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeysIn.js"(exports2, module2) { init_cjs_shims(); var isObject4 = require_isObject(), isPrototype = require_isPrototype(), nativeKeysIn = require_nativeKeysIn(), objectProto = Object.prototype, hasOwnProperty2 = objectProto.hasOwnProperty; function baseKeysIn(object) { if (!isObject4(object)) return nativeKeysIn(object); var isProto = isPrototype(object), result = []; for (var key in object) key == "constructor" && (isProto || !hasOwnProperty2.call(object, key)) || result.push(key); return result; } module2.exports = baseKeysIn; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keysIn.js var require_keysIn = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keysIn.js"(exports2, module2) { init_cjs_shims(); var arrayLikeKeys = require_arrayLikeKeys(), baseKeysIn = require_baseKeysIn(), isArrayLike2 = require_isArrayLike(); function keysIn(object) { return isArrayLike2(object) ? arrayLikeKeys(object, !0) : baseKeysIn(object); } module2.exports = keysIn; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeysIn.js var require_getAllKeysIn = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeysIn.js"(exports2, module2) { init_cjs_shims(); var baseGetAllKeys = require_baseGetAllKeys(), getSymbolsIn = require_getSymbolsIn(), keysIn = require_keysIn(); function getAllKeysIn(object) { return baseGetAllKeys(object, keysIn, getSymbolsIn); } module2.exports = getAllKeysIn; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pickBy.js var require_pickBy = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pickBy.js"(exports2, module2) { init_cjs_shims(); var arrayMap = require_arrayMap(), baseIteratee = require_baseIteratee(), basePickBy = require_basePickBy(), getAllKeysIn = require_getAllKeysIn(); function pickBy2(object, predicate) { if (object == null) return {}; var props = arrayMap(getAllKeysIn(object), function(prop) { return [prop]; }); return predicate = baseIteratee(predicate), basePickBy(object, props, function(value, path) { return predicate(value, path[0]); }); } module2.exports = pickBy2; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/mapValues.js var require_mapValues = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/mapValues.js"(exports2, module2) { init_cjs_shims(); var baseAssignValue = require_baseAssignValue(), baseForOwn = require_baseForOwn(), baseIteratee = require_baseIteratee(); function mapValues(object, iteratee) { var result = {}; return iteratee = baseIteratee(iteratee, 3), baseForOwn(object, function(value, key, object2) { baseAssignValue(result, key, iteratee(value, key, object2)); }), result; } module2.exports = mapValues; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEqual.js var require_isEqual = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEqual.js"(exports2, module2) { init_cjs_shims(); var baseIsEqual = require_baseIsEqual(); function isEqual(value, other) { return baseIsEqual(value, other); } module2.exports = isEqual; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/last.js var require_last = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/last.js"(exports2, module2) { init_cjs_shims(); function last2(array) { var length = array == null ? 0 : array.length; return length ? array[length - 1] : void 0; } module2.exports = last2; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/differenceWith.js var require_differenceWith = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/differenceWith.js"(exports2, module2) { init_cjs_shims(); var baseDifference = require_baseDifference(), baseFlatten = require_baseFlatten(), baseRest = require_baseRest(), isArrayLikeObject = require_isArrayLikeObject(), last2 = require_last(), differenceWith2 = baseRest(function(array, values2) { var comparator = last2(values2); return isArrayLikeObject(comparator) && (comparator = void 0), isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, !0), void 0, comparator) : []; }); module2.exports = differenceWith2; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/fromPairs.js var require_fromPairs = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/fromPairs.js"(exports2, module2) { init_cjs_shims(); function fromPairs2(pairs) { for (var index = -1, length = pairs == null ? 0 : pairs.length, result = {}; ++index < length; ) { var pair = pairs[index]; result[pair[0]] = pair[1]; } return result; } module2.exports = fromPairs2; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToPairs.js var require_baseToPairs = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToPairs.js"(exports2, module2) { init_cjs_shims(); var arrayMap = require_arrayMap(); function baseToPairs(object, props) { return arrayMap(props, function(key) { return [key, object[key]]; }); } module2.exports = baseToPairs; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToPairs.js var require_setToPairs = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToPairs.js"(exports2, module2) { init_cjs_shims(); function setToPairs(set2) { var index = -1, result = Array(set2.size); return set2.forEach(function(value) { result[++index] = [value, value]; }), result; } module2.exports = setToPairs; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createToPairs.js var require_createToPairs = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createToPairs.js"(exports2, module2) { init_cjs_shims(); var baseToPairs = require_baseToPairs(), getTag = require_getTag(), mapToArray = require_mapToArray(), setToPairs = require_setToPairs(), mapTag = "[object Map]", setTag = "[object Set]"; function createToPairs(keysFunc) { return function(object) { var tag = getTag(object); return tag == mapTag ? mapToArray(object) : tag == setTag ? setToPairs(object) : baseToPairs(object, keysFunc(object)); }; } module2.exports = createToPairs; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toPairs.js var require_toPairs = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toPairs.js"(exports2, module2) { init_cjs_shims(); var createToPairs = require_createToPairs(), keys = require_keys(), toPairs2 = createToPairs(keys); module2.exports = toPairs2; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/set.js var require_set = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/set.js"(exports2, module2) { init_cjs_shims(); var baseSet = require_baseSet(); function set2(object, path, value) { return object == null ? object : baseSet(object, path, value); } module2.exports = set2; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSlice.js var require_baseSlice = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSlice.js"(exports2, module2) { init_cjs_shims(); function baseSlice(array, start, end) { var index = -1, length = array.length; start < 0 && (start = -start > length ? 0 : length + start), end = end > length ? length : end, end < 0 && (end += length), length = start > end ? 0 : end - start >>> 0, start >>>= 0; for (var result = Array(length); ++index < length; ) result[index] = array[index + start]; return result; } module2.exports = baseSlice; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_parent.js var require_parent = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_parent.js"(exports2, module2) { init_cjs_shims(); var baseGet = require_baseGet(), baseSlice = require_baseSlice(); function parent(object, path) { return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); } module2.exports = parent; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnset.js var require_baseUnset = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnset.js"(exports2, module2) { init_cjs_shims(); var castPath = require_castPath(), last2 = require_last(), parent = require_parent(), toKey = require_toKey(); function baseUnset(object, path) { return path = castPath(path, object), object = parent(object, path), object == null || delete object[toKey(last2(path))]; } module2.exports = baseUnset; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/unset.js var require_unset = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/unset.js"(exports2, module2) { init_cjs_shims(); var baseUnset = require_baseUnset(); function unset2(object, path) { return object == null ? !0 : baseUnset(object, path); } module2.exports = unset2; } }); // ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js var require_isEmpty = __commonJS({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js"(exports2, module2) { init_cjs_shims(); var baseKeys = require_baseKeys(), getTag = require_getTag(), isArguments = require_isArguments(), isArray = require_isArray(), isArrayLike2 = require_isArrayLike(), isBuffer = require_isBuffer(), isPrototype = require_isPrototype(), isTypedArray = require_isTypedArray(), mapTag = "[object Map]", setTag = "[object Set]", objectProto = Object.prototype, hasOwnProperty2 = objectProto.hasOwnProperty; function isEmpty2(value) { if (value == null) return !0; if (isArrayLike2(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) return !value.length; var tag = getTag(value); if (tag == mapTag || tag == setTag) return !value.size; if (isPrototype(value)) return !baseKeys(value).length; for (var key in value) if (hasOwnProperty2.call(value, key)) return !1; return !0; } module2.exports = isEmpty2; } }); // ../../node_modules/.pnpm/@shopify+toml-patch@0.3.0/node_modules/@shopify/toml-patch/toml_patch.js var require_toml_patch = __commonJS({ "../../node_modules/.pnpm/@shopify+toml-patch@0.3.0/node_modules/@shopify/toml-patch/toml_patch.js"(exports2, module2) { init_cjs_shims(); var imports = {}; imports.__wbindgen_placeholder__ = module2.exports; var wasm, { TextEncoder: TextEncoder2, TextDecoder } = __require("util"); function isLikeNone(x) { return x == null; } var cachedDataViewMemory0 = null; function getDataViewMemory0() { return (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === !0 || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) && (cachedDataViewMemory0 = new DataView(wasm.memory.buffer)), cachedDataViewMemory0; } var WASM_VECTOR_LEN = 0, cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { return (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) && (cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer)), cachedUint8ArrayMemory0; } var cachedTextEncoder = new TextEncoder2("utf-8"), encodeString = typeof cachedTextEncoder.encodeInto == "function" ? function(arg, view) { return cachedTextEncoder.encodeInto(arg, view); } : function(arg, view) { let buf = cachedTextEncoder.encode(arg); return view.set(buf), { read: arg.length, written: buf.length }; }; function passStringToWasm0(arg, malloc, realloc) { if (realloc === void 0) { let buf = cachedTextEncoder.encode(arg), ptr2 = malloc(buf.length, 1) >>> 0; return getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf), WASM_VECTOR_LEN = buf.length, ptr2; } let len = arg.length, ptr = malloc(len, 1) >>> 0, mem = getUint8ArrayMemory0(), offset = 0; for (; offset < len; offset++) { let code = arg.charCodeAt(offset); if (code > 127) break; mem[ptr + offset] = code; } if (offset !== len) { offset !== 0 && (arg = arg.slice(offset)), ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; let view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len), ret = encodeString(arg, view); offset += ret.written, ptr = realloc(ptr, len, offset, 1) >>> 0; } return WASM_VECTOR_LEN = offset, ptr; } var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }); cachedTextDecoder.decode(); function getStringFromWasm0(ptr, len) { return ptr = ptr >>> 0, cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } function takeFromExternrefTable0(idx) { let value = wasm.__wbindgen_export_0.get(idx); return wasm.__externref_table_dealloc(idx), value; } module2.exports.echoToml = function(tomlContent) { let deferred3_0, deferred3_1; try { let ptr0 = passStringToWasm0(tomlContent, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc), len0 = WASM_VECTOR_LEN, ret = wasm.echoToml(ptr0, len0); var ptr2 = ret[0], len2 = ret[1]; if (ret[3]) throw ptr2 = 0, len2 = 0, takeFromExternrefTable0(ret[2]); return deferred3_0 = ptr2, deferred3_1 = len2, getStringFromWasm0(ptr2, len2); } finally { wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); } }; module2.exports.updateTomlValues = function(tomlContent, patches) { let deferred3_0, deferred3_1; try { let ptr0 = passStringToWasm0(tomlContent, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc), len0 = WASM_VECTOR_LEN, ret = wasm.updateTomlValues(ptr0, len0, patches); var ptr2 = ret[0], len2 = ret[1]; if (ret[3]) throw ptr2 = 0, len2 = 0, takeFromExternrefTable0(ret[2]); return deferred3_0 = ptr2, deferred3_1 = len2, getStringFromWasm0(ptr2, len2); } finally { wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); } }; module2.exports.__wbg_from_2a5d3e218e67aa85 = function(arg0) { return Array.from(arg0); }; module2.exports.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) { return arg0[arg1 >>> 0]; }; module2.exports.__wbg_length_e2d2a49132c1b256 = function(arg0) { return arg0.length; }; module2.exports.__wbindgen_boolean_get = function(arg0) { let v = arg0; return typeof v == "boolean" ? v ? 1 : 0 : 2; }; module2.exports.__wbindgen_init_externref_table = function() { let table = wasm.__wbindgen_export_0, offset = table.grow(4); table.set(0, void 0), table.set(offset + 0, void 0), table.set(offset + 1, null), table.set(offset + 2, !0), table.set(offset + 3, !1); }; module2.exports.__wbindgen_is_array = function(arg0) { return Array.isArray(arg0); }; module2.exports.__wbindgen_is_undefined = function(arg0) { return arg0 === void 0; }; module2.exports.__wbindgen_number_get = function(arg0, arg1) { let obj = arg1, ret = typeof obj == "number" ? obj : void 0; getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, !0), getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), !0); }; module2.exports.__wbindgen_string_get = function(arg0, arg1) { let obj = arg1, ret = typeof obj == "string" ? obj : void 0; var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc), len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, !0), getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, !0); }; module2.exports.__wbindgen_string_new = function(arg0, arg1) { return getStringFromWasm0(arg0, arg1); }; module2.exports.__wbindgen_throw = function(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); }; var path = __require("path").join(__dirname, "toml_patch_bg.wasm"), bytes = __require("fs").readFileSync(path), wasmModule = new WebAssembly.Module(bytes), wasmInstance = new WebAssembly.Instance(wasmModule, imports); wasm = wasmInstance.exports; module2.exports.__wasm = wasm; wasm.__wbindgen_start(); } }); // ../../node_modules/.pnpm/@shopify+theme-check-common@3.19.0/node_modules/@shopify/theme-check-common/dist/utils/object.js var require_object = __commonJS({ "../../node_modules/.pnpm/@shopify+theme-check-common@3.19.0/node_modules/@shopify/theme-check-common/dist/utils/object.js"(exports2) { "use strict"; init_cjs_shims(); Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.deepGet = void 0; function deepGet(obj, path) { return path.reduce((acc, key) => acc?.[key], obj); } exports2.deepGet = deepGet; } }); // ../../node_modules/.pnpm/@shopify+theme-check-common@3.19.0/node_modules/@shopify/theme-check-common/dist/utils/array.js var require_array = __commonJS({ "../../node_modules/.pnpm/@shopify+theme-check-common@3.19.0/node_modules/@shopify/theme-check-common/dist/utils/array.js"(exports2) { "use strict"; init_cjs_shims(); Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.findLastAndIndex = exports2.findLastIndex = exports2.findLast = exports2.last = exports2.first = void 0; function first2(arr) { return arr[0]; } exports2.first = first2; function last2(arr, offset = 0) { return arr[arr.length - 1 + offset]; } exports2.last = last2; function findLast(array, pred) { return array[findLastIndex(array, pred)]; } exports2.findLast = findLast; function findLastIndex(array, pred) { for (let i = array.length - 1; i >= 0; i--) if (pred(array[i])) return i; return -1; } exports2.findLastIndex = findLastIndex; function findLastAndIndex(array, pred) { let index = findLastIndex(array, pred); return [array[index], index]; } exports2.findLastAndIndex = findLastAndIndex; } }); // ../../node_modules/.pnpm/isarray@1.0.0/node_modules/isarray/index.js var require_isarray = __commonJS({ "../../node_modules/.pnpm/isarray@1.0.0/node_modules/isarray/index.js"(exports2, module2) { init_cjs_shims(); var toString2 = {}.toString; module2.exports = Array.isArray || function(arr) { return toString2.call(arr) == "[object Array]"; }; } }); // ../../node_modules/.pnpm/isobject@2.1.0/node_modules/isobject/index.js var require_isobject = __commonJS({ "../../node_modules/.pnpm/isobject@2.1.0/node_modules/isobject/index.js"(exports2, module2) { "use strict"; init_cjs_shims(); var isArray = require_isarray(); module2.exports = function(val) { return val != null && typeof val == "object" && isArray(val) === !1; }; } }); // ../../node_modules/.pnpm/line-column@1.0.2/node_modules/line-column/lib/line-column.js var require_line_column = __commonJS({ "../../node_modules/.pnpm/line-column@1.0.2/node_modules/line-column/lib/line-column.js"(exports2, module2) { "use strict"; init_cjs_shims(); var isArray = require_isarray(), isObject4 = require_isobject(), slice = Array.prototype.slice; module2.exports = LineColumnFinder; function LineColumnFinder(str, options2) { if (!(this instanceof LineColumnFinder)) return typeof options2 == "number" ? new LineColumnFinder(str).fromIndex(options2) : new LineColumnFinder(str, options2); this.str = str || "", this.lineToIndex = buildLineToIndex(this.str), options2 = options2 || {}, this.origin = typeof options2.origin > "u" ? 1 : options2.origin; } LineColumnFinder.prototype.fromIndex = function(index) { if (index < 0 || index >= this.str.length || isNaN(index)) return null; var line = findLowerIndexInRangeArray(index, this.lineToIndex); return { line: line + this.origin, col: index - this.lineToIndex[line] + this.origin }; }; LineColumnFinder.prototype.toIndex = function(line, column) { if (typeof column > "u") return isArray(line) && line.length >= 2 ? this.toIndex(line[0], line[1]) : isObject4(line) && "line" in line && ("col" in line || "column" in line) ? this.toIndex(line.line, "col" in line ? line.col : line.column) : -1; if (isNaN(line) || isNaN(column)) return -1; if (line -= this.origin, column -= this.origin, line >= 0 && column >= 0 && line < this.lineToIndex.length) { var lineIndex = this.lineToIndex[line], nextIndex = line === this.lineToIndex.length - 1 ? this.str.length : this.lineToIndex[line + 1]; if (column < nextIndex - lineIndex) return lineIndex + column; } return -1; }; function buildLineToIndex(str) { for (var lines = str.split(` `), lineToIndex = new Array(lines.length), index = 0, i = 0, l = lines.length; i < l; i++) lineToIndex[i] = index, index += lines[i].length + /* "\n".length */ 1; return lineToIndex; } function findLowerIndexInRangeArray(value, arr) { if (value >= arr[arr.length - 1]) return arr.length - 1; for (var min = 0, max = arr.length - 2, mid; min < max; ) if (mid = min + (max - min >> 1), value < arr[mid]) max = mid - 1; else if (value >= arr[mid + 1]) min = mid + 1; else { min = mid; break; } return min; } } }); // ../../node_modules/.pnpm/@shopify+theme-check-common@3.19.0/node_modules/@shopify/theme-check-common/dist/utils/position.js var require_position = __commonJS({ "../../node_modules/.pnpm/@shopify+theme-check-common@3.19.0/node_modules/@shopify/theme-check-common/dist/utils/position.js"(exports2) { "use strict"; init_cjs_shims(); var __importDefault = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { default: mod }; }; Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.getOffset = exports2.getPosition = void 0; var line_column_1 = __importDefault(require_line_column()); function getPosition(source, index) { let lineCol = (0, line_column_1.default)(source, { origin: 0 }).fromIndex(Math.min(index, source.length - 1)); return { index, line: lineCol ? lineCol.line : -1, character: lineCol ? lineCol.col : -1 }; } exports2.getPosition = getPosition; function getOffset(source, line, column) { return (0, line_column_1.default)(source, { origin: 1 }).toIndex(line, column); } exports2.getOffset = getOffset; } }); // ../../node_modules/.pnpm/@shopify+theme-check-common@3.19.0/node_modules/@shopify/theme-check-common/dist/utils/error.js var require_error = __commonJS({ "../../node_modules/.pnpm/@shopify+theme-check-common@3.19.0/node_modules/@shopify/theme-check-common/dist/utils/error.js"(exports2) { "use strict"; init_cjs_shims(); Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.asError = exports2.isError = void 0; var PARSE_ERROR_MESSAGES = { 1: "Invalid symbol found in the input.", 2: "Invalid number format detected.", 3: "Property name expected but not found.", 4: "A value was expected but not found.", 5: "Colon `:` expected after the property name.", 6: "Comma `,` expected between elements and properties.", 7: "Closing brace `}` expected.", 8: "Closing bracket `]` expected.", 9: "End of file expected.", 10: "Invalid comment token found.", 11: "Unexpected end of comment.", 12: "Unexpected end of string.", 13: "Unexpected end of number.", 14: "Invalid Unicode escape sequence.", 15: "Invalid escape character found.", 16: "Invalid character found in the input." }; function isError3(error) { return error instanceof Error; } exports2.isError = isError3; function asError(error) { return error instanceof Error ? error : typeof error == "string" ? new Error(error) : error && typeof error == "object" && "error" in error ? new Error(getParseErrorMessage(error)) : error && typeof error.toString == "function" ? new Error(error.toString()) : new Error("An unknown error occurred"); } exports2.asError = asError; function getParseErrorMessage(parseError) { return PARSE_ERROR_MESSAGES[parseError.error] || "Unknown parse error."; } } }); // ../../node_modules/.pnpm/@shopify+theme-check-common@3.19.0/node_modules/@shopify/theme-check-common/dist/utils/types.js var require_types = __commonJS({ "../../node_modules/.pnpm/@shopify+theme-check-common@3.19.0/node_modules/@shopify/theme-check-common/dist/utils/types.js"(exports2) { "use strict"; init_cjs_shims(); Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.assertNever = void 0; function assertNever(x) { throw new Error(`We should never reach this code, you are missing a case for ${x}`); } exports2.assertNever = assertNever; } }); // ../../node_modules/.pnpm/@shopify+theme-check-common@3.19.0/node_modules/@shopify/theme-check-common/dist/utils/memo.js var require_memo = __commonJS({ "../../node_modules/.pnpm/@shopify+theme-check-common@3.19.0/node_modules/@shopify/theme-check-common/dist/utils/memo.js"(exports2) { "use strict"; init_cjs_shims(); Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.memoize = exports2.memo = void 0; var Unset = Symbol("Unset"); function memo(fn) { let cachedValue = Unset, memoedFunction = (...args) => (cachedValue === Unset && (cachedValue = fn(...args)), cachedValue); return memoedFunction.clearCache = () => { cachedValue = Unset; }, memoedFunction; } exports2.memo = memo; function memoize(fn, keyFn) { let cache3 = {}, memoedFunction = (...args) => { let key = keyFn(...args); return cache3[key] || (cache3[key] = fn(...args)), cache3[key]; }; return memoedFunction.force = (...args) => (memoedFunction.invalidate(...args), memoedFunction(...args)), memoedFunction.invalidate = (...args) => { let key = keyFn(...args); delete cache3[key]; }, memoedFunction.clearCache = () => { cache3 = {}; }, memoedFunction; } exports2.memoize = memoize; } }); // ../../node_modules/.pnpm/@shopify+theme-check-common@3.19.0/node_modules/@shopify/theme-check-common/dist/utils/indexBy.js var require_indexBy = __commonJS({ "../../node_modules/.pnpm/@shopify+theme-check-common@3.19.0/node_modules/@shopify/theme-check-common/dist/utils/indexBy.js"(exports2) { "use strict"; init_cjs_shims(); Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.indexBy = void 0; function indexBy(keyFn, collection) { let record = {}; for (let item of collection) record[keyFn(item)] = item; return record; } exports2.indexBy = indexBy; } }); // ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/umd/impl/scanner.js function createScanner(text, ignoreTrivia = !1) { let len = text.length, pos = 0, value = "", tokenOffset = 0, token = 16, lineNumber = 0, lineStartOffset = 0, tokenLineStartOffset = 0, prevTokenLineStartOffset = 0, scanError = 0; function scanHexDigits(count, exact) { let digits = 0, value2 = 0; for (; digits < count || !exact; ) { let ch = text.charCodeAt(pos); if (ch >= 48 && ch <= 57) value2 = value2 * 16 + ch - 48; else if (ch >= 65 && ch <= 70) value2 = value2 * 16 + ch - 65 + 10; else if (ch >= 97 && ch <= 102) value2 = value2 * 16 + ch - 97 + 10; else break; pos++, digits++; } return digits < count && (value2 = -1), value2; } function setPosition(newPosition) { pos = newPosition, value = "", tokenOffset = 0, token = 16, scanError = 0; } function scanNumber() { let start = pos; if (text.charCodeAt(pos) === 48) pos++; else for (pos++; pos < text.length && isDigit2(text.charCodeAt(pos)); ) pos++; if (pos < text.length && text.charCodeAt(pos) === 46) if (pos++, pos < text.length && isDigit2(text.charCodeAt(pos))) for (pos++; pos < text.length && isDigit2(text.charCodeAt(pos)); ) pos++; else return scanError = 3, text.substring(start, pos); let end = pos; if (pos < text.length && (text.charCodeAt(pos) === 69 || text.charCodeAt(pos) === 101)) if (pos++, (pos < text.length && text.charCodeAt(pos) === 43 || text.charCodeAt(pos) === 45) && pos++, pos < text.length && isDigit2(text.charCodeAt(pos))) { for (pos++; pos < text.length && isDigit2(text.charCodeAt(pos)); ) pos++; end = pos; } else scanError = 3; return text.substring(start, end); } function scanString() { let result = "", start = pos; for (; ; ) { if (pos >= len) { result += text.substring(start, pos), scanError = 2; break; } let ch = text.charCodeAt(pos); if (ch === 34) { result += text.substring(start, pos), pos++; break; } if (ch === 92) { if (result += text.substring(start, pos), pos++, pos >= len) { scanError = 2; break; } switch (text.charCodeAt(pos++)) { case 34: result += '"'; break; case 92: result += "\\"; break; case 47: result += "/"; break; case 98: result += "\b"; break; case 102: result += "\f"; break; case 110: result += ` `; break; case 114: result += "\r"; break; case 116: result += " "; break; case 117: let ch3 = scanHexDigits(4, !0); ch3 >= 0 ? result += String.fromCharCode(ch3) : scanError = 4; break; default: scanError = 5; } start = pos; continue; } if (ch >= 0 && ch <= 31) if (isLineBreak(ch)) { result += text.substring(start, pos), scanError = 2; break; } else scanError = 6; pos++; } return result; } function scanNext() { if (value = "", scanError = 0, tokenOffset = pos, lineStartOffset = lineNumber, prevTokenLineStartOffset = tokenLineStartOffset, pos >= len) return tokenOffset = len, token = 17; let code = text.charCodeAt(pos); if (isWhiteSpace(code)) { do pos++, value += String.fromCharCode(code), code = text.charCodeAt(pos); while (isWhiteSpace(code)); return token = 15; } if (isLineBreak(code)) return pos++, value += String.fromCharCode(code), code === 13 && text.charCodeAt(pos) === 10 && (pos++, value += ` `), lineNumber++, tokenLineStartOffset = pos, token = 14; switch (code) { // tokens: []{}:, case 123: return pos++, token = 1; case 125: return pos++, token = 2; case 91: return pos++, token = 3; case 93: return pos++, token = 4; case 58: return pos++, token = 6; case 44: return pos++, token = 5; // strings case 34: return pos++, value = scanString(), token = 10; // comments case 47: let start = pos - 1; if (text.charCodeAt(pos + 1) === 47) { for (pos += 2; pos < len && !isLineBreak(text.charCodeAt(pos)); ) pos++; return value = text.substring(start, pos), token = 12; } if (text.charCodeAt(pos + 1) === 42) { pos += 2; let safeLength = len - 1, commentClosed = !1; for (; pos < safeLength; ) { let ch = text.charCodeAt(pos); if (ch === 42 && text.charCodeAt(pos + 1) === 47) { pos += 2, commentClosed = !0; break; } pos++, isLineBreak(ch) && (ch === 13 && text.charCodeAt(pos) === 10 && pos++, lineNumber++, tokenLineStartOffset = pos); } return commentClosed || (pos++, scanError = 1), value = text.substring(start, pos), token = 13; } return value += String.fromCharCode(code), pos++, token = 16; // numbers case 45: if (value += String.fromCharCode(code), pos++, pos === len || !isDigit2(text.charCodeAt(pos))) return token = 16; // found a minus, followed by a number so // we fall through to proceed with scanning // numbers case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: return value += scanNumber(), token = 11; // literals and unknown symbols default: for (; pos < len && isUnknownContentCharacter(code); ) pos++, code = text.charCodeAt(pos); if (tokenOffset !== pos) { switch (value = text.substring(tokenOffset, pos), value) { case "true": return token = 8; case "false": return token = 9; case "null": return token = 7; } return token = 16; } return value += String.fromCharCode(code), pos++, token = 16; } } function isUnknownContentCharacter(code) { if (isWhiteSpace(code) || isLineBreak(code)) return !1; switch (code) { case 125: case 93: case 123: case 91: case 34: c