Skip to content

Commit

Permalink
fixup!: fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jannyHou committed Feb 18, 2020
1 parent 8581a06 commit 6fe1f60
Show file tree
Hide file tree
Showing 36 changed files with 128 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"args": [
"--config",
"${workspaceRoot}/packages/build/config/.mocharc.json",
"examples/*/dist/__tests__/**/*.js",
"packages/*/dist/__tests__/**/*.js",
"-t",
"0"
]
Expand Down
4 changes: 2 additions & 2 deletions examples/access-control-migration/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: @loopback/example-todo
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
4 changes: 2 additions & 2 deletions examples/access-control-migration/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: @loopback/example-todo
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
4 changes: 2 additions & 2 deletions examples/access-control-migration/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: @loopback/example-todo
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
4 changes: 2 additions & 2 deletions examples/access-control-migration/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: @loopback/example-todo
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
2 changes: 1 addition & 1 deletion examples/access-control-migration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run build",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js",
"verify": "npm pack && tar xf loopback-access-control-migration*.tgz && tree package && npm run clean",
"migrate": "node ./dist/migrate",
"prestart": "npm run build",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
// Copyright IBM Corp. 2019. All Rights Reserved.
// Node module: @loopback/example-todo
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {AnyObject} from '@loopback/repository';
import {Client, createRestAppClient} from '@loopback/testlab';
import {
Client,
createRestAppClient,
givenHttpServerConfig,
} from '@loopback/testlab';
import {AccessControlApplication} from '../../';

describe('AccessControlApplication - permissions', () => {
Expand Down Expand Up @@ -177,7 +181,9 @@ describe('AccessControlApplication - permissions', () => {

async function givenRunningApplication() {
process.env.SEED_DATA = '1';
app = new AccessControlApplication();
app = new AccessControlApplication({
rest: givenHttpServerConfig(),
});

app.bind('datasources.config.db').to({
name: 'db',
Expand Down
4 changes: 2 additions & 2 deletions examples/access-control-migration/src/application.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018,2019. All Rights Reserved.
// Node module: @loopback/example-todo
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
5 changes: 3 additions & 2 deletions examples/access-control-migration/src/controllers/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: @loopback/example-todo
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

export * from './project.controller';
export * from './user.controller';
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import _ from 'lodash';
import {repository} from '@loopback/repository';
import {param, get, getModelSchemaRef, patch} from '@loopback/rest';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

// Uncomment these imports to begin using these cool features!

import {inject} from '@loopback/context';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: @loopback/example-todo
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
4 changes: 2 additions & 2 deletions examples/access-control-migration/src/datasources/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: @loopback/example-todo
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
4 changes: 2 additions & 2 deletions examples/access-control-migration/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: @loopback/example-todo
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
5 changes: 5 additions & 0 deletions examples/access-control-migration/src/keys.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {BindingKey} from '@loopback/context';
import {TokenService, UserService} from '@loopback/authentication';
import {User} from './models';
Expand Down
4 changes: 2 additions & 2 deletions examples/access-control-migration/src/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: @loopback/example-todo
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
5 changes: 5 additions & 0 deletions examples/access-control-migration/src/models/project.model.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {Entity, model, property, belongsTo} from '@loopback/repository';
import {User} from './user.model';

Expand Down
5 changes: 5 additions & 0 deletions examples/access-control-migration/src/models/team.model.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {Entity, model, property} from '@loopback/repository';

@model({settings: {strict: false}})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {Entity, model, property} from '@loopback/repository';

@model({settings: {strict: false}})
Expand Down
5 changes: 5 additions & 0 deletions examples/access-control-migration/src/models/user.model.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {Entity, model, property, hasMany, hasOne} from '@loopback/repository';
import {Team} from './team.model';
import {UserCredentials} from './user-credentials.model';
Expand Down
5 changes: 5 additions & 0 deletions examples/access-control-migration/src/observers/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

export * from './sample.observer';
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {
Application,
CoreBindings,
Expand Down
4 changes: 2 additions & 2 deletions examples/access-control-migration/src/repositories/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: @loopback/example-todo
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {
DefaultCrudRepository,
repository,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {DefaultCrudRepository} from '@loopback/repository';
import {Team, TeamRelations} from '../models';
import {DbDataSource} from '../datasources';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {DefaultCrudRepository} from '@loopback/repository';
import {UserCredentials, UserCredentialsRelations} from '../models';
import {DbDataSource} from '../datasources';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {
DefaultCrudRepository,
repository,
Expand Down
4 changes: 2 additions & 2 deletions examples/access-control-migration/src/sequence.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: @loopback/example-todo
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {
AuthorizationContext,
AuthorizationDecision,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {
AuthorizationContext,
AuthorizationDecision,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import * as casbin from 'casbin';
import path from 'path';

Expand Down
4 changes: 2 additions & 2 deletions examples/access-control-migration/src/services/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: @loopback/example-todo
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2019. All Rights Reserved.
// Node module: @loopback/authentication
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
4 changes: 2 additions & 2 deletions examples/access-control-migration/src/services/jwt.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2019. All Rights Reserved.
// Node module: @loopback/authentication
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018,2019. All Rights Reserved.
// Node module: loopback4-example-shopping
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright IBM Corp. 2019. All Rights Reserved.
// Node module: @loopback/authentication
// Copyright IBM Corp. 2020. All Rights Reserved.
// Node module: @loopback/example-access-control-migration
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {HttpErrors} from '@loopback/rest';
import {UserRepository} from '../repositories/user.repository';
import {User} from '../models/user.model';
Expand Down

0 comments on commit 6fe1f60

Please sign in to comment.