maintenance

This commit is contained in:
2025-09-04 20:27:27 -04:00
parent 8762051e7a
commit 8c1993d39a
4 changed files with 16 additions and 3 deletions

View File

@@ -3,3 +3,6 @@ save = false
[install.scopes] [install.scopes]
"@techniker-me" = "https://registry-node.techniker.me" "@techniker-me" = "https://registry-node.techniker.me"
[test]
preload = ["./test/setup.ts"]

View File

@@ -5,8 +5,14 @@
"scripts": { "scripts": {
"ci-build": "bun run build", "ci-build": "bun run build",
"test": "bun test", "test": "bun test",
"test:unit": "bun test test/unit",
"test:integration": "bun test test/integration",
"test:watch": "bun test --watch", "test:watch": "bun test --watch",
"test:watch:unit": "bun test --watch test/unit",
"test:watch:integration": "bun test --watch test/integration",
"test:coverage": "bun test --coverage", "test:coverage": "bun test --coverage",
"test:coverage:unit": "bun test --coverage test/unit",
"test:coverage:integration": "bun test --coverage test/integration",
"preformat": "bun install", "preformat": "bun install",
"format": "prettier --write ./", "format": "prettier --write ./",
"prelint:fix": "bun format", "prelint:fix": "bun format",

View File

@@ -50,10 +50,12 @@ export class Channels {
private readonly _httpRequests: PCastHttpRequests; private readonly _httpRequests: PCastHttpRequests;
private readonly _channelsByAlias: Map<ChannelAlias, Channel> = new Map(); private readonly _channelsByAlias: Map<ChannelAlias, Channel> = new Map();
constructor(pcastHttpRequests: PCastHttpRequests) { constructor(pcastHttpRequests: PCastHttpRequests, skipInitialization = false) {
this._httpRequests = pcastHttpRequests; this._httpRequests = pcastHttpRequests;
if (!skipInitialization) {
this.initialize(); this.initialize();
} }
}
public async create(name: string, description: string, channelOptions: string[] = []): Promise<Channel> { public async create(name: string, description: string, channelOptions: string[] = []): Promise<Channel> {
if (!name || name.trim().length === 0) { if (!name || name.trim().length === 0) {

View File

@@ -3,5 +3,7 @@ export enum HttpMethod {
POST = 'POST', POST = 'POST',
PUT = 'PUT', PUT = 'PUT',
PATCH = 'PATCH', PATCH = 'PATCH',
DELETE = 'DELETE' DELETE = 'DELETE',
OPTIONS = 'OPTIONS',
HEAD = 'HEAD'
} }