extension-develop 3.0.0-next.40 → 3.0.0-next.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.js CHANGED
@@ -1,329 +1,7 @@
1
- /*! For license information please see module.js.LICENSE.txt */
2
1
  const __rslib_import_meta_url__ = /*#__PURE__*/ function() {
3
2
  return 'undefined' == typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
4
3
  }();
5
4
  var __webpack_modules__ = {
6
- "../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
7
- const path = __webpack_require__("path");
8
- const fs = __webpack_require__("fs");
9
- const os = __webpack_require__("os");
10
- const url = __webpack_require__("url");
11
- const fsReadFileAsync = fs.promises.readFile;
12
- function getDefaultSearchPlaces(name, sync) {
13
- return [
14
- 'package.json',
15
- `.${name}rc.json`,
16
- `.${name}rc.js`,
17
- `.${name}rc.cjs`,
18
- ...sync ? [] : [
19
- `.${name}rc.mjs`
20
- ],
21
- `.config/${name}rc`,
22
- `.config/${name}rc.json`,
23
- `.config/${name}rc.js`,
24
- `.config/${name}rc.cjs`,
25
- ...sync ? [] : [
26
- `.config/${name}rc.mjs`
27
- ],
28
- `${name}.config.js`,
29
- `${name}.config.cjs`,
30
- ...sync ? [] : [
31
- `${name}.config.mjs`
32
- ]
33
- ];
34
- }
35
- function parentDir(p) {
36
- return path.dirname(p) || path.sep;
37
- }
38
- const jsonLoader = (_, content)=>JSON.parse(content);
39
- const requireFunc = require;
40
- const defaultLoadersSync = Object.freeze({
41
- '.js': requireFunc,
42
- '.json': requireFunc,
43
- '.cjs': requireFunc,
44
- noExt: jsonLoader
45
- });
46
- module.exports.defaultLoadersSync = defaultLoadersSync;
47
- const dynamicImport = async (id)=>{
48
- try {
49
- const fileUrl = url.pathToFileURL(id).href;
50
- const mod = await import(fileUrl);
51
- return mod.default;
52
- } catch (e) {
53
- try {
54
- return requireFunc(id);
55
- } catch (requireE) {
56
- if ('ERR_REQUIRE_ESM' === requireE.code || requireE instanceof SyntaxError && requireE.toString().includes('Cannot use import statement outside a module')) throw e;
57
- throw requireE;
58
- }
59
- }
60
- };
61
- const defaultLoaders = Object.freeze({
62
- '.js': dynamicImport,
63
- '.mjs': dynamicImport,
64
- '.cjs': dynamicImport,
65
- '.json': jsonLoader,
66
- noExt: jsonLoader
67
- });
68
- module.exports.defaultLoaders = defaultLoaders;
69
- function getOptions(name, options, sync) {
70
- const conf = {
71
- stopDir: os.homedir(),
72
- searchPlaces: getDefaultSearchPlaces(name, sync),
73
- ignoreEmptySearchPlaces: true,
74
- cache: true,
75
- transform: (x)=>x,
76
- packageProp: [
77
- name
78
- ],
79
- ...options,
80
- loaders: {
81
- ...sync ? defaultLoadersSync : defaultLoaders,
82
- ...options.loaders
83
- }
84
- };
85
- conf.searchPlaces.forEach((place)=>{
86
- const key = path.extname(place) || 'noExt';
87
- const loader = conf.loaders[key];
88
- if (!loader) throw new Error(`Missing loader for extension "${place}"`);
89
- if ('function' != typeof loader) throw new Error(`Loader for extension "${place}" is not a function: Received ${typeof loader}.`);
90
- });
91
- return conf;
92
- }
93
- function getPackageProp(props, obj) {
94
- if ('string' == typeof props && props in obj) return obj[props];
95
- return (Array.isArray(props) ? props : props.split('.')).reduce((acc, prop)=>void 0 === acc ? acc : acc[prop], obj) || null;
96
- }
97
- function validateFilePath(filepath) {
98
- if (!filepath) throw new Error('load must pass a non-empty string');
99
- }
100
- function validateLoader(loader, ext) {
101
- if (!loader) throw new Error(`No loader specified for extension "${ext}"`);
102
- if ('function' != typeof loader) throw new Error('loader is not a function');
103
- }
104
- const makeEmplace = (enableCache)=>(c, filepath, res)=>{
105
- if (enableCache) c.set(filepath, res);
106
- return res;
107
- };
108
- module.exports.lilconfig = function(name, options) {
109
- const { ignoreEmptySearchPlaces, loaders, packageProp, searchPlaces, stopDir, transform, cache } = getOptions(name, options ?? {}, false);
110
- const searchCache = new Map();
111
- const loadCache = new Map();
112
- const emplace = makeEmplace(cache);
113
- return {
114
- async search (searchFrom = process.cwd()) {
115
- const result = {
116
- config: null,
117
- filepath: ''
118
- };
119
- const visited = new Set();
120
- let dir = searchFrom;
121
- dirLoop: while(true){
122
- if (cache) {
123
- const r = searchCache.get(dir);
124
- if (void 0 !== r) {
125
- for (const p of visited)searchCache.set(p, r);
126
- return r;
127
- }
128
- visited.add(dir);
129
- }
130
- for (const searchPlace of searchPlaces){
131
- const filepath = path.join(dir, searchPlace);
132
- try {
133
- await fs.promises.access(filepath);
134
- } catch {
135
- continue;
136
- }
137
- const content = String(await fsReadFileAsync(filepath));
138
- const loaderKey = path.extname(searchPlace) || 'noExt';
139
- const loader = loaders[loaderKey];
140
- if ('package.json' === searchPlace) {
141
- const pkg = await loader(filepath, content);
142
- const maybeConfig = getPackageProp(packageProp, pkg);
143
- if (null != maybeConfig) {
144
- result.config = maybeConfig;
145
- result.filepath = filepath;
146
- break dirLoop;
147
- }
148
- continue;
149
- }
150
- const isEmpty = '' === content.trim();
151
- if (!isEmpty || !ignoreEmptySearchPlaces) {
152
- if (isEmpty) {
153
- result.isEmpty = true;
154
- result.config = void 0;
155
- } else {
156
- validateLoader(loader, loaderKey);
157
- result.config = await loader(filepath, content);
158
- }
159
- result.filepath = filepath;
160
- break dirLoop;
161
- }
162
- }
163
- if (dir === stopDir || dir === parentDir(dir)) break;
164
- dir = parentDir(dir);
165
- }
166
- const transformed = '' === result.filepath && null === result.config ? transform(null) : transform(result);
167
- if (cache) for (const p of visited)searchCache.set(p, transformed);
168
- return transformed;
169
- },
170
- async load (filepath) {
171
- validateFilePath(filepath);
172
- const absPath = path.resolve(process.cwd(), filepath);
173
- if (cache && loadCache.has(absPath)) return loadCache.get(absPath);
174
- const { base, ext } = path.parse(absPath);
175
- const loaderKey = ext || 'noExt';
176
- const loader = loaders[loaderKey];
177
- validateLoader(loader, loaderKey);
178
- const content = String(await fsReadFileAsync(absPath));
179
- if ('package.json' === base) {
180
- const pkg = await loader(absPath, content);
181
- return emplace(loadCache, absPath, transform({
182
- config: getPackageProp(packageProp, pkg),
183
- filepath: absPath
184
- }));
185
- }
186
- const result = {
187
- config: null,
188
- filepath: absPath
189
- };
190
- const isEmpty = '' === content.trim();
191
- if (isEmpty && ignoreEmptySearchPlaces) return emplace(loadCache, absPath, transform({
192
- config: void 0,
193
- filepath: absPath,
194
- isEmpty: true
195
- }));
196
- result.config = isEmpty ? void 0 : await loader(absPath, content);
197
- return emplace(loadCache, absPath, transform(isEmpty ? {
198
- ...result,
199
- isEmpty,
200
- config: void 0
201
- } : result));
202
- },
203
- clearLoadCache () {
204
- if (cache) loadCache.clear();
205
- },
206
- clearSearchCache () {
207
- if (cache) searchCache.clear();
208
- },
209
- clearCaches () {
210
- if (cache) {
211
- loadCache.clear();
212
- searchCache.clear();
213
- }
214
- }
215
- };
216
- };
217
- module.exports.lilconfigSync = function(name, options) {
218
- const { ignoreEmptySearchPlaces, loaders, packageProp, searchPlaces, stopDir, transform, cache } = getOptions(name, options ?? {}, true);
219
- const searchCache = new Map();
220
- const loadCache = new Map();
221
- const emplace = makeEmplace(cache);
222
- return {
223
- search (searchFrom = process.cwd()) {
224
- const result = {
225
- config: null,
226
- filepath: ''
227
- };
228
- const visited = new Set();
229
- let dir = searchFrom;
230
- dirLoop: while(true){
231
- if (cache) {
232
- const r = searchCache.get(dir);
233
- if (void 0 !== r) {
234
- for (const p of visited)searchCache.set(p, r);
235
- return r;
236
- }
237
- visited.add(dir);
238
- }
239
- for (const searchPlace of searchPlaces){
240
- const filepath = path.join(dir, searchPlace);
241
- try {
242
- fs.accessSync(filepath);
243
- } catch {
244
- continue;
245
- }
246
- const loaderKey = path.extname(searchPlace) || 'noExt';
247
- const loader = loaders[loaderKey];
248
- const content = String(fs.readFileSync(filepath));
249
- if ('package.json' === searchPlace) {
250
- const pkg = loader(filepath, content);
251
- const maybeConfig = getPackageProp(packageProp, pkg);
252
- if (null != maybeConfig) {
253
- result.config = maybeConfig;
254
- result.filepath = filepath;
255
- break dirLoop;
256
- }
257
- continue;
258
- }
259
- const isEmpty = '' === content.trim();
260
- if (!isEmpty || !ignoreEmptySearchPlaces) {
261
- if (isEmpty) {
262
- result.isEmpty = true;
263
- result.config = void 0;
264
- } else {
265
- validateLoader(loader, loaderKey);
266
- result.config = loader(filepath, content);
267
- }
268
- result.filepath = filepath;
269
- break dirLoop;
270
- }
271
- }
272
- if (dir === stopDir || dir === parentDir(dir)) break;
273
- dir = parentDir(dir);
274
- }
275
- const transformed = '' === result.filepath && null === result.config ? transform(null) : transform(result);
276
- if (cache) for (const p of visited)searchCache.set(p, transformed);
277
- return transformed;
278
- },
279
- load (filepath) {
280
- validateFilePath(filepath);
281
- const absPath = path.resolve(process.cwd(), filepath);
282
- if (cache && loadCache.has(absPath)) return loadCache.get(absPath);
283
- const { base, ext } = path.parse(absPath);
284
- const loaderKey = ext || 'noExt';
285
- const loader = loaders[loaderKey];
286
- validateLoader(loader, loaderKey);
287
- const content = String(fs.readFileSync(absPath));
288
- if ('package.json' === base) {
289
- const pkg = loader(absPath, content);
290
- return transform({
291
- config: getPackageProp(packageProp, pkg),
292
- filepath: absPath
293
- });
294
- }
295
- const result = {
296
- config: null,
297
- filepath: absPath
298
- };
299
- const isEmpty = '' === content.trim();
300
- if (isEmpty && ignoreEmptySearchPlaces) return emplace(loadCache, absPath, transform({
301
- filepath: absPath,
302
- config: void 0,
303
- isEmpty: true
304
- }));
305
- result.config = isEmpty ? void 0 : loader(absPath, content);
306
- return emplace(loadCache, absPath, transform(isEmpty ? {
307
- ...result,
308
- isEmpty,
309
- config: void 0
310
- } : result));
311
- },
312
- clearLoadCache () {
313
- if (cache) loadCache.clear();
314
- },
315
- clearSearchCache () {
316
- if (cache) searchCache.clear();
317
- },
318
- clearCaches () {
319
- if (cache) {
320
- loadCache.clear();
321
- searchCache.clear();
322
- }
323
- }
324
- };
325
- };
326
- },
327
5
  "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": function(module) {
328
6
  let p = process || {}, argv = p.argv || [], env = p.env || {};
329
7
  let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || "win32" === p.platform || (p.stdout || {}).isTTY && "dumb" !== env.TERM || !!env.CI);
