From 4cad547608731801b2498c24817a1e5a8adf02a9 Mon Sep 17 00:00:00 2001 From: Aviv Ben Shahar Date: Mon, 27 May 2024 17:01:15 +0300 Subject: [PATCH 1/2] fix(git): better git addons, `Disable SSL` and use `osxkeychain` for creds --- .../install/config/apps-groups/git.ts | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/commands/install/config/apps-groups/git.ts b/src/commands/install/config/apps-groups/git.ts index 1072888..c906851 100755 --- a/src/commands/install/config/apps-groups/git.ts +++ b/src/commands/install/config/apps-groups/git.ts @@ -37,14 +37,26 @@ export const GIT_APPS: Readonly = [ deps: ['Git'], }, { - name: 'Increase credential cache timeout', - description: 'Increase the cache time for using your credentials from Keychain - 1 month', + name: 'MacOS Keychain store credentials for HTTPS remotes', + description: 'Use macOS Keychain to store credentials', group: 'git', - openUrl: () => `open https://git-scm.com/docs/git-credential-cache`, + openUrl: () => `open https://git-scm.com/docs/gitcredentials`, commands: () => [ // avoid lock for other `git config` options 'sleep 2', - `git config --global credential.helper 'cache --timeout 2592000'`, + `git config --global credential.helper osxkeychain`, + ], + deps: ['Git'], + }, + { + name: 'Disable SSL', + description: 'Disable SSL for Git operations', + group: 'git', + openUrl: () => `open https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpsslVerify`, + commands: () => [ + // avoid lock for other `git config` options + 'sleep 3', + `git config http.sslVerify "false"`, ], deps: ['Git'], }, @@ -56,7 +68,7 @@ export const GIT_APPS: Readonly = [ openUrl: () => `open https://git-scm.com/docs/git-push#Documentation/git-push.txt-pushautoSetupRemote`, commands: () => [ // avoid lock for other `git config` options - 'sleep 3', + 'sleep 4', `git config --global --bool push.autoSetupRemote true`, ], deps: ['Git'], From 4e7d5dbe8b21cfc67e0f53cfe4a60eaad1604766 Mon Sep 17 00:00:00 2001 From: Aviv Ben Shahar Date: Mon, 27 May 2024 17:01:50 +0300 Subject: [PATCH 2/2] =?UTF-8?q?fix(node):=20support=20`package=5Fname`=20c?= =?UTF-8?q?ommand=20for=20getting=20currnet=20WD=20package=20name=20?= =?UTF-8?q?=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zsh/extends/.zshrc.extends.npm.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zsh/extends/.zshrc.extends.npm.sh b/zsh/extends/.zshrc.extends.npm.sh index a636f2a..4173bcc 100755 --- a/zsh/extends/.zshrc.extends.npm.sh +++ b/zsh/extends/.zshrc.extends.npm.sh @@ -5,6 +5,13 @@ alias nsd="npm run start:dev" alias nb="npm run build" alias nt="npm run test" alias nte="npm run test:e2e" + +# Get current working directory package name +function package_name () { + cat package.json | jq '.name' | pbcopy +} + +# Clear all node_modules and reinstall function cnodem() { npm ci --only=prod npm ci