react-scripts-intlayer 6.1.6-canary.0 → 7.0.0-canary.2

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/cjs/_virtual/rolldown_runtime.cjs +35 -0
  2. package/dist/cjs/cli/react-scripts-intlayer.cjs +34 -59
  3. package/dist/cjs/cli/react-scripts-intlayer.cjs.map +1 -1
  4. package/dist/cjs/craco.config.cjs +13 -10
  5. package/dist/cjs/craco.config.cjs.map +1 -1
  6. package/dist/cjs/index.cjs +11 -24
  7. package/dist/cjs/index.cjs.map +1 -1
  8. package/dist/cjs/intlayerCracoPlugin.cjs +70 -94
  9. package/dist/cjs/intlayerCracoPlugin.cjs.map +1 -1
  10. package/dist/cjs/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/index.cjs +36 -0
  11. package/dist/cjs/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/index.cjs.map +1 -0
  12. package/dist/cjs/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.cjs +49 -0
  13. package/dist/cjs/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.cjs.map +1 -0
  14. package/dist/cjs/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.cjs +74 -0
  15. package/dist/cjs/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.cjs.map +1 -0
  16. package/dist/cjs/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.cjs +30 -0
  17. package/dist/cjs/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.cjs.map +1 -0
  18. package/dist/cjs/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.cjs +29 -0
  19. package/dist/cjs/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.cjs.map +1 -0
  20. package/dist/cjs/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.cjs +43 -0
  21. package/dist/cjs/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.cjs.map +1 -0
  22. package/dist/cjs/node_modules/.bun/isexe@2.0.0/node_modules/isexe/index.cjs +54 -0
  23. package/dist/cjs/node_modules/.bun/isexe@2.0.0/node_modules/isexe/index.cjs.map +1 -0
  24. package/dist/cjs/node_modules/.bun/isexe@2.0.0/node_modules/isexe/mode.cjs +40 -0
  25. package/dist/cjs/node_modules/.bun/isexe@2.0.0/node_modules/isexe/mode.cjs.map +1 -0
  26. package/dist/cjs/node_modules/.bun/isexe@2.0.0/node_modules/isexe/windows.cjs +40 -0
  27. package/dist/cjs/node_modules/.bun/isexe@2.0.0/node_modules/isexe/windows.cjs.map +1 -0
  28. package/dist/cjs/node_modules/.bun/path-key@3.1.1/node_modules/path-key/index.cjs +21 -0
  29. package/dist/cjs/node_modules/.bun/path-key@3.1.1/node_modules/path-key/index.cjs.map +1 -0
  30. package/dist/cjs/node_modules/.bun/shebang-command@2.0.0/node_modules/shebang-command/index.cjs +24 -0
  31. package/dist/cjs/node_modules/.bun/shebang-command@2.0.0/node_modules/shebang-command/index.cjs.map +1 -0
  32. package/dist/cjs/node_modules/.bun/shebang-regex@3.0.0/node_modules/shebang-regex/index.cjs +15 -0
  33. package/dist/cjs/node_modules/.bun/shebang-regex@3.0.0/node_modules/shebang-regex/index.cjs.map +1 -0
  34. package/dist/cjs/node_modules/.bun/which@2.0.2/node_modules/which/which.cjs +83 -0
  35. package/dist/cjs/node_modules/.bun/which@2.0.2/node_modules/which/which.cjs.map +1 -0
  36. package/dist/esm/_virtual/rolldown_runtime.mjs +35 -0
  37. package/dist/esm/cli/react-scripts-intlayer.mjs +32 -35
  38. package/dist/esm/cli/react-scripts-intlayer.mjs.map +1 -1
  39. package/dist/esm/craco.config.mjs +13 -16
  40. package/dist/esm/craco.config.mjs.map +1 -1
  41. package/dist/esm/index.mjs +9 -2
  42. package/dist/esm/index.mjs.map +1 -1
  43. package/dist/esm/intlayerCracoPlugin.mjs +61 -70
  44. package/dist/esm/intlayerCracoPlugin.mjs.map +1 -1
  45. package/dist/esm/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/index.mjs +33 -0
  46. package/dist/esm/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/index.mjs.map +1 -0
  47. package/dist/esm/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.mjs +46 -0
  48. package/dist/esm/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.mjs.map +1 -0
  49. package/dist/esm/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.mjs +71 -0
  50. package/dist/esm/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.mjs.map +1 -0
  51. package/dist/esm/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.mjs +27 -0
  52. package/dist/esm/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.mjs.map +1 -0
  53. package/dist/esm/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.mjs +26 -0
  54. package/dist/esm/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.mjs.map +1 -0
  55. package/dist/esm/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.mjs +40 -0
  56. package/dist/esm/node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.mjs.map +1 -0
  57. package/dist/esm/node_modules/.bun/isexe@2.0.0/node_modules/isexe/index.mjs +51 -0
  58. package/dist/esm/node_modules/.bun/isexe@2.0.0/node_modules/isexe/index.mjs.map +1 -0
  59. package/dist/esm/node_modules/.bun/isexe@2.0.0/node_modules/isexe/mode.mjs +37 -0
  60. package/dist/esm/node_modules/.bun/isexe@2.0.0/node_modules/isexe/mode.mjs.map +1 -0
  61. package/dist/esm/node_modules/.bun/isexe@2.0.0/node_modules/isexe/windows.mjs +37 -0
  62. package/dist/esm/node_modules/.bun/isexe@2.0.0/node_modules/isexe/windows.mjs.map +1 -0
  63. package/dist/esm/node_modules/.bun/path-key@3.1.1/node_modules/path-key/index.mjs +18 -0
  64. package/dist/esm/node_modules/.bun/path-key@3.1.1/node_modules/path-key/index.mjs.map +1 -0
  65. package/dist/esm/node_modules/.bun/shebang-command@2.0.0/node_modules/shebang-command/index.mjs +21 -0
  66. package/dist/esm/node_modules/.bun/shebang-command@2.0.0/node_modules/shebang-command/index.mjs.map +1 -0
  67. package/dist/esm/node_modules/.bun/shebang-regex@3.0.0/node_modules/shebang-regex/index.mjs +12 -0
  68. package/dist/esm/node_modules/.bun/shebang-regex@3.0.0/node_modules/shebang-regex/index.mjs.map +1 -0
  69. package/dist/esm/node_modules/.bun/which@2.0.2/node_modules/which/which.mjs +80 -0
  70. package/dist/esm/node_modules/.bun/which@2.0.2/node_modules/which/which.mjs.map +1 -0
  71. package/dist/types/cli/react-scripts-intlayer.d.ts +1 -9
  72. package/dist/types/craco.config.d.ts +1 -2
  73. package/dist/types/index.d.ts +2 -3
  74. package/dist/types/intlayerCracoPlugin.d.ts +14 -5
  75. package/dist/types/intlayerCracoPlugin.d.ts.map +1 -1
  76. package/package.json +38 -44
  77. package/LICENSE +0 -202
  78. package/dist/esm/chunk-ZD7AOCMD.mjs +0 -9
  79. package/dist/esm/chunk-ZD7AOCMD.mjs.map +0 -1
  80. package/dist/types/cli/react-scripts-intlayer.d.ts.map +0 -1
  81. package/dist/types/craco.config.d.ts.map +0 -1
  82. package/dist/types/index.d.ts.map +0 -1
