From 815f4aa3bb4a620d338b45537116ade29c97f857 Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Fri, 29 Dec 2023 00:28:44 +1100 Subject: [PATCH] Add CLI args to TSClient --- .pnp.cjs | 15 ++++----------- package.json | 2 +- src/helpers/TSClient.ts | 2 +- yarn.lock | 9 +-------- 4 files changed, 7 insertions(+), 21 deletions(-) diff --git a/.pnp.cjs b/.pnp.cjs index b3d7b4f..1d554ea 100644 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -603,7 +603,7 @@ const RAW_RUNTIME_STATE = "packageLocation": "./.yarn/cache/@types-continuation-local-storage-npm-3.2.7-763e4dc12b-1f272b53bc.zip/node_modules/@types/continuation-local-storage/",\ "packageDependencies": [\ ["@types/continuation-local-storage", "npm:3.2.7"],\ - ["@types/node", "npm:20.4.8"]\ + ["@types/node", "npm:20.10.5"]\ ],\ "linkType": "HARD"\ }]\ @@ -644,13 +644,6 @@ const RAW_RUNTIME_STATE = ["undici-types", "npm:5.26.5"]\ ],\ "linkType": "HARD"\ - }],\ - ["npm:20.4.8", {\ - "packageLocation": "./.yarn/cache/@types-node-npm-20.4.8-f8f2d8d349-199b047de6.zip/node_modules/@types/node/",\ - "packageDependencies": [\ - ["@types/node", "npm:20.4.8"]\ - ],\ - "linkType": "HARD"\ }]\ ]],\ ["@types/node-cron", [\ @@ -667,7 +660,7 @@ const RAW_RUNTIME_STATE = "packageLocation": "./.yarn/cache/@types-pg-npm-8.10.9-ee8620c8e7-787be5431a.zip/node_modules/@types/pg/",\ "packageDependencies": [\ ["@types/pg", "npm:8.10.9"],\ - ["@types/node", "npm:20.4.8"],\ + ["@types/node", "npm:20.10.5"],\ ["pg-protocol", "npm:1.6.0"],\ ["pg-types", "npm:4.0.1"]\ ],\ @@ -701,7 +694,7 @@ const RAW_RUNTIME_STATE = "packageLocation": "./.yarn/cache/@types-ws-npm-8.5.9-91d1b2ab07-7cf66383b8.zip/node_modules/@types/ws/",\ "packageDependencies": [\ ["@types/ws", "npm:8.5.9"],\ - ["@types/node", "npm:20.4.8"]\ + ["@types/node", "npm:20.10.5"]\ ],\ "linkType": "HARD"\ }]\ @@ -2732,7 +2725,7 @@ const RAW_RUNTIME_STATE = "packageLocation": "./.yarn/cache/wkx-npm-0.5.0-fca5152cd8-b8975e33f9.zip/node_modules/wkx/",\ "packageDependencies": [\ ["wkx", "npm:0.5.0"],\ - ["@types/node", "npm:20.4.8"]\ + ["@types/node", "npm:20.10.5"]\ ],\ "linkType": "HARD"\ }]\ diff --git a/package.json b/package.json index 02f5aeb..6aae4a0 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "url": "git+https://github.com/AnxietyisReal/Daggerbot-TS.git" }, "scripts": { - "dev": "yarn tsc && yarn node . src/DB-Beta.config.json", + "dev": "yarn tsc && yarn node . src/DB-Beta.config.json daggerbotbeta", "sdk": "yarn dlx @yarnpkg/sdks vscode" }, "author": "Toast", diff --git a/src/helpers/TSClient.ts b/src/helpers/TSClient.ts index 283b2d6..1033a7a 100644 --- a/src/helpers/TSClient.ts +++ b/src/helpers/TSClient.ts @@ -1,3 +1,3 @@ import TokenService from '@toast/tokenservice-client'; -export default async()=>new TokenService('daggerbot').connect(); +export default async()=>new TokenService(process.argv[3] ?? 'daggerbot').connect(); diff --git a/yarn.lock b/yarn.lock index 4d1a978..ae79b24 100644 --- a/yarn.lock +++ b/yarn.lock @@ -441,14 +441,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*": - version: 20.4.8 - resolution: "@types/node@npm:20.4.8" - checksum: 199b047de67708c36d4c432d46a6b9ef2cef4bfbf0c0e0b6831aee1a9c071e8430287a7cba18ea3c0b7d0332bc5e69e2bf71ba2da022769990e5551b90a65b18 - languageName: node - linkType: hard - -"@types/node@npm:20.10.5": +"@types/node@npm:*, @types/node@npm:20.10.5": version: 20.10.5 resolution: "@types/node@npm:20.10.5" dependencies: