Browse Source

增加日志

dev
1549469775 3 years ago
parent
commit
0458c78e94
  1. 706
      log/SQL.log
  2. 3
      log/Site.log
  3. 4780
      package-lock.json
  4. 12
      package.json
  5. 35
      packages/hapi-router/dist/hapi-router.cjs.js
  6. 2
      packages/hapi-router/dist/hapi-router.cjs.js.map
  7. 11
      packages/hapi-router/src/index.ts
  8. 532
      pnpm-lock.yaml
  9. BIN
      public/upload/2050798.jpg
  10. BIN
      public/upload/icon.png
  11. BIN
      source/db/data.db
  12. 1
      source/db/index.ts
  13. 37
      source/log4js_config.ts
  14. 18
      source/main.ts
  15. 8
      source/plugins/index.ts
  16. 43
      source/route/api/user/index.ts
  17. 7
      source/route/api/wx/index.ts
  18. 13
      source/route/demo/_upload.ts
  19. 8
      source/route/index/index.ts
  20. 37
      source/route/route.txt
  21. 33
      source/run.ts
  22. 1
      source/util/index.ts
  23. 10
      source/validateSchema/index.ts
  24. 11
      tsconfig.json
  25. 8
      types/global.d.ts

706
log/SQL.log

@ -0,0 +1,706 @@
[2022-02-24T15:03:25.488] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = '1549469775@qq.com' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = '1549469775@qq.com'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:03:25.551] [DEBUG] SQL - Executing (default): INSERT INTO `Users` (`id`,`username`,`password`,`email`,`createdAt`,`updatedAt`) VALUES (NULL,$1,$2,$3,$4,$5); {
plain: false,
raw: false,
logging: [Function: bound ],
hooks: true,
validate: true,
fields: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
defaultFields: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
returning: true,
hasTrigger: undefined,
dialect: 'sqlite',
dialectModule: null,
dialectModulePath: null,
protocol: 'tcp',
define: {},
query: {},
sync: {},
timezone: '+00:00',
clientMinMessages: 'warning',
standardConformingStrings: true,
omitNull: false,
native: false,
replication: false,
ssl: undefined,
pool: {},
quoteIdentifiers: true,
retry: { max: 5, match: [ 'SQLITE_BUSY: database is locked' ] },
transactionType: 'DEFERRED',
isolationLevel: null,
databaseVersion: 0,
typeValidation: false,
benchmark: false,
minifyAliases: false,
logQueryParameters: false,
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
type: 'INSERT',
instance: User {
dataValues: {
id: null,
username: '1549469775@qq.com',
password: '$2b$10$7HW9.t8ElTrincTuFajI5ueyVgIRvzEGSM5t81CXy1ka5IpAs8wNO',
email: '1549469775@qq.com',
updatedAt: 2022-02-24T07:03:25.548Z,
createdAt: 2022-02-24T07:03:25.548Z
},
_previousDataValues: { username: undefined, password: undefined, email: undefined },
_changed: Set(3) { 'username', 'password', 'email' },
_options: {
isNewRecord: true,
_schema: null,
_schemaDelimiter: '',
attributes: undefined,
include: undefined,
raw: undefined,
silent: undefined
},
isNewRecord: true
},
model: User,
bind: [
'1549469775@qq.com',
'$2b$10$7HW9.t8ElTrincTuFajI5ueyVgIRvzEGSM5t81CXy1ka5IpAs8wNO',
'1549469775@qq.com',
'2022-02-24 07:03:25.548 +00:00',
'2022-02-24 07:03:25.548 +00:00'
],
uuid: 'default',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:08:04.488] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = 'xieyaxin' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = 'xieyaxin'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:10:30.146] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = 'xieyaxin' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = 'xieyaxin'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:12:48.080] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = 'xieyaxin' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = 'xieyaxin'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:15:26.413] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = 'xieyaxin' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = 'xieyaxin'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:15:46.129] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:15:46.183] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:16:28.160] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = 'xieyaxin' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = 'xieyaxin'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:16:40.344] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:16:40.412] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:17:00.415] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:17:00.511] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:17:04.352] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = 'xieyaxin' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = 'xieyaxin'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:18:55.465] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:18:55.524] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:19:27.570] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:19:38.463] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = 'xieyaxin' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = 'xieyaxin'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:19:40.096] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:20:17.332] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = 'xieyaxin' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = 'xieyaxin'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:20:45.832] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:20:45.916] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:20:57.434] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:22:56.788] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = '1549469775@qq.com' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = '1549469775@qq.com'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:31:15.989] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = '1549469775@qq.com' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = '1549469775@qq.com'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:32:28.477] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = 'xieyaxin' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = 'xieyaxin'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:32:34.923] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:32:34.925] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:32:34.926] [DEBUG] SQL - Executing (default): DELETE FROM `Users` WHERE `id` = 1 {
plain: false,
raw: false,
logging: [Function: bound ],
type: 'DELETE',
limit: null,
hooks: true,
force: false,
instance: User {
dataValues: {
id: 1,
username: 'xieyaxin',
password: '$2b$10$GqErvSdKZYJECxlABid0.eapL3wzZ/YRASWBjxkBGDFMlGRISCyyy',
email: '1549469775@qq.com',
createdAt: 2022-02-24T06:33:04.439Z,
updatedAt: 2022-02-24T06:33:04.439Z
},
_previousDataValues: {
id: 1,
username: 'xieyaxin',
password: '$2b$10$GqErvSdKZYJECxlABid0.eapL3wzZ/YRASWBjxkBGDFMlGRISCyyy',
email: '1549469775@qq.com',
createdAt: 2022-02-24T06:33:04.439Z,
updatedAt: 2022-02-24T06:33:04.439Z
},
_changed: Set(0) {},
_options: {
isNewRecord: false,
_schema: null,
_schemaDelimiter: '',
raw: true,
attributes: [Array]
},
isNewRecord: false
},
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T15:54:57.732] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = '1549469775@qq.com' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = '1549469775@qq.com'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T16:15:54.738] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = '1549469775@qq.com' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = '1549469775@qq.com'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T16:16:00.842] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = '1549469775@qq.com' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = '1549469775@qq.com'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T16:16:10.012] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = '1549469775@qq.com' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = '1549469775@qq.com'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T16:16:20.748] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T16:16:28.797] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`id` = 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: '`User`.`id` = 1',
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}
[2022-02-24T16:16:38.617] [DEBUG] SQL - Executing (default): SELECT `id`, `username`, `password`, `email`, `createdAt`, `updatedAt` FROM `Users` AS `User` WHERE `User`.`username` = 'xieyaxin' LIMIT 1; {
plain: true,
raw: false,
logging: [Function: bound ],
where: "`User`.`username` = 'xieyaxin'",
limit: 1,
hooks: true,
rejectOnEmpty: false,
originalAttributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
attributes: [ 'id', 'username', 'password', 'email', 'createdAt', 'updatedAt' ],
tableNames: [ 'Users' ],
type: 'SELECT',
model: User,
uuid: 'default',
storage: 'D:\\1XYX\\demo\\hapi-demo\\source\\db\\data.db',
inMemory: 0,
readWriteMode: 6
}

3
log/Site.log

@ -0,0 +1,3 @@
[2022-02-24T14:57:07.335] [DEBUG] Site - 服务器启动
[2022-02-24T14:57:23.685] [DEBUG] Site - 服务器启动
[2022-02-24T15:00:56.695] [DEBUG] Site - 服务器启动

