diff --git a/package.json b/package.json index 5c88645..5b8b95a 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "devDependencies": { "@netlify/plugin-lighthouse": "5.0.0", - "prettier": "^2.8.8", + "prettier": "^3.0.0", "rimraf": "5.0.1" } } diff --git a/record/dock/autohide-delay/0.5.js b/record/dock/autohide-delay/0.5.js index bcb490e..f5f7338 100644 --- a/record/dock/autohide-delay/0.5.js +++ b/record/dock/autohide-delay/0.5.js @@ -10,11 +10,11 @@ module.exports = { console.log('> Recording dock autohide-delay with param set to 0.5') const { stderr: setEnvError } = await exec( - 'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-delay -float 0.5 && killall Dock' + 'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-delay -float 0.5 && killall Dock', ) if (setEnvError) { console.error( - 'An error occured while setting up the dock autohide-delay command' + 'An error occured while setting up the dock autohide-delay command', ) logRollbackInfo() throw new Error(setEnvError) @@ -65,11 +65,11 @@ module.exports = { } const { stderr: deleteEnvError } = await exec( - 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-delay && killall Dock' + 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-delay && killall Dock', ) if (deleteEnvError) { console.error( - 'An error occured while cleaning the dock autohide-delay environment' + 'An error occured while cleaning the dock autohide-delay environment', ) logRollbackInfo() throw new Error(deleteEnvError) @@ -81,9 +81,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-delay && killall Dock' + 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-delay && killall Dock', ) } diff --git a/record/dock/autohide-delay/0.js b/record/dock/autohide-delay/0.js index 4f153ac..b0618a6 100644 --- a/record/dock/autohide-delay/0.js +++ b/record/dock/autohide-delay/0.js @@ -10,11 +10,11 @@ module.exports = { console.log('> Recording dock autohide-delay with param set to 0') const { stderr: setEnvError } = await exec( - 'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-delay -float 0 && killall Dock' + 'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-delay -float 0 && killall Dock', ) if (setEnvError) { console.error( - 'An error occured while setting up the dock autohide-delay command' + 'An error occured while setting up the dock autohide-delay command', ) logRollbackInfo() throw new Error(setEnvError) @@ -65,11 +65,11 @@ module.exports = { } const { stderr: deleteEnvError } = await exec( - 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-delay && killall Dock' + 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-delay && killall Dock', ) if (deleteEnvError) { console.error( - 'An error occured while cleaning the dock autohide-delay environment' + 'An error occured while cleaning the dock autohide-delay environment', ) logRollbackInfo() throw new Error(deleteEnvError) @@ -81,9 +81,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-delay && killall Dock' + 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-delay && killall Dock', ) } diff --git a/record/dock/autohide-time-modifier/0.5.js b/record/dock/autohide-time-modifier/0.5.js index 986181b..2532d34 100644 --- a/record/dock/autohide-time-modifier/0.5.js +++ b/record/dock/autohide-time-modifier/0.5.js @@ -10,11 +10,11 @@ module.exports = { console.log('> Recording dock autohide-time-modifier with param set to 0.5') const { stderr: setEnvError } = await exec( - 'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-time-modifier -float 0.5 && killall Dock' + 'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-time-modifier -float 0.5 && killall Dock', ) if (setEnvError) { console.error( - 'An error occured while setting up the dock autohide-time-modifier command' + 'An error occured while setting up the dock autohide-time-modifier command', ) logRollbackInfo() throw new Error(setEnvError) @@ -65,11 +65,11 @@ module.exports = { } const { stderr: deleteEnvError } = await exec( - 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock' + 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock', ) if (deleteEnvError) { console.error( - 'An error occured while cleaning the dock autohide-time-modifier environment' + 'An error occured while cleaning the dock autohide-time-modifier environment', ) logRollbackInfo() throw new Error(deleteEnvError) @@ -81,9 +81,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock' + 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock', ) } diff --git a/record/dock/autohide-time-modifier/0.js b/record/dock/autohide-time-modifier/0.js index 4462564..97c45e0 100644 --- a/record/dock/autohide-time-modifier/0.js +++ b/record/dock/autohide-time-modifier/0.js @@ -10,11 +10,11 @@ module.exports = { console.log('> Recording dock autohide-time-modifier with param set to 0') const { stderr: setEnvError } = await exec( - 'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-time-modifier -float 0 && killall Dock' + 'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-time-modifier -float 0 && killall Dock', ) if (setEnvError) { console.error( - 'An error occured while setting up the dock autohide-time-modifier command' + 'An error occured while setting up the dock autohide-time-modifier command', ) logRollbackInfo() throw new Error(setEnvError) @@ -65,11 +65,11 @@ module.exports = { } const { stderr: deleteEnvError } = await exec( - 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock' + 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock', ) if (deleteEnvError) { console.error( - 'An error occured while cleaning the dock autohide-time-modifier environment' + 'An error occured while cleaning the dock autohide-time-modifier environment', ) logRollbackInfo() throw new Error(deleteEnvError) @@ -81,9 +81,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock' + 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock', ) } diff --git a/record/dock/autohide-time-modifier/2.js b/record/dock/autohide-time-modifier/2.js index 983da72..a40707a 100644 --- a/record/dock/autohide-time-modifier/2.js +++ b/record/dock/autohide-time-modifier/2.js @@ -10,11 +10,11 @@ module.exports = { console.log('> Recording dock autohide-time-modifier with param set to 2') const { stderr: setEnvError } = await exec( - 'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-time-modifier -float 2 && killall Dock' + 'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-time-modifier -float 2 && killall Dock', ) if (setEnvError) { console.error( - 'An error occured while setting up the dock autohide-time-modifier command' + 'An error occured while setting up the dock autohide-time-modifier command', ) logRollbackInfo() throw new Error(setEnvError) @@ -65,11 +65,11 @@ module.exports = { } const { stderr: deleteEnvError } = await exec( - 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock' + 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock', ) if (deleteEnvError) { console.error( - 'An error occured while cleaning the dock autohide-time-modifier environment' + 'An error occured while cleaning the dock autohide-time-modifier environment', ) logRollbackInfo() throw new Error(deleteEnvError) @@ -81,9 +81,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock' + 'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock', ) } diff --git a/record/dock/mineffect/genie.js b/record/dock/mineffect/genie.js index 51f6b54..41e4363 100644 --- a/record/dock/mineffect/genie.js +++ b/record/dock/mineffect/genie.js @@ -14,11 +14,11 @@ module.exports = { console.log('> Recording dock mineffect with param set to genie') const { stderr: setEnvError } = await exec( - 'defaults write com.apple.dock mineffect -string genie && killall Dock' + 'defaults write com.apple.dock mineffect -string genie && killall Dock', ) if (setEnvError) { console.error( - 'An error occured while setting up the dock mineffect command' + 'An error occured while setting up the dock mineffect command', ) logRollbackInfo() throw new Error(setEnvError) @@ -75,11 +75,11 @@ module.exports = { } const { stderr: deleteEnvError } = await exec( - 'defaults delete com.apple.dock mineffect && killall Dock' + 'defaults delete com.apple.dock mineffect && killall Dock', ) if (deleteEnvError) { console.error( - 'An error occured while cleaning the dock mineffect environment' + 'An error occured while cleaning the dock mineffect environment', ) logRollbackInfo() throw new Error(deleteEnvError) @@ -91,7 +91,7 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info('defaults delete com.apple.dock mineffect && killall Dock') } diff --git a/record/dock/mineffect/scale.js b/record/dock/mineffect/scale.js index 1871f74..f7a2729 100644 --- a/record/dock/mineffect/scale.js +++ b/record/dock/mineffect/scale.js @@ -14,11 +14,11 @@ module.exports = { console.log('> Recording dock mineffect with param set to scale') const { stderr: setEnvError } = await exec( - 'defaults write com.apple.dock mineffect -string scale && killall Dock' + 'defaults write com.apple.dock mineffect -string scale && killall Dock', ) if (setEnvError) { console.error( - 'An error occured while setting up the dock mineffect command' + 'An error occured while setting up the dock mineffect command', ) logRollbackInfo() throw new Error(setEnvError) @@ -75,11 +75,11 @@ module.exports = { } const { stderr: deleteEnvError } = await exec( - 'defaults delete com.apple.dock mineffect && killall Dock' + 'defaults delete com.apple.dock mineffect && killall Dock', ) if (deleteEnvError) { console.error( - 'An error occured while cleaning the dock mineffect environment' + 'An error occured while cleaning the dock mineffect environment', ) logRollbackInfo() throw new Error(deleteEnvError) @@ -91,7 +91,7 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info('defaults delete com.apple.dock mineffect && killall Dock') } diff --git a/record/dock/mineffect/suck.js b/record/dock/mineffect/suck.js index c0665fb..09d14e3 100644 --- a/record/dock/mineffect/suck.js +++ b/record/dock/mineffect/suck.js @@ -14,11 +14,11 @@ module.exports = { console.log('> Recording dock mineffect with param set to suck') const { stderr: setEnvError } = await exec( - 'defaults write com.apple.dock mineffect -string suck && killall Dock' + 'defaults write com.apple.dock mineffect -string suck && killall Dock', ) if (setEnvError) { console.error( - 'An error occured while setting up the dock mineffect command' + 'An error occured while setting up the dock mineffect command', ) logRollbackInfo() throw new Error(setEnvError) @@ -75,11 +75,11 @@ module.exports = { } const { stderr: deleteEnvError } = await exec( - 'defaults delete com.apple.dock mineffect && killall Dock' + 'defaults delete com.apple.dock mineffect && killall Dock', ) if (deleteEnvError) { console.error( - 'An error occured while cleaning the dock mineffect environment' + 'An error occured while cleaning the dock mineffect environment', ) logRollbackInfo() throw new Error(deleteEnvError) @@ -91,7 +91,7 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info('defaults delete com.apple.dock mineffect && killall Dock') } diff --git a/record/dock/orientation/bottom.js b/record/dock/orientation/bottom.js index c2768fc..d49765d 100644 --- a/record/dock/orientation/bottom.js +++ b/record/dock/orientation/bottom.js @@ -24,7 +24,7 @@ module.exports = { await compressPngImage( `${outputPath}/bottom-tmp.png`, outputPath, - 'bottom' + 'bottom', ) } catch (compressPngImageError) { logRollbackInfo() @@ -37,7 +37,7 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info('defaults delete com.apple.dock orientation && killall Dock') } diff --git a/record/dock/orientation/left.js b/record/dock/orientation/left.js index 2602abe..ae6b718 100644 --- a/record/dock/orientation/left.js +++ b/record/dock/orientation/left.js @@ -33,7 +33,7 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info('defaults delete com.apple.dock orientation && killall Dock') } diff --git a/record/dock/orientation/right.js b/record/dock/orientation/right.js index 348c1c3..9c2f5d9 100644 --- a/record/dock/orientation/right.js +++ b/record/dock/orientation/right.js @@ -33,7 +33,7 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info('defaults delete com.apple.dock orientation && killall Dock') } diff --git a/record/dock/readme.js b/record/dock/readme.js index dd99d85..29019cc 100644 --- a/record/dock/readme.js +++ b/record/dock/readme.js @@ -16,7 +16,7 @@ module.exports = { screenHeight - dockHeight, screenWidth, dockHeight, - `${outputPath}/dock-tmp.png` + `${outputPath}/dock-tmp.png`, ) .run() } catch (runnerError) { diff --git a/record/dock/show-recents/false.js b/record/dock/show-recents/false.js index 5b305d4..c75b92f 100644 --- a/record/dock/show-recents/false.js +++ b/record/dock/show-recents/false.js @@ -21,7 +21,7 @@ module.exports = { screenHeight - dockHeight, 740, dockHeight, - `${outputPath}/false-tmp.png` + `${outputPath}/false-tmp.png`, ) .deleteDefault('com.apple.dock', 'show-recents') .killApp('Dock') @@ -44,7 +44,7 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info('defaults delete com.apple.dock show-recents && killall Dock') } diff --git a/record/dock/show-recents/true.js b/record/dock/show-recents/true.js index fa1d9bf..c74aefd 100644 --- a/record/dock/show-recents/true.js +++ b/record/dock/show-recents/true.js @@ -19,7 +19,7 @@ module.exports = { screenHeight - dockHeight, 740, dockHeight, - `${outputPath}/true-tmp.png` + `${outputPath}/true-tmp.png`, ) .deleteDefault('com.apple.dock', 'show-recents') .killApp('Dock') @@ -42,7 +42,7 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info('defaults delete com.apple.dock show-recents && killall Dock') } diff --git a/record/dock/tilesize/36.js b/record/dock/tilesize/36.js index 0a42ba8..8d51bb3 100644 --- a/record/dock/tilesize/36.js +++ b/record/dock/tilesize/36.js @@ -33,7 +33,7 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info('defaults delete com.apple.dock tilesize && killall Dock') } diff --git a/record/dock/tilesize/48.js b/record/dock/tilesize/48.js index 0a2335d..68cd011 100644 --- a/record/dock/tilesize/48.js +++ b/record/dock/tilesize/48.js @@ -33,7 +33,7 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info('defaults delete com.apple.dock tilesize && killall Dock') } diff --git a/record/finder/AppleShowAllFiles/false.js b/record/finder/AppleShowAllFiles/false.js index f5d02c5..9f8688d 100644 --- a/record/finder/AppleShowAllFiles/false.js +++ b/record/finder/AppleShowAllFiles/false.js @@ -36,9 +36,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.finder AppleShowAllFiles && killall Finder' + 'defaults delete com.apple.finder AppleShowAllFiles && killall Finder', ) } diff --git a/record/finder/AppleShowAllFiles/true.js b/record/finder/AppleShowAllFiles/true.js index d56e1ef..cb45f77 100644 --- a/record/finder/AppleShowAllFiles/true.js +++ b/record/finder/AppleShowAllFiles/true.js @@ -36,9 +36,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.finder AppleShowAllFiles && killall Finder' + 'defaults delete com.apple.finder AppleShowAllFiles && killall Finder', ) } diff --git a/record/finder/FXEnableExtensionChangeWarning/false.js b/record/finder/FXEnableExtensionChangeWarning/false.js index 8fe7844..6dce51e 100644 --- a/record/finder/FXEnableExtensionChangeWarning/false.js +++ b/record/finder/FXEnableExtensionChangeWarning/false.js @@ -6,7 +6,7 @@ const { compressVideo } = require('../../utils') module.exports = { run: async (outputPath) => { console.log( - '> Recording finder FXEnableExtensionChangeWarning with param set to false' + '> Recording finder FXEnableExtensionChangeWarning with param set to false', ) const { width, height } = robot.getScreenSize() @@ -26,7 +26,7 @@ module.exports = { 'com.apple.finder', 'FXEnableExtensionChangeWarning', '-bool false', - '0' + '0', ) .killApp('Finder') .openApp('Finder', '~/macos-defaults') @@ -71,9 +71,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.finder FXEnableExtensionChangeWarning && killall Finder' + 'defaults delete com.apple.finder FXEnableExtensionChangeWarning && killall Finder', ) } diff --git a/record/finder/FXEnableExtensionChangeWarning/true.js b/record/finder/FXEnableExtensionChangeWarning/true.js index 7bbf524..f7b1485 100644 --- a/record/finder/FXEnableExtensionChangeWarning/true.js +++ b/record/finder/FXEnableExtensionChangeWarning/true.js @@ -6,7 +6,7 @@ const { compressVideo } = require('../../utils') module.exports = { run: async (outputPath) => { console.log( - '> Recording finder FXEnableExtensionChangeWarning with param set to true' + '> Recording finder FXEnableExtensionChangeWarning with param set to true', ) const { width, height } = robot.getScreenSize() @@ -26,7 +26,7 @@ module.exports = { 'com.apple.finder', 'FXEnableExtensionChangeWarning', '-bool true', - '1' + '1', ) .killApp('Finder') .openApp('Finder', '~/macos-defaults') @@ -67,9 +67,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.finder FXEnableExtensionChangeWarning && killall Finder' + 'defaults delete com.apple.finder FXEnableExtensionChangeWarning && killall Finder', ) } diff --git a/record/finder/NSTableViewDefaultSizeMode/1.js b/record/finder/NSTableViewDefaultSizeMode/1.js index 4ddf118..1ef495b 100644 --- a/record/finder/NSTableViewDefaultSizeMode/1.js +++ b/record/finder/NSTableViewDefaultSizeMode/1.js @@ -12,7 +12,7 @@ module.exports = { 'NSGlobalDomain', 'NSTableViewDefaultSizeMode', '-int 1', - '1' + '1', ) .killApp('Finder') .openApp('Finder', '~/macos-defaults') @@ -40,9 +40,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete NSGlobalDomain NSTableViewDefaultSizeMode && killall Finder' + 'defaults delete NSGlobalDomain NSTableViewDefaultSizeMode && killall Finder', ) } diff --git a/record/finder/NSTableViewDefaultSizeMode/2.js b/record/finder/NSTableViewDefaultSizeMode/2.js index ae3b09a..4c8b72f 100644 --- a/record/finder/NSTableViewDefaultSizeMode/2.js +++ b/record/finder/NSTableViewDefaultSizeMode/2.js @@ -12,7 +12,7 @@ module.exports = { 'NSGlobalDomain', 'NSTableViewDefaultSizeMode', '-int 2', - '2' + '2', ) .killApp('Finder') .openApp('Finder', '~/macos-defaults') @@ -40,9 +40,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete NSGlobalDomain NSTableViewDefaultSizeMode && killall Finder' + 'defaults delete NSGlobalDomain NSTableViewDefaultSizeMode && killall Finder', ) } diff --git a/record/finder/NSTableViewDefaultSizeMode/3.js b/record/finder/NSTableViewDefaultSizeMode/3.js index 57fb563..9ea0836 100644 --- a/record/finder/NSTableViewDefaultSizeMode/3.js +++ b/record/finder/NSTableViewDefaultSizeMode/3.js @@ -12,7 +12,7 @@ module.exports = { 'NSGlobalDomain', 'NSTableViewDefaultSizeMode', '-int 3', - '3' + '3', ) .killApp('Finder') .openApp('Finder', '~/macos-defaults') @@ -40,9 +40,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete NSGlobalDomain NSTableViewDefaultSizeMode && killall Finder' + 'defaults delete NSGlobalDomain NSTableViewDefaultSizeMode && killall Finder', ) } diff --git a/record/finder/NSToolbarTitleViewRolloverDelay/0.5.js b/record/finder/NSToolbarTitleViewRolloverDelay/0.5.js index fcc3f28..1d40954 100644 --- a/record/finder/NSToolbarTitleViewRolloverDelay/0.5.js +++ b/record/finder/NSToolbarTitleViewRolloverDelay/0.5.js @@ -6,7 +6,7 @@ const { compressVideo } = require('../../utils') module.exports = { run: async (outputPath) => { console.log( - '> Recording finder NSToolbarTitleViewRolloverDelay with param set to 0' + '> Recording finder NSToolbarTitleViewRolloverDelay with param set to 0', ) const { width, height } = robot.getScreenSize() @@ -34,7 +34,7 @@ module.exports = { 'NSGlobalDomain', 'NSToolbarTitleViewRolloverDelay', '-float 0', - '0' + '0', ) .killApp('Finder') .openApp('Finder', '~/macos-defaults') @@ -69,9 +69,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete NSGlobalDomain NSToolbarTitleViewRolloverDelay && killall Finder' + 'defaults delete NSGlobalDomain NSToolbarTitleViewRolloverDelay && killall Finder', ) } diff --git a/record/finder/NSToolbarTitleViewRolloverDelay/0.js b/record/finder/NSToolbarTitleViewRolloverDelay/0.js index ef4ff9d..1f1dbdc 100644 --- a/record/finder/NSToolbarTitleViewRolloverDelay/0.js +++ b/record/finder/NSToolbarTitleViewRolloverDelay/0.js @@ -6,7 +6,7 @@ const { compressVideo } = require('../../utils') module.exports = { run: async (outputPath) => { console.log( - '> Recording finder NSToolbarTitleViewRolloverDelay with param set to 0.5' + '> Recording finder NSToolbarTitleViewRolloverDelay with param set to 0.5', ) const { width, height } = robot.getScreenSize() @@ -34,7 +34,7 @@ module.exports = { 'NSGlobalDomain', 'NSToolbarTitleViewRolloverDelay', '-float 0.5', - '0.5' + '0.5', ) .killApp('Finder') .openApp('Finder', '~/macos-defaults') @@ -69,9 +69,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete NSGlobalDomain NSToolbarTitleViewRolloverDelay && killall Finder' + 'defaults delete NSGlobalDomain NSToolbarTitleViewRolloverDelay && killall Finder', ) } diff --git a/record/finder/NSToolbarTitleViewRolloverDelay/1.js b/record/finder/NSToolbarTitleViewRolloverDelay/1.js index 0248e27..4ec9f18 100644 --- a/record/finder/NSToolbarTitleViewRolloverDelay/1.js +++ b/record/finder/NSToolbarTitleViewRolloverDelay/1.js @@ -6,7 +6,7 @@ const { compressVideo } = require('../../utils') module.exports = { run: async (outputPath) => { console.log( - '> Recording finder NSToolbarTitleViewRolloverDelay with param set to 1' + '> Recording finder NSToolbarTitleViewRolloverDelay with param set to 1', ) const { width, height } = robot.getScreenSize() @@ -34,7 +34,7 @@ module.exports = { 'NSGlobalDomain', 'NSToolbarTitleViewRolloverDelay', '-float 1', - '1' + '1', ) .killApp('Finder') .openApp('Finder', '~/macos-defaults') @@ -69,9 +69,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete NSGlobalDomain NSToolbarTitleViewRolloverDelay && killall Finder' + 'defaults delete NSGlobalDomain NSToolbarTitleViewRolloverDelay && killall Finder', ) } diff --git a/record/finder/ShowPathbar/false.js b/record/finder/ShowPathbar/false.js index 427137f..92d5e17 100644 --- a/record/finder/ShowPathbar/false.js +++ b/record/finder/ShowPathbar/false.js @@ -35,7 +35,7 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info('defaults delete com.apple.finder ShowPathbar && killall Finder') } diff --git a/record/finder/ShowPathbar/true.js b/record/finder/ShowPathbar/true.js index 0e2f788..25baa60 100644 --- a/record/finder/ShowPathbar/true.js +++ b/record/finder/ShowPathbar/true.js @@ -35,7 +35,7 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info('defaults delete com.apple.finder ShowPathbar && killall Finder') } diff --git a/record/finder/_FXSortFoldersFirst/false.js b/record/finder/_FXSortFoldersFirst/false.js index 7425e41..f455174 100644 --- a/record/finder/_FXSortFoldersFirst/false.js +++ b/record/finder/_FXSortFoldersFirst/false.js @@ -4,7 +4,7 @@ const { compressPngImage } = require('../../utils') module.exports = { run: async (outputPath) => { console.log( - '> Recording finder _FXSortFoldersFirst with param set to false' + '> Recording finder _FXSortFoldersFirst with param set to false', ) try { @@ -14,7 +14,7 @@ module.exports = { 'com.apple.finder', '_FXSortFoldersFirst', '-bool false', - '0' + '0', ) .killApp('Finder') .openApp('Finder', '~/macos-defaults') @@ -42,9 +42,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.finder _FXSortFoldersFirst && killall Finder' + 'defaults delete com.apple.finder _FXSortFoldersFirst && killall Finder', ) } diff --git a/record/finder/_FXSortFoldersFirst/true.js b/record/finder/_FXSortFoldersFirst/true.js index c0187d1..eaf2cfd 100644 --- a/record/finder/_FXSortFoldersFirst/true.js +++ b/record/finder/_FXSortFoldersFirst/true.js @@ -12,7 +12,7 @@ module.exports = { 'com.apple.finder', '_FXSortFoldersFirst', '-bool true', - '1' + '1', ) .killApp('Finder') .openApp('Finder', '~/macos-defaults') @@ -40,9 +40,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.finder _FXSortFoldersFirst && killall Finder' + 'defaults delete com.apple.finder _FXSortFoldersFirst && killall Finder', ) } diff --git a/record/finder/showWindowTitlebarIcons/false.js b/record/finder/showWindowTitlebarIcons/false.js index 83f10e5..fd28828 100644 --- a/record/finder/showWindowTitlebarIcons/false.js +++ b/record/finder/showWindowTitlebarIcons/false.js @@ -12,7 +12,7 @@ module.exports = { 'com.apple.universalaccess', 'showWindowTitlebarIcons', '-bool false', - '0' + '0', ) .killApp('Finder') .openApp('Finder', '~/macos-defaults') @@ -40,9 +40,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.universalaccess showWindowTitlebarIcons && killall Finder' + 'defaults delete com.apple.universalaccess showWindowTitlebarIcons && killall Finder', ) } diff --git a/record/finder/showWindowTitlebarIcons/true.js b/record/finder/showWindowTitlebarIcons/true.js index fff9627..8053901 100644 --- a/record/finder/showWindowTitlebarIcons/true.js +++ b/record/finder/showWindowTitlebarIcons/true.js @@ -12,7 +12,7 @@ module.exports = { 'com.apple.universalaccess', 'showWindowTitlebarIcons', '-bool true', - '1' + '1', ) .killApp('Finder') .openApp('Finder', '~/macos-defaults') @@ -40,9 +40,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.universalaccess showWindowTitlebarIcons && killall Finder' + 'defaults delete com.apple.universalaccess showWindowTitlebarIcons && killall Finder', ) } diff --git a/record/mac-runner.js b/record/mac-runner.js index 279d8d0..5c0f675 100644 --- a/record/mac-runner.js +++ b/record/mac-runner.js @@ -101,7 +101,7 @@ class MacRunner { */ activateApp(appName) { return this.register(() => - execCommand(`osascript -e 'tell application "${appName}" to activate'`) + execCommand(`osascript -e 'tell application "${appName}" to activate'`), ) } @@ -126,8 +126,8 @@ class MacRunner { const v = { start: y, end: y + height } return this.register(() => execCommand( - `osascript -e 'tell application "${appName}" to set the bounds of the first window to {${h.start}, ${v.start}, ${h.end}, ${v.end}}'` - ) + `osascript -e 'tell application "${appName}" to set the bounds of the first window to {${h.start}, ${v.start}, ${h.end}, ${v.end}}'`, + ), ) } @@ -152,7 +152,7 @@ class MacRunner { */ captureScreenRect(x, y, width, height, output) { return this.register(() => - execCommand(`screencapture -R${x},${y},${width},${height} ${output}`) + execCommand(`screencapture -R${x},${y},${width},${height} ${output}`), ) } @@ -167,8 +167,8 @@ class MacRunner { execCommand( `screencapture ${ disableShadow ? '-o' : '' - } -l$(osascript -e 'tell app "${appName}" to id of window 1') ${output}` - ) + } -l$(osascript -e 'tell app "${appName}" to id of window 1') ${output}`, + ), ) } diff --git a/record/menubar/DateFormat/EEE_HH.mm.ss.js b/record/menubar/DateFormat/EEE_HH.mm.ss.js index a12f859..c31c40d 100644 --- a/record/menubar/DateFormat/EEE_HH.mm.ss.js +++ b/record/menubar/DateFormat/EEE_HH.mm.ss.js @@ -8,17 +8,17 @@ const { makeAppActive, compressVideo } = require('../../utils') module.exports = { run: async (outputPath) => { console.log( - '> Recording menu bar clock DateFormat with param set to "EEE HH:mm:ss"' + '> Recording menu bar clock DateFormat with param set to "EEE HH:mm:ss"', ) // Set the menu bar menuExtras to only show the clock, it will be on the left of notification center, siri, and spotlight search. const { stderr: setEnvError } = await exec( - `defaults write com.apple.menuextra.clock DateFormat -string "EEE HH:mm:ss" && killall SystemUIServer && sleep 10` + `defaults write com.apple.menuextra.clock DateFormat -string "EEE HH:mm:ss" && killall SystemUIServer && sleep 10`, ) if (setEnvError) { console.error( - 'An error occured while setting up the menu bar clock DateFormat command' + 'An error occured while setting up the menu bar clock DateFormat command', ) logRollbackInfo() throw new Error(setEnvError) @@ -51,11 +51,11 @@ module.exports = { } const { stderr: deleteEnvError } = await exec( - 'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer && sleep 5' + 'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer && sleep 5', ) if (deleteEnvError) { console.error( - 'An error occured while cleaning the menu bar clock DateFormat environment' + 'An error occured while cleaning the menu bar clock DateFormat environment', ) logRollbackInfo() throw new Error(deleteEnvError) @@ -67,9 +67,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer' + 'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer', ) } diff --git a/record/menubar/DateFormat/EEE_d_MMM_HH.mm.ss.js b/record/menubar/DateFormat/EEE_d_MMM_HH.mm.ss.js index ca9a5b5..4cb9433 100644 --- a/record/menubar/DateFormat/EEE_d_MMM_HH.mm.ss.js +++ b/record/menubar/DateFormat/EEE_d_MMM_HH.mm.ss.js @@ -8,17 +8,17 @@ const { makeAppActive, compressVideo } = require('../../utils') module.exports = { run: async (outputPath) => { console.log( - '> Recording menu bar clock DateFormat with param set to "EEE d MMM HH:mm:ss"' + '> Recording menu bar clock DateFormat with param set to "EEE d MMM HH:mm:ss"', ) // Set the menu bar menuExtras to only show the clock, it will be on the left of notification center, siri, and spotlight search. const { stderr: setEnvError } = await exec( - `defaults write com.apple.menuextra.clock DateFormat -string "EEE d MMM HH:mm:ss" && killall SystemUIServer && sleep 10` + `defaults write com.apple.menuextra.clock DateFormat -string "EEE d MMM HH:mm:ss" && killall SystemUIServer && sleep 10`, ) if (setEnvError) { console.error( - 'An error occured while setting up the menu bar clock DateFormat command' + 'An error occured while setting up the menu bar clock DateFormat command', ) logRollbackInfo() throw new Error(setEnvError) @@ -51,11 +51,11 @@ module.exports = { } const { stderr: deleteEnvError } = await exec( - 'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer && sleep 5' + 'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer && sleep 5', ) if (deleteEnvError) { console.error( - 'An error occured while cleaning the menu bar clock DateFormat environment' + 'An error occured while cleaning the menu bar clock DateFormat environment', ) logRollbackInfo() throw new Error(deleteEnvError) @@ -67,9 +67,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer' + 'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer', ) } diff --git a/record/menubar/DateFormat/EEE_h.mm.ss.js b/record/menubar/DateFormat/EEE_h.mm.ss.js index b4369d8..406f888 100644 --- a/record/menubar/DateFormat/EEE_h.mm.ss.js +++ b/record/menubar/DateFormat/EEE_h.mm.ss.js @@ -8,17 +8,17 @@ const { makeAppActive, compressVideo } = require('../../utils') module.exports = { run: async (outputPath) => { console.log( - '> Recording menu bar clock DateFormat with param set to "EEE h:mm:ss"' + '> Recording menu bar clock DateFormat with param set to "EEE h:mm:ss"', ) // Set the menu bar menuExtras to only show the clock, it will be on the left of notification center, siri, and spotlight search. const { stderr: setEnvError } = await exec( - `defaults write com.apple.menuextra.clock DateFormat -string "EEE h:mm:ss" && killall SystemUIServer && sleep 10` + `defaults write com.apple.menuextra.clock DateFormat -string "EEE h:mm:ss" && killall SystemUIServer && sleep 10`, ) if (setEnvError) { console.error( - 'An error occured while setting up the menu bar clock DateFormat command' + 'An error occured while setting up the menu bar clock DateFormat command', ) logRollbackInfo() throw new Error(setEnvError) @@ -51,11 +51,11 @@ module.exports = { } const { stderr: deleteEnvError } = await exec( - 'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer && sleep 5' + 'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer && sleep 5', ) if (deleteEnvError) { console.error( - 'An error occured while cleaning the menu bar clock DateFormat environment' + 'An error occured while cleaning the menu bar clock DateFormat environment', ) logRollbackInfo() throw new Error(deleteEnvError) @@ -67,9 +67,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer' + 'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer', ) } diff --git a/record/menubar/FlashDateSeparators/false.js b/record/menubar/FlashDateSeparators/false.js index d831e42..25c128c 100644 --- a/record/menubar/FlashDateSeparators/false.js +++ b/record/menubar/FlashDateSeparators/false.js @@ -8,17 +8,17 @@ const { makeAppActive, compressVideo } = require('../../utils') module.exports = { run: async (outputPath) => { console.log( - '> Recording menu bar clock FlashDateSeparators with param set to false' + '> Recording menu bar clock FlashDateSeparators with param set to false', ) // Set the menu bar menuExtras to only show the clock, it will be on the left of notification center, siri, and spotlight search. const { stderr: setEnvError } = await exec( - `defaults write com.apple.menuextra.clock FlashDateSeparators -bool false && killall SystemUIServer && sleep 10` + `defaults write com.apple.menuextra.clock FlashDateSeparators -bool false && killall SystemUIServer && sleep 10`, ) if (setEnvError) { console.error( - 'An error occured while setting up the menu bar clock FlashDateSeparators command' + 'An error occured while setting up the menu bar clock FlashDateSeparators command', ) logRollbackInfo() throw new Error(setEnvError) @@ -51,11 +51,11 @@ module.exports = { } const { stderr: deleteEnvError } = await exec( - 'defaults delete com.apple.menuextra.clock FlashDateSeparators && killall SystemUIServer && sleep 10' + 'defaults delete com.apple.menuextra.clock FlashDateSeparators && killall SystemUIServer && sleep 10', ) if (deleteEnvError) { console.error( - 'An error occured while cleaning the menu bar clock FlashDateSeparators environment' + 'An error occured while cleaning the menu bar clock FlashDateSeparators environment', ) logRollbackInfo() throw new Error(deleteEnvError) @@ -67,9 +67,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.menuextra.clock FlashDateSeparators && killall SystemUIServer' + 'defaults delete com.apple.menuextra.clock FlashDateSeparators && killall SystemUIServer', ) } diff --git a/record/menubar/FlashDateSeparators/true.js b/record/menubar/FlashDateSeparators/true.js index 028dcc8..504d4fa 100644 --- a/record/menubar/FlashDateSeparators/true.js +++ b/record/menubar/FlashDateSeparators/true.js @@ -8,17 +8,17 @@ const { makeAppActive, compressVideo } = require('../../utils') module.exports = { run: async (outputPath) => { console.log( - '> Recording menu bar clock FlashDateSeparators with param set to true' + '> Recording menu bar clock FlashDateSeparators with param set to true', ) // Set the menu bar menuExtras to only show the clock, it will be on the left of notification center, siri, and spotlight search. const { stderr: setEnvError } = await exec( - `defaults write com.apple.menuextra.clock FlashDateSeparators -bool true && killall SystemUIServer && sleep 10` + `defaults write com.apple.menuextra.clock FlashDateSeparators -bool true && killall SystemUIServer && sleep 10`, ) if (setEnvError) { console.error( - 'An error occured while setting up the menu bar clock FlashDateSeparators command' + 'An error occured while setting up the menu bar clock FlashDateSeparators command', ) logRollbackInfo() throw new Error(setEnvError) @@ -51,11 +51,11 @@ module.exports = { } const { stderr: deleteEnvError } = await exec( - 'defaults delete com.apple.menuextra.clock FlashDateSeparators && killall SystemUIServer && sleep 10' + 'defaults delete com.apple.menuextra.clock FlashDateSeparators && killall SystemUIServer && sleep 10', ) if (deleteEnvError) { console.error( - 'An error occured while cleaning the menu bar clock FlashDateSeparators environment' + 'An error occured while cleaning the menu bar clock FlashDateSeparators environment', ) logRollbackInfo() throw new Error(deleteEnvError) @@ -67,9 +67,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.menuextra.clock FlashDateSeparators && killall SystemUIServer' + 'defaults delete com.apple.menuextra.clock FlashDateSeparators && killall SystemUIServer', ) } diff --git a/record/package.json b/record/package.json index af564c5..a02f08d 100644 --- a/record/package.json +++ b/record/package.json @@ -23,7 +23,7 @@ "jimp": "0.22.10", "mkdirp": "^2", "node-pngquant-native": "2.2.0", - "prettier": "^2.8.8", + "prettier": "^3.0.0", "prompt-confirm": "2.0.4", "robotjs": "0.6.0", "sharp": "0.32.5" diff --git a/record/record.js b/record/record.js index 6d3209d..0ec6aaf 100644 --- a/record/record.js +++ b/record/record.js @@ -32,7 +32,7 @@ module.exports = async (files) => { await makeAppActive('iTerm') console.info( - `\nAll videos and screenshots were successfully recorded. You can use your mouse again\n` + `\nAll videos and screenshots were successfully recorded. You can use your mouse again\n`, ) } catch (error) { await makeAppActive('iTerm') @@ -40,10 +40,10 @@ module.exports = async (files) => { if (error.code === 'RECORDER_TIMEOUT') { console.info('The recorder timed out.') console.info( - "You probably need to activate the screen recording feature for the terminal you're using." + "You probably need to activate the screen recording feature for the terminal you're using.", ) console.info( - "You'll find that settings under: System Parameters > Security & Confidentiality > Confidentiality > Screen recording" + "You'll find that settings under: System Parameters > Security & Confidentiality > Confidentiality > Screen recording", ) } else if (error.code === 'ENOTDIR') { console.info('A mandatory folder was not found.') diff --git a/record/safari/ShowFullURLInSmartSearchField/false.js b/record/safari/ShowFullURLInSmartSearchField/false.js index 4c62d45..bab84fc 100644 --- a/record/safari/ShowFullURLInSmartSearchField/false.js +++ b/record/safari/ShowFullURLInSmartSearchField/false.js @@ -4,7 +4,7 @@ const { compressPngImage } = require('../../utils') module.exports = { run: async (outputPath) => { console.log( - '> Recording safari ShowFullURLInSmartSearchField with param set to false' + '> Recording safari ShowFullURLInSmartSearchField with param set to false', ) try { @@ -14,7 +14,7 @@ module.exports = { 'com.apple.Safari', 'ShowFullURLInSmartSearchField', '-bool false', - '0' + '0', ) .openApp('Safari', '-F https://www.apple.com/macos/ventura/') .activateApp('Safari') @@ -41,9 +41,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.Safari ShowFullURLInSmartSearchField && killall Safari' + 'defaults delete com.apple.Safari ShowFullURLInSmartSearchField && killall Safari', ) } diff --git a/record/safari/ShowFullURLInSmartSearchField/true.js b/record/safari/ShowFullURLInSmartSearchField/true.js index ef089ce..0c34615 100644 --- a/record/safari/ShowFullURLInSmartSearchField/true.js +++ b/record/safari/ShowFullURLInSmartSearchField/true.js @@ -4,7 +4,7 @@ const { compressPngImage } = require('../../utils') module.exports = { run: async (outputPath) => { console.log( - '> Recording safari ShowFullURLInSmartSearchField with param set to true' + '> Recording safari ShowFullURLInSmartSearchField with param set to true', ) try { @@ -14,7 +14,7 @@ module.exports = { 'com.apple.Safari', 'ShowFullURLInSmartSearchField', '-bool true', - '1' + '1', ) .openApp('Safari', '-F https://www.apple.com/macos/ventura/') .activateApp('Safari') @@ -41,9 +41,9 @@ module.exports = { function logRollbackInfo() { console.info( - 'Please manually run this command to make sure everything is properly reset:' + 'Please manually run this command to make sure everything is properly reset:', ) console.info( - 'defaults delete com.apple.Safari ShowFullURLInSmartSearchField && killall Safari' + 'defaults delete com.apple.Safari ShowFullURLInSmartSearchField && killall Safari', ) } diff --git a/record/screenshots/disable-shadow/false.js b/record/screenshots/disable-shadow/false.js index 67e95a9..f6b93dd 100644 --- a/record/screenshots/disable-shadow/false.js +++ b/record/screenshots/disable-shadow/false.js @@ -4,7 +4,7 @@ const { compressPngImage } = require('../../utils') module.exports = { run: async (outputPath) => { console.log( - '> Recording screencapture disable-shadow with param set to false' + '> Recording screencapture disable-shadow with param set to false', ) try { diff --git a/record/screenshots/disable-shadow/true.js b/record/screenshots/disable-shadow/true.js index 7d057d1..3f59956 100644 --- a/record/screenshots/disable-shadow/true.js +++ b/record/screenshots/disable-shadow/true.js @@ -4,7 +4,7 @@ const { compressPngImage } = require('../../utils') module.exports = { run: async (outputPath) => { console.log( - '> Recording screencapture disable-shadow with param set to true' + '> Recording screencapture disable-shadow with param set to true', ) try { diff --git a/record/textedit/RichText/false.js b/record/textedit/RichText/false.js index 68222e5..8e97935 100644 --- a/record/textedit/RichText/false.js +++ b/record/textedit/RichText/false.js @@ -40,7 +40,7 @@ module.exports = { async function manageFile(filename, create) { console.log(` Command: ${create ? 'create' : 'remove'} ${filename}`) const { stderr: mngFile } = await exec( - `${create ? 'touch' : 'rm -f'} ${filename}` + `${create ? 'touch' : 'rm -f'} ${filename}`, ) if (mngFile) { console.error('An error occured while working with a file') @@ -53,7 +53,7 @@ async function addContentToFile(filename, content) { const { stderr: mngFile } = await exec( `cat > ${filename} << EOF ${content} -EOF` +EOF`, ) if (mngFile) { console.error('An error occured while working with a file') diff --git a/record/textedit/RichText/true.js b/record/textedit/RichText/true.js index d98d5d3..9ce0792 100644 --- a/record/textedit/RichText/true.js +++ b/record/textedit/RichText/true.js @@ -12,7 +12,7 @@ module.exports = { await manageFile(filename, true) await addContentToFile( filename, - '{\\rtf1\\ansi\\ansicpg1252\\cocoartf2577\\cocoatextscaling0\\cocoaplatform0{\\fonttbl}{\\colortbl;\\red255\\green255\\blue255;}{\\*\\expandedcolortbl;;}\\paperw11900\\paperh16840\\margl1440\\margr1440\\vieww11520\\viewh8400\\viewkind0}' + '{\\rtf1\\ansi\\ansicpg1252\\cocoartf2577\\cocoatextscaling0\\cocoaplatform0{\\fonttbl}{\\colortbl;\\red255\\green255\\blue255;}{\\*\\expandedcolortbl;;}\\paperw11900\\paperh16840\\margl1440\\margr1440\\vieww11520\\viewh8400\\viewkind0}', ) const runner = new MacRunner() @@ -43,7 +43,7 @@ module.exports = { async function manageFile(filename, create) { console.log(` Command: ${create ? 'create' : 'remove'} ${filename}`) const { stderr: mngFile } = await exec( - `${create ? 'touch' : 'rm -f'} ${filename}` + `${create ? 'touch' : 'rm -f'} ${filename}`, ) if (mngFile) { console.error('An error occured while working with a file') @@ -56,7 +56,7 @@ async function addContentToFile(filename, content) { const { stderr: mngFile } = await exec( `cat > ${filename} << EOF ${content} -EOF` +EOF`, ) if (mngFile) { console.error('An error occured while working with a file') diff --git a/record/utils.js b/record/utils.js index a52dfc2..c32e011 100644 --- a/record/utils.js +++ b/record/utils.js @@ -34,7 +34,7 @@ module.exports.captureImage = (x, y, w, h) => { module.exports.compressPngImage = async ( inputPath, outputFolder, - outputName + outputName, ) => { const tmpOutput = `${outputFolder}/${outputName}-tmp.png` const finalOutput = `${outputFolder}/${outputName}.png` @@ -106,7 +106,7 @@ function resizeVideo(input, output) { ]) ffmpeg.stderr.on('data', (message) => - ffmpegRawLogs.push(message.toString('utf8')) + ffmpegRawLogs.push(message.toString('utf8')), ) ffmpeg.on('exit', (ffmpegExitCode) => { if (process.env.NODE_ENV === 'DEBUG') { diff --git a/record/yarn.lock b/record/yarn.lock index bc15a2a..867c782 100644 --- a/record/yarn.lock +++ b/record/yarn.lock @@ -1775,10 +1775,10 @@ prebuild-install@^7.1.1: tar-fs "^2.0.0" tunnel-agent "^0.6.0" -prettier@^2.8.8: - version "2.8.8" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== +prettier@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643" + integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg== process-nextick-args@~2.0.0: version "2.0.1" diff --git a/yarn.lock b/yarn.lock index b0ea408..b21ebd2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1677,10 +1677,10 @@ preact@^10.0.0: resolved "https://registry.yarnpkg.com/preact/-/preact-10.17.1.tgz#0a1b3c658c019e759326b9648c62912cf5c2dde1" integrity sha512-X9BODrvQ4Ekwv9GURm9AKAGaomqXmip7NQTZgY7gcNmr7XE83adOMJvd3N42id1tMFU7ojiynRsYnY6/BRFxLA== -prettier@^2.8.8: - version "2.8.8" - resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz" - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== +prettier@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643" + integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg== progress@2.0.3: version "2.0.3"