extension-develop 4.0.6-canary.1783462592.17361127 → 4.0.6
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/0~rspack-config.mjs +1 -104
- package/dist/101.mjs +1 -1
- package/dist/224.mjs +1 -4
- package/dist/extension-js-devtools/chrome/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/chrome/pages/centralized-logger.js +4 -4
- package/dist/extension-js-devtools/chrome/pages/welcome.js +1 -1
- package/dist/extension-js-devtools/chromium/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/chromium/pages/centralized-logger.js +4 -4
- package/dist/extension-js-devtools/chromium/pages/welcome.js +1 -1
- package/dist/extension-js-devtools/edge/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/edge/pages/centralized-logger.js +4 -4
- package/dist/extension-js-devtools/edge/pages/welcome.js +1 -1
- package/dist/extension-js-devtools/extension-js/chrome/events.ndjson +2 -2
- package/dist/extension-js-devtools/extension-js/chrome/ready.json +7 -7
- package/dist/extension-js-devtools/extension-js/chromium/events.ndjson +2 -2
- package/dist/extension-js-devtools/extension-js/chromium/ready.json +7 -7
- package/dist/extension-js-devtools/extension-js/edge/events.ndjson +2 -2
- package/dist/extension-js-devtools/extension-js/edge/ready.json +7 -7
- package/dist/extension-js-devtools/extension-js/firefox/events.ndjson +2 -2
- package/dist/extension-js-devtools/extension-js/firefox/ready.json +7 -7
- package/dist/extension-js-devtools/firefox/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/firefox/pages/centralized-logger.js +4 -4
- package/dist/extension-js-devtools/firefox/pages/welcome.js +1 -1
- package/dist/extension-js-theme/extension-js/chrome/events.ndjson +2 -2
- package/dist/extension-js-theme/extension-js/chrome/ready.json +7 -7
- package/dist/extension-js-theme/extension-js/chromium/events.ndjson +2 -2
- package/dist/extension-js-theme/extension-js/chromium/ready.json +7 -7
- package/dist/extension-js-theme/extension-js/edge/events.ndjson +2 -2
- package/dist/extension-js-theme/extension-js/edge/ready.json +7 -7
- package/dist/extension-js-theme/extension-js/firefox/events.ndjson +4 -48
- package/dist/extension-js-theme/extension-js/firefox/ready.json +7 -7
- package/package.json +1 -1
- package/dist/extension-js-theme/chromium/Cached Theme.pak +0 -0
package/dist/0~rspack-config.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import { stripBom, parseJsonSafe } from "./23.mjs";
|
|
|
19
19
|
import { scrubBrand, makeSanitizedConsole } from "./0~branding.mjs";
|
|
20
20
|
import { cssIntegrationsEnabled, cssConfigsDetected, missingSassDependency, isUsingIntegration, postCssPluginNotResolved } from "./845.mjs";
|
|
21
21
|
import { isUsingTypeScript, jsFrameworksIntegrationsEnabled, ensureTypeScriptConfig, ensureOptionalContractModuleLoaded, resolveDevelopInstallRoot, getUserTypeScriptConfigFile, isUsingCustomLoader, isUsingIntegration as messages_isUsingIntegration, loadOptionalContractModuleWithoutInstall, resolveOptionalContractPackageWithoutInstall, jsFrameworksHmrSummary, jsFrameworksConfigsDetected, hasDependency, resolveDevelopDistFile, optional_deps_resolver_ensureOptionalContractPackageResolved } from "./839.mjs";
|
|
22
|
-
import { injectedFileDependencyMissing,
|
|
22
|
+
import { injectedFileDependencyMissing, findNearestPackageJsonSync, backgroundIsRequiredMessageOnly, fetchedFileDependencyMissing, importScriptsDependencyMissing } from "./224.mjs";
|
|
23
23
|
import { fileURLToPath as __rspack_fileURLToPath } from "node:url";
|
|
24
24
|
import { dirname as __rspack_dirname } from "node:path";
|
|
25
25
|
var __rspack_import_meta_dirname__ = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
|
|
@@ -8080,7 +8080,6 @@ class TraceRuntimeLoadedFiles {
|
|
|
8080
8080
|
this.traceWorkerImportScripts(compilation);
|
|
8081
8081
|
this.traceInjectedFilePayloads(compilation);
|
|
8082
8082
|
this.traceFetchedFiles(compilation, compiler);
|
|
8083
|
-
this.traceGetURLFiles(compilation);
|
|
8084
8083
|
});
|
|
8085
8084
|
});
|
|
8086
8085
|
}
|
|
@@ -8173,63 +8172,6 @@ class TraceRuntimeLoadedFiles {
|
|
|
8173
8172
|
}
|
|
8174
8173
|
}
|
|
8175
8174
|
}
|
|
8176
|
-
traceGetURLFiles(compilation) {
|
|
8177
|
-
const manifestDir = __rspack_external_path.dirname(this.manifestPath);
|
|
8178
|
-
const declaredSurfaces = manifestDeclaredSourcePaths(this.readManifest());
|
|
8179
|
-
const seen = new Set();
|
|
8180
|
-
let pending = compilation.getAssets().filter((asset)=>/\.js$/i.test(asset.name)).map((asset)=>({
|
|
8181
|
-
kind: 'js',
|
|
8182
|
-
content: asset.source.source().toString(),
|
|
8183
|
-
assetName: asset.name
|
|
8184
|
-
}));
|
|
8185
|
-
for(let depth = 0; depth < MAX_TRACE_DEPTH && pending.length; depth++){
|
|
8186
|
-
const next = [];
|
|
8187
|
-
for (const item of pending){
|
|
8188
|
-
const refs = 'js' === item.kind ? extractGetURLLiterals(item.content).map((literal)=>({
|
|
8189
|
-
literal,
|
|
8190
|
-
baseRel: ''
|
|
8191
|
-
})) : extractHtmlSubresourceLiterals(item.content).map((literal)=>({
|
|
8192
|
-
literal,
|
|
8193
|
-
baseRel: item.baseRel
|
|
8194
|
-
}));
|
|
8195
|
-
for (const { literal, baseRel } of refs){
|
|
8196
|
-
const distRel = resolveExtensionPath(literal, baseRel);
|
|
8197
|
-
if (!distRel || seen.has(distRel)) continue;
|
|
8198
|
-
seen.add(distRel);
|
|
8199
|
-
if (declaredSurfaces.has(distRel)) continue;
|
|
8200
|
-
if (compilation.getAsset(distRel)) continue;
|
|
8201
|
-
if (__rspack_external_fs.existsSync(__rspack_external_path.join(manifestDir, 'public', distRel))) continue;
|
|
8202
|
-
const abs = __rspack_external_path.join(manifestDir, distRel);
|
|
8203
|
-
if (!__rspack_external_path.relative(manifestDir, abs).startsWith('..') && __rspack_external_fs.existsSync(abs) && __rspack_external_fs.statSync(abs).isFile()) {
|
|
8204
|
-
const buffer = __rspack_external_fs.readFileSync(abs);
|
|
8205
|
-
compilation.emitAsset(distRel, new core_sources.RawSource(buffer));
|
|
8206
|
-
try {
|
|
8207
|
-
compilation.fileDependencies.add(abs);
|
|
8208
|
-
} catch {}
|
|
8209
|
-
if (/\.js$/i.test(distRel)) next.push({
|
|
8210
|
-
kind: 'js',
|
|
8211
|
-
content: buffer.toString(),
|
|
8212
|
-
assetName: distRel
|
|
8213
|
-
});
|
|
8214
|
-
else if (/\.html?$/i.test(distRel)) next.push({
|
|
8215
|
-
kind: 'html',
|
|
8216
|
-
content: buffer.toString(),
|
|
8217
|
-
baseRel: distRel
|
|
8218
|
-
});
|
|
8219
|
-
continue;
|
|
8220
|
-
}
|
|
8221
|
-
if ('js' === item.kind && /\.[a-zA-Z0-9]{1,8}$/.test(distRel)) {
|
|
8222
|
-
const warn = new core_WebpackError(getURLDependencyMissing(item.assetName, literal, distRel));
|
|
8223
|
-
warn.name = 'RuntimeGetURLFileMissing';
|
|
8224
|
-
warn.file = item.assetName;
|
|
8225
|
-
compilation.warnings ||= [];
|
|
8226
|
-
compilation.warnings.push(warn);
|
|
8227
|
-
}
|
|
8228
|
-
}
|
|
8229
|
-
}
|
|
8230
|
-
pending = next;
|
|
8231
|
-
}
|
|
8232
|
-
}
|
|
8233
8175
|
traceInjectedFilePayloads(compilation) {
|
|
8234
8176
|
const manifestDir = __rspack_external_path.dirname(this.manifestPath);
|
|
8235
8177
|
const seen = new Set();
|
|
@@ -8304,51 +8246,6 @@ function resolveExtensionPath(literal, basePath) {
|
|
|
8304
8246
|
return null;
|
|
8305
8247
|
}
|
|
8306
8248
|
}
|
|
8307
|
-
function manifestDeclaredSourcePaths(manifest) {
|
|
8308
|
-
const declared = new Set();
|
|
8309
|
-
if (!manifest) return declared;
|
|
8310
|
-
const add = (value)=>{
|
|
8311
|
-
if ('string' == typeof value && value.trim()) declared.add(trace_runtime_loaded_files_unixify(value.trim()).replace(/^\/+/, '').split(/[?#]/)[0]);
|
|
8312
|
-
};
|
|
8313
|
-
add(manifest.background?.service_worker);
|
|
8314
|
-
add(manifest.background?.page);
|
|
8315
|
-
for (const script of manifest.background?.scripts ?? [])add(script);
|
|
8316
|
-
add(manifest.action?.default_popup);
|
|
8317
|
-
add(manifest.browser_action?.default_popup);
|
|
8318
|
-
add(manifest.page_action?.default_popup);
|
|
8319
|
-
add(manifest.options_page);
|
|
8320
|
-
add(manifest.options_ui?.page);
|
|
8321
|
-
add(manifest.devtools_page);
|
|
8322
|
-
add(manifest.side_panel?.default_path);
|
|
8323
|
-
add(manifest.sidebar_action?.default_panel);
|
|
8324
|
-
for (const page of Object.values(manifest.chrome_url_overrides ?? {}))add(page);
|
|
8325
|
-
for (const contentScript of manifest.content_scripts ?? []){
|
|
8326
|
-
for (const js of contentScript?.js ?? [])add(js);
|
|
8327
|
-
for (const css of contentScript?.css ?? [])add(css);
|
|
8328
|
-
}
|
|
8329
|
-
return declared;
|
|
8330
|
-
}
|
|
8331
|
-
function extractGetURLLiterals(source) {
|
|
8332
|
-
const code = blankComments(source);
|
|
8333
|
-
const literals = [];
|
|
8334
|
-
const callRe = /\bruntime\s*\.\s*getURL\s*\(/g;
|
|
8335
|
-
let match;
|
|
8336
|
-
while(match = callRe.exec(code)){
|
|
8337
|
-
const args = readBalancedArgs(code, match.index + match[0].length - 1);
|
|
8338
|
-
if (null == args) continue;
|
|
8339
|
-
const [first] = splitTopLevelArgs(args);
|
|
8340
|
-
const literal = null == first ? null : pureStringLiteral(first);
|
|
8341
|
-
if (null != literal) literals.push(literal);
|
|
8342
|
-
}
|
|
8343
|
-
return literals;
|
|
8344
|
-
}
|
|
8345
|
-
function extractHtmlSubresourceLiterals(html) {
|
|
8346
|
-
const literals = [];
|
|
8347
|
-
const attrRe = /\b(?:src|href)\s*=\s*(["'])([^"']+)\1/gi;
|
|
8348
|
-
let match;
|
|
8349
|
-
while(match = attrRe.exec(html))literals.push(match[2]);
|
|
8350
|
-
return literals;
|
|
8351
|
-
}
|
|
8352
8249
|
function extractImportScriptsLiterals(source) {
|
|
8353
8250
|
const code = blankComments(source);
|
|
8354
8251
|
const literals = [];
|
package/dist/101.mjs
CHANGED
|
@@ -673,7 +673,7 @@ async function config_loader_isUsingExperimentalConfig(projectPath) {
|
|
|
673
673
|
}
|
|
674
674
|
return false;
|
|
675
675
|
}
|
|
676
|
-
var package_namespaceObject = /*#__PURE__*/ JSON.parse('{"rE":"4.0.6
|
|
676
|
+
var package_namespaceObject = /*#__PURE__*/ JSON.parse('{"rE":"4.0.6","El":{"@prefresh/core":"1.5.9","@prefresh/utils":"1.2.1","@rspack/core":"^2.1.1","@rspack/dev-server":"2.1.0","@rspack/plugin-preact-refresh":"2.0.1","@rspack/plugin-react-refresh":"2.0.2","@vue/compiler-sfc":"3.5.26","adm-zip":"^0.5.16","browser-extension-manifest-fields":"^2.2.9","case-sensitive-paths-webpack-plugin":"^2.4.0","content-security-policy-parser":"^0.6.0","dotenv":"^17.2.3","es-module-lexer":"^2.1.0","extension-from-store":"^0.1.1","go-git-it":"^5.1.5","ignore":"^7.0.5","less":"4.6.7","less-loader":"13.0.0","parse5-utilities":"^1.0.0","pintor":"0.3.0","postcss":"8.5.10","postcss-loader":"8.2.1","postcss-preset-env":"11.1.1","postcss-scss":"4.0.9","preact":"10.27.3","prefers-yarn":"2.0.1","react-refresh":"0.18.0","sass-loader":"17.0.0","schema-utils":"^4.3.3","svelte-loader":"3.2.4","tiny-glob":"^0.2.9","typescript":"5.9.3","vue":"3.5.26","vue-loader":"17.4.2","webextension-polyfill":"^0.12.0","webpack-merge":"^6.0.1","webpack-target-webextension":"^2.1.3","ws":"^8.20.1"}}');
|
|
677
677
|
function asAbsolute(p) {
|
|
678
678
|
return __rspack_external_path.isAbsolute(p) ? p : __rspack_external_path.resolve(p);
|
|
679
679
|
}
|
package/dist/224.mjs
CHANGED
|
@@ -39,11 +39,8 @@ function injectedFileDependencyMissing(assetName, literal, expectedPath, sourceS
|
|
|
39
39
|
function fetchedFileDependencyMissing(assetName, literal, expectedPath) {
|
|
40
40
|
return `${pintor.yellow(assetName)} loads ${pintor.yellow(`'${literal}'`)} at runtime (fetch/XMLHttpRequest/new URL), but ${pintor.yellow(expectedPath)} is not part of the output. The request will fail at runtime.\nMove the file so it resolves to ${pintor.yellow(expectedPath)} (or serve it from ${pintor.yellow('public/')}) so it ships with the extension.`;
|
|
41
41
|
}
|
|
42
|
-
function getURLDependencyMissing(assetName, literal, expectedPath) {
|
|
43
|
-
return `${pintor.yellow(assetName)} references ${pintor.yellow(`'${literal}'`)} via chrome.runtime.getURL(), but ${pintor.yellow(expectedPath)} is not part of the output. The reference will fail at runtime.\nMove the file to ${pintor.yellow(expectedPath)} (or ${pintor.yellow('public/')}) so it ships with the extension.`;
|
|
44
|
-
}
|
|
45
42
|
function reservedScriptsFolder(relPath, indicators) {
|
|
46
43
|
const reasons = indicators.map((r)=>`- ${pintor.gray(r)}`).join('\n');
|
|
47
44
|
return `${pintor.red('ERROR')} scripts/ is a reserved folder in Extension.js.\nEvery file under ${pintor.yellow("scripts/")} is wrapped with the browser content-script mount runtime, so Node.js-only files placed here will fail to parse or run.\nRename the folder at the project root (for example ${pintor.yellow('bin/')}, ${pintor.yellow('tools/')}, ${pintor.yellow('ops/')}, ${pintor.yellow('tasks/')}, or ${pintor.yellow("ci-scripts/")}) or move the file out of scripts/.\n\n${pintor.red('NODE.JS SHAPE')}\n${reasons}\n${pintor.red('NOT ALLOWED')} ${pintor.underline(relPath)}`;
|
|
48
45
|
}
|
|
49
|
-
export { backgroundIsRequiredMessageOnly, fetchedFileDependencyMissing, findNearestPackageJsonSync,
|
|
46
|
+
export { backgroundIsRequiredMessageOnly, fetchedFileDependencyMissing, findNearestPackageJsonSync, importScriptsDependencyMissing, injectedFileDependencyMissing, reservedScriptsFolder };
|