diff --git a/.yalc/@autotelic/worker-logger/LICENSE b/.yalc/@autotelic/worker-logger/LICENSE deleted file mode 100644 index 58b29d5..0000000 --- a/.yalc/@autotelic/worker-logger/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 autotelic - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/.yalc/@autotelic/worker-logger/README.md b/.yalc/@autotelic/worker-logger/README.md deleted file mode 100644 index b316348..0000000 --- a/.yalc/@autotelic/worker-logger/README.md +++ /dev/null @@ -1 +0,0 @@ -# worker-logger \ No newline at end of file diff --git a/.yalc/@autotelic/worker-logger/index.js b/.yalc/@autotelic/worker-logger/index.js deleted file mode 100644 index b0ee8ac..0000000 --- a/.yalc/@autotelic/worker-logger/index.js +++ /dev/null @@ -1,31 +0,0 @@ -const consoleReporter = async queue => { - queue.forEach(logEvent => console.log(`${logEvent['@l']}: ${logEvent[`@m`]}`)) -} - -class Logger { - constructor({ reporter = consoleReporter - }) { - this.reporter = reporter - this.queue = [] - } - - enqueue(level, msg) { - this.queue.push({ - '@t': new Date().toISOString(), - '@m': msg, - '@l': level, - }) - } - - info(msg) { - this.enqueue('INFO', msg) - } - - report() { - return this.reporter(this.queue) - } -} - -export { - Logger -} diff --git a/.yalc/@autotelic/worker-logger/package.json b/.yalc/@autotelic/worker-logger/package.json deleted file mode 100644 index bca2239..0000000 --- a/.yalc/@autotelic/worker-logger/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "@autotelic/worker-logger", - "version": "0.0.0", - "description": "A logger for cloudflare workers", - "type": "module", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/autotelic/worker-logger.git" - }, - "keywords": [], - "author": "", - "license": "ISC", - "bugs": { - "url": "https://github.com/autotelic/worker-logger/issues" - }, - "homepage": "https://github.com/autotelic/worker-logger#readme", - "yalcSig": "70851c0aad20d6e1fdb78886b1a9bbe1" -} diff --git a/.yalc/@autotelic/worker-logger/yalc.sig b/.yalc/@autotelic/worker-logger/yalc.sig deleted file mode 100644 index baf883b..0000000 --- a/.yalc/@autotelic/worker-logger/yalc.sig +++ /dev/null @@ -1 +0,0 @@ -70851c0aad20d6e1fdb78886b1a9bbe1 \ No newline at end of file diff --git a/package.json b/package.json index e3a4381..32bedf0 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "author": "", "license": "MIT", "dependencies": { - "@autotelic/worker-logger": "file:.yalc/@autotelic/worker-logger", + "@autotelic/worker-logger": "^0.1.0", "@cloudflare/kv-asset-handler": "^0.2.0", "@worker-tools/request-cookie-store": "^0.4.2", "base64url": "^3.0.1", diff --git a/yalc.lock b/yalc.lock deleted file mode 100644 index cf96fda..0000000 --- a/yalc.lock +++ /dev/null @@ -1,10 +0,0 @@ -{ - "version": "v1", - "packages": { - "@autotelic/worker-logger": { - "signature": "70851c0aad20d6e1fdb78886b1a9bbe1", - "file": true, - "replaced": "github:autotelic/worker-logger#main" - } - } -} \ No newline at end of file