From 07a4c48f972bd9cf9a37f909b4974601706cb177 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:45:08 +1100 Subject: [PATCH] Update TokenService to work in isolated environment --- .pnp.cjs | 40 ++++++++++++++++++++-------------------- package.json | 6 +++--- src/helpers/TSClient.ts | 2 +- yarn.lock | 32 ++++++++++++++++---------------- 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.pnp.cjs b/.pnp.cjs index f06878c..9e480c9 100644 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -28,9 +28,9 @@ const RAW_RUNTIME_STATE = "packageDependencies": [\ ["@octokit/auth-token", "npm:4.0.0"],\ ["@octokit/rest", "npm:20.0.2"],\ - ["@toast/tokenservice-client", "npm:1.0.10::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.10%2Ftokenservice-client-1.0.10.tgz"],\ + ["@toast/tokenservice-client", "npm:1.0.11::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.11%2Ftokenservice-client-1.0.11.tgz"],\ ["@types/ms", "npm:0.7.34"],\ - ["@types/node", "npm:20.11.6"],\ + ["@types/node", "npm:20.11.10"],\ ["@types/node-cron", "npm:3.0.11"],\ ["@types/pg", "npm:8.11.0"],\ ["@types/sequelize", "npm:4.28.20"],\ @@ -48,7 +48,7 @@ const RAW_RUNTIME_STATE = ["simple-git", "npm:3.22.0"],\ ["systeminformation", "npm:5.21.24"],\ ["typescript", "patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7"],\ - ["undici", "npm:6.4.0"]\ + ["undici", "npm:6.5.0"]\ ],\ "linkType": "SOFT"\ }]\ @@ -571,11 +571,11 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["@toast/tokenservice-client", [\ - ["npm:1.0.10::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.10%2Ftokenservice-client-1.0.10.tgz", {\ - "packageLocation": "./.yarn/cache/@toast-tokenservice-client-npm-1.0.10-3f262fca44-f832828a1d.zip/node_modules/@toast/tokenservice-client/",\ + ["npm:1.0.11::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.11%2Ftokenservice-client-1.0.11.tgz", {\ + "packageLocation": "./.yarn/cache/@toast-tokenservice-client-npm-1.0.11-c95d3498fc-c910af2b01.zip/node_modules/@toast/tokenservice-client/",\ "packageDependencies": [\ - ["@toast/tokenservice-client", "npm:1.0.10::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.10%2Ftokenservice-client-1.0.10.tgz"],\ - ["undici", "npm:6.4.0"]\ + ["@toast/tokenservice-client", "npm:1.0.11::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.11%2Ftokenservice-client-1.0.11.tgz"],\ + ["undici", "npm:6.5.0"]\ ],\ "linkType": "HARD"\ }]\ @@ -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.11.6"]\ + ["@types/node", "npm:20.11.10"]\ ],\ "linkType": "HARD"\ }]\ @@ -637,10 +637,10 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["@types/node", [\ - ["npm:20.11.6", {\ - "packageLocation": "./.yarn/cache/@types-node-npm-20.11.6-e5e1974d32-375dfc75f0.zip/node_modules/@types/node/",\ + ["npm:20.11.10", {\ + "packageLocation": "./.yarn/cache/@types-node-npm-20.11.10-169269fe65-41ca9c7e7c.zip/node_modules/@types/node/",\ "packageDependencies": [\ - ["@types/node", "npm:20.11.6"],\ + ["@types/node", "npm:20.11.10"],\ ["undici-types", "npm:5.26.5"]\ ],\ "linkType": "HARD"\ @@ -660,7 +660,7 @@ const RAW_RUNTIME_STATE = "packageLocation": "./.yarn/cache/@types-pg-npm-8.11.0-bf104da0ba-91a7ccc5dc.zip/node_modules/@types/pg/",\ "packageDependencies": [\ ["@types/pg", "npm:8.11.0"],\ - ["@types/node", "npm:20.11.6"],\ + ["@types/node", "npm:20.11.10"],\ ["pg-protocol", "npm:1.6.0"],\ ["pg-types", "npm:4.0.1"]\ ],\ @@ -694,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.11.6"]\ + ["@types/node", "npm:20.11.10"]\ ],\ "linkType": "HARD"\ }]\ @@ -993,9 +993,9 @@ const RAW_RUNTIME_STATE = ["daggerbot-ts", "workspace:."],\ ["@octokit/auth-token", "npm:4.0.0"],\ ["@octokit/rest", "npm:20.0.2"],\ - ["@toast/tokenservice-client", "npm:1.0.10::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.10%2Ftokenservice-client-1.0.10.tgz"],\ + ["@toast/tokenservice-client", "npm:1.0.11::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.11%2Ftokenservice-client-1.0.11.tgz"],\ ["@types/ms", "npm:0.7.34"],\ - ["@types/node", "npm:20.11.6"],\ + ["@types/node", "npm:20.11.10"],\ ["@types/node-cron", "npm:3.0.11"],\ ["@types/pg", "npm:8.11.0"],\ ["@types/sequelize", "npm:4.28.20"],\ @@ -1013,7 +1013,7 @@ const RAW_RUNTIME_STATE = ["simple-git", "npm:3.22.0"],\ ["systeminformation", "npm:5.21.24"],\ ["typescript", "patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7"],\ - ["undici", "npm:6.4.0"]\ + ["undici", "npm:6.5.0"]\ ],\ "linkType": "SOFT"\ }]\ @@ -2606,10 +2606,10 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "HARD"\ }],\ - ["npm:6.4.0", {\ - "packageLocation": "./.yarn/cache/undici-npm-6.4.0-3c1375c132-65552916aa.zip/node_modules/undici/",\ + ["npm:6.5.0", {\ + "packageLocation": "./.yarn/cache/undici-npm-6.5.0-5598def435-0ad9289bd8.zip/node_modules/undici/",\ "packageDependencies": [\ - ["undici", "npm:6.4.0"],\ + ["undici", "npm:6.5.0"],\ ["@fastify/busboy", "npm:2.0.0"]\ ],\ "linkType": "HARD"\ @@ -2725,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.11.6"]\ + ["@types/node", "npm:20.11.10"]\ ],\ "linkType": "HARD"\ }]\ diff --git a/package.json b/package.json index c24e1bf..c7b40f3 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "dependencies": { "@octokit/auth-token": "4.0.0", "@octokit/rest": "20.0.2", - "@toast/tokenservice-client": "1.0.10", + "@toast/tokenservice-client": "1.0.11", "ansi-colors": "4.1.3", "canvas": "2.11.2", "dayjs": "1.11.10", @@ -48,11 +48,11 @@ "sequelize": "6.35.2", "simple-git": "3.22.0", "systeminformation": "5.21.24", - "undici": "6.4.0" + "undici": "6.5.0" }, "devDependencies": { "@types/ms": "0.7.34", - "@types/node": "20.11.6", + "@types/node": "20.11.10", "@types/node-cron": "3.0.11", "@types/pg": "8.11.0", "@types/sequelize": "4.28.20", diff --git a/src/helpers/TSClient.ts b/src/helpers/TSClient.ts index 1033a7a..9d46d61 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(process.argv[3] ?? 'daggerbot').connect(); +export default async()=>new TokenService(process.argv[3] ?? 'daggerbot', false).connect(); diff --git a/yarn.lock b/yarn.lock index eb9f264..4355513 100644 --- a/yarn.lock +++ b/yarn.lock @@ -379,12 +379,12 @@ __metadata: languageName: node linkType: hard -"@toast/tokenservice-client@npm:1.0.10": - version: 1.0.10 - resolution: "@toast/tokenservice-client@npm:1.0.10::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.10%2Ftokenservice-client-1.0.10.tgz" +"@toast/tokenservice-client@npm:1.0.11": + version: 1.0.11 + resolution: "@toast/tokenservice-client@npm:1.0.11::__archiveUrl=https%3A%2F%2Fgit.toast-server.net%2Fapi%2Fpackages%2Ftoast%2Fnpm%2F%2540toast%252Ftokenservice-client%2F-%2F1.0.11%2Ftokenservice-client-1.0.11.tgz" dependencies: - undici: "npm:6.4.0" - checksum: f832828a1d076cd961fca408cf10b9240c99526801b6d68e262d3fab9b460ee1eb45bef0d37abc6eecd2e24f96d9af8c410a39f6f93337e352a1bf07110e3fca + undici: "npm:6.5.0" + checksum: c910af2b01876ca53de3078cf6b20c3cd8619ed807c3ce573074bc886a8690e6edc43f961088acf4bc2a7e925e8a0cb0e35df930b5923b20ecbbad6fd9bf4c81 languageName: node linkType: hard @@ -441,12 +441,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:20.11.6": - version: 20.11.6 - resolution: "@types/node@npm:20.11.6" +"@types/node@npm:*, @types/node@npm:20.11.10": + version: 20.11.10 + resolution: "@types/node@npm:20.11.10" dependencies: undici-types: "npm:~5.26.4" - checksum: 375dfc75f0aa8b7fb99382d84c317e5dab2969dcc3f54d8490b119151060923eae6483839552347bc78262bbcefb2951ee131e15372f4e80b755be2dda9afe80 + checksum: 41ca9c7e7c95bf070ad747ab266f267f41950e01f5ddda739d0665c2ed39acc45cce46f78e33ffa2bf2dacd74a8493044b967c86358017dacce12958e49db664 languageName: node linkType: hard @@ -746,9 +746,9 @@ __metadata: dependencies: "@octokit/auth-token": "npm:4.0.0" "@octokit/rest": "npm:20.0.2" - "@toast/tokenservice-client": "npm:1.0.10" + "@toast/tokenservice-client": "npm:1.0.11" "@types/ms": "npm:0.7.34" - "@types/node": "npm:20.11.6" + "@types/node": "npm:20.11.10" "@types/node-cron": "npm:3.0.11" "@types/pg": "npm:8.11.0" "@types/sequelize": "npm:4.28.20" @@ -766,7 +766,7 @@ __metadata: simple-git: "npm:3.22.0" systeminformation: "npm:5.21.24" typescript: "npm:5.3.3" - undici: "npm:6.4.0" + undici: "npm:6.5.0" languageName: unknown linkType: soft @@ -2160,12 +2160,12 @@ __metadata: languageName: node linkType: hard -"undici@npm:6.4.0": - version: 6.4.0 - resolution: "undici@npm:6.4.0" +"undici@npm:6.5.0": + version: 6.5.0 + resolution: "undici@npm:6.5.0" dependencies: "@fastify/busboy": "npm:^2.0.0" - checksum: 65552916aa84eb8ea262cf7205bf2dc1ca86b616843adceb6d994a172a5a6be7fbf384ab790e7ede82811942f0c71a53e639309e92e05be044866ca54993e0be + checksum: 0ad9289bd8dc8a5ee8cf81a48a629a59c33814702ae706b1d8e7c7fac3cfa85bd6a73943db5d9379f4d420858d239ed3857ec1003e517ddb67eb44fdbc227f3e languageName: node linkType: hard