@eik/common
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -0,1 +1,8 @@ | ||
## [1.0.1](https://github.com/eik-lib/common/compare/v1.0.0...v1.0.1) (2020-09-10) | ||
### Bug Fixes | ||
* loosen validation ([ea00919](https://github.com/eik-lib/common/commit/ea00919fcfb1ef7e0dd277e0e06525fd467834cf)) | ||
# 1.0.0 (2020-09-08) | ||
@@ -2,0 +9,0 @@ |
@@ -26,8 +26,4 @@ { | ||
"minProperties": 1, | ||
"propertyNames": { | ||
"pattern": "^[\\./a-z_-][\\./a-z0-9_-]*$" | ||
}, | ||
"additionalProperties": { | ||
"type": "string", | ||
"pattern": "^[\\./a-z_-][\\./a-z0-9_-]*$" | ||
"type": "string" | ||
} | ||
@@ -44,4 +40,3 @@ }, | ||
"format": "uri" | ||
}, | ||
"minItems": 1 | ||
} | ||
} | ||
@@ -48,0 +43,0 @@ ] |
{ | ||
"name": "@eik/common", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Common utilities for Eik modules", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -9,13 +9,62 @@ # Eik Commons | ||
#### assets | ||
#### eik.json | ||
Importing schemas | ||
```js | ||
const { schemas } = require('@eik/common'); | ||
``` | ||
const { error, value } = schemas.assets({ | ||
organisation: 'my-org', | ||
Validating an `eik.json` file | ||
```js | ||
const { error, value } = schemas.validate.eikJSON({ | ||
name: 'my-app', | ||
version: '1.0.0', | ||
server: 'http://eik-server', | ||
files: [], | ||
}); | ||
``` | ||
Using invididual schema validators | ||
##### name | ||
```js | ||
const { error, value } = schemas.validate.name('my-app'); | ||
``` | ||
##### version | ||
```js | ||
const { error, value } = schemas.validate.version('1.0.0'); | ||
``` | ||
##### server | ||
```js | ||
const { error, value } = schemas.validate.server('http://myeikserver.com'); | ||
``` | ||
##### files | ||
```js | ||
const { error, value } = schemas.validate.files({ | ||
'./index.js': '/path/to/file.js' | ||
}); | ||
``` | ||
##### import map | ||
```js | ||
const { error, value } = schemas.validate.importMap('http://meserver.com/map.json'); | ||
const { error, value } = schemas.validate.importMap([ | ||
'http://meserver.com/map1.json', | ||
'http://meserver.com/map2.json', | ||
]); | ||
``` | ||
##### out | ||
```js | ||
const { error, value } = schemas.validate.out('./.eik'); | ||
``` |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
10888
70
0
248