diff --git a/package.json b/package.json index 05b905e..95b5430 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Warn: no test specified\" && exit 0" }, "keywords": [], "author": "@CJ_Clippy", diff --git a/packages/archive/package.json b/packages/archive/package.json index 83f7b13..1f02d1b 100644 --- a/packages/archive/package.json +++ b/packages/archive/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.ts", "scripts": { - "test": "mocha" + "test": "echo \"Warn: no test specified\" && exit 0" }, "keywords": [], "author": "@CJ_Clippy", diff --git a/packages/archive/pnpm-lock.yaml b/packages/archive/pnpm-lock.yaml index d37117c..d24d0e2 100644 --- a/packages/archive/pnpm-lock.yaml +++ b/packages/archive/pnpm-lock.yaml @@ -15,6 +15,40 @@ importers: specifier: ^7.0.1 version: 7.5.0 + ../..: {} + + ../boop: {} + + ../bot: {} + + ../capture: {} + + ../image: {} + + ../infra: {} + + ../next: {} + + ../scout: {} + + ../storage: {} + + ../strapi: {} + + ../taco: {} + + ../temporal-worker: {} + + ../temporal-workflows: {} + + ../types: {} + + ../uppy: {} + + ../utils: {} + + ../video: {} + packages: '@aws-crypto/crc32@5.2.0': diff --git a/packages/boop/package.json b/packages/boop/package.json index 64664f6..2101088 100644 --- a/packages/boop/package.json +++ b/packages/boop/package.json @@ -5,7 +5,7 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", + "test": "echo \"Warn: no test specified\" && exit 0", "start": "node dist/index.js", "build": "tsc --build" }, diff --git a/packages/bot/package.json b/packages/bot/package.json index b3cc859..7498e4e 100644 --- a/packages/bot/package.json +++ b/packages/bot/package.json @@ -5,7 +5,7 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", + "test": "echo \"Warn: no test specified\" && exit 0", "start": "node ./dist/index.js", "dev": "nodemon --ext js,ts,json,yaml --exec \"node --loader ts-node/esm --disable-warning=ExperimentalWarning ./src/index.ts\"", "build": "tsc --build" diff --git a/packages/image/package.json b/packages/image/package.json index 772fce3..0ad9271 100644 --- a/packages/image/package.json +++ b/packages/image/package.json @@ -5,7 +5,7 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Warn: no test specified\" && exit 0" }, "keywords": [], "author": "", diff --git a/packages/scout/.mocharc.json b/packages/scout/.mocharc.json index 23c41cd..7771cc1 100644 --- a/packages/scout/.mocharc.json +++ b/packages/scout/.mocharc.json @@ -1,4 +1,6 @@ { + "$schema": "https://json.schemastore.org/mocharc.json", "extension": ["ts"], + "require": "tsx", "spec": "src/**/*.spec.ts" -} \ No newline at end of file +} diff --git a/packages/scout/package.json b/packages/scout/package.json index 4746e44..1cd62b4 100644 --- a/packages/scout/package.json +++ b/packages/scout/package.json @@ -8,7 +8,7 @@ "./*.js": "./src/*.js" }, "scripts": { - "test": "mocha", + "test": "mocha --require ts-node/register src/**/*.spec.ts", "build:worker": "tsc --build ./tsconfig.json", "start": "echo please use either start:manager or start:worker", "start:manager": "node --loader ts-node/esm ./src/index.ts", @@ -44,7 +44,6 @@ "qs": "^6.12.1", "sharp": "^0.33.4", "slugify": "^1.6.6", - "ts-node": "^10.9.2", "tsx": "^4.7.2", "types": "workspace:^", "xpath": "^0.0.34" @@ -53,6 +52,7 @@ "devDependencies": { "chai": "^5.1.0", "mocha": "^10.4.0", + "ts-node": "^10.9.2", "typescript": "^5.4.5" } } diff --git a/packages/scout/pnpm-lock.yaml b/packages/scout/pnpm-lock.yaml index 35c0474..0d822d0 100644 --- a/packages/scout/pnpm-lock.yaml +++ b/packages/scout/pnpm-lock.yaml @@ -86,9 +86,6 @@ importers: slugify: specifier: ^1.6.6 version: 1.6.6 - ts-node: - specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.6.13)(@types/node@20.14.10)(typescript@5.5.3) tsx: specifier: ^4.7.2 version: 4.16.2 @@ -105,10 +102,47 @@ importers: mocha: specifier: ^10.4.0 version: 10.6.0 + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@swc/core@1.6.13)(@types/node@20.14.10)(typescript@5.5.3) typescript: specifier: ^5.4.5 version: 5.5.3 + ../..: {} + + ../archive: {} + + ../boop: {} + + ../bot: {} + + ../capture: {} + + ../image: {} + + ../infra: {} + + ../next: {} + + ../storage: {} + + ../strapi: {} + + ../taco: {} + + ../temporal-worker: {} + + ../temporal-workflows: {} + + ../types: {} + + ../uppy: {} + + ../utils: {} + + ../video: {} + packages: '@aws-crypto/crc32@5.2.0': diff --git a/packages/scout/src/cb.spec.js b/packages/scout/src/cb.spec.ts similarity index 100% rename from packages/scout/src/cb.spec.js rename to packages/scout/src/cb.spec.ts diff --git a/packages/scout/src/cb.js b/packages/scout/src/cb.ts similarity index 70% rename from packages/scout/src/cb.js rename to packages/scout/src/cb.ts index cea5522..32fab69 100644 --- a/packages/scout/src/cb.js +++ b/packages/scout/src/cb.ts @@ -5,7 +5,7 @@ import * as cheerio from 'cheerio' * @param {String} roomUrl example: https://chaturbate.com/projektmelody * @returns {Object} initialRoomDossier */ -export async function getInitialRoomDossier(roomUrl) { +export async function getInitialRoomDossier(roomUrl: string) { try { const res = await fetch(roomUrl, { headers: { @@ -23,8 +23,12 @@ export async function getInitialRoomDossier(roomUrl) { return dossier; } catch (error) { - // Handle the error gracefully - console.log(`Error fetching initial room dossier: ${error.message}`); - return null; // Or any other appropriate action you want to take + if (error instanceof Error) { + // Handle the error gracefully + console.error(`Error fetching initial room dossier: ${error.message}`); + return null; // Or any other appropriate action you want to take + } else { + console.error('caught an exotic error, uh-oh') + } } } diff --git a/packages/storage/package.json b/packages/storage/package.json index a075ff4..2efa427 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -8,7 +8,7 @@ "./*.js": "./src/*.js" }, "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Warn: no test specified\" && exit 0" }, "keywords": [], "author": "@CJ_Clippy", diff --git a/packages/taco/package.json b/packages/taco/package.json index d5dde6d..edd400a 100644 --- a/packages/taco/package.json +++ b/packages/taco/package.json @@ -5,7 +5,7 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Warn: no test specified\" && exit 0" }, "keywords": [], "author": "", diff --git a/packages/types/package.json b/packages/types/package.json index b53daae..f07a5bf 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -5,7 +5,7 @@ "description": "", "main": "index.d.ts", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Warn: no test specified\" && exit 0" }, "keywords": [], "author": "", diff --git a/packages/utils/package.json b/packages/utils/package.json index e1f575d..c314f5f 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -5,7 +5,7 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Warn: no test specified\" && exit 0" }, "keywords": [], "author": "", diff --git a/packages/video/package.json b/packages/video/package.json index d5eed9b..68e5097 100644 --- a/packages/video/package.json +++ b/packages/video/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Warn: no test specified\" && exit 0" }, "keywords": [], "author": "", diff --git a/scripts/postgres-create.sh b/scripts/postgres-create.sh index 701e67c..a175490 100755 --- a/scripts/postgres-create.sh +++ b/scripts/postgres-create.sh @@ -29,14 +29,14 @@ kubectl -n futureporn exec postgres -- psql -U postgres --command "\ CONNECTION LIMIT = -1 \ IS_TEMPLATE = False;" -kubectl -n futureporn exec postgres -- psql -U postgres --command "\ - CREATE DATABASE trigger \ - WITH \ - OWNER = postgres \ - ENCODING = 'UTF8' \ - LOCALE_PROVIDER = 'libc' \ - CONNECTION LIMIT = -1 \ - IS_TEMPLATE = False;" +# kubectl -n futureporn exec postgres -- psql -U postgres --command "\ +# CREATE DATABASE trigger \ +# WITH \ +# OWNER = postgres \ +# ENCODING = 'UTF8' \ +# LOCALE_PROVIDER = 'libc' \ +# CONNECTION LIMIT = -1 \ +# IS_TEMPLATE = False;" # ./temporal-sql-tool -u $(SQL_USER) --pw $(SQL_PASSWORD) -p 5432 --pl postgres12 --db $(TEMPORAL_DB) drop -f