4780
package-lock.json

File diff suppressed because it is too large

12
package.json

@ -5,9 +5,10 @@
"private": true,
"main": "index.js",
"scripts": {
"init": "npx ts-node --project ./tsconfig.json -r tsconfig-paths/register source/db/init.ts alter",
"start": "npx ts-node-dev --project ./tsconfig.json -r tsconfig-paths/register ./source/main.ts",
"dev": "nodemon --exec 'npx ts-node --project ./tsconfig.json -r tsconfig-paths/register ./source/main.ts'"
"init": "ts-node --respawn --project ./tsconfig.json -r tsconfig-paths/register source/db/init.ts alter",
"start": "ts-node-dev --respawn --project ./tsconfig.json -r tsconfig-paths/register ./source/main.ts",
"dev": "npm start",
"deva": "nodemon --exec 'ts-node --project ./tsconfig.json -r tsconfig-paths/register ./source/main.ts'"
},
"keywords": [],
"author": "",
@ -16,6 +17,8 @@
"@hapi/cookie": "^11.0.2",
"@hapi/hapi": "^20.1.2",
"@hapi/inert": "^6.0.3",
"@types/hapi__hapi": "^20.0.10",
"@types/hapi__vision": "^5.5.3",
"bcrypt": "^5.0.1",
"hapi-auth-jwt2": "^10.2.0",
"hapi-swagger": "^14.2.0",
@ -30,10 +33,11 @@
},
"devDependencies": {
"@hapi/vision": "^6.1.0",
"@noderun/hapi-router": "link:packages/hapi-router",
"@noderun/hapi-router": "link:packages\\hapi-router",
"dotenv": "^10.0.0",
"ejs": "^3.1.6",
"file-type": "^16.5.0",
"log4js": "^6.4.1",
"ts-node": "^10.0.0",
"ts-node-dev": "^1.1.6",
"tsconfig-paths": "^3.9.0",

35
packages/hapi-router/dist/hapi-router.cjs.js

@ -54,6 +54,29 @@ function __values(o) {
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
}
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
var path$1 = require("path");
var fs$1 = require("fs");
function removeIndex(ss) {
@ -255,10 +278,10 @@ var routePlugin = (function () {
}
var str = route;
if (options_1.auth) {
str += " 该路由需要权限";
str = " 需要权限" + " " + full(method) + " " + str;
}
else {
str += " 该路由不需权限";
str = " 不需权限" + " " + full(method) + " " + str;
}
routes.push(str);
server.route({
@ -285,6 +308,14 @@ var routePlugin = (function () {
};
return routePlugin;
}());
function full(str, length) {
if (length === void 0) { length = 10; }
var len = str.length;
var need = length - len;
if (need <= 0)
return str;
return str + __spread(Array(need)).map(function (v, i) { return " "; }).join("");
}
var plugin = new routePlugin();
exports.auth = auth;

2
packages/hapi-router/dist/hapi-router.cjs.js.map

File diff suppressed because one or more lines are too long

11
packages/hapi-router/src/index.ts

@ -88,9 +88,9 @@ class routePlugin {
}
let str = route;
if (options.auth) {
str += " 该路由需要权限";
str = " 需要权限"+ " "+full(method)+" " + str;
} else {
str += " 该路由不需权限";
str = " 不需权限"+ " "+full(method)+" " + str;
}
routes.push(str);
server.route({
@ -109,6 +109,13 @@ class routePlugin {
}
}
function full(str: string, length=10) {
let len = str.length;
let need = length - len;
if(need <= 0) return str
return str+[...Array(need)].map((v,i)=>" ").join("")
}
const plugin = new routePlugin();
export { plugin };

532
pnpm-lock.yaml

@ -5,7 +5,9 @@ specifiers:
'@hapi/hapi': ^20.1.2
'@hapi/inert': ^6.0.3
'@hapi/vision': ^6.1.0
'@noderun/hapi-router': link:packages/hapi-router
'@noderun/hapi-router': link:packages\hapi-router
'@types/hapi__hapi': ^20.0.10
'@types/hapi__vision': ^5.5.3
bcrypt: ^5.0.1
dotenv: ^10.0.0
ejs: ^3.1.6
@ -15,6 +17,7 @@ specifiers:
joi: ^17.4.0
json-merge-patch: ^1.0.1
jsonwebtoken: ^8.5.1
log4js: ^6.4.1
multiparty: ^4.2.2
nodemon: ^2.0.7
pug: ^3.0.2
@ -29,6 +32,8 @@ dependencies:
'@hapi/cookie': 11.0.2
'@hapi/hapi': 20.1.4
'@hapi/inert': 6.0.3
'@types/hapi__hapi': registry.npmmirror.com/@types/hapi__hapi/20.0.10
'@types/hapi__vision': registry.npmmirror.com/@types/hapi__vision/5.5.3
bcrypt: 5.0.1
hapi-auth-jwt2: 10.2.0
hapi-swagger: 14.2.0_@hapi+hapi@20.1.4+joi@17.4.0
@ -47,6 +52,7 @@ devDependencies:
dotenv: 10.0.0
ejs: 3.1.6
file-type: 16.5.0
log4js: registry.npmmirror.com/log4js/6.4.1
ts-node: 10.0.0_typescript@4.3.2
ts-node-dev: 1.1.6_typescript@4.3.2
tsconfig-paths: 3.9.0
@ -86,12 +92,6 @@ packages:
'@hapi/hoek': 9.2.0
dev: false
/@hapi/b64/5.0.0:
resolution: {integrity: sha512-ngu0tSEmrezoiIaNGG6rRvKOUkUuDdf4XTPnONHGYfSGRmDqPZX5oJL6HAdKTo1UQHECbdB4OzhWrfgVppjHUw==}
dependencies:
'@hapi/hoek': 9.2.0
dev: false
/@hapi/boom/9.1.2:
resolution: {integrity: sha512-uJEJtiNHzKw80JpngDGBCGAmWjBtzxDCz17A9NO2zCi8LLBlb5Frpq4pXwyN+2JQMod4pKz5BALwyneCgDg89Q==}
dependencies:
@ -133,7 +133,7 @@ packages:
/@hapi/content/5.0.2:
resolution: {integrity: sha512-mre4dl1ygd4ZyOH3tiYBrOUBzV7Pu/EOs8VLGf58vtOEECWed8Uuw6B4iR9AN/8uQt42tB04qpVaMyoMQh0oMw==}
dependencies:
'@hapi/boom': 9.1.2
'@hapi/boom': registry.npmmirror.com/@hapi/boom/9.1.2
dev: false
/@hapi/cookie/11.0.2:
@ -149,7 +149,7 @@ packages:
resolution: {integrity: sha512-fo9+d1Ba5/FIoMySfMqPBR/7Pa29J2RsiPrl7bkwo5W5o+AN1dAYQRi4SPrPwwVxVGKjgLOEWrsvt1BonJSfLA==}
engines: {node: '>=12.0.0'}
dependencies:
'@hapi/boom': 9.1.2
'@hapi/boom': registry.npmmirror.com/@hapi/boom/9.1.2
dev: false
/@hapi/file/2.0.0:
@ -205,11 +205,11 @@ packages:
/@hapi/iron/6.0.0:
resolution: {integrity: sha512-zvGvWDufiTGpTJPG1Y/McN8UqWBu0k/xs/7l++HVU535NLHXsHhy54cfEMdW7EjwKfbBfM9Xy25FmTiobb7Hvw==}
dependencies:
'@hapi/b64': 5.0.0
'@hapi/boom': 9.1.2
'@hapi/bourne': 2.0.0
'@hapi/cryptiles': 5.1.0
'@hapi/hoek': 9.2.0
'@hapi/b64': registry.npmmirror.com/@hapi/b64/5.0.0
'@hapi/boom': registry.npmmirror.com/@hapi/boom/9.1.2
'@hapi/bourne': registry.npmmirror.com/@hapi/bourne/2.0.0
'@hapi/cryptiles': registry.npmmirror.com/@hapi/cryptiles/5.1.0
'@hapi/hoek': registry.npmmirror.com/@hapi/hoek/9.2.0
dev: false
/@hapi/mimos/6.0.0:
@ -223,17 +223,17 @@ packages:
resolution: {integrity: sha512-ht2KoEsDW22BxQOEkLEJaqfpoKPXxi7tvabXy7B/77eFtOyG5ZEstfZwxHQcqAiZhp58Ae5vkhEqI03kawkYNw==}
engines: {node: '>=12.0.0'}
dependencies:
'@hapi/hoek': 9.2.0
'@hapi/hoek': registry.npmmirror.com/@hapi/hoek/9.2.0
'@hapi/vise': 4.0.0
dev: false
/@hapi/pez/5.0.3:
resolution: {integrity: sha512-mpikYRJjtrbJgdDHG/H9ySqYqwJ+QU/D7FXsYciS9P7NYBXE2ayKDAy3H0ou6CohOCaxPuTV4SZ0D936+VomHA==}
dependencies:
'@hapi/b64': 5.0.0
'@hapi/boom': 9.1.2
'@hapi/b64': registry.npmmirror.com/@hapi/b64/5.0.0
'@hapi/boom': registry.npmmirror.com/@hapi/boom/9.1.2
'@hapi/content': 5.0.2
'@hapi/hoek': 9.2.0
'@hapi/hoek': registry.npmmirror.com/@hapi/hoek/9.2.0
'@hapi/nigel': 4.0.2
dev: false
@ -302,7 +302,7 @@ packages:
/@hapi/vise/4.0.0:
resolution: {integrity: sha512-eYyLkuUiFZTer59h+SGy7hUm+qE9p+UemePTHLlIWppEd+wExn3Df5jO04bFQTm7nleF5V8CtuYQYb+VFpZ6Sg==}
dependencies:
'@hapi/hoek': 9.2.0
'@hapi/hoek': registry.npmmirror.com/@hapi/hoek/9.2.0
dev: false
/@hapi/vision/6.1.0:
@ -317,9 +317,9 @@ packages:
/@hapi/wreck/17.1.0:
resolution: {integrity: sha512-nx6sFyfqOpJ+EFrHX+XWwJAxs3ju4iHdbB/bwR8yTNZOiYmuhA8eCe7lYPtYmb4j7vyK/SlbaQsmTtUrMvPEBw==}
dependencies:
'@hapi/boom': 9.1.2
'@hapi/bourne': 2.0.0
'@hapi/hoek': 9.2.0
'@hapi/boom': registry.npmmirror.com/@hapi/boom/9.1.2
'@hapi/bourne': registry.npmmirror.com/@hapi/bourne/2.0.0
'@hapi/hoek': registry.npmmirror.com/@hapi/hoek/9.2.0
dev: false
/@mapbox/node-pre-gyp/1.0.5:
@ -342,7 +342,7 @@ packages:
/@sideway/address/4.1.2:
resolution: {integrity: sha512-idTz8ibqWFrPU8kMirL0CoPH/A29XOzzAzpyN3zQ4kAWnzmNfFmRaoMNN6VI8ske5M73HZyhIaW4OuSFIdM4oA==}
dependencies:
'@hapi/hoek': 9.2.0
'@hapi/hoek': registry.npmmirror.com/@hapi/hoek/9.2.0
dev: false
/@sideway/formula/3.0.0:
@ -393,13 +393,10 @@ packages:
resolution: {integrity: sha1-7ihweulOEdK4J7y+UnC86n8+ce4=}
dev: true
/@types/node/15.12.2:
resolution: {integrity: sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww==}
/@types/readable-stream/2.3.10:
resolution: {integrity: sha512-xwSXvAv9x4B9Vj88AMZnFyEVLilz1EBxKvRUhGqIF4nJpRQBSTm7jS236X4Y9Y2qPsVvaMxwrGJlNhLHEahlFQ==}
dependencies:
'@types/node': 15.12.2
'@types/node': registry.npmmirror.com/@types/node/15.12.2
safe-buffer: 5.2.1
dev: true
@ -425,7 +422,7 @@ packages:
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
engines: {node: '>= 6.0.0'}
dependencies:
debug: 4.3.1
debug: registry.npmmirror.com/debug/4.3.3
transitivePeerDependencies:
- supports-color
dev: false
@ -713,7 +710,7 @@ packages:
normalize-path: 3.0.0
readdirp: 3.6.0
optionalDependencies:
fsevents: 2.3.2
fsevents: registry.npmmirror.com/fsevents/2.3.2
/chownr/1.1.4:
resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==}
@ -773,11 +770,6 @@ packages:
dev: false
optional: true
/commander/2.20.3:
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
dev: false
optional: true
/concat-map/0.0.1:
resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=}
@ -786,7 +778,7 @@ packages:
engines: {node: '>=8'}
dependencies:
dot-prop: 5.3.0
graceful-fs: 4.2.6
graceful-fs: registry.npmmirror.com/graceful-fs/4.2.6
make-dir: 3.1.0
unique-string: 2.0.0
write-file-atomic: 3.0.3
@ -851,16 +843,10 @@ packages:
meow: 3.7.0
dev: true
/debug/2.6.9:
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
dependencies:
ms: 2.0.0
dev: false
/debug/3.2.7:
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
dependencies:
ms: 2.1.3
ms: registry.npmmirror.com/ms/2.1.3
dev: false
/debug/4.3.1:
@ -872,7 +858,7 @@ packages:
supports-color:
optional: true
dependencies:
ms: 2.1.2
ms: registry.npmmirror.com/ms/2.1.2
dev: false
/decamelize/1.2.0:
@ -1170,17 +1156,11 @@ packages:
/fs.realpath/1.0.0:
resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=}
/fsevents/2.3.2:
resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
os: [darwin]
optional: true
/fstream/1.0.12:
resolution: {integrity: sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==}
engines: {node: '>=0.6'}
dependencies:
graceful-fs: 4.2.6
graceful-fs: registry.npmmirror.com/graceful-fs/4.2.6
inherits: 2.0.4
mkdirp: 0.5.5
rimraf: 2.7.1
@ -1277,9 +1257,6 @@ packages:
url-parse-lax: 3.0.0
dev: false
/graceful-fs/4.2.6:
resolution: {integrity: sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==}
/handlebars/4.7.7:
resolution: {integrity: sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==}
engines: {node: '>=0.4.7'}
@ -1290,7 +1267,7 @@ packages:
source-map: 0.6.1
wordwrap: 1.0.0
optionalDependencies:
uglify-js: 3.13.9
uglify-js: registry.npmmirror.com/uglify-js/3.13.9
dev: false
/hapi-auth-jwt2/10.2.0:
@ -1408,7 +1385,7 @@ packages:
engines: {node: '>= 6'}
dependencies:
agent-base: 6.0.2
debug: 4.3.1
debug: registry.npmmirror.com/debug/4.3.3
transitivePeerDependencies:
- supports-color
dev: false
@ -1731,7 +1708,7 @@ packages:
resolution: {integrity: sha512-lByoCHZ6H2zgb6NtsXIqtzQ+6Ji7iVqnrhWxsXLhF+gXmgu6E8+ErpDxCMR439MUG1nfMjWI2HAoM8l0XgSNhw==}
dependencies:
call-me-maybe: 1.0.1
debug: 3.2.7
debug: registry.npmmirror.com/debug/3.2.7
js-yaml: 3.14.1
ono: 4.0.11
dev: false
@ -1832,7 +1809,7 @@ packages:
resolution: {integrity: sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=}
engines: {node: '>=0.10.0'}
dependencies:
graceful-fs: 4.2.6
graceful-fs: registry.npmmirror.com/graceful-fs/4.2.6
parse-json: 2.2.0
pify: 2.3.0
pinkie-promise: 2.0.1
@ -1994,7 +1971,7 @@ packages:
resolution: {integrity: sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==}
hasBin: true
dependencies:
minimist: 1.2.5
minimist: registry.npmmirror.com/minimist/1.2.5
dev: false
/mkdirp/1.0.4:
@ -2012,14 +1989,6 @@ packages:
resolution: {integrity: sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==}
dev: false
/ms/2.0.0:
resolution: {integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=}
dev: false
/ms/2.1.2:
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
dev: false
/ms/2.1.3:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
dev: false
@ -2038,7 +2007,7 @@ packages:
engines: {node: '>= 4.4.x'}
hasBin: true
dependencies:
debug: 3.2.7
debug: registry.npmmirror.com/debug/3.2.7
iconv-lite: 0.4.24
sax: 1.2.4
dev: false
@ -2056,26 +2025,6 @@ packages:
engines: {node: 4.x || >=6.0.0}
dev: false
/node-gyp/3.8.0:
resolution: {integrity: sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==}
engines: {node: '>= 0.8.0'}
hasBin: true
dependencies:
fstream: 1.0.12
glob: 7.1.7
graceful-fs: 4.2.6
mkdirp: 0.5.5
nopt: 3.0.6
npmlog: 4.1.2
osenv: 0.1.5
request: 2.88.2
rimraf: 2.7.1
semver: 5.3.0
tar: 2.2.2
which: 1.3.1
dev: false
optional: true
/node-pre-gyp/0.11.0:
resolution: {integrity: sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q==}
deprecated: 'Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future'
@ -2296,7 +2245,7 @@ packages:
resolution: {integrity: sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=}
engines: {node: '>=0.10.0'}
dependencies:
graceful-fs: 4.2.6
graceful-fs: registry.npmmirror.com/graceful-fs/4.2.6
pify: 2.3.0
pinkie-promise: 2.0.1
dev: true
@ -2484,7 +2433,7 @@ packages:
dependencies:
deep-extend: 0.6.0
ini: 1.3.8
minimist: 1.2.5
minimist: registry.npmmirror.com/minimist/1.2.5
strip-json-comments: 2.0.1
dev: false
@ -2794,7 +2743,7 @@ packages:
node-addon-api: 3.2.1
node-pre-gyp: 0.11.0
optionalDependencies:
node-gyp: 3.8.0
node-gyp: registry.npmmirror.com/node-gyp/3.8.0
dev: false
/sshpk/1.16.1:
@ -2947,7 +2896,7 @@ packages:
resolution: {integrity: sha512-hKslog8LhsXICJ1sMLsA8b8hQ3oUEX0457aLCFJc4zz6m8drmnCtyjbVqS5HycaKFOKVolJc2wFoe8KDPWfp4g==}
dependencies:
call-me-maybe: 1.0.1
debug: 3.2.7
debug: registry.npmmirror.com/debug/3.2.7
json-schema-ref-parser: 4.1.1
ono: 4.0.11
swagger-methods: 1.0.8
@ -3181,13 +3130,6 @@ packages:
hasBin: true
dev: true
/uglify-js/3.13.9:
resolution: {integrity: sha512-wZbyTQ1w6Y7fHdt8sJnHfSIuWeDgk6B5rCb4E/AM6QNNPbOMIZph21PW5dRB3h7Df0GszN+t7RuUH6sWK5bF0g==}
engines: {node: '>=0.8.0'}
hasBin: true
dev: false
optional: true
/uid-safe/2.1.5:
resolution: {integrity: sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==}
engines: {node: '>= 0.8'}
@ -3207,7 +3149,7 @@ packages:
/undefsafe/2.0.3:
resolution: {integrity: sha512-nrXZwwXrD/T/JXeygJqdCO6NZZ1L66HrxM/Z7mIq2oPanoN0F1nLx3lwJMu6AwJY69hdixaFQOuoYsMjE5/C2A==}
dependencies:
debug: 2.6.9
debug: registry.npmmirror.com/debug/2.6.9
dev: false
/unique-string/2.0.0:
@ -3358,7 +3300,7 @@ packages:
/wkx/0.5.0:
resolution: {integrity: sha512-Xng/d4Ichh8uN4l0FToV/258EjMGU9MGcA0HV2d9B/ZpZB3lqQm7nkOdZdm5GhKtLLhAE7PiVQwN4eN+2YJJUg==}
dependencies:
'@types/node': 15.12.2
'@types/node': registry.npmmirror.com/@types/node/15.12.2
dev: false
/wordwrap/1.0.0:
@ -3409,5 +3351,393 @@ packages:
lodash.isequal: 4.5.0
validator: 10.11.0
optionalDependencies:
commander: 2.20.3
commander: registry.npmmirror.com/commander/2.20.3
dev: false
registry.npmmirror.com/@hapi/b64/5.0.0:
resolution: {integrity: sha512-ngu0tSEmrezoiIaNGG6rRvKOUkUuDdf4XTPnONHGYfSGRmDqPZX5oJL6HAdKTo1UQHECbdB4OzhWrfgVppjHUw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@hapi/b64/-/b64-5.0.0.tgz}
name: '@hapi/b64'
version: 5.0.0
dependencies:
'@hapi/hoek': registry.npmmirror.com/@hapi/hoek/9.2.0
dev: false
registry.npmmirror.com/@hapi/boom/9.1.2:
resolution: {integrity: sha512-uJEJtiNHzKw80JpngDGBCGAmWjBtzxDCz17A9NO2zCi8LLBlb5Frpq4pXwyN+2JQMod4pKz5BALwyneCgDg89Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@hapi/boom/-/boom-9.1.2.tgz}
name: '@hapi/boom'
version: 9.1.2
dependencies:
'@hapi/hoek': registry.npmmirror.com/@hapi/hoek/9.2.0
dev: false
registry.npmmirror.com/@hapi/bourne/2.0.0:
resolution: {integrity: sha512-WEezM1FWztfbzqIUbsDzFRVMxSoLy3HugVcux6KDDtTqzPsLE8NDRHfXvev66aH1i2oOKKar3/XDjbvh/OUBdg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@hapi/bourne/-/bourne-2.0.0.tgz}
name: '@hapi/bourne'
version: 2.0.0
dev: false
registry.npmmirror.com/@hapi/cryptiles/5.1.0:
resolution: {integrity: sha512-fo9+d1Ba5/FIoMySfMqPBR/7Pa29J2RsiPrl7bkwo5W5o+AN1dAYQRi4SPrPwwVxVGKjgLOEWrsvt1BonJSfLA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@hapi/cryptiles/-/cryptiles-5.1.0.tgz}
name: '@hapi/cryptiles'
version: 5.1.0
engines: {node: '>=12.0.0'}
dependencies:
'@hapi/boom': registry.npmmirror.com/@hapi/boom/9.1.2
dev: false
registry.npmmirror.com/@hapi/hoek/9.2.0:
resolution: {integrity: sha512-sqKVVVOe5ivCaXDWivIJYVSaEgdQK9ul7a4Kity5Iw7u9+wBAPbX1RMSnLLmp7O4Vzj0WOWwMAJsTL00xwaNug==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@hapi/hoek/-/hoek-9.2.0.tgz}
name: '@hapi/hoek'
version: 9.2.0
dev: false
registry.npmmirror.com/@hapi/iron/6.0.0:
resolution: {integrity: sha512-zvGvWDufiTGpTJPG1Y/McN8UqWBu0k/xs/7l++HVU535NLHXsHhy54cfEMdW7EjwKfbBfM9Xy25FmTiobb7Hvw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@hapi/iron/-/iron-6.0.0.tgz}
name: '@hapi/iron'
version: 6.0.0
dependencies:
'@hapi/b64': registry.npmmirror.com/@hapi/b64/5.0.0
'@hapi/boom': registry.npmmirror.com/@hapi/boom/9.1.2
'@hapi/bourne': registry.npmmirror.com/@hapi/bourne/2.0.0
'@hapi/cryptiles': registry.npmmirror.com/@hapi/cryptiles/5.1.0
'@hapi/hoek': registry.npmmirror.com/@hapi/hoek/9.2.0
dev: false
registry.npmmirror.com/@hapi/podium/4.1.3:
resolution: {integrity: sha512-ljsKGQzLkFqnQxE7qeanvgGj4dejnciErYd30dbrYzUOF/FyS/DOF97qcrT3bhoVwCYmxa6PEMhxfCPlnUcD2g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@hapi/podium/-/podium-4.1.3.tgz}
name: '@hapi/podium'
version: 4.1.3
dependencies:
'@hapi/hoek': registry.npmmirror.com/@hapi/hoek/9.2.0
'@hapi/teamwork': registry.npmmirror.com/@hapi/teamwork/5.1.0
'@hapi/validate': registry.npmmirror.com/@hapi/validate/1.1.3
dev: false
registry.npmmirror.com/@hapi/teamwork/5.1.0:
resolution: {integrity: sha512-llqoQTrAJDTXxG3c4Kz/uzhBS1TsmSBa/XG5SPcVXgmffHE1nFtyLIK0hNJHCB3EuBKT84adzd1hZNY9GJLWtg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@hapi/teamwork/-/teamwork-5.1.0.tgz}
name: '@hapi/teamwork'
version: 5.1.0
engines: {node: '>=12.0.0'}
dev: false
registry.npmmirror.com/@hapi/topo/5.0.0:
resolution: {integrity: sha512-tFJlT47db0kMqVm3H4nQYgn6Pwg10GTZHb1pwmSiv1K4ks6drQOtfEF5ZnPjkvC+y4/bUPHK+bc87QvLcL+WMw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@hapi/topo/-/topo-5.0.0.tgz}
name: '@hapi/topo'
version: 5.0.0
dependencies:
'@hapi/hoek': registry.npmmirror.com/@hapi/hoek/9.2.0
dev: false
registry.npmmirror.com/@hapi/validate/1.1.3:
resolution: {integrity: sha512-/XMR0N0wjw0Twzq2pQOzPBZlDzkekGcoCtzO314BpIEsbXdYGthQUbxgkGDf4nhk1+IPDAsXqWjMohRQYO06UA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@hapi/validate/-/validate-1.1.3.tgz}
name: '@hapi/validate'
version: 1.1.3
dependencies:
'@hapi/hoek': registry.npmmirror.com/@hapi/hoek/9.2.0
'@hapi/topo': registry.npmmirror.com/@hapi/topo/5.0.0
dev: false
registry.npmmirror.com/@sideway/address/4.1.2:
resolution: {integrity: sha512-idTz8ibqWFrPU8kMirL0CoPH/A29XOzzAzpyN3zQ4kAWnzmNfFmRaoMNN6VI8ske5M73HZyhIaW4OuSFIdM4oA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@sideway/address/-/address-4.1.2.tgz}
name: '@sideway/address'
version: 4.1.2
dependencies:
'@hapi/hoek': registry.npmmirror.com/@hapi/hoek/9.2.0
dev: false
registry.npmmirror.com/@sideway/formula/3.0.0:
resolution: {integrity: sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@sideway/formula/-/formula-3.0.0.tgz}
name: '@sideway/formula'
version: 3.0.0
dev: false
registry.npmmirror.com/@sideway/pinpoint/2.0.0:
resolution: {integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz}
name: '@sideway/pinpoint'
version: 2.0.0
dev: false
registry.npmmirror.com/@types/hapi__catbox/10.2.4:
resolution: {integrity: sha512-A6ivRrXD5glmnJna1UAGw87QNZRp/vdFO9U4GS+WhOMWzHnw+oTGkMvg0g6y1930CbeheGOCm7A1qHsqH7AXqg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/hapi__catbox/-/hapi__catbox-10.2.4.tgz}
name: '@types/hapi__catbox'
version: 10.2.4
dev: false
registry.npmmirror.com/@types/hapi__hapi/20.0.10:
resolution: {integrity: sha512-Nt/SY/20/JAlHhbgH616j0g18vsANR9OWoyMdQcytlW6o7TBN+wRgf0MB8AgzjYpuzQam5oTiqyED9WwHmQKYQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/hapi__hapi/-/hapi__hapi-20.0.10.tgz}
name: '@types/hapi__hapi'
version: 20.0.10
dependencies:
'@hapi/boom': registry.npmmirror.com/@hapi/boom/9.1.2
'@hapi/iron': registry.npmmirror.com/@hapi/iron/6.0.0
'@hapi/podium': registry.npmmirror.com/@hapi/podium/4.1.3
'@types/hapi__catbox': registry.npmmirror.com/@types/hapi__catbox/10.2.4
'@types/hapi__mimos': registry.npmmirror.com/@types/hapi__mimos/4.1.4
'@types/hapi__shot': registry.npmmirror.com/@types/hapi__shot/4.1.2
'@types/node': registry.npmmirror.com/@types/node/15.12.2
joi: registry.npmmirror.com/joi/17.4.0
dev: false
registry.npmmirror.com/@types/hapi__mimos/4.1.4:
resolution: {integrity: sha512-i9hvJpFYTT/qzB5xKWvDYaSXrIiNqi4ephi+5Lo6+DoQdwqPXQgmVVOZR+s3MBiHoFqsCZCX9TmVWG3HczmTEQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/hapi__mimos/-/hapi__mimos-4.1.4.tgz}
name: '@types/hapi__mimos'
version: 4.1.4
dependencies:
'@types/mime-db': registry.npmmirror.com/@types/mime-db/1.43.1
dev: false
registry.npmmirror.com/@types/hapi__shot/4.1.2:
resolution: {integrity: sha512-8wWgLVP1TeGqgzZtCdt+F+k15DWQvLG1Yv6ZzPfb3D5WIo5/S+GGKtJBVo2uNEcqabP5Ifc71QnJTDnTmw1axA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/hapi__shot/-/hapi__shot-4.1.2.tgz}
name: '@types/hapi__shot'
version: 4.1.2
dependencies:
'@types/node': registry.npmmirror.com/@types/node/15.12.2
dev: false
registry.npmmirror.com/@types/hapi__vision/5.5.3:
resolution: {integrity: sha512-R4+r9345+5LCM8/0OQ1J8UVVPwnOwMdUVtPrtJE4oNbZ31+rLSy/bLoGpuZJwjROeC006YXbibnRF1hcVQFjGA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/hapi__vision/-/hapi__vision-5.5.3.tgz}
name: '@types/hapi__vision'
version: 5.5.3
dependencies:
'@types/hapi__hapi': registry.npmmirror.com/@types/hapi__hapi/20.0.10
handlebars: registry.npmmirror.com/handlebars/4.7.7
dev: false
registry.npmmirror.com/@types/mime-db/1.43.1:
resolution: {integrity: sha512-kGZJY+R+WnR5Rk+RPHUMERtb2qBRViIHCBdtUrY+NmwuGb8pQdfTqQiCKPrxpdoycl8KWm2DLdkpoSdt479XoQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/mime-db/-/mime-db-1.43.1.tgz}
name: '@types/mime-db'
version: 1.43.1
dev: false
registry.npmmirror.com/@types/node/15.12.2:
resolution: {integrity: sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/node/-/node-15.12.2.tgz}
name: '@types/node'
version: 15.12.2
registry.npmmirror.com/commander/2.20.3:
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz}
name: commander
version: 2.20.3
requiresBuild: true
dev: false
optional: true
registry.npmmirror.com/date-format/4.0.3:
resolution: {integrity: sha512-7P3FyqDcfeznLZp2b+OMitV9Sz2lUnsT87WaTat9nVwqsBkTzPG3lPLNwW3en6F4pHUiWzr6vb8CLhjdK9bcxQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/date-format/-/date-format-4.0.3.tgz}
name: date-format
version: 4.0.3
engines: {node: '>=4.0'}
dev: true
registry.npmmirror.com/debug/2.6.9:
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz}
name: debug
version: 2.6.9
dependencies:
ms: registry.npmmirror.com/ms/2.0.0
dev: false
registry.npmmirror.com/debug/3.2.7:
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz}
name: debug
version: 3.2.7
dependencies:
ms: registry.npmmirror.com/ms/2.1.3
dev: false
registry.npmmirror.com/debug/4.3.3:
resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/debug/-/debug-4.3.3.tgz}
name: debug
version: 4.3.3
engines: {node: '>=6.0'}
peerDependencies:
supports-color: '*'
peerDependenciesMeta:
supports-color:
optional: true
dependencies:
ms: registry.npmmirror.com/ms/2.1.2
registry.npmmirror.com/flatted/3.2.5:
resolution: {integrity: sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/flatted/-/flatted-3.2.5.tgz}
name: flatted
version: 3.2.5
dev: true
registry.npmmirror.com/fs-extra/10.0.1:
resolution: {integrity: sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/fs-extra/-/fs-extra-10.0.1.tgz}
name: fs-extra
version: 10.0.1
engines: {node: '>=12'}
dependencies:
graceful-fs: registry.npmmirror.com/graceful-fs/4.2.6
jsonfile: registry.npmmirror.com/jsonfile/6.1.0
universalify: registry.npmmirror.com/universalify/2.0.0
dev: true
registry.npmmirror.com/fsevents/2.3.2:
resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz}
name: fsevents
version: 2.3.2
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
os: [darwin]
requiresBuild: true
optional: true
registry.npmmirror.com/graceful-fs/4.2.6:
resolution: {integrity: sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.6.tgz}
name: graceful-fs
version: 4.2.6
registry.npmmirror.com/handlebars/4.7.7:
resolution: {integrity: sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/handlebars/-/handlebars-4.7.7.tgz}
name: handlebars
version: 4.7.7
engines: {node: '>=0.4.7'}
hasBin: true
dependencies:
minimist: registry.npmmirror.com/minimist/1.2.5
neo-async: registry.npmmirror.com/neo-async/2.6.2
source-map: registry.npmmirror.com/source-map/0.6.1
wordwrap: registry.npmmirror.com/wordwrap/1.0.0
optionalDependencies:
uglify-js: registry.npmmirror.com/uglify-js/3.13.9
dev: false
registry.npmmirror.com/joi/17.4.0:
resolution: {integrity: sha512-F4WiW2xaV6wc1jxete70Rw4V/VuMd6IN+a5ilZsxG4uYtUXWu2kq9W5P2dz30e7Gmw8RCbY/u/uk+dMPma9tAg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/joi/-/joi-17.4.0.tgz}
name: joi
version: 17.4.0
dependencies:
'@hapi/hoek': registry.npmmirror.com/@hapi/hoek/9.2.0
'@hapi/topo': registry.npmmirror.com/@hapi/topo/5.0.0
'@sideway/address': registry.npmmirror.com/@sideway/address/4.1.2
'@sideway/formula': registry.npmmirror.com/@sideway/formula/3.0.0
'@sideway/pinpoint': registry.npmmirror.com/@sideway/pinpoint/2.0.0
dev: false
registry.npmmirror.com/jsonfile/6.1.0:
resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/jsonfile/-/jsonfile-6.1.0.tgz}
name: jsonfile
version: 6.1.0
dependencies:
universalify: registry.npmmirror.com/universalify/2.0.0
optionalDependencies:
graceful-fs: registry.npmmirror.com/graceful-fs/4.2.6
dev: true
registry.npmmirror.com/log4js/6.4.1:
resolution: {integrity: sha512-iUiYnXqAmNKiIZ1XSAitQ4TmNs8CdZYTAWINARF3LjnsLN8tY5m0vRwd6uuWj/yNY0YHxeZodnbmxKFUOM2rMg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/log4js/-/log4js-6.4.1.tgz}
name: log4js
version: 6.4.1
engines: {node: '>=8.0'}
dependencies:
date-format: registry.npmmirror.com/date-format/4.0.3
debug: registry.npmmirror.com/debug/4.3.3
flatted: registry.npmmirror.com/flatted/3.2.5
rfdc: registry.npmmirror.com/rfdc/1.3.0
streamroller: registry.npmmirror.com/streamroller/3.0.2
transitivePeerDependencies:
- supports-color
dev: true
registry.npmmirror.com/minimist/1.2.5:
resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/minimist/-/minimist-1.2.5.tgz}
name: minimist
version: 1.2.5
dev: false
registry.npmmirror.com/ms/2.0.0:
resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz}
name: ms
version: 2.0.0
dev: false
registry.npmmirror.com/ms/2.1.2:
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz}
name: ms
version: 2.1.2
registry.npmmirror.com/ms/2.1.3:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz}
name: ms
version: 2.1.3
dev: false
registry.npmmirror.com/neo-async/2.6.2:
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/neo-async/-/neo-async-2.6.2.tgz}
name: neo-async
version: 2.6.2
dev: false
registry.npmmirror.com/node-gyp/3.8.0:
resolution: {integrity: sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/node-gyp/-/node-gyp-3.8.0.tgz}
name: node-gyp
version: 3.8.0
engines: {node: '>= 0.8.0'}
hasBin: true
requiresBuild: true
dependencies:
fstream: 1.0.12
glob: 7.1.7
graceful-fs: registry.npmmirror.com/graceful-fs/4.2.6
mkdirp: 0.5.5
nopt: 3.0.6
npmlog: 4.1.2
osenv: 0.1.5
request: 2.88.2
rimraf: 2.7.1
semver: 5.3.0
tar: 2.2.2
which: 1.3.1
dev: false
optional: true
registry.npmmirror.com/rfdc/1.3.0:
resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/rfdc/-/rfdc-1.3.0.tgz}
name: rfdc
version: 1.3.0
dev: true
registry.npmmirror.com/source-map/0.6.1:
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz}
name: source-map
version: 0.6.1
engines: {node: '>=0.10.0'}
dev: false
registry.npmmirror.com/streamroller/3.0.2:
resolution: {integrity: sha512-ur6y5S5dopOaRXBuRIZ1u6GC5bcEXHRZKgfBjfCglMhmIf+roVCECjvkEYzNQOXIN2/JPnkMPW/8B3CZoKaEPA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/streamroller/-/streamroller-3.0.2.tgz}
name: streamroller
version: 3.0.2
engines: {node: '>=8.0'}
dependencies:
date-format: registry.npmmirror.com/date-format/4.0.3
debug: registry.npmmirror.com/debug/4.3.3
fs-extra: registry.npmmirror.com/fs-extra/10.0.1
transitivePeerDependencies:
- supports-color
dev: true
registry.npmmirror.com/uglify-js/3.13.9:
resolution: {integrity: sha512-wZbyTQ1w6Y7fHdt8sJnHfSIuWeDgk6B5rCb4E/AM6QNNPbOMIZph21PW5dRB3h7Df0GszN+t7RuUH6sWK5bF0g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/uglify-js/-/uglify-js-3.13.9.tgz}
name: uglify-js
version: 3.13.9
engines: {node: '>=0.8.0'}
hasBin: true
requiresBuild: true
dev: false
optional: true
registry.npmmirror.com/universalify/2.0.0:
resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/universalify/-/universalify-2.0.0.tgz}
name: universalify
version: 2.0.0
engines: {node: '>= 10.0.0'}
dev: true
registry.npmmirror.com/wordwrap/1.0.0:
resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/wordwrap/-/wordwrap-1.0.0.tgz}
name: wordwrap
version: 1.0.0
dev: false

