From b35030a3c624495a2e053082e2dd1dd702aaf05b Mon Sep 17 00:00:00 2001 From: Naoufal Lamarti Date: Fri, 19 Jul 2024 16:12:17 +0200 Subject: [PATCH] fi(easy-service): import from easy src --- .github/workflows/main.yml | 2 +- packages/easy-service/src/health/HealthResource.ts | 5 +++-- packages/easy-service/src/health/index.ts | 2 -- packages/easy-service/src/http/index.ts | 2 -- packages/easy-service/src/index.ts | 14 ++++++++++---- packages/easy-service/src/resources/Route.ts | 3 +-- packages/easy-service/src/resources/index.ts | 5 ----- packages/easy-service/src/security/index.ts | 1 - .../easy-service/test/http/OriginatedError.test.ts | 2 +- 9 files changed, 16 insertions(+), 20 deletions(-) delete mode 100644 packages/easy-service/src/health/index.ts delete mode 100644 packages/easy-service/src/http/index.ts delete mode 100644 packages/easy-service/src/resources/index.ts delete mode 100644 packages/easy-service/src/security/index.ts diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 40fb4eae6..1c76f5ba9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,7 @@ jobs: strategy: fail-fast: false matrix: - package: [easy, easy-domain, easy-express, easy-mssql, easy-mongo, easy-react, easy-test, easy-test-react, easy-test-web, easy-puppeteer, easy-playwright] + package: [easy, easy-domain, easy-service, easy-express, easy-mssql, easy-mongo, easy-react, easy-test, easy-test-react, easy-test-web, easy-puppeteer, easy-playwright] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/packages/easy-service/src/health/HealthResource.ts b/packages/easy-service/src/health/HealthResource.ts index b02bbeceb..01b187fa1 100644 --- a/packages/easy-service/src/health/HealthResource.ts +++ b/packages/easy-service/src/health/HealthResource.ts @@ -1,7 +1,8 @@ import { resolve, Json } from '@thisisagile/easy'; import { HealthUri } from './HealthUri'; -import { Resource, route } from '../resources'; -import { get } from '../http'; +import { Resource } from '../resources/Resource'; +import { route } from '../resources/Route'; +import { get } from '../http/Verb'; @route(HealthUri.Health) export class HealthResource implements Resource { diff --git a/packages/easy-service/src/health/index.ts b/packages/easy-service/src/health/index.ts deleted file mode 100644 index 9f0639d4f..000000000 --- a/packages/easy-service/src/health/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './HealthResource'; -export * from './HealthUri'; diff --git a/packages/easy-service/src/http/index.ts b/packages/easy-service/src/http/index.ts deleted file mode 100644 index 067cf74d5..000000000 --- a/packages/easy-service/src/http/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './OriginatedError'; -export * from './Verb'; diff --git a/packages/easy-service/src/index.ts b/packages/easy-service/src/index.ts index b9d498400..392a0d5eb 100644 --- a/packages/easy-service/src/index.ts +++ b/packages/easy-service/src/index.ts @@ -1,4 +1,10 @@ -export * from './health'; -export * from './http'; -export * from './resources'; -export * from './security'; +export * from './health/HealthResource'; +export * from './health/HealthUri'; +export * from './http/OriginatedError'; +export * from './http/Verb'; +export * from './resources/AppProvider'; +export * from './resources/Requires'; +export * from './resources/Resource'; +export * from './resources/Route'; +export * from './resources/Service'; +export * from './security/Jwt'; diff --git a/packages/easy-service/src/resources/Route.ts b/packages/easy-service/src/resources/Route.ts index 6bbe83a0e..3667090c3 100644 --- a/packages/easy-service/src/resources/Route.ts +++ b/packages/easy-service/src/resources/Route.ts @@ -1,5 +1,4 @@ -import { List, meta, Optional, tryTo, Uri, Scope, UseCase } from '@thisisagile/easy'; -import { Req } from '../../../easy/src/resources/Req'; +import { List, meta, Optional, tryTo, Uri, Scope, UseCase, Req } from '@thisisagile/easy'; import { Resource } from './Resource'; import { RequestHandler } from 'express'; import { Verb } from '../http/Verb'; diff --git a/packages/easy-service/src/resources/index.ts b/packages/easy-service/src/resources/index.ts deleted file mode 100644 index 9173323bd..000000000 --- a/packages/easy-service/src/resources/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './AppProvider'; -export * from './Requires'; -export * from './Resource'; -export * from './Route'; -export * from './Service'; diff --git a/packages/easy-service/src/security/index.ts b/packages/easy-service/src/security/index.ts deleted file mode 100644 index 40e31fa0b..000000000 --- a/packages/easy-service/src/security/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './Jwt'; diff --git a/packages/easy-service/test/http/OriginatedError.test.ts b/packages/easy-service/test/http/OriginatedError.test.ts index 92617a548..c9bea7f58 100644 --- a/packages/easy-service/test/http/OriginatedError.test.ts +++ b/packages/easy-service/test/http/OriginatedError.test.ts @@ -1,6 +1,6 @@ import { ContentType, toResults } from '@thisisagile/easy'; import { Dev } from '@thisisagile/easy/test/ref'; -import { isOriginatedError, OriginatedError, toOriginatedError } from '../../src/http'; +import { isOriginatedError, OriginatedError, toOriginatedError } from '../../src'; describe('OriginatedError', () => { test('origin', () => {