From b8fddff58bd97ac45b830963e9014763021ce897 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Thu, 18 Jan 2024 17:37:16 +0100 Subject: [PATCH] Create index.js & index.d.ts --- file.patch | 47 ++++++++++++++++++++++++++++++++++++++++++ package.json | 3 ++- src/index.ts | 15 ++++++++++++++ src/types/globals.d.ts | 2 +- tsconfig.json | 3 ++- 5 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 file.patch create mode 100644 src/index.ts diff --git a/file.patch b/file.patch new file mode 100644 index 00000000..637fa41c --- /dev/null +++ b/file.patch @@ -0,0 +1,47 @@ +diff --git a/package.json b/package.json +index d94b439..39caa6a 100644 +--- a/package.json ++++ b/package.json +@@ -2,7 +2,8 @@ + "name": "@prestashop-core/ui-testing", + "version": "0.0.2", + "description": "", +- "files": ["/dist"], ++ "main": "dist/index.js", ++ "types": "dist/index.d.ts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "// ESLint": "To run ESLint commands", +diff --git a/src/types/globals.d.ts b/src/types/globals.d.ts +index 1213872..6fe60c5 100644 +--- a/src/types/globals.d.ts ++++ b/src/types/globals.d.ts +@@ -1,6 +1,6 @@ + /* eslint-disable vars-on-top, no-var */ + +-type GlobalInstall = { ++ type GlobalInstall = { + URL: string + ENABLE_SSL: boolean + LANGUAGE: string +diff --git a/tsconfig.json b/tsconfig.json +index f4e7215..bc48ef9 100644 +--- a/tsconfig.json ++++ b/tsconfig.json +@@ -20,6 +20,7 @@ + "esnext" + ], + "baseUrl": "./", ++ "rootDir": "src", + "outDir": "./dist", + "paths": { + "@interfaces/*": [ +@@ -47,7 +48,7 @@ + ], + }, + "include": [ +- "src/**/*" ++ "src/index.ts" + ], + "exclude": [ + "node_modules" diff --git a/package.json b/package.json index d94b439a..39caa6a7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,8 @@ "name": "@prestashop-core/ui-testing", "version": "0.0.2", "description": "", - "files": ["/dist"], + "main": "dist/index.js", + "types": "dist/index.d.ts", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "// ESLint": "To run ESLint commands", diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 00000000..91c171d8 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,15 @@ +// Export data +export type {PageWaitForSelectorOptionsState, WaitForNavigationWaitUntil} from '@data/types/playwright'; + +// Export interfaces +export type {DashboardPageInterface} from '@interfaces/BO/dashboard'; +export type {LoginPageInterface} from '@interfaces/BO/login'; + +// Export Pages +export * as CommonPage from '@pages/commonPage'; +export * as BOBasePage from '@pages/BO/BOBasePage'; +export * as loginPage from '@pages/BO/login'; +export * as dashboardPage from '@pages/BO/dashboard'; + +// Export utils +export * as testContext from '@utils/testContext'; \ No newline at end of file diff --git a/src/types/globals.d.ts b/src/types/globals.d.ts index 1213872b..6fe60c55 100644 --- a/src/types/globals.d.ts +++ b/src/types/globals.d.ts @@ -1,6 +1,6 @@ /* eslint-disable vars-on-top, no-var */ -type GlobalInstall = { + type GlobalInstall = { URL: string ENABLE_SSL: boolean LANGUAGE: string diff --git a/tsconfig.json b/tsconfig.json index f4e72156..bc48ef99 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,6 +20,7 @@ "esnext" ], "baseUrl": "./", + "rootDir": "src", "outDir": "./dist", "paths": { "@interfaces/*": [ @@ -47,7 +48,7 @@ ], }, "include": [ - "src/**/*" + "src/index.ts" ], "exclude": [ "node_modules"