@@ -390,191 +68,6 @@ var __webpack_modules__ = {
390
68
  module.exports = createColors();
391
69
  module.exports.createColors = createColors;
392
70
  },
393
- "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_yaml@2.8.1/node_modules/postcss-load-config/src/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
394
- const { resolve } = __webpack_require__("node:path");
395
- const config = __webpack_require__("../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js");
396
- const loadOptions = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_yaml@2.8.1/node_modules/postcss-load-config/src/options.js");
397
- const loadPlugins = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_yaml@2.8.1/node_modules/postcss-load-config/src/plugins.js");
398
- const req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_yaml@2.8.1/node_modules/postcss-load-config/src/req.js");
399
- const interopRequireDefault = (obj)=>obj && obj.__esModule ? obj : {
400
- default: obj
401
- };
402
- async function processResult(ctx, result) {
403
- let file = result.filepath || '';
404
- let projectConfig = interopRequireDefault(result.config).default || {};
405
- projectConfig = 'function' == typeof projectConfig ? projectConfig(ctx) : Object.assign({}, projectConfig, ctx);
406
- if (!projectConfig.plugins) projectConfig.plugins = [];
407
- let res = {
408
- file,
409
- options: await loadOptions(projectConfig, file),
410
- plugins: await loadPlugins(projectConfig, file)
411
- };
412
- delete projectConfig.plugins;
413
- return res;
414
- }
415
- function createContext(ctx) {
416
- ctx = Object.assign({
417
- cwd: process.cwd(),
418
- env: process.env.NODE_ENV
419
- }, ctx);
420
- if (!ctx.env) process.env.NODE_ENV = 'development';
421
- return ctx;
422
- }
423
- async function loader(filepath) {
424
- return req(filepath);
425
- }
426
- let yaml;
427
- async function yamlLoader(_, content) {
428
- if (!yaml) try {
429
- yaml = await __webpack_require__.e("41").then(__webpack_require__.t.bind(__webpack_require__, "../../node_modules/.pnpm/yaml@2.8.1/node_modules/yaml/dist/index.js", 19));
430
- } catch (e) {
431
- throw new Error(`'yaml' is required for the YAML configuration files. Make sure it is installed\nError: ${e.message}`);
432
- }
433
- return yaml.parse(content);
434
- }
435
- const withLoaders = (options = {})=>{
436
- let moduleName = 'postcss';
437
- return {
438
- ...options,
439
- loaders: {
440
- ...options.loaders,
441
- '.cjs': loader,
442
- '.cts': loader,
443
- '.js': loader,
444
- '.mjs': loader,
445
- '.mts': loader,
446
- '.ts': loader,
447
- '.yaml': yamlLoader,
448
- '.yml': yamlLoader
449
- },
450
- searchPlaces: [
451
- ...options.searchPlaces || [],
452
- 'package.json',
453
- `.${moduleName}rc`,
454
- `.${moduleName}rc.json`,
455
- `.${moduleName}rc.yaml`,
456
- `.${moduleName}rc.yml`,
457
- `.${moduleName}rc.ts`,
458
- `.${moduleName}rc.cts`,
459
- `.${moduleName}rc.mts`,
460
- `.${moduleName}rc.js`,
461
- `.${moduleName}rc.cjs`,
462
- `.${moduleName}rc.mjs`,
463
- `${moduleName}.config.ts`,
464
- `${moduleName}.config.cts`,
465
- `${moduleName}.config.mts`,
466
- `${moduleName}.config.js`,
467
- `${moduleName}.config.cjs`,
468
- `${moduleName}.config.mjs`
469
- ]
470
- };
471
- };
472
- function rc(ctx, path, options) {
473
- ctx = createContext(ctx);
474
- path = path ? resolve(path) : process.cwd();
475
- return config.lilconfig('postcss', withLoaders(options)).search(path).then((result)=>{
476
- if (!result) throw new Error(`No PostCSS Config found in: ${path}`);
477
- return processResult(ctx, result);
478
- });
479
- }
480
- /**
481
- * Autoload Config for PostCSS
482
- *
483
- * @author Michael Ciniawsky @michael-ciniawsky <michael.ciniawsky@gmail.com>
484
- * @license MIT
485
- *
486
- * @module postcss-load-config
487
- * @version 2.1.0
488
- *
489
- * @requires comsiconfig
490
- * @requires ./options
491
- * @requires ./plugins
492
- */ module.exports = rc;
493
- },
494
- "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_yaml@2.8.1/node_modules/postcss-load-config/src/options.js": function(module, __unused_webpack_exports, __webpack_require__) {
495
- const req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_yaml@2.8.1/node_modules/postcss-load-config/src/req.js");
496
- async function options(config, file) {
497
- if (config.parser && 'string' == typeof config.parser) try {
498
- config.parser = await req(config.parser, file);
499
- } catch (err) {
500
- throw new Error(`Loading PostCSS Parser failed: ${err.message}\n\n(@${file})`);
501
- }
502
- if (config.syntax && 'string' == typeof config.syntax) try {
503
- config.syntax = await req(config.syntax, file);
504
- } catch (err) {
505
- throw new Error(`Loading PostCSS Syntax failed: ${err.message}\n\n(@${file})`);
506
- }
507
- if (config.stringifier && 'string' == typeof config.stringifier) try {
508
- config.stringifier = await req(config.stringifier, file);
509
- } catch (err) {
510
- throw new Error(`Loading PostCSS Stringifier failed: ${err.message}\n\n(@${file})`);
511
- }
512
- return config;
513
- }
514
- module.exports = options;
515
- },
516
- "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_yaml@2.8.1/node_modules/postcss-load-config/src/plugins.js": function(module, __unused_webpack_exports, __webpack_require__) {
517
- const req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_yaml@2.8.1/node_modules/postcss-load-config/src/req.js");
518
- async function load(plugin, options, file) {
519
- try {
520
- if (null == options || 0 === Object.keys(options).length) return await req(plugin, file);
521
- return (await req(plugin, file))(options);
522
- } catch (err) {
523
- throw new Error(`Loading PostCSS Plugin failed: ${err.message}\n\n(@${file})`);
524
- }
525
- }
526
- async function plugins(config, file) {
527
- let list = [];
528
- if (Array.isArray(config.plugins)) list = config.plugins.filter(Boolean);
529
- else {
530
- list = Object.entries(config.plugins).filter(([, options])=>false !== options).map(([plugin, options])=>load(plugin, options, file));
531
- list = await Promise.all(list);
532
- }
533
- if (list.length && list.length > 0) list.forEach((plugin, i)=>{
534
- if (plugin.default) plugin = plugin.default;
535
- if (true === plugin.postcss) plugin = plugin();
536
- else if (plugin.postcss) plugin = plugin.postcss;
537
- if (!('object' == typeof plugin && Array.isArray(plugin.plugins) || 'object' == typeof plugin && plugin.postcssPlugin || 'function' == typeof plugin)) throw new TypeError(`Invalid PostCSS Plugin found at: plugins[${i}]\n\n(@${file})`);
538
- });
539
- return list;
540
- }
541
- module.exports = plugins;
542
- },
543
- "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_yaml@2.8.1/node_modules/postcss-load-config/src/req.js": function(module, __unused_webpack_exports, __webpack_require__) {
544
- const { createRequire } = __webpack_require__("node:module");
545
- const { pathToFileURL } = __webpack_require__("node:url");
546
- const TS_EXT_RE = /\.[mc]?ts$/;
547
- let tsx;
548
- let jiti;
549
- let importError = [];
550
- async function req(name, rootFile = __filename) {
551
- let url = createRequire(rootFile).resolve(name);
552
- try {
553
- return (await import(`${pathToFileURL(url)}?t=${Date.now()}`)).default;
554
- } catch (err) {
555
- if (!TS_EXT_RE.test(url)) throw err;
556
- }
557
- if (void 0 === tsx) try {
558
- tsx = await __webpack_require__.e("764").then(__webpack_require__.bind(__webpack_require__, "../../node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/cjs/api/index.mjs"));
559
- } catch (error) {
560
- importError.push(error);
561
- }
562
- if (tsx) {
563
- let loaded = tsx.require(name, rootFile);
564
- return loaded && '__esModule' in loaded ? loaded.default : loaded;
565
- }
566
- if (void 0 === jiti) try {
567
- jiti = (await __webpack_require__.e("721").then(__webpack_require__.bind(__webpack_require__, "../../node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs"))).default;
568
- } catch (error) {
569
- importError.push(error);
570
- }
571
- if (jiti) return jiti(rootFile, {
572
- interopDefault: true
573
- })(name);
574
- throw new Error(`'tsx' or 'jiti' is required for the TypeScript configuration files. Make sure it is installed\nError: ${importError.map((error)=>error.message).join('\n')}`);
575
- }
576
- module.exports = req;
577
- },
578
71
  "../../node_modules/.pnpm/postcss@8.5.6/node_modules/postcss/lib/at-rule.js": function(module, __unused_webpack_exports, __webpack_require__) {
579
72
  "use strict";
580
73
  let Container = __webpack_require__("../../node_modules/.pnpm/postcss@8.5.6/node_modules/postcss/lib/container.js");
@@ -5536,10 +5029,6 @@ var __webpack_modules__ = {
5536
5029
  "use strict";
5537
5030
  module.exports = require("adm-zip");
5538
5031
  },
5539
- buffer: function(module) {
5540
- "use strict";
5541
- module.exports = require("buffer");
5542
- },
5543
5032
  child_process: function(module) {
5544
5033
  "use strict";
5545
5034
  module.exports = require("child_process");
@@ -5568,70 +5057,6 @@ var __webpack_modules__ = {
5568
5057
  "use strict";
5569
5058
  module.exports = require("fs");
5570
5059
  },
5571
- module: function(module) {
5572
- "use strict";
5573
- module.exports = require("module");
5574
- },
5575
- "node:assert": function(module) {
5576
- "use strict";
5577
- module.exports = require("node:assert");
5578
- },
5579
- "node:crypto": function(module) {
5580
- "use strict";
5581
- module.exports = require("node:crypto");
5582
- },
5583
- "node:fs": function(module) {
5584
- "use strict";
5585
- module.exports = require("node:fs");
5586
- },
5587
- "node:module": function(module) {
5588
- "use strict";
5589
- module.exports = require("node:module");
5590
- },
5591
- "node:net": function(module) {
5592
- "use strict";
5593
- module.exports = require("node:net");
5594
- },
5595
- "node:os": function(module) {
5596
- "use strict";
5597
- module.exports = require("node:os");
5598
- },
5599
- "node:path": function(module) {
5600
- "use strict";
5601
- module.exports = require("node:path");
5602
- },
5603
- "node:perf_hooks": function(module) {
5604
- "use strict";
5605
- module.exports = require("node:perf_hooks");
5606
- },
5607
- "node:process": function(module) {
5608
- "use strict";
5609
- module.exports = require("node:process");
5610
- },
5611
- "node:tty": function(module) {
5612
- "use strict";
5613
- module.exports = require("node:tty");
5614
- },
5615
- "node:url": function(module) {
5616
- "use strict";
5617
- module.exports = require("node:url");
5618
- },
5619
- "node:util": function(module) {
5620
- "use strict";
5621
- module.exports = require("node:util");
5622
- },
5623
- "node:v8": function(module) {
5624
- "use strict";
5625
- module.exports = require("node:v8");
5626
- },
5627
- "node:vm": function(module) {
5628
- "use strict";
5629
- module.exports = require("node:vm");
5630
- },
5631
- os: function(module) {
5632
- "use strict";
5633
- module.exports = require("os");
5634
- },
5635
5060
  "package-manager-detector": function(module) {
5636
5061
  "use strict";
5637
5062
  module.exports = require("package-manager-detector");
@@ -5644,26 +5069,10 @@ var __webpack_modules__ = {
5644
5069
  "use strict";
5645
5070
  module.exports = require("pintor");
5646
5071
  },
5647
- pnpapi: function(module) {
5648
- "use strict";
5649
- module.exports = require("pnpapi");
5650
- },
5651
- process: function(module) {
5652
- "use strict";
5653
- module.exports = require("process");
5654
- },
5655
- tty: function(module) {
5656
- "use strict";
5657
- module.exports = require("tty");
5658
- },
5659
5072
  url: function(module) {
5660
5073
  "use strict";
5661
5074
  module.exports = require("url");
5662
5075
  },
5663
- worker_threads: function(module) {
5664
- "use strict";
5665
- module.exports = require("worker_threads");
5666
- },
5667
5076
  "go-git-it": function(module) {
5668
5077
  "use strict";
5669
5078
  module.exports = import("go-git-it").then(function(module) {
@@ -5691,7 +5100,7 @@ var __webpack_modules__ = {
5691
5100
  },
5692
5101
  "./package.json": function(module) {
5693
5102
  "use strict";
5694
- module.exports = JSON.parse('{"i8":"3.0.0-next.40","HO":{"@rspack/core":"^1.6.3","@rspack/dev-server":"^1.1.4","@swc/core":"^1.13.2","@swc/helpers":"^0.5.15","adm-zip":"^0.5.16","browser-extension-manifest-fields":"^2.2.1","case-sensitive-paths-webpack-plugin":"^2.4.0","chokidar":"^4.0.1","chrome-location2":"3.2.1","chromium-location":"1.2.3","content-security-policy-parser":"^0.6.0","cross-spawn":"^7.0.6","dotenv":"^16.4.7","edge-location":"^2.1.1","firefox-location2":"2.1.1","go-git-it":"^5.0.0","ignore":"^6.0.2","loader-utils":"^3.3.1","magic-string":"^0.30.10","package-manager-detector":"^0.2.7","parse5":"^7.2.1","parse5-utilities":"^1.0.0","pintor":"0.3.0","schema-utils":"^4.2.0","tiny-glob":"^0.2.9","unique-names-generator":"^4.7.1","webextension-polyfill":"^0.12.0","webpack-merge":"^6.0.1","webpack-target-webextension":"^2.1.3","ws":"^8.18.0"}}');
5103
+ module.exports = JSON.parse('{"i8":"3.0.0-next.42","HO":{"@rspack/core":"^1.6.3","@rspack/dev-server":"^1.1.4","@swc/core":"^1.13.2","@swc/helpers":"^0.5.15","adm-zip":"^0.5.16","browser-extension-manifest-fields":"^2.2.1","case-sensitive-paths-webpack-plugin":"^2.4.0","chokidar":"^4.0.1","chrome-location2":"3.2.1","chromium-location":"1.2.3","content-security-policy-parser":"^0.6.0","cross-spawn":"^7.0.6","dotenv":"^16.4.7","edge-location":"^2.1.1","firefox-location2":"2.1.1","go-git-it":"^5.0.0","ignore":"^6.0.2","loader-utils":"^3.3.1","magic-string":"^0.30.10","package-manager-detector":"^0.2.7","parse5":"^7.2.1","parse5-utilities":"^1.0.0","pintor":"0.3.0","schema-utils":"^4.2.0","tiny-glob":"^0.2.9","unique-names-generator":"^4.7.1","webextension-polyfill":"^0.12.0","webpack-merge":"^6.0.1","webpack-target-webextension":"^2.1.3","ws":"^8.18.0"}}');
5695
5104
  }
5696
5105
  };
5697
5106
  var __webpack_module_cache__ = {};
@@ -5714,33 +5123,6 @@ __webpack_require__.m = __webpack_modules__;
5714
5123
  return getter;
5715
5124
  };
5716
5125
  })();
5717
- (()=>{
5718
- var getProto = Object.getPrototypeOf ? (obj)=>Object.getPrototypeOf(obj) : (obj)=>obj.__proto__;
5719
- var leafPrototypes;
5720
- __webpack_require__.t = function(value, mode) {
5721
- if (1 & mode) value = this(value);
5722
- if (8 & mode) return value;
5723
- if ('object' == typeof value && value) {
5724
- if (4 & mode && value.__esModule) return value;
5725
- if (16 & mode && 'function' == typeof value.then) return value;
5726
- }
5727
- var ns = Object.create(null);
5728
- __webpack_require__.r(ns);
5729
- var def = {};
5730
- leafPrototypes = leafPrototypes || [
5731
- null,
5732
- getProto({}),
5733
- getProto([]),
5734
- getProto(getProto)
5735
- ];
5736
- for(var current = 2 & mode && value; 'object' == typeof current && !~leafPrototypes.indexOf(current); current = getProto(current))Object.getOwnPropertyNames(current).forEach((key)=>{
5737
- def[key] = ()=>value[key];
5738
- });
5739
- def['default'] = ()=>value;
5740
- __webpack_require__.d(ns, def);
5741
- return ns;
5742
- };
5743
- })();
5744
5126
  (()=>{
5745
5127
  __webpack_require__.d = (exports1, definition)=>{
5746
5128
  for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
@@ -5988,9 +5370,9 @@ var __webpack_exports__ = {};
5988
5370
  packageJsonPath
5989
5371
  };
5990
5372
  }
5991
- var external_os_ = __webpack_require__("os");
5373
+ const external_os_namespaceObject = require("os");
5992
5374
  var external_url_ = __webpack_require__("url");
5993
- var external_module_ = __webpack_require__("module");
5375
+ const external_module_namespaceObject = require("module");
5994
5376
  const external_dotenv_namespaceObject = require("dotenv");
5995
5377
  var external_dotenv_default = /*#__PURE__*/ __webpack_require__.n(external_dotenv_namespaceObject);
5996
5378
  function preloadEnvFiles(projectDir) {
@@ -6021,7 +5403,7 @@ var __webpack_exports__ = {};
6021
5403
  preloadEnvFiles(projectDir);
6022
5404
  try {
6023
5405
  if (absolutePath.endsWith('.cjs')) {
6024
- const requireFn = (0, external_module_.createRequire)(__rslib_import_meta_url__);
5406
+ const requireFn = (0, external_module_namespaceObject.createRequire)(__rslib_import_meta_url__);
6025
5407
  const required = requireFn(absolutePath);
6026
5408
  return (null == required ? void 0 : required.default) || required;
6027
5409
  }
@@ -6029,7 +5411,7 @@ var __webpack_exports__ = {};
6029
5411
  try {
6030
5412
  const originalContent = external_fs_.readFileSync(absolutePath, 'utf-8');
6031
5413
  if (originalContent.includes('import.meta.env')) {
6032
- const tmpDir = external_fs_.mkdtempSync(external_path_.join(external_os_.tmpdir(), 'extension-config-esm-'));
5414
+ const tmpDir = external_fs_.mkdtempSync(external_path_.join(external_os_namespaceObject.tmpdir(), 'extension-config-esm-'));
6033
5415
  const tmpPath = external_path_.join(tmpDir, external_path_.basename(absolutePath));
6034
5416
  const envObjectLiteral = JSON.stringify(Object.fromEntries(Object.entries(process.env).map(([k, v])=>[
6035
5417
  k,
@@ -6047,7 +5429,7 @@ var __webpack_exports__ = {};
6047
5429
  const error = err;
6048
5430
  try {
6049
5431
  if (!absolutePath.endsWith('.mjs')) {
6050
- const requireFn = (0, external_module_.createRequire)(__rslib_import_meta_url__);
5432
+ const requireFn = (0, external_module_namespaceObject.createRequire)(__rslib_import_meta_url__);
6051
5433
  let required;
6052
5434
  try {
6053
5435
  required = requireFn(absolutePath);
@@ -6055,7 +5437,7 @@ var __webpack_exports__ = {};
6055
5437
  const message = String((null == error ? void 0 : error.message) || '') + ' ' + String((null == requireErr ? void 0 : requireErr.message) || '');
6056
5438
  const looksLikeCommonJsInEsm = message.includes('require is not defined in ES module scope') || message.includes('Cannot use import statement outside a module') || message.includes('ERR_REQUIRE_ESM');
6057
5439
  if (looksLikeCommonJsInEsm) {
6058
- const tmpDir = external_fs_.mkdtempSync(external_path_.join(external_os_.tmpdir(), 'extension-config-'));
5440
+ const tmpDir = external_fs_.mkdtempSync(external_path_.join(external_os_namespaceObject.tmpdir(), 'extension-config-'));
6059
5441
  const tmpCjsPath = external_path_.join(tmpDir, external_path_.basename(absolutePath, external_path_.extname(absolutePath)) + '.cjs');
6060
5442
  external_fs_.copyFileSync(absolutePath, tmpCjsPath);
6061
5443
  required = requireFn(tmpCjsPath);
@@ -7107,7 +6489,7 @@ var __webpack_exports__ = {};
7107
6489
  const tailwindPresent = tailwind_isUsingTailwind(projectPath);
7108
6490
  if (!userPostCssConfig && !pkgHasPostCss && !tailwindPresent) return {};
7109
6491
  if (tailwindPresent) try {
7110
- const req = (0, external_module_.createRequire)(external_path_.join(projectPath, 'package.json'));
6492
+ const req = (0, external_module_namespaceObject.createRequire)(external_path_.join(projectPath, 'package.json'));
7111
6493
  req.resolve('@tailwindcss/postcss');
7112
6494
  } catch {
7113
6495
  console.error(`PostCSS plugin "@tailwindcss/postcss" not found in ${projectPath}.\nInstall it in that package (e.g. "pnpm add -D @tailwindcss/postcss") and retry.`);
@@ -7128,7 +6510,7 @@ var __webpack_exports__ = {};
7128
6510
  }
7129
6511
  function getProjectPostcssImpl() {
7130
6512
  try {
7131
- const req = (0, external_module_.createRequire)(external_path_.join(projectPath, 'package.json'));
6513
+ const req = (0, external_module_namespaceObject.createRequire)(external_path_.join(projectPath, 'package.json'));
7132
6514
  return req('postcss');
7133
6515
  } catch {
7134
6516
  try {
@@ -7138,73 +6520,39 @@ var __webpack_exports__ = {};
7138
6520
  }
7139
6521
  }
7140
6522
  }
7141
- const reqFromProject = (0, external_module_.createRequire)(external_path_.join(projectPath, 'package.json'));
7142
- async function loadUserPostcssPlugins() {
7143
- try {
7144
- let plc;
7145
- try {
7146
- plc = reqFromProject('postcss-load-config');
7147
- } catch {
7148
- try {
7149
- plc = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_yaml@2.8.1/node_modules/postcss-load-config/src/index.js");
7150
- } catch {
7151
- return {
7152
- plugins: void 0,
7153
- loaded: false
7154
- };
7155
- }
7156
- }
7157
- const loadConfig = 'function' == typeof plc ? plc : (null == plc ? void 0 : plc.default) ? plc.default : plc;
7158
- if ('function' != typeof loadConfig) return {
7159
- plugins: void 0,
7160
- loaded: false
7161
- };
6523
+ let plugins;
6524
+ try {
6525
+ const req = (0, external_module_namespaceObject.createRequire)(external_path_.join(projectPath, 'package.json'));
6526
+ const plc = req('postcss-load-config');
6527
+ const loadConfig = 'function' == typeof plc ? plc : (null == plc ? void 0 : plc.default) ? plc.default : plc;
6528
+ if ('function' == typeof loadConfig) {
7162
6529
  const result = await loadConfig({}, projectPath);
7163
- const plugins = Array.isArray(null == result ? void 0 : result.plugins) ? result.plugins : Object.entries((null == result ? void 0 : result.plugins) || {}).map(([plugin, options])=>{
6530
+ if (Array.isArray(null == result ? void 0 : result.plugins)) plugins = result.plugins;
6531
+ else if ((null == result ? void 0 : result.plugins) && 'object' == typeof result.plugins) plugins = Object.entries(result.plugins).map(([plugin, options])=>{
7164
6532
  try {
7165
- const mod = 'string' == typeof plugin ? reqFromProject(plugin) : plugin;
6533
+ const mod = 'string' == typeof plugin ? req(plugin) : plugin;
7166
6534
  return 'function' == typeof mod ? mod(options) : mod;
7167
6535
  } catch {
7168
6536
  return;
7169
6537
  }
7170
6538
  }).filter(Boolean);
7171
- return {
7172
- plugins,
7173
- loaded: true
7174
- };
7175
- } catch {
7176
- return {
7177
- plugins: void 0,
7178
- loaded: false
7179
- };
7180
6539
  }
7181
- }
7182
- let inlinePlugins;
7183
- if (!userPostCssConfig && !pkgHasPostCss && tailwindPresent) try {
7184
- inlinePlugins = [
7185
- reqFromProject('@tailwindcss/postcss')
7186
- ];
7187
- } catch {
7188
- console.error(`PostCSS plugin "@tailwindcss/postcss" not found in ${projectPath}.\nInstall it in that package (e.g. "pnpm add -D @tailwindcss/postcss") and retry.`);
7189
- process.exit(1);
7190
- }
7191
- let resolvedPlugins = inlinePlugins;
7192
- if ((userPostCssConfig || pkgHasPostCss) && !inlinePlugins) {
7193
- const loaded = await loadUserPostcssPlugins();
7194
- if (loaded.loaded && Array.isArray(loaded.plugins) && loaded.plugins.length) resolvedPlugins = loaded.plugins;
7195
- }
6540
+ } catch {}
6541
+ const postcssOptions = {
6542
+ ident: 'postcss',
6543
+ cwd: projectPath
6544
+ };
6545
+ if (plugins && plugins.length) {
6546
+ postcssOptions.config = false;
6547
+ postcssOptions.plugins = plugins;
6548
+ } else postcssOptions.config = projectPath;
7196
6549
  return {
7197
6550
  test: /\.css$/,
7198
6551
  type: 'css',
7199
6552
  loader: require.resolve('postcss-loader'),
7200
6553
  options: {
7201
6554
  implementation: getProjectPostcssImpl(),
7202
- postcssOptions: {
7203
- ident: 'postcss',
7204
- cwd: projectPath,
7205
- config: resolvedPlugins && resolvedPlugins.length ? false : userPostCssConfig || pkgHasPostCss ? projectPath : false,
7206
- plugins: resolvedPlugins
7207
- },
6555
+ postcssOptions,
7208
6556
  sourceMap: 'development' === opts.mode
7209
6557
  }
7210
6558
  };
@@ -7692,7 +7040,7 @@ var __webpack_exports__ = {};
7692
7040
  overlay: false
7693
7041
  })
7694
7042
  ];
7695
- const requireFromProject = (0, external_module_.createRequire)(external_path_.join(projectPath, 'package.json'));
7043
+ const requireFromProject = (0, external_module_namespaceObject.createRequire)(external_path_.join(projectPath, 'package.json'));
7696
7044
  let reactPath;
7697
7045
  let reactDomPath;
7698
7046
  let reactDomClientPath;
@@ -10564,7 +9912,7 @@ var __webpack_exports__ = {};
10564
9912
  }
10565
9913
  const external_webpack_target_webextension_namespaceObject = require("webpack-target-webextension");
10566
9914
  var external_webpack_target_webextension_default = /*#__PURE__*/ __webpack_require__.n(external_webpack_target_webextension_namespaceObject);
10567
- var external_node_module_ = __webpack_require__("node:module");
9915
+ const external_node_module_namespaceObject = require("node:module");
10568
9916
  function manifest_getManifestContent(compilation, manifestPath) {
10569
9917
  var _compilation_getAsset, _compilation_assets;
10570
9918
  if ((null == (_compilation_getAsset = compilation.getAsset) ? void 0 : _compilation_getAsset.call(compilation, 'manifest.json')) || (null == (_compilation_assets = compilation.assets) ? void 0 : _compilation_assets['manifest.json'])) {
@@ -10925,7 +10273,7 @@ var __webpack_exports__ = {};
10925
10273
  else obj[key] = value;
10926
10274
  return obj;
10927
10275
  }
10928
- const requireForEsm = (0, external_node_module_.createRequire)(__rslib_import_meta_url__);
10276
+ const requireForEsm = (0, external_node_module_namespaceObject.createRequire)(__rslib_import_meta_url__);
10929
10277
  function tryLoadWebExtensionFork() {
10930
10278
  try {
10931
10279
  const mod = requireForEsm('./webpack-target-webextension-fork');
@@ -11534,7 +10882,7 @@ var __webpack_exports__ = {};
11534
10882
  }
11535
10883
  class ThrowIfManifestJsonChange {
11536
10884
  readCriticalJsonList() {
11537
- const requireFn = (0, external_node_module_.createRequire)(__rslib_import_meta_url__);
10885
+ const requireFn = (0, external_node_module_namespaceObject.createRequire)(__rslib_import_meta_url__);
11538
10886
  const { getManifestFieldsData } = requireFn('browser-extension-manifest-fields');
11539
10887
  const fields = getManifestFieldsData({
11540
10888
  manifestPath: this.manifestPath,
@@ -12025,7 +11373,7 @@ var __webpack_exports__ = {};
12025
11373
  }
12026
11374
  class ThrowIfManifestIconsChange {
12027
11375
  readIconsList() {
12028
- const requireFn = (0, external_node_module_.createRequire)(__rslib_import_meta_url__);
11376
+ const requireFn = (0, external_node_module_namespaceObject.createRequire)(__rslib_import_meta_url__);
12029
11377
  const { getManifestFieldsData } = requireFn('browser-extension-manifest-fields');
12030
11378
  const fields = getManifestFieldsData({
12031
11379
  manifestPath: this.manifestPath,
@@ -13197,7 +12545,7 @@ var __webpack_exports__ = {};
13197
12545
  if (!filePath) return filePath;
13198
12546
  let normalizedPath = String(filePath).trim();
13199
12547
  if (filePath.startsWith('"') && filePath.endsWith('"') || filePath.startsWith("'") && filePath.endsWith("'")) filePath = filePath.slice(1, -1);
13200
- if (normalizedPath.startsWith('~')) normalizedPath = external_path_.join(external_os_.homedir(), normalizedPath.slice(1));
12548
+ if (normalizedPath.startsWith('~')) normalizedPath = external_path_.join(external_os_namespaceObject.homedir(), normalizedPath.slice(1));
13201
12549
  return normalizedPath;
13202
12550
  };
13203
12551
  const chromiumBinary = normalizePath(options.chromiumBinary);