@@ -0,0 +1,35 @@
1
+ //#region rolldown:runtime
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esm = (fn, res) => function() {
9
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
+ };
11
+ var __commonJS = (cb, mod) => function() {
12
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
16
+ key = keys[i];
17
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
+ get: ((k) => from[k]).bind(null, key),
19
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
+ });
21
+ }
22
+ return to;
23
+ };
24
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: true
28
+ }) : target, mod));
29
+
30
+ //#endregion
31
+
32
+ exports.__commonJS = __commonJS;
33
+ exports.__esm = __esm;
34
+ exports.__reExport = __reExport;
35
+ exports.__toESM = __toESM;
@@ -1,73 +1,48 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
- // If the importer is in node compatibility mode or this is not an ESM
19
- // file that has been converted to a CommonJS file using a Babel-
20
- // compatible transform (i.e. "__esModule" has not been set), then set
21
- // "default" to the CommonJS "module.exports" for node compatibility.
22
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
- mod
24
- ));
25
- var import_config = require("@intlayer/config");
26
- var import_cross_spawn = __toESM(require("cross-spawn"));
2
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
3
+ const require_index = require('../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/index.cjs');
4
+ let __intlayer_config = require("@intlayer/config");
5
+ __intlayer_config = require_rolldown_runtime.__toESM(__intlayer_config);
6
+
7
+ //#region src/cli/react-scripts-intlayer.ts
8
+ var import_cross_spawn = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_index.require_cross_spawn());
27
9
  const args = process.argv.slice(2);
28
- const scriptIndex = args.findIndex(
29
- (x) => x === "build" || x === "start" || x === "test"
30
- );
10
+ const scriptIndex = args.findIndex((x) => x === "build" || x === "start" || x === "test");
31
11
  const script = scriptIndex === -1 ? args[0] : args[scriptIndex];
32
12
  switch (script) {
33
- case "build":
34
- case "start":
35
- case "test": {
36
- const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : [];
37
- const scriptPath = import_config.ESMxCJSRequire.resolve(
38
- `@craco/craco/dist/scripts/${script}`
39
- );
40
- const scriptArgs = args.slice(scriptIndex + 1);
41
- const processArgs = nodeArgs.concat(scriptPath).concat([
42
- ...scriptArgs,
43
- "--config",
44
- "./node_modules/react-scripts-intlayer/dist/cjs/craco.config.cjs"
45
- ]);
46
- const child = import_cross_spawn.default.sync("node", processArgs, {
47
- stdio: "inherit"
48
- });
49
- if (child.signal) {
50
- if (child.signal === "SIGKILL") {
51
- (0, import_config.logger)(`
13
+ case "build":
14
+ case "start":
15
+ case "test": {
16
+ const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : [];
17
+ const scriptPath = __intlayer_config.ESMxCJSRequire.resolve(`@craco/craco/dist/scripts/${script}`);
18
+ const scriptArgs = args.slice(scriptIndex + 1);
19
+ const processArgs = nodeArgs.concat(scriptPath).concat([
20
+ ...scriptArgs,
21
+ "--config",
22
+ "./node_modules/react-scripts-intlayer/dist/cjs/craco.config.cjs"
23
+ ]);
24
+ const child = import_cross_spawn.default.sync("node", processArgs, { stdio: "inherit" });
25
+ if (child.signal) {
26
+ if (child.signal === "SIGKILL") (0, __intlayer_config.logger)(`
52
27
  The build failed because the process exited too early.
53
28
  This probably means the system ran out of memory or someone called
54
29
  \`kill -9\` on the process.
55
30
  `);
56
- } else if (child.signal === "SIGTERM") {
57
- (0, import_config.logger)(`
31
+ else if (child.signal === "SIGTERM") (0, __intlayer_config.logger)(`
58
32
  The build failed because the process exited too early.
59
33
  Someone might have called \`kill\` or \`killall\`, or the system could
60
34
  be shutting down.
61
35
  `);
62
- }
63
- process.exit(1);
64
- }
65
- process.exit(child.status ?? void 0);
66
- break;
67
- }
68
- default:
69
- (0, import_config.logger)(`Unknown script "${script}".`);
70
- (0, import_config.logger)("Perhaps you need to update craco?");
71
- break;
36
+ process.exit(1);
37
+ }
38
+ process.exit(child.status ?? void 0);
39
+ break;
40
+ }
41
+ default:
42
+ (0, __intlayer_config.logger)(`Unknown script "${script}".`);
43
+ (0, __intlayer_config.logger)("Perhaps you need to update craco?");
44
+ break;
72
45
  }
