From 4979b01fdaabeb81dd802e70e363dd65ba2bc624 Mon Sep 17 00:00:00 2001 From: Andreas Thomas Date: Tue, 12 Dec 2023 20:40:13 +0100 Subject: [PATCH] chore: tsconfig (#679) * fix: hide authorization header in v1/keys.verifyKey route * chore: extend tsconfig from @unkey/tsconfig/base.json --- apps/api/package.json | 1 + apps/api/tsconfig.json | 1 + apps/workflows/lib/db.ts | 1 - packages/api/package.json | 1 + packages/api/tsconfig.json | 11 +++++---- pnpm-lock.yaml | 49 +++++++++++++++++++------------------- 6 files changed, 34 insertions(+), 30 deletions(-) diff --git a/apps/api/package.json b/apps/api/package.json index 53c008504d..a9d662ab87 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -9,6 +9,7 @@ }, "devDependencies": { "@cloudflare/workers-types": "^4.20231121.0", + "@unkey/tsconfig": "workspace:^", "bun-types": "^1.0.15", "rollup-plugin-node-builtins": "^2.1.2", "typescript": "^5.3.2", diff --git a/apps/api/tsconfig.json b/apps/api/tsconfig.json index eaa5a0e558..07fdf13eee 100644 --- a/apps/api/tsconfig.json +++ b/apps/api/tsconfig.json @@ -1,4 +1,5 @@ { + "extends": "@unkey/tsconfig/base.json", "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Projects */ diff --git a/apps/workflows/lib/db.ts b/apps/workflows/lib/db.ts index 2438c9023f..7d1656a0cd 100644 --- a/apps/workflows/lib/db.ts +++ b/apps/workflows/lib/db.ts @@ -22,4 +22,3 @@ export const connectDatabase = () => ); export * from "@unkey/db"; -export * from "drizzle-orm"; diff --git a/packages/api/package.json b/packages/api/package.json index 0d5695ceb6..74a20b7704 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -29,6 +29,7 @@ }, "devDependencies": { "@types/node": "^20.8.7", + "@unkey/tsconfig": "workspace:^", "openapi-typescript": "^6.7.2", "tsup": "^7.2.0", "tsx": "^3.14.0", diff --git a/packages/api/tsconfig.json b/packages/api/tsconfig.json index c96450c074..fef29e4334 100644 --- a/packages/api/tsconfig.json +++ b/packages/api/tsconfig.json @@ -1,4 +1,5 @@ { + "extends": "@unkey/tsconfig/base.json", "compilerOptions": { /* Visit https://aka.ms/tsconfig to read more about this file */ /* Projects */ @@ -73,11 +74,11 @@ "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, /* Type Checking */ "strict": true /* Enable all strict type-checking options. */, - // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d09f1f3d43..45e5aebb25 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -93,6 +93,9 @@ importers: '@cloudflare/workers-types': specifier: ^4.20231121.0 version: 4.20231121.0 + '@unkey/tsconfig': + specifier: workspace:^ + version: link:../../internal/tsconfig bun-types: specifier: ^1.0.15 version: 1.0.16 @@ -964,6 +967,9 @@ importers: '@types/node': specifier: ^20.8.7 version: 20.8.7 + '@unkey/tsconfig': + specifier: workspace:^ + version: link:../../internal/tsconfig openapi-typescript: specifier: ^6.7.2 version: 6.7.2 @@ -3352,8 +3358,8 @@ packages: graphql: 16.8.1 dev: false - /@grpc/grpc-js@1.9.12: - resolution: {integrity: sha512-Um5MBuge32TS3lAKX02PGCnFM4xPT996yLgZNb5H03pn6NyJ4Iwn5YcPq6Jj9yxGRk7WOgaZFtVRH5iTdYBeUg==} + /@grpc/grpc-js@1.9.13: + resolution: {integrity: sha512-OEZZu9v9AA+7/tghMDE8o5DAMD5THVnwSqDWuh7PPYO5287rTyqy0xEHT6/e4pbqSrhyLPdQFsam4TwFQVVIIw==} engines: {node: ^8.13.0 || >=10.10.0} dependencies: '@grpc/proto-loader': 0.7.10 @@ -3669,11 +3675,11 @@ packages: react: 18.2.0 dev: false - /@netlify/functions@2.4.0: - resolution: {integrity: sha512-dIqhdj5u4Lu/8qbYwtYpn8NfvIyPHbSTV2lAP4ocL+iwC9As06AXT0wa/xOpO2vRWJa0IMxdZaqCPnkyHlHiyg==} + /@netlify/functions@2.4.1: + resolution: {integrity: sha512-sRFYBaz6dJP1MdUtk/5QNmshhg5UDmB+DUssmH6v9WUG85MrwyExEfGfJA5eClXATjXm0coTvO5nLAlyCpK7QQ==} engines: {node: '>=14.0.0'} dependencies: - '@netlify/serverless-functions-api': 1.11.0 + '@netlify/serverless-functions-api': 1.12.3 is-promise: 4.0.0 dev: true @@ -3682,8 +3688,8 @@ packages: engines: {node: ^14.16.0 || >=16.0.0} dev: true - /@netlify/serverless-functions-api@1.11.0: - resolution: {integrity: sha512-3splAsr2CekL7VTwgo6yTvzD2+f269/s+TJafYazonqMNNo31yzvFxD5HpLtni4DNE1ppymVKZ4X/rLN3yl0vQ==} + /@netlify/serverless-functions-api@1.12.3: + resolution: {integrity: sha512-g1AZ78pCvMnalZtbnViVLGfG5ufjKyKoi3plLSUtZqh0wVuMR7ZGegeZHhOoY4wRfkkETVvWfhgfcpLMbGM5Lg==} engines: {node: ^14.18.0 || >=16.0.0} dependencies: '@netlify/node-cookies': 0.1.0 @@ -4826,7 +4832,7 @@ packages: peerDependencies: '@opentelemetry/api': ^1.0.0 dependencies: - '@grpc/grpc-js': 1.9.12 + '@grpc/grpc-js': 1.9.13 '@opentelemetry/api': 1.4.1 '@opentelemetry/core': 1.13.0(@opentelemetry/api@1.4.1) '@opentelemetry/otlp-grpc-exporter-base': 0.39.1(@opentelemetry/api@1.4.1) @@ -4851,7 +4857,7 @@ packages: peerDependencies: '@opentelemetry/api': ^1.0.0 dependencies: - '@grpc/grpc-js': 1.9.12 + '@grpc/grpc-js': 1.9.13 '@opentelemetry/api': 1.4.1 '@opentelemetry/core': 1.13.0(@opentelemetry/api@1.4.1) '@opentelemetry/otlp-exporter-base': 0.39.1(@opentelemetry/api@1.4.1) @@ -5048,7 +5054,6 @@ packages: dependencies: is-glob: 4.0.3 micromatch: 4.0.5 - napi-wasm: 1.1.0 dev: true bundledDependencies: - napi-wasm @@ -7231,8 +7236,8 @@ packages: rollup: 4.8.0 dev: true - /@rollup/plugin-json@6.0.1(rollup@3.29.4): - resolution: {integrity: sha512-RgVfl5hWMkxN1h/uZj8FVESvPuBJ/uf6ly6GTj0GONnkfoBN5KC0MSz+PN2OLDgYXMhtG0mWpTrkiOjoxAIevw==} + /@rollup/plugin-json@6.1.0(rollup@3.29.4): + resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 @@ -7244,8 +7249,8 @@ packages: rollup: 3.29.4 dev: true - /@rollup/plugin-json@6.0.1(rollup@4.8.0): - resolution: {integrity: sha512-RgVfl5hWMkxN1h/uZj8FVESvPuBJ/uf6ly6GTj0GONnkfoBN5KC0MSz+PN2OLDgYXMhtG0mWpTrkiOjoxAIevw==} + /@rollup/plugin-json@6.1.0(rollup@4.8.0): + resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 @@ -9474,7 +9479,7 @@ packages: hasBin: true dependencies: caniuse-lite: 1.0.30001568 - electron-to-chromium: 1.4.610 + electron-to-chromium: 1.4.611 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.22.2) @@ -11187,8 +11192,8 @@ packages: /ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - /electron-to-chromium@1.4.610: - resolution: {integrity: sha512-mqi2oL1mfeHYtOdCxbPQYV/PL7YrQlxbvFEZ0Ee8GbDdShimqt2/S6z2RWqysuvlwdOrQdqvE0KZrBTipAeJzg==} + /electron-to-chromium@1.4.611: + resolution: {integrity: sha512-ZtRpDxrjHapOwxtv+nuth5ByB8clyn8crVynmRNGO3wG3LOp8RTcyZDqwaI6Ng6y8FCK2hVZmJoqwCskKbNMaw==} /elliptic@6.5.4: resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} @@ -16094,10 +16099,6 @@ packages: resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} dev: false - /napi-wasm@1.1.0: - resolution: {integrity: sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg==} - dev: true - /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -16274,11 +16275,11 @@ packages: optional: true dependencies: '@cloudflare/kv-asset-handler': 0.3.0 - '@netlify/functions': 2.4.0 + '@netlify/functions': 2.4.1 '@rollup/plugin-alias': 5.1.0(rollup@4.8.0) '@rollup/plugin-commonjs': 25.0.7(rollup@4.8.0) '@rollup/plugin-inject': 5.0.5(rollup@4.8.0) - '@rollup/plugin-json': 6.0.1(rollup@4.8.0) + '@rollup/plugin-json': 6.1.0(rollup@4.8.0) '@rollup/plugin-node-resolve': 15.2.3(rollup@4.8.0) '@rollup/plugin-replace': 5.0.5(rollup@4.8.0) '@rollup/plugin-terser': 0.4.4(rollup@4.8.0) @@ -20528,7 +20529,7 @@ packages: dependencies: '@rollup/plugin-alias': 5.1.0(rollup@3.29.4) '@rollup/plugin-commonjs': 25.0.7(rollup@3.29.4) - '@rollup/plugin-json': 6.0.1(rollup@3.29.4) + '@rollup/plugin-json': 6.1.0(rollup@3.29.4) '@rollup/plugin-node-resolve': 15.2.3(rollup@3.29.4) '@rollup/plugin-replace': 5.0.5(rollup@3.29.4) '@rollup/pluginutils': 5.1.0(rollup@3.29.4)