BIN
public/upload/2050798.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 KiB

BIN
public/upload/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
source/db/data.db

Binary file not shown.

1
source/db/index.ts

@ -3,6 +3,7 @@ import path from "path";
export const sequelize = new Sequelize({
dialect: "sqlite",
storage: path.resolve(__dirname, "./data.db"),
logging: loggerSQL.debug.bind(loggerSQL) // Alternative way to use custom logger, displays all messages
});

37
source/log4js_config.ts

@ -0,0 +1,37 @@
import path from "path";
export default function () {
return {
appenders: {
file: {
type: "file",
filename: path.resolve(__dirname, "../", "./log", "./Site.log"),
},
SQL: {
type: "file",
filename: path.resolve(__dirname, "../", "./log", "./SQL.log"),
},
console: {
type: "console",
},
},
categories: {
default: {
appenders: ["console"],
level: "all",
},
HAPI: {
appenders: ["console"],
level: "all",
},
Site: {
appenders: ["file", "console"],
level: "debug",
},
SQL: {
appenders: ["SQL"],
level: "debug",
},
},
};
}

18
source/main.ts

@ -1,5 +1,21 @@
require("dotenv").config();
import { configure, getLogger } from "log4js";
import log4jsConfig from "./log4js_config";
configure(log4jsConfig());
const loggerSite = getLogger("Site");
const loggerSQL = getLogger("SQL");
const logger = getLogger("HAPI");
loggerSite.level = "debug";
loggerSQL.level = "debug";
global.logger = logger;
global.loggerSite = loggerSite;
global.loggerSQL = loggerSQL;
import { run } from "./run";
run()
run().then((server) => {
global.server = server;
});

