extension-develop 0.0.0-next-20250827140428 → 0.0.0-next-20250827162326
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
|
@@ -314,6 +314,16 @@ var __webpack_modules__ = {
|
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
+
async ensureDataDirectory() {
|
|
318
|
+
const dataDir = this.getDataDirectory();
|
|
319
|
+
try {
|
|
320
|
+
await fs_promises__WEBPACK_IMPORTED_MODULE_0__.access(dataDir);
|
|
321
|
+
} catch {
|
|
322
|
+
await fs_promises__WEBPACK_IMPORTED_MODULE_0__.mkdir(dataDir, {
|
|
323
|
+
recursive: true
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
}
|
|
317
327
|
async loadRegistry() {
|
|
318
328
|
try {
|
|
319
329
|
await this.ensureRegistryDir();
|
|
@@ -495,6 +505,7 @@ var __webpack_modules__ = {
|
|
|
495
505
|
if ('development' === process.env.EXTENSION_ENV) console.log(_webpack_webpack_lib_messages__WEBPACK_IMPORTED_MODULE_5__.JJ());
|
|
496
506
|
}
|
|
497
507
|
async createInstance(browser, projectPath, requestedPort) {
|
|
508
|
+
await this.ensureDataDirectory();
|
|
498
509
|
const lockPath = path__WEBPACK_IMPORTED_MODULE_1__.join(this.getDataDirectory(), 'instances.lock');
|
|
499
510
|
let lockHandle = null;
|
|
500
511
|
for(let attempt = 0; attempt < 10; attempt++)try {
|
|
@@ -507,6 +518,7 @@ var __webpack_modules__ = {
|
|
|
507
518
|
}
|
|
508
519
|
throw err;
|
|
509
520
|
}
|
|
521
|
+
if (!lockHandle) throw new Error('Failed to acquire instance lock after 10 attempts');
|
|
510
522
|
if ('development' === process.env.EXTENSION_ENV) console.log(_webpack_webpack_lib_messages__WEBPACK_IMPORTED_MODULE_5__.jE({
|
|
511
523
|
browser,
|
|
512
524
|
projectPath,
|
|
@@ -3155,28 +3167,28 @@ var __webpack_modules__ = {
|
|
|
3155
3167
|
yz: ()=>portManagerErrorAllocatingPorts,
|
|
3156
3168
|
zd: ()=>instanceManagerHealthMonitoringOrphaned
|
|
3157
3169
|
});
|
|
3158
|
-
var
|
|
3159
|
-
var
|
|
3160
|
-
var
|
|
3170
|
+
var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("path");
|
|
3171
|
+
var pintor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pintor");
|
|
3172
|
+
var pintor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(pintor__WEBPACK_IMPORTED_MODULE_0__);
|
|
3161
3173
|
var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./webpack/webpack-lib/constants.ts");
|
|
3162
3174
|
function getLoggingPrefix(feature, type) {
|
|
3163
|
-
if ('error' === type) return `${
|
|
3164
|
-
if ('warn' === type) return `${
|
|
3165
|
-
const arrow = 'info' === type ?
|
|
3175
|
+
if ('error' === type) return `${pintor__WEBPACK_IMPORTED_MODULE_0___default().red('ERROR')} ${feature}`;
|
|
3176
|
+
if ('warn' === type) return `${pintor__WEBPACK_IMPORTED_MODULE_0___default().brightYellow("\u25BA\u25BA\u25BA")} ${feature}`;
|
|
3177
|
+
const arrow = 'info' === type ? pintor__WEBPACK_IMPORTED_MODULE_0___default().blue("\u25BA\u25BA\u25BA") : pintor__WEBPACK_IMPORTED_MODULE_0___default().green("\u25BA\u25BA\u25BA");
|
|
3166
3178
|
return `${arrow} ${feature}`;
|
|
3167
3179
|
}
|
|
3168
3180
|
function boring(manifestName, duration, stats) {
|
|
3169
3181
|
let didShow = false;
|
|
3170
3182
|
if (!didShow) {
|
|
3171
|
-
const arrow = stats.hasErrors() ?
|
|
3172
|
-
return `${arrow} ${manifestName} compiled ${stats.hasErrors() ?
|
|
3183
|
+
const arrow = stats.hasErrors() ? pintor__WEBPACK_IMPORTED_MODULE_0___default().red("\u25BA\u25BA\u25BA") : pintor__WEBPACK_IMPORTED_MODULE_0___default().green("\u25BA\u25BA\u25BA");
|
|
3184
|
+
return `${arrow} ${manifestName} compiled ${stats.hasErrors() ? pintor__WEBPACK_IMPORTED_MODULE_0___default().red('with errors') : pintor__WEBPACK_IMPORTED_MODULE_0___default().green('successfully')} in ${duration} ms.`;
|
|
3173
3185
|
}
|
|
3174
3186
|
}
|
|
3175
3187
|
function integrationNotInstalled(integration, packageManager) {
|
|
3176
|
-
return `${getLoggingPrefix(integration, 'info')} Using ${integration}. Installing required dependencies via ${
|
|
3188
|
+
return `${getLoggingPrefix(integration, 'info')} Using ${integration}. Installing required dependencies via ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(packageManager)}...`;
|
|
3177
3189
|
}
|
|
3178
3190
|
function isUsingIntegration(integration) {
|
|
3179
|
-
return `${
|
|
3191
|
+
return `${pintor__WEBPACK_IMPORTED_MODULE_0___default().blue("\u25BA\u25BA\u25BA")} Using ${pintor__WEBPACK_IMPORTED_MODULE_0___default().brightBlue(integration)}...`;
|
|
3180
3192
|
}
|
|
3181
3193
|
function youAreAllSet(integration) {
|
|
3182
3194
|
return `${getLoggingPrefix(integration, 'success')} installation completed. Run the program again and happy hacking.`;
|
|
@@ -3185,14 +3197,14 @@ var __webpack_modules__ = {
|
|
|
3185
3197
|
return `${getLoggingPrefix(integration, 'info')} dependencies are being installed. This only happens for core contributors...`;
|
|
3186
3198
|
}
|
|
3187
3199
|
function integrationInstalledSuccessfully(integration) {
|
|
3188
|
-
return `${getLoggingPrefix(integration, 'success')} dependencies installed ${
|
|
3200
|
+
return `${getLoggingPrefix(integration, 'success')} dependencies installed ${pintor__WEBPACK_IMPORTED_MODULE_0___default().green('successfully')}.`;
|
|
3189
3201
|
}
|
|
3190
3202
|
function failedToInstallIntegration(integration, error) {
|
|
3191
|
-
return `${getLoggingPrefix('Integration', 'error')} ${
|
|
3203
|
+
return `${getLoggingPrefix('Integration', 'error')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(integration)} Installation Error\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().red('Failed to detect package manager or install dependencies.')}\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().red(String(error ?? ''))}`;
|
|
3192
3204
|
}
|
|
3193
3205
|
function fileNotFound(errorSourcePath, missingFilePath) {
|
|
3194
3206
|
if (!errorSourcePath) throw new Error('This operation is impossible. Please report a bug.');
|
|
3195
|
-
switch(
|
|
3207
|
+
switch(path__WEBPACK_IMPORTED_MODULE_1__.extname(missingFilePath)){
|
|
3196
3208
|
case '.js':
|
|
3197
3209
|
case '.ts':
|
|
3198
3210
|
case '.jsx':
|
|
@@ -3212,99 +3224,99 @@ var __webpack_modules__ = {
|
|
|
3212
3224
|
const contentIndex = manifestField.split('-')[1];
|
|
3213
3225
|
const isPage = manifestField.startsWith('pages');
|
|
3214
3226
|
const field = manifestName.includes("content_scripts") ? `(index ${contentIndex})\n\n` : manifestFieldName;
|
|
3215
|
-
return `${getLoggingPrefix('manifest.json', 'error')} File Not Found\n\n${isPage ? `Check the ${
|
|
3227
|
+
return `${getLoggingPrefix('manifest.json', 'error')} File Not Found\n\n${isPage ? `Check the ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow('pages')} folder in your project root directory.\n\n` : `Check the ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow(field)} field in your ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow('manifest.json')} file.\n\n`}${pintor__WEBPACK_IMPORTED_MODULE_0___default().red('NOT FOUND')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(filePath)}`;
|
|
3216
3228
|
}
|
|
3217
3229
|
function entryNotFoundWarn(manifestField, filePath) {
|
|
3218
|
-
return `File Not Found\n\nCheck the ${
|
|
3230
|
+
return `File Not Found\n\nCheck the ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow(manifestField)} field in your ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow('manifest.json')} file.\n\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().red('NOT FOUND')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(filePath)}`;
|
|
3219
3231
|
}
|
|
3220
3232
|
function manifestInvalidError(error) {
|
|
3221
|
-
return `${getLoggingPrefix('manifest.json', 'error')} Invalid Manifest\n\nUpdate your ${
|
|
3233
|
+
return `${getLoggingPrefix('manifest.json', 'error')} Invalid Manifest\n\nUpdate your ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow('manifest.json')} file and try again.\n\n` + pintor__WEBPACK_IMPORTED_MODULE_0___default().red(error.toString());
|
|
3222
3234
|
}
|
|
3223
3235
|
function serverRestartRequiredFromManifestError(fileAdded, fileRemoved) {
|
|
3224
|
-
const fileRemovedText = fileRemoved ? `${
|
|
3225
|
-
const fileAddedText = fileAdded ? `${
|
|
3236
|
+
const fileRemovedText = fileRemoved ? `${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('PATH')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().red('REMOVED')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(fileRemoved)}\n` : '';
|
|
3237
|
+
const fileAddedText = fileAdded ? `${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('PATH')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().green('ADDED')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(fileAdded)}` : '';
|
|
3226
3238
|
return `${getLoggingPrefix('manifest.json', 'error')} Manifest Entry Point Modification\nChanging the path of HTML or script files in manifest.json after compilation requires a server restart.\n` + fileRemovedText + fileAddedText;
|
|
3227
3239
|
}
|
|
3228
3240
|
function serverRestartRequiredFromSpecialFolderError(addingOrRemoving, folder, typeOfAsset, pathRelative) {
|
|
3229
|
-
return `${getLoggingPrefix('manifest.json', 'error')} Manifest Entry Point Modification\n${
|
|
3241
|
+
return `${getLoggingPrefix('manifest.json', 'error')} Manifest Entry Point Modification\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(pathRelative)} in the ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(folder + '/')} folder after compilation requires a server restart.`;
|
|
3230
3242
|
}
|
|
3231
3243
|
function manifestNotFoundError(manifestName, manifestPath) {
|
|
3232
|
-
return `${getLoggingPrefix('manifest.json', 'error')} Manifest Not Found\n\nEnsure you have a ${
|
|
3244
|
+
return `${getLoggingPrefix('manifest.json', 'error')} Manifest Not Found\n\nEnsure you have a ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow('manifest.json')} file at the root directory of your project.\n\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().red('NOT FOUND')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(manifestPath)}`;
|
|
3233
3245
|
}
|
|
3234
3246
|
function creatingTSConfig() {
|
|
3235
|
-
return `${getLoggingPrefix('TypeScript', 'info')} is being used but no config file was found. Creating ${
|
|
3247
|
+
return `${getLoggingPrefix('TypeScript', 'info')} is being used but no config file was found. Creating ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow('tsconfig.json')}...`;
|
|
3236
3248
|
}
|
|
3237
3249
|
function backgroundIsRequired(backgroundChunkName, filePath) {
|
|
3238
|
-
return `${getLoggingPrefix('manifest.json', 'error')} File Not Found\nCheck the ${
|
|
3250
|
+
return `${getLoggingPrefix('manifest.json', 'error')} File Not Found\nCheck the ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow(backgroundChunkName.replace('/', '.'))} field in your ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow('manifest.json')} file.\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().red('NOT FOUND')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(filePath)}`;
|
|
3239
3251
|
}
|
|
3240
3252
|
function serverRestartRequiredFromHtml(filePath) {
|
|
3241
|
-
return `${getLoggingPrefix('HTML', 'warn')} Entrypoint Change\nDetected changes to ${
|
|
3253
|
+
return `${getLoggingPrefix('HTML', 'warn')} Entrypoint Change\nDetected changes to ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow("<script>")} or ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow('<link rel="stylesheet">')} references in HTML. The extension will undergo a full recompilation and a reload.\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('PATH')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(filePath)}`;
|
|
3242
3254
|
}
|
|
3243
3255
|
function javaScriptError(errorSourcePath, missingFilePath) {
|
|
3244
|
-
return `${getLoggingPrefix('HTML', 'error')} File Not Found\nCheck your ${
|
|
3256
|
+
return `${getLoggingPrefix('HTML', 'error')} File Not Found\nCheck your ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow("<script>")} tags in ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(errorSourcePath)}.\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().red('NOT FOUND')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(missingFilePath)}`;
|
|
3245
3257
|
}
|
|
3246
3258
|
function cssError(errorSourcePath, missingFilePath) {
|
|
3247
|
-
return `${getLoggingPrefix('HTML', 'error')} File Not Found\nCheck your ${
|
|
3259
|
+
return `${getLoggingPrefix('HTML', 'error')} File Not Found\nCheck your ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow('<link>')} tags in ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(errorSourcePath)}.\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().red('NOT FOUND')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(missingFilePath)}`;
|
|
3248
3260
|
}
|
|
3249
3261
|
function staticAssetError(errorSourcePath, missingFilePath) {
|
|
3250
|
-
const extname =
|
|
3251
|
-
return `${getLoggingPrefix('HTML', 'warn')} File Not Found\nCheck your ${
|
|
3262
|
+
const extname = path__WEBPACK_IMPORTED_MODULE_1__.extname(missingFilePath);
|
|
3263
|
+
return `${getLoggingPrefix('HTML', 'warn')} File Not Found\nCheck your ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow('*' + extname)} assets in ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(errorSourcePath)}.\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().red('NOT FOUND')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(missingFilePath)}`;
|
|
3252
3264
|
}
|
|
3253
3265
|
function certRequired() {
|
|
3254
|
-
return `${
|
|
3266
|
+
return `${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow('Note')}: Firefox requires a secure certificate for localhost connections, needed for the reloader to work.\nBy default, your ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow('manifest.json')} file is not being watched. To enable this feature, run:\n\n npx -y ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('mkcert-cli')} \\\n ${pintor__WEBPACK_IMPORTED_MODULE_0___default().blue('--outDir')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(_constants__WEBPACK_IMPORTED_MODULE_2__.KI)} \\\n ${pintor__WEBPACK_IMPORTED_MODULE_0___default().blue('--cert')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow('localhost.cert')} \\\n ${pintor__WEBPACK_IMPORTED_MODULE_0___default().blue('--key')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow('localhost.key')}\n\nThis will enable the secure certificate needed for Firefox via ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('mkcert')}.\n\nLearn more about ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('mkcert')}: ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline('https://github.com/FiloSottile/mkcert')}`;
|
|
3255
3267
|
}
|
|
3256
3268
|
function defaultPortInUse(port) {
|
|
3257
|
-
return `${getLoggingPrefix('Port', 'error')} Selected port ${
|
|
3269
|
+
return `${getLoggingPrefix('Port', 'error')} Selected port ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(port.toString())} in use. Choose a new port. `;
|
|
3258
3270
|
}
|
|
3259
3271
|
function portInUse(requestedPort, newPort) {
|
|
3260
|
-
return `${getLoggingPrefix('Port', 'warn')} Requested port ${
|
|
3272
|
+
return `${getLoggingPrefix('Port', 'warn')} Requested port ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(requestedPort.toString())} is in use; using ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(newPort.toString())} instead.`;
|
|
3261
3273
|
}
|
|
3262
3274
|
function noExtensionIdError() {
|
|
3263
|
-
return `${getLoggingPrefix('manifest.json', 'error')} Extension ID Not Defined\nFor MAIN world content_scripts, the extension ID must be specified.\nEnsure your extension have a fixed ID and that the ${
|
|
3275
|
+
return `${getLoggingPrefix('manifest.json', 'error')} Extension ID Not Defined\nFor MAIN world content_scripts, the extension ID must be specified.\nEnsure your extension have a fixed ID and that the ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow('publicPath')}\nof your ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow('extension.config.js')} is defined as your extension URL.`;
|
|
3264
3276
|
}
|
|
3265
3277
|
function isUsingCustomLoader(file) {
|
|
3266
3278
|
const loaderName = file.split('.').shift() || 'custom';
|
|
3267
3279
|
const capitalizedLoaderName = loaderName.charAt(0).toUpperCase() + loaderName.slice(1);
|
|
3268
|
-
return `${getLoggingPrefix(capitalizedLoaderName, 'info')} Using custom loader configuration from ${
|
|
3280
|
+
return `${getLoggingPrefix(capitalizedLoaderName, 'info')} Using custom loader configuration from ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(file)}`;
|
|
3269
3281
|
}
|
|
3270
3282
|
function webextensionPolyfillNotFound() {
|
|
3271
|
-
return `${getLoggingPrefix('Warning', 'warn')} ${
|
|
3283
|
+
return `${getLoggingPrefix('Warning', 'warn')} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('webextension-polyfill')} not found. Browser API polyfill will not be available.\nTo fix this, install ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('webextension-polyfill')}: ${pintor__WEBPACK_IMPORTED_MODULE_0___default().blue('npm install webextension-polyfill')}`;
|
|
3272
3284
|
}
|
|
3273
3285
|
function registrySaved(registryPath) {
|
|
3274
|
-
return `${getLoggingPrefix('Instance Manager', 'info')} registry saved to: ${
|
|
3286
|
+
return `${getLoggingPrefix('Instance Manager', 'info')} registry saved to: ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(registryPath)}`;
|
|
3275
3287
|
}
|
|
3276
3288
|
function registrySaveError(error) {
|
|
3277
|
-
return `${getLoggingPrefix('Instance Manager', 'error')} error saving registry:\n${
|
|
3289
|
+
return `${getLoggingPrefix('Instance Manager', 'error')} error saving registry:\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().red(String(error))}`;
|
|
3278
3290
|
}
|
|
3279
3291
|
function smartPortAllocationExistingPorts(usedPorts) {
|
|
3280
|
-
return `${getLoggingPrefix('Smart Port Allocation', 'info')} existing ports: ${
|
|
3292
|
+
return `${getLoggingPrefix('Smart Port Allocation', 'info')} existing ports: ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(JSON.stringify(usedPorts))}`;
|
|
3281
3293
|
}
|
|
3282
3294
|
function smartPortAllocationExistingWebSocketPorts(usedWebSocketPorts) {
|
|
3283
|
-
return `${getLoggingPrefix('Smart Port Allocation', 'info')} existing WebSocket ports: ${
|
|
3295
|
+
return `${getLoggingPrefix('Smart Port Allocation', 'info')} existing WebSocket ports: ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(JSON.stringify(usedWebSocketPorts))}`;
|
|
3284
3296
|
}
|
|
3285
3297
|
function smartPortAllocationUsingRequestedPort(port, webSocketPort) {
|
|
3286
|
-
return `${getLoggingPrefix('Smart Port Allocation', 'info')} using requested port ${
|
|
3298
|
+
return `${getLoggingPrefix('Smart Port Allocation', 'info')} using requested port ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(port.toString())}; WebSocket ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(webSocketPort.toString())}`;
|
|
3287
3299
|
}
|
|
3288
3300
|
function smartPortAllocationRequestedPortUnavailable(port) {
|
|
3289
|
-
return `${getLoggingPrefix('Smart Port Allocation', 'warn')} requested port is unavailable: ${
|
|
3301
|
+
return `${getLoggingPrefix('Smart Port Allocation', 'warn')} requested port is unavailable: ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(port.toString())}`;
|
|
3290
3302
|
}
|
|
3291
3303
|
function smartPortAllocationAllocatedPorts(port, webSocketPort) {
|
|
3292
|
-
return `${getLoggingPrefix('Smart Port Allocation', 'success')} allocated ports ${
|
|
3304
|
+
return `${getLoggingPrefix('Smart Port Allocation', 'success')} allocated ports ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(port.toString())} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('(port)')} and ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(webSocketPort.toString())} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('(WebSocket)')}`;
|
|
3293
3305
|
}
|
|
3294
3306
|
function instanceManagerCreateInstanceCalled(params) {
|
|
3295
|
-
return `${getLoggingPrefix('Instance Manager', 'info')} createInstance called ${
|
|
3307
|
+
return `${getLoggingPrefix('Instance Manager', 'info')} createInstance called ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(JSON.stringify(params))}`;
|
|
3296
3308
|
}
|
|
3297
3309
|
function instanceManagerRegistryAfterCreateInstance(registry) {
|
|
3298
|
-
return `${getLoggingPrefix('Instance Manager', 'info')} registry after createInstance: ${
|
|
3310
|
+
return `${getLoggingPrefix('Instance Manager', 'info')} registry after createInstance: ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(JSON.stringify(registry))}`;
|
|
3299
3311
|
}
|
|
3300
3312
|
function extensionManagerCopyFilesWarning(error) {
|
|
3301
|
-
return `${getLoggingPrefix('Extension.js DevTools', 'warn')} could not copy extension files: ${
|
|
3313
|
+
return `${getLoggingPrefix('Extension.js DevTools', 'warn')} could not copy extension files: ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow(String(error))}`;
|
|
3302
3314
|
}
|
|
3303
3315
|
function extensionManagerInstanceNotFoundWarning(instanceId) {
|
|
3304
|
-
return `${getLoggingPrefix('Extension.js DevTools', 'warn')} instance ${
|
|
3316
|
+
return `${getLoggingPrefix('Extension.js DevTools', 'warn')} instance ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow(instanceId)} not found for cleanup`;
|
|
3305
3317
|
}
|
|
3306
3318
|
function extensionManagerCleanupWarning(error) {
|
|
3307
|
-
return `${getLoggingPrefix('Extension.js DevTools', 'warn')} could not cleanup temp extensions: ${
|
|
3319
|
+
return `${getLoggingPrefix('Extension.js DevTools', 'warn')} could not cleanup temp extensions: ${pintor__WEBPACK_IMPORTED_MODULE_0___default().yellow(String(error))}`;
|
|
3308
3320
|
}
|
|
3309
3321
|
function firefoxDetectedFlatpak() {
|
|
3310
3322
|
return `${getLoggingPrefix('Firefox Detector', 'info')} detected a Flatpak Firefox installation`;
|
|
@@ -3313,88 +3325,97 @@ var __webpack_modules__ = {
|
|
|
3313
3325
|
return `${getLoggingPrefix('Firefox Detector', 'info')} detected a Snap Firefox installation`;
|
|
3314
3326
|
}
|
|
3315
3327
|
function firefoxDetectedTraditional(firefoxPath) {
|
|
3316
|
-
return `${getLoggingPrefix('Firefox Detector', 'info')} detected traditional Firefox at: ${
|
|
3328
|
+
return `${getLoggingPrefix('Firefox Detector', 'info')} detected traditional Firefox at: ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(firefoxPath)}`;
|
|
3317
3329
|
}
|
|
3318
3330
|
function firefoxDetectedCustom(firefoxPath) {
|
|
3319
|
-
return `${getLoggingPrefix('Firefox Detector', 'info')} detected custom Firefox build at: ${
|
|
3331
|
+
return `${getLoggingPrefix('Firefox Detector', 'info')} detected custom Firefox build at: ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(firefoxPath)}`;
|
|
3320
3332
|
}
|
|
3321
3333
|
function firefoxUsingFlatpakWithSandbox() {
|
|
3322
3334
|
return `${getLoggingPrefix('Firefox Detector', 'info')} using Flatpak Firefox with sandbox permissions`;
|
|
3323
3335
|
}
|
|
3324
3336
|
function firefoxVersion(version) {
|
|
3325
|
-
return `${getLoggingPrefix('Firefox Detector', 'info')} Firefox version is: ${
|
|
3337
|
+
return `${getLoggingPrefix('Firefox Detector', 'info')} Firefox version is: ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(version)}`;
|
|
3326
3338
|
}
|
|
3327
3339
|
function portManagerErrorAllocatingPorts(error) {
|
|
3328
|
-
|
|
3340
|
+
let errorMessage = String(error);
|
|
3341
|
+
if (errorMessage.includes('ENOENT')) {
|
|
3342
|
+
errorMessage += '\n\nThis usually means the extension-js data directory could not be created.';
|
|
3343
|
+
errorMessage += '\nPossible solutions:';
|
|
3344
|
+
errorMessage += '\n1. Check if you have write permissions to your home directory';
|
|
3345
|
+
errorMessage += '\n2. Try running: extension cleanup';
|
|
3346
|
+
errorMessage += '\n3. Manually delete: ~/Library/Application Support/extension-js (macOS)';
|
|
3347
|
+
errorMessage += '\n4. Restart your terminal and try again';
|
|
3348
|
+
}
|
|
3349
|
+
return `${getLoggingPrefix('Port Manager', 'error')} Failed to allocate ports.\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().red(errorMessage)}`;
|
|
3329
3350
|
}
|
|
3330
3351
|
function browserPluginFailedToLoad(browser, error) {
|
|
3331
|
-
return `${getLoggingPrefix('Browser Plugin', 'error')} Failed to load the ${
|
|
3352
|
+
return `${getLoggingPrefix('Browser Plugin', 'error')} Failed to load the ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(browser)} plugin.\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().red(String(error))}`;
|
|
3332
3353
|
}
|
|
3333
3354
|
function extensionJsRunnerError(error) {
|
|
3334
|
-
return `${getLoggingPrefix('Extension.js Runner', 'error')} Error in the Extension.js runner.\n${
|
|
3355
|
+
return `${getLoggingPrefix('Extension.js Runner', 'error')} Error in the Extension.js runner.\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().red(String(error))}`;
|
|
3335
3356
|
}
|
|
3336
3357
|
function extensionJsRunnerCleanupError(error) {
|
|
3337
|
-
return `${getLoggingPrefix('Extension.js Runner', 'error')} Error during cleanup.\n${
|
|
3358
|
+
return `${getLoggingPrefix('Extension.js Runner', 'error')} Error during cleanup.\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().red(String(error))}`;
|
|
3338
3359
|
}
|
|
3339
3360
|
function extensionJsRunnerUncaughtException(error) {
|
|
3340
|
-
return `${getLoggingPrefix('Extension.js Runner', 'error')} Uncaught exception.\n${
|
|
3361
|
+
return `${getLoggingPrefix('Extension.js Runner', 'error')} Uncaught exception.\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().red(String(error))}`;
|
|
3341
3362
|
}
|
|
3342
3363
|
function extensionJsRunnerUnhandledRejection(promise, reason) {
|
|
3343
|
-
return `${getLoggingPrefix('Extension.js Runner', 'error')} unhandled rejection at: ${
|
|
3364
|
+
return `${getLoggingPrefix('Extension.js Runner', 'error')} unhandled rejection at: ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(promise.toString())} reason: ${pintor__WEBPACK_IMPORTED_MODULE_0___default().red(String(reason))}`;
|
|
3344
3365
|
}
|
|
3345
3366
|
function autoExitModeEnabled(ms) {
|
|
3346
|
-
return `${getLoggingPrefix('Auto Mode', 'info')} is enabled. The program will exit automatically after ${
|
|
3367
|
+
return `${getLoggingPrefix('Auto Mode', 'info')} is enabled. The program will exit automatically after ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('(' + ms.toString() + 'ms)')}.`;
|
|
3347
3368
|
}
|
|
3348
3369
|
function autoExitTriggered(ms) {
|
|
3349
|
-
return `${getLoggingPrefix('Auto Mode', 'warn')} timer has elapsed ${
|
|
3370
|
+
return `${getLoggingPrefix('Auto Mode', 'warn')} timer has elapsed ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('(' + ms.toString() + 'ms)')}. Cleaning up\u{2026}`;
|
|
3350
3371
|
}
|
|
3351
3372
|
function autoExitForceKill(ms) {
|
|
3352
|
-
return `${getLoggingPrefix('Auto Mode', 'error')} is force-killing the process after the fallback ${
|
|
3373
|
+
return `${getLoggingPrefix('Auto Mode', 'error')} is force-killing the process after the fallback ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('(' + ms.toString() + 'ms)')}.`;
|
|
3353
3374
|
}
|
|
3354
3375
|
function instanceManagerHealthMonitoringStart(instanceId) {
|
|
3355
|
-
return `${getLoggingPrefix('Instance Manager', 'info')} starting health monitoring for instance ${
|
|
3376
|
+
return `${getLoggingPrefix('Instance Manager', 'info')} starting health monitoring for instance ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(instanceId.slice(0, 8))}`;
|
|
3356
3377
|
}
|
|
3357
3378
|
function instanceManagerHealthMonitoringPassed(instanceId) {
|
|
3358
|
-
return `${getLoggingPrefix('Instance Manager', 'success')} instance ${
|
|
3379
|
+
return `${getLoggingPrefix('Instance Manager', 'success')} instance ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(instanceId.slice(0, 8))} health check passed`;
|
|
3359
3380
|
}
|
|
3360
3381
|
function instanceManagerHealthMonitoringOrphaned(instanceId) {
|
|
3361
|
-
return `${getLoggingPrefix('Instance Manager', 'warn')} instance ${
|
|
3382
|
+
return `${getLoggingPrefix('Instance Manager', 'warn')} instance ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(instanceId.slice(0, 8))} appears orphaned, cleaning up`;
|
|
3362
3383
|
}
|
|
3363
3384
|
function instanceManagerHealthMonitoringFailed(instanceId, error) {
|
|
3364
|
-
return `${getLoggingPrefix('Instance Manager', 'error')} health check failed for instance ${
|
|
3385
|
+
return `${getLoggingPrefix('Instance Manager', 'error')} health check failed for instance ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(instanceId.slice(0, 8))}:\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().red(String(error))}`;
|
|
3365
3386
|
}
|
|
3366
3387
|
function instanceManagerForceCleanupProject(projectPath) {
|
|
3367
|
-
return `${getLoggingPrefix('Instance Manager', 'info')} force cleaning up all processes for project: ${
|
|
3388
|
+
return `${getLoggingPrefix('Instance Manager', 'info')} force cleaning up all processes for project: ${pintor__WEBPACK_IMPORTED_MODULE_0___default().underline(projectPath)}`;
|
|
3368
3389
|
}
|
|
3369
3390
|
function instanceManagerForceCleanupFound(instanceCount) {
|
|
3370
|
-
return `${getLoggingPrefix('Instance Manager', 'info')} found ${
|
|
3391
|
+
return `${getLoggingPrefix('Instance Manager', 'info')} found ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(instanceCount.toString())} instances to clean up`;
|
|
3371
3392
|
}
|
|
3372
3393
|
function instanceManagerForceCleanupInstance(instanceId) {
|
|
3373
|
-
return `${getLoggingPrefix('Instance Manager', 'info')} cleaning up instance ${
|
|
3394
|
+
return `${getLoggingPrefix('Instance Manager', 'info')} cleaning up instance ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(instanceId.slice(0, 8))}`;
|
|
3374
3395
|
}
|
|
3375
3396
|
function instanceManagerForceCleanupTerminating(processId) {
|
|
3376
|
-
return `${getLoggingPrefix('Instance Manager', 'info')} terminating process ${
|
|
3397
|
+
return `${getLoggingPrefix('Instance Manager', 'info')} terminating process ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(processId.toString())}`;
|
|
3377
3398
|
}
|
|
3378
3399
|
function instanceManagerForceCleanupForceKilled(processId) {
|
|
3379
|
-
return `${getLoggingPrefix('Instance Manager', 'error')} force killed process ${
|
|
3400
|
+
return `${getLoggingPrefix('Instance Manager', 'error')} force killed process ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(processId.toString())}`;
|
|
3380
3401
|
}
|
|
3381
3402
|
function instanceManagerForceCleanupInstanceTerminated(instanceId) {
|
|
3382
|
-
return `${getLoggingPrefix('Instance Manager', 'success')} instance ${
|
|
3403
|
+
return `${getLoggingPrefix('Instance Manager', 'success')} instance ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(instanceId.slice(0, 8))} marked as terminated`;
|
|
3383
3404
|
}
|
|
3384
3405
|
function instanceManagerForceCleanupError(instanceId, error) {
|
|
3385
|
-
return `${getLoggingPrefix('Instance Manager', 'error')} error terminating instance ${
|
|
3406
|
+
return `${getLoggingPrefix('Instance Manager', 'error')} error terminating instance ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(instanceId)}:\n${pintor__WEBPACK_IMPORTED_MODULE_0___default().red(String(error))}`;
|
|
3386
3407
|
}
|
|
3387
3408
|
function instanceManagerForceCleanupComplete() {
|
|
3388
3409
|
return `${getLoggingPrefix('Instance Manager', 'success')} project cleanup completed`;
|
|
3389
3410
|
}
|
|
3390
3411
|
function instanceManagerProcessNoLongerRunning(instanceId, processId) {
|
|
3391
|
-
return `${
|
|
3412
|
+
return `${pintor__WEBPACK_IMPORTED_MODULE_0___default().brightMagenta("\u25BA\u25BA\u25BA")} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().brightMagenta('Instance Manager')} process ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(processId.toString())} for instance ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(instanceId.slice(0, 8))} is no longer running`;
|
|
3392
3413
|
}
|
|
3393
3414
|
function instanceManagerPortsNotInUse(instanceId, port, webSocketPort) {
|
|
3394
|
-
return `${
|
|
3415
|
+
return `${pintor__WEBPACK_IMPORTED_MODULE_0___default().brightMagenta("\u25BA\u25BA\u25BA")} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().brightMagenta('Instance Manager')} ports ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(port.toString())} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('(')}${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('port')}${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(')')}/${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(webSocketPort.toString())} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('(')}${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray('WebSocket')}${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(')')} for instance ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(instanceId.slice(0, 8))} are not in use`;
|
|
3395
3416
|
}
|
|
3396
3417
|
function instanceManagerCleanedUpOrphanedInstance(instanceId) {
|
|
3397
|
-
return `${
|
|
3418
|
+
return `${pintor__WEBPACK_IMPORTED_MODULE_0___default().brightMagenta("\u25BA\u25BA\u25BA")} ${pintor__WEBPACK_IMPORTED_MODULE_0___default().brightMagenta('Instance Manager')} cleaned up orphaned instance: ${pintor__WEBPACK_IMPORTED_MODULE_0___default().gray(instanceId.slice(0, 8))}`;
|
|
3398
3419
|
}
|
|
3399
3420
|
},
|
|
3400
3421
|
child_process: function(module) {
|
|
@@ -3425,7 +3446,7 @@ var __webpack_modules__ = {
|
|
|
3425
3446
|
module.exports = require("util");
|
|
3426
3447
|
},
|
|
3427
3448
|
"./package.json": function(module) {
|
|
3428
|
-
module.exports = JSON.parse('{"i8":"2.1.
|
|
3449
|
+
module.exports = JSON.parse('{"i8":"2.1.2","HO":{"@rspack/core":"^1.4.8","@rspack/dev-server":"^1.1.3","@swc/helpers":"^0.5.15","@types/webextension-polyfill":"0.12.3","@vue/compiler-sfc":"^3.5.13","adm-zip":"^0.5.16","axios":"^1.9.0","case-sensitive-paths-webpack-plugin":"^2.4.0","chokidar":"^4.0.1","chrome-location2":"2.0.0","content-security-policy-parser":"^0.6.0","cross-spawn":"^7.0.6","dotenv":"^16.4.7","dotenv-webpack":"^8.1.0","edge-location":"^1.1.1","firefox-location2":"1.0.0","firefox-profile":"^4.7.0","go-git-it":"^5.0.0","ignore":"^6.0.2","loader-utils":"^3.3.1","locate-path":"^7.2.0","micromatch":"^4.0.8","package-manager-detector":"^0.2.7","parse5":"^7.2.1","parse5-utilities":"^1.0.0","pintor":"0.3.0","postcss":"^8.4.49","preact":"^10.22.0","progress":"^2.0.3","schema-utils":"^4.2.0","slugify":"^1.6.6","tiny-glob":"^0.2.9","webextension-polyfill":"^0.12.0","webpack-merge":"^6.0.1","webpack-target-webextension":"^2.1.3","ws":"^8.18.0"},"Lq":{"@prefresh/core":"^1.5.2","@prefresh/utils":"^1.2.0","@prefresh/webpack":"^4.0.1","@rspack/plugin-preact-refresh":"^1.1.2","@rspack/plugin-react-refresh":"^1.0.1","babel-loader":"^9.2.1","less-loader":"^12.2.0","postcss-loader":"^8.1.1","postcss-preset-env":"^10.1.1","react-refresh":"^0.14.2","sass-loader":"^16.0.4","svelte-loader":"^3.2.4","vue-loader":"^17.4.2","vue-style-loader":"^4.1.3"}}');
|
|
3429
3450
|
}
|
|
3430
3451
|
};
|
|
3431
3452
|
var __webpack_module_cache__ = {};
|
|
@@ -10502,6 +10523,7 @@ var __webpack_exports__ = {};
|
|
|
10502
10523
|
class PortManager {
|
|
10503
10524
|
async allocatePorts(browser, projectPath, requestedPort) {
|
|
10504
10525
|
try {
|
|
10526
|
+
await this.instanceManager.ensureDataDirectory();
|
|
10505
10527
|
const instance = await this.instanceManager.createInstance(browser, projectPath, requestedPort);
|
|
10506
10528
|
this.currentInstance = instance;
|
|
10507
10529
|
return {
|