extension-develop 3.8.6 → 3.8.7-canary.200.6494abb
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/323.cjs +26 -4
- package/dist/535.cjs +13 -0
- package/dist/module.cjs +4 -2
- package/package.json +1 -1
package/dist/323.cjs
CHANGED
|
@@ -97,6 +97,9 @@ exports.modules = {
|
|
|
97
97
|
return null;
|
|
98
98
|
};
|
|
99
99
|
let retries = 0;
|
|
100
|
+
let deferredFirstEvalId = null;
|
|
101
|
+
let deferredUrlDerivedId = null;
|
|
102
|
+
const hasExpectedManifestIdentity = Boolean(expectedName || expectedVersion || expectedManifestVersion);
|
|
100
103
|
while(retries <= maxRetries){
|
|
101
104
|
try {
|
|
102
105
|
const targets = await cdp.getTargets();
|
|
@@ -137,14 +140,20 @@ exports.modules = {
|
|
|
137
140
|
if (expectedVersion && versionMatches && (expectedManifestVersion ? manifestVersionMatches : true) && (!profileCandidateId || id === profileCandidateId)) return id;
|
|
138
141
|
} catch {}
|
|
139
142
|
}
|
|
140
|
-
if (1 === evalIdCount && firstEvalId)
|
|
143
|
+
if (1 === evalIdCount && firstEvalId) {
|
|
144
|
+
if (!hasExpectedManifestIdentity) return firstEvalId;
|
|
145
|
+
deferredFirstEvalId = deferredFirstEvalId || firstEvalId;
|
|
146
|
+
}
|
|
141
147
|
if (profileCandidateId) return profileCandidateId;
|
|
142
|
-
if (urlDerivedId)
|
|
148
|
+
if (urlDerivedId) {
|
|
149
|
+
if (!hasExpectedManifestIdentity) return urlDerivedId;
|
|
150
|
+
deferredUrlDerivedId = deferredUrlDerivedId || urlDerivedId;
|
|
151
|
+
}
|
|
143
152
|
} catch {}
|
|
144
153
|
await new Promise((r)=>setTimeout(r, backoffMs));
|
|
145
154
|
retries++;
|
|
146
155
|
}
|
|
147
|
-
return
|
|
156
|
+
return deriveFromProfile() || deferredFirstEvalId || deferredUrlDerivedId;
|
|
148
157
|
}
|
|
149
158
|
var cdp_client = __webpack_require__("./webpack/plugin-browsers/run-chromium/chromium-source-inspection/cdp-client.ts");
|
|
150
159
|
var discovery = __webpack_require__("./webpack/plugin-browsers/run-chromium/chromium-source-inspection/discovery.ts");
|
|
@@ -283,7 +292,7 @@ exports.modules = {
|
|
|
283
292
|
};
|
|
284
293
|
} catch {}
|
|
285
294
|
try {
|
|
286
|
-
if (!this.extensionId) {
|
|
295
|
+
if (!this.extensionId && this.shouldAttemptLoadUnpacked()) {
|
|
287
296
|
const id = await loadUnpackedIfNeeded(this.cdp, this.outPath);
|
|
288
297
|
if (id) this.extensionId = id;
|
|
289
298
|
}
|
|
@@ -318,6 +327,19 @@ exports.modules = {
|
|
|
318
327
|
if (!this.cdp) return null;
|
|
319
328
|
return await deriveExtensionIdFromTargetsHelper(this.cdp, this.outPath, maxRetries, backoffMs, this.profilePath, this.extensionPaths);
|
|
320
329
|
}
|
|
330
|
+
shouldAttemptLoadUnpacked() {
|
|
331
|
+
const normalizePath = (input)=>{
|
|
332
|
+
try {
|
|
333
|
+
return external_fs_.realpathSync(external_path_.resolve(input));
|
|
334
|
+
} catch {
|
|
335
|
+
return external_path_.resolve(input);
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
const normalizedOutPath = normalizePath(this.outPath);
|
|
339
|
+
const normalizedExtensionPaths = (this.extensionPaths || []).map((candidate)=>String(candidate || '').trim()).filter(Boolean).map(normalizePath);
|
|
340
|
+
if (0 === normalizedExtensionPaths.length) return true;
|
|
341
|
+
return !normalizedExtensionPaths.includes(normalizedOutPath);
|
|
342
|
+
}
|
|
321
343
|
async hardReload() {
|
|
322
344
|
if (!this.cdp || !this.extensionId) return false;
|
|
323
345
|
try {
|
package/dist/535.cjs
CHANGED
|
@@ -8088,11 +8088,19 @@ Set background.noDynamicEntryWarning to true to disable this warning.
|
|
|
8088
8088
|
this.refreshSWFromManifest(stats.compilation);
|
|
8089
8089
|
this.refreshServiceWorkerSourceDependencyPaths(stats.compilation);
|
|
8090
8090
|
this.refreshContentScriptSourceDependencyPaths(stats.compilation);
|
|
8091
|
+
if (!this.hasCompletedSuccessfulBuild) {
|
|
8092
|
+
this.hasCompletedSuccessfulBuild = true;
|
|
8093
|
+
this.firstSuccessfulBuildAtMs = Date.now();
|
|
8094
|
+
this.ctx.clearPendingReloadReason();
|
|
8095
|
+
return;
|
|
8096
|
+
}
|
|
8091
8097
|
const pendingReason = this.ctx.getPendingReloadReason();
|
|
8092
8098
|
const contentScriptEmitted = this.didEmitContentScripts(stats);
|
|
8093
8099
|
const reason = pendingReason || (contentScriptEmitted ? 'content' : void 0);
|
|
8094
8100
|
if (!reason) return;
|
|
8095
8101
|
this.ctx.clearPendingReloadReason();
|
|
8102
|
+
const now = Date.now();
|
|
8103
|
+
if (this.firstSuccessfulBuildAtMs && now - this.firstSuccessfulBuildAtMs < ChromiumHardReloadPlugin.INITIAL_RELOAD_COOLDOWN_MS) return void this.logger?.info?.(`[reload] skipping early reload during startup cooldown (reason:${reason})`);
|
|
8096
8104
|
const ctrl = this.ctx.getController();
|
|
8097
8105
|
if (!ctrl) return;
|
|
8098
8106
|
this.logger?.info?.(`[reload] reloading extension (reason:${reason})`);
|
|
@@ -8191,14 +8199,19 @@ Set background.noDynamicEntryWarning to true to disable this warning.
|
|
|
8191
8199
|
chromium_hard_reload_define_property(this, "ctx", void 0);
|
|
8192
8200
|
chromium_hard_reload_define_property(this, "logger", void 0);
|
|
8193
8201
|
chromium_hard_reload_define_property(this, "warnedDevMode", void 0);
|
|
8202
|
+
chromium_hard_reload_define_property(this, "hasCompletedSuccessfulBuild", void 0);
|
|
8203
|
+
chromium_hard_reload_define_property(this, "firstSuccessfulBuildAtMs", void 0);
|
|
8194
8204
|
chromium_hard_reload_define_property(this, "serviceWorkerSourceDependencyPaths", void 0);
|
|
8195
8205
|
chromium_hard_reload_define_property(this, "contentScriptSourceDependencyPaths", void 0);
|
|
8196
8206
|
this.options = options;
|
|
8197
8207
|
this.ctx = ctx;
|
|
8208
|
+
this.hasCompletedSuccessfulBuild = false;
|
|
8209
|
+
this.firstSuccessfulBuildAtMs = null;
|
|
8198
8210
|
this.serviceWorkerSourceDependencyPaths = new Set();
|
|
8199
8211
|
this.contentScriptSourceDependencyPaths = new Set();
|
|
8200
8212
|
}
|
|
8201
8213
|
}
|
|
8214
|
+
chromium_hard_reload_define_property(ChromiumHardReloadPlugin, "INITIAL_RELOAD_COOLDOWN_MS", 5000);
|
|
8202
8215
|
var shared_utils = __webpack_require__("./webpack/plugin-browsers/browsers-lib/shared-utils.ts");
|
|
8203
8216
|
var cdp_client = __webpack_require__("./webpack/plugin-browsers/run-chromium/chromium-source-inspection/cdp-client.ts");
|
|
8204
8217
|
var instance_registry = __webpack_require__("./webpack/plugin-browsers/browsers-lib/instance-registry.ts");
|
package/dist/module.cjs
CHANGED
|
@@ -127382,7 +127382,9 @@ var __webpack_modules__ = {
|
|
|
127382
127382
|
...data,
|
|
127383
127383
|
pages: filterPublicEntrypoints(data.pages, projectRoot, publicDir),
|
|
127384
127384
|
scripts: filterPublicEntrypoints(data.scripts, projectRoot, publicDir),
|
|
127385
|
-
extensions:
|
|
127385
|
+
extensions: {
|
|
127386
|
+
dir: './extensions'
|
|
127387
|
+
}
|
|
127386
127388
|
};
|
|
127387
127389
|
}
|
|
127388
127390
|
},
|
|
@@ -134817,7 +134819,7 @@ var __webpack_modules__ = {
|
|
|
134817
134819
|
},
|
|
134818
134820
|
"./package.json" (module) {
|
|
134819
134821
|
"use strict";
|
|
134820
|
-
module.exports = JSON.parse('{"rE":"3.8.
|
|
134822
|
+
module.exports = JSON.parse('{"rE":"3.8.7-canary.200.6494abb","El":{"@rspack/core":"^1.7.5","@rspack/dev-server":"^1.1.5","@swc/core":"^1.15.8","@swc/helpers":"^0.5.18","adm-zip":"^0.5.16","browser-extension-manifest-fields":"^2.2.1","case-sensitive-paths-webpack-plugin":"^2.4.0","chrome-location2":"4.0.0","chromium-location":"2.0.0","content-security-policy-parser":"^0.6.0","cross-spawn":"^7.0.6","dotenv":"^17.2.3","edge-location":"2.2.0","extension-from-store":"^0.1.1","firefox-location2":"3.0.0","go-git-it":"^5.1.1","ignore":"^7.0.5","loader-utils":"^3.3.1","magic-string":"^0.30.21","parse5":"^8.0.0","parse5-utilities":"^1.0.0","pintor":"0.3.0","schema-utils":"^4.3.3","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.19.0"}}');
|
|
134821
134823
|
}
|
|
134822
134824
|
};
|
|
134823
134825
|
var __webpack_module_cache__ = {};
|
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"webpack/webpack-lib/build-dependencies.json"
|
|
25
25
|
],
|
|
26
26
|
"name": "extension-develop",
|
|
27
|
-
"version": "3.8.
|
|
27
|
+
"version": "3.8.7-canary.200.6494abb",
|
|
28
28
|
"description": "Develop, build, preview, and package Extension.js projects.",
|
|
29
29
|
"author": {
|
|
30
30
|
"name": "Cezar Augusto",
|