@powerlines/plugin-rspack 0.5.299 → 0.5.301

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 (114) hide show
  1. package/dist/core/src/lib/logger.mjs +40 -0
  2. package/dist/core/src/lib/logger.mjs.map +1 -0
  3. package/dist/core/src/lib/unplugin/helpers.mjs +19 -0
  4. package/dist/core/src/lib/unplugin/helpers.mjs.map +1 -0
  5. package/dist/core/src/lib/unplugin/index.mjs +5 -0
  6. package/dist/core/src/lib/unplugin/module-resolution.mjs +66 -0
  7. package/dist/core/src/lib/unplugin/module-resolution.mjs.map +1 -0
  8. package/dist/core/src/lib/unplugin/plugin.mjs +71 -0
  9. package/dist/core/src/lib/unplugin/plugin.mjs.map +1 -0
  10. package/dist/core/src/lib/utilities/source-file.mjs +22 -0
  11. package/dist/core/src/lib/utilities/source-file.mjs.map +1 -0
  12. package/dist/core/src/types/api.d.mts +103 -0
  13. package/dist/core/src/types/api.d.mts.map +1 -0
  14. package/dist/core/src/types/commands.d.mts +10 -0
  15. package/dist/core/src/types/commands.d.mts.map +1 -0
  16. package/dist/core/src/types/config.d.mts +551 -0
  17. package/dist/core/src/types/config.d.mts.map +1 -0
  18. package/dist/core/src/types/context.d.mts +511 -0
  19. package/dist/core/src/types/context.d.mts.map +1 -0
  20. package/dist/core/src/types/fs.d.mts +487 -0
  21. package/dist/core/src/types/fs.d.mts.map +1 -0
  22. package/dist/core/src/types/hooks.d.mts +99 -0
  23. package/dist/core/src/types/hooks.d.mts.map +1 -0
  24. package/dist/core/src/types/index.d.mts +9 -0
  25. package/dist/core/src/types/plugin.d.mts +204 -0
  26. package/dist/core/src/types/plugin.d.mts.map +1 -0
  27. package/dist/core/src/types/tsconfig.d.mts +70 -0
  28. package/dist/core/src/types/tsconfig.d.mts.map +1 -0
  29. package/dist/core/src/types/unplugin.d.mts +25 -0
  30. package/dist/core/src/types/unplugin.d.mts.map +1 -0
  31. package/dist/core/src/types/unplugin.mjs +22 -0
  32. package/dist/core/src/types/unplugin.mjs.map +1 -0
  33. package/dist/helpers/index.d.mts +2 -1
  34. package/dist/helpers/index.mjs +2 -1
  35. package/dist/helpers/resolve-options.d.mts +16 -0
  36. package/dist/helpers/resolve-options.d.mts.map +1 -0
  37. package/dist/helpers/resolve-options.mjs +37 -0
  38. package/dist/helpers/resolve-options.mjs.map +1 -0
  39. package/dist/helpers/unplugin.mjs +3 -2
  40. package/dist/helpers/unplugin.mjs.map +1 -1
  41. package/dist/index.d.mts +6 -3
  42. package/dist/index.d.mts.map +1 -1
  43. package/dist/index.mjs +3 -3
  44. package/dist/index.mjs.map +1 -1
  45. package/dist/types/build.d.mts +8 -0
  46. package/dist/types/build.d.mts.map +1 -0
  47. package/dist/types/build.mjs +1 -0
  48. package/dist/types/index.d.mts +3 -2
  49. package/dist/types/plugin.d.mts +13 -6
  50. package/dist/types/plugin.d.mts.map +1 -1
  51. package/package.json +27 -98
  52. package/dist/_virtual/rolldown_runtime.cjs +0 -31
  53. package/dist/_virtual/rolldown_runtime.mjs +0 -32
  54. package/dist/helpers/index.cjs +0 -3
  55. package/dist/helpers/index.d.cts +0 -2
  56. package/dist/helpers/unplugin.cjs +0 -11
  57. package/dist/helpers/unplugin.d.cts +0 -8
  58. package/dist/helpers/unplugin.d.cts.map +0 -1
  59. package/dist/index.cjs +0 -37
  60. package/dist/index.d.cts +0 -14
  61. package/dist/index.d.cts.map +0 -1
  62. package/dist/node_modules/.pnpm/@jridgewell_gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.cjs +0 -2
  63. package/dist/node_modules/.pnpm/@jridgewell_gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs +0 -4
  64. package/dist/node_modules/.pnpm/@jridgewell_remapping@2.3.5/node_modules/@jridgewell/remapping/dist/remapping.cjs +0 -2
  65. package/dist/node_modules/.pnpm/@jridgewell_remapping@2.3.5/node_modules/@jridgewell/remapping/dist/remapping.mjs +0 -4
  66. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.cjs +0 -15
  67. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +0 -16
  68. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +0 -1
  69. package/dist/node_modules/.pnpm/@jridgewell_trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.cjs +0 -1
  70. package/dist/node_modules/.pnpm/@jridgewell_trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs +0 -3
  71. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.cjs +0 -28
  72. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.mjs +0 -24
  73. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.mjs.map +0 -1
  74. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.cjs +0 -175
  75. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.mjs +0 -171
  76. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.mjs.map +0 -1
  77. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.cjs +0 -871
  78. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.mjs +0 -867
  79. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.mjs.map +0 -1
  80. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.cjs +0 -307
  81. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.mjs +0 -303
  82. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.mjs.map +0 -1
  83. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.cjs +0 -300
  84. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.mjs +0 -296
  85. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.mjs.map +0 -1
  86. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.cjs +0 -60
  87. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.mjs +0 -56
  88. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.mjs.map +0 -1
  89. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/context-CehLHpzV.cjs +0 -46
  90. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/context-CehLHpzV.mjs +0 -45
  91. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/context-CehLHpzV.mjs.map +0 -1
  92. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/index.cjs +0 -142
  93. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/index.mjs +0 -141
  94. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/index.mjs.map +0 -1
  95. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/parse-CRORloGP.cjs +0 -114
  96. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/parse-CRORloGP.mjs +0 -113
  97. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/parse-CRORloGP.mjs.map +0 -1
  98. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/utils-CuyC8gTr.cjs +0 -59
  99. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/utils-CuyC8gTr.mjs +0 -55
  100. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/utils-CuyC8gTr.mjs.map +0 -1
  101. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/webpack-like-BU9ULG6P.cjs +0 -35
  102. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/webpack-like-BU9ULG6P.mjs +0 -34
  103. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/webpack-like-BU9ULG6P.mjs.map +0 -1
  104. package/dist/node_modules/.pnpm/webpack-virtual-modules@0.6.2/node_modules/webpack-virtual-modules/lib/index.cjs +0 -236
  105. package/dist/node_modules/.pnpm/webpack-virtual-modules@0.6.2/node_modules/webpack-virtual-modules/lib/index.mjs +0 -232
  106. package/dist/node_modules/.pnpm/webpack-virtual-modules@0.6.2/node_modules/webpack-virtual-modules/lib/index.mjs.map +0 -1
  107. package/dist/node_modules/.pnpm/webpack-virtual-modules@0.6.2/node_modules/webpack-virtual-modules/lib/virtual-stats.cjs +0 -54
  108. package/dist/node_modules/.pnpm/webpack-virtual-modules@0.6.2/node_modules/webpack-virtual-modules/lib/virtual-stats.mjs +0 -50
  109. package/dist/node_modules/.pnpm/webpack-virtual-modules@0.6.2/node_modules/webpack-virtual-modules/lib/virtual-stats.mjs.map +0 -1
  110. package/dist/types/index.cjs +0 -0
  111. package/dist/types/index.d.cts +0 -2
  112. package/dist/types/plugin.cjs +0 -0
  113. package/dist/types/plugin.d.cts +0 -14
  114. package/dist/types/plugin.d.cts.map +0 -1
