diff --git a/auth-webhook.tsx b/auth-webhook.tsx index f9eb441..37636d0 100644 --- a/auth-webhook.tsx +++ b/auth-webhook.tsx @@ -1,5 +1,5 @@ import Cors from 'cors'; -import { corsMiddleware } from './cors-middleware.js'; +import { corsMiddleware } from './cors-middleware'; export interface AuthWebhookOptions { findUserByToken: (token: string) => Promise<{ diff --git a/client.tsx b/client.tsx index 9b59aa9..58ab91e 100644 --- a/client.tsx +++ b/client.tsx @@ -1,10 +1,10 @@ import { HttpLink, InMemoryCache, ApolloClient } from '@apollo/client'; -import { getMainDefinition } from '@apollo/client/utilities/index.js'; +import { getMainDefinition } from '@apollo/client/utilities'; import { ApolloLink, concat, split } from 'apollo-link'; import { WebSocketLink } from 'apollo-link-ws'; import fetch from 'node-fetch'; import path from 'path'; -import { debug } from './debug.js'; +import { debug } from './debug'; const moduleLog = debug.extend('client') diff --git a/package-lock.json b/package-lock.json index a8a749d..0a1600f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "@deep-foundation/hasura", - "version": "0.0.59", + "version": "0.0.53", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@deep-foundation/hasura", - "version": "0.0.59", + "version": "0.0.53", "license": "Unlicense", "dependencies": { "@types/node": "^14.17.14", "@types/react": "^18.2.15", - "axios": "^1.5.1", + "axios": "^0.21.1", "babel-register": "^6.26.0", "cors": "^2.8.5", "debug": "^4.3.1", @@ -31,7 +31,7 @@ "typescript": "5.0.4" }, "peerDependencies": { - "@apollo/client": "^3.8.5", + "@apollo/client": "^3.7.14", "@apollo/react-hooks": "^4.0.0", "apollo-boost": "^0.4.9", "apollo-link": "^1.2.14", @@ -42,18 +42,18 @@ } }, "node_modules/@apollo/client": { - "version": "3.8.5", - "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.8.5.tgz", - "integrity": "sha512-/ueWC3f1pFeH+tWbM1phz6pzUGGijyml6oQ+LKUcQzpXF6tVFPrb6oUIUQCbZpr6Xmv/dtNiFDohc39ra7Solg==", + "version": "3.7.14", + "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.7.14.tgz", + "integrity": "sha512-BRvdkwq5PAXBkjXjboO12uksDm3nrZEqDi4xF97Fk3Mnaa0zDOEfJa7hoKTY9b9KA1EkeWv9BL3i7hSd4SfGBg==", "peer": true, "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", - "@wry/context": "^0.7.3", - "@wry/equality": "^0.5.6", - "@wry/trie": "^0.4.3", + "@wry/context": "^0.7.0", + "@wry/equality": "^0.5.0", + "@wry/trie": "^0.3.0", "graphql-tag": "^2.12.6", "hoist-non-react-statics": "^3.3.2", - "optimism": "^0.17.5", + "optimism": "^0.16.2", "prop-types": "^15.7.2", "response-iterator": "^0.2.6", "symbol-observable": "^4.0.0", @@ -545,9 +545,9 @@ } }, "node_modules/@wry/trie": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@wry/trie/-/trie-0.4.3.tgz", - "integrity": "sha512-I6bHwH0fSf6RqQcnnXLJKhkSXG45MFral3GxPaY4uAl0LYDZM+YDVDAiU9bYwjTuysy1S0IeecWtmq1SZA3M1w==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@wry/trie/-/trie-0.3.2.tgz", + "integrity": "sha512-yRTyhWSls2OY/pYLfwff867r8ekooZ4UI+/gxot5Wj8EFwSf2rG+n+Mo/6LoLQm1TKA4GRj2+LCpbfS937dClQ==", "peer": true, "dependencies": { "tslib": "^2.3.0" @@ -1179,11 +1179,6 @@ "retry": "0.13.1" } }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, "node_modules/available-typed-arrays": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", @@ -1197,13 +1192,11 @@ } }, "node_modules/axios": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", - "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "dependencies": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" + "follow-redirects": "^1.14.0" } }, "node_modules/babel-code-frame": { @@ -1517,17 +1510,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -1714,14 +1696,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -2050,19 +2024,6 @@ "is-callable": "^1.1.3" } }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -3178,14 +3139,13 @@ } }, "node_modules/optimism": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.17.5.tgz", - "integrity": "sha512-TEcp8ZwK1RczmvMnvktxHSF2tKgMWjJ71xEFGX5ApLh67VsMSTy1ZUlipJw8W+KaqgOmQ+4pqwkeivY89j+4Vw==", + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.16.2.tgz", + "integrity": "sha512-zWNbgWj+3vLEjZNIh/okkY2EUfX+vB9TJopzIZwT1xxaMqC5hRLLraePod4c5n4He08xuXNH+zhKFFCu390wiQ==", "peer": true, "dependencies": { "@wry/context": "^0.7.0", - "@wry/trie": "^0.4.3", - "tslib": "^2.3.0" + "@wry/trie": "^0.3.0" } }, "node_modules/os-homedir": { @@ -3369,11 +3329,6 @@ "node": ">= 0.10" } }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, "node_modules/pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", diff --git a/package.json b/package.json index e7d4c5c..ebf0cc2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@deep-foundation/hasura", - "version": "0.0.59", + "version": "0.0.53", "license": "Unlicense", "author": "Ivan S Glazunov ", "homepage": "https://github.com/deep-foundation/hasura", @@ -8,12 +8,11 @@ "type": "git", "url": "ssh://git@github.com/deep-foundation/hasura.git" }, - "type": "module", "description": "", "dependencies": { "@types/node": "^14.17.14", "@types/react": "^18.2.15", - "axios": "^1.5.1", + "axios": "^0.21.1", "babel-register": "^6.26.0", "cors": "^2.8.5", "debug": "^4.3.1", @@ -40,7 +39,7 @@ "typescript": "5.0.4" }, "peerDependencies": { - "@apollo/client": "^3.8.5", + "@apollo/client": "^3.7.14", "@apollo/react-hooks": "^4.0.0", "apollo-boost": "^0.4.9", "apollo-link": "^1.2.14", diff --git a/remote-schema.tsx b/remote-schema.tsx index 87bd365..62516a8 100644 --- a/remote-schema.tsx +++ b/remote-schema.tsx @@ -1,6 +1,6 @@ import { ApolloServer, Config } from 'apollo-server-micro'; import Cors from 'cors'; -import { corsMiddleware } from './cors-middleware.js'; +import { corsMiddleware } from './cors-middleware'; export interface RemoteSchemaOptions extends Config { path: string; diff --git a/tsconfig.json b/tsconfig.json index 9f5aa6c..a5fab18 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,17 +1,26 @@ { "compilerOptions": { - "target": "ES2022", - "jsx": "react-jsx", - "module": "Node16", + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "sourceMap": true, + "noImplicitAny": false, + "removeComments": true, + "jsx": "react", + "module": "commonjs", + "moduleResolution": "node", + "target": "es2015", + "skipLibCheck": true, + "lib": [ + "dom", + "es6", + "es7" + ], "resolveJsonModule": true, - "declaration": true, "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node16", - "skipLibCheck": true, - // Only for hasura, react-hasura, materialized-path, deeplinks because they are bad typed - "strictNullChecks": false, - "strict": false, - - }, + "isolatedModules": true, + "declaration": true, + "typeRoots": [ + "./node_modules/@types" + ] + } } \ No newline at end of file