Skip to content

Commit

Permalink
Oobee renames
Browse files Browse the repository at this point in the history
  • Loading branch information
younglim committed Aug 30, 2024
1 parent 324060e commit c2a2574
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Oobee can perform the following to scan the target URL.
- To **run** Oobee in **terminal**, run `npm start`. Questions will be prompted to assist you in providing the right inputs.
- Results will be compiled in JSON format, followed by generating a HTML report.

> NOTE: For your initial scan, there may be some loading time required before use. Purple-A11y will also ask for your name and email address and collect your app usage data to personalise your experience. Your information fully complies with [GovTech’s Privacy Policy](https://www.tech.gov.sg/privacy/).
> NOTE: For your initial scan, there may be some loading time required before use. Oobee will also ask for your name and email address and collect your app usage data to personalise your experience. Your information fully complies with [GovTech’s Privacy Policy](https://www.tech.gov.sg/privacy/).
#### Delete/Edit Details
> You may delete and edit your cached name and e-mail address by running the following command to delete `userData.txt`:
Expand Down
2 changes: 1 addition & 1 deletion scripts/install_oobee_dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if (Test-Path -Path .\jdk -PathType Container) {
# Install Node dependencies
if (Test-Path oobee) {
Write-Output "Installing node dependencies"
& ".\oobee_shell_ps.ps1" "cd purple-a11y;npm install --force --omit=dev;cd .."
& ".\oobee_shell_ps.ps1" "cd oobee;npm install --force --omit=dev;cd .."

# Omit installing Playwright browsers as it is not reuqired
# Write-Output "Install Playwright browsers"
Expand Down
36 changes: 18 additions & 18 deletions src/constants/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1225,14 +1225,14 @@ const cloneChromeProfileCookieFiles = (options, destDir) => {
if (os.platform() === 'win32') {
profileCookiesDir = globSync('**/Network/Cookies', {
...options,
ignore: ['Purple-A11y/**'],
ignore: ['oobee/**'],
});
profileNamesRegex = /User Data\\(.*?)\\Network/;
} else if (os.platform() === 'darwin') {
// maxDepth 2 to avoid copying cookies from the Purple-A11y directory if it exists
// maxDepth 2 to avoid copying cookies from the oobee directory if it exists
profileCookiesDir = globSync('**/Cookies', {
...options,
ignore: 'Purple-A11y/**',
ignore: 'oobee/**',
});
profileNamesRegex = /Chrome\/(.*?)\/Cookies/;
}
Expand Down Expand Up @@ -1297,18 +1297,18 @@ const cloneEdgeProfileCookieFiles = (options, destDir) => {
// Cookies file per profile is located in .../User Data/<profile name>/Network/Cookies for windows
// and ../Chrome/<profile name>/Cookies for mac
let profileNamesRegex;
// Ignores the cloned Purple-A11y directory if exists
// Ignores the cloned oobee directory if exists
if (os.platform() === 'win32') {
profileCookiesDir = globSync('**/Network/Cookies', {
...options,
ignore: 'Purple-A11y/**',
ignore: 'oobee/**',
});
profileNamesRegex = /User Data\\(.*?)\\Network/;
} else if (os.platform() === 'darwin') {
// Ignores copying cookies from the Purple-A11y directory if it exists
// Ignores copying cookies from the oobee directory if it exists
profileCookiesDir = globSync('**/Cookies', {
...options,
ignore: 'Purple-A11y/**',
ignore: 'oobee/**',
});
profileNamesRegex = /Microsoft Edge\/(.*?)\/Cookies/;
}
Expand Down Expand Up @@ -1402,7 +1402,7 @@ const cloneLocalStateFile = (options, destDir) => {

/**
* Checks if the Chrome data directory exists and creates a clone
* of all profile within the Purple-A11y directory located in the
* of all profile within the oobee directory located in the
* .../User Data directory for Windows and
* .../Chrome directory for Mac.
* @param {string} randomToken - random token to append to the cloned directory
Expand Down Expand Up @@ -1471,7 +1471,7 @@ export const cloneChromiumProfiles = (randomToken?: string): string => {

/**
* Checks if the Edge data directory exists and creates a clone
* of all profile within the Purple-A11y directory located in the
* of all profile within the oobee directory located in the
* .../User Data directory for Windows and
* .../Microsoft Edge directory for Mac.
* @param {string} randomToken - random token to append to the cloned directory
Expand Down Expand Up @@ -1528,7 +1528,7 @@ export const deleteClonedProfiles = (browser: string, randomToken?: string): voi
};

/**
* Deletes all the cloned Purple-A11y directories in the Chrome data directory
* Deletes all the cloned oobee directories in the Chrome data directory
* @returns null
*/
export const deleteClonedChromeProfiles = (randomToken?: string): void => {
Expand All @@ -1541,7 +1541,7 @@ export const deleteClonedChromeProfiles = (randomToken?: string): void => {
if (randomToken) {
destDir = [`${baseDir}/oobee-${randomToken}`];
} else {
// Find all the Purple-A11y directories in the Chrome data directory
// Find all the oobee directories in the Chrome data directory
destDir = globSync('**/oobee*', {
cwd: baseDir,
absolute: true,
Expand All @@ -1563,12 +1563,12 @@ export const deleteClonedChromeProfiles = (randomToken?: string): void => {
return;
}

silentLogger.warn('Unable to find Purple-A11y directory in the Chrome data directory.');
console.warn('Unable to find Purple-A11y directory in the Chrome data directory.');
silentLogger.warn('Unable to find oobee directory in the Chrome data directory.');
console.warn('Unable to find oobee directory in the Chrome data directory.');
};

/**
* Deletes all the cloned Purple-A11y directories in the Edge data directory
* Deletes all the cloned oobee directories in the Edge data directory
* @returns null
*/
export const deleteClonedEdgeProfiles = (randomToken?: string): void => {
Expand All @@ -1585,7 +1585,7 @@ export const deleteClonedEdgeProfiles = (randomToken?: string): void => {
if (randomToken) {
destDir = [`${baseDir}/oobee-${randomToken}`];
} else {
// Find all the Purple-A11y directories in the Chrome data directory
// Find all the oobee directories in the Chrome data directory
destDir = globSync('**/oobee*', {
cwd: baseDir,
absolute: true,
Expand Down Expand Up @@ -1618,7 +1618,7 @@ export const deleteClonedChromiumProfiles = (randomToken?: string): void => {
if (randomToken) {
destDir = [`${baseDir}/oobee-${randomToken}`];
} else {
// Find all the Purple-A11y directories in the Chrome data directory
// Find all the oobee directories in the Chrome data directory
destDir = globSync('**/oobee*', {
cwd: baseDir,
absolute: true,
Expand All @@ -1640,8 +1640,8 @@ export const deleteClonedChromiumProfiles = (randomToken?: string): void => {
return;
}

silentLogger.warn('Unable to find Purple-A11y directory in Chromium support directory');
console.warn('Unable to find Purple-A11y directory in Chromium support directory');
silentLogger.warn('Unable to find oobee directory in Chromium support directory');
console.warn('Unable to find oobee directory in Chromium support directory');
};

export const getPlaywrightDeviceDetailsObject = (
Expand Down

0 comments on commit c2a2574

Please sign in to comment.