46
+
47
+ //#endregion
73
48
  //# sourceMappingURL=react-scripts-intlayer.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/cli/react-scripts-intlayer.ts"],"sourcesContent":["#!/usr/bin/env node\n\n/**\n * To make the setup easier, we are using craco to override the webpack configuration.\n * This script is used to run the craco scripts with the custom configuration.\n *\n * The script is based on the original craco script from create-react-app.\n */\n\nimport { ESMxCJSRequire, logger } from '@intlayer/config';\nimport spawn from 'cross-spawn';\n\nconst args = process.argv.slice(2);\nconst scriptIndex = args.findIndex(\n (x) => x === 'build' || x === 'start' || x === 'test'\n);\nconst script = scriptIndex === -1 ? args[0] : args[scriptIndex];\n\nswitch (script) {\n case 'build':\n case 'start':\n case 'test': {\n const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : [];\n const scriptPath = ESMxCJSRequire.resolve(\n `@craco/craco/dist/scripts/${script}`\n );\n\n const scriptArgs = args.slice(scriptIndex + 1);\n const processArgs = nodeArgs\n .concat(scriptPath)\n .concat([\n ...scriptArgs,\n '--config',\n './node_modules/react-scripts-intlayer/dist/cjs/craco.config.cjs',\n ]);\n\n const child = spawn.sync('node', processArgs, {\n stdio: 'inherit',\n });\n\n if (child.signal) {\n if (child.signal === 'SIGKILL') {\n logger(`\n The build failed because the process exited too early.\n This probably means the system ran out of memory or someone called\n \\`kill -9\\` on the process.\n `);\n } else if (child.signal === 'SIGTERM') {\n logger(`\n The build failed because the process exited too early.\n Someone might have called \\`kill\\` or \\`killall\\`, or the system could\n be shutting down.\n `);\n }\n\n process.exit(1);\n }\n\n process.exit(child.status ?? undefined);\n break;\n }\n default:\n logger(`Unknown script \"${script}\".`);\n logger('Perhaps you need to update craco?');\n break;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AASA,oBAAuC;AACvC,yBAAkB;AAElB,MAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;AACjC,MAAM,cAAc,KAAK;AAAA,EACvB,CAAC,MAAM,MAAM,WAAW,MAAM,WAAW,MAAM;AACjD;AACA,MAAM,SAAS,gBAAgB,KAAK,KAAK,CAAC,IAAI,KAAK,WAAW;AAE9D,QAAQ,QAAQ;AAAA,EACd,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK,QAAQ;AACX,UAAM,WAAW,cAAc,IAAI,KAAK,MAAM,GAAG,WAAW,IAAI,CAAC;AACjE,UAAM,aAAa,6BAAe;AAAA,MAChC,6BAA6B,MAAM;AAAA,IACrC;AAEA,UAAM,aAAa,KAAK,MAAM,cAAc,CAAC;AAC7C,UAAM,cAAc,SACjB,OAAO,UAAU,EACjB,OAAO;AAAA,MACN,GAAG;AAAA,MACH;AAAA,MACA;AAAA,IACF,CAAC;AAEH,UAAM,QAAQ,mBAAAA,QAAM,KAAK,QAAQ,aAAa;AAAA,MAC5C,OAAO;AAAA,IACT,CAAC;AAED,QAAI,MAAM,QAAQ;AAChB,UAAI,MAAM,WAAW,WAAW;AAC9B,kCAAO;AAAA;AAAA;AAAA;AAAA,aAIF;AAAA,MACP,WAAW,MAAM,WAAW,WAAW;AACrC,kCAAO;AAAA;AAAA;AAAA;AAAA,aAIF;AAAA,MACP;AAEA,cAAQ,KAAK,CAAC;AAAA,IAChB;AAEA,YAAQ,KAAK,MAAM,UAAU,MAAS;AACtC;AAAA,EACF;AAAA,EACA;AACE,8BAAO,mBAAmB,MAAM,IAAI;AACpC,8BAAO,mCAAmC;AAC1C;AACJ;","names":["spawn"]}
1
+ {"version":3,"file":"react-scripts-intlayer.cjs","names":["ESMxCJSRequire","spawn"],"sources":["../../../src/cli/react-scripts-intlayer.ts"],"sourcesContent":["#!/usr/bin/env node\n\n/**\n * To make the setup easier, we are using craco to override the webpack configuration.\n * This script is used to run the craco scripts with the custom configuration.\n *\n * The script is based on the original craco script from create-react-app.\n */\n\nimport { ESMxCJSRequire, logger } from '@intlayer/config';\nimport spawn from 'cross-spawn';\n\nconst args = process.argv.slice(2);\nconst scriptIndex = args.findIndex(\n (x) => x === 'build' || x === 'start' || x === 'test'\n);\nconst script = scriptIndex === -1 ? args[0] : args[scriptIndex];\n\nswitch (script) {\n case 'build':\n case 'start':\n case 'test': {\n const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : [];\n const scriptPath = ESMxCJSRequire.resolve(\n `@craco/craco/dist/scripts/${script}`\n );\n\n const scriptArgs = args.slice(scriptIndex + 1);\n const processArgs = nodeArgs\n .concat(scriptPath)\n .concat([\n ...scriptArgs,\n '--config',\n './node_modules/react-scripts-intlayer/dist/cjs/craco.config.cjs',\n ]);\n\n const child = spawn.sync('node', processArgs, {\n stdio: 'inherit',\n });\n\n if (child.signal) {\n if (child.signal === 'SIGKILL') {\n logger(`\n The build failed because the process exited too early.\n This probably means the system ran out of memory or someone called\n \\`kill -9\\` on the process.\n `);\n } else if (child.signal === 'SIGTERM') {\n logger(`\n The build failed because the process exited too early.\n Someone might have called \\`kill\\` or \\`killall\\`, or the system could\n be shutting down.\n `);\n }\n\n process.exit(1);\n }\n\n process.exit(child.status ?? undefined);\n break;\n }\n default:\n logger(`Unknown script \"${script}\".`);\n logger('Perhaps you need to update craco?');\n break;\n}\n"],"mappings":";;;;;;;;AAYA,MAAM,OAAO,QAAQ,KAAK,MAAM,EAAE;AAClC,MAAM,cAAc,KAAK,WACtB,MAAM,MAAM,WAAW,MAAM,WAAW,MAAM,OAChD;AACD,MAAM,SAAS,gBAAgB,KAAK,KAAK,KAAK,KAAK;AAEnD,QAAQ,QAAR;CACE,KAAK;CACL,KAAK;CACL,KAAK,QAAQ;EACX,MAAM,WAAW,cAAc,IAAI,KAAK,MAAM,GAAG,YAAY,GAAG,EAAE;EAClE,MAAM,aAAaA,iCAAe,QAChC,6BAA6B,SAC9B;EAED,MAAM,aAAa,KAAK,MAAM,cAAc,EAAE;EAC9C,MAAM,cAAc,SACjB,OAAO,WAAW,CAClB,OAAO;GACN,GAAG;GACH;GACA;GACD,CAAC;EAEJ,MAAM,QAAQC,2BAAM,KAAK,QAAQ,aAAa,EAC5C,OAAO,WACR,CAAC;AAEF,MAAI,MAAM,QAAQ;AAChB,OAAI,MAAM,WAAW,UACnB,+BAAO;;;;cAID;YACG,MAAM,WAAW,UAC1B,+BAAO;;;;cAID;AAGR,WAAQ,KAAK,EAAE;;AAGjB,UAAQ,KAAK,MAAM,UAAU,OAAU;AACvC;;CAEF;AACE,gCAAO,mBAAmB,OAAO,IAAI;AACrC,gCAAO,oCAAoC;AAC3C"}
@@ -1,11 +1,14 @@
1
- "use strict";
2
- var import_intlayerCracoPlugin = require('./intlayerCracoPlugin.cjs');
3
- const cracoConfig = {
4
- plugins: [
5
- {
6
- plugin: import_intlayerCracoPlugin.intlayerCracoPlugin
7
- }
8
- ]
9
- };
10
- module.exports = cracoConfig;
1
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
+ const require_intlayerCracoPlugin = require('./intlayerCracoPlugin.cjs');
3
+
4
+ //#region src/craco.config.ts
5
+ var require_craco_config = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "src/craco.config.ts": ((exports, module) => {
6
+ require_intlayerCracoPlugin.init_intlayerCracoPlugin();
7
+ const cracoConfig = { plugins: [{ plugin: require_intlayerCracoPlugin.intlayerCracoPlugin }] };
8
+ module.exports = cracoConfig;
9
+ }) });
10
+
11
+ //#endregion
12
+ module.exports = require_craco_config();
13
+
11
14
  //# sourceMappingURL=craco.config.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/craco.config.ts"],"sourcesContent":["import type { CracoConfig } from '@craco/types';\nimport { intlayerCracoPlugin } from './intlayerCracoPlugin';\n\n// Usage Example\nconst cracoConfig = {\n plugins: [\n {\n plugin: intlayerCracoPlugin,\n },\n ],\n} satisfies CracoConfig;\n\n// Necessary Exporting as CJS for CRACO to work\nmodule.exports = cracoConfig;\n"],"mappings":";AACA,iCAAoC;AAGpC,MAAM,cAAc;AAAA,EAClB,SAAS;AAAA,IACP;AAAA,MACE,QAAQ;AAAA,IACV;AAAA,EACF;AACF;AAGA,OAAO,UAAU;","names":[]}