package/package.json CHANGED
@@ -1,18 +1,24 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-rspack",
3
- "version": "0.5.299",
4
- "type": "module",
3
+ "version": "0.5.301",
4
+ "private": false,
5
5
  "description": "A package containing a Powerlines plugin to build projects using Webpack.",
6
+ "keywords": ["rspack", "powerlines", "storm-software", "powerlines-plugin"],
7
+ "homepage": "https://stormsoftware.com",
8
+ "bugs": {
9
+ "url": "https://stormsoftware.com/support",
10
+ "email": "support@stormsoftware.com"
11
+ },
6
12
  "repository": {
7
13
  "type": "github",
8
14
  "url": "https://github.com/storm-software/powerlines.git",
9
15
  "directory": "packages/plugin-rspack"
10
16
  },
11
- "homepage": "https://stormsoftware.com",
12
- "bugs": {
13
- "url": "https://stormsoftware.com/support",
14
- "email": "support@stormsoftware.com"
17
+ "funding": {
18
+ "type": "github",
19
+ "url": "https://github.com/sponsors/storm-software"
15
20
  },
21
+ "license": "Apache-2.0",
16
22
  "author": {
17
23
  "name": "Storm Software",
18
24
  "email": "contact@stormsoftware.com",
@@ -32,105 +38,28 @@
32
38
  "url": "https://stormsoftware.com"
33
39
  }
34
40
  ],
