diff --git a/packages/api/src/resolvers/highlight/index.ts b/packages/api/src/resolvers/highlight/index.ts index 6dcf3cfe9..046b97495 100644 --- a/packages/api/src/resolvers/highlight/index.ts +++ b/packages/api/src/resolvers/highlight/index.ts @@ -97,7 +97,7 @@ export const mergeHighlightResolver = authorized< const mergedColors: string[] = [] try { - const existingHighlights = await authTrx( + const existingHighlights = await authTrx( (tx) => tx .withRepository(highlightRepository) diff --git a/packages/api/src/schema.ts b/packages/api/src/schema.ts index f2de7a2c9..8af1ed1d3 100755 --- a/packages/api/src/schema.ts +++ b/packages/api/src/schema.ts @@ -1,6 +1,6 @@ import gql from 'graphql-tag' -const schema = gql` +const schema: any = gql` # Scalars scalar Date diff --git a/packages/api/src/server.ts b/packages/api/src/server.ts index 724e3f024..9ff41c75e 100755 --- a/packages/api/src/server.ts +++ b/packages/api/src/server.ts @@ -55,8 +55,8 @@ const PORT = process.env.PORT || 4000 export const createApp = async (): Promise => { // Dynamically import Express to avoid static require() of ES module const expressModule = await import('express') - const expressFn = expressModule.default ?? expressModule - const app: Application = expressFn() + const expressFn = expressModule.default || expressModule + const app: Application = (expressFn as any)() // Initialize Sentry dynamically to avoid static require() of ES module const Sentry = await import('@sentry/node') @@ -190,7 +190,7 @@ const main = async (): Promise => { await apolloServer.start() // Disable ApolloServer's internal body parser since express.json() is applied globally apolloServer.applyMiddleware({ - app, + app: app as any, path: '/api/graphql', cors: corsConfig, bodyParserConfig: false, diff --git a/packages/content-handler/package.json b/packages/content-handler/package.json index e1f4604ee..3468c9396 100644 --- a/packages/content-handler/package.json +++ b/packages/content-handler/package.json @@ -36,6 +36,7 @@ "linkedom": "^0.14.16", "lodash": "^4.17.21", "luxon": "^3.0.4", + "minimatch": "^10.0.3", "underscore": "^1.13.6", "uuid": "^9.0.0" }, diff --git a/packages/content-handler/tsconfig.json b/packages/content-handler/tsconfig.json index 48d435fdf..87671b182 100644 --- a/packages/content-handler/tsconfig.json +++ b/packages/content-handler/tsconfig.json @@ -1,9 +1,10 @@ { - "extends": "./../../tsconfig.json", + "extends": "./../../tsconfig.base.json", "compilerOptions": { "rootDir": ".", "declaration": true, - "outDir": "build" + "outDir": "build", + "skipLibCheck": true }, "include": ["src"] } diff --git a/packages/text-to-speech/package.json b/packages/text-to-speech/package.json index 869a9b573..dbac8b832 100644 --- a/packages/text-to-speech/package.json +++ b/packages/text-to-speech/package.json @@ -25,11 +25,11 @@ "devDependencies": { "@types/chai": "^4.3.14", "@types/html-to-text": "^8.1.1", + "@types/jsonwebtoken": "^9.0.7", "@types/mocha": "^10.0.6", "@types/natural": "^5.1.1", "@types/node": "^14.11.2", "@types/underscore": "^1.11.4", - "@types/jsonwebtoken": "^9.0.7", "chai": "^4.3.6", "eslint-plugin-prettier": "^4.0.0", "mocha": "^10.0.0" @@ -45,6 +45,7 @@ "jsonwebtoken": "^9.0.2", "linkedom": "^0.14.12", "microsoft-cognitiveservices-speech-sdk": "1.30", + "minimatch": "^10.0.3", "natural": "^6.2.0", "nodemon": "^2.0.15", "underscore": "^1.13.4" diff --git a/packages/text-to-speech/src/azureTextToSpeech.ts b/packages/text-to-speech/src/azureTextToSpeech.ts index fe43b826f..1b2174066 100644 --- a/packages/text-to-speech/src/azureTextToSpeech.ts +++ b/packages/text-to-speech/src/azureTextToSpeech.ts @@ -44,7 +44,7 @@ export class AzureTextToSpeech implements TextToSpeech { synthesizer.synthesizing = function (s, e) { // convert arrayBuffer to stream and write to stream - audioStream?.write(Buffer.from(e.result.audioData)) + audioStream?.write(new Uint8Array(e.result.audioData)) } // The event synthesis completed signals that the synthesis is completed. diff --git a/packages/text-to-speech/tsconfig.json b/packages/text-to-speech/tsconfig.json index 7634a8d53..ea61391ad 100644 --- a/packages/text-to-speech/tsconfig.json +++ b/packages/text-to-speech/tsconfig.json @@ -1,10 +1,12 @@ { - "extends": "./../../tsconfig.json", + "extends": "./../../tsconfig.base.json", "compilerOptions": { "outDir": "build", "rootDir": ".", - // Generate d.ts files - "declaration": true + "declaration": true, + "skipLibCheck": true, + "strict": false, + "lib": ["ES2020", "esnext.disposable"] }, - "include": ["src", "test"] + "include": ["src"] }