1
+ {"version":3,"file":"craco.config.cjs","names":["intlayerCracoPlugin"],"sources":["../../src/craco.config.ts"],"sourcesContent":["import type { CracoConfig } from '@craco/types';\nimport { intlayerCracoPlugin } from './intlayerCracoPlugin';\n\n// Usage Example\nconst cracoConfig = {\n plugins: [\n {\n plugin: intlayerCracoPlugin,\n },\n ],\n} satisfies CracoConfig;\n\n// Necessary Exporting as CJS for CRACO to work\nmodule.exports = cracoConfig;\n"],"mappings":";;;;;uDAC4D;CAG5D,MAAM,cAAc,EAClB,SAAS,CACP,EACE,QAAQA,iDACT,CACF,EACF;AAGD,QAAO,UAAU"}
@@ -1,25 +1,12 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
- var index_exports = {};
17
- module.exports = __toCommonJS(index_exports);
18
- __reExport(index_exports, require('./intlayerCracoPlugin.cjs'), module.exports);
19
- __reExport(index_exports, require('./craco.config.cjs'), module.exports);
20
- // Annotate the CommonJS export names for ESM import in node:
21
- 0 && (module.exports = {
22
- ...require('./intlayerCracoPlugin.cjs'),
23
- ...require('./craco.config.cjs')
24
- });
1
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
+ const require_intlayerCracoPlugin = require('./intlayerCracoPlugin.cjs');
3
+ const require_craco_config$1 = require('./craco.config.cjs');
4
+
5
+ //#region src/index.ts
6
+ init_intlayerCracoPlugin();
7
+
8
+ //#endregion
9
+ exports.intlayerCracoPlugin = require_intlayerCracoPlugin.intlayerCracoPlugin;
10
+ exports.overrideCracoConfig = require_intlayerCracoPlugin.overrideCracoConfig;
11
+ exports.overrideWebpackConfig = require_intlayerCracoPlugin.overrideWebpackConfig;
25
12
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './intlayerCracoPlugin';\nexport * from './craco.config';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,kCAAd;AACA,0BAAc,2BADd;","names":[]}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from './craco.config';\nexport * from './intlayerCracoPlugin';\n"],"mappings":""}
@@ -1,97 +1,73 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
1
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
+ let __intlayer_config = require("@intlayer/config");
3
+ __intlayer_config = require_rolldown_runtime.__toESM(__intlayer_config);
4
+ let __intlayer_webpack = require("@intlayer/webpack");
5
+ __intlayer_webpack = require_rolldown_runtime.__toESM(__intlayer_webpack);
6
+
7
+ //#region src/intlayerCracoPlugin.ts
8
+ var intlayerConfig, overrideWebpackConfig, overrideCracoConfig, intlayerCracoPlugin;
9
+ var init_intlayerCracoPlugin = require_rolldown_runtime.__esm({ "src/intlayerCracoPlugin.ts": (() => {
10
+ intlayerConfig = (0, __intlayer_config.getConfiguration)();
11
+ overrideWebpackConfig = ({ webpackConfig }) => {
12
+ webpackConfig.externals = {
13
+ ...typeof webpackConfig.externals === "object" ? webpackConfig.externals : {},
14
+ esbuild: "esbuild"
15
+ };
16
+ webpackConfig.externals.module = void 0;
17
+ webpackConfig.externals.fs = void 0;
18
+ webpackConfig.externals.path = void 0;
19
+ webpackConfig.externals.vm = void 0;
20
+ webpackConfig.module.rules.push({
21
+ test: /\.node$/,
22
+ use: "node-loader"
23
+ });
24
+ return webpackConfig;
25
+ };
26
+ overrideCracoConfig = ({ cracoConfig }) => {
27
+ return {
28
+ ...cracoConfig,
29
+ webpack: {
30
+ ...cracoConfig.webpack,
31
+ plugins: {
32
+ ...cracoConfig.webpack?.plugins,
33
+ add: [...cracoConfig.webpack?.plugins?.add ?? [], new __intlayer_webpack.IntlayerPlugin(intlayerConfig)]
34
+ },
35
+ configure: {
36
+ ...cracoConfig.webpack?.configure ?? {},
37
+ resolve: {
38
+ ...cracoConfig.webpack?.configure?.resolve ?? {},
39
+ fallback: {
40
+ ...cracoConfig.webpack?.configure?.resolve?.fallback ?? {},
41
+ process: __intlayer_config.ESMxCJSRequire.resolve("process/browser"),
42
+ fs: false,
43
+ module: false,
44
+ path: false,
45
+ vm: false
46
+ }
47
+ }
48
+ },
49
+ alias: {
50
+ ...cracoConfig.webpack?.alias,
51
+ ...(0, __intlayer_config.getAlias)({ configuration: intlayerConfig })
52
+ }
53
+ }
54
+ };
55
+ };
56
+ intlayerCracoPlugin = {
57
+ overrideCracoConfig,
58
+ overrideWebpackConfig
59
+ };
60
+ }) });
61
+
62
+ //#endregion
63
+ init_intlayerCracoPlugin();
64
+ Object.defineProperty(exports, 'init_intlayerCracoPlugin', {
65
+ enumerable: true,
66
+ get: function () {
67
+ return init_intlayerCracoPlugin;
15
68
  }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var intlayerCracoPlugin_exports = {};
20
- __export(intlayerCracoPlugin_exports, {
21
- intlayerCracoPlugin: () => intlayerCracoPlugin,
22
- overrideCracoConfig: () => overrideCracoConfig,
23
- overrideWebpackConfig: () => overrideWebpackConfig
24
- });
25
- module.exports = __toCommonJS(intlayerCracoPlugin_exports);
26
- var import_config = require("@intlayer/config");
27
- var import_webpack = require("@intlayer/webpack");
28
- const intlayerConfig = (0, import_config.getConfiguration)();
29
- const overrideWebpackConfig = ({
30
- webpackConfig
31
- }) => {
32
- webpackConfig.externals = {
33
- ...typeof webpackConfig.externals === "object" ? webpackConfig.externals : {},
34
- esbuild: "esbuild"
35
- // keep only esbuild external
36
- };
37
- delete webpackConfig.externals.module;
38
- delete webpackConfig.externals.fs;
39
- delete webpackConfig.externals.path;
40
- delete webpackConfig.externals.vm;
41
- webpackConfig.module.rules.push({
42
- test: /\.node$/,
43
- use: "node-loader"
44
- });
45
- return webpackConfig;
46
- };
47
- const overrideCracoConfig = ({
48
- cracoConfig
49
- }) => {
50
- return {
51
- ...cracoConfig,
52
- webpack: {
53
- ...cracoConfig.webpack,
54
- plugins: {
55
- ...cracoConfig.webpack?.plugins,
56
- // Ensure we actually add IntlayerWebpackPlugin
57
- add: [
58
- ...cracoConfig.webpack?.plugins?.add ?? [],
59
- new import_webpack.IntlayerPlugin()
60
- ]
61
- },
62
- configure: {
63
- ...cracoConfig.webpack?.configure ?? {},
64
- resolve: {
65
- ...cracoConfig.webpack?.configure?.resolve ?? {},
66
- // 3) Provide browser fallbacks so these modules won’t error out in the browser.
67
- fallback: {
68
- ...cracoConfig.webpack?.configure?.resolve?.fallback ?? {},
69
- process: import_config.ESMxCJSRequire.resolve("process/browser"),
70
- fs: false,
71
- module: false,
72
- path: false,
73
- vm: false
74
- }
75
- }
76
- },
77
- // 4) Alias @intlayer/dictionaries-entry so it no longer tries to use the ESM that depends on `fs`, etc.
78
- alias: {
79
- ...cracoConfig.webpack?.alias,
80
- ...(0, import_config.getAlias)({
81
- configuration: intlayerConfig
82
- })
83
- }
84
- }
85
- };
86
- };
87
- const intlayerCracoPlugin = {
88
- overrideCracoConfig,
89
- overrideWebpackConfig
90
- };
91
- // Annotate the CommonJS export names for ESM import in node:
92
- 0 && (module.exports = {
93
- intlayerCracoPlugin,
94
- overrideCracoConfig,
95
- overrideWebpackConfig
96
69
  });
70
+ exports.intlayerCracoPlugin = intlayerCracoPlugin;
71
+ exports.overrideCracoConfig = overrideCracoConfig;
72
+ exports.overrideWebpackConfig = overrideWebpackConfig;
97
73
  //# sourceMappingURL=intlayerCracoPlugin.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/intlayerCracoPlugin.ts"],"sourcesContent":["// craco-intlayer-plugin.ts\n\n// @ts-nocheck\n\nimport type {\n CracoConfig,\n CracoConfigOverride,\n CracoPlugin,\n WebpackConfigOverride,\n} from '@craco/types';\nimport { ESMxCJSRequire, getAlias, getConfiguration } from '@intlayer/config';\nimport { IntlayerPlugin as IntlayerWebpackPlugin } from '@intlayer/webpack';\nimport type { Configuration as WebpackConfig } from 'webpack';\n\n// Get Intlayer configuration\nconst intlayerConfig = getConfiguration();\n\n/**\n * Override the final CRA Webpack config.\n */\nexport const overrideWebpackConfig = ({\n webpackConfig,\n}: WebpackConfigOverride): WebpackConfig => {\n // 1) Remove `module`, `fs`, `path`, `vm` from externals. In CRA, you usually\n // want these to be bundled (or set to fallbacks).\n webpackConfig.externals = {\n ...(typeof webpackConfig.externals === 'object'\n ? webpackConfig.externals\n : {}),\n esbuild: 'esbuild', // keep only esbuild external\n };\n delete webpackConfig.externals.module;\n delete webpackConfig.externals.fs;\n delete webpackConfig.externals.path;\n delete webpackConfig.externals.vm;\n\n // 2) Properly push node-loader rule instead of overwriting.\n webpackConfig.module.rules.push({\n test: /\\.node$/,\n use: 'node-loader',\n });\n\n return webpackConfig;\n};\n\n/**\n * Override the CRACO config itself to set up aliases, fallbacks, and plugins.\n */\nexport const overrideCracoConfig = ({\n cracoConfig,\n}: CracoConfigOverride): CracoConfig => {\n return {\n ...cracoConfig,\n webpack: {\n ...cracoConfig.webpack,\n plugins: {\n ...cracoConfig.webpack?.plugins,\n // Ensure we actually add IntlayerWebpackPlugin\n add: [\n ...(cracoConfig.webpack?.plugins?.add ?? []),\n new IntlayerWebpackPlugin(),\n ],\n },\n configure: {\n ...(cracoConfig.webpack?.configure ?? {}),\n resolve: {\n ...(cracoConfig.webpack?.configure?.resolve ?? {}),\n // 3) Provide browser fallbacks so these modules won’t error out in the browser.\n fallback: {\n ...(cracoConfig.webpack?.configure?.resolve?.fallback ?? {}),\n process: ESMxCJSRequire.resolve('process/browser'),\n fs: false,\n module: false,\n path: false,\n vm: false,\n },\n },\n },\n // 4) Alias @intlayer/dictionaries-entry so it no longer tries to use the ESM that depends on `fs`, etc.\n alias: {\n ...cracoConfig.webpack?.alias,\n ...getAlias({\n configuration: intlayerConfig,\n }),\n },\n },\n };\n};\n\n/**\n * A CRACO plugin that adds the Intlayer configuration to the webpack configuration and sets the environment variables.\n *\n * Usage:\n *\n * ```ts\n * const cracoConfig: CracoConfig = {\n * plugins: [\n * {\n * plugin: intlayerCracoPlugin,\n * },\n * ],\n * };\n *\n * export default cracoConfig;\n * ```\n */\nexport const intlayerCracoPlugin: CracoPlugin = {\n overrideCracoConfig,\n overrideWebpackConfig,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,oBAA2D;AAC3D,qBAAwD;AAIxD,MAAM,qBAAiB,gCAAiB;AAKjC,MAAM,wBAAwB,CAAC;AAAA,EACpC;AACF,MAA4C;AAG1C,gBAAc,YAAY;AAAA,IACxB,GAAI,OAAO,cAAc,cAAc,WACnC,cAAc,YACd,CAAC;AAAA,IACL,SAAS;AAAA;AAAA,EACX;AACA,SAAO,cAAc,UAAU;AAC/B,SAAO,cAAc,UAAU;AAC/B,SAAO,cAAc,UAAU;AAC/B,SAAO,cAAc,UAAU;AAG/B,gBAAc,OAAO,MAAM,KAAK;AAAA,IAC9B,MAAM;AAAA,IACN,KAAK;AAAA,EACP,CAAC;AAED,SAAO;AACT;AAKO,MAAM,sBAAsB,CAAC;AAAA,EAClC;AACF,MAAwC;AACtC,SAAO;AAAA,IACL,GAAG;AAAA,IACH,SAAS;AAAA,MACP,GAAG,YAAY;AAAA,MACf,SAAS;AAAA,QACP,GAAG,YAAY,SAAS;AAAA;AAAA,QAExB,KAAK;AAAA,UACH,GAAI,YAAY,SAAS,SAAS,OAAO,CAAC;AAAA,UAC1C,IAAI,eAAAA,eAAsB;AAAA,QAC5B;AAAA,MACF;AAAA,MACA,WAAW;AAAA,QACT,GAAI,YAAY,SAAS,aAAa,CAAC;AAAA,QACvC,SAAS;AAAA,UACP,GAAI,YAAY,SAAS,WAAW,WAAW,CAAC;AAAA;AAAA,UAEhD,UAAU;AAAA,YACR,GAAI,YAAY,SAAS,WAAW,SAAS,YAAY,CAAC;AAAA,YAC1D,SAAS,6BAAe,QAAQ,iBAAiB;AAAA,YACjD,IAAI;AAAA,YACJ,QAAQ;AAAA,YACR,MAAM;AAAA,YACN,IAAI;AAAA,UACN;AAAA,QACF;AAAA,MACF;AAAA;AAAA,MAEA,OAAO;AAAA,QACL,GAAG,YAAY,SAAS;AAAA,QACxB,OAAG,wBAAS;AAAA,UACV,eAAe;AAAA,QACjB,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACF;AAmBO,MAAM,sBAAmC;AAAA,EAC9C;AAAA,EACA;AACF;","names":["IntlayerWebpackPlugin"]}
1
+ {"version":3,"file":"intlayerCracoPlugin.cjs","names":["IntlayerWebpackPlugin","ESMxCJSRequire","intlayerCracoPlugin: CracoPlugin"],"sources":["../../src/intlayerCracoPlugin.ts"],"sourcesContent":["// craco-intlayer-plugin.ts\n\n// @ts-nocheck\n\nimport type {\n CracoConfig,\n CracoConfigOverride,\n CracoPlugin,\n WebpackConfigOverride,\n} from '@craco/types';\nimport { ESMxCJSRequire, getAlias, getConfiguration } from '@intlayer/config';\nimport { IntlayerPlugin as IntlayerWebpackPlugin } from '@intlayer/webpack';\nimport type { Configuration as WebpackConfig } from 'webpack';\n\n// Get Intlayer configuration\nconst intlayerConfig = getConfiguration();\n\n/**\n * Override the final CRA Webpack config.\n */\nexport const overrideWebpackConfig = ({\n webpackConfig,\n}: WebpackConfigOverride): WebpackConfig => {\n // 1) Remove `module`, `fs`, `path`, `vm` from externals. In CRA, you usually\n // want these to be bundled (or set to fallbacks).\n webpackConfig.externals = {\n ...(typeof webpackConfig.externals === 'object'\n ? webpackConfig.externals\n : {}),\n esbuild: 'esbuild', // keep only esbuild external\n };\n webpackConfig.externals.module = undefined;\n webpackConfig.externals.fs = undefined;\n webpackConfig.externals.path = undefined;\n webpackConfig.externals.vm = undefined;\n\n // 2) Properly push node-loader rule instead of overwriting.\n webpackConfig.module.rules.push({\n test: /\\.node$/,\n use: 'node-loader',\n });\n\n return webpackConfig;\n};\n\n/**\n * Override the CRACO config itself to set up aliases, fallbacks, and plugins.\n */\nexport const overrideCracoConfig = ({\n cracoConfig,\n}: CracoConfigOverride): CracoConfig => {\n return {\n ...cracoConfig,\n webpack: {\n ...cracoConfig.webpack,\n plugins: {\n ...cracoConfig.webpack?.plugins,\n // Ensure we actually add IntlayerWebpackPlugin\n add: [\n ...(cracoConfig.webpack?.plugins?.add ?? []),\n new IntlayerWebpackPlugin(intlayerConfig),\n ],\n },\n configure: {\n ...(cracoConfig.webpack?.configure ?? {}),\n resolve: {\n ...(cracoConfig.webpack?.configure?.resolve ?? {}),\n // 3) Provide browser fallbacks so these modules won’t error out in the browser.\n fallback: {\n ...(cracoConfig.webpack?.configure?.resolve?.fallback ?? {}),\n process: ESMxCJSRequire.resolve('process/browser'),\n fs: false,\n module: false,\n path: false,\n vm: false,\n },\n },\n },\n // 4) Alias @intlayer/dictionaries-entry so it no longer tries to use the ESM that depends on `fs`, etc.\n alias: {\n ...cracoConfig.webpack?.alias,\n ...getAlias({\n configuration: intlayerConfig,\n }),\n },\n },\n };\n};\n\n/**\n * A CRACO plugin that adds the Intlayer configuration to the webpack configuration and sets the environment variables.\n *\n * Usage:\n *\n * ```ts\n * const cracoConfig: CracoConfig = {\n * plugins: [\n * {\n * plugin: intlayerCracoPlugin,\n * },\n * ],\n * };\n *\n * export default cracoConfig;\n * ```\n */\nexport const intlayerCracoPlugin: CracoPlugin = {\n overrideCracoConfig,\n overrideWebpackConfig,\n};\n"],"mappings":";;;;;;;;;CAeM,0DAAmC;CAK5B,yBAAyB,EACpC,oBAC0C;AAG1C,gBAAc,YAAY;GACxB,GAAI,OAAO,cAAc,cAAc,WACnC,cAAc,YACd,EAAE;GACN,SAAS;GACV;AACD,gBAAc,UAAU,SAAS;AACjC,gBAAc,UAAU,KAAK;AAC7B,gBAAc,UAAU,OAAO;AAC/B,gBAAc,UAAU,KAAK;AAG7B,gBAAc,OAAO,MAAM,KAAK;GAC9B,MAAM;GACN,KAAK;GACN,CAAC;AAEF,SAAO;;CAMI,uBAAuB,EAClC,kBACsC;AACtC,SAAO;GACL,GAAG;GACH,SAAS;IACP,GAAG,YAAY;IACf,SAAS;KACP,GAAG,YAAY,SAAS;KAExB,KAAK,CACH,GAAI,YAAY,SAAS,SAAS,OAAO,EAAE,EAC3C,IAAIA,kCAAsB,eAAe,CAC1C;KACF;IACD,WAAW;KACT,GAAI,YAAY,SAAS,aAAa,EAAE;KACxC,SAAS;MACP,GAAI,YAAY,SAAS,WAAW,WAAW,EAAE;MAEjD,UAAU;OACR,GAAI,YAAY,SAAS,WAAW,SAAS,YAAY,EAAE;OAC3D,SAASC,iCAAe,QAAQ,kBAAkB;OAClD,IAAI;OACJ,QAAQ;OACR,MAAM;OACN,IAAI;OACL;MACF;KACF;IAED,OAAO;KACL,GAAG,YAAY,SAAS;KACxB,mCAAY,EACV,eAAe,gBAChB,CAAC;KACH;IACF;GACF;;CAoBUC,sBAAmC;EAC9C;EACA;EACD"}
@@ -0,0 +1,36 @@
1
+ const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_parse$1 = require('./lib/parse.cjs');
3
+ const require_enoent$1 = require('./lib/enoent.cjs');
4
+
5
+ //#region ../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
6
+ var require_cross_spawn = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/index.js": ((exports, module) => {
7
+ const cp = require("child_process");
8
+ const parse = require_parse$1.require_parse();
9
+ const enoent = require_enoent$1.require_enoent();
10
+ function spawn(command, args, options) {
11
+ const parsed = parse(command, args, options);
12
+ const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
13
+ enoent.hookChildProcess(spawned, parsed);
14
+ return spawned;
15
+ }
16
+ function spawnSync(command, args, options) {
17
+ const parsed = parse(command, args, options);
18
+ const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
19
+ result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
20
+ return result;
21
+ }
22
+ module.exports = spawn;
23
+ module.exports.spawn = spawn;
24
+ module.exports.sync = spawnSync;
25
+ module.exports._parse = parse;
26
+ module.exports._enoent = enoent;
27
+ }) });
28
+
29
+ //#endregion
30
+ Object.defineProperty(exports, 'default', {
31
+ enumerable: true,
32
+ get: function () {
33
+ return require_cross_spawn();
34
+ }
35
+ });
36
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../../../../../../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"],"sourcesContent":["'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;CAEA,MAAM,KAAK,QAAQ,gBAAgB;CACnC,MAAM;CACN,MAAM;CAEN,SAAS,MAAM,SAAS,MAAM,SAAS;EAEnC,MAAM,SAAS,MAAM,SAAS,MAAM,QAAQ;EAG5C,MAAM,UAAU,GAAG,MAAM,OAAO,SAAS,OAAO,MAAM,OAAO,QAAQ;AAIrE,SAAO,iBAAiB,SAAS,OAAO;AAExC,SAAO;;CAGX,SAAS,UAAU,SAAS,MAAM,SAAS;EAEvC,MAAM,SAAS,MAAM,SAAS,MAAM,QAAQ;EAG5C,MAAM,SAAS,GAAG,UAAU,OAAO,SAAS,OAAO,MAAM,OAAO,QAAQ;AAGxE,SAAO,QAAQ,OAAO,SAAS,OAAO,iBAAiB,OAAO,QAAQ,OAAO;AAE7E,SAAO;;AAGX,QAAO,UAAU;AACjB,QAAO,QAAQ,QAAQ;AACvB,QAAO,QAAQ,OAAO;AAEtB,QAAO,QAAQ,SAAS;AACxB,QAAO,QAAQ,UAAU"}
@@ -0,0 +1,49 @@
1
+ const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.cjs');
2
+
3
+ //#region ../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
4
+ var require_enoent = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js": ((exports, module) => {
5
+ const isWin = process.platform === "win32";
6
+ function notFoundError(original, syscall) {
7
+ return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
8
+ code: "ENOENT",
9
+ errno: "ENOENT",
10
+ syscall: `${syscall} ${original.command}`,
11
+ path: original.command,
12
+ spawnargs: original.args
13
+ });
14
+ }
15
+ function hookChildProcess(cp, parsed) {
16
+ if (!isWin) return;
17
+ const originalEmit = cp.emit;
18
+ cp.emit = function(name, arg1) {
19
+ if (name === "exit") {
20
+ const err = verifyENOENT(arg1, parsed);
21
+ if (err) return originalEmit.call(cp, "error", err);
22
+ }
23
+ return originalEmit.apply(cp, arguments);
24
+ };
25
+ }
26
+ function verifyENOENT(status, parsed) {
27
+ if (isWin && status === 1 && !parsed.file) return notFoundError(parsed.original, "spawn");
28
+ return null;
29
+ }
30
+ function verifyENOENTSync(status, parsed) {
31
+ if (isWin && status === 1 && !parsed.file) return notFoundError(parsed.original, "spawnSync");
32
+ return null;
33
+ }
34
+ module.exports = {
35
+ hookChildProcess,
36
+ verifyENOENT,
37
+ verifyENOENTSync,
38
+ notFoundError
39
+ };
40
+ }) });
41
+
42
+ //#endregion
43
+ Object.defineProperty(exports, 'default', {
44
+ enumerable: true,
45
+ get: function () {
46
+ return require_enoent();
47
+ }
48
+ });
49
+ //# sourceMappingURL=enoent.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enoent.cjs","names":[],"sources":["../../../../../../../../../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"],"sourcesContent":["'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed);\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n"],"x_google_ignoreList":[0],"mappings":";;;;CAEA,MAAM,QAAQ,QAAQ,aAAa;CAEnC,SAAS,cAAc,UAAU,SAAS;AACtC,SAAO,OAAO,uBAAO,IAAI,MAAM,GAAG,QAAQ,GAAG,SAAS,QAAQ,SAAS,EAAE;GACrE,MAAM;GACN,OAAO;GACP,SAAS,GAAG,QAAQ,GAAG,SAAS;GAChC,MAAM,SAAS;GACf,WAAW,SAAS;GACvB,CAAC;;CAGN,SAAS,iBAAiB,IAAI,QAAQ;AAClC,MAAI,CAAC,MACD;EAGJ,MAAM,eAAe,GAAG;AAExB,KAAG,OAAO,SAAU,MAAM,MAAM;AAI5B,OAAI,SAAS,QAAQ;IACjB,MAAM,MAAM,aAAa,MAAM,OAAO;AAEtC,QAAI,IACA,QAAO,aAAa,KAAK,IAAI,SAAS,IAAI;;AAIlD,UAAO,aAAa,MAAM,IAAI,UAAU;;;CAIhD,SAAS,aAAa,QAAQ,QAAQ;AAClC,MAAI,SAAS,WAAW,KAAK,CAAC,OAAO,KACjC,QAAO,cAAc,OAAO,UAAU,QAAQ;AAGlD,SAAO;;CAGX,SAAS,iBAAiB,QAAQ,QAAQ;AACtC,MAAI,SAAS,WAAW,KAAK,CAAC,OAAO,KACjC,QAAO,cAAc,OAAO,UAAU,YAAY;AAGtD,SAAO;;AAGX,QAAO,UAAU;EACb;EACA;EACA;EACA;EACH"}
@@ -0,0 +1,74 @@
1
+ const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_resolveCommand$1 = require('./util/resolveCommand.cjs');
3
+ const require_escape$1 = require('./util/escape.cjs');
4
+ const require_readShebang$1 = require('./util/readShebang.cjs');
5
+
6
+ //#region ../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
7
+ var require_parse = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js": ((exports, module) => {
8
+ const path = require("path");
9
+ const resolveCommand = require_resolveCommand$1.require_resolveCommand();
10
+ const escape = require_escape$1.require_escape();
11
+ const readShebang = require_readShebang$1.require_readShebang();
12
+ const isWin = process.platform === "win32";
13
+ const isExecutableRegExp = /\.(?:com|exe)$/i;
14
+ const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
15
+ function detectShebang(parsed) {
16
+ parsed.file = resolveCommand(parsed);
17
+ const shebang = parsed.file && readShebang(parsed.file);
18
+ if (shebang) {
19
+ parsed.args.unshift(parsed.file);
20
+ parsed.command = shebang;
21
+ return resolveCommand(parsed);
22
+ }
23
+ return parsed.file;
24
+ }
25
+ function parseNonShell(parsed) {
26
+ if (!isWin) return parsed;
27
+ const commandFile = detectShebang(parsed);
28
+ const needsShell = !isExecutableRegExp.test(commandFile);
29
+ if (parsed.options.forceShell || needsShell) {
30
+ const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
31
+ parsed.command = path.normalize(parsed.command);
32
+ parsed.command = escape.command(parsed.command);
33
+ parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
34
+ parsed.args = [
35
+ "/d",
36
+ "/s",
37
+ "/c",
38
+ `"${[parsed.command].concat(parsed.args).join(" ")}"`
39
+ ];
40
+ parsed.command = process.env.comspec || "cmd.exe";
41
+ parsed.options.windowsVerbatimArguments = true;
42
+ }
43
+ return parsed;
44
+ }
45
+ function parse(command, args, options) {
46
+ if (args && !Array.isArray(args)) {
47
+ options = args;
48
+ args = null;
49
+ }
50
+ args = args ? args.slice(0) : [];
51
+ options = Object.assign({}, options);
52
+ const parsed = {
53
+ command,
54
+ args,
55
+ options,
56
+ file: void 0,
57
+ original: {
58
+ command,
59
+ args
60
+ }
61
+ };
62
+ return options.shell ? parsed : parseNonShell(parsed);
63
+ }
64
+ module.exports = parse;
65
+ }) });
66
+
67
+ //#endregion
68
+ Object.defineProperty(exports, 'default', {
69
+ enumerable: true,
70
+ get: function () {
71
+ return require_parse();
72
+ }
73
+ });
74
+ //# sourceMappingURL=parse.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse.cjs","names":[],"sources":["../../../../../../../../../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"],"sourcesContent":["'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;CAEA,MAAM,OAAO,QAAQ,OAAO;CAC5B,MAAM;CACN,MAAM;CACN,MAAM;CAEN,MAAM,QAAQ,QAAQ,aAAa;CACnC,MAAM,qBAAqB;CAC3B,MAAM,kBAAkB;CAExB,SAAS,cAAc,QAAQ;AAC3B,SAAO,OAAO,eAAe,OAAO;EAEpC,MAAM,UAAU,OAAO,QAAQ,YAAY,OAAO,KAAK;AAEvD,MAAI,SAAS;AACT,UAAO,KAAK,QAAQ,OAAO,KAAK;AAChC,UAAO,UAAU;AAEjB,UAAO,eAAe,OAAO;;AAGjC,SAAO,OAAO;;CAGlB,SAAS,cAAc,QAAQ;AAC3B,MAAI,CAAC,MACD,QAAO;EAIX,MAAM,cAAc,cAAc,OAAO;EAGzC,MAAM,aAAa,CAAC,mBAAmB,KAAK,YAAY;AAIxD,MAAI,OAAO,QAAQ,cAAc,YAAY;GAKzC,MAAM,6BAA6B,gBAAgB,KAAK,YAAY;AAIpE,UAAO,UAAU,KAAK,UAAU,OAAO,QAAQ;AAG/C,UAAO,UAAU,OAAO,QAAQ,OAAO,QAAQ;AAC/C,UAAO,OAAO,OAAO,KAAK,KAAK,QAAQ,OAAO,SAAS,KAAK,2BAA2B,CAAC;AAIxF,UAAO,OAAO;IAAC;IAAM;IAAM;IAAM,IAFZ,CAAC,OAAO,QAAQ,CAAC,OAAO,OAAO,KAAK,CAAC,KAAK,IAAI,CAEjB;IAAG;AACrD,UAAO,UAAU,QAAQ,IAAI,WAAW;AACxC,UAAO,QAAQ,2BAA2B;;AAG9C,SAAO;;CAGX,SAAS,MAAM,SAAS,MAAM,SAAS;AAEnC,MAAI,QAAQ,CAAC,MAAM,QAAQ,KAAK,EAAE;AAC9B,aAAU;AACV,UAAO;;AAGX,SAAO,OAAO,KAAK,MAAM,EAAE,GAAG,EAAE;AAChC,YAAU,OAAO,OAAO,EAAE,EAAE,QAAQ;EAGpC,MAAM,SAAS;GACX;GACA;GACA;GACA,MAAM;GACN,UAAU;IACN;IACA;IACH;GACJ;AAGD,SAAO,QAAQ,QAAQ,SAAS,cAAc,OAAO;;AAGzD,QAAO,UAAU"}