35
- "funding": {
36
- "type": "github",
37
- "url": "https://github.com/sponsors/storm-software"
38
- },
39
- "license": "Apache-2.0",
40
- "private": false,
41
- "main": "./dist/index.cjs",
42
- "module": "./dist/index.mjs",
41
+ "type": "module",
43
42
  "exports": {
44
- ".": {
45
- "require": {
46
- "types": "./dist/index.d.cts",
47
- "default": "./dist/index.cjs"
48
- },
49
- "import": {
50
- "types": "./dist/index.d.mts",
51
- "default": "./dist/index.mjs"
52
- },
53
- "default": {
54
- "types": "./dist/index.d.mts",
55
- "default": "./dist/index.mjs"
56
- }
57
- },
58
- "./helpers": {
59
- "require": {
60
- "types": "./dist/helpers/index.d.cts",
61
- "default": "./dist/helpers/index.cjs"
62
- },
63
- "import": {
64
- "types": "./dist/helpers/index.d.mts",
65
- "default": "./dist/helpers/index.mjs"
66
- },
67
- "default": {
68
- "types": "./dist/helpers/index.d.mts",
69
- "default": "./dist/helpers/index.mjs"
70
- }
71
- },
72
- "./helpers/unplugin": {
73
- "require": {
74
- "types": "./dist/helpers/unplugin.d.cts",
75
- "default": "./dist/helpers/unplugin.cjs"
76
- },
77
- "import": {
78
- "types": "./dist/helpers/unplugin.d.mts",
79
- "default": "./dist/helpers/unplugin.mjs"
80
- },
81
- "default": {
82
- "types": "./dist/helpers/unplugin.d.mts",
83
- "default": "./dist/helpers/unplugin.mjs"
84
- }
85
- },
86
- "./package.json": "./package.json",
87
- "./types": {
88
- "require": {
89
- "types": "./dist/types/index.d.cts",
90
- "default": "./dist/types/index.cjs"
91
- },
92
- "import": {
93
- "types": "./dist/types/index.d.mts",
94
- "default": "./dist/types/index.mjs"
95
- },
96
- "default": {
97
- "types": "./dist/types/index.d.mts",
98
- "default": "./dist/types/index.mjs"
99
- }
100
- },
101
- "./types/plugin": {
102
- "require": {
103
- "types": "./dist/types/plugin.d.cts",
104
- "default": "./dist/types/plugin.cjs"
105
- },
106
- "import": {
107
- "types": "./dist/types/plugin.d.mts",
108
- "default": "./dist/types/plugin.mjs"
109
- },
110
- "default": {
111
- "types": "./dist/types/plugin.d.mts",
112
- "default": "./dist/types/plugin.mjs"
113
- }
114
- }
43
+ ".": "./dist/index.mjs",
44
+ "./helpers": "./dist/helpers/index.mjs",
45
+ "./helpers/resolve-options": "./dist/helpers/resolve-options.mjs",
46
+ "./helpers/unplugin": "./dist/helpers/unplugin.mjs",
47
+ "./types": "./dist/types/index.mjs",
48
+ "./types/build": "./dist/types/build.mjs",
49
+ "./types/plugin": "./dist/types/plugin.mjs",
50
+ "./*": "./*"
115
51
  },
52
+ "main": "./dist/index.mjs",
53
+ "module": "./dist/index.mjs",
54
+ "types": "./dist/index.d.mts",
116
55
  "typings": "dist/index.d.mts",
117
56
  "files": ["dist/**/*"],
118
- "keywords": ["rspack", "powerlines", "storm-software", "powerlines-plugin"],
119
57
  "dependencies": {
120
58
  "@rspack/core": "^1.7.6",
121
- "@stryke/fs": "^0.33.43",
122
59
  "@stryke/path": "^0.26.6",
123
- "@stryke/type-checks": "^0.5.25",
124
- "@stryke/types": "^0.10.39",
125
- "defu": "^6.1.4",
126
- "jiti": "^2.6.1",
127
- "powerlines": "^0.38.57"
128
- },
129
- "devDependencies": {
130
- "@powerlines/plugin-plugin": "^0.12.241",
131
- "@types/node": "^25.3.1"
60
+ "defu": "^6.1.4"
132
61
  },
