This commit is contained in:
2024-05-20 01:15:45 +02:00
commit 7eb9f4ad8b
4 changed files with 76 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
bun.lockb
package-lock.json
node_modules/
.idea/
._*
.DS_Store
+20
View File
@@ -0,0 +1,20 @@
import logger, {Level, type Writer, type WriterOptions} from 'log'
export * as log from 'log'
export default logger
export class Ntfy implements Writer {
readonly _options: WriterOptions & { url: string, token?: string };
public constructor(options: WriterOptions & { url: string, token?: string }) {
this._options = options
}
public log(_level: Level, ...data: any[]) : void {
throw "todo"
}
get options() : WriterOptions {
return this._options;
}
}
+18
View File
@@ -0,0 +1,18 @@
{
"name": "logger-ntfy",
"description": "Log writer that sends logs to a ntfy server",
"version": "1.0.0",
"author": "Pascal Perrenoud <pascal@pband.ch>",
"module": "index.ts",
"type": "module",
"files": ["index.ts"],
"dependencies": {
"log": "git+https://git.pband.ch/typescript/log.git"
},
"peerDependencies": {
"typescript": "^5.0.0"
}
}
+32
View File
@@ -0,0 +1,32 @@
{
"compilerOptions": {
// Enable latest features
"lib": ["ESNext","dom"],
"target": "ESNext",
"module": "ESNext",
"moduleDetection": "force",
"allowJs": true,
"checkJs": true,
// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,
// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"forceConsistentCasingInFileNames": true,
"noPropertyAccessFromIndexSignature": false
},
"include": [
"index.ts",
]
}