1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-12-25 23:15:38 -05:00

Update Yarn config and handle macOS paths properly

This commit is contained in:
toast-ts 2024-02-28 20:16:11 +11:00
parent 14113009aa
commit af8cbb016c
4 changed files with 11 additions and 11 deletions

View File

@ -1,5 +1,6 @@
{ {
"recommendations": [ "recommendations": [
"arcanis.vscode-zipfs" "arcanis.vscode-zipfs",
"usernamehw.errorlens"
] ]
} }

View File

@ -1,9 +1,13 @@
compressionLevel: mixed compressionLevel: mixed
enableGlobalCache: false enableGlobalCache: false
progressBarStyle: "simba" progressBarStyle: "simba"
defaultSemverRangePrefix: ""
supportedArchitectures:
os:
- "linux"
- "darwin"
cpu:
- "x64"
npmScopes: npmScopes:
toast: toast:
npmRegistryServer: https://git.toast-server.net/api/packages/toast/npm/ npmRegistryServer: https://git.toast-server.net/api/packages/toast/npm/

View File

@ -12,17 +12,12 @@
"sdk": "yarn dlx @yarnpkg/sdks vscode" "sdk": "yarn dlx @yarnpkg/sdks vscode"
}, },
"author": "Toast", "author": "Toast",
"license": "ISC",
"os": [ "os": [
"win32",
"linux", "linux",
"darwin" "darwin"
], ],
"cpu": [ "cpu": [
"x64", "x64"
"!arm64",
"!mips",
"!ia32"
], ],
"engines": { "engines": {
"node": ">=18.18.0, <19 || >=20", "node": ">=18.18.0, <19 || >=20",

View File

@ -1,4 +1,4 @@
export default (text:string)=>{ export default (text:string)=>{
const dirSlash = process.platform === 'linux' ? '\/' : '\\'; const dirSlash = (process.platform === 'linux' || process.platform === 'darwin') ? '\/' : '\\';
return text?.replace(/(?<=\/Users\/|\/home\/|\/media\/)[^/]+/g, match=>'・'.repeat(match.length)).split(dirSlash).join(dirSlash); return text?.replace(/(?<=\/Users\/|\/home\/|\/media\/)[^/]+/g, match=>'・'.repeat(match.length)).split(dirSlash).join(dirSlash);
} }