Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Improve demo data module #98

Merged
merged 1 commit into from
Aug 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@raincatcher/demo-data",
"name": "@raincatcher/wfm-demo-data",
"version": "1.0.0",
"description": "Example seed data for the RainCatcher project",
"types": "src/index.ts",
Expand Down
7 changes: 0 additions & 7 deletions demo/data/src/index.ts → cloud/wfm-demo-data/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { User } from '@raincatcher/wfm-user';
import { Db } from 'mongodb';
import workflowSetup from './Workflows';
import workorderSetup from './Workorders';
Expand All @@ -11,9 +10,3 @@ export default function(database: Db) {
workorderSetup('workorders', database);
workflowSetup('workflows', database);
}

/**
* Static user json data
*/
// tslint:disable-next-line:no-var-requires
export const users: User[] = require('./users.json');
2 changes: 1 addition & 1 deletion demo/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"@raincatcher/logger": "1.0.0",
"@raincatcher/wfm-rest-api": "1.0.0",
"@raincatcher/wfm-user": "1.0.0",
"@raincatcher/demo-data": "1.0.0",
"@raincatcher/express-auth": "1.0.0",
"@raincatcher/wfm-demo-data": "1.0.0",
"bluebird": "^3.5.0",
"body-parser": "^1.17.2",
"cookie-parser": "^1.4.3",
Expand Down
4 changes: 2 additions & 2 deletions demo/server/src/modules/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import initData from '@raincatcher/demo-data';
import { EndpointSecurity } from '@raincatcher/express-auth';
import { EndpointSecurity } from '@raincatcher/auth-passport';
import { getLogger } from '@raincatcher/logger';
import initData from '@raincatcher/wfm-demo-data';
import { WfmRestApi } from '@raincatcher/wfm-rest-api';
import { User, UserController, UsersRepository } from '@raincatcher/wfm-user';
import * as Promise from 'bluebird';
Expand Down
7 changes: 6 additions & 1 deletion demo/server/src/modules/passport-auth/DemoUserRepository.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { UserRepository, UserService } from '@raincatcher/auth-passport';
import { users } from '@raincatcher/demo-data';
import * as _ from 'lodash';

/**
* Static user json data
*/
// tslint:disable-next-line:no-var-requires
export const users: any[] = require('./users.json');

/**
* A sample user implementation
*
Expand Down