@govtechsg/oobee 0.10.95 → 0.10.97
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/Dockerfile +1 -1
- package/INSTALLATION.md +2 -1
- package/dist/crawlers/commonCrawlerFunc.js +8 -1
- package/dist/utils.js +13 -1
- package/oobee-client-scanner.js +2 -2
- package/package.json +3 -3
- package/src/crawlers/commonCrawlerFunc.ts +8 -1
- package/src/utils.ts +17 -4
- /package/{fb5db217-5ab7-4120-b33b-71fa69b454d0.txt → 4b15c550-be4f-428d-b0d0-933dafd76de3.txt} +0 -0
package/Dockerfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Use Microsoft Playwright image as base image
|
|
2
2
|
# Node version is v22
|
|
3
|
-
FROM mcr.microsoft.com/playwright:v1.
|
|
3
|
+
FROM mcr.microsoft.com/playwright:v1.61.1-noble
|
|
4
4
|
|
|
5
5
|
# Installation of packages for oobee
|
|
6
6
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
package/INSTALLATION.md
CHANGED
|
@@ -10,10 +10,11 @@ Oobee (CLI) allows software engineers to run Oobee as part of their software dev
|
|
|
10
10
|
|
|
11
11
|
## System Requirements
|
|
12
12
|
|
|
13
|
-
- Oobee (CLI) can run on MacOS version
|
|
13
|
+
- Oobee (CLI) can run on MacOS version 15 Sequoia or above, and a [supported](https://learn.microsoft.com/en-us/windows/release-health/supported-versions-windows-client) version of Windows 10 (64-bit) or Windows 11.
|
|
14
14
|
- Google Chrome browser is [installed](https://www.google.com/chrome).
|
|
15
15
|
- One-time Internet access is needed to download and install Oobee (CLI).
|
|
16
16
|
- You are recommended to be logged on to an admin user to run Oobee (CLI).
|
|
17
|
+
- Note that Apple has discontinued support for developing Intel-based apps in [future macOS versions](https://support.apple.com/en-us/102527). Oobee will discontinue support on Intel-based Mac when that happens.
|
|
17
18
|
|
|
18
19
|
## Windows
|
|
19
20
|
|
|
@@ -977,6 +977,13 @@ export const getPreLaunchHook = (userDataDirectory) => {
|
|
|
977
977
|
// For pool re-launches, best-effort clone profile data from base directory
|
|
978
978
|
// so authenticated sessions are preserved across browser pool retirements.
|
|
979
979
|
if (launchCount > 1) {
|
|
980
|
+
const skipDirs = new Set([
|
|
981
|
+
'Singleton', 'lockfile', 'LOCK',
|
|
982
|
+
'Cache', 'Code Cache', 'GPUCache', 'DawnGraphiteCache', 'DawnWebGPUCache',
|
|
983
|
+
'Service Worker', 'ScriptCache', 'ShaderCache', 'GrShaderCache',
|
|
984
|
+
'component_crx_cache', 'optimization_guide_model_store',
|
|
985
|
+
'BrowserMetrics', 'Crashpad', 'FileTypePolicies',
|
|
986
|
+
]);
|
|
980
987
|
try {
|
|
981
988
|
const copyRecursive = async (src, dest) => {
|
|
982
989
|
const stat = await fsp.stat(src).catch(() => null);
|
|
@@ -986,7 +993,7 @@ export const getPreLaunchHook = (userDataDirectory) => {
|
|
|
986
993
|
await fsp.mkdir(dest, { recursive: true }).catch(() => { });
|
|
987
994
|
const entries = await fsp.readdir(src).catch(() => []);
|
|
988
995
|
await Promise.all(entries
|
|
989
|
-
.filter(entry => !entry.startsWith('Singleton') && entry
|
|
996
|
+
.filter(entry => !entry.startsWith('Singleton') && !skipDirs.has(entry))
|
|
990
997
|
.map(entry => copyRecursive(path.join(src, entry), path.join(dest, entry)).catch(() => { })));
|
|
991
998
|
}
|
|
992
999
|
else {
|
package/dist/utils.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import os from 'os';
|
|
3
3
|
import fs from 'fs-extra';
|
|
4
|
+
import { globSync } from 'glob';
|
|
4
5
|
import axe from 'axe-core';
|
|
5
6
|
import { v4 as uuidv4 } from 'uuid';
|
|
6
7
|
import { getDomain } from 'tldts';
|
|
@@ -338,13 +339,24 @@ export const cleanUp = async (randomToken, isError = false) => {
|
|
|
338
339
|
if (randomToken === undefined && constants.randomToken) {
|
|
339
340
|
randomToken = constants.randomToken;
|
|
340
341
|
}
|
|
341
|
-
if (constants.userDataDirectory)
|
|
342
|
+
if (constants.userDataDirectory) {
|
|
342
343
|
try {
|
|
343
344
|
fs.rmSync(constants.userDataDirectory, { recursive: true, force: true });
|
|
344
345
|
}
|
|
345
346
|
catch (error) {
|
|
346
347
|
consoleLogger.warn(`Unable to force remove userDataDirectory: ${error.message}`);
|
|
347
348
|
}
|
|
349
|
+
// Also remove _pool* sibling directories created by browser pool re-launches
|
|
350
|
+
try {
|
|
351
|
+
const poolDirs = globSync(`${constants.userDataDirectory}_pool*`);
|
|
352
|
+
for (const dir of poolDirs) {
|
|
353
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
catch (error) {
|
|
357
|
+
consoleLogger.warn(`Unable to remove pool directories: ${error.message}`);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
348
360
|
if (process.env.TMPDIR && fs.existsSync('/.dockerenv'))
|
|
349
361
|
try {
|
|
350
362
|
fs.rmSync(process.env.TMPDIR, { recursive: true, force: true });
|
package/oobee-client-scanner.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* DO NOT EDIT MANUALLY. Re-generate with: node dist/generateOobeeClientScanner.js
|
|
4
4
|
*
|
|
5
5
|
* Embedded at generation time:
|
|
6
|
-
* App version : 0.10.
|
|
6
|
+
* App version : 0.10.97
|
|
7
7
|
* Sentry DSN : (from OOBEE_SENTRY_DSN env var or constants.ts default)
|
|
8
8
|
* Sentry SDK : @sentry/browser 10.58.0 (loaded from CDN at runtime)
|
|
9
9
|
*
|
|
@@ -34883,7 +34883,7 @@
|
|
|
34883
34883
|
// ── Sentry browser telemetry (Sentry JS SDK, loaded from CDN) ────────────
|
|
34884
34884
|
|
|
34885
34885
|
var _oobeeSentryDsn = "https://3b8c7ee46b06f33815a1301b6713ebc3@o4509047624761344.ingest.us.sentry.io/4509327783559168";
|
|
34886
|
-
var _oobeeAppVersion = "0.10.
|
|
34886
|
+
var _oobeeAppVersion = "0.10.97";
|
|
34887
34887
|
var _oobeeSentryVersion = "10.58.0";
|
|
34888
34888
|
var _oobeeSentryInitialized = false;
|
|
34889
34889
|
var _oobeeSentryLoadPromise = null;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@govtechsg/oobee",
|
|
3
3
|
"main": "dist/npmIndex.js",
|
|
4
|
-
"version": "0.10.
|
|
4
|
+
"version": "0.10.97",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Government Technology Agency <info@tech.gov.sg>",
|
|
7
7
|
"bin": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"axios": "^1.8.2",
|
|
18
18
|
"base64-stream": "^1.0.0",
|
|
19
19
|
"cheerio": "^1.0.0-rc.12",
|
|
20
|
-
"crawlee": "^3.
|
|
20
|
+
"crawlee": "^3.17.0",
|
|
21
21
|
"ejs": "^3.1.9",
|
|
22
22
|
"file-type": "^21.3.3",
|
|
23
23
|
"fs-extra": "^11.2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"mime-types": "^2.1.35",
|
|
32
32
|
"minimatch": "^10.2.4",
|
|
33
33
|
"pdfjs-dist": "github:veraPDF/pdfjs-dist#v4.4.168-taggedPdf-0.1.20",
|
|
34
|
-
"playwright": "^1.
|
|
34
|
+
"playwright": "^1.61.1",
|
|
35
35
|
"prettier": "^3.1.0",
|
|
36
36
|
"print-message": "^3.0.1",
|
|
37
37
|
"safe-regex": "^2.1.1",
|
|
@@ -1233,6 +1233,13 @@ export const getPreLaunchHook = (userDataDirectory: string) => {
|
|
|
1233
1233
|
// For pool re-launches, best-effort clone profile data from base directory
|
|
1234
1234
|
// so authenticated sessions are preserved across browser pool retirements.
|
|
1235
1235
|
if (launchCount > 1) {
|
|
1236
|
+
const skipDirs = new Set([
|
|
1237
|
+
'Singleton', 'lockfile', 'LOCK',
|
|
1238
|
+
'Cache', 'Code Cache', 'GPUCache', 'DawnGraphiteCache', 'DawnWebGPUCache',
|
|
1239
|
+
'Service Worker', 'ScriptCache', 'ShaderCache', 'GrShaderCache',
|
|
1240
|
+
'component_crx_cache', 'optimization_guide_model_store',
|
|
1241
|
+
'BrowserMetrics', 'Crashpad', 'FileTypePolicies',
|
|
1242
|
+
]);
|
|
1236
1243
|
try {
|
|
1237
1244
|
const copyRecursive = async (src: string, dest: string) => {
|
|
1238
1245
|
const stat = await fsp.stat(src).catch(() => null);
|
|
@@ -1242,7 +1249,7 @@ export const getPreLaunchHook = (userDataDirectory: string) => {
|
|
|
1242
1249
|
const entries = await fsp.readdir(src).catch(() => []);
|
|
1243
1250
|
await Promise.all(
|
|
1244
1251
|
entries
|
|
1245
|
-
.filter(entry => !entry.startsWith('Singleton') && entry
|
|
1252
|
+
.filter(entry => !entry.startsWith('Singleton') && !skipDirs.has(entry))
|
|
1246
1253
|
.map(entry =>
|
|
1247
1254
|
copyRecursive(path.join(src, entry), path.join(dest, entry)).catch(() => {}),
|
|
1248
1255
|
),
|
package/src/utils.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { execSync, spawnSync } from 'child_process';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import os from 'os';
|
|
4
4
|
import fs from 'fs-extra';
|
|
5
|
+
import { globSync } from 'glob';
|
|
5
6
|
import axe, { Rule } from 'axe-core';
|
|
6
7
|
import { v4 as uuidv4 } from 'uuid';
|
|
7
8
|
import { getDomain } from 'tldts';
|
|
@@ -382,10 +383,22 @@ export const cleanUp = async (randomToken?: string, isError: boolean = false): P
|
|
|
382
383
|
randomToken = constants.randomToken;
|
|
383
384
|
}
|
|
384
385
|
|
|
385
|
-
if (constants.userDataDirectory)
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
386
|
+
if (constants.userDataDirectory) {
|
|
387
|
+
try {
|
|
388
|
+
fs.rmSync(constants.userDataDirectory, { recursive: true, force: true });
|
|
389
|
+
} catch (error) {
|
|
390
|
+
consoleLogger.warn(`Unable to force remove userDataDirectory: ${error.message}`);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
// Also remove _pool* sibling directories created by browser pool re-launches
|
|
394
|
+
try {
|
|
395
|
+
const poolDirs = globSync(`${constants.userDataDirectory}_pool*`);
|
|
396
|
+
for (const dir of poolDirs) {
|
|
397
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
398
|
+
}
|
|
399
|
+
} catch (error) {
|
|
400
|
+
consoleLogger.warn(`Unable to remove pool directories: ${error.message}`);
|
|
401
|
+
}
|
|
389
402
|
}
|
|
390
403
|
|
|
391
404
|
if (process.env.TMPDIR && fs.existsSync('/.dockerenv')) try {
|
/package/{fb5db217-5ab7-4120-b33b-71fa69b454d0.txt → 4b15c550-be4f-428d-b0d0-933dafd76de3.txt}
RENAMED
|
File without changes
|