@shopify/create-app 3.58.2 → 3.59.1

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.
Files changed (82) hide show
  1. package/dist/chunk-3JLUTHGR.js +114 -0
  2. package/dist/chunk-3JNB3A7C.js +14080 -0
  3. package/dist/chunk-6IZ3YCE6.js +144 -0
  4. package/dist/chunk-7XQTD3L4.js +213522 -0
  5. package/dist/chunk-DJYDRQPG.js +30996 -0
  6. package/dist/chunk-DY2DAXN2.js +104 -0
  7. package/dist/chunk-F6KQQF76.js +7817 -0
  8. package/dist/chunk-FBB6KUZG.js +821 -0
  9. package/dist/chunk-G6FN5VUE.js +102 -0
  10. package/dist/chunk-GXPKATXW.js +194 -0
  11. package/dist/chunk-HCBGYFVF.js +99 -0
  12. package/dist/chunk-IL6UMTVA.js +62 -0
  13. package/dist/chunk-LKGDG6WW.js +87 -0
  14. package/dist/chunk-M63RTPGR.js +63 -0
  15. package/dist/chunk-OFS45IA7.js +2468 -0
  16. package/dist/chunk-P4TVG45N.js +900 -0
  17. package/dist/chunk-SSNXQGVF.js +11 -0
  18. package/dist/chunk-TDBGZYDD.js +45349 -0
  19. package/dist/chunk-TMGCRPEZ.js +4283 -0
  20. package/dist/chunk-UVY6LL5H.js +145 -0
  21. package/dist/chunk-VJ2TN2CW.js +72 -0
  22. package/dist/chunk-WCNR75S2.js +73 -0
  23. package/dist/chunk-WETZUTXU.js +18914 -0
  24. package/dist/chunk-WK5TEOA2.js +37 -0
  25. package/dist/chunk-X4SHWSZZ.js +3179 -0
  26. package/dist/chunk-YJIQMGQH.js +13764 -0
  27. package/dist/chunk-YLEF4RUH.js +144 -0
  28. package/dist/chunk-ZPB26OWQ.js +5605 -0
  29. package/dist/commands/init.js +31 -123
  30. package/dist/commands/init.test.js +123 -0
  31. package/dist/constants-K3R4N3N3.js +19 -0
  32. package/dist/custom-oclif-loader-2S5LB2FS.js +83 -0
  33. package/dist/del-A5YM6R3Y.js +2846 -0
  34. package/dist/devtools-KQM4GF6J.js +3685 -0
  35. package/dist/error-handler-N3GIE2DS.js +34 -0
  36. package/dist/hooks/postrun.js +108 -2
  37. package/dist/hooks/prerun.js +77 -2
  38. package/dist/index.js +22 -7
  39. package/dist/lib-76JUGQYQ.js +8 -0
  40. package/dist/local-NYXQXMB7.js +59 -0
  41. package/dist/magic-string.es-6WMSFIAX.js +1291 -0
  42. package/dist/multipart-parser-O2BQODS2.js +359 -0
  43. package/dist/node-package-manager-3J3VEQCR.js +68 -0
  44. package/dist/open-B7XFJJCK.js +290 -0
  45. package/dist/out-JZ52TJE3.js +5 -0
  46. package/dist/path-HO4HBKK5.js +28 -0
  47. package/dist/prompts/init.js +23 -118
  48. package/dist/prompts/init.test.js +115 -0
  49. package/dist/services/init.js +25 -139
  50. package/dist/services/init.test.js +18 -0
  51. package/dist/system-5VPAJEUM.js +25 -0
  52. package/dist/ui-D34IKHO6.js +49 -0
  53. package/dist/utils/template/cleanup.js +18 -19
  54. package/dist/utils/template/cleanup.test.js +74 -0
  55. package/dist/utils/template/npm.js +22 -58
  56. package/dist/utils/template/npm.test.js +153 -0
  57. package/dist/yoga.wasm +0 -0
  58. package/oclif.manifest.json +1 -1
  59. package/package.json +5 -6
  60. package/dist/commands/init.d.ts +0 -20
  61. package/dist/commands/init.js.map +0 -1
  62. package/dist/constants.d.ts +0 -1
  63. package/dist/constants.js +0 -2
  64. package/dist/constants.js.map +0 -1
  65. package/dist/hooks/postrun.d.ts +0 -1
  66. package/dist/hooks/postrun.js.map +0 -1
  67. package/dist/hooks/prerun.d.ts +0 -1
  68. package/dist/hooks/prerun.js.map +0 -1
  69. package/dist/index.d.ts +0 -2
  70. package/dist/index.js.map +0 -1
  71. package/dist/prompts/init.d.ts +0 -39
  72. package/dist/prompts/init.js.map +0 -1
  73. package/dist/services/init.d.ts +0 -9
  74. package/dist/services/init.js.map +0 -1
  75. package/dist/tsconfig.tsbuildinfo +0 -1
  76. package/dist/utils/template/cleanup.d.ts +0 -1
  77. package/dist/utils/template/cleanup.js.map +0 -1
  78. package/dist/utils/template/npm.d.ts +0 -12
  79. package/dist/utils/template/npm.js.map +0 -1
  80. package/dist/utils/versions.d.ts +0 -1
  81. package/dist/utils/versions.js +0 -21
  82. package/dist/utils/versions.js.map +0 -1
