Comparing version 2.0.0 to 2.0.1
@@ -5,2 +5,7 @@ # Changelog | ||
## [2.0.1][] - 2021-01-09 | ||
- Use metautil instead of metarhia/common for core utilities | ||
- Fixed spelling in function name: nkdirp -> mkdirp | ||
## [2.0.0][] - 2020-12-21 | ||
@@ -32,4 +37,5 @@ | ||
[unreleased]: https://github.com/metarhia/impress/compare/v2.0.0...HEAD | ||
[unreleased]: https://github.com/metarhia/impress/compare/v2.0.1...HEAD | ||
[2.0.1]: https://github.com/metarhia/impress/compare/v2.0.0...v2.0.1 | ||
[2.0.0]: https://github.com/metarhia/impress/compare/v1.0.9...v2.0.0 | ||
[1.0.9]: https://github.com/metarhia/impress/releases/tag/v1.0.9 |
@@ -5,3 +5,3 @@ 'use strict'; | ||
const { path, events, fs, fsp } = node; | ||
const { common, metavm } = metarhia; | ||
const { metautil, metavm } = metarhia; | ||
@@ -161,3 +161,3 @@ const security = require('./security.js'); | ||
const src = fn.toString(); | ||
const signature = common.between(src, '({', '})'); | ||
const signature = metautil.between(src, '({', '})'); | ||
if (signature === '') return []; | ||
@@ -164,0 +164,0 @@ return signature.split(',').map((s) => s.trim()); |
'use strict'; | ||
const { metarhia } = require('./dependencies.js'); | ||
const { common } = metarhia; | ||
const { metautil } = metarhia; | ||
@@ -71,4 +71,4 @@ const TOKEN = 'token'; | ||
const { characters, secret, length } = this; | ||
const token = common.generateToken(secret, characters, length); | ||
const host = common.parseHost(channel.req.headers.host); | ||
const token = metautil.generateToken(secret, characters, length); | ||
const host = metautil.parseHost(channel.req.headers.host); | ||
const ip = channel.req.connection.remoteAddress; | ||
@@ -108,3 +108,3 @@ const cookie = `${TOKEN}=${token}; ${COOKIE_HOST}=${host}`; | ||
remove(channel, token) { | ||
const host = common.parseHost(channel.req.headers.host); | ||
const host = metautil.parseHost(channel.req.headers.host); | ||
channel.res.setHeader('Set-Cookie', COOKIE_DELETE + host); | ||
@@ -111,0 +111,0 @@ sessions.delete(token); |
@@ -15,4 +15,4 @@ 'use strict'; | ||
const ORG_LENGTH = '@metarhia/'.length; | ||
const metalibs = ['@metarhia/common', '@metarhia/config']; | ||
const metacore = ['metavm', 'metacom', 'metalog']; | ||
const metalibs = ['@metarhia/config']; | ||
const metacore = ['metautil', 'metavm', 'metacom', 'metalog']; | ||
const metaoptional = ['metaschema', 'metasql']; | ||
@@ -19,0 +19,0 @@ const metapkg = [...metalibs, ...metacore, ...metaoptional]; |
@@ -5,6 +5,6 @@ 'use strict'; | ||
const { fs, fsp, path, crypto, util } = node; | ||
const { common } = metarhia; | ||
const { metautil } = metarhia; | ||
const application = require('./application.js'); | ||
const mkdirp = util.promisify(common.nkdirp); | ||
const mkdirp = util.promisify(metautil.mkdirp); | ||
@@ -36,8 +36,8 @@ const COMPRESSED = [ | ||
const uploadFile = async (fileName) => { | ||
const dir1 = common.generateKey(2, common.DIGIT); | ||
const dir2 = common.generateKey(2, common.DIGIT); | ||
const code = common.generateKey(8, common.ALPHA_DIGIT); | ||
const dir1 = metautil.generateKey(2, metautil.DIGIT); | ||
const dir2 = metautil.generateKey(2, metautil.DIGIT); | ||
const code = metautil.generateKey(8, metautil.ALPHA_DIGIT); | ||
const dir = path.join(application.path, 'files', dir1, dir2); | ||
await mkdirp(dir); | ||
const ext = common.fileExt(fileName); | ||
const ext = metautil.fileExt(fileName); | ||
const name = dir1 + dir2 + code; | ||
@@ -44,0 +44,0 @@ const dest = path.join(dir, name); |
@@ -30,3 +30,3 @@ 'use strict'; | ||
task.active = true; | ||
task.interval = metarhia.common.duration(task.interval); | ||
task.interval = metarhia.metautil.duration(task.interval); | ||
task.timer = setInterval(() => { | ||
@@ -33,0 +33,0 @@ if (!task.executing) { |
{ | ||
"name": "impress", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>", | ||
@@ -61,15 +61,15 @@ "description": "Impress application server for Node.js and Metarhia private cloud", | ||
"dependencies": { | ||
"@metarhia/common": "^2.2.0", | ||
"metautil": "^3.0.0", | ||
"@metarhia/config": "^2.0.0", | ||
"metacom": "1.0.0", | ||
"metalog": "^3.0.0", | ||
"metacom": "1.1.0", | ||
"metalog": "^3.1.0", | ||
"metavm": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^7.15.0", | ||
"eslint": "^7.17.0", | ||
"eslint-config-metarhia": "^7.0.1", | ||
"eslint-config-prettier": "^7.0.0", | ||
"eslint-config-prettier": "^7.1.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-impress": "^2.3.1", | ||
"eslint-plugin-prettier": "^3.3.0", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"metatests": "^0.7.2", | ||
@@ -76,0 +76,0 @@ "prettier": "^2.2.1" |
[![impress logo](http://habrastorage.org/files/d67/1b3/be5/d671b3be591d47a9bd10fe857e9d5319.png)](https://github.com/metarhia/impress) | ||
[![CI Status](https://github.com/metarhia/impress/workflows/Testing%20CI/badge.svg)](https://github.com/metarhia/impress/actions?query=workflow%3A%22Testing+CI%22+branch%3Amaster) | ||
[![ci Status](https://github.com/metarhia/impress/workflows/Testing%20CI/badge.svg)](https://github.com/metarhia/impress/actions?query=workflow%3A%22Testing+CI%22+branch%3Amaster) | ||
[![codacy](https://api.codacy.com/project/badge/Grade/6fb7b607a9cb445984aebbc08fdeb13c)](https://www.codacy.com/app/metarhia/impress) | ||
[![snyk](https://snyk.io/test/github/metarhia/impress/badge.svg)](https://snyk.io/test/github/metarhia/impress) | ||
[![npm version](https://img.shields.io/npm/v/impress.svg?style=flat)](https://www.npmjs.com/package/impress) | ||
@@ -70,11 +71,7 @@ [![npm downloads/month](https://img.shields.io/npm/dm/impress.svg)](https://www.npmjs.com/package/impress) | ||
## Contributors | ||
## License & Contributors | ||
- Timur Shemsedinov (marcusaurelius) | ||
- See github for full [contributors list](https://github.com/metarhia/impress/graphs/contributors) | ||
## License | ||
Copyright (c) 2012-2020 Metarhia contributors. | ||
Copyright (c) 2012-2021 Metarhia contributors. | ||
See github for full [contributors list](https://github.com/metarhia/impress/graphs/contributors). | ||
Impress Application Server is [MIT licensed](./LICENSE). | ||
Project coordinator: <timur.shemsedinov@gmail.com> |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33298
77
+ Addedmetautil@^3.0.0
+ Addedmetacom@1.1.0(transitive)
+ Addedmetautil@3.15.0(transitive)
- Removed@metarhia/common@^2.2.0
- Removed@metarhia/common@2.2.2(transitive)
- Removedmetacom@1.0.0(transitive)
Updatedmetacom@1.1.0
Updatedmetalog@^3.1.0