extension-develop 4.0.2 → 4.0.3-canary.328.4af5697

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 (39) hide show
  1. package/dist/0~rspack-config.mjs +97 -108
  2. package/dist/101.mjs +201 -2
  3. package/dist/845.mjs +39 -0
  4. package/dist/css-parse-guard-loader.mjs +26 -0
  5. package/dist/extension-js-devtools/chrome/content_scripts/content-0.js +2 -2
  6. package/dist/extension-js-devtools/chrome/manifest.json +2 -2
  7. package/dist/extension-js-devtools/chromium/content_scripts/content-0.js +2 -2
  8. package/dist/extension-js-devtools/chromium/manifest.json +2 -2
  9. package/dist/extension-js-devtools/edge/content_scripts/content-0.js +2 -2
  10. package/dist/extension-js-devtools/edge/manifest.json +2 -2
  11. package/dist/extension-js-devtools/extension-js/chrome/events.ndjson +2 -2
  12. package/dist/extension-js-devtools/extension-js/chrome/ready.json +5 -5
  13. package/dist/extension-js-devtools/extension-js/chromium/events.ndjson +2 -2
  14. package/dist/extension-js-devtools/extension-js/chromium/ready.json +5 -5
  15. package/dist/extension-js-devtools/extension-js/edge/events.ndjson +2 -2
  16. package/dist/extension-js-devtools/extension-js/edge/ready.json +5 -5
  17. package/dist/extension-js-devtools/extension-js/firefox/events.ndjson +2 -2
  18. package/dist/extension-js-devtools/extension-js/firefox/ready.json +4 -4
  19. package/dist/extension-js-devtools/firefox/content_scripts/content-0.js +2 -2
  20. package/dist/extension-js-devtools/firefox/manifest.json +2 -2
  21. package/dist/extension-js-theme/extension-js/chrome/events.ndjson +2 -2
  22. package/dist/extension-js-theme/extension-js/chrome/ready.json +5 -5
  23. package/dist/extension-js-theme/extension-js/chromium/events.ndjson +2 -2
  24. package/dist/extension-js-theme/extension-js/chromium/ready.json +5 -5
  25. package/dist/extension-js-theme/extension-js/edge/events.ndjson +2 -2
  26. package/dist/extension-js-theme/extension-js/edge/ready.json +5 -5
  27. package/dist/extension-js-theme/extension-js/firefox/events.ndjson +6 -4
  28. package/dist/extension-js-theme/extension-js/firefox/ready.json +5 -5
  29. package/dist/feature-scripts-classic-concat-loader.js +6 -0
  30. package/dist/feature-scripts-classic-concat-loader.mjs +6 -0
  31. package/package.json +1 -1
  32. package/dist/extension-js-devtools/chrome/scripts/logger-client.js +0 -1
  33. package/dist/extension-js-devtools/chromium/scripts/logger-client.js +0 -1
  34. package/dist/extension-js-devtools/edge/scripts/logger-client.js +0 -1
  35. package/dist/extension-js-devtools/firefox/scripts/logger-client.js +0 -1
  36. /package/dist/extension-js-devtools/chrome/{icons → images}/logo.png +0 -0
  37. /package/dist/extension-js-devtools/chromium/{icons → images}/logo.png +0 -0
  38. /package/dist/extension-js-devtools/edge/{icons → images}/logo.png +0 -0
  39. /package/dist/extension-js-devtools/firefox/{icons → images}/logo.png +0 -0
package/dist/845.mjs ADDED
@@ -0,0 +1,39 @@
1
+ import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
+ import pintor from "pintor";
3
+ function cssIntegrationsEnabled(integrations) {
4
+ const list = integrations.length > 0 ? integrations.map((n)=>pintor.yellow(n)).join(', ') : pintor.gray('none');
5
+ return `${pintor.gray('⏵⏵⏵')} CSS: Integrations enabled (${pintor.gray(String(integrations.length))}) ${list}`;
6
+ }
7
+ function cssConfigsDetected(postcssConfig, tailwindConfig, browserslistSource) {
8
+ const fmt = (v)=>v ? pintor.underline(v) : pintor.gray('none');
9
+ return `${pintor.gray('⏵⏵⏵')} CSS: Configs\n${pintor.gray('POSTCSS')} ${fmt(postcssConfig)}\n${pintor.gray('TAILWIND')} ${fmt(tailwindConfig)}\n${pintor.gray('BROWSERSLIST')} ${fmt(browserslistSource)}`;
10
+ }
11
+ function isUsingIntegration(name) {
12
+ return `${pintor.gray('⏵⏵⏵')} Using ${pintor.brightBlue(name)}...`;
13
+ }
14
+ function missingSassDependency() {
15
+ const prefix = pintor.red('⏵⏵⏵');
16
+ return [
17
+ `${prefix} SASS support requires the ${pintor.brightBlue('"sass"')} package to be installed in your project.`,
18
+ '',
19
+ "Add it to your devDependencies, for example:",
20
+ ` ${pintor.gray('npm install --save-dev sass')}`,
21
+ ` ${pintor.gray('pnpm add -D sass')}`,
22
+ '',
23
+ 'Sample package.json:',
24
+ ' {',
25
+ ' "devDependencies": {',
26
+ ` "sass": ${pintor.yellow('"<version>"')}`,
27
+ ' }',
28
+ ' }'
29
+ ].join('\n');
30
+ }
31
+ function cssParseErrorShippedVerbatim(resourcePath, error) {
32
+ const reason = error && 'object' == typeof error && 'reason' in error ? String(error.reason) : String(error?.message || error);
33
+ return [
34
+ `${pintor.yellow('⏵⏵⏵')} Invalid CSS in ${pintor.underline(resourcePath)} — ${reason}.`,
35
+ 'Browsers skip invalid rules, so the stylesheet was copied as-is instead of failing the build.',
36
+ 'PostCSS/Tailwind processing was NOT applied to this file. Fix the CSS to re-enable it.'
37
+ ].join('\n');
38
+ }
39
+ export { cssConfigsDetected, cssIntegrationsEnabled, cssParseErrorShippedVerbatim, isUsingIntegration, missingSassDependency };
@@ -0,0 +1,26 @@
1
+ import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
+ import postcss from "postcss";
3
+ import { cssParseErrorShippedVerbatim } from "./845.mjs";
4
+ import * as __rspack_external_fs from "fs";
5
+ function cssParseGuardLoader(source) {
6
+ return source;
7
+ }
8
+ function pitch() {
9
+ const callback = this.async();
10
+ if (!this.resourcePath || !this.resourcePath.endsWith('.css')) return void callback(null);
11
+ __rspack_external_fs.promises.readFile(this.resourcePath, 'utf8').then((raw)=>{
12
+ try {
13
+ postcss.parse(raw, {
14
+ from: this.resourcePath
15
+ });
16
+ callback(null);
17
+ } catch (error) {
18
+ this.emitWarning(new Error(cssParseErrorShippedVerbatim(this.resourcePath, error)));
19
+ callback(null, raw);
20
+ }
21
+ }).catch(()=>{
22
+ callback(null);
23
+ });
24
+ }
25
+ export default cssParseGuardLoader;
26
+ export { pitch };