Dump WIP
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
bun.lockb
|
||||
package-lock.json
|
||||
node_modules/
|
||||
.idea/
|
||||
._*
|
||||
.DS_Store
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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",
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user