8
source/plugins/index.ts

@ -2,16 +2,16 @@ import filePlugin from "./file-plugin";
import path from "path";
import { sourceDir } from "@/util";
import { plugin as routePlugin } from "@noderun/hapi-router";
import {ServerRegisterPluginObject, Plugin} from "@hapi/hapi"
export default [
{
plugin: filePlugin,
plugin: filePlugin as unknown as Plugin<any>,
},
{
plugin: routePlugin,
plugin: routePlugin as Plugin<any>,
options: {
sourceDir: path.resolve(sourceDir, "route"),
type: "session"
},
},
];
] as unknown as ServerRegisterPluginObject<any>;

43
source/route/api/user/index.ts

@ -1,27 +1,29 @@
import { auth, method, route, swagger, validate } from "@noderun/hapi-router";
import {
auth,
method,
route,
swagger,
validate,
config,
} from "@noderun/hapi-router";
import { gSuccess, gFail } from "@/util";
import User from "@/model/User";
import * as bcrypt from "bcrypt";
import * as jwt from "jsonwebtoken";
import * as Joi from "joi";
import { UserSchema } from "@/validateSchema";
export default class {
@validate({
payload: Joi.object({
username: Joi.string().alphanum().min(6).max(35).required(),
password: Joi.string().pattern(new RegExp("^[a-zA-Z0-9]{3,30}$")),
email: Joi.string().email({
minDomainSegments: 2,
tlds: { allow: ["com", "net"] },
}),
}),
payload: UserSchema,
})
@method("POST")
@route("/register")
@swagger("用户注册", "返回注册用户的信息", ["api"])
@auth(false)
async register(request, h) {
let { username, password, email } = request.payload;
if (!username) username = email;
logger.trace(username, email);
try {
const result = await User.findOne({ where: { username: username } });
if (result != null) {
@ -36,6 +38,12 @@ export default class {
}
}
@method("POST")
async logout(request, h) {
request.cookieAuth.clear();
return gSuccess("success");
}
@validate({
payload: Joi.object({
username: Joi.string().alphanum().min(6).max(35).required(),
@ -44,7 +52,6 @@ export default class {
})
@auth(false)
@method("POST")
@route("/login")
@swagger("用户登录", "返回注册用户的信息", ["api"])
async login(request, h) {
let { username, password } = request.payload;
@ -56,13 +63,18 @@ export default class {
if (!validUser) {
return gFail(null, "密码不正确");
}
let token = jwt.sign({ id: result.id }, process.env.KEY);
return gSuccess({ token: token });
//===== JWT ===== Start
// let token = jwt.sign({ id: result.id }, process.env.KEY);
// return gSuccess({ token: token });
//===== JWT ===== End
//===== session ===== Start
request.cookieAuth.set({ id: result.id });
//===== session ===== End
return gSuccess({ id: result.id });
}
@method("DELETE")
@auth()
@route("/del")
@swagger("删除用户", "删除用户账号", ["sum"])
async del(request, h) {
const { id } = request.auth.credentials;
@ -75,13 +87,12 @@ export default class {
}
@method("GET")
@route("/userinfo")
@validate({
headers: Joi.object({
test: Joi.number(),
}).unknown(), // 注意加上这个
})
@swagger("获取用户信息", "返回注册用户的信息", ["用户操作","api"])
@swagger("获取用户信息", "返回注册用户的信息", ["用户操作", "api"])
async userinfo(request, h) {
console.log(request);
const { id } = request.auth.credentials;

7
source/route/api/wx/index.ts

@ -1,7 +0,0 @@
export default class {
wxinit(req,h){
// const {subgbat÷}÷
}
}

13
source/route/demo/_upload.ts

@ -1,5 +1,5 @@
import path from "path";
import { gSuccess, gFail, uploadDir } from "@/util";
import { gSuccess, gFail, uploadDir, uploadPath } from "@/util";
const fs = require("fs");
const multiparty = require("multiparty");
@ -18,7 +18,7 @@ function saveFile(file) {
console.log("rename error: " + err);
reject();
} else {
resolve(0);
resolve(uploadPath + "/" + filename);
}
});
} else {
@ -53,7 +53,7 @@ export default function (req, h) {
"the form is " + Math.floor(percentComplete) + "%" + " complete"
);
});
form.parse(req.payload.file, async function (err, fields, files) {
form.parse(req.payload, async function (err, fields, files) {
// console.log(err, fields, files);
if (err) {
@ -61,10 +61,12 @@ export default function (req, h) {
return;
}
const errList = [];
const fileList = [];
for (let i = 0; i < files.file.length; i++) {
const file = files.file[i];
try {
await saveFile(file);
const dstPath = await saveFile(file);
fileList.push(dstPath);
} catch (error) {
errList.push(error.message);
}
@ -73,7 +75,8 @@ export default function (req, h) {
resolve(gFail(null, errList.join("\n")));
return;
}
resolve(h.view("views/upload.ejs"));
// resolve(h.view("views/upload.ejs"));
resolve([...new Set(fileList)]);
});
});
}

8
source/route/index/index.ts

@ -14,14 +14,14 @@ export default class {
@auth()
@config({
auth: {
mode: "try"
}
mode: "try",
},
})
index(request, h) {
// console.log(request.auth);
if(request.isAuthenticated){
if (request.isAuthenticated) {
// 登录了
}else{
} else {
// 未登录
}
return h.view("views/index.pug");

37
source/route/route.txt

@ -1,19 +1,20 @@
所有路由路径:
/api 该路由需要权限
/api/user/register 该路由不需要权限
/api/user/login 该路由不需要权限
/api/user/del 该路由需要权限
/api/user/userinfo 该路由需要权限
/api/wx/wxinit 该路由需要权限
/color 该路由不需要权限
/color/add 该路由不需要权限
/color/all_color 该路由不需要权限
/demo/{path*} 该路由不需要权限
/demo 该路由不需要权限
/demo/upload 该路由不需要权限
/index/color 该路由不需要权限
/{path*} 该路由不需要权限
/ 该路由需要权限
/login 该路由不需要权限
/login 该路由不需要权限
/about 该路由需要权限
需要权限: GET /api
不需权限: POST /api/user/register
需要权限: POST /api/user/logout
不需权限: POST /api/user/login
需要权限: DELETE /api/user/del
需要权限: GET /api/user/userinfo
需要权限: GET /api/wx/wxinit
不需权限: GET /color
不需权限: POST /color/add
不需权限: GET /color/all_color
不需权限: GET /demo/{path*}
不需权限: GET /demo
不需权限: POST /demo/upload
不需权限: GET /index/color
不需权限: GET /{path*}
需要权限: GET /
不需权限: GET /login
不需权限: POST /login
需要权限: GET /about

33
source/run.ts

@ -1,47 +1,48 @@
"use strict";
import plugins from "@/plugins";
import path from "path";
import { baseDir,templateDir } from "@/util";
import { baseDir, templateDir } from "@/util";
import { validateJwt, validateSession } from "./validate";
const Hapi = require("@hapi/hapi");
import Hapi, {Server} from "@hapi/hapi"
// const Hapi = require("@hapi/hapi");
// const HapiSwagger = require("hapi-swagger");
// const HapiSwagger = require("hapi-swaggered-ui"); // swagger v2版本
const run = async () => {
const run = async (): Promise<Server> => {
const server = Hapi.server({
port: 3000,
host: "localhost",
});
/**
* jwt
*/
//===== JWT ===== Start
// await server.register(require("hapi-auth-jwt2"));
// server.auth.strategy("jwt", "jwt", {
// key: process.env.KEY, // Never Share your secret key
// validate: validateJwt, // validate function defined above
// verifyOptions: { algorithms: ["HS256"] },
// });
/**
* cookie
*/
//===== JWT ===== End
//===== session ===== Start
// https://hapi.dev/module/cookie/api?v=11.0.2
await server.register(require("@hapi/cookie"));
server.auth.strategy("session", "cookie", {
cookie: {
ttl: 1000 * 60 * 60 * 24,
name: "sid", //cookie的名字
password: process.env.KEY,
isSecure: false,
isSecure: false, // false: 允许 Cookie 通过不安全的连接传输,这会使其受到攻击
},
redirectTo: "/login",
validateFunc: validateSession,
});
server.auth.default("session");
//===== session ===== End
await server.register(plugins, {
await server.register(plugins as any, {
routes: {
// prefix: "/api",
},
});
} as any);
/**
*
@ -51,13 +52,13 @@ const run = async () => {
server.views({
engines: {
ejs: require("ejs"),
pug: require("pug")
pug: require("pug"),
},
isCached: process.env.NODE_ENV === "development" ? false : true,
compileMode: "sync", // ejs
relativeTo: baseDir,
layout: false, // ejs
layoutPath: path.resolve(templateDir,"layout"), // ejs
layoutPath: path.resolve(templateDir, "layout"), // ejs
path: "template",
// pug
compileOptions: {
@ -99,9 +100,9 @@ const run = async () => {
},
},
]);
await server.start();
console.log("Server running on %s", server.info.uri);
logger.trace("Server running on %s", server.info.uri);
return server
};
process.on("unhandledRejection", (err) => {

1
source/util/index.ts

@ -6,4 +6,5 @@ export const baseDir = path.resolve(__dirname, "../../");
export const sourceDir = path.resolve(__dirname, "../../source");
export const publicDir = path.resolve(__dirname, "../../public");
export const uploadDir = path.resolve(publicDir, "upload");
export const uploadPath = "/public/upload"; // 图片上传地址
export const templateDir = path.resolve(baseDir, "template");

10
source/validateSchema/index.ts

@ -0,0 +1,10 @@
import * as Joi from "joi";
export const UserSchema = Joi.object({
username: Joi.string().alphanum().min(6).max(35),
password: Joi.string().pattern(new RegExp("^[a-zA-Z0-9]{3,30}$")).required(),
email: Joi.string().email({
minDomainSegments: 2,
tlds: { allow: ["com", "net"] },
}),
}).or("username", "email");

11
tsconfig.json

@ -1,4 +1,7 @@
{
"ts-node": {
"files": true
},
"compilerOptions": {
"outDir": "./dist",
"allowJs": true,
@ -10,12 +13,10 @@
"esModuleInterop": true, // esModuleInterop使import d from 'cjs'commonjs
"baseUrl": ".",
"paths": {
"@/*": ["./source/*"]
"@/*": ["source/*"],
"#/*": ["types/*"]
}
},
"include": [
"./source/**/*",
"./types/global.d.ts"
],
"include": ["source", "types"],
"exclude": ["node_modules"]
}

8
types/global.d.ts

@ -1 +1,9 @@
import { Logger } from "log4js";
import { Server } from "@hapi/hapi";
declare global {
var server: Server;
var logger: Logger;
var loggerSite: Logger;
var loggerSQL: Logger;
}

Loading…
Cancel
Save