62
+ "devDependencies": { "@types/node": "^25.3.3" },
133
63
  "publishConfig": { "access": "public" },
134
- "types": "./dist/index.d.cts",
135
- "gitHead": "eb3dbd19bd153aa5a988bce09a1cf05d985cb04b"
64
+ "gitHead": "30a096fed42d3462dbc028b16145250c373f3d99"
136
65
  }
@@ -1,31 +0,0 @@
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 __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
- key = keys[i];
13
- if (!__hasOwnProp.call(to, key) && key !== except) {
14
- __defProp(to, key, {
15
- get: ((k) => from[k]).bind(null, key),
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- }
19
- }
20
- }
21
- return to;
22
- };
23
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
24
- value: mod,
25
- enumerable: true
26
- }) : target, mod));
27
-
28
- //#endregion
29
-
30
- exports.__commonJSMin = __commonJSMin;
31
- exports.__toESM = __toESM;
@@ -1,32 +0,0 @@
1
- import { createRequire } from "node:module";
2
-
3
- //#region rolldown:runtime
4
- var __create = Object.create;
5
- var __defProp = Object.defineProperty;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
- var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getProtoOf = Object.getPrototypeOf;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
14
- key = keys[i];
15
- if (!__hasOwnProp.call(to, key) && key !== except) {
16
- __defProp(to, key, {
17
- get: ((k) => from[k]).bind(null, key),
18
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
- });
20
- }
21
- }
22
- }
23
- return to;
24
- };
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
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
30
-
31
- //#endregion
32
- export { __commonJSMin, __require, __toESM };
@@ -1,3 +0,0 @@
1
- const require_helpers_unplugin = require('./unplugin.cjs');
2
-
3
- exports.createRspackPlugin = require_helpers_unplugin.createRspackPlugin;
@@ -1,2 +0,0 @@
1
- import { createRspackPlugin } from "./unplugin.cjs";
2
- export { createRspackPlugin };
@@ -1,11 +0,0 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_index = require('../node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/index.cjs');
3
- let powerlines_lib_unplugin = require("powerlines/lib/unplugin");
4
-
5
- //#region src/helpers/unplugin.ts
6
- function createRspackPlugin(context) {
7
- return require_index.createRspackPlugin((0, powerlines_lib_unplugin.createUnplugin)(context))({});
8
- }
9
-
10
- //#endregion
11
- exports.createRspackPlugin = createRspackPlugin;
@@ -1,8 +0,0 @@
1
- import { RspackPluginContext } from "../types/plugin.cjs";
2
- import * as unplugin0 from "unplugin";
3
-
4
- //#region src/helpers/unplugin.d.ts
5
- declare function createRspackPlugin(context: RspackPluginContext): unplugin0.RspackPluginInstance;
6
- //#endregion
7
- export { createRspackPlugin };
8
- //# sourceMappingURL=unplugin.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unplugin.d.cts","names":[],"sources":["../../src/helpers/unplugin.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,kBAAA,UAA4B,sBAAmB,SAAA,CAAA"}
package/dist/index.cjs DELETED
@@ -1,37 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
3
- const require_helpers_unplugin = require('./helpers/unplugin.cjs');
4
- require('./helpers/index.cjs');
5
- let __rspack_core = require("@rspack/core");
6
- let defu = require("defu");
7
- defu = require_rolldown_runtime.__toESM(defu);
8
- let powerlines_lib_build_rspack = require("powerlines/lib/build/rspack");
9
-
10
- //#region src/index.ts
11
- /**
12
- * A Powerlines plugin to assist in developing other Powerlines plugins.
13
- */
14
- const plugin = (options = {}) => {
15
- return {
16
- name: "rspack",
17
- config() {
18
- this.debug("Providing default configuration for the Powerlines `rspack` build plugin.");
19
- return { build: {
20
- ...options,
21
- variant: "rspack"
22
- } };
23
- },
24
- async build() {
25
- (0, __rspack_core.rspack)((0, defu.default)({ entry: this.entry.reduce((ret, entry) => {
26
- ret[entry.output || entry.name || entry.file] = entry.file;
27
- return ret;
28
- }, {}) }, (0, powerlines_lib_build_rspack.extractRspackConfig)(this), { plugins: [require_helpers_unplugin.createRspackPlugin(this)] }));
29
- }
30
- };
31
- };
32
- var src_default = plugin;
33
-
34
- //#endregion
35
- exports.createRspackPlugin = require_helpers_unplugin.createRspackPlugin;
36
- exports.default = src_default;
37
- exports.plugin = plugin;
package/dist/index.d.cts DELETED
@@ -1,14 +0,0 @@
1
- import { RspackPluginContext, RspackPluginOptions, RspackPluginResolvedConfig, __ΩRspackPluginContext, __ΩRspackPluginOptions, __ΩRspackPluginResolvedConfig } from "./types/plugin.cjs";
2
- import { createRspackPlugin } from "./helpers/unplugin.cjs";
3
- import "./helpers/index.cjs";
4
- import "./types/index.cjs";
5
- import { Plugin } from "powerlines/types/plugin";
6
-
7
- //#region src/index.d.ts
8
- /**
9
- * A Powerlines plugin to assist in developing other Powerlines plugins.
10
- */
11
- declare const plugin: <TContext extends RspackPluginContext = RspackPluginContext>(options?: RspackPluginOptions) => Plugin<TContext>;
12
- //#endregion
13
- export { RspackPluginContext, RspackPluginOptions, RspackPluginResolvedConfig, __ΩRspackPluginContext, __ΩRspackPluginOptions, __ΩRspackPluginResolvedConfig, createRspackPlugin, plugin as default, plugin };
14
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAgCa,cAAA,MAwCZ,EAAA,CAAA,iBAvCkB,mBAuClB,GAvCwC,mBAuCxC,CAAA,CAAA,OAAA,CAAA,EArCU,mBAqCV,EAAA,GApCE,MAoCF,CApCS,QAoCT,CAAA"}
@@ -1,2 +0,0 @@
1
- require('../../../../../@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.cjs');
2
- require('../../../../../@jridgewell_trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.cjs');
@@ -1,4 +0,0 @@
1
- import "../../../../../@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs";
2
- import "../../../../../@jridgewell_trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs";
3
-
4
- export { };
@@ -1,2 +0,0 @@
1
- require('../../../../../@jridgewell_trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.cjs');
2
- require('../../../../../@jridgewell_gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.cjs');
@@ -1,4 +0,0 @@
1
- import "../../../../../@jridgewell_trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs";
2
- import "../../../../../@jridgewell_gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs";
3
-
4
- export { };
@@ -1,15 +0,0 @@
1
-
2
- //#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
3
- var comma = ",".charCodeAt(0);
4
- var semicolon = ";".charCodeAt(0);
5
- var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
6
- var intToChar = new Uint8Array(64);
7
- var charToInt = new Uint8Array(128);
8
- for (let i = 0; i < chars.length; i++) {
9
- const c = chars.charCodeAt(i);
10
- intToChar[i] = c;
11
- charToInt[c] = i;
12
- }
13
- var bufLength = 1024 * 16;
14
-
15
- //#endregion
@@ -1,16 +0,0 @@
1
- //#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
2
- var comma = ",".charCodeAt(0);
3
- var semicolon = ";".charCodeAt(0);
4
- var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
5
- var intToChar = new Uint8Array(64);
6
- var charToInt = new Uint8Array(128);
7
- for (let i = 0; i < chars.length; i++) {
8
- const c = chars.charCodeAt(i);
9
- intToChar[i] = c;
10
- charToInt[c] = i;
11
- }
12
- var bufLength = 1024 * 16;
13
-
14
- //#endregion
15
- export { };
16
- //# sourceMappingURL=sourcemap-codec.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sourcemap-codec.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs"],"sourcesContent":["// src/vlq.ts\nvar comma = \",\".charCodeAt(0);\nvar semicolon = \";\".charCodeAt(0);\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar intToChar = new Uint8Array(64);\nvar charToInt = new Uint8Array(128);\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\nfunction decodeInteger(reader, relative) {\n let value = 0;\n let shift = 0;\n let integer = 0;\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n const shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = -2147483648 | -value;\n }\n return relative + value;\n}\nfunction encodeInteger(builder, num, relative) {\n let delta = num - relative;\n delta = delta < 0 ? -delta << 1 | 1 : delta << 1;\n do {\n let clamped = delta & 31;\n delta >>>= 5;\n if (delta > 0) clamped |= 32;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n return num;\n}\nfunction hasMoreVlq(reader, max) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n\n// src/strings.ts\nvar bufLength = 1024 * 16;\nvar td = typeof TextDecoder !== \"undefined\" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== \"undefined\" ? {\n decode(buf) {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n }\n} : {\n decode(buf) {\n let out = \"\";\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n }\n};\nvar StringWriter = class {\n constructor() {\n this.pos = 0;\n this.out = \"\";\n this.buffer = new Uint8Array(bufLength);\n }\n write(v) {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n flush() {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n};\nvar StringReader = class {\n constructor(buffer) {\n this.pos = 0;\n this.buffer = buffer;\n }\n next() {\n return this.buffer.charCodeAt(this.pos++);\n }\n peek() {\n return this.buffer.charCodeAt(this.pos);\n }\n indexOf(char) {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n};\n\n// src/scopes.ts\nvar EMPTY = [];\nfunction decodeOriginalScopes(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes = [];\n const stack = [];\n let line = 0;\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop();\n last[2] = line;\n last[3] = column;\n continue;\n }\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 1;\n const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind];\n let vars = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n scopes.push(scope);\n stack.push(scope);\n }\n return scopes;\n}\nfunction encodeOriginalScopes(scopes) {\n const writer = new StringWriter();\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n return writer.flush();\n}\nfunction _encodeOriginalScopes(scopes, index, writer, state) {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n if (index > 0) writer.write(comma);\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n const fields = scope.length === 6 ? 1 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || l === endLine && c >= endColumn) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n return index;\n}\nfunction decodeGeneratedRanges(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges = [];\n const stack = [];\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n do {\n const semi = reader.indexOf(\";\");\n let genColumn = 0;\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop();\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 1;\n const hasCallsite = fields & 2;\n const hasScope = fields & 4;\n let callsite = null;\n let bindings = EMPTY;\n let range;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0\n );\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];\n } else {\n range = [genLine, genColumn, 0, 0];\n }\n range.isScope = !!hasScope;\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0\n );\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges;\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n ranges.push(range);\n stack.push(range);\n }\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n return ranges;\n}\nfunction encodeGeneratedRanges(ranges) {\n if (ranges.length === 0) return \"\";\n const writer = new StringWriter();\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n return writer.flush();\n}\nfunction _encodeGeneratedRanges(ranges, index, writer, state) {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings\n } = range;\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, range[1], state[1]);\n const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0);\n encodeInteger(writer, fields, 0);\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);\n encodeInteger(writer, expRange[0], 0);\n }\n }\n }\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || l === endLine && c >= endColumn) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n return index;\n}\nfunction catchupLine(writer, lastLine, line) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n\n// src/sourcemap-codec.ts\nfunction decode(mappings) {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n do {\n const semi = reader.indexOf(\";\");\n const line = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n while (reader.pos < semi) {\n let seg;\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n line.push(seg);\n reader.pos++;\n }\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n return decoded;\n}\nfunction sort(line) {\n line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[0] - b[0];\n}\nfunction encode(decoded) {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n let genColumn = 0;\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n genColumn = encodeInteger(writer, segment[0], genColumn);\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n if (segment.length === 4) continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n return writer.flush();\n}\nexport {\n decode,\n decodeGeneratedRanges,\n decodeOriginalScopes,\n encode,\n encodeGeneratedRanges,\n encodeOriginalScopes\n};\n//# sourceMappingURL=sourcemap-codec.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";AACA,IAAI,QAAQ,IAAI,WAAW,EAAE;AAC7B,IAAI,YAAY,IAAI,WAAW,EAAE;AACjC,IAAI,QAAQ;AACZ,IAAI,YAAY,IAAI,WAAW,GAAG;AAClC,IAAI,YAAY,IAAI,WAAW,IAAI;AACnC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;CACrC,MAAM,IAAI,MAAM,WAAW,EAAE;AAC7B,WAAU,KAAK;AACf,WAAU,KAAK;;AAoCjB,IAAI,YAAY,OAAO"}
@@ -1 +0,0 @@
1
- require('../../../../../@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.cjs');
@@ -1,3 +0,0 @@
1
- import "../../../../../@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs";
2
-
3
- export { };
@@ -1,28 +0,0 @@
1
- 'use strict';
2
-
3
- const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.cjs');
4
- const require_utils$1 = require('./lib/utils.cjs');
5
- const require_picomatch$2 = require('./lib/picomatch.cjs');
6
-
7
- //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js
8
- var require_picomatch = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
9
- const pico = require_picomatch$2.default;
10
- const utils = require_utils$1.default;
11
- function picomatch(glob, options, returnState = false) {
12
- if (options && (options.windows === null || options.windows === void 0)) options = {
13
- ...options,
14
- windows: utils.isWindows()
15
- };
16
- return pico(glob, options, returnState);
17
- }
18
- Object.assign(picomatch, pico);
19
- module.exports = picomatch;
20
- }));
21
-
22
- //#endregion
23
- Object.defineProperty(exports, 'default', {
24
- enumerable: true,
25
- get: function () {
26
- return require_picomatch();
27
- }
28
- });
@@ -1,24 +0,0 @@
1
- import { __commonJSMin } from "../../../../../_virtual/rolldown_runtime.mjs";
2
- import { require_utils } from "./lib/utils.mjs";
3
- import { require_picomatch as require_picomatch$1 } from "./lib/picomatch.mjs";
4
-
5
- //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js
6
- var require_picomatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7
- const pico = require_picomatch$1();
8
- const utils = require_utils();
9
- function picomatch(glob, options, returnState = false) {
10
- if (options && (options.windows === null || options.windows === void 0)) options = {
11
- ...options,
12
- windows: utils.isWindows()
13
- };
14
- return pico(glob, options, returnState);
15
- }
16
- Object.assign(picomatch, pico);
17
- module.exports = picomatch;
18
- }));
19
-
20
- //#endregion
21
- export default require_picomatch();
22
-
23
- export { require_picomatch };
24
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js"],"sourcesContent":["'use strict';\n\nconst pico = require('./lib/picomatch');\nconst utils = require('./lib/utils');\n\nfunction picomatch(glob, options, returnState = false) {\n // default to os.platform()\n if (options && (options.windows === null || options.windows === undefined)) {\n // don't mutate the original options object\n options = { ...options, windows: utils.isWindows() };\n }\n\n return pico(glob, options, returnState);\n}\n\nObject.assign(picomatch, pico);\nmodule.exports = picomatch;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;CAEA,MAAM;CACN,MAAM;CAEN,SAAS,UAAU,MAAM,SAAS,cAAc,OAAO;AAErD,MAAI,YAAY,QAAQ,YAAY,QAAQ,QAAQ,YAAY,QAE9D,WAAU;GAAE,GAAG;GAAS,SAAS,MAAM,WAAW;GAAE;AAGtD,SAAO,KAAK,MAAM,SAAS,YAAY;;AAGzC,QAAO,OAAO,WAAW,KAAK;AAC9B,QAAO,UAAU"}
@@ -1,175 +0,0 @@
1
- 'use strict';
2
-
3
- const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.cjs');
4
-
5
- //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js
6
- var require_constants = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
7
- const WIN_SLASH = "\\\\/";
8
- const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
9
- /**
10
- * Posix glob regex
11
- */
12
- const DOT_LITERAL = "\\.";
13
- const PLUS_LITERAL = "\\+";
14
- const QMARK_LITERAL = "\\?";
15
- const SLASH_LITERAL = "\\/";
16
- const ONE_CHAR = "(?=.)";
17
- const QMARK = "[^/]";
18
- const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
19
- const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
20
- const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
21
- const POSIX_CHARS = {
22
- DOT_LITERAL,
23
- PLUS_LITERAL,
24
- QMARK_LITERAL,
25
- SLASH_LITERAL,
26
- ONE_CHAR,
27
- QMARK,
28
- END_ANCHOR,
29
- DOTS_SLASH,
30
- NO_DOT: `(?!${DOT_LITERAL})`,
31
- NO_DOTS: `(?!${START_ANCHOR}${DOTS_SLASH})`,
32
- NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`,
33
- NO_DOTS_SLASH: `(?!${DOTS_SLASH})`,
34
- QMARK_NO_DOT: `[^.${SLASH_LITERAL}]`,
35
- STAR: `${QMARK}*?`,
36
- START_ANCHOR,
37
- SEP: "/"
38
- };
39
- /**
40
- * Windows glob regex
41
- */
42
- const WINDOWS_CHARS = {
43
- ...POSIX_CHARS,
44
- SLASH_LITERAL: `[${WIN_SLASH}]`,
45
- QMARK: WIN_NO_SLASH,
46
- STAR: `${WIN_NO_SLASH}*?`,
47
- DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
48
- NO_DOT: `(?!${DOT_LITERAL})`,
49
- NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
50
- NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
51
- NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
52
- QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
53
- START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
54
- END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
55
- SEP: "\\"
56
- };
57
- /**
58
- * POSIX Bracket Regex
59
- */
60
- const POSIX_REGEX_SOURCE = {
61
- alnum: "a-zA-Z0-9",
62
- alpha: "a-zA-Z",
63
- ascii: "\\x00-\\x7F",
64
- blank: " \\t",
65
- cntrl: "\\x00-\\x1F\\x7F",
66
- digit: "0-9",
67
- graph: "\\x21-\\x7E",
68
- lower: "a-z",
69
- print: "\\x20-\\x7E ",
70
- punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
71
- space: " \\t\\r\\n\\v\\f",
72
- upper: "A-Z",
73
- word: "A-Za-z0-9_",
74
- xdigit: "A-Fa-f0-9"
75
- };
76
- module.exports = {
77
- MAX_LENGTH: 1024 * 64,
78
- POSIX_REGEX_SOURCE,
79
- REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
80
- REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
81
- REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
82
- REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
83
- REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
84
- REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
85
- REPLACEMENTS: {
86
- __proto__: null,
87
- "***": "*",
88
- "**/**": "**",
89
- "**/**/**": "**"
90
- },
91
- CHAR_0: 48,
92
- CHAR_9: 57,
93
- CHAR_UPPERCASE_A: 65,
94
- CHAR_LOWERCASE_A: 97,
95
- CHAR_UPPERCASE_Z: 90,
96
- CHAR_LOWERCASE_Z: 122,
97
- CHAR_LEFT_PARENTHESES: 40,
98
- CHAR_RIGHT_PARENTHESES: 41,
99
- CHAR_ASTERISK: 42,
100
- CHAR_AMPERSAND: 38,
101
- CHAR_AT: 64,
102
- CHAR_BACKWARD_SLASH: 92,
103
- CHAR_CARRIAGE_RETURN: 13,
104
- CHAR_CIRCUMFLEX_ACCENT: 94,
105
- CHAR_COLON: 58,
106
- CHAR_COMMA: 44,
107
- CHAR_DOT: 46,
108
- CHAR_DOUBLE_QUOTE: 34,
109
- CHAR_EQUAL: 61,
110
- CHAR_EXCLAMATION_MARK: 33,
111
- CHAR_FORM_FEED: 12,
112
- CHAR_FORWARD_SLASH: 47,
113
- CHAR_GRAVE_ACCENT: 96,
114
- CHAR_HASH: 35,
115
- CHAR_HYPHEN_MINUS: 45,
116
- CHAR_LEFT_ANGLE_BRACKET: 60,
117
- CHAR_LEFT_CURLY_BRACE: 123,
118
- CHAR_LEFT_SQUARE_BRACKET: 91,
119
- CHAR_LINE_FEED: 10,
120
- CHAR_NO_BREAK_SPACE: 160,
121
- CHAR_PERCENT: 37,
122
- CHAR_PLUS: 43,
123
- CHAR_QUESTION_MARK: 63,
124
- CHAR_RIGHT_ANGLE_BRACKET: 62,
125
- CHAR_RIGHT_CURLY_BRACE: 125,
126
- CHAR_RIGHT_SQUARE_BRACKET: 93,
127
- CHAR_SEMICOLON: 59,
128
- CHAR_SINGLE_QUOTE: 39,
129
- CHAR_SPACE: 32,
130
- CHAR_TAB: 9,
131
- CHAR_UNDERSCORE: 95,
132
- CHAR_VERTICAL_LINE: 124,
133
- CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
134
- extglobChars(chars) {
135
- return {
136
- "!": {
137
- type: "negate",
138
- open: "(?:(?!(?:",
139
- close: `))${chars.STAR})`
140
- },
141
- "?": {
142
- type: "qmark",
143
- open: "(?:",
144
- close: ")?"
145
- },
146
- "+": {
147
- type: "plus",
148
- open: "(?:",
149
- close: ")+"
150
- },
151
- "*": {
152
- type: "star",
153
- open: "(?:",
154
- close: ")*"
155
- },
156
- "@": {
157
- type: "at",
158
- open: "(?:",
159
- close: ")"
160
- }
161
- };
162
- },
163
- globChars(win32) {
164
- return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
165
- }
166
- };
167
- }));
168
-
169
- //#endregion
170
- Object.defineProperty(exports, 'default', {
171
- enumerable: true,
172
- get: function () {
173
- return require_constants();
174
- }
175
- });