@@ -0,0 +1,102 @@
1
+ import {
2
+ basename,
3
+ dirname,
4
+ extname,
5
+ isAbsolute,
6
+ join,
7
+ normalize,
8
+ relative,
9
+ resolve
10
+ } from "./chunk-GXPKATXW.js";
11
+ import {
12
+ __commonJS,
13
+ __require,
14
+ __toESM,
15
+ init_cjs_shims
16
+ } from "./chunk-M63RTPGR.js";
17
+
18
+ // ../../node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js
19
+ var require_commondir = __commonJS({
20
+ "../../node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js"(exports, module) {
21
+ init_cjs_shims();
22
+ var path = __require("path");
23
+ module.exports = function(basedir, relfiles) {
24
+ if (relfiles) {
25
+ var files = relfiles.map(function(r) {
26
+ return path.resolve(basedir, r);
27
+ });
28
+ } else {
29
+ var files = basedir;
30
+ }
31
+ var res = files.slice(1).reduce(function(ps, file) {
32
+ if (!file.match(/^([A-Za-z]:)?\/|\\/)) {
33
+ throw new Error("relative path without a basedir");
34
+ }
35
+ var xs = file.split(/\/+|\\+/);
36
+ for (var i = 0; ps[i] === xs[i] && i < Math.min(ps.length, xs.length); i++)
37
+ ;
38
+ return ps.slice(0, i);
39
+ }, files[0].split(/\/+|\\+/));
40
+ return res.length > 1 ? res.join("/") : "/";
41
+ };
42
+ }
43
+ });
44
+
45
+ // ../cli-kit/src/public/node/path.ts
46
+ init_cjs_shims();
47
+ var import_commondir = __toESM(require_commondir(), 1);
48
+ import { fileURLToPath } from "url";
49
+ function joinPath(...paths) {
50
+ return join(...paths);
51
+ }
52
+ function normalizePath(path) {
53
+ return normalize(path);
54
+ }
55
+ function resolvePath(...paths) {
56
+ return resolve(...paths);
57
+ }
58
+ function relativePath(from, to) {
59
+ return relative(from, to);
60
+ }
61
+ function isAbsolutePath(path) {
62
+ return isAbsolute(path);
63
+ }
64
+ function dirname2(path) {
65
+ return dirname(path);
66
+ }
67
+ function basename2(path, ext) {
68
+ return basename(path, ext);
69
+ }
70
+ function extname2(path) {
71
+ return extname(path);
72
+ }
73
+ function relativizePath(path, dir = cwd()) {
74
+ const result = (0, import_commondir.default)([path, dir]);
75
+ const relativePath2 = relative(dir, path);
76
+ const relativeComponents = relativePath2.split("/").filter((component) => component === "..").length;
77
+ if (result === "/" || relativePath2 === "" || relativeComponents > 2) {
78
+ return path;
79
+ } else {
80
+ return relativePath2;
81
+ }
82
+ }
83
+ function moduleDirectory(moduleURL) {
84
+ return dirname2(fileURLToPath(moduleURL));
85
+ }
86
+ function cwd() {
87
+ return normalize(process.env.INIT_CWD ? process.env.INIT_CWD : process.cwd());
88
+ }
89
+
90
+ export {
91
+ joinPath,
92
+ normalizePath,
93
+ resolvePath,
94
+ relativePath,
95
+ isAbsolutePath,
96
+ dirname2 as dirname,
97
+ basename2 as basename,
98
+ extname2 as extname,
99
+ relativizePath,
100
+ moduleDirectory,
101
+ cwd
102
+ };
@@ -0,0 +1,194 @@
1
+ import {
2
+ init_cjs_shims
3
+ } from "./chunk-M63RTPGR.js";
4
+
5
+ // ../../node_modules/.pnpm/pathe@1.1.1/node_modules/pathe/dist/shared/pathe.92c04245.mjs
6
+ init_cjs_shims();
7
+ function normalizeWindowsPath(input = "") {
8
+ if (!input || !input.includes("\\")) {
9
+ return input;
10
+ }
11
+ return input.replace(/\\/g, "/");
12
+ }
13
+ var _UNC_REGEX = /^[/\\]{2}/;
14
+ var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
15
+ var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
16
+ var normalize = function(path2) {
17
+ if (path2.length === 0) {
18
+ return ".";
19
+ }
20
+ path2 = normalizeWindowsPath(path2);
21
+ const isUNCPath = path2.match(_UNC_REGEX);
22
+ const isPathAbsolute = isAbsolute(path2);
23
+ const trailingSeparator = path2[path2.length - 1] === "/";
24
+ path2 = normalizeString(path2, !isPathAbsolute);
25
+ if (path2.length === 0) {
26
+ if (isPathAbsolute) {
27
+ return "/";
28
+ }
29
+ return trailingSeparator ? "./" : ".";
30
+ }
31
+ if (trailingSeparator) {
32
+ path2 += "/";
33
+ }
34
+ if (_DRIVE_LETTER_RE.test(path2)) {
35
+ path2 += "/";
36
+ }
37
+ if (isUNCPath) {
38
+ if (!isPathAbsolute) {
39
+ return `//./${path2}`;
40
+ }
41
+ return `//${path2}`;
42
+ }
43
+ return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
44
+ };
45
+ var join = function(...arguments_) {
46
+ if (arguments_.length === 0) {
47
+ return ".";
48
+ }
49
+ let joined;
50
+ for (const argument of arguments_) {
51
+ if (argument && argument.length > 0) {
52
+ if (joined === void 0) {
53
+ joined = argument;
54
+ } else {
55
+ joined += `/${argument}`;
56
+ }
57
+ }
58
+ }
59
+ if (joined === void 0) {
60
+ return ".";
61
+ }
62
+ return normalize(joined.replace(/\/\/+/g, "/"));
63
+ };
64
+ function cwd() {
65
+ if (typeof process !== "undefined") {
66
+ return process.cwd().replace(/\\/g, "/");
67
+ }
68
+ return "/";
69
+ }
70
+ var resolve = function(...arguments_) {
71
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
72
+ let resolvedPath = "";
73
+ let resolvedAbsolute = false;
74
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
75
+ const path2 = index >= 0 ? arguments_[index] : cwd();
76
+ if (!path2 || path2.length === 0) {
77
+ continue;
78
+ }
79
+ resolvedPath = `${path2}/${resolvedPath}`;
80
+ resolvedAbsolute = isAbsolute(path2);
81
+ }
82
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
83
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
84
+ return `/${resolvedPath}`;
85
+ }
86
+ return resolvedPath.length > 0 ? resolvedPath : ".";
87
+ };
88
+ function normalizeString(path2, allowAboveRoot) {
89
+ let res = "";
90
+ let lastSegmentLength = 0;
91
+ let lastSlash = -1;
92
+ let dots = 0;
93
+ let char = null;
94
+ for (let index = 0; index <= path2.length; ++index) {
95
+ if (index < path2.length) {
96
+ char = path2[index];
97
+ } else if (char === "/") {
98
+ break;
99
+ } else {
100
+ char = "/";
101
+ }
102
+ if (char === "/") {
103
+ if (lastSlash === index - 1 || dots === 1)
104
+ ;
105
+ else if (dots === 2) {
106
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
107
+ if (res.length > 2) {
108
+ const lastSlashIndex = res.lastIndexOf("/");
109
+ if (lastSlashIndex === -1) {
110
+ res = "";
111
+ lastSegmentLength = 0;
112
+ } else {
113
+ res = res.slice(0, lastSlashIndex);
114
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
115
+ }
116
+ lastSlash = index;
117
+ dots = 0;
118
+ continue;
119
+ } else if (res.length > 0) {
120
+ res = "";
121
+ lastSegmentLength = 0;
122
+ lastSlash = index;
123
+ dots = 0;
124
+ continue;
125
+ }
126
+ }
127
+ if (allowAboveRoot) {
128
+ res += res.length > 0 ? "/.." : "..";
129
+ lastSegmentLength = 2;
130
+ }
131
+ } else {
132
+ if (res.length > 0) {
133
+ res += `/${path2.slice(lastSlash + 1, index)}`;
134
+ } else {
135
+ res = path2.slice(lastSlash + 1, index);
136
+ }
137
+ lastSegmentLength = index - lastSlash - 1;
138
+ }
139
+ lastSlash = index;
140
+ dots = 0;
141
+ } else if (char === "." && dots !== -1) {
142
+ ++dots;
143
+ } else {
144
+ dots = -1;
145
+ }
146
+ }
147
+ return res;
148
+ }
149
+ var isAbsolute = function(p) {
150
+ return _IS_ABSOLUTE_RE.test(p);
151
+ };
152
+ var _EXTNAME_RE = /.(\.[^./]+)$/;
153
+ var extname = function(p) {
154
+ const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
155
+ return match && match[1] || "";
156
+ };
157
+ var relative = function(from, to) {
158
+ const _from = resolve(from).split("/");
159
+ const _to = resolve(to).split("/");
160
+ const _fromCopy = [..._from];
161
+ for (const segment of _fromCopy) {
162
+ if (_to[0] !== segment) {
163
+ break;
164
+ }
165
+ _from.shift();
166
+ _to.shift();
167
+ }
168
+ return [..._from.map(() => ".."), ..._to].join("/");
169
+ };
170
+ var dirname = function(p) {
171
+ const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
172
+ if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
173
+ segments[0] += "/";
174
+ }
175
+ return segments.join("/") || (isAbsolute(p) ? "/" : ".");
176
+ };
177
+ var basename = function(p, extension) {
178
+ const lastSegment = normalizeWindowsPath(p).split("/").pop();
179
+ return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
180
+ };
181
+
182
+ // ../../node_modules/.pnpm/pathe@1.1.1/node_modules/pathe/dist/index.mjs
183
+ init_cjs_shims();
184
+
185
+ export {
186
+ normalize,
187
+ join,
188
+ resolve,
189
+ isAbsolute,
190
+ extname,
191
+ relative,
192
+ dirname,
193
+ basename
194
+ };
@@ -0,0 +1,99 @@
1
+ import {
2
+ platformAndArch
3
+ } from "./chunk-VJ2TN2CW.js";
4
+ import {
5
+ getPackageManager,
6
+ packageManagerFromUserAgent
7
+ } from "./chunk-YJIQMGQH.js";
8
+ import {
9
+ addPublicMetadata,
10
+ addSensitiveMetadata,
11
+ ciPlatform,
12
+ cloudEnvironment,
13
+ currentProcessIsGlobal,
14
+ macAddress
15
+ } from "./chunk-TDBGZYDD.js";
16
+ import {
17
+ cwd
18
+ } from "./chunk-G6FN5VUE.js";
19
+ import {
20
+ init_cjs_shims
21
+ } from "./chunk-M63RTPGR.js";
22
+
23
+ // ../cli-kit/src/private/node/analytics.ts
24
+ init_cjs_shims();
25
+
26
+ // ../cli-kit/src/public/node/crypto.ts
27
+ init_cjs_shims();
28
+ import crypto from "crypto";
29
+ function hashString(str) {
30
+ return crypto.createHash("sha1").update(str).digest("hex");
31
+ }
32
+
33
+ // ../cli-kit/src/private/node/analytics.ts
34
+ async function startAnalytics({
35
+ commandContent,
36
+ args,
37
+ currentTime = (/* @__PURE__ */ new Date()).getTime(),
38
+ commandClass
39
+ }) {
40
+ let startCommand = commandContent.command;
41
+ if (commandClass && Object.prototype.hasOwnProperty.call(commandClass, "analyticsNameOverride")) {
42
+ startCommand = commandClass.analyticsNameOverride() ?? commandContent.command;
43
+ }
44
+ await addSensitiveMetadata(() => ({
45
+ commandStartOptions: {
46
+ startTime: currentTime,
47
+ startCommand,
48
+ startArgs: args
49
+ }
50
+ }));
51
+ await addPublicMetadata(() => ({
52
+ cmd_all_launcher: packageManagerFromUserAgent(),
53
+ cmd_all_alias_used: commandContent.alias,
54
+ cmd_all_topic: commandContent.topic,
55
+ cmd_all_plugin: commandClass?.plugin?.name,
56
+ cmd_all_force: flagIncluded("force", commandClass) ? args.includes("--force") : void 0
57
+ }));
58
+ }
59
+ async function getEnvironmentData(config) {
60
+ const ciplatform = ciPlatform();
61
+ const pluginNames = getPluginNames(config);
62
+ const shopifyPlugins = pluginNames.filter((plugin) => plugin.startsWith("@shopify/"));
63
+ const { platform, arch } = platformAndArch();
64
+ return {
65
+ uname: `${platform} ${arch}`,
66
+ env_ci: ciplatform.isCI,
67
+ env_ci_platform: ciplatform.name,
68
+ env_plugin_installed_any_custom: pluginNames.length !== shopifyPlugins.length,
69
+ env_plugin_installed_shopify: JSON.stringify(shopifyPlugins),
70
+ env_shell: config.shell,
71
+ env_web_ide: cloudEnvironment().editor ? cloudEnvironment().platform : void 0,
72
+ env_device_id: hashString(await macAddress()),
73
+ env_cloud: cloudEnvironment().platform,
74
+ env_package_manager: await getPackageManager(cwd()),
75
+ env_is_global: currentProcessIsGlobal()
76
+ };
77
+ }
78
+ async function getSensitiveEnvironmentData(config) {
79
+ return {
80
+ env_plugin_installed_all: JSON.stringify(getPluginNames(config))
81
+ };
82
+ }
83
+ function getPluginNames(config) {
84
+ const pluginNames = [...config.plugins.keys()];
85
+ return pluginNames.sort().filter((plugin) => !plugin.startsWith("@oclif/"));
86
+ }
87
+ function flagIncluded(flag, commandClass) {
88
+ if (!commandClass)
89
+ return false;
90
+ const commandFlags = commandClass.flags ?? {};
91
+ return Object.keys(commandFlags).includes(flag);
92
+ }
93
+
94
+ export {
95
+ hashString,
96
+ startAnalytics,
97
+ getEnvironmentData,
98
+ getSensitiveEnvironmentData
99
+ };
@@ -0,0 +1,62 @@
1
+ import {
2
+ CLI_KIT_VERSION
3
+ } from "./chunk-SSNXQGVF.js";
4
+ import {
5
+ installNodeModules
6
+ } from "./chunk-YJIQMGQH.js";
7
+ import {
8
+ findPathUp
9
+ } from "./chunk-TDBGZYDD.js";
10
+ import {
11
+ moduleDirectory,
12
+ normalizePath
13
+ } from "./chunk-G6FN5VUE.js";
14
+ import {
15
+ init_cjs_shims
16
+ } from "./chunk-M63RTPGR.js";
17
+
18
+ // src/utils/template/npm.ts
19
+ init_cjs_shims();
20
+ import { platform } from "os";
21
+ async function updateCLIDependencies({
22
+ packageJSON,
23
+ local,
24
+ useGlobalCLI
25
+ }) {
26
+ packageJSON.dependencies = packageJSON.dependencies || {};
27
+ if (useGlobalCLI) {
28
+ delete packageJSON.dependencies["@shopify/cli"];
29
+ } else {
30
+ packageJSON.dependencies["@shopify/cli"] = CLI_KIT_VERSION;
31
+ }
32
+ delete packageJSON.dependencies["@shopify/app"];
33
+ if (local) {
34
+ const cliPath = await packagePath("cli");
35
+ packageJSON.dependencies["@shopify/cli"] = cliPath;
36
+ const dependencyOverrides = {
37
+ "@shopify/cli": cliPath
38
+ };
39
+ packageJSON.overrides = packageJSON.overrides ? { ...packageJSON.overrides, ...dependencyOverrides } : dependencyOverrides;
40
+ packageJSON.resolutions = packageJSON.resolutions ? { ...packageJSON.resolutions, ...dependencyOverrides } : dependencyOverrides;
41
+ }
42
+ return packageJSON;
43
+ }
44
+ async function packagePath(packageName) {
45
+ const packageAbsolutePath = await findPathUp(`packages/${packageName}`, {
46
+ type: "directory",
47
+ cwd: moduleDirectory(import.meta.url)
48
+ });
49
+ return `file:${packageAbsolutePath}`;
50
+ }
51
+ async function getDeepInstallNPMTasks({
52
+ from,
53
+ packageManager
54
+ }) {
55
+ const args = platform() === "win32" && packageManager === "yarn" ? ["--network-concurrency", "1"] : [];
56
+ return installNodeModules({ directory: normalizePath(from), packageManager, args });
57
+ }
58
+
59
+ export {
60
+ updateCLIDependencies,
61
+ getDeepInstallNPMTasks
62
+ };
@@ -0,0 +1,87 @@
1
+ import {
2
+ __commonJS,
3
+ init_cjs_shims
4
+ } from "./chunk-M63RTPGR.js";
5
+
6
+ // ../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js
7
+ var require_wrappy = __commonJS({
8
+ "../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js"(exports, module) {
9
+ init_cjs_shims();
10
+ module.exports = wrappy;
11
+ function wrappy(fn, cb) {
12
+ if (fn && cb)
13
+ return wrappy(fn)(cb);
14
+ if (typeof fn !== "function")
15
+ throw new TypeError("need wrapper function");
16
+ Object.keys(fn).forEach(function(k) {
17
+ wrapper[k] = fn[k];
18
+ });
19
+ return wrapper;
20
+ function wrapper() {
21
+ var args = new Array(arguments.length);
22
+ for (var i = 0; i < args.length; i++) {
23
+ args[i] = arguments[i];
24
+ }
25
+ var ret = fn.apply(this, args);
26
+ var cb2 = args[args.length - 1];
27
+ if (typeof ret === "function" && ret !== cb2) {
28
+ Object.keys(cb2).forEach(function(k) {
29
+ ret[k] = cb2[k];
30
+ });
31
+ }
32
+ return ret;
33
+ }
34
+ }
35
+ }
36
+ });
37
+
38
+ // ../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js
39
+ var require_once = __commonJS({
40
+ "../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js"(exports, module) {
41
+ init_cjs_shims();
42
+ var wrappy = require_wrappy();
43
+ module.exports = wrappy(once);
44
+ module.exports.strict = wrappy(onceStrict);
45
+ once.proto = once(function() {
46
+ Object.defineProperty(Function.prototype, "once", {
47
+ value: function() {
48
+ return once(this);
49
+ },
50
+ configurable: true
51
+ });
52
+ Object.defineProperty(Function.prototype, "onceStrict", {
53
+ value: function() {
54
+ return onceStrict(this);
55
+ },
56
+ configurable: true
57
+ });
58
+ });
59
+ function once(fn) {
60
+ var f = function() {
61
+ if (f.called)
62
+ return f.value;
63
+ f.called = true;
64
+ return f.value = fn.apply(this, arguments);
65
+ };
66
+ f.called = false;
67
+ return f;
68
+ }
69
+ function onceStrict(fn) {
70
+ var f = function() {
71
+ if (f.called)
72
+ throw new Error(f.onceError);
73
+ f.called = true;
74
+ return f.value = fn.apply(this, arguments);
75
+ };
76
+ var name = fn.name || "Function wrapped with `once`";
77
+ f.onceError = name + " shouldn't be called more than once";
78
+ f.called = false;
79
+ return f;
80
+ }
81
+ }
82
+ });
83
+
84
+ export {
85
+ require_wrappy,
86
+ require_once
87
+ };
@@ -0,0 +1,63 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
+ }) : x)(function(x) {
10
+ if (typeof require !== "undefined")
11
+ return require.apply(this, arguments);
12
+ throw Error('Dynamic require of "' + x + '" is not supported');
13
+ });
14
+ var __esm = (fn, res) => function __init() {
15
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
16
+ };
17
+ var __commonJS = (cb, mod) => function __require2() {
18
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
19
+ };
20
+ var __export = (target, all) => {
21
+ for (var name in all)
22
+ __defProp(target, name, { get: all[name], enumerable: true });
23
+ };
24
+ var __copyProps = (to, from, except, desc) => {
25
+ if (from && typeof from === "object" || typeof from === "function") {
26
+ for (let key of __getOwnPropNames(from))
27
+ if (!__hasOwnProp.call(to, key) && key !== except)
28
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
29
+ }
30
+ return to;
31
+ };
32
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
33
+ // If the importer is in node compatibility mode or this is not an ESM
34
+ // file that has been converted to a CommonJS file using a Babel-
35
+ // compatible transform (i.e. "__esModule" has not been set), then set
36
+ // "default" to the CommonJS "module.exports" for node compatibility.
37
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
38
+ mod
39
+ ));
40
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
41
+
42
+ // ../../bin/bundling/cjs-shims.js
43
+ import { createRequire } from "node:module";
44
+ import path from "node:path";
45
+ import url from "node:url";
46
+ var init_cjs_shims = __esm({
47
+ "../../bin/bundling/cjs-shims.js"() {
48
+ "use strict";
49
+ globalThis.require = createRequire(import.meta.url);
50
+ globalThis.__filename = url.fileURLToPath(import.meta.url);
51
+ globalThis.__dirname = path.dirname(__filename);
52
+ }
53
+ });
54
+
55
+ export {
56
+ __require,
57
+ __esm,
58
+ __commonJS,
59
+ __export,
60
+ __toESM,
61
+ __toCommonJS,
62
+ init_cjs_shims
63
+ };