Skip to content

Commit

Permalink
chore: use @loopback/core for packages consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondfeng committed Jun 1, 2020
1 parent 7ac358f commit 5923c06
Show file tree
Hide file tree
Showing 255 changed files with 293 additions and 400 deletions.
2 changes: 1 addition & 1 deletion benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion benchmark/src/context-binding/context-binding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand Down
2 changes: 1 addition & 1 deletion benchmark/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion examples/access-control-migration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion examples/access-control-migration/src/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>('resourceId');
2 changes: 1 addition & 1 deletion examples/access-control-migration/src/sequence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions examples/access-control-migration/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
{
"path": "../../packages/boot/tsconfig.json"
},
{
"path": "../../packages/context/tsconfig.json"
},
{
"path": "../../packages/core/tsconfig.json"
},
Expand Down
1 change: 0 additions & 1 deletion examples/express-composition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion examples/express-composition/src/sequence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions examples/express-composition/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
{
"path": "../../packages/boot/tsconfig.json"
},
{
"path": "../../packages/context/tsconfig.json"
},
{
"path": "../../packages/core/tsconfig.json"
},
Expand Down
1 change: 0 additions & 1 deletion examples/file-transfer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion examples/file-transfer/src/sequence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion examples/file-transfer/src/services/file-upload.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 0 additions & 3 deletions examples/file-transfer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
{
"path": "../../packages/boot/tsconfig.json"
},
{
"path": "../../packages/context/tsconfig.json"
},
{
"path": "../../packages/core/tsconfig.json"
},
Expand Down
1 change: 0 additions & 1 deletion examples/greeter-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions examples/greeter-extension/src/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion examples/greeter-extension/src/greeters/greeter-cn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand Down
2 changes: 1 addition & 1 deletion examples/greeter-extension/src/greeters/greeter-en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand Down
3 changes: 1 addition & 2 deletions examples/greeter-extension/src/greeting-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion examples/greeter-extension/src/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand Down
3 changes: 1 addition & 2 deletions examples/greeter-extension/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions examples/greeter-extension/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
"src/**/*.json"
],
"references": [
{
"path": "../../packages/context/tsconfig.json"
},
{
"path": "../../packages/core/tsconfig.json"
},
Expand Down
1 change: 0 additions & 1 deletion examples/greeting-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion examples/greeting-app/src/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand Down
3 changes: 1 addition & 2 deletions examples/greeting-app/src/observers/cache.observer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
3 changes: 0 additions & 3 deletions examples/greeting-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
{
"path": "../../packages/boot/tsconfig.json"
},
{
"path": "../../packages/context/tsconfig.json"
},
{
"path": "../../packages/core/tsconfig.json"
},
Expand Down
1 change: 0 additions & 1 deletion examples/lb3-application/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion examples/lb3-application/src/sequence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions examples/lb3-application/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
{
"path": "../../packages/booter-lb3app/tsconfig.json"
},
{
"path": "../../packages/context/tsconfig.json"
},
{
"path": "../../packages/core/tsconfig.json"
},
Expand Down
1 change: 0 additions & 1 deletion examples/log-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion examples/log-extension/src/decorators/log.decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Constructor,
MethodDecoratorFactory,
MetadataInspector,
} from '@loopback/context';
} from '@loopback/core';
import {LevelMetadata} from '../types';

/**
Expand Down
2 changes: 1 addition & 1 deletion examples/log-extension/src/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand Down
9 changes: 7 additions & 2 deletions examples/log-extension/src/providers/log-action.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion examples/log-extension/src/providers/timer.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<TimerFn> {
Expand Down
Loading

0 comments on commit 5923c06

Please sign in to comment.