From 5923c069ef84250eced4b6cdf1833a9751ff4d74 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Sun, 31 May 2020 21:51:08 -0700 Subject: [PATCH] chore: use `@loopback/core` for packages consistently --- benchmark/package.json | 2 +- benchmark/src/context-binding/context-binding.ts | 2 +- benchmark/tsconfig.json | 2 +- examples/access-control-migration/package.json | 1 - .../jwt-authentication/services/jwt.auth.strategy.ts | 2 +- .../jwt-authentication/services/jwt.service.ts | 2 +- .../src/controllers/user.controller.ts | 2 +- examples/access-control-migration/src/keys.ts | 2 +- examples/access-control-migration/src/sequence.ts | 2 +- examples/access-control-migration/tsconfig.json | 3 --- examples/express-composition/package.json | 1 - .../src/controllers/ping.controller.ts | 2 +- examples/express-composition/src/sequence.ts | 2 +- examples/express-composition/tsconfig.json | 3 --- examples/file-transfer/package.json | 1 - .../src/controllers/file-download.controller.ts | 2 +- .../src/controllers/file-upload.controller.ts | 2 +- examples/file-transfer/src/sequence.ts | 2 +- .../src/services/file-upload.service.ts | 2 +- examples/file-transfer/tsconfig.json | 3 --- examples/greeter-extension/package.json | 1 - examples/greeter-extension/src/component.ts | 3 +-- .../greeter-extension/src/greeters/greeter-cn.ts | 2 +- .../greeter-extension/src/greeters/greeter-en.ts | 2 +- examples/greeter-extension/src/greeting-service.ts | 3 +-- examples/greeter-extension/src/keys.ts | 2 +- examples/greeter-extension/src/types.ts | 3 +-- examples/greeter-extension/tsconfig.json | 3 --- examples/greeting-app/package.json | 1 - .../src/controllers/greeting.controller.ts | 2 +- .../src/interceptors/caching.interceptor.ts | 2 +- examples/greeting-app/src/keys.ts | 2 +- .../greeting-app/src/observers/cache.observer.ts | 3 +-- examples/greeting-app/tsconfig.json | 3 --- examples/lb3-application/package.json | 1 - examples/lb3-application/src/sequence.ts | 2 +- examples/lb3-application/tsconfig.json | 3 --- examples/log-extension/package.json | 1 - .../__tests__/acceptance/log.extension.acceptance.ts | 2 +- .../log-extension/src/decorators/log.decorator.ts | 2 +- examples/log-extension/src/keys.ts | 2 +- .../src/providers/log-action.provider.ts | 9 +++++++-- .../log-extension/src/providers/timer.provider.ts | 2 +- examples/log-extension/tsconfig.json | 3 --- examples/multi-tenancy/package.json | 1 - .../multi-tenancy/src/controllers/ping.controller.ts | 2 +- .../actions/multi-tenancy-action.provider.ts | 10 ++++++++-- examples/multi-tenancy/src/sequence.ts | 2 +- examples/multi-tenancy/tsconfig.json | 3 --- examples/passport-login/package.json | 1 - .../src/authentication-strategies/basic.ts | 2 +- .../src/authentication-strategies/facebook.ts | 3 +-- .../src/authentication-strategies/google.ts | 3 +-- .../src/authentication-strategies/local.ts | 2 +- .../src/authentication-strategies/session.ts | 2 +- .../src/controllers/ping.controller.ts | 2 +- .../src/controllers/user.controller.ts | 2 +- examples/passport-login/src/sequence.ts | 2 +- examples/passport-login/tsconfig.json | 3 --- examples/rest-crud/package.json | 1 - examples/rest-crud/src/sequence.ts | 2 +- examples/rest-crud/tsconfig.json | 3 --- examples/rpc-server/package.json | 1 - examples/rpc-server/src/rpc.server.ts | 9 +++++++-- examples/rpc-server/tsconfig.json | 3 --- examples/soap-calculator/package.json | 1 - examples/soap-calculator/src/sequence.ts | 2 +- examples/soap-calculator/tsconfig.json | 3 --- examples/todo-jwt/package.json | 1 - examples/todo-jwt/src/sequence.ts | 2 +- examples/todo-jwt/tsconfig.json | 3 --- examples/todo-list/package.json | 1 - examples/todo-list/src/sequence.ts | 2 +- examples/todo-list/tsconfig.json | 3 --- examples/todo/package.json | 1 - examples/todo/src/sequence.ts | 2 +- examples/todo/tsconfig.json | 3 --- examples/validation-app/package.json | 1 - .../interceptors/validate-phone-num.interceptor.ts | 2 +- examples/validation-app/src/sequence.ts | 2 +- examples/validation-app/tsconfig.json | 3 --- extensions/apiconnect/package.json | 1 - extensions/apiconnect/tsconfig.json | 3 --- extensions/authentication-passport/package.json | 1 - ...tion-with-passport-strategy-adapter.acceptance.ts | 3 +-- .../__tests__/acceptance/fixtures/simple-rest-app.ts | 2 +- extensions/authentication-passport/tsconfig.json | 3 --- extensions/context-explorer/package.json | 1 - .../integration/context-graph.integration.ts | 2 +- .../__tests__/integration/visualizer.integration.ts | 2 +- .../src/context-explorer.component.ts | 12 +++++++++--- .../src/context-explorer.controller.ts | 8 +------- extensions/context-explorer/src/context-graph.ts | 7 +------ extensions/context-explorer/src/keys.ts | 2 +- extensions/context-explorer/tsconfig.json | 3 --- extensions/logging/package.json | 1 - .../src/__tests__/acceptance/winston.acceptance.ts | 3 +-- .../logging/src/decorators/logging.decorator.ts | 2 +- .../logging/src/interceptors/logging.interceptor.ts | 2 +- extensions/logging/tsconfig.json | 3 --- extensions/metrics/package.json | 1 - .../metrics/src/interceptors/metrics.interceptor.ts | 2 +- extensions/metrics/src/keys.ts | 3 +-- extensions/metrics/src/metrics.component.ts | 6 ++++-- extensions/metrics/tsconfig.json | 3 --- packages/authentication/package.json | 1 - .../acceptance/basic-auth-extension.acceptance.ts | 3 +-- .../acceptance/jwt-auth-extension.acceptance.ts | 3 +-- .../authentication/src/__tests__/fixtures/keys.ts | 2 +- .../fixtures/sequences/authentication.sequence.ts | 2 +- .../fixtures/services/basic-auth-user-service.ts | 2 +- .../src/__tests__/fixtures/services/jwt-service.ts | 2 +- .../__tests__/fixtures/strategies/basic-strategy.ts | 2 +- .../__tests__/fixtures/strategies/jwt-strategy.ts | 2 +- .../unit/providers/auth-metadata.provider.unit.ts | 3 +-- .../unit/providers/authentication.provider.unit.ts | 2 +- .../types/register-authentication-strategy.unit.ts | 2 +- .../src/decorators/authenticate.decorator.ts | 2 +- packages/authentication/src/keys.ts | 3 +-- .../src/providers/auth-action.provider.ts | 2 +- .../src/providers/auth-metadata.provider.ts | 9 +++++++-- .../src/providers/auth-strategy.provider.ts | 10 ++++++++-- packages/authentication/tsconfig.json | 3 --- packages/authorization/package.json | 1 - .../acceptance/authorization-casbin.acceptance.ts | 9 +++++++-- .../__tests__/acceptance/authorization.acceptance.ts | 3 +-- .../acceptance/authorization.options.acceptance.ts | 3 +-- packages/authorization/src/authorize-interceptor.ts | 2 +- packages/authorization/src/decorators/authorize.ts | 2 +- packages/authorization/src/types.ts | 2 +- packages/authorization/tsconfig.json | 3 --- packages/boot/package.json | 1 - .../src/__tests__/fixtures/interceptor.artifact.ts | 2 +- .../fixtures/non-global-interceptor.artifact.ts | 2 +- packages/boot/src/boot.component.ts | 9 +++++++-- .../boot/src/booters/application-metadata.booter.ts | 3 +-- packages/boot/src/booters/base-artifact.booter.ts | 2 +- packages/boot/src/booters/booter-utils.ts | 2 +- packages/boot/src/booters/controller.booter.ts | 3 +-- packages/boot/src/booters/datasource.booter.ts | 3 +-- packages/boot/src/booters/interceptor.booter.ts | 5 +++-- .../boot/src/booters/lifecyle-observer.booter.ts | 2 +- packages/boot/src/booters/model.booter.ts | 3 +-- packages/boot/src/booters/repository.booter.ts | 3 +-- packages/boot/src/booters/service.booter.ts | 4 ++-- packages/boot/src/bootstrapper.ts | 9 +++++++-- packages/boot/src/keys.ts | 2 +- packages/boot/src/mixins/boot.mixin.ts | 4 ++-- packages/boot/src/types.ts | 2 +- packages/boot/tsconfig.json | 3 --- .../templates/src/controllers/ping.controller.ts.ejs | 2 +- .../cli/generators/app/templates/src/sequence.ts.ejs | 2 +- .../src/controllers/controller-template.ts.ejs | 2 +- .../templates/interceptor-template.ts.ejs | 2 +- .../generators/project/templates/package.json.ejs | 5 +---- .../project/templates/package.plain.json.ejs | 5 +---- .../generators/app.integration.snapshots.js | 2 +- .../generators/controller.integration.snapshots.js | 4 ++-- .../generators/interceptor.integration.snapshots.js | 10 +++++----- .../cli/test/integration/lib/project-generator.js | 12 ------------ packages/express/package.json | 1 - .../acceptance/middleware-interceptor.acceptance.ts | 4 ++-- .../express/src/__tests__/acceptance/test-helpers.ts | 2 +- packages/express/src/keys.ts | 2 +- packages/express/src/middleware-registry.ts | 2 +- packages/express/src/middleware.ts | 5 +++-- packages/express/src/mixins/middleware.mixin.ts | 2 +- packages/express/tsconfig.json | 3 --- packages/repository-json-schema/package.json | 3 +-- .../integration/build-schema.integration.ts | 2 +- packages/repository-json-schema/src/build-schema.ts | 2 +- packages/repository-json-schema/src/keys.ts | 2 +- packages/repository-json-schema/tsconfig.json | 5 +---- packages/repository-tests/package.json | 2 +- .../fixtures/repositories/address.repository.ts | 2 +- .../fixtures/repositories/customer.repository.ts | 2 +- .../fixtures/repositories/order.repository.ts | 2 +- .../fixtures/repositories/shipment.repository.ts | 2 +- packages/repository-tests/tsconfig.json | 2 +- .../examples/juggler-bridge/note-with-repo-class.ts | 2 +- .../juggler-bridge/note-with-repo-instance.ts | 2 +- packages/repository/package.json | 1 - .../src/__tests__/unit/decorator/metadata.unit.ts | 2 +- .../decorator/model-and-relation.decorator.unit.ts | 2 +- .../unit/decorator/relation.decorator.unit.ts | 2 +- .../decorator/repository-with-di.decorator.unit.ts | 2 +- .../repository-with-value-provider.decorator.unit.ts | 2 +- .../unit/decorator/repository.decorator.unit.ts | 2 +- .../src/__tests__/unit/mixins/model.mixin.unit.ts | 2 +- .../repositories/has-many-repository-factory.unit.ts | 2 +- .../repositories/has-one-repository-factory.unit.ts | 2 +- .../unit/repositories/relation.repository.unit.ts | 2 +- packages/repository/src/decorators/metadata.ts | 2 +- .../repository/src/decorators/model.decorator.ts | 2 +- .../src/decorators/repository.decorator.ts | 2 +- packages/repository/src/mixins/repository.mixin.ts | 4 ++-- .../src/relations/belongs-to/belongs-to.decorator.ts | 2 +- .../relations/belongs-to/belongs-to.repository.ts | 2 +- .../src/relations/has-many/has-many.repository.ts | 2 +- .../src/relations/has-one/has-one.repository.ts | 2 +- .../repository/src/relations/relation.decorator.ts | 2 +- packages/repository/src/relations/relation.types.ts | 2 +- .../src/repositories/legacy-juggler-bridge.ts | 2 +- packages/repository/tsconfig.json | 3 --- packages/rest-explorer/package.json | 1 - .../rest-explorer/src/rest-explorer.component.ts | 12 +++++++++--- .../rest-explorer/src/rest-explorer.controller.ts | 2 +- packages/rest-explorer/src/rest-explorer.keys.ts | 2 +- packages/rest-explorer/tsconfig.json | 3 --- packages/rest/package.json | 1 - .../caching-interceptor.acceptance.ts | 2 +- .../caching-interceptor/caching-interceptor.ts | 2 +- .../global-caching-interceptor.acceptance.ts | 2 +- .../acceptance/file-upload/file-upload.acceptance.ts | 2 +- .../__tests__/acceptance/middleware/test-helpers.ts | 2 +- .../acceptance/routing/routing.acceptance.ts | 10 ++++++++-- .../acceptance/sequence/sequence.acceptance.ts | 3 +-- .../integration/http-handler.integration.ts | 2 +- .../rest/src/__tests__/unit/rest.component.unit.ts | 2 +- .../__tests__/unit/rest.server/rest.server.unit.ts | 3 +-- packages/rest/src/body-parsers/body-parser.json.ts | 2 +- packages/rest/src/body-parsers/body-parser.raw.ts | 2 +- packages/rest/src/body-parsers/body-parser.text.ts | 2 +- packages/rest/src/body-parsers/body-parser.ts | 2 +- .../rest/src/body-parsers/body-parser.urlencoded.ts | 2 +- packages/rest/src/http-handler.ts | 2 +- packages/rest/src/keys.ts | 3 +-- packages/rest/src/providers/find-route.provider.ts | 2 +- .../rest/src/providers/invoke-method.provider.ts | 2 +- packages/rest/src/providers/log-error.provider.ts | 2 +- packages/rest/src/providers/parse-params.provider.ts | 2 +- packages/rest/src/providers/reject.provider.ts | 2 +- packages/rest/src/providers/send.provider.ts | 2 +- packages/rest/src/request-context.ts | 2 +- packages/rest/src/rest.application.ts | 6 ++++-- packages/rest/src/rest.component.ts | 2 +- packages/rest/src/rest.server.ts | 6 ++++-- packages/rest/src/router/base-route.ts | 2 +- packages/rest/src/router/controller-route.ts | 4 ++-- packages/rest/src/router/external-express-routes.ts | 2 +- packages/rest/src/router/handler-route.ts | 2 +- packages/rest/src/router/regexp-router.ts | 2 +- packages/rest/src/router/route-entry.ts | 2 +- packages/rest/src/router/trie-router.ts | 2 +- packages/rest/src/sequence.ts | 2 +- .../rest/src/spec-enhancers/info.spec-enhancer.ts | 5 +++-- packages/rest/tsconfig.json | 3 --- packages/security/package.json | 1 - packages/security/src/keys.ts | 2 +- packages/security/tsconfig.json | 3 --- packages/service-proxy/package.json | 1 - .../unit/decorators/service-proxy.decorator.unit.ts | 2 +- .../src/decorators/service.decorator.ts | 2 +- packages/service-proxy/src/mixins/service.mixin.ts | 4 ++-- packages/service-proxy/tsconfig.json | 3 --- 255 files changed, 293 insertions(+), 400 deletions(-) diff --git a/benchmark/package.json b/benchmark/package.json index 591f8b105d8a..1ae0629ccc79 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -33,7 +33,7 @@ "!*/__tests__" ], "dependencies": { - "@loopback/context": "^3.8.2", + "@loopback/core": "^2.7.1", "@loopback/example-todo": "^3.5.0", "@loopback/openapi-spec-builder": "^2.1.6", "@loopback/rest": "^5.1.0", diff --git a/benchmark/src/context-binding/context-binding.ts b/benchmark/src/context-binding/context-binding.ts index b3d178a8bf96..949d4f56760c 100644 --- a/benchmark/src/context-binding/context-binding.ts +++ b/benchmark/src/context-binding/context-binding.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, inject, Provider, ValueFactory} from '@loopback/context'; +import {Context, inject, Provider, ValueFactory} from '@loopback/core'; import Benchmark from 'benchmark'; /** diff --git a/benchmark/tsconfig.json b/benchmark/tsconfig.json index f65422c27403..127a39ed1f76 100644 --- a/benchmark/tsconfig.json +++ b/benchmark/tsconfig.json @@ -14,7 +14,7 @@ "path": "../examples/todo/tsconfig.json" }, { - "path": "../packages/context/tsconfig.json" + "path": "../packages/core/tsconfig.json" }, { "path": "../packages/openapi-spec-builder/tsconfig.json" diff --git a/examples/access-control-migration/package.json b/examples/access-control-migration/package.json index 5ac488287763..998a8c22b10a 100644 --- a/examples/access-control-migration/package.json +++ b/examples/access-control-migration/package.json @@ -42,7 +42,6 @@ "@loopback/authentication": "^4.2.6", "@loopback/authorization": "^0.5.11", "@loopback/boot": "^2.3.2", - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/openapi-v3": "^3.4.2", "@loopback/repository": "^2.6.0", diff --git a/examples/access-control-migration/src/components/jwt-authentication/services/jwt.auth.strategy.ts b/examples/access-control-migration/src/components/jwt-authentication/services/jwt.auth.strategy.ts index 216b53cf0bd2..fff1d20ef4e1 100644 --- a/examples/access-control-migration/src/components/jwt-authentication/services/jwt.auth.strategy.ts +++ b/examples/access-control-migration/src/components/jwt-authentication/services/jwt.auth.strategy.ts @@ -4,7 +4,7 @@ // License text available at https://opensource.org/licenses/MIT import {AuthenticationStrategy, TokenService} from '@loopback/authentication'; -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import {HttpErrors, Request} from '@loopback/rest'; import {UserProfile} from '@loopback/security'; import {TokenServiceBindings} from '../keys'; diff --git a/examples/access-control-migration/src/components/jwt-authentication/services/jwt.service.ts b/examples/access-control-migration/src/components/jwt-authentication/services/jwt.service.ts index fc490dbf4c6b..9e35e4403e67 100644 --- a/examples/access-control-migration/src/components/jwt-authentication/services/jwt.service.ts +++ b/examples/access-control-migration/src/components/jwt-authentication/services/jwt.service.ts @@ -4,7 +4,7 @@ // License text available at https://opensource.org/licenses/MIT import {TokenService} from '@loopback/authentication'; -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import {HttpErrors} from '@loopback/rest'; import {securityId, UserProfile} from '@loopback/security'; import {promisify} from 'util'; diff --git a/examples/access-control-migration/src/controllers/user.controller.ts b/examples/access-control-migration/src/controllers/user.controller.ts index ae5a4be53ce7..5858c8c3d780 100644 --- a/examples/access-control-migration/src/controllers/user.controller.ts +++ b/examples/access-control-migration/src/controllers/user.controller.ts @@ -6,7 +6,7 @@ // Uncomment these imports to begin using these cool features! import {TokenService, UserService} from '@loopback/authentication'; -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import {post, requestBody} from '@loopback/rest'; import { Credentials, diff --git a/examples/access-control-migration/src/keys.ts b/examples/access-control-migration/src/keys.ts index af4376b55f3f..8a32bb31475e 100644 --- a/examples/access-control-migration/src/keys.ts +++ b/examples/access-control-migration/src/keys.ts @@ -3,6 +3,6 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingKey} from '@loopback/context'; +import {BindingKey} from '@loopback/core'; export const RESOURCE_ID = BindingKey.create('resourceId'); diff --git a/examples/access-control-migration/src/sequence.ts b/examples/access-control-migration/src/sequence.ts index 4dbe29f00df5..9d8851a9467b 100644 --- a/examples/access-control-migration/src/sequence.ts +++ b/examples/access-control-migration/src/sequence.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, inject} from '@loopback/context'; +import {Context, inject} from '@loopback/core'; import { FindRoute, InvokeMethod, diff --git a/examples/access-control-migration/tsconfig.json b/examples/access-control-migration/tsconfig.json index 9dffec995c61..a4d3534bda59 100644 --- a/examples/access-control-migration/tsconfig.json +++ b/examples/access-control-migration/tsconfig.json @@ -20,9 +20,6 @@ { "path": "../../packages/boot/tsconfig.json" }, - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/examples/express-composition/package.json b/examples/express-composition/package.json index c93c0518d556..2d566bb0c15b 100644 --- a/examples/express-composition/package.json +++ b/examples/express-composition/package.json @@ -46,7 +46,6 @@ }, "dependencies": { "@loopback/boot": "^2.3.2", - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/openapi-v3": "^3.4.2", "@loopback/repository": "^2.6.0", diff --git a/examples/express-composition/src/controllers/ping.controller.ts b/examples/express-composition/src/controllers/ping.controller.ts index 379fa918d3fa..d5d8adb25a5d 100644 --- a/examples/express-composition/src/controllers/ping.controller.ts +++ b/examples/express-composition/src/controllers/ping.controller.ts @@ -4,7 +4,7 @@ // License text available at https://opensource.org/licenses/MIT import {Request, RestBindings, get, ResponseObject} from '@loopback/rest'; -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; /** * OpenAPI response for ping() diff --git a/examples/express-composition/src/sequence.ts b/examples/express-composition/src/sequence.ts index e17724c297f8..d427b59da402 100644 --- a/examples/express-composition/src/sequence.ts +++ b/examples/express-composition/src/sequence.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import { FindRoute, InvokeMethod, diff --git a/examples/express-composition/tsconfig.json b/examples/express-composition/tsconfig.json index 6c76a6abfbce..a4bb932c1d8b 100644 --- a/examples/express-composition/tsconfig.json +++ b/examples/express-composition/tsconfig.json @@ -14,9 +14,6 @@ { "path": "../../packages/boot/tsconfig.json" }, - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/examples/file-transfer/package.json b/examples/file-transfer/package.json index f3469d237cae..ef75cee7dbe8 100644 --- a/examples/file-transfer/package.json +++ b/examples/file-transfer/package.json @@ -39,7 +39,6 @@ }, "dependencies": { "@loopback/boot": "^2.3.2", - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/openapi-v3": "^3.4.2", "@loopback/rest": "^5.1.0", diff --git a/examples/file-transfer/src/controllers/file-download.controller.ts b/examples/file-transfer/src/controllers/file-download.controller.ts index 36226e9a6737..ff01df28d913 100644 --- a/examples/file-transfer/src/controllers/file-download.controller.ts +++ b/examples/file-transfer/src/controllers/file-download.controller.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import { get, HttpErrors, diff --git a/examples/file-transfer/src/controllers/file-upload.controller.ts b/examples/file-transfer/src/controllers/file-upload.controller.ts index 1cabb70f02ef..32d964558325 100644 --- a/examples/file-transfer/src/controllers/file-upload.controller.ts +++ b/examples/file-transfer/src/controllers/file-upload.controller.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import { post, Request, diff --git a/examples/file-transfer/src/sequence.ts b/examples/file-transfer/src/sequence.ts index 5614b94ff584..09a58f8db810 100644 --- a/examples/file-transfer/src/sequence.ts +++ b/examples/file-transfer/src/sequence.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import { FindRoute, InvokeMethod, diff --git a/examples/file-transfer/src/services/file-upload.service.ts b/examples/file-transfer/src/services/file-upload.service.ts index acd0f4b244fa..ce77f006cffb 100644 --- a/examples/file-transfer/src/services/file-upload.service.ts +++ b/examples/file-transfer/src/services/file-upload.service.ts @@ -9,7 +9,7 @@ import { config, ContextTags, Provider, -} from '@loopback/context'; +} from '@loopback/core'; import multer from 'multer'; import {FILE_UPLOAD_SERVICE} from '../keys'; import {FileUploadHandler} from '../types'; diff --git a/examples/file-transfer/tsconfig.json b/examples/file-transfer/tsconfig.json index 2adce6bb6d2a..1f0f3fec3432 100644 --- a/examples/file-transfer/tsconfig.json +++ b/examples/file-transfer/tsconfig.json @@ -14,9 +14,6 @@ { "path": "../../packages/boot/tsconfig.json" }, - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/examples/greeter-extension/package.json b/examples/greeter-extension/package.json index cd5528a282b4..ef748b50fb6a 100644 --- a/examples/greeter-extension/package.json +++ b/examples/greeter-extension/package.json @@ -55,7 +55,6 @@ "typescript": "~3.9.3" }, "dependencies": { - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/openapi-v3": "^3.4.2", "chalk": "^4.0.0", diff --git a/examples/greeter-extension/src/component.ts b/examples/greeter-extension/src/component.ts index 0d6a537196e5..b3393c43d8dc 100644 --- a/examples/greeter-extension/src/component.ts +++ b/examples/greeter-extension/src/component.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Binding, createBindingFromClass} from '@loopback/context'; -import {Component} from '@loopback/core'; +import {Binding, createBindingFromClass, Component} from '@loopback/core'; import {ChineseGreeter} from './greeters/greeter-cn'; import {EnglishGreeter} from './greeters/greeter-en'; import {GreetingService} from './greeting-service'; diff --git a/examples/greeter-extension/src/greeters/greeter-cn.ts b/examples/greeter-extension/src/greeters/greeter-cn.ts index cf55c6565d7a..fbebfc791053 100644 --- a/examples/greeter-extension/src/greeters/greeter-cn.ts +++ b/examples/greeter-extension/src/greeters/greeter-cn.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {bind, config} from '@loopback/context'; +import {bind, config} from '@loopback/core'; import {asGreeter, Greeter} from '../types'; /** diff --git a/examples/greeter-extension/src/greeters/greeter-en.ts b/examples/greeter-extension/src/greeters/greeter-en.ts index ecf7b0afc5f6..0c616a5961d8 100644 --- a/examples/greeter-extension/src/greeters/greeter-en.ts +++ b/examples/greeter-extension/src/greeters/greeter-en.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {bind} from '@loopback/context'; +import {bind} from '@loopback/core'; import {asGreeter, Greeter} from '../types'; /** diff --git a/examples/greeter-extension/src/greeting-service.ts b/examples/greeter-extension/src/greeting-service.ts index 22662ca5d7e6..657d6759557b 100644 --- a/examples/greeter-extension/src/greeting-service.ts +++ b/examples/greeter-extension/src/greeting-service.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {config, Getter} from '@loopback/context'; -import {extensionPoint, extensions} from '@loopback/core'; +import {config, Getter, extensionPoint, extensions} from '@loopback/core'; import chalk from 'chalk'; import {Greeter, GREETER_EXTENSION_POINT_NAME} from './types'; diff --git a/examples/greeter-extension/src/keys.ts b/examples/greeter-extension/src/keys.ts index f1e375338767..f1642d10a950 100644 --- a/examples/greeter-extension/src/keys.ts +++ b/examples/greeter-extension/src/keys.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingKey} from '@loopback/context'; +import {BindingKey} from '@loopback/core'; import {GreetingService} from './greeting-service'; /** diff --git a/examples/greeter-extension/src/types.ts b/examples/greeter-extension/src/types.ts index 6844af9d3fb2..f170dc2e91cb 100644 --- a/examples/greeter-extension/src/types.ts +++ b/examples/greeter-extension/src/types.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingTemplate} from '@loopback/context'; -import {extensionFor} from '@loopback/core'; +import {BindingTemplate, extensionFor} from '@loopback/core'; /** * Typically an extension point defines an interface as the contract for diff --git a/examples/greeter-extension/tsconfig.json b/examples/greeter-extension/tsconfig.json index eff32e5e2b60..4e1d26c08eb1 100644 --- a/examples/greeter-extension/tsconfig.json +++ b/examples/greeter-extension/tsconfig.json @@ -11,9 +11,6 @@ "src/**/*.json" ], "references": [ - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/examples/greeting-app/package.json b/examples/greeting-app/package.json index 01a7f04c45f6..ec68b87d1426 100644 --- a/examples/greeting-app/package.json +++ b/examples/greeting-app/package.json @@ -57,7 +57,6 @@ }, "dependencies": { "@loopback/boot": "^2.3.2", - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/example-greeter-extension": "^2.1.2", "@loopback/openapi-v3": "^3.4.2", diff --git a/examples/greeting-app/src/controllers/greeting.controller.ts b/examples/greeting-app/src/controllers/greeting.controller.ts index 14859523124c..e26ae597f491 100644 --- a/examples/greeting-app/src/controllers/greeting.controller.ts +++ b/examples/greeting-app/src/controllers/greeting.controller.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import { GreetingService, GREETING_SERVICE, diff --git a/examples/greeting-app/src/interceptors/caching.interceptor.ts b/examples/greeting-app/src/interceptors/caching.interceptor.ts index 9da11f56cc51..784458bc95bb 100644 --- a/examples/greeting-app/src/interceptors/caching.interceptor.ts +++ b/examples/greeting-app/src/interceptors/caching.interceptor.ts @@ -12,7 +12,7 @@ import { InvocationResult, Provider, ValueOrPromise, -} from '@loopback/context'; +} from '@loopback/core'; import {RestBindings} from '@loopback/rest'; import debugFactory from 'debug'; import {CachingService} from '../caching-service'; diff --git a/examples/greeting-app/src/keys.ts b/examples/greeting-app/src/keys.ts index 5ff4f0d46e42..0db4b183d9b4 100644 --- a/examples/greeting-app/src/keys.ts +++ b/examples/greeting-app/src/keys.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingKey} from '@loopback/context'; +import {BindingKey} from '@loopback/core'; import {CachingService} from './caching-service'; /** diff --git a/examples/greeting-app/src/observers/cache.observer.ts b/examples/greeting-app/src/observers/cache.observer.ts index ab9ec9a1e520..e0ef8e71b976 100644 --- a/examples/greeting-app/src/observers/cache.observer.ts +++ b/examples/greeting-app/src/observers/cache.observer.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; -import {lifeCycleObserver, LifeCycleObserver} from '@loopback/core'; +import {inject, lifeCycleObserver, LifeCycleObserver} from '@loopback/core'; import {CachingService} from '../caching-service'; import {CACHING_SERVICE} from '../keys'; diff --git a/examples/greeting-app/tsconfig.json b/examples/greeting-app/tsconfig.json index 9695c41e066a..72a004274319 100644 --- a/examples/greeting-app/tsconfig.json +++ b/examples/greeting-app/tsconfig.json @@ -14,9 +14,6 @@ { "path": "../../packages/boot/tsconfig.json" }, - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/examples/lb3-application/package.json b/examples/lb3-application/package.json index 0a0fccf0493f..aada22ee741c 100644 --- a/examples/lb3-application/package.json +++ b/examples/lb3-application/package.json @@ -41,7 +41,6 @@ "dependencies": { "@loopback/boot": "^2.3.2", "@loopback/booter-lb3app": "^2.2.2", - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/repository": "^2.6.0", "@loopback/rest": "^5.1.0", diff --git a/examples/lb3-application/src/sequence.ts b/examples/lb3-application/src/sequence.ts index 48833b0e9d40..195b0e5799db 100644 --- a/examples/lb3-application/src/sequence.ts +++ b/examples/lb3-application/src/sequence.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, inject} from '@loopback/context'; +import {Context, inject} from '@loopback/core'; import { FindRoute, InvokeMethod, diff --git a/examples/lb3-application/tsconfig.json b/examples/lb3-application/tsconfig.json index 9fe5894f0ad7..2c09a7a5472d 100644 --- a/examples/lb3-application/tsconfig.json +++ b/examples/lb3-application/tsconfig.json @@ -17,9 +17,6 @@ { "path": "../../packages/booter-lb3app/tsconfig.json" }, - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/examples/log-extension/package.json b/examples/log-extension/package.json index b5ce6854e348..9f2adc8e2057 100644 --- a/examples/log-extension/package.json +++ b/examples/log-extension/package.json @@ -53,7 +53,6 @@ "typescript": "~3.9.3" }, "dependencies": { - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/openapi-v3": "^3.4.2", "@loopback/rest": "^5.1.0", diff --git a/examples/log-extension/src/__tests__/acceptance/log.extension.acceptance.ts b/examples/log-extension/src/__tests__/acceptance/log.extension.acceptance.ts index acd4f1dd354a..54555402a971 100644 --- a/examples/log-extension/src/__tests__/acceptance/log.extension.acceptance.ts +++ b/examples/log-extension/src/__tests__/acceptance/log.extension.acceptance.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import {get, param} from '@loopback/openapi-v3'; import { FindRoute, diff --git a/examples/log-extension/src/decorators/log.decorator.ts b/examples/log-extension/src/decorators/log.decorator.ts index a43efc5c81ff..b7abae053034 100644 --- a/examples/log-extension/src/decorators/log.decorator.ts +++ b/examples/log-extension/src/decorators/log.decorator.ts @@ -8,7 +8,7 @@ import { Constructor, MethodDecoratorFactory, MetadataInspector, -} from '@loopback/context'; +} from '@loopback/core'; import {LevelMetadata} from '../types'; /** diff --git a/examples/log-extension/src/keys.ts b/examples/log-extension/src/keys.ts index c269bf71b1b4..309e138d14aa 100644 --- a/examples/log-extension/src/keys.ts +++ b/examples/log-extension/src/keys.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingKey} from '@loopback/context'; +import {BindingKey} from '@loopback/core'; import {TimerFn, LogFn, LogWriterFn} from './types'; /** diff --git a/examples/log-extension/src/providers/log-action.provider.ts b/examples/log-extension/src/providers/log-action.provider.ts index 74b81a3223ee..18eb47040497 100644 --- a/examples/log-extension/src/providers/log-action.provider.ts +++ b/examples/log-extension/src/providers/log-action.provider.ts @@ -3,8 +3,13 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Constructor, Getter, inject, Provider} from '@loopback/context'; -import {CoreBindings} from '@loopback/core'; +import { + Constructor, + Getter, + inject, + Provider, + CoreBindings, +} from '@loopback/core'; import {OperationArgs, Request} from '@loopback/rest'; import chalk from 'chalk'; import {getLogMetadata} from '../decorators'; diff --git a/examples/log-extension/src/providers/timer.provider.ts b/examples/log-extension/src/providers/timer.provider.ts index b8cd4393aedd..1073c68baf3c 100644 --- a/examples/log-extension/src/providers/timer.provider.ts +++ b/examples/log-extension/src/providers/timer.provider.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Provider} from '@loopback/context'; +import {Provider} from '@loopback/core'; import {TimerFn, HighResTime} from '../types'; export class TimerProvider implements Provider { diff --git a/examples/log-extension/tsconfig.json b/examples/log-extension/tsconfig.json index 693d44c01429..2f84603592b2 100644 --- a/examples/log-extension/tsconfig.json +++ b/examples/log-extension/tsconfig.json @@ -11,9 +11,6 @@ "src/**/*.json" ], "references": [ - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/examples/multi-tenancy/package.json b/examples/multi-tenancy/package.json index 5b2b4205e3d2..d74be29784af 100644 --- a/examples/multi-tenancy/package.json +++ b/examples/multi-tenancy/package.json @@ -52,7 +52,6 @@ ], "dependencies": { "@loopback/boot": "^2.3.2", - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/openapi-v3": "^3.4.2", "@loopback/repository": "^2.6.0", diff --git a/examples/multi-tenancy/src/controllers/ping.controller.ts b/examples/multi-tenancy/src/controllers/ping.controller.ts index c0063f06b214..3527f96602cb 100644 --- a/examples/multi-tenancy/src/controllers/ping.controller.ts +++ b/examples/multi-tenancy/src/controllers/ping.controller.ts @@ -4,7 +4,7 @@ // License text available at https://opensource.org/licenses/MIT import {Request, RestBindings, get, ResponseObject} from '@loopback/rest'; -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; /** * OpenAPI response for ping() diff --git a/examples/multi-tenancy/src/multi-tenancy/actions/multi-tenancy-action.provider.ts b/examples/multi-tenancy/src/multi-tenancy/actions/multi-tenancy-action.provider.ts index 13db91fed4a8..75ab0b80da8f 100644 --- a/examples/multi-tenancy/src/multi-tenancy/actions/multi-tenancy-action.provider.ts +++ b/examples/multi-tenancy/src/multi-tenancy/actions/multi-tenancy-action.provider.ts @@ -3,8 +3,14 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {config, ContextTags, Getter, Provider} from '@loopback/context'; -import {extensionPoint, extensions} from '@loopback/core'; +import { + config, + ContextTags, + Getter, + Provider, + extensionPoint, + extensions, +} from '@loopback/core'; import {RequestContext} from '@loopback/rest'; import debugFactory from 'debug'; import {MultiTenancyBindings, MULTI_TENANCY_STRATEGIES} from '../keys'; diff --git a/examples/multi-tenancy/src/sequence.ts b/examples/multi-tenancy/src/sequence.ts index b67931a881af..1bce0fc1329d 100644 --- a/examples/multi-tenancy/src/sequence.ts +++ b/examples/multi-tenancy/src/sequence.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import { FindRoute, InvokeMethod, diff --git a/examples/multi-tenancy/tsconfig.json b/examples/multi-tenancy/tsconfig.json index 6c76a6abfbce..a4bb932c1d8b 100644 --- a/examples/multi-tenancy/tsconfig.json +++ b/examples/multi-tenancy/tsconfig.json @@ -14,9 +14,6 @@ { "path": "../../packages/boot/tsconfig.json" }, - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/examples/passport-login/package.json b/examples/passport-login/package.json index 921897b30127..8ed8d68ab6b9 100644 --- a/examples/passport-login/package.json +++ b/examples/passport-login/package.json @@ -40,7 +40,6 @@ "@loopback/authentication": "^4.2.6", "@loopback/authentication-passport": "^2.1.6", "@loopback/boot": "^2.3.2", - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/express": "^1.2.2", "@loopback/openapi-v3": "^3.4.2", diff --git a/examples/passport-login/src/authentication-strategies/basic.ts b/examples/passport-login/src/authentication-strategies/basic.ts index 6eb752aa7354..966274c89d57 100644 --- a/examples/passport-login/src/authentication-strategies/basic.ts +++ b/examples/passport-login/src/authentication-strategies/basic.ts @@ -8,7 +8,7 @@ import {StrategyAdapter} from '@loopback/authentication-passport'; import {Request, RedirectRoute} from '@loopback/rest'; import {UserProfile} from '@loopback/security'; import {User} from '../models'; -import {bind} from '@loopback/context'; +import {bind} from '@loopback/core'; import {BasicStrategy as Strategy} from 'passport-http'; import {repository} from '@loopback/repository'; import {UserRepository} from '../repositories'; diff --git a/examples/passport-login/src/authentication-strategies/facebook.ts b/examples/passport-login/src/authentication-strategies/facebook.ts index e198b3d58274..ccf67b3596c5 100644 --- a/examples/passport-login/src/authentication-strategies/facebook.ts +++ b/examples/passport-login/src/authentication-strategies/facebook.ts @@ -6,8 +6,7 @@ import {asAuthStrategy, AuthenticationStrategy} from '@loopback/authentication'; import {StrategyAdapter} from '@loopback/authentication-passport'; import {Strategy} from 'passport-facebook'; -import {bind, inject} from '@loopback/context'; -import {extensionFor} from '@loopback/core'; +import {bind, inject, extensionFor} from '@loopback/core'; import {UserProfile} from '@loopback/security'; import {User} from '../models'; import {Request, RedirectRoute} from '@loopback/rest'; diff --git a/examples/passport-login/src/authentication-strategies/google.ts b/examples/passport-login/src/authentication-strategies/google.ts index 34e656b70e43..cb21bac63011 100644 --- a/examples/passport-login/src/authentication-strategies/google.ts +++ b/examples/passport-login/src/authentication-strategies/google.ts @@ -6,8 +6,7 @@ import {asAuthStrategy, AuthenticationStrategy} from '@loopback/authentication'; import {StrategyAdapter} from '@loopback/authentication-passport'; import {Strategy} from 'passport-google-oauth2'; -import {bind, inject} from '@loopback/context'; -import {extensionFor} from '@loopback/core'; +import {bind, inject, extensionFor} from '@loopback/core'; import {UserProfile} from '@loopback/security'; import {User} from '../models'; import {Request, RedirectRoute} from '@loopback/rest'; diff --git a/examples/passport-login/src/authentication-strategies/local.ts b/examples/passport-login/src/authentication-strategies/local.ts index 71e2cccaa2fa..752236b0b623 100644 --- a/examples/passport-login/src/authentication-strategies/local.ts +++ b/examples/passport-login/src/authentication-strategies/local.ts @@ -8,7 +8,7 @@ import {StrategyAdapter} from '@loopback/authentication-passport'; import {Request, RedirectRoute} from '@loopback/rest'; import {UserProfile, securityId} from '@loopback/security'; import {User} from '../models'; -import {bind} from '@loopback/context'; +import {bind} from '@loopback/core'; import {Strategy, IVerifyOptions} from 'passport-local'; import {repository} from '@loopback/repository'; import {UserRepository} from '../repositories'; diff --git a/examples/passport-login/src/authentication-strategies/session.ts b/examples/passport-login/src/authentication-strategies/session.ts index 9ac2caf12cd4..8dcffbf41571 100644 --- a/examples/passport-login/src/authentication-strategies/session.ts +++ b/examples/passport-login/src/authentication-strategies/session.ts @@ -7,7 +7,7 @@ import {AuthenticationStrategy, asAuthStrategy} from '@loopback/authentication'; import {RedirectRoute, RequestWithSession, HttpErrors} from '@loopback/rest'; import {UserProfile} from '@loopback/security'; import {User} from '../models'; -import {bind} from '@loopback/context'; +import {bind} from '@loopback/core'; import {repository} from '@loopback/repository'; import {UserRepository} from '../repositories'; import {mapProfile} from './types'; diff --git a/examples/passport-login/src/controllers/ping.controller.ts b/examples/passport-login/src/controllers/ping.controller.ts index ef2a1319f337..1208dc3a4e44 100644 --- a/examples/passport-login/src/controllers/ping.controller.ts +++ b/examples/passport-login/src/controllers/ping.controller.ts @@ -10,7 +10,7 @@ import { RequestBodyObject, SchemaObject, } from '@loopback/rest'; -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import {authenticate} from '@loopback/authentication'; import {SecurityBindings, UserProfile} from '@loopback/security'; diff --git a/examples/passport-login/src/controllers/user.controller.ts b/examples/passport-login/src/controllers/user.controller.ts index 51c60f48edf0..879b7ce67d4d 100644 --- a/examples/passport-login/src/controllers/user.controller.ts +++ b/examples/passport-login/src/controllers/user.controller.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import { post, del, diff --git a/examples/passport-login/src/sequence.ts b/examples/passport-login/src/sequence.ts index 52f9002ae077..95ecfe3ee524 100644 --- a/examples/passport-login/src/sequence.ts +++ b/examples/passport-login/src/sequence.ts @@ -9,7 +9,7 @@ import { AUTHENTICATION_STRATEGY_NOT_FOUND, USER_PROFILE_NOT_FOUND, } from '@loopback/authentication'; -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import { FindRoute, InvokeMethod, diff --git a/examples/passport-login/tsconfig.json b/examples/passport-login/tsconfig.json index 275267359e06..61f8ec695180 100644 --- a/examples/passport-login/tsconfig.json +++ b/examples/passport-login/tsconfig.json @@ -24,9 +24,6 @@ { "path": "../../packages/boot/tsconfig.json" }, - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/examples/rest-crud/package.json b/examples/rest-crud/package.json index 9f1ae406e4fa..fc0787890471 100644 --- a/examples/rest-crud/package.json +++ b/examples/rest-crud/package.json @@ -40,7 +40,6 @@ }, "dependencies": { "@loopback/boot": "^2.3.2", - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/openapi-v3": "^3.4.2", "@loopback/repository": "^2.6.0", diff --git a/examples/rest-crud/src/sequence.ts b/examples/rest-crud/src/sequence.ts index cb6876c89904..b3e4deb4d89b 100644 --- a/examples/rest-crud/src/sequence.ts +++ b/examples/rest-crud/src/sequence.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, inject} from '@loopback/context'; +import {Context, inject} from '@loopback/core'; import { FindRoute, InvokeMethod, diff --git a/examples/rest-crud/tsconfig.json b/examples/rest-crud/tsconfig.json index 11f44a417a1a..e05af391f484 100644 --- a/examples/rest-crud/tsconfig.json +++ b/examples/rest-crud/tsconfig.json @@ -14,9 +14,6 @@ { "path": "../../packages/boot/tsconfig.json" }, - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/examples/rpc-server/package.json b/examples/rpc-server/package.json index 2434d7dd0252..e0564442bdd0 100644 --- a/examples/rpc-server/package.json +++ b/examples/rpc-server/package.json @@ -41,7 +41,6 @@ "access": "public" }, "dependencies": { - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "express": "^4.17.1", "tslib": "^2.0.0" diff --git a/examples/rpc-server/src/rpc.server.ts b/examples/rpc-server/src/rpc.server.ts index eaf36f0d811b..5f68e749b7a3 100644 --- a/examples/rpc-server/src/rpc.server.ts +++ b/examples/rpc-server/src/rpc.server.ts @@ -3,8 +3,13 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, inject} from '@loopback/context'; -import {Application, CoreBindings, Server} from '@loopback/core'; +import { + Context, + inject, + Application, + CoreBindings, + Server, +} from '@loopback/core'; import {once} from 'events'; import express from 'express'; import http from 'http'; diff --git a/examples/rpc-server/tsconfig.json b/examples/rpc-server/tsconfig.json index 946d06dae6ef..c286e2aee8eb 100644 --- a/examples/rpc-server/tsconfig.json +++ b/examples/rpc-server/tsconfig.json @@ -11,9 +11,6 @@ "src/**/*.json" ], "references": [ - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/examples/soap-calculator/package.json b/examples/soap-calculator/package.json index 1bbdd3742dfc..8a2d59dfe325 100644 --- a/examples/soap-calculator/package.json +++ b/examples/soap-calculator/package.json @@ -45,7 +45,6 @@ }, "dependencies": { "@loopback/boot": "^2.3.2", - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/openapi-v3": "^3.4.2", "@loopback/repository": "^2.6.0", diff --git a/examples/soap-calculator/src/sequence.ts b/examples/soap-calculator/src/sequence.ts index 218043f7a735..bed39f6d44d3 100644 --- a/examples/soap-calculator/src/sequence.ts +++ b/examples/soap-calculator/src/sequence.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import { FindRoute, InvokeMethod, diff --git a/examples/soap-calculator/tsconfig.json b/examples/soap-calculator/tsconfig.json index 6c76a6abfbce..a4bb932c1d8b 100644 --- a/examples/soap-calculator/tsconfig.json +++ b/examples/soap-calculator/tsconfig.json @@ -14,9 +14,6 @@ { "path": "../../packages/boot/tsconfig.json" }, - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/examples/todo-jwt/package.json b/examples/todo-jwt/package.json index 2e63d0f49e7e..354c7886e5e2 100644 --- a/examples/todo-jwt/package.json +++ b/examples/todo-jwt/package.json @@ -42,7 +42,6 @@ "@loopback/authentication": "^4.2.6", "@loopback/authentication-jwt": "^0.4.0", "@loopback/boot": "^2.3.2", - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/openapi-v3": "^3.4.2", "@loopback/repository": "^2.6.0", diff --git a/examples/todo-jwt/src/sequence.ts b/examples/todo-jwt/src/sequence.ts index 977b0b2ef2c8..f026a940ffd8 100644 --- a/examples/todo-jwt/src/sequence.ts +++ b/examples/todo-jwt/src/sequence.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, inject} from '@loopback/context'; +import {Context, inject} from '@loopback/core'; import { FindRoute, InvokeMethod, diff --git a/examples/todo-jwt/tsconfig.json b/examples/todo-jwt/tsconfig.json index 2d42de263958..b2cda2988898 100644 --- a/examples/todo-jwt/tsconfig.json +++ b/examples/todo-jwt/tsconfig.json @@ -20,9 +20,6 @@ { "path": "../../packages/boot/tsconfig.json" }, - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/examples/todo-list/package.json b/examples/todo-list/package.json index 4e4742dd2fac..79f1c5b23077 100644 --- a/examples/todo-list/package.json +++ b/examples/todo-list/package.json @@ -40,7 +40,6 @@ }, "dependencies": { "@loopback/boot": "^2.3.2", - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/openapi-v3": "^3.4.2", "@loopback/repository": "^2.6.0", diff --git a/examples/todo-list/src/sequence.ts b/examples/todo-list/src/sequence.ts index d8a22e67a3b3..50aa89aef904 100644 --- a/examples/todo-list/src/sequence.ts +++ b/examples/todo-list/src/sequence.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, inject} from '@loopback/context'; +import {Context, inject} from '@loopback/core'; import { FindRoute, InvokeMethod, diff --git a/examples/todo-list/tsconfig.json b/examples/todo-list/tsconfig.json index bda35b48f3a5..49d11fc02dfd 100644 --- a/examples/todo-list/tsconfig.json +++ b/examples/todo-list/tsconfig.json @@ -14,9 +14,6 @@ { "path": "../../packages/boot/tsconfig.json" }, - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/examples/todo/package.json b/examples/todo/package.json index 9992ef182f05..77d3eed55703 100644 --- a/examples/todo/package.json +++ b/examples/todo/package.json @@ -40,7 +40,6 @@ }, "dependencies": { "@loopback/boot": "^2.3.2", - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/openapi-v3": "^3.4.2", "@loopback/repository": "^2.6.0", diff --git a/examples/todo/src/sequence.ts b/examples/todo/src/sequence.ts index db85cb4d7d17..d9fcca2dd243 100644 --- a/examples/todo/src/sequence.ts +++ b/examples/todo/src/sequence.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import { FindRoute, InvokeMethod, diff --git a/examples/todo/tsconfig.json b/examples/todo/tsconfig.json index bda35b48f3a5..49d11fc02dfd 100644 --- a/examples/todo/tsconfig.json +++ b/examples/todo/tsconfig.json @@ -14,9 +14,6 @@ { "path": "../../packages/boot/tsconfig.json" }, - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/examples/validation-app/package.json b/examples/validation-app/package.json index 62e089d2a874..cc2a3901a78b 100644 --- a/examples/validation-app/package.json +++ b/examples/validation-app/package.json @@ -42,7 +42,6 @@ }, "dependencies": { "@loopback/boot": "^2.3.2", - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/openapi-v3": "^3.4.2", "@loopback/repository": "^2.6.0", diff --git a/examples/validation-app/src/interceptors/validate-phone-num.interceptor.ts b/examples/validation-app/src/interceptors/validate-phone-num.interceptor.ts index 53d30b548933..3d13f449fe60 100644 --- a/examples/validation-app/src/interceptors/validate-phone-num.interceptor.ts +++ b/examples/validation-app/src/interceptors/validate-phone-num.interceptor.ts @@ -10,7 +10,7 @@ import { InvocationResult, Provider, ValueOrPromise, -} from '@loopback/context'; +} from '@loopback/core'; import {CoffeeShop} from '../models'; /** diff --git a/examples/validation-app/src/sequence.ts b/examples/validation-app/src/sequence.ts index 7b8f5b87e7ee..01d5319c24b4 100644 --- a/examples/validation-app/src/sequence.ts +++ b/examples/validation-app/src/sequence.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import { FindRoute, HttpErrors, diff --git a/examples/validation-app/tsconfig.json b/examples/validation-app/tsconfig.json index 6c76a6abfbce..a4bb932c1d8b 100644 --- a/examples/validation-app/tsconfig.json +++ b/examples/validation-app/tsconfig.json @@ -14,9 +14,6 @@ { "path": "../../packages/boot/tsconfig.json" }, - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/extensions/apiconnect/package.json b/extensions/apiconnect/package.json index 742fb3381325..afad5ac7e3f5 100644 --- a/extensions/apiconnect/package.json +++ b/extensions/apiconnect/package.json @@ -39,7 +39,6 @@ "directory": "extensions/apiconnect" }, "dependencies": { - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/openapi-v3": "^3.4.2", "tslib": "^2.0.0" diff --git a/extensions/apiconnect/tsconfig.json b/extensions/apiconnect/tsconfig.json index 543536dc8b4e..d86749617e9a 100644 --- a/extensions/apiconnect/tsconfig.json +++ b/extensions/apiconnect/tsconfig.json @@ -10,9 +10,6 @@ "src" ], "references": [ - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/extensions/authentication-passport/package.json b/extensions/authentication-passport/package.json index a9613515948f..11026d569d7c 100644 --- a/extensions/authentication-passport/package.json +++ b/extensions/authentication-passport/package.json @@ -41,7 +41,6 @@ }, "dependencies": { "@loopback/authentication": "^4.2.6", - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/metadata": "^2.1.6", "@loopback/openapi-v3": "^3.4.2", diff --git a/extensions/authentication-passport/src/__tests__/acceptance/authentication-with-passport-strategy-adapter.acceptance.ts b/extensions/authentication-passport/src/__tests__/acceptance/authentication-with-passport-strategy-adapter.acceptance.ts index f4c9457d4c35..7b0d76461e90 100644 --- a/extensions/authentication-passport/src/__tests__/acceptance/authentication-with-passport-strategy-adapter.acceptance.ts +++ b/extensions/authentication-passport/src/__tests__/acceptance/authentication-with-passport-strategy-adapter.acceptance.ts @@ -13,8 +13,7 @@ import { UserProfileFactory, USER_PROFILE_NOT_FOUND, } from '@loopback/authentication'; -import {inject} from '@loopback/context'; -import {addExtension, CoreTags, Provider} from '@loopback/core'; +import {inject, addExtension, CoreTags, Provider} from '@loopback/core'; import {anOpenApiSpec} from '@loopback/openapi-spec-builder'; import {api, get} from '@loopback/openapi-v3'; import { diff --git a/extensions/authentication-passport/src/__tests__/acceptance/fixtures/simple-rest-app.ts b/extensions/authentication-passport/src/__tests__/acceptance/fixtures/simple-rest-app.ts index bd2eac3bbe91..f0f698803de2 100644 --- a/extensions/authentication-passport/src/__tests__/acceptance/fixtures/simple-rest-app.ts +++ b/extensions/authentication-passport/src/__tests__/acceptance/fixtures/simple-rest-app.ts @@ -8,7 +8,7 @@ import { AuthenticationBindings, AuthenticationComponent, } from '@loopback/authentication'; -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import { FindRoute, InvokeMethod, diff --git a/extensions/authentication-passport/tsconfig.json b/extensions/authentication-passport/tsconfig.json index 6c32e81e5acf..ded5a6d3a0b2 100644 --- a/extensions/authentication-passport/tsconfig.json +++ b/extensions/authentication-passport/tsconfig.json @@ -16,9 +16,6 @@ { "path": "../../packages/authentication/tsconfig.json" }, - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/extensions/context-explorer/package.json b/extensions/context-explorer/package.json index 00f73fcc9b35..a6e7ae06a444 100644 --- a/extensions/context-explorer/package.json +++ b/extensions/context-explorer/package.json @@ -21,7 +21,6 @@ "access": "public" }, "dependencies": { - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/rest": "^5.1.0", "ts-graphviz": "^0.13.1", diff --git a/extensions/context-explorer/src/__tests__/integration/context-graph.integration.ts b/extensions/context-explorer/src/__tests__/integration/context-graph.integration.ts index 880bc29f54b8..a3a1e14d40d7 100644 --- a/extensions/context-explorer/src/__tests__/integration/context-graph.integration.ts +++ b/extensions/context-explorer/src/__tests__/integration/context-graph.integration.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, inject} from '@loopback/context'; +import {Context, inject} from '@loopback/core'; import {expect} from '@loopback/testlab'; import {ContextGraph} from '../..'; diff --git a/extensions/context-explorer/src/__tests__/integration/visualizer.integration.ts b/extensions/context-explorer/src/__tests__/integration/visualizer.integration.ts index a727a1d7c146..87f2721f693a 100644 --- a/extensions/context-explorer/src/__tests__/integration/visualizer.integration.ts +++ b/extensions/context-explorer/src/__tests__/integration/visualizer.integration.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context} from '@loopback/context'; +import {Context} from '@loopback/core'; import {expect} from '@loopback/testlab'; import {ContextGraph} from '../..'; import {renderGraph} from '../../visualizer'; diff --git a/extensions/context-explorer/src/context-explorer.component.ts b/extensions/context-explorer/src/context-explorer.component.ts index 7fc4208d3cdb..5aac5cfa616a 100644 --- a/extensions/context-explorer/src/context-explorer.component.ts +++ b/extensions/context-explorer/src/context-explorer.component.ts @@ -3,9 +3,15 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import {bind, config, ContextTags, inject} from '@loopback/context'; -import {Component, CoreBindings} from '@loopback/core'; +import { + bind, + Component, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + config, + ContextTags, + CoreBindings, + inject, +} from '@loopback/core'; import {RestApplication} from '@loopback/rest'; import path from 'path'; import {contextExplorerControllerFactory} from './context-explorer.controller'; diff --git a/extensions/context-explorer/src/context-explorer.controller.ts b/extensions/context-explorer/src/context-explorer.controller.ts index 97e2d3b870dd..2426055a2c2c 100644 --- a/extensions/context-explorer/src/context-explorer.controller.ts +++ b/extensions/context-explorer/src/context-explorer.controller.ts @@ -4,13 +4,7 @@ // License text available at https://opensource.org/licenses/MIT /* eslint-disable @typescript-eslint/no-unused-vars */ -import { - config, - Constructor, - Context, - inject, - JSONObject, -} from '@loopback/context'; +import {config, Constructor, Context, inject, JSONObject} from '@loopback/core'; import { api, get, diff --git a/extensions/context-explorer/src/context-graph.ts b/extensions/context-explorer/src/context-graph.ts index acdf1690b2cf..71118bc225e5 100644 --- a/extensions/context-explorer/src/context-graph.ts +++ b/extensions/context-explorer/src/context-graph.ts @@ -3,12 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import { - BindingScope, - ContextTags, - JSONArray, - JSONObject, -} from '@loopback/context'; +import {BindingScope, ContextTags, JSONArray, JSONObject} from '@loopback/core'; import {attribute, Digraph, ICluster, toDot, INode, IEdge} from 'ts-graphviz'; /** diff --git a/extensions/context-explorer/src/keys.ts b/extensions/context-explorer/src/keys.ts index bab61cd91648..e7225f05187b 100644 --- a/extensions/context-explorer/src/keys.ts +++ b/extensions/context-explorer/src/keys.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingKey} from '@loopback/context'; +import {BindingKey} from '@loopback/core'; import {ContextExplorerComponent} from './context-explorer.component'; /** diff --git a/extensions/context-explorer/tsconfig.json b/extensions/context-explorer/tsconfig.json index cae293364492..bdd4f3eb6b2a 100644 --- a/extensions/context-explorer/tsconfig.json +++ b/extensions/context-explorer/tsconfig.json @@ -10,9 +10,6 @@ "src" ], "references": [ - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/extensions/logging/package.json b/extensions/logging/package.json index 2897700ad72e..6f2a83570389 100644 --- a/extensions/logging/package.json +++ b/extensions/logging/package.json @@ -21,7 +21,6 @@ "access": "public" }, "dependencies": { - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/rest": "^5.1.0", "fluent-logger": "^3.4.1", diff --git a/extensions/logging/src/__tests__/acceptance/winston.acceptance.ts b/extensions/logging/src/__tests__/acceptance/winston.acceptance.ts index 19bbcdff6421..d429724bf144 100644 --- a/extensions/logging/src/__tests__/acceptance/winston.acceptance.ts +++ b/extensions/logging/src/__tests__/acceptance/winston.acceptance.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context} from '@loopback/context'; -import {extensionFor} from '@loopback/core'; +import {Context, extensionFor} from '@loopback/core'; import {expect} from '@loopback/testlab'; import { format, diff --git a/extensions/logging/src/decorators/logging.decorator.ts b/extensions/logging/src/decorators/logging.decorator.ts index 43a41e355126..74c49182cd19 100644 --- a/extensions/logging/src/decorators/logging.decorator.ts +++ b/extensions/logging/src/decorators/logging.decorator.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {intercept} from '@loopback/context'; +import {intercept} from '@loopback/core'; import {LoggingBindings} from '../keys'; /** diff --git a/extensions/logging/src/interceptors/logging.interceptor.ts b/extensions/logging/src/interceptors/logging.interceptor.ts index 63096f3e28d7..aae56cc02f3b 100644 --- a/extensions/logging/src/interceptors/logging.interceptor.ts +++ b/extensions/logging/src/interceptors/logging.interceptor.ts @@ -14,7 +14,7 @@ import { InvocationContext, Provider, ValueOrPromise, -} from '@loopback/context'; +} from '@loopback/core'; import {RequestContext, RestBindings} from '@loopback/rest'; import morgan from 'morgan'; import {format} from 'util'; diff --git a/extensions/logging/tsconfig.json b/extensions/logging/tsconfig.json index cae293364492..bdd4f3eb6b2a 100644 --- a/extensions/logging/tsconfig.json +++ b/extensions/logging/tsconfig.json @@ -10,9 +10,6 @@ "src" ], "references": [ - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/extensions/metrics/package.json b/extensions/metrics/package.json index 93d38f54c9b9..602569798c2f 100644 --- a/extensions/metrics/package.json +++ b/extensions/metrics/package.json @@ -21,7 +21,6 @@ "access": "public" }, "dependencies": { - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/rest": "^5.1.0", "prom-client": "^12.0.0", diff --git a/extensions/metrics/src/interceptors/metrics.interceptor.ts b/extensions/metrics/src/interceptors/metrics.interceptor.ts index a1cab5fd593d..de3c8c900f4c 100644 --- a/extensions/metrics/src/interceptors/metrics.interceptor.ts +++ b/extensions/metrics/src/interceptors/metrics.interceptor.ts @@ -11,7 +11,7 @@ import { InvocationContext, Provider, ValueOrPromise, -} from '@loopback/context'; +} from '@loopback/core'; import {Counter, Gauge, Histogram, register, Summary} from 'prom-client'; /** diff --git a/extensions/metrics/src/keys.ts b/extensions/metrics/src/keys.ts index 303ce893094e..2801e439c5a3 100644 --- a/extensions/metrics/src/keys.ts +++ b/extensions/metrics/src/keys.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingKey} from '@loopback/context'; -import {CoreBindings} from '@loopback/core'; +import {BindingKey, CoreBindings} from '@loopback/core'; import {MetricsComponent} from './metrics.component'; /** diff --git a/extensions/metrics/src/metrics.component.ts b/extensions/metrics/src/metrics.component.ts index 6e521122976e..ea98d60ba1f5 100644 --- a/extensions/metrics/src/metrics.component.ts +++ b/extensions/metrics/src/metrics.component.ts @@ -4,14 +4,16 @@ // License text available at https://opensource.org/licenses/MIT import { + Application, bind, + Component, // eslint-disable-next-line @typescript-eslint/no-unused-vars config, ContextTags, + CoreBindings, createBindingFromClass, inject, -} from '@loopback/context'; -import {Application, Component, CoreBindings} from '@loopback/core'; +} from '@loopback/core'; import {metricsControllerFactory} from './controllers'; import {MetricsInterceptor} from './interceptors'; import {MetricsBindings} from './keys'; diff --git a/extensions/metrics/tsconfig.json b/extensions/metrics/tsconfig.json index cae293364492..bdd4f3eb6b2a 100644 --- a/extensions/metrics/tsconfig.json +++ b/extensions/metrics/tsconfig.json @@ -10,9 +10,6 @@ "src" ], "references": [ - { - "path": "../../packages/context/tsconfig.json" - }, { "path": "../../packages/core/tsconfig.json" }, diff --git a/packages/authentication/package.json b/packages/authentication/package.json index ba2a73ba19b1..84f7a7039b30 100644 --- a/packages/authentication/package.json +++ b/packages/authentication/package.json @@ -24,7 +24,6 @@ "access": "public" }, "dependencies": { - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/metadata": "^2.1.6", "@loopback/openapi-v3": "^3.4.2", diff --git a/packages/authentication/src/__tests__/acceptance/basic-auth-extension.acceptance.ts b/packages/authentication/src/__tests__/acceptance/basic-auth-extension.acceptance.ts index 730c4e8f67dc..cf3934f7d2eb 100644 --- a/packages/authentication/src/__tests__/acceptance/basic-auth-extension.acceptance.ts +++ b/packages/authentication/src/__tests__/acceptance/basic-auth-extension.acceptance.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; -import {Application} from '@loopback/core'; +import {inject, Application} from '@loopback/core'; import {anOpenApiSpec} from '@loopback/openapi-spec-builder'; import {api, get} from '@loopback/openapi-v3'; import {Request, RestServer} from '@loopback/rest'; diff --git a/packages/authentication/src/__tests__/acceptance/jwt-auth-extension.acceptance.ts b/packages/authentication/src/__tests__/acceptance/jwt-auth-extension.acceptance.ts index 83b52261c202..7503e961b523 100644 --- a/packages/authentication/src/__tests__/acceptance/jwt-auth-extension.acceptance.ts +++ b/packages/authentication/src/__tests__/acceptance/jwt-auth-extension.acceptance.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; -import {Application} from '@loopback/core'; +import {inject, Application} from '@loopback/core'; import {get, post} from '@loopback/openapi-v3'; import {Request, RestServer} from '@loopback/rest'; import {SecurityBindings, securityId, UserProfile} from '@loopback/security'; diff --git a/packages/authentication/src/__tests__/fixtures/keys.ts b/packages/authentication/src/__tests__/fixtures/keys.ts index 434c161777e7..0452ed696387 100644 --- a/packages/authentication/src/__tests__/fixtures/keys.ts +++ b/packages/authentication/src/__tests__/fixtures/keys.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingKey} from '@loopback/context'; +import {BindingKey} from '@loopback/core'; import {BasicAuthenticationUserService} from './services/basic-auth-user-service'; import {JWTService} from './services/jwt-service'; import {UserRepository} from './users/user.repository'; diff --git a/packages/authentication/src/__tests__/fixtures/sequences/authentication.sequence.ts b/packages/authentication/src/__tests__/fixtures/sequences/authentication.sequence.ts index d1650a5940da..00bdceeb7dae 100644 --- a/packages/authentication/src/__tests__/fixtures/sequences/authentication.sequence.ts +++ b/packages/authentication/src/__tests__/fixtures/sequences/authentication.sequence.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import { FindRoute, InvokeMethod, diff --git a/packages/authentication/src/__tests__/fixtures/services/basic-auth-user-service.ts b/packages/authentication/src/__tests__/fixtures/services/basic-auth-user-service.ts index 3b4f0e60a21f..7faac90266ce 100644 --- a/packages/authentication/src/__tests__/fixtures/services/basic-auth-user-service.ts +++ b/packages/authentication/src/__tests__/fixtures/services/basic-auth-user-service.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import {HttpErrors} from '@loopback/rest'; import {UserProfile} from '@loopback/security'; import {AuthenticationBindings} from '../../../'; diff --git a/packages/authentication/src/__tests__/fixtures/services/jwt-service.ts b/packages/authentication/src/__tests__/fixtures/services/jwt-service.ts index 5f523a3ad40f..5fc8cc36f155 100644 --- a/packages/authentication/src/__tests__/fixtures/services/jwt-service.ts +++ b/packages/authentication/src/__tests__/fixtures/services/jwt-service.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import {HttpErrors} from '@loopback/rest'; import {securityId, UserProfile} from '@loopback/security'; import {promisify} from 'util'; diff --git a/packages/authentication/src/__tests__/fixtures/strategies/basic-strategy.ts b/packages/authentication/src/__tests__/fixtures/strategies/basic-strategy.ts index 63ce2bac2a1c..3010791100a1 100644 --- a/packages/authentication/src/__tests__/fixtures/strategies/basic-strategy.ts +++ b/packages/authentication/src/__tests__/fixtures/strategies/basic-strategy.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {bind, inject} from '@loopback/context'; +import {bind, inject} from '@loopback/core'; import { asSpecEnhancer, mergeSecuritySchemeToSpec, diff --git a/packages/authentication/src/__tests__/fixtures/strategies/jwt-strategy.ts b/packages/authentication/src/__tests__/fixtures/strategies/jwt-strategy.ts index 5b0db60adfde..8f0caf1ddc3f 100644 --- a/packages/authentication/src/__tests__/fixtures/strategies/jwt-strategy.ts +++ b/packages/authentication/src/__tests__/fixtures/strategies/jwt-strategy.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {bind, inject} from '@loopback/context'; +import {bind, inject} from '@loopback/core'; import { asSpecEnhancer, mergeSecuritySchemeToSpec, diff --git a/packages/authentication/src/__tests__/unit/providers/auth-metadata.provider.unit.ts b/packages/authentication/src/__tests__/unit/providers/auth-metadata.provider.unit.ts index 986b2f11534a..b56bedf037b2 100644 --- a/packages/authentication/src/__tests__/unit/providers/auth-metadata.provider.unit.ts +++ b/packages/authentication/src/__tests__/unit/providers/auth-metadata.provider.unit.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, Provider} from '@loopback/context'; -import {CoreBindings} from '@loopback/core'; +import {Context, Provider, CoreBindings} from '@loopback/core'; import {expect} from '@loopback/testlab'; import {authenticate, AuthenticationMetadata} from '../../..'; import {AuthenticationBindings} from '../../../keys'; diff --git a/packages/authentication/src/__tests__/unit/providers/authentication.provider.unit.ts b/packages/authentication/src/__tests__/unit/providers/authentication.provider.unit.ts index ca20b4c03104..5114dd5d1154 100644 --- a/packages/authentication/src/__tests__/unit/providers/authentication.provider.unit.ts +++ b/packages/authentication/src/__tests__/unit/providers/authentication.provider.unit.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, instantiateClass} from '@loopback/context'; +import {Context, instantiateClass} from '@loopback/core'; import {Request} from '@loopback/rest'; import {securityId, UserProfile} from '@loopback/security'; import {expect} from '@loopback/testlab'; diff --git a/packages/authentication/src/__tests__/unit/types/register-authentication-strategy.unit.ts b/packages/authentication/src/__tests__/unit/types/register-authentication-strategy.unit.ts index 9435236a4154..bd65b9ea4f7a 100644 --- a/packages/authentication/src/__tests__/unit/types/register-authentication-strategy.unit.ts +++ b/packages/authentication/src/__tests__/unit/types/register-authentication-strategy.unit.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {bind, Context, createBindingFromClass} from '@loopback/context'; +import {bind, Context, createBindingFromClass} from '@loopback/core'; import { asSpecEnhancer, OASEnhancer, diff --git a/packages/authentication/src/decorators/authenticate.decorator.ts b/packages/authentication/src/decorators/authenticate.decorator.ts index 03fb8a1a6716..82a789779dfb 100644 --- a/packages/authentication/src/decorators/authenticate.decorator.ts +++ b/packages/authentication/src/decorators/authenticate.decorator.ts @@ -9,7 +9,7 @@ import { DecoratorFactory, MetadataInspector, MethodDecoratorFactory, -} from '@loopback/context'; +} from '@loopback/core'; import { AUTHENTICATION_METADATA_CLASS_KEY, AUTHENTICATION_METADATA_KEY, diff --git a/packages/authentication/src/keys.ts b/packages/authentication/src/keys.ts index 782862d90e43..28f1bb7e55fa 100644 --- a/packages/authentication/src/keys.ts +++ b/packages/authentication/src/keys.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingKey} from '@loopback/context'; -import {MetadataAccessor} from '@loopback/metadata'; +import {BindingKey, MetadataAccessor} from '@loopback/core'; import {SecurityBindings, UserProfile} from '@loopback/security'; import {AuthenticationComponent} from './authentication.component'; import { diff --git a/packages/authentication/src/providers/auth-action.provider.ts b/packages/authentication/src/providers/auth-action.provider.ts index 413fe863bf3a..40e54f0fbbfe 100644 --- a/packages/authentication/src/providers/auth-action.provider.ts +++ b/packages/authentication/src/providers/auth-action.provider.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Getter, inject, Provider, Setter} from '@loopback/context'; +import {Getter, inject, Provider, Setter} from '@loopback/core'; import {Request, RedirectRoute} from '@loopback/rest'; import {SecurityBindings, UserProfile} from '@loopback/security'; import {AuthenticationBindings} from '../keys'; diff --git a/packages/authentication/src/providers/auth-metadata.provider.ts b/packages/authentication/src/providers/auth-metadata.provider.ts index 33f020d320f2..5df7d5d3d6cb 100644 --- a/packages/authentication/src/providers/auth-metadata.provider.ts +++ b/packages/authentication/src/providers/auth-metadata.provider.ts @@ -3,8 +3,13 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {config, Constructor, inject, Provider} from '@loopback/context'; -import {CoreBindings} from '@loopback/core'; +import { + config, + Constructor, + inject, + Provider, + CoreBindings, +} from '@loopback/core'; import {getAuthenticateMetadata} from '../decorators'; import {AuthenticationBindings} from '../keys'; import {AuthenticationMetadata, AuthenticationOptions} from '../types'; diff --git a/packages/authentication/src/providers/auth-strategy.provider.ts b/packages/authentication/src/providers/auth-strategy.provider.ts index 99d18d9a98a0..cad90ec45a23 100644 --- a/packages/authentication/src/providers/auth-strategy.provider.ts +++ b/packages/authentication/src/providers/auth-strategy.provider.ts @@ -3,8 +3,14 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingScope, Getter, inject} from '@loopback/context'; -import {extensionPoint, extensions, Provider} from '@loopback/core'; +import { + BindingScope, + Getter, + inject, + extensionPoint, + extensions, + Provider, +} from '@loopback/core'; import {AuthenticationBindings} from '../keys'; import { AuthenticationMetadata, diff --git a/packages/authentication/tsconfig.json b/packages/authentication/tsconfig.json index b7625cfb61a7..fc86c35cd460 100644 --- a/packages/authentication/tsconfig.json +++ b/packages/authentication/tsconfig.json @@ -10,9 +10,6 @@ "src" ], "references": [ - { - "path": "../context/tsconfig.json" - }, { "path": "../core/tsconfig.json" }, diff --git a/packages/authorization/package.json b/packages/authorization/package.json index cef695737db9..c39a0ebbb4fa 100644 --- a/packages/authorization/package.json +++ b/packages/authorization/package.json @@ -24,7 +24,6 @@ "access": "public" }, "dependencies": { - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/security": "^0.2.11", "debug": "^4.1.1", diff --git a/packages/authorization/src/__tests__/acceptance/authorization-casbin.acceptance.ts b/packages/authorization/src/__tests__/acceptance/authorization-casbin.acceptance.ts index 2ed90d4d264e..cde0e9b2e820 100644 --- a/packages/authorization/src/__tests__/acceptance/authorization-casbin.acceptance.ts +++ b/packages/authorization/src/__tests__/acceptance/authorization-casbin.acceptance.ts @@ -3,8 +3,13 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, inject, invokeMethod, Provider} from '@loopback/context'; -import {Application} from '@loopback/core'; +import { + Context, + inject, + invokeMethod, + Provider, + Application, +} from '@loopback/core'; import {SecurityBindings, securityId, UserProfile} from '@loopback/security'; import {expect} from '@loopback/testlab'; import * as casbin from 'casbin'; diff --git a/packages/authorization/src/__tests__/acceptance/authorization.acceptance.ts b/packages/authorization/src/__tests__/acceptance/authorization.acceptance.ts index aca48840cf17..c3dfbe684088 100644 --- a/packages/authorization/src/__tests__/acceptance/authorization.acceptance.ts +++ b/packages/authorization/src/__tests__/acceptance/authorization.acceptance.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, invokeMethod, Provider} from '@loopback/context'; -import {Application} from '@loopback/core'; +import {Context, invokeMethod, Provider, Application} from '@loopback/core'; import {SecurityBindings, securityId} from '@loopback/security'; import {expect} from '@loopback/testlab'; import { diff --git a/packages/authorization/src/__tests__/acceptance/authorization.options.acceptance.ts b/packages/authorization/src/__tests__/acceptance/authorization.options.acceptance.ts index 99a8cd4923ba..61e002a5e96d 100644 --- a/packages/authorization/src/__tests__/acceptance/authorization.options.acceptance.ts +++ b/packages/authorization/src/__tests__/acceptance/authorization.options.acceptance.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, invokeMethod, Provider} from '@loopback/context'; -import {Application} from '@loopback/core'; +import {Context, invokeMethod, Provider, Application} from '@loopback/core'; import {SecurityBindings, securityId} from '@loopback/security'; import {expect} from '@loopback/testlab'; import {AuthorizationComponent} from '../../authorization-component'; diff --git a/packages/authorization/src/authorize-interceptor.ts b/packages/authorization/src/authorize-interceptor.ts index 404c57ded3e3..5bdeec83f0c6 100644 --- a/packages/authorization/src/authorize-interceptor.ts +++ b/packages/authorization/src/authorize-interceptor.ts @@ -15,7 +15,7 @@ import { Next, NonVoid, Provider, -} from '@loopback/context'; +} from '@loopback/core'; import {SecurityBindings, UserProfile} from '@loopback/security'; import debugFactory from 'debug'; import {getAuthorizationMetadata} from './decorators/authorize'; diff --git a/packages/authorization/src/decorators/authorize.ts b/packages/authorization/src/decorators/authorize.ts index 7aeb6461402e..6af1ca4b6e64 100644 --- a/packages/authorization/src/decorators/authorize.ts +++ b/packages/authorization/src/decorators/authorize.ts @@ -11,7 +11,7 @@ import { MetadataInspector, MetadataMap, MethodDecoratorFactory, -} from '@loopback/context'; +} from '@loopback/core'; import { AUTHENTICATED, AuthorizationMetadata, diff --git a/packages/authorization/src/types.ts b/packages/authorization/src/types.ts index 370a1e67e8d1..c22582076735 100644 --- a/packages/authorization/src/types.ts +++ b/packages/authorization/src/types.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingAddress, InvocationContext} from '@loopback/context'; +import {BindingAddress, InvocationContext} from '@loopback/core'; import {Principal, Role} from '@loopback/security'; /** diff --git a/packages/authorization/tsconfig.json b/packages/authorization/tsconfig.json index 160f59d4e345..c3711b702251 100644 --- a/packages/authorization/tsconfig.json +++ b/packages/authorization/tsconfig.json @@ -10,9 +10,6 @@ "src" ], "references": [ - { - "path": "../context/tsconfig.json" - }, { "path": "../core/tsconfig.json" }, diff --git a/packages/boot/package.json b/packages/boot/package.json index 67bc48d3eb62..bd781396fba5 100644 --- a/packages/boot/package.json +++ b/packages/boot/package.json @@ -24,7 +24,6 @@ "access": "public" }, "dependencies": { - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/model-api-builder": "^2.1.6", "@loopback/repository": "^2.6.0", diff --git a/packages/boot/src/__tests__/fixtures/interceptor.artifact.ts b/packages/boot/src/__tests__/fixtures/interceptor.artifact.ts index 32b9ef5f9f80..4d871b1644ce 100644 --- a/packages/boot/src/__tests__/fixtures/interceptor.artifact.ts +++ b/packages/boot/src/__tests__/fixtures/interceptor.artifact.ts @@ -10,7 +10,7 @@ import { InvocationResult, Provider, ValueOrPromise, -} from '@loopback/context'; +} from '@loopback/core'; /** * This class will be bound to the application as a global `Interceptor` during diff --git a/packages/boot/src/__tests__/fixtures/non-global-interceptor.artifact.ts b/packages/boot/src/__tests__/fixtures/non-global-interceptor.artifact.ts index 20aac6b26ca3..5e2af7492a52 100644 --- a/packages/boot/src/__tests__/fixtures/non-global-interceptor.artifact.ts +++ b/packages/boot/src/__tests__/fixtures/non-global-interceptor.artifact.ts @@ -10,7 +10,7 @@ import { InvocationResult, Provider, ValueOrPromise, -} from '@loopback/context'; +} from '@loopback/core'; /** * This class will be bound to the application as a global `Interceptor` during diff --git a/packages/boot/src/boot.component.ts b/packages/boot/src/boot.component.ts index bca7fdd20543..19b4b1b92387 100644 --- a/packages/boot/src/boot.component.ts +++ b/packages/boot/src/boot.component.ts @@ -3,8 +3,13 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingScope, inject} from '@loopback/context'; -import {Application, Component, CoreBindings} from '@loopback/core'; +import { + BindingScope, + inject, + Application, + Component, + CoreBindings, +} from '@loopback/core'; import { ApplicationMetadataBooter, ControllerBooter, diff --git a/packages/boot/src/booters/application-metadata.booter.ts b/packages/boot/src/booters/application-metadata.booter.ts index 5bc8d88f76c9..45cdfafc0988 100644 --- a/packages/boot/src/booters/application-metadata.booter.ts +++ b/packages/boot/src/booters/application-metadata.booter.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; -import {Application, CoreBindings} from '@loopback/core'; +import {inject, Application, CoreBindings} from '@loopback/core'; import debugModule from 'debug'; import {BootBindings} from '../keys'; import {Booter} from '../types'; diff --git a/packages/boot/src/booters/base-artifact.booter.ts b/packages/boot/src/booters/base-artifact.booter.ts index 1078e4feb164..88e535ad43ee 100644 --- a/packages/boot/src/booters/base-artifact.booter.ts +++ b/packages/boot/src/booters/base-artifact.booter.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Constructor} from '@loopback/context'; +import {Constructor} from '@loopback/core'; import debugFactory from 'debug'; import path from 'path'; import {ArtifactOptions, Booter} from '../types'; diff --git a/packages/boot/src/booters/booter-utils.ts b/packages/boot/src/booters/booter-utils.ts index 724a1d2a6359..ca232b62b7ec 100644 --- a/packages/boot/src/booters/booter-utils.ts +++ b/packages/boot/src/booters/booter-utils.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Constructor} from '@loopback/context'; +import {Constructor} from '@loopback/core'; import debugFactory from 'debug'; import path from 'path'; import {promisify} from 'util'; diff --git a/packages/boot/src/booters/controller.booter.ts b/packages/boot/src/booters/controller.booter.ts index 7eeed3f5f27b..334782ec1a10 100644 --- a/packages/boot/src/booters/controller.booter.ts +++ b/packages/boot/src/booters/controller.booter.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {config, inject} from '@loopback/context'; -import {Application, CoreBindings} from '@loopback/core'; +import {config, inject, Application, CoreBindings} from '@loopback/core'; import {BootBindings} from '../keys'; import {ArtifactOptions, booter} from '../types'; import {BaseArtifactBooter} from './base-artifact.booter'; diff --git a/packages/boot/src/booters/datasource.booter.ts b/packages/boot/src/booters/datasource.booter.ts index 336119daa2a9..d8e05835bbb7 100644 --- a/packages/boot/src/booters/datasource.booter.ts +++ b/packages/boot/src/booters/datasource.booter.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {config, inject} from '@loopback/context'; -import {CoreBindings} from '@loopback/core'; +import {config, inject, CoreBindings} from '@loopback/core'; import { ApplicationWithRepositories, Class, diff --git a/packages/boot/src/booters/interceptor.booter.ts b/packages/boot/src/booters/interceptor.booter.ts index 207def828855..12960eb89ac2 100644 --- a/packages/boot/src/booters/interceptor.booter.ts +++ b/packages/boot/src/booters/interceptor.booter.ts @@ -4,13 +4,14 @@ // License text available at https://opensource.org/licenses/MIT import { + Application, config, Constructor, + CoreBindings, inject, Interceptor, Provider, -} from '@loopback/context'; -import {Application, CoreBindings} from '@loopback/core'; +} from '@loopback/core'; import debugFactory from 'debug'; import {BootBindings} from '../keys'; import {ArtifactOptions, booter} from '../types'; diff --git a/packages/boot/src/booters/lifecyle-observer.booter.ts b/packages/boot/src/booters/lifecyle-observer.booter.ts index 49383a0c6182..6cdf9b824ea7 100644 --- a/packages/boot/src/booters/lifecyle-observer.booter.ts +++ b/packages/boot/src/booters/lifecyle-observer.booter.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {config, Constructor, inject} from '@loopback/context'; +import {config, Constructor, inject} from '@loopback/core'; import { Application, CoreBindings, diff --git a/packages/boot/src/booters/model.booter.ts b/packages/boot/src/booters/model.booter.ts index 12e9814eeb91..df23cc408b35 100644 --- a/packages/boot/src/booters/model.booter.ts +++ b/packages/boot/src/booters/model.booter.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {config, Constructor, inject} from '@loopback/context'; -import {CoreBindings} from '@loopback/core'; +import {config, Constructor, inject, CoreBindings} from '@loopback/core'; import { ApplicationWithRepositories, ModelMetadataHelper, diff --git a/packages/boot/src/booters/repository.booter.ts b/packages/boot/src/booters/repository.booter.ts index 9ec694f2a58c..35dc5f748e20 100644 --- a/packages/boot/src/booters/repository.booter.ts +++ b/packages/boot/src/booters/repository.booter.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {config, inject} from '@loopback/context'; -import {CoreBindings} from '@loopback/core'; +import {config, inject, CoreBindings} from '@loopback/core'; import {ApplicationWithRepositories} from '@loopback/repository'; import {BootBindings} from '../keys'; import {ArtifactOptions, booter} from '../types'; diff --git a/packages/boot/src/booters/service.booter.ts b/packages/boot/src/booters/service.booter.ts index bd0efb38b1ca..8dc2f626fb45 100644 --- a/packages/boot/src/booters/service.booter.ts +++ b/packages/boot/src/booters/service.booter.ts @@ -7,10 +7,10 @@ import { BINDING_METADATA_KEY, config, Constructor, + CoreBindings, inject, MetadataInspector, -} from '@loopback/context'; -import {CoreBindings} from '@loopback/core'; +} from '@loopback/core'; import {ApplicationWithServices} from '@loopback/service-proxy'; import debugFactory from 'debug'; import {BootBindings} from '../keys'; diff --git a/packages/boot/src/bootstrapper.ts b/packages/boot/src/bootstrapper.ts index 9d891534584c..a7e4baa22d69 100644 --- a/packages/boot/src/bootstrapper.ts +++ b/packages/boot/src/bootstrapper.ts @@ -3,8 +3,13 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, inject, resolveList} from '@loopback/context'; -import {Application, CoreBindings} from '@loopback/core'; +import { + Context, + inject, + resolveList, + Application, + CoreBindings, +} from '@loopback/core'; import debugModule from 'debug'; import {resolve} from 'path'; import {BootBindings, BootTags} from './keys'; diff --git a/packages/boot/src/keys.ts b/packages/boot/src/keys.ts index ab242c8cc64b..eb8e8ea6eed8 100644 --- a/packages/boot/src/keys.ts +++ b/packages/boot/src/keys.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingKey} from '@loopback/context'; +import {BindingKey} from '@loopback/core'; import {Bootstrapper} from './bootstrapper'; import {BootOptions} from './types'; diff --git a/packages/boot/src/mixins/boot.mixin.ts b/packages/boot/src/mixins/boot.mixin.ts index 5b410ed72b3e..5b671a1c839e 100644 --- a/packages/boot/src/mixins/boot.mixin.ts +++ b/packages/boot/src/mixins/boot.mixin.ts @@ -11,7 +11,7 @@ import { Constructor, Context, createBindingFromClass, -} from '@loopback/context'; +} from '@loopback/core'; import { Application, Component, @@ -26,7 +26,7 @@ import {Bootable, Booter, BootOptions, InstanceWithBooters} from '../types'; // FIXME(rfeng): Workaround for https://github.com/microsoft/rushstack/pull/1867 /* eslint-disable @typescript-eslint/no-unused-vars */ -import * as loopbackContext from '@loopback/context'; +import * as loopbackContext from '@loopback/core'; import * as loopbackCore from '@loopback/core'; /* eslint-enable @typescript-eslint/no-unused-vars */ diff --git a/packages/boot/src/types.ts b/packages/boot/src/types.ts index 73c0e6dc010a..c0643f4525aa 100644 --- a/packages/boot/src/types.ts +++ b/packages/boot/src/types.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {bind, Binding, BindingSpec, Constructor} from '@loopback/context'; +import {bind, Binding, BindingSpec, Constructor} from '@loopback/core'; import {BootTags} from './keys'; /** diff --git a/packages/boot/tsconfig.json b/packages/boot/tsconfig.json index 0be72dad5dd9..8c3eee450c18 100644 --- a/packages/boot/tsconfig.json +++ b/packages/boot/tsconfig.json @@ -11,9 +11,6 @@ "src/**/*.json" ], "references": [ - { - "path": "../context/tsconfig.json" - }, { "path": "../core/tsconfig.json" }, diff --git a/packages/cli/generators/app/templates/src/controllers/ping.controller.ts.ejs b/packages/cli/generators/app/templates/src/controllers/ping.controller.ts.ejs index 5e945cb4496e..f8be13b7d943 100644 --- a/packages/cli/generators/app/templates/src/controllers/ping.controller.ts.ejs +++ b/packages/cli/generators/app/templates/src/controllers/ping.controller.ts.ejs @@ -1,5 +1,5 @@ import {Request, RestBindings, get, ResponseObject} from '@loopback/rest'; -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; /** * OpenAPI response for ping() diff --git a/packages/cli/generators/app/templates/src/sequence.ts.ejs b/packages/cli/generators/app/templates/src/sequence.ts.ejs index e99e267a51e5..f564ebcfe84d 100644 --- a/packages/cli/generators/app/templates/src/sequence.ts.ejs +++ b/packages/cli/generators/app/templates/src/sequence.ts.ejs @@ -1,4 +1,4 @@ -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import { FindRoute, InvokeMethod, diff --git a/packages/cli/generators/controller/templates/src/controllers/controller-template.ts.ejs b/packages/cli/generators/controller/templates/src/controllers/controller-template.ts.ejs index 3875c5098741..4300d4a0381d 100644 --- a/packages/cli/generators/controller/templates/src/controllers/controller-template.ts.ejs +++ b/packages/cli/generators/controller/templates/src/controllers/controller-template.ts.ejs @@ -1,6 +1,6 @@ // Uncomment these imports to begin using these cool features! -// import {inject} from '@loopback/context'; +// import {inject} from '@loopback/core'; export class <%= className %>Controller { diff --git a/packages/cli/generators/interceptor/templates/interceptor-template.ts.ejs b/packages/cli/generators/interceptor/templates/interceptor-template.ts.ejs index 046d428dc263..670a9e342afd 100644 --- a/packages/cli/generators/interceptor/templates/interceptor-template.ts.ejs +++ b/packages/cli/generators/interceptor/templates/interceptor-template.ts.ejs @@ -10,7 +10,7 @@ import { InvocationResult, Provider, ValueOrPromise, -} from '@loopback/context'; +} from '@loopback/core'; /** * This class will be bound to the application as an `Interceptor` during diff --git a/packages/cli/generators/project/templates/package.json.ejs b/packages/cli/generators/project/templates/package.json.ejs index 795774189e9c..ffcc41d10f2e 100644 --- a/packages/cli/generators/project/templates/package.json.ejs +++ b/packages/cli/generators/project/templates/package.json.ejs @@ -73,9 +73,8 @@ ], "dependencies": { "@loopback/boot": "<%= project.dependencies['@loopback/boot'] -%>", - "@loopback/context": "<%= project.dependencies['@loopback/context'] -%>", -<% if (project.projectType === 'application') { -%> "@loopback/core": "<%= project.dependencies['@loopback/core'] -%>", +<% if (project.projectType === 'application') { -%> "@loopback/openapi-v3": "<%= project.dependencies['@loopback/openapi-v3'] -%>", <% if (project.repositories) { -%> "@loopback/repository": "<%= project.dependencies['@loopback/repository'] -%>", @@ -90,8 +89,6 @@ <% } else { -%> "@loopback/rest-explorer": "<%= project.dependencies['@loopback/rest-explorer'] -%>", <% } -%> -<% } else { /* NOT AN APPLICATION */-%> - "@loopback/core": "<%= project.dependencies['@loopback/core'] -%>", <% } -%> "tslib": "<%= project.dependencies['tslib'] -%>" }, diff --git a/packages/cli/generators/project/templates/package.plain.json.ejs b/packages/cli/generators/project/templates/package.plain.json.ejs index 5aa08b3ff644..062c6af1bdb9 100644 --- a/packages/cli/generators/project/templates/package.plain.json.ejs +++ b/packages/cli/generators/project/templates/package.plain.json.ejs @@ -73,9 +73,8 @@ ], "dependencies": { "@loopback/boot": "<%= project.dependencies['@loopback/boot'] -%>", - "@loopback/context": "<%= project.dependencies['@loopback/context'] -%>", -<% if (project.projectType === 'application') { -%> "@loopback/core": "<%= project.dependencies['@loopback/core'] -%>", +<% if (project.projectType === 'application') { -%> "@loopback/openapi-v3": "<%= project.dependencies['@loopback/openapi-v3'] -%>", "@loopback/repository": "<%= project.dependencies['@loopback/repository'] -%>", <% if (project.apiconnect) { -%> @@ -83,8 +82,6 @@ <% } -%> "@loopback/rest": "<%= project.dependencies['@loopback/rest'] -%>", "@loopback/rest-explorer": "<%= project.dependencies['@loopback/rest-explorer'] -%>", -<% } else { -%> - "@loopback/core": "<%= project.dependencies['@loopback/core'] -%>", <% } -%> "tslib": "<%= project.dependencies['tslib'] -%>" }, diff --git a/packages/cli/snapshots/integration/generators/app.integration.snapshots.js b/packages/cli/snapshots/integration/generators/app.integration.snapshots.js index 8ac6114f8988..d166eb2920da 100644 --- a/packages/cli/snapshots/integration/generators/app.integration.snapshots.js +++ b/packages/cli/snapshots/integration/generators/app.integration.snapshots.js @@ -102,7 +102,7 @@ if (require.main === module) { exports[`app-generator specific files generates all the proper files 3`] = ` import {Request, RestBindings, get, ResponseObject} from '@loopback/rest'; -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; /** * OpenAPI response for ping() diff --git a/packages/cli/snapshots/integration/generators/controller.integration.snapshots.js b/packages/cli/snapshots/integration/generators/controller.integration.snapshots.js index 50fa55c1ffad..aff32ffcc106 100644 --- a/packages/cli/snapshots/integration/generators/controller.integration.snapshots.js +++ b/packages/cli/snapshots/integration/generators/controller.integration.snapshots.js @@ -366,7 +366,7 @@ export class ProductReviewController { exports[`lb4 controller basic controller scaffolds correct file with args 1`] = ` // Uncomment these imports to begin using these cool features! -// import {inject} from '@loopback/context'; +// import {inject} from '@loopback/core'; export class ProductReviewController { @@ -379,7 +379,7 @@ export class ProductReviewController { exports[`lb4 controller basic controller scaffolds correct file with input 1`] = ` // Uncomment these imports to begin using these cool features! -// import {inject} from '@loopback/context'; +// import {inject} from '@loopback/core'; export class ProductReviewController { diff --git a/packages/cli/snapshots/integration/generators/interceptor.integration.snapshots.js b/packages/cli/snapshots/integration/generators/interceptor.integration.snapshots.js index 634c697be479..1230df110d43 100644 --- a/packages/cli/snapshots/integration/generators/interceptor.integration.snapshots.js +++ b/packages/cli/snapshots/integration/generators/interceptor.integration.snapshots.js @@ -16,7 +16,7 @@ import { InvocationResult, Provider, ValueOrPromise, -} from '@loopback/context'; +} from '@loopback/core'; /** * This class will be bound to the application as an \`Interceptor\` during @@ -77,7 +77,7 @@ import { InvocationResult, Provider, ValueOrPromise, -} from '@loopback/context'; +} from '@loopback/core'; /** * This class will be bound to the application as an \`Interceptor\` during @@ -138,7 +138,7 @@ import { InvocationResult, Provider, ValueOrPromise, -} from '@loopback/context'; +} from '@loopback/core'; /** * This class will be bound to the application as an \`Interceptor\` during @@ -199,7 +199,7 @@ import { InvocationResult, Provider, ValueOrPromise, -} from '@loopback/context'; +} from '@loopback/core'; /** * This class will be bound to the application as an \`Interceptor\` during @@ -262,7 +262,7 @@ import { InvocationResult, Provider, ValueOrPromise, -} from '@loopback/context'; +} from '@loopback/core'; /** * This class will be bound to the application as an \`Interceptor\` during diff --git a/packages/cli/test/integration/lib/project-generator.js b/packages/cli/test/integration/lib/project-generator.js index 00197a7e4453..0e42590bc946 100644 --- a/packages/cli/test/integration/lib/project-generator.js +++ b/packages/cli/test/integration/lib/project-generator.js @@ -277,10 +277,6 @@ module.exports = function (projGenerator, props, projectType) { 'package.json', `"@loopback/core": "${deps['@loopback/core']}"`, ); - assert.fileContent( - 'package.json', - `"@loopback/context": "${deps['@loopback/context']}"`, - ); assert.fileContent( 'package.json', `"@loopback/rest": "${deps['@loopback/rest']}"`, @@ -301,10 +297,6 @@ module.exports = function (projGenerator, props, projectType) { 'package.json', `"@loopback/core": "${deps['@loopback/core']}"`, ); - assert.fileContent( - 'package.json', - `"@loopback/context": "${deps['@loopback/context']}"`, - ); assert.noFileContent('package.json', '"@loopback/rest"'); assert.noFileContent('package.json', '"@loopback/openapi-v3"'); assert.noJsonFileContent('package.json', { @@ -340,10 +332,6 @@ module.exports = function (projGenerator, props, projectType) { 'package.json', `"@loopback/core": "${deps['@loopback/core']}"`, ); - assert.fileContent( - 'package.json', - `"@loopback/context": "${deps['@loopback/context']}"`, - ); assert.fileContent('package.json', `"rimraf": "${deps['rimraf']}"`); assert.noFileContent([ ['package.json', '@loopback/build'], diff --git a/packages/express/package.json b/packages/express/package.json index 2e8aaf9a1520..1152a93209ec 100644 --- a/packages/express/package.json +++ b/packages/express/package.json @@ -37,7 +37,6 @@ "!*/__tests__" ], "dependencies": { - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/http-server": "^2.1.6", "@types/body-parser": "^1.19.0", diff --git a/packages/express/src/__tests__/acceptance/middleware-interceptor.acceptance.ts b/packages/express/src/__tests__/acceptance/middleware-interceptor.acceptance.ts index 538d3f42bb30..b6799b06824b 100644 --- a/packages/express/src/__tests__/acceptance/middleware-interceptor.acceptance.ts +++ b/packages/express/src/__tests__/acceptance/middleware-interceptor.acceptance.ts @@ -10,9 +10,9 @@ import { ContextView, createBindingFromClass, Interceptor, + InterceptorOrKey, Provider, -} from '@loopback/context'; -import {InterceptorOrKey} from '@loopback/core'; +} from '@loopback/core'; import {expect} from '@loopback/testlab'; import { createInterceptor, diff --git a/packages/express/src/__tests__/acceptance/test-helpers.ts b/packages/express/src/__tests__/acceptance/test-helpers.ts index a4d8ea666ff1..54ba1fea9e60 100644 --- a/packages/express/src/__tests__/acceptance/test-helpers.ts +++ b/packages/express/src/__tests__/acceptance/test-helpers.ts @@ -8,7 +8,7 @@ import { createProxyWithInterceptors, intercept, InterceptorOrKey, -} from '@loopback/context'; +} from '@loopback/core'; import {Client, givenHttpServerConfig, supertest} from '@loopback/testlab'; import bodyParser from 'body-parser'; import {ExpressApplication} from '../../express.application'; diff --git a/packages/express/src/keys.ts b/packages/express/src/keys.ts index 518bf9dbb317..139b94140841 100644 --- a/packages/express/src/keys.ts +++ b/packages/express/src/keys.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingKey} from '@loopback/context'; +import {BindingKey} from '@loopback/core'; import {MiddlewareContext} from './types'; export namespace MiddlewareBindings { diff --git a/packages/express/src/middleware-registry.ts b/packages/express/src/middleware-registry.ts index 9547da0f8b11..adc521151704 100644 --- a/packages/express/src/middleware-registry.ts +++ b/packages/express/src/middleware-registry.ts @@ -20,7 +20,7 @@ import { // FIXME(rfeng): Workaround for https://github.com/microsoft/rushstack/pull/1867 /* eslint-disable @typescript-eslint/no-unused-vars */ -import * as loopbackContext from '@loopback/context'; +import * as loopbackContext from '@loopback/core'; /* eslint-enable @typescript-eslint/no-unused-vars */ /** diff --git a/packages/express/src/middleware.ts b/packages/express/src/middleware.ts index 4bad064e0f17..2865b8707e27 100644 --- a/packages/express/src/middleware.ts +++ b/packages/express/src/middleware.ts @@ -12,13 +12,14 @@ import { Constructor, Context, createBindingFromClass, + extensionFilter, + extensionFor, InvocationResult, isProviderClass, Provider, transformValueOrPromise, ValueOrPromise, -} from '@loopback/context'; -import {extensionFilter, extensionFor} from '@loopback/core'; +} from '@loopback/core'; import debugFactory from 'debug'; import {DEFAULT_MIDDLEWARE_GROUP, MIDDLEWARE_NAMESPACE} from './keys'; import { diff --git a/packages/express/src/mixins/middleware.mixin.ts b/packages/express/src/mixins/middleware.mixin.ts index 66120381f651..256461b64cfe 100644 --- a/packages/express/src/mixins/middleware.mixin.ts +++ b/packages/express/src/mixins/middleware.mixin.ts @@ -27,7 +27,7 @@ import { // FIXME(rfeng): Workaround for https://github.com/microsoft/rushstack/pull/1867 /* eslint-disable @typescript-eslint/no-unused-vars */ -import * as loopbackContext from '@loopback/context'; +import * as loopbackContext from '@loopback/core'; /* eslint-enable @typescript-eslint/no-unused-vars */ function extendsFrom( diff --git a/packages/express/tsconfig.json b/packages/express/tsconfig.json index d20b12c3793a..50d0e4a12ff6 100644 --- a/packages/express/tsconfig.json +++ b/packages/express/tsconfig.json @@ -10,9 +10,6 @@ "src" ], "references": [ - { - "path": "../context/tsconfig.json" - }, { "path": "../core/tsconfig.json" }, diff --git a/packages/repository-json-schema/package.json b/packages/repository-json-schema/package.json index 01dd2a407d44..bc355534e2be 100644 --- a/packages/repository-json-schema/package.json +++ b/packages/repository-json-schema/package.json @@ -26,8 +26,7 @@ "JSON Schema" ], "dependencies": { - "@loopback/context": "^3.8.2", - "@loopback/metadata": "^2.1.6", + "@loopback/core": "^2.7.1", "@loopback/repository": "^2.6.0", "@types/json-schema": "^7.0.4", "debug": "^4.1.1", diff --git a/packages/repository-json-schema/src/__tests__/integration/build-schema.integration.ts b/packages/repository-json-schema/src/__tests__/integration/build-schema.integration.ts index de54e31e2abe..64d6e727d78f 100644 --- a/packages/repository-json-schema/src/__tests__/integration/build-schema.integration.ts +++ b/packages/repository-json-schema/src/__tests__/integration/build-schema.integration.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {MetadataInspector} from '@loopback/context'; +import {MetadataInspector} from '@loopback/core'; import { belongsTo, Entity, diff --git a/packages/repository-json-schema/src/build-schema.ts b/packages/repository-json-schema/src/build-schema.ts index a45cd2c6a4a2..3780276315e0 100644 --- a/packages/repository-json-schema/src/build-schema.ts +++ b/packages/repository-json-schema/src/build-schema.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {MetadataInspector} from '@loopback/context'; +import {MetadataInspector} from '@loopback/core'; import { isBuiltinType, ModelDefinition, diff --git a/packages/repository-json-schema/src/keys.ts b/packages/repository-json-schema/src/keys.ts index fd33ef60bf60..5405c440d3c3 100644 --- a/packages/repository-json-schema/src/keys.ts +++ b/packages/repository-json-schema/src/keys.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {MetadataAccessor} from '@loopback/metadata'; +import {MetadataAccessor} from '@loopback/core'; import {JsonSchema} from './index'; /** diff --git a/packages/repository-json-schema/tsconfig.json b/packages/repository-json-schema/tsconfig.json index 4dd8a495bcec..f1781a9fa1e6 100644 --- a/packages/repository-json-schema/tsconfig.json +++ b/packages/repository-json-schema/tsconfig.json @@ -11,10 +11,7 @@ ], "references": [ { - "path": "../context/tsconfig.json" - }, - { - "path": "../metadata/tsconfig.json" + "path": "../core/tsconfig.json" }, { "path": "../repository/tsconfig.json" diff --git a/packages/repository-tests/package.json b/packages/repository-tests/package.json index 3d33740f66d6..d742d22772e5 100644 --- a/packages/repository-tests/package.json +++ b/packages/repository-tests/package.json @@ -29,7 +29,7 @@ "lodash": "^4.17.15" }, "dependencies": { - "@loopback/context": "^3.8.2", + "@loopback/core": "^2.7.1", "@loopback/testlab": "^3.1.6", "@types/debug": "^4.1.5", "debug": "^4.1.1", diff --git a/packages/repository-tests/src/crud/relations/fixtures/repositories/address.repository.ts b/packages/repository-tests/src/crud/relations/fixtures/repositories/address.repository.ts index 18967dcb7fb2..c8aafad8fcb6 100644 --- a/packages/repository-tests/src/crud/relations/fixtures/repositories/address.repository.ts +++ b/packages/repository-tests/src/crud/relations/fixtures/repositories/address.repository.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Getter} from '@loopback/context'; +import {Getter} from '@loopback/core'; import { BelongsToAccessor, juggler, diff --git a/packages/repository-tests/src/crud/relations/fixtures/repositories/customer.repository.ts b/packages/repository-tests/src/crud/relations/fixtures/repositories/customer.repository.ts index 73ae6b51ebcc..c647d52dfefc 100644 --- a/packages/repository-tests/src/crud/relations/fixtures/repositories/customer.repository.ts +++ b/packages/repository-tests/src/crud/relations/fixtures/repositories/customer.repository.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Getter} from '@loopback/context'; +import {Getter} from '@loopback/core'; import { BelongsToAccessor, HasManyRepositoryFactory, diff --git a/packages/repository-tests/src/crud/relations/fixtures/repositories/order.repository.ts b/packages/repository-tests/src/crud/relations/fixtures/repositories/order.repository.ts index 5dbeca4e5605..e93c6f756d32 100644 --- a/packages/repository-tests/src/crud/relations/fixtures/repositories/order.repository.ts +++ b/packages/repository-tests/src/crud/relations/fixtures/repositories/order.repository.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Getter} from '@loopback/context'; +import {Getter} from '@loopback/core'; import { BelongsToAccessor, juggler, diff --git a/packages/repository-tests/src/crud/relations/fixtures/repositories/shipment.repository.ts b/packages/repository-tests/src/crud/relations/fixtures/repositories/shipment.repository.ts index 886439c9d0ba..fce7a98c8279 100644 --- a/packages/repository-tests/src/crud/relations/fixtures/repositories/shipment.repository.ts +++ b/packages/repository-tests/src/crud/relations/fixtures/repositories/shipment.repository.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Getter} from '@loopback/context'; +import {Getter} from '@loopback/core'; import { HasManyRepositoryFactory, juggler, diff --git a/packages/repository-tests/tsconfig.json b/packages/repository-tests/tsconfig.json index 837fe0f29315..f1781a9fa1e6 100644 --- a/packages/repository-tests/tsconfig.json +++ b/packages/repository-tests/tsconfig.json @@ -11,7 +11,7 @@ ], "references": [ { - "path": "../context/tsconfig.json" + "path": "../core/tsconfig.json" }, { "path": "../repository/tsconfig.json" diff --git a/packages/repository/examples/juggler-bridge/note-with-repo-class.ts b/packages/repository/examples/juggler-bridge/note-with-repo-class.ts index 9481830046d0..6a51056e8326 100644 --- a/packages/repository/examples/juggler-bridge/note-with-repo-class.ts +++ b/packages/repository/examples/juggler-bridge/note-with-repo-class.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, inject} from '@loopback/context'; +import {Context, inject} from '@loopback/core'; import { repository, diff --git a/packages/repository/examples/juggler-bridge/note-with-repo-instance.ts b/packages/repository/examples/juggler-bridge/note-with-repo-instance.ts index 6701909eb2bf..0144b879697a 100644 --- a/packages/repository/examples/juggler-bridge/note-with-repo-instance.ts +++ b/packages/repository/examples/juggler-bridge/note-with-repo-instance.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context} from '@loopback/context'; +import {Context} from '@loopback/core'; import { juggler, diff --git a/packages/repository/package.json b/packages/repository/package.json index 1fbf71464a71..4a5dd209116b 100644 --- a/packages/repository/package.json +++ b/packages/repository/package.json @@ -32,7 +32,6 @@ "bson": "4.0.4" }, "dependencies": { - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@types/debug": "^4.1.5", "debug": "^4.1.1", diff --git a/packages/repository/src/__tests__/unit/decorator/metadata.unit.ts b/packages/repository/src/__tests__/unit/decorator/metadata.unit.ts index b1d35dfae654..9db97097e667 100644 --- a/packages/repository/src/__tests__/unit/decorator/metadata.unit.ts +++ b/packages/repository/src/__tests__/unit/decorator/metadata.unit.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {MetadataInspector} from '@loopback/context'; +import {MetadataInspector} from '@loopback/core'; import {expect} from '@loopback/testlab'; import { model, diff --git a/packages/repository/src/__tests__/unit/decorator/model-and-relation.decorator.unit.ts b/packages/repository/src/__tests__/unit/decorator/model-and-relation.decorator.unit.ts index 19d3b307c97b..1cc647a59e10 100644 --- a/packages/repository/src/__tests__/unit/decorator/model-and-relation.decorator.unit.ts +++ b/packages/repository/src/__tests__/unit/decorator/model-and-relation.decorator.unit.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {MetadataInspector} from '@loopback/context'; +import {MetadataInspector} from '@loopback/core'; import {expect} from '@loopback/testlab'; import {RelationMetadata} from '../../..'; import { diff --git a/packages/repository/src/__tests__/unit/decorator/relation.decorator.unit.ts b/packages/repository/src/__tests__/unit/decorator/relation.decorator.unit.ts index b35e98a65d9c..8774c3ed0224 100644 --- a/packages/repository/src/__tests__/unit/decorator/relation.decorator.unit.ts +++ b/packages/repository/src/__tests__/unit/decorator/relation.decorator.unit.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {MetadataInspector} from '@loopback/context'; +import {MetadataInspector} from '@loopback/core'; import {expect} from '@loopback/testlab'; import { belongsTo, diff --git a/packages/repository/src/__tests__/unit/decorator/repository-with-di.decorator.unit.ts b/packages/repository/src/__tests__/unit/decorator/repository-with-di.decorator.unit.ts index 84ab8deed712..109485367895 100644 --- a/packages/repository/src/__tests__/unit/decorator/repository-with-di.decorator.unit.ts +++ b/packages/repository/src/__tests__/unit/decorator/repository-with-di.decorator.unit.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, inject} from '@loopback/context'; +import {Context, inject} from '@loopback/core'; import {expect} from '@loopback/testlab'; import { DefaultCrudRepository, diff --git a/packages/repository/src/__tests__/unit/decorator/repository-with-value-provider.decorator.unit.ts b/packages/repository/src/__tests__/unit/decorator/repository-with-value-provider.decorator.unit.ts index 1fcfc27fef9f..6bdf57f45e23 100644 --- a/packages/repository/src/__tests__/unit/decorator/repository-with-value-provider.decorator.unit.ts +++ b/packages/repository/src/__tests__/unit/decorator/repository-with-value-provider.decorator.unit.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, inject, Provider, ValueOrPromise} from '@loopback/context'; +import {Context, inject, Provider, ValueOrPromise} from '@loopback/core'; import {expect} from '@loopback/testlab'; import { DefaultCrudRepository, diff --git a/packages/repository/src/__tests__/unit/decorator/repository.decorator.unit.ts b/packages/repository/src/__tests__/unit/decorator/repository.decorator.unit.ts index 5d686772dac4..8b9d015d3214 100644 --- a/packages/repository/src/__tests__/unit/decorator/repository.decorator.unit.ts +++ b/packages/repository/src/__tests__/unit/decorator/repository.decorator.unit.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, Getter} from '@loopback/context'; +import {Context, Getter} from '@loopback/core'; import {expect} from '@loopback/testlab'; import { DefaultCrudRepository, diff --git a/packages/repository/src/__tests__/unit/mixins/model.mixin.unit.ts b/packages/repository/src/__tests__/unit/mixins/model.mixin.unit.ts index 4b51d212b6ca..5b7bad8cbd98 100644 --- a/packages/repository/src/__tests__/unit/mixins/model.mixin.unit.ts +++ b/packages/repository/src/__tests__/unit/mixins/model.mixin.unit.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {MetadataInspector, MetadataMap} from '@loopback/context'; +import {MetadataInspector, MetadataMap} from '@loopback/core'; import {expect} from '@loopback/testlab'; import {MODEL_PROPERTIES_KEY} from '../../../'; import {Note} from '../../fixtures/models/note.model'; diff --git a/packages/repository/src/__tests__/unit/repositories/has-many-repository-factory.unit.ts b/packages/repository/src/__tests__/unit/repositories/has-many-repository-factory.unit.ts index 7a42463b22c0..3ec5999b6c37 100644 --- a/packages/repository/src/__tests__/unit/repositories/has-many-repository-factory.unit.ts +++ b/packages/repository/src/__tests__/unit/repositories/has-many-repository-factory.unit.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Getter} from '@loopback/context'; +import {Getter} from '@loopback/core'; import {createStubInstance, expect} from '@loopback/testlab'; import { createHasManyRepositoryFactory, diff --git a/packages/repository/src/__tests__/unit/repositories/has-one-repository-factory.unit.ts b/packages/repository/src/__tests__/unit/repositories/has-one-repository-factory.unit.ts index fd4ec317b537..35035505ce2e 100644 --- a/packages/repository/src/__tests__/unit/repositories/has-one-repository-factory.unit.ts +++ b/packages/repository/src/__tests__/unit/repositories/has-one-repository-factory.unit.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Getter} from '@loopback/context'; +import {Getter} from '@loopback/core'; import {createStubInstance, expect} from '@loopback/testlab'; import { createHasOneRepositoryFactory, diff --git a/packages/repository/src/__tests__/unit/repositories/relation.repository.unit.ts b/packages/repository/src/__tests__/unit/repositories/relation.repository.unit.ts index a59d024dc615..a6a679656936 100644 --- a/packages/repository/src/__tests__/unit/repositories/relation.repository.unit.ts +++ b/packages/repository/src/__tests__/unit/repositories/relation.repository.unit.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Getter} from '@loopback/context'; +import {Getter} from '@loopback/core'; import { createStubInstance, expect, diff --git a/packages/repository/src/decorators/metadata.ts b/packages/repository/src/decorators/metadata.ts index c762d84e7114..c85add58a9ae 100644 --- a/packages/repository/src/decorators/metadata.ts +++ b/packages/repository/src/decorators/metadata.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {InspectionOptions, MetadataInspector} from '@loopback/context'; +import {InspectionOptions, MetadataInspector} from '@loopback/core'; import {ModelDefinition, RelationDefinitionMap} from '../model'; import {RELATIONS_KEY} from '../relations'; import { diff --git a/packages/repository/src/decorators/model.decorator.ts b/packages/repository/src/decorators/model.decorator.ts index 7261103592f8..4b78b9dae36c 100644 --- a/packages/repository/src/decorators/model.decorator.ts +++ b/packages/repository/src/decorators/model.decorator.ts @@ -9,7 +9,7 @@ import { MetadataInspector, MetadataMap, PropertyDecoratorFactory, -} from '@loopback/context'; +} from '@loopback/core'; import { ModelDefinition, ModelDefinitionSyntax, diff --git a/packages/repository/src/decorators/repository.decorator.ts b/packages/repository/src/decorators/repository.decorator.ts index 406a86b6120e..f06a542caff1 100644 --- a/packages/repository/src/decorators/repository.decorator.ts +++ b/packages/repository/src/decorators/repository.decorator.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, inject, Injection} from '@loopback/context'; +import {Context, inject, Injection} from '@loopback/core'; import assert from 'assert'; import {Class} from '../common-types'; import {DataSource} from '../datasource'; diff --git a/packages/repository/src/mixins/repository.mixin.ts b/packages/repository/src/mixins/repository.mixin.ts index 0472bc79d9c0..302e344bb53c 100644 --- a/packages/repository/src/mixins/repository.mixin.ts +++ b/packages/repository/src/mixins/repository.mixin.ts @@ -8,7 +8,7 @@ import { BindingFromClassOptions, BindingScope, createBindingFromClass, -} from '@loopback/context'; +} from '@loopback/core'; import { Application, Component, @@ -27,7 +27,7 @@ const debug = debugFactory('loopback:repository:mixin'); // FIXME(rfeng): Workaround for https://github.com/microsoft/rushstack/pull/1867 /* eslint-disable @typescript-eslint/no-unused-vars */ -import * as loopbackContext from '@loopback/context'; +import * as loopbackContext from '@loopback/core'; import * as loopbackCore from '@loopback/core'; /* eslint-enable @typescript-eslint/no-unused-vars */ diff --git a/packages/repository/src/relations/belongs-to/belongs-to.decorator.ts b/packages/repository/src/relations/belongs-to/belongs-to.decorator.ts index 9dcace9e17d1..8594a63cb98c 100644 --- a/packages/repository/src/relations/belongs-to/belongs-to.decorator.ts +++ b/packages/repository/src/relations/belongs-to/belongs-to.decorator.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {MetadataInspector} from '@loopback/context'; +import {MetadataInspector} from '@loopback/core'; import {property} from '../../decorators/model.decorator'; import {Entity, EntityResolver, PropertyDefinition} from '../../model'; import {relation} from '../relation.decorator'; diff --git a/packages/repository/src/relations/belongs-to/belongs-to.repository.ts b/packages/repository/src/relations/belongs-to/belongs-to.repository.ts index 29b934f9fe7b..3ac621b6a998 100644 --- a/packages/repository/src/relations/belongs-to/belongs-to.repository.ts +++ b/packages/repository/src/relations/belongs-to/belongs-to.repository.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Getter} from '@loopback/context'; +import {Getter} from '@loopback/core'; import {DataObject, Options} from '../../common-types'; import {EntityNotFoundError} from '../../errors'; import {Entity} from '../../model'; diff --git a/packages/repository/src/relations/has-many/has-many.repository.ts b/packages/repository/src/relations/has-many/has-many.repository.ts index 8d1609a4f51e..a36e4e110217 100644 --- a/packages/repository/src/relations/has-many/has-many.repository.ts +++ b/packages/repository/src/relations/has-many/has-many.repository.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Getter} from '@loopback/context'; +import {Getter} from '@loopback/core'; import {Count, DataObject, Options} from '../../common-types'; import {Entity} from '../../model'; import {Filter, Where} from '../../query'; diff --git a/packages/repository/src/relations/has-one/has-one.repository.ts b/packages/repository/src/relations/has-one/has-one.repository.ts index 7589cda4df53..1d05f95f5b53 100644 --- a/packages/repository/src/relations/has-one/has-one.repository.ts +++ b/packages/repository/src/relations/has-one/has-one.repository.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Getter} from '@loopback/context'; +import {Getter} from '@loopback/core'; import {Count, DataObject, Options} from '../../common-types'; import {EntityNotFoundError} from '../../errors'; import {Entity} from '../../model'; diff --git a/packages/repository/src/relations/relation.decorator.ts b/packages/repository/src/relations/relation.decorator.ts index 6efc114cb485..43229b9f207c 100644 --- a/packages/repository/src/relations/relation.decorator.ts +++ b/packages/repository/src/relations/relation.decorator.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {PropertyDecoratorFactory} from '@loopback/context'; +import {PropertyDecoratorFactory} from '@loopback/core'; import {buildModelDefinition} from '../decorators'; import {Model, RelationDefinitionMap} from '../model'; import {RelationType} from './relation.types'; diff --git a/packages/repository/src/relations/relation.types.ts b/packages/repository/src/relations/relation.types.ts index a1ec4232911b..00658b609e28 100644 --- a/packages/repository/src/relations/relation.types.ts +++ b/packages/repository/src/relations/relation.types.ts @@ -155,7 +155,7 @@ export type RelationMetadata = | RelationDefinitionBase; // Re-export Getter so that users don't have to import from @loopback/context -export {Getter} from '@loopback/context'; +export {Getter} from '@loopback/core'; /** * @returns An array of resolved values, the items must be ordered in the same diff --git a/packages/repository/src/repositories/legacy-juggler-bridge.ts b/packages/repository/src/repositories/legacy-juggler-bridge.ts index dec68f72d511..1daa56b6910f 100644 --- a/packages/repository/src/repositories/legacy-juggler-bridge.ts +++ b/packages/repository/src/repositories/legacy-juggler-bridge.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Getter} from '@loopback/context'; +import {Getter} from '@loopback/core'; import assert from 'assert'; import legacy from 'loopback-datasource-juggler'; import { diff --git a/packages/repository/tsconfig.json b/packages/repository/tsconfig.json index f22cfe9f58d2..134a68e33164 100644 --- a/packages/repository/tsconfig.json +++ b/packages/repository/tsconfig.json @@ -10,9 +10,6 @@ "src" ], "references": [ - { - "path": "../context/tsconfig.json" - }, { "path": "../core/tsconfig.json" }, diff --git a/packages/rest-explorer/package.json b/packages/rest-explorer/package.json index a4f55c0bd674..281fb4a16c07 100644 --- a/packages/rest-explorer/package.json +++ b/packages/rest-explorer/package.json @@ -21,7 +21,6 @@ "access": "public" }, "dependencies": { - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/rest": "^5.1.0", "ejs": "^3.1.3", diff --git a/packages/rest-explorer/src/rest-explorer.component.ts b/packages/rest-explorer/src/rest-explorer.component.ts index 422c0043b837..94e06eb63a5c 100644 --- a/packages/rest-explorer/src/rest-explorer.component.ts +++ b/packages/rest-explorer/src/rest-explorer.component.ts @@ -3,9 +3,15 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import {bind, config, ContextTags, inject} from '@loopback/context'; -import {Component, CoreBindings} from '@loopback/core'; +import { + bind, + Component, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + config, + ContextTags, + CoreBindings, + inject, +} from '@loopback/core'; import {createControllerFactoryForClass, RestApplication} from '@loopback/rest'; import {ExplorerController} from './rest-explorer.controller'; import {RestExplorerBindings} from './rest-explorer.keys'; diff --git a/packages/rest-explorer/src/rest-explorer.controller.ts b/packages/rest-explorer/src/rest-explorer.controller.ts index c005b8ebd3fd..546395d89ed9 100644 --- a/packages/rest-explorer/src/rest-explorer.controller.ts +++ b/packages/rest-explorer/src/rest-explorer.controller.ts @@ -4,7 +4,7 @@ // License text available at https://opensource.org/licenses/MIT // eslint-disable-next-line @typescript-eslint/no-unused-vars -import {config, inject} from '@loopback/context'; +import {config, inject} from '@loopback/core'; import { OpenApiSpecForm, RequestContext, diff --git a/packages/rest-explorer/src/rest-explorer.keys.ts b/packages/rest-explorer/src/rest-explorer.keys.ts index c41306a9183f..f05d7662f0c8 100644 --- a/packages/rest-explorer/src/rest-explorer.keys.ts +++ b/packages/rest-explorer/src/rest-explorer.keys.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingAddress, BindingKey} from '@loopback/context'; +import {BindingAddress, BindingKey} from '@loopback/core'; import {RestExplorerComponent} from './rest-explorer.component'; import {RestExplorerConfig} from './rest-explorer.types'; diff --git a/packages/rest-explorer/tsconfig.json b/packages/rest-explorer/tsconfig.json index d4095d8c61d4..44a90721d916 100644 --- a/packages/rest-explorer/tsconfig.json +++ b/packages/rest-explorer/tsconfig.json @@ -10,9 +10,6 @@ "src" ], "references": [ - { - "path": "../context/tsconfig.json" - }, { "path": "../core/tsconfig.json" }, diff --git a/packages/rest/package.json b/packages/rest/package.json index 7421a433b74f..062f04c5201a 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -24,7 +24,6 @@ "access": "public" }, "dependencies": { - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "@loopback/express": "^1.2.2", "@loopback/http-server": "^2.1.6", diff --git a/packages/rest/src/__tests__/acceptance/caching-interceptor/caching-interceptor.acceptance.ts b/packages/rest/src/__tests__/acceptance/caching-interceptor/caching-interceptor.acceptance.ts index 9477ed0755aa..3f0d78717821 100644 --- a/packages/rest/src/__tests__/acceptance/caching-interceptor/caching-interceptor.acceptance.ts +++ b/packages/rest/src/__tests__/acceptance/caching-interceptor/caching-interceptor.acceptance.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {intercept} from '@loopback/context'; +import {intercept} from '@loopback/core'; import {get, param} from '@loopback/openapi-v3'; import { Client, diff --git a/packages/rest/src/__tests__/acceptance/caching-interceptor/caching-interceptor.ts b/packages/rest/src/__tests__/acceptance/caching-interceptor/caching-interceptor.ts index c9fdcc715c88..1429b0d8b4dd 100644 --- a/packages/rest/src/__tests__/acceptance/caching-interceptor/caching-interceptor.ts +++ b/packages/rest/src/__tests__/acceptance/caching-interceptor/caching-interceptor.ts @@ -9,7 +9,7 @@ import { InvocationContext, Provider, ValueOrPromise, -} from '@loopback/context'; +} from '@loopback/core'; import {Request, RestBindings, RouteSource} from '../../..'; /** diff --git a/packages/rest/src/__tests__/acceptance/caching-interceptor/global-caching-interceptor.acceptance.ts b/packages/rest/src/__tests__/acceptance/caching-interceptor/global-caching-interceptor.acceptance.ts index 9d45886fcc4d..5e7012cd033e 100644 --- a/packages/rest/src/__tests__/acceptance/caching-interceptor/global-caching-interceptor.acceptance.ts +++ b/packages/rest/src/__tests__/acceptance/caching-interceptor/global-caching-interceptor.acceptance.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {asGlobalInterceptor} from '@loopback/context'; +import {asGlobalInterceptor} from '@loopback/core'; import {anOperationSpec} from '@loopback/openapi-spec-builder'; import {get, param} from '@loopback/openapi-v3'; import { diff --git a/packages/rest/src/__tests__/acceptance/file-upload/file-upload.acceptance.ts b/packages/rest/src/__tests__/acceptance/file-upload/file-upload.acceptance.ts index fbee0e611657..3914f709d58a 100644 --- a/packages/rest/src/__tests__/acceptance/file-upload/file-upload.acceptance.ts +++ b/packages/rest/src/__tests__/acceptance/file-upload/file-upload.acceptance.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import { Client, createRestAppClient, diff --git a/packages/rest/src/__tests__/acceptance/middleware/test-helpers.ts b/packages/rest/src/__tests__/acceptance/middleware/test-helpers.ts index 7e505ad73386..45cd8a644b6c 100644 --- a/packages/rest/src/__tests__/acceptance/middleware/test-helpers.ts +++ b/packages/rest/src/__tests__/acceptance/middleware/test-helpers.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Binding, intercept, InterceptorOrKey} from '@loopback/context'; +import {Binding, intercept, InterceptorOrKey} from '@loopback/core'; import {post, requestBody} from '@loopback/openapi-v3'; import { Client, diff --git a/packages/rest/src/__tests__/acceptance/routing/routing.acceptance.ts b/packages/rest/src/__tests__/acceptance/routing/routing.acceptance.ts index 02a1c90406be..5f93d3bb146b 100644 --- a/packages/rest/src/__tests__/acceptance/routing/routing.acceptance.ts +++ b/packages/rest/src/__tests__/acceptance/routing/routing.acceptance.ts @@ -3,8 +3,14 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingScope, Constructor, Context, inject} from '@loopback/context'; -import {Application, CoreBindings} from '@loopback/core'; +import { + BindingScope, + Constructor, + Context, + inject, + Application, + CoreBindings, +} from '@loopback/core'; import {anOpenApiSpec, anOperationSpec} from '@loopback/openapi-spec-builder'; import { api, diff --git a/packages/rest/src/__tests__/acceptance/sequence/sequence.acceptance.ts b/packages/rest/src/__tests__/acceptance/sequence/sequence.acceptance.ts index f9546d529488..b4fd71f577b8 100644 --- a/packages/rest/src/__tests__/acceptance/sequence/sequence.acceptance.ts +++ b/packages/rest/src/__tests__/acceptance/sequence/sequence.acceptance.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; -import {Application} from '@loopback/core'; +import {inject, Application} from '@loopback/core'; import {anOpenApiSpec} from '@loopback/openapi-spec-builder'; import {api} from '@loopback/openapi-v3'; import {Client, createClientForHandler} from '@loopback/testlab'; diff --git a/packages/rest/src/__tests__/integration/http-handler.integration.ts b/packages/rest/src/__tests__/integration/http-handler.integration.ts index fec3636d1406..644672a26539 100644 --- a/packages/rest/src/__tests__/integration/http-handler.integration.ts +++ b/packages/rest/src/__tests__/integration/http-handler.integration.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context} from '@loopback/context'; +import {Context} from '@loopback/core'; import {anOpenApiSpec, anOperationSpec} from '@loopback/openapi-spec-builder'; import { ControllerSpec, diff --git a/packages/rest/src/__tests__/unit/rest.component.unit.ts b/packages/rest/src/__tests__/unit/rest.component.unit.ts index 3f2fd4c5f424..8cf279e2944f 100644 --- a/packages/rest/src/__tests__/unit/rest.component.unit.ts +++ b/packages/rest/src/__tests__/unit/rest.component.unit.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BoundValue, Context, inject, Provider} from '@loopback/context'; +import {BoundValue, Context, inject, Provider} from '@loopback/core'; import { Application, Component, diff --git a/packages/rest/src/__tests__/unit/rest.server/rest.server.unit.ts b/packages/rest/src/__tests__/unit/rest.server/rest.server.unit.ts index bde5f3e3691e..9538d279f76f 100644 --- a/packages/rest/src/__tests__/unit/rest.server/rest.server.unit.ts +++ b/packages/rest/src/__tests__/unit/rest.server/rest.server.unit.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context} from '@loopback/context'; -import {Application} from '@loopback/core'; +import {Context, Application} from '@loopback/core'; import {anOperationSpec} from '@loopback/openapi-spec-builder'; import {expect} from '@loopback/testlab'; import { diff --git a/packages/rest/src/body-parsers/body-parser.json.ts b/packages/rest/src/body-parsers/body-parser.json.ts index e6ec497aaf83..0b81860c3c3d 100644 --- a/packages/rest/src/body-parsers/body-parser.json.ts +++ b/packages/rest/src/body-parsers/body-parser.json.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import {json} from 'body-parser'; import {is} from 'type-is'; import {RestBindings} from '../keys'; diff --git a/packages/rest/src/body-parsers/body-parser.raw.ts b/packages/rest/src/body-parsers/body-parser.raw.ts index 94a64fbd4ba5..8cd353062cc9 100644 --- a/packages/rest/src/body-parsers/body-parser.raw.ts +++ b/packages/rest/src/body-parsers/body-parser.raw.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import {raw} from 'body-parser'; import {is} from 'type-is'; import {RestBindings} from '../keys'; diff --git a/packages/rest/src/body-parsers/body-parser.text.ts b/packages/rest/src/body-parsers/body-parser.text.ts index ed540e8bd839..6c296f25c4dc 100644 --- a/packages/rest/src/body-parsers/body-parser.text.ts +++ b/packages/rest/src/body-parsers/body-parser.text.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import {text} from 'body-parser'; import {is} from 'type-is'; import {RestBindings} from '../keys'; diff --git a/packages/rest/src/body-parsers/body-parser.ts b/packages/rest/src/body-parsers/body-parser.ts index 72b6c9d33836..cbb7b76f3fb1 100644 --- a/packages/rest/src/body-parsers/body-parser.ts +++ b/packages/rest/src/body-parsers/body-parser.ts @@ -10,7 +10,7 @@ import { filterByTag, inject, instantiateClass, -} from '@loopback/context'; +} from '@loopback/core'; import {isReferenceObject, OperationObject} from '@loopback/openapi-v3'; import debugModule from 'debug'; import {is} from 'type-is'; diff --git a/packages/rest/src/body-parsers/body-parser.urlencoded.ts b/packages/rest/src/body-parsers/body-parser.urlencoded.ts index c264e4ba5bd0..a910a5998d62 100644 --- a/packages/rest/src/body-parsers/body-parser.urlencoded.ts +++ b/packages/rest/src/body-parsers/body-parser.urlencoded.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import {urlencoded} from 'body-parser'; import {is} from 'type-is'; import {RestBindings} from '../keys'; diff --git a/packages/rest/src/http-handler.ts b/packages/rest/src/http-handler.ts index 239657ced583..03e3be4ba1e7 100644 --- a/packages/rest/src/http-handler.ts +++ b/packages/rest/src/http-handler.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context} from '@loopback/context'; +import {Context} from '@loopback/core'; import { ComponentsObject, ControllerSpec, diff --git a/packages/rest/src/keys.ts b/packages/rest/src/keys.ts index dbd885c8f0a5..a1fdc8755342 100644 --- a/packages/rest/src/keys.ts +++ b/packages/rest/src/keys.ts @@ -3,8 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingKey, Context} from '@loopback/context'; -import {CoreBindings} from '@loopback/core'; +import {BindingKey, Context, CoreBindings} from '@loopback/core'; import {InvokeMiddleware} from '@loopback/express'; import {HttpProtocol} from '@loopback/http-server'; import {OpenApiSpec, OperationObject} from '@loopback/openapi-v3'; diff --git a/packages/rest/src/providers/find-route.provider.ts b/packages/rest/src/providers/find-route.provider.ts index 4c599a80b6ab..bc02702db279 100644 --- a/packages/rest/src/providers/find-route.provider.ts +++ b/packages/rest/src/providers/find-route.provider.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, inject, Provider} from '@loopback/context'; +import {Context, inject, Provider} from '@loopback/core'; import {FindRoute, Request} from '../types'; import {HttpHandler} from '../http-handler'; import {RestBindings} from '../keys'; diff --git a/packages/rest/src/providers/invoke-method.provider.ts b/packages/rest/src/providers/invoke-method.provider.ts index fa085af12465..3bf4a1b74865 100644 --- a/packages/rest/src/providers/invoke-method.provider.ts +++ b/packages/rest/src/providers/invoke-method.provider.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, inject, Provider} from '@loopback/context'; +import {Context, inject, Provider} from '@loopback/core'; import {InvokeMethod, OperationArgs, OperationRetval} from '../types'; import {RestBindings} from '../keys'; import {RouteEntry} from '../router'; diff --git a/packages/rest/src/providers/log-error.provider.ts b/packages/rest/src/providers/log-error.provider.ts index 890a29cbfbb0..53da86848d79 100644 --- a/packages/rest/src/providers/log-error.provider.ts +++ b/packages/rest/src/providers/log-error.provider.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Provider} from '@loopback/context'; +import {Provider} from '@loopback/core'; import {LogError, Request} from '../types'; export class LogErrorProvider implements Provider { diff --git a/packages/rest/src/providers/parse-params.provider.ts b/packages/rest/src/providers/parse-params.provider.ts index c2711398a546..724da615a800 100644 --- a/packages/rest/src/providers/parse-params.provider.ts +++ b/packages/rest/src/providers/parse-params.provider.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject, Provider} from '@loopback/context'; +import {inject, Provider} from '@loopback/core'; import {RequestBodyParser} from '../body-parsers'; import {RestBindings} from '../keys'; import {parseOperationArgs} from '../parser'; diff --git a/packages/rest/src/providers/reject.provider.ts b/packages/rest/src/providers/reject.provider.ts index bcc4ebc695f4..e2bb5adb08e1 100644 --- a/packages/rest/src/providers/reject.provider.ts +++ b/packages/rest/src/providers/reject.provider.ts @@ -4,7 +4,7 @@ // License text available at https://opensource.org/licenses/MIT import {LogError, Reject, HandlerContext} from '../types'; -import {inject, Provider} from '@loopback/context'; +import {inject, Provider} from '@loopback/core'; import {HttpError} from 'http-errors'; import {RestBindings} from '../keys'; import {writeErrorToResponse, ErrorWriterOptions} from 'strong-error-handler'; diff --git a/packages/rest/src/providers/send.provider.ts b/packages/rest/src/providers/send.provider.ts index 3f80f421d96a..2d3f549b7dce 100644 --- a/packages/rest/src/providers/send.provider.ts +++ b/packages/rest/src/providers/send.provider.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Provider, BoundValue} from '@loopback/context'; +import {Provider, BoundValue} from '@loopback/core'; import {writeResultToResponse} from '../writer'; /** * Provides the function that populates the response object with diff --git a/packages/rest/src/request-context.ts b/packages/rest/src/request-context.ts index 8a04b275b6be..8a1795bd9214 100644 --- a/packages/rest/src/request-context.ts +++ b/packages/rest/src/request-context.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context} from '@loopback/context'; +import {Context} from '@loopback/core'; import { HandlerContext, MiddlewareContext, diff --git a/packages/rest/src/rest.application.ts b/packages/rest/src/rest.application.ts index 8618d0baa1c5..763d7473a00c 100644 --- a/packages/rest/src/rest.application.ts +++ b/packages/rest/src/rest.application.ts @@ -4,13 +4,15 @@ // License text available at https://opensource.org/licenses/MIT import { + Application, + ApplicationConfig, Binding, BindingAddress, Constructor, Context, Provider, -} from '@loopback/context'; -import {Application, ApplicationConfig, Server} from '@loopback/core'; + Server, +} from '@loopback/core'; import { ExpressMiddlewareFactory, ExpressRequestHandler, diff --git a/packages/rest/src/rest.component.ts b/packages/rest/src/rest.component.ts index 543f6c462db8..91f3806ae029 100644 --- a/packages/rest/src/rest.component.ts +++ b/packages/rest/src/rest.component.ts @@ -8,7 +8,7 @@ import { Constructor, createBindingFromClass, inject, -} from '@loopback/context'; +} from '@loopback/core'; import { Application, Component, diff --git a/packages/rest/src/rest.server.ts b/packages/rest/src/rest.server.ts index 54d867c28243..c5c5c91c87d1 100644 --- a/packages/rest/src/rest.server.ts +++ b/packages/rest/src/rest.server.ts @@ -4,18 +4,20 @@ // License text available at https://opensource.org/licenses/MIT import { + Application, Binding, BindingAddress, BindingScope, Constructor, ContextObserver, + CoreBindings, createBindingFromClass, filterByKey, filterByTag, inject, + Server, Subscription, -} from '@loopback/context'; -import {Application, CoreBindings, Server} from '@loopback/core'; +} from '@loopback/core'; import {BaseMiddlewareRegistry, ExpressRequestHandler} from '@loopback/express'; import {HttpServer, HttpServerOptions} from '@loopback/http-server'; import { diff --git a/packages/rest/src/router/base-route.ts b/packages/rest/src/router/base-route.ts index b74c18fe0162..5b214bffd700 100644 --- a/packages/rest/src/router/base-route.ts +++ b/packages/rest/src/router/base-route.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, InvocationSource} from '@loopback/context'; +import {Context, InvocationSource} from '@loopback/core'; import {OperationObject} from '@loopback/openapi-v3'; import {OperationArgs, OperationRetval} from '../types'; import {RouteEntry} from './route-entry'; diff --git a/packages/rest/src/router/controller-route.ts b/packages/rest/src/router/controller-route.ts index cf2d1d83db2d..05d5aaeafdfa 100644 --- a/packages/rest/src/router/controller-route.ts +++ b/packages/rest/src/router/controller-route.ts @@ -7,11 +7,11 @@ import { BindingScope, Constructor, Context, + CoreBindings, instantiateClass, invokeMethod, ValueOrPromise, -} from '@loopback/context'; -import {CoreBindings} from '@loopback/core'; +} from '@loopback/core'; import {ControllerSpec, OperationObject} from '@loopback/openapi-v3'; import assert from 'assert'; import debugFactory from 'debug'; diff --git a/packages/rest/src/router/external-express-routes.ts b/packages/rest/src/router/external-express-routes.ts index c9a324484422..60e271cceba4 100644 --- a/packages/rest/src/router/external-express-routes.ts +++ b/packages/rest/src/router/external-express-routes.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context} from '@loopback/context'; +import {Context} from '@loopback/core'; import { executeExpressRequestHandler, ExpressRequestHandler, diff --git a/packages/rest/src/router/handler-route.ts b/packages/rest/src/router/handler-route.ts index fa0fa61f059c..b26184de9ad8 100644 --- a/packages/rest/src/router/handler-route.ts +++ b/packages/rest/src/router/handler-route.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context, invokeMethodWithInterceptors} from '@loopback/context'; +import {Context, invokeMethodWithInterceptors} from '@loopback/core'; import {OperationObject} from '@loopback/openapi-v3'; import {RestBindings} from '../keys'; import {OperationArgs, OperationRetval} from '../types'; diff --git a/packages/rest/src/router/regexp-router.ts b/packages/rest/src/router/regexp-router.ts index 7760c815ee8e..069ebe0170ca 100644 --- a/packages/rest/src/router/regexp-router.ts +++ b/packages/rest/src/router/regexp-router.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import {inspect} from 'util'; import {RestBindings} from '../keys'; import {PathParameterValues} from '../types'; diff --git a/packages/rest/src/router/route-entry.ts b/packages/rest/src/router/route-entry.ts index 161e19b9e06d..bd250d83a958 100644 --- a/packages/rest/src/router/route-entry.ts +++ b/packages/rest/src/router/route-entry.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Context} from '@loopback/context'; +import {Context} from '@loopback/core'; import {OperationObject, SchemasObject} from '@loopback/openapi-v3'; import {OperationArgs, OperationRetval, PathParameterValues} from '../types'; diff --git a/packages/rest/src/router/trie-router.ts b/packages/rest/src/router/trie-router.ts index d7560b44e853..dbdd1ccc9dfa 100644 --- a/packages/rest/src/router/trie-router.ts +++ b/packages/rest/src/router/trie-router.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject} from '@loopback/context'; +import {inject} from '@loopback/core'; import {inspect} from 'util'; import {RestBindings} from '../keys'; import {RestRouterOptions} from './rest-router'; diff --git a/packages/rest/src/sequence.ts b/packages/rest/src/sequence.ts index 25e3f1422cae..abaef7ffe673 100644 --- a/packages/rest/src/sequence.ts +++ b/packages/rest/src/sequence.ts @@ -4,7 +4,7 @@ // License text available at https://opensource.org/licenses/MIT const debug = require('debug')('loopback:rest:sequence'); -import {inject, ValueOrPromise} from '@loopback/context'; +import {inject, ValueOrPromise} from '@loopback/core'; import {InvokeMiddleware} from '@loopback/express'; import {RestBindings} from './keys'; import {RequestContext} from './request-context'; diff --git a/packages/rest/src/spec-enhancers/info.spec-enhancer.ts b/packages/rest/src/spec-enhancers/info.spec-enhancer.ts index 7b9f25aa9750..a2e69db776ea 100644 --- a/packages/rest/src/spec-enhancers/info.spec-enhancer.ts +++ b/packages/rest/src/spec-enhancers/info.spec-enhancer.ts @@ -4,13 +4,14 @@ // License text available at https://opensource.org/licenses/MIT import { + ApplicationMetadata, bind, BindingScope, + CoreBindings, inject, JSONObject, JSONValue, -} from '@loopback/context'; -import {ApplicationMetadata, CoreBindings} from '@loopback/core'; +} from '@loopback/core'; import { asSpecEnhancer, ContactObject, diff --git a/packages/rest/tsconfig.json b/packages/rest/tsconfig.json index 694c3b0400c4..66a2e7b92e00 100644 --- a/packages/rest/tsconfig.json +++ b/packages/rest/tsconfig.json @@ -10,9 +10,6 @@ "src" ], "references": [ - { - "path": "../context/tsconfig.json" - }, { "path": "../core/tsconfig.json" }, diff --git a/packages/security/package.json b/packages/security/package.json index dcd68cb10b48..27279d782c6a 100644 --- a/packages/security/package.json +++ b/packages/security/package.json @@ -24,7 +24,6 @@ "access": "public" }, "dependencies": { - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "debug": "^4.1.1", "tslib": "^2.0.0" diff --git a/packages/security/src/keys.ts b/packages/security/src/keys.ts index b135dafc85a2..4093e94b60d8 100644 --- a/packages/security/src/keys.ts +++ b/packages/security/src/keys.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BindingKey} from '@loopback/context'; +import {BindingKey} from '@loopback/core'; import {Subject, UserProfile} from './types'; /** diff --git a/packages/security/tsconfig.json b/packages/security/tsconfig.json index f22cfe9f58d2..134a68e33164 100644 --- a/packages/security/tsconfig.json +++ b/packages/security/tsconfig.json @@ -10,9 +10,6 @@ "src" ], "references": [ - { - "path": "../context/tsconfig.json" - }, { "path": "../core/tsconfig.json" }, diff --git a/packages/service-proxy/package.json b/packages/service-proxy/package.json index 93adba485d9e..d6be241a04a5 100644 --- a/packages/service-proxy/package.json +++ b/packages/service-proxy/package.json @@ -30,7 +30,6 @@ "@types/node": "^10.17.24" }, "dependencies": { - "@loopback/context": "^3.8.2", "@loopback/core": "^2.7.1", "loopback-datasource-juggler": "^4.21.2", "tslib": "^2.0.0" diff --git a/packages/service-proxy/src/__tests__/unit/decorators/service-proxy.decorator.unit.ts b/packages/service-proxy/src/__tests__/unit/decorators/service-proxy.decorator.unit.ts index 3f7ca3d335e0..f3e99a99a2a8 100644 --- a/packages/service-proxy/src/__tests__/unit/decorators/service-proxy.decorator.unit.ts +++ b/packages/service-proxy/src/__tests__/unit/decorators/service-proxy.decorator.unit.ts @@ -4,7 +4,7 @@ // License text available at https://opensource.org/licenses/MIT import {expect} from '@loopback/testlab'; -import {Context} from '@loopback/context'; +import {Context} from '@loopback/core'; import {serviceProxy} from '../../../'; import {juggler} from '../../../'; diff --git a/packages/service-proxy/src/decorators/service.decorator.ts b/packages/service-proxy/src/decorators/service.decorator.ts index 5267514facd2..11de70d8651d 100644 --- a/packages/service-proxy/src/decorators/service.decorator.ts +++ b/packages/service-proxy/src/decorators/service.decorator.ts @@ -9,7 +9,7 @@ import { Context, Injection, InjectionMetadata, -} from '@loopback/context'; +} from '@loopback/core'; import {getService, juggler} from '..'; /** diff --git a/packages/service-proxy/src/mixins/service.mixin.ts b/packages/service-proxy/src/mixins/service.mixin.ts index faeedc252a04..e113b92eac2e 100644 --- a/packages/service-proxy/src/mixins/service.mixin.ts +++ b/packages/service-proxy/src/mixins/service.mixin.ts @@ -9,7 +9,7 @@ import { BindingFromClassOptions, Provider, Constructor, -} from '@loopback/context'; +} from '@loopback/core'; import { Application, MixinTarget, @@ -19,7 +19,7 @@ import { // FIXME(rfeng): Workaround for https://github.com/microsoft/rushstack/pull/1867 /* eslint-disable @typescript-eslint/no-unused-vars */ -import * as loopbackContext from '@loopback/context'; +import * as loopbackContext from '@loopback/core'; import * as loopbackCore from '@loopback/core'; /* eslint-enable @typescript-eslint/no-unused-vars */ diff --git a/packages/service-proxy/tsconfig.json b/packages/service-proxy/tsconfig.json index f22cfe9f58d2..134a68e33164 100644 --- a/packages/service-proxy/tsconfig.json +++ b/packages/service-proxy/tsconfig.json @@ -10,9 +10,6 @@ "src" ], "references": [ - { - "path": "../context/tsconfig.json" - }, { "path": "../core/tsconfig.json" },