From a1b7c616c7439fa12493c6fb5c12e582659a4c4f Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Tue, 22 Oct 2024 14:35:44 +0000 Subject: [PATCH] fix(javascript): common package types (generated) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/algolia/api-clients-automation/pull/4015 Co-authored-by: algolia-bot Co-authored-by: Clément Vannicatte Co-authored-by: Pierre Millot --- packages/client-common/index.ts | 9 --------- packages/client-common/src/index.ts | 9 +++++++++ packages/client-common/tsconfig.json | 2 +- packages/client-common/tsup.config.ts | 8 ++++---- packages/logger-console/index.ts | 1 - packages/logger-console/tsup.config.ts | 8 ++++---- packages/requester-browser-xhr/index.ts | 1 - packages/requester-browser-xhr/src/index.ts | 1 + packages/requester-browser-xhr/tsconfig.json | 2 +- packages/requester-browser-xhr/tsup.config.ts | 4 ++-- packages/requester-fetch/index.ts | 1 - packages/requester-fetch/src/index.ts | 1 + packages/requester-fetch/tsconfig.json | 2 +- packages/requester-fetch/tsup.config.ts | 12 ++++++------ packages/requester-node-http/index.ts | 1 - packages/requester-node-http/src/index.ts | 1 + packages/requester-node-http/tsconfig.json | 2 +- packages/requester-node-http/tsup.config.ts | 8 ++++---- packages/requester-testing/index.ts | 3 --- .../requester-testing/src/browserEchoRequester.ts | 2 ++ packages/requester-testing/src/index.ts | 3 +++ packages/requester-testing/src/nodeEchoRequester.ts | 2 ++ packages/requester-testing/tsconfig.json | 2 +- 23 files changed, 44 insertions(+), 41 deletions(-) delete mode 100644 packages/client-common/index.ts create mode 100644 packages/client-common/src/index.ts delete mode 100644 packages/logger-console/index.ts delete mode 100644 packages/requester-browser-xhr/index.ts create mode 100644 packages/requester-browser-xhr/src/index.ts delete mode 100644 packages/requester-fetch/index.ts create mode 100644 packages/requester-fetch/src/index.ts delete mode 100644 packages/requester-node-http/index.ts create mode 100644 packages/requester-node-http/src/index.ts delete mode 100644 packages/requester-testing/index.ts create mode 100644 packages/requester-testing/src/index.ts diff --git a/packages/client-common/index.ts b/packages/client-common/index.ts deleted file mode 100644 index b31869ed2..000000000 --- a/packages/client-common/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from './src/cache'; -export * from './src/constants'; -export * from './src/createAlgoliaAgent'; -export * from './src/createAuth'; -export * from './src/createIterablePromise'; -export * from './src/getAlgoliaAgent'; -export * from './src/logger'; -export * from './src/transporter'; -export * from './src/types'; diff --git a/packages/client-common/src/index.ts b/packages/client-common/src/index.ts new file mode 100644 index 000000000..8e0a62b84 --- /dev/null +++ b/packages/client-common/src/index.ts @@ -0,0 +1,9 @@ +export * from './cache'; +export * from './constants'; +export * from './createAlgoliaAgent'; +export * from './createAuth'; +export * from './createIterablePromise'; +export * from './getAlgoliaAgent'; +export * from './logger'; +export * from './transporter'; +export * from './types'; diff --git a/packages/client-common/tsconfig.json b/packages/client-common/tsconfig.json index ff374efa6..969849e2c 100644 --- a/packages/client-common/tsconfig.json +++ b/packages/client-common/tsconfig.json @@ -4,6 +4,6 @@ "types": ["node", "vitest/globals"], "outDir": "dist" }, - "include": ["src", "index.ts"], + "include": ["src"], "exclude": ["dist", "node_modules", "src/__tests__"] } diff --git a/packages/client-common/tsup.config.ts b/packages/client-common/tsup.config.ts index 8692d8562..0ed79023d 100644 --- a/packages/client-common/tsup.config.ts +++ b/packages/client-common/tsup.config.ts @@ -8,13 +8,13 @@ export default defineConfig([ { ...getBaseNodeOptions(pkg, __dirname), format: 'cjs', - dts: { entry: { common: 'index.ts' } }, - entry: { common: 'index.ts' }, + dts: { entry: { common: 'src/index.ts' } }, + entry: { common: 'src/index.ts' }, }, { ...getBaseNodeOptions(pkg, __dirname), format: 'esm', - dts: { entry: { common: 'index.ts' } }, - entry: { common: 'index.ts' }, + dts: { entry: { common: 'src/index.ts' } }, + entry: { common: 'src/index.ts' }, }, ]); diff --git a/packages/logger-console/index.ts b/packages/logger-console/index.ts deleted file mode 100644 index 054acc918..000000000 --- a/packages/logger-console/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './src/logger'; diff --git a/packages/logger-console/tsup.config.ts b/packages/logger-console/tsup.config.ts index 4e8487019..046f1cb68 100644 --- a/packages/logger-console/tsup.config.ts +++ b/packages/logger-console/tsup.config.ts @@ -8,13 +8,13 @@ export default defineConfig([ { ...getBaseNodeOptions(pkg, __dirname), format: 'cjs', - dts: { entry: { logger: 'index.ts' } }, - entry: { logger: 'index.ts' }, + dts: { entry: { logger: 'src/logger.ts' } }, + entry: { logger: 'src/logger.ts' }, }, { ...getBaseNodeOptions(pkg, __dirname), format: 'esm', - dts: { entry: { logger: 'index.ts' } }, - entry: { logger: 'index.ts' }, + dts: { entry: { logger: 'src/logger.ts' } }, + entry: { logger: 'src/logger.ts' }, }, ]); diff --git a/packages/requester-browser-xhr/index.ts b/packages/requester-browser-xhr/index.ts deleted file mode 100644 index 363413c20..000000000 --- a/packages/requester-browser-xhr/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './src/createXhrRequester'; diff --git a/packages/requester-browser-xhr/src/index.ts b/packages/requester-browser-xhr/src/index.ts new file mode 100644 index 000000000..326e279e7 --- /dev/null +++ b/packages/requester-browser-xhr/src/index.ts @@ -0,0 +1 @@ +export * from './createXhrRequester'; diff --git a/packages/requester-browser-xhr/tsconfig.json b/packages/requester-browser-xhr/tsconfig.json index ff374efa6..969849e2c 100644 --- a/packages/requester-browser-xhr/tsconfig.json +++ b/packages/requester-browser-xhr/tsconfig.json @@ -4,6 +4,6 @@ "types": ["node", "vitest/globals"], "outDir": "dist" }, - "include": ["src", "index.ts"], + "include": ["src"], "exclude": ["dist", "node_modules", "src/__tests__"] } diff --git a/packages/requester-browser-xhr/tsup.config.ts b/packages/requester-browser-xhr/tsup.config.ts index 2fec90a4f..f1c04700b 100644 --- a/packages/requester-browser-xhr/tsup.config.ts +++ b/packages/requester-browser-xhr/tsup.config.ts @@ -8,6 +8,6 @@ export default defineConfig({ ...getBaseBrowserOptions(pkg, __dirname), minify: true, globalName: 'requesterxhr', - entry: { 'requester.xhr': 'index.ts' }, - dts: { entry: { 'requester.xhr': 'index.ts' } }, + entry: { 'requester.xhr': 'src/index.ts' }, + dts: { entry: { 'requester.xhr': 'src/index.ts' } }, }); diff --git a/packages/requester-fetch/index.ts b/packages/requester-fetch/index.ts deleted file mode 100644 index 716c5c8ec..000000000 --- a/packages/requester-fetch/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './src/createFetchRequester'; diff --git a/packages/requester-fetch/src/index.ts b/packages/requester-fetch/src/index.ts new file mode 100644 index 000000000..7d1445702 --- /dev/null +++ b/packages/requester-fetch/src/index.ts @@ -0,0 +1 @@ +export * from './createFetchRequester'; diff --git a/packages/requester-fetch/tsconfig.json b/packages/requester-fetch/tsconfig.json index ff374efa6..969849e2c 100644 --- a/packages/requester-fetch/tsconfig.json +++ b/packages/requester-fetch/tsconfig.json @@ -4,6 +4,6 @@ "types": ["node", "vitest/globals"], "outDir": "dist" }, - "include": ["src", "index.ts"], + "include": ["src"], "exclude": ["dist", "node_modules", "src/__tests__"] } diff --git a/packages/requester-fetch/tsup.config.ts b/packages/requester-fetch/tsup.config.ts index 8622f0e10..acd8b28b9 100644 --- a/packages/requester-fetch/tsup.config.ts +++ b/packages/requester-fetch/tsup.config.ts @@ -9,22 +9,22 @@ export default defineConfig([ ...getBaseNodeOptions(pkg, __dirname), format: 'cjs', name: 'node cjs', - entry: { 'requester.fetch.node': 'index.ts' }, - dts: { entry: { 'requester.fetch.node': 'index.ts' } }, + entry: { 'requester.fetch.node': 'src/index.ts' }, + dts: { entry: { 'requester.fetch.node': 'src/index.ts' } }, }, { ...getBaseNodeOptions(pkg, __dirname), format: 'esm', name: 'node esm', - entry: { 'requester.fetch.node': 'index.ts' }, - dts: { entry: { 'requester.fetch.node': 'index.ts' } }, + entry: { 'requester.fetch.node': 'src/index.ts' }, + dts: { entry: { 'requester.fetch.node': 'src/index.ts' } }, }, { ...getBaseBrowserOptions(pkg, __dirname), minify: true, name: 'browser esm', - entry: { 'requester.fetch.browser': 'index.ts' }, - dts: { entry: { 'requester.fetch.browser': 'index.ts' } }, + entry: { 'requester.fetch.browser': 'src/index.ts' }, + dts: { entry: { 'requester.fetch.browser': 'src/index.ts' } }, globalName: 'requesterfetch', }, ]); diff --git a/packages/requester-node-http/index.ts b/packages/requester-node-http/index.ts deleted file mode 100644 index a8a754dfa..000000000 --- a/packages/requester-node-http/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './src/createHttpRequester'; diff --git a/packages/requester-node-http/src/index.ts b/packages/requester-node-http/src/index.ts new file mode 100644 index 000000000..4c4838f49 --- /dev/null +++ b/packages/requester-node-http/src/index.ts @@ -0,0 +1 @@ +export * from './createHttpRequester'; diff --git a/packages/requester-node-http/tsconfig.json b/packages/requester-node-http/tsconfig.json index ff374efa6..969849e2c 100644 --- a/packages/requester-node-http/tsconfig.json +++ b/packages/requester-node-http/tsconfig.json @@ -4,6 +4,6 @@ "types": ["node", "vitest/globals"], "outDir": "dist" }, - "include": ["src", "index.ts"], + "include": ["src"], "exclude": ["dist", "node_modules", "src/__tests__"] } diff --git a/packages/requester-node-http/tsup.config.ts b/packages/requester-node-http/tsup.config.ts index 3cc2759f2..c4e79c904 100644 --- a/packages/requester-node-http/tsup.config.ts +++ b/packages/requester-node-http/tsup.config.ts @@ -8,13 +8,13 @@ export default defineConfig([ { ...getBaseNodeOptions(pkg, __dirname), format: 'cjs', - entry: { 'requester.http': 'index.ts' }, - dts: { entry: { 'requester.http': 'index.ts' } }, + entry: { 'requester.http': 'src/index.ts' }, + dts: { entry: { 'requester.http': 'src/index.ts' } }, }, { ...getBaseNodeOptions(pkg, __dirname), format: 'esm', - entry: { 'requester.http': 'index.ts' }, - dts: { entry: { 'requester.http': 'index.ts' } }, + entry: { 'requester.http': 'src/index.ts' }, + dts: { entry: { 'requester.http': 'src/index.ts' } }, }, ]); diff --git a/packages/requester-testing/index.ts b/packages/requester-testing/index.ts deleted file mode 100644 index f691966c5..000000000 --- a/packages/requester-testing/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './src/browserEchoRequester'; -export * from './src/createEchoRequester'; -export * from './src/nodeEchoRequester'; diff --git a/packages/requester-testing/src/browserEchoRequester.ts b/packages/requester-testing/src/browserEchoRequester.ts index 4aa74f84f..fb03c8bce 100644 --- a/packages/requester-testing/src/browserEchoRequester.ts +++ b/packages/requester-testing/src/browserEchoRequester.ts @@ -5,3 +5,5 @@ import { createEchoRequester } from './createEchoRequester'; export function browserEchoRequester(status: number = 200): Requester { return createEchoRequester({ getURL: (url: string) => new URL(url), status }); } + +export type { EchoResponse } from './createEchoRequester.ts'; diff --git a/packages/requester-testing/src/index.ts b/packages/requester-testing/src/index.ts new file mode 100644 index 000000000..d64be8e34 --- /dev/null +++ b/packages/requester-testing/src/index.ts @@ -0,0 +1,3 @@ +export * from './browserEchoRequester'; +export * from './createEchoRequester'; +export * from './nodeEchoRequester'; diff --git a/packages/requester-testing/src/nodeEchoRequester.ts b/packages/requester-testing/src/nodeEchoRequester.ts index e0a0507d3..e434bdd80 100644 --- a/packages/requester-testing/src/nodeEchoRequester.ts +++ b/packages/requester-testing/src/nodeEchoRequester.ts @@ -7,3 +7,5 @@ import { createEchoRequester } from './createEchoRequester'; export function nodeEchoRequester(status: number = 200): Requester { return createEchoRequester({ getURL: (url: string) => new URL(url), status }); } + +export type { EchoResponse } from './createEchoRequester.ts'; diff --git a/packages/requester-testing/tsconfig.json b/packages/requester-testing/tsconfig.json index 1f0d01e28..50a5d1d9f 100644 --- a/packages/requester-testing/tsconfig.json +++ b/packages/requester-testing/tsconfig.json @@ -4,6 +4,6 @@ "types": ["node"], "outDir": "dist" }, - "include": ["src", "index.ts"], + "include": ["src"], "exclude": ["dist", "node_modules"] }