Compare commits
65 Commits
Author | SHA1 | Date | |
---|---|---|---|
00ae980fa7 | |||
2cd2180788 | |||
2a37a42ed0 | |||
e88deb1b5f | |||
05f8e6812b | |||
3affd81165 | |||
7a8f959cf4 | |||
4df1d41cc7 | |||
fb83e41eb3 | |||
27b67b63cc | |||
697afbaf98 | |||
ab3ae7ec90 | |||
b2bb918ee4 | |||
606ff73f58 | |||
7ea17c792d | |||
4478b7588a | |||
9bac6e5809 | |||
cbc7e4ebce | |||
097f54a74c | |||
807624d157 | |||
9d7e2e03d9 | |||
9686caff18 | |||
9260d653a1 | |||
28cd849d0d | |||
89a399bf42 | |||
16048fe96d | |||
04d60333a9 | |||
c30f1f4ab9 | |||
fc91dd3171 | |||
55f8951732 | |||
92f212e9d3 | |||
1a22db26da | |||
0d3bcab40f | |||
e11ace6a23 | |||
f29b632bd2 | |||
25f80b6b59 | |||
176ac34504 | |||
2707542234 | |||
ee025d094c | |||
9bc1c4bf93 | |||
5176a34575 | |||
fe9f9299fc | |||
62cf2fd262 | |||
65e581d48b | |||
4ff97294bb | |||
2d5bd6a2f0 | |||
a2649b7854 | |||
b901f8604b | |||
d70310ce8b | |||
e0e9ceed31 | |||
e3add99efe | |||
91d57c84f4 | |||
37b32d5d5d | |||
f6199740aa | |||
215cf77205 | |||
6e2c86dbb4 | |||
a5b9bbd376 | |||
f6a9810e71 | |||
32423f5475 | |||
5e945ddad6 | |||
a9ad89d320 | |||
23e7cbd1f1 | |||
bad3513fb5 | |||
7bd419e862 | |||
8575abf84d |
66
.gitea/workflows/default_nottags.yaml
Normal file
66
.gitea/workflows/default_nottags.yaml
Normal file
@ -0,0 +1,66 @@
|
||||
name: Default (not tags)
|
||||
|
||||
on:
|
||||
push:
|
||||
tags-ignore:
|
||||
- '**'
|
||||
|
||||
env:
|
||||
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||
|
||||
jobs:
|
||||
security:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install pnpm and npmci
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
|
||||
- name: Run npm prepare
|
||||
run: npmci npm prepare
|
||||
|
||||
- name: Audit production dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --prod
|
||||
continue-on-error: true
|
||||
|
||||
- name: Audit development dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --dev
|
||||
continue-on-error: true
|
||||
|
||||
test:
|
||||
if: ${{ always() }}
|
||||
needs: security
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Test stable
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm test
|
||||
|
||||
- name: Test build
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm build
|
124
.gitea/workflows/default_tags.yaml
Normal file
124
.gitea/workflows/default_tags.yaml
Normal file
@ -0,0 +1,124 @@
|
||||
name: Default (tags)
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
env:
|
||||
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||
|
||||
jobs:
|
||||
security:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Audit production dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --prod
|
||||
continue-on-error: true
|
||||
|
||||
- name: Audit development dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --dev
|
||||
continue-on-error: true
|
||||
|
||||
test:
|
||||
if: ${{ always() }}
|
||||
needs: security
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Test stable
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm test
|
||||
|
||||
- name: Test build
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm build
|
||||
|
||||
release:
|
||||
needs: test
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Release
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm publish
|
||||
|
||||
metadata:
|
||||
needs: test
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
continue-on-error: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Code quality
|
||||
run: |
|
||||
npmci command npm install -g typescript
|
||||
npmci npm install
|
||||
|
||||
- name: Trigger
|
||||
run: npmci trigger
|
||||
|
||||
- name: Build docs and upload artifacts
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
pnpm install -g @gitzone/tsdoc
|
||||
npmci command tsdoc
|
||||
continue-on-error: true
|
18
.gitignore
vendored
18
.gitignore
vendored
@ -1,4 +1,20 @@
|
||||
node_modules/
|
||||
.nogit/
|
||||
|
||||
# artifacts
|
||||
coverage/
|
||||
public/
|
||||
pages/
|
||||
|
||||
# installs
|
||||
node_modules/
|
||||
|
||||
# caches
|
||||
.yarn/
|
||||
.cache/
|
||||
.rpt2_cache
|
||||
|
||||
# builds
|
||||
dist/
|
||||
dist_*/
|
||||
|
||||
# custom
|
@ -1,33 +1,70 @@
|
||||
# gitzone standard
|
||||
image: hosttoday/ht-docker-node:npmts
|
||||
# gitzone ci_default
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .npmci_cache/
|
||||
key: '$CI_BUILD_STAGE'
|
||||
|
||||
stages:
|
||||
- security
|
||||
- test
|
||||
- release
|
||||
- trigger
|
||||
- pages
|
||||
- metadata
|
||||
|
||||
testLEGACY:
|
||||
stage: test
|
||||
before_script:
|
||||
- pnpm install -g pnpm
|
||||
- pnpm install -g @shipzone/npmci
|
||||
- npmci npm prepare
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
auditProductionDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci test legacy
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command pnpm audit --audit-level=high --prod
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
testLTS:
|
||||
auditDevDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command pnpm audit --audit-level=high --dev
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
# ====================
|
||||
# test stage
|
||||
# ====================
|
||||
|
||||
testStable:
|
||||
stage: test
|
||||
script:
|
||||
- npmci test lts
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
|
||||
testSTABLE:
|
||||
testBuild:
|
||||
stage: test
|
||||
script:
|
||||
- npmci test stable
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm build
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
@ -35,29 +72,57 @@ testSTABLE:
|
||||
release:
|
||||
stage: release
|
||||
script:
|
||||
- npmci publish
|
||||
- npmci node install stable
|
||||
- npmci npm publish
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
# ====================
|
||||
# metadata stage
|
||||
# ====================
|
||||
codequality:
|
||||
stage: metadata
|
||||
allow_failure: true
|
||||
only:
|
||||
- tags
|
||||
script:
|
||||
- npmci command npm install -g typescript
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- priv
|
||||
|
||||
trigger:
|
||||
stage: trigger
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci trigger
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
pages:
|
||||
image: hosttoday/ht-docker-node:npmpage
|
||||
stage: pages
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci command npmpage --publish gitlab
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci command npm run buildDocs
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
only:
|
||||
- tags
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
paths:
|
||||
- public
|
||||
allow_failure: true
|
||||
|
11
.vscode/launch.json
vendored
Normal file
11
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"command": "npm test",
|
||||
"name": "Run npm test",
|
||||
"request": "launch",
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
26
.vscode/settings.json
vendored
Normal file
26
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"json.schemas": [
|
||||
{
|
||||
"fileMatch": ["/npmextra.json"],
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"npmci": {
|
||||
"type": "object",
|
||||
"description": "settings for npmci"
|
||||
},
|
||||
"gitzone": {
|
||||
"type": "object",
|
||||
"description": "settings for gitzone",
|
||||
"properties": {
|
||||
"projectType": {
|
||||
"type": "string",
|
||||
"enum": ["website", "element", "service", "npm", "wcc"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
51
README.md
51
README.md
@ -1,51 +0,0 @@
|
||||
# smartjson
|
||||
typed json handlers
|
||||
|
||||
## Availabililty
|
||||
[](https://www.npmjs.com/package/smartjson)
|
||||
[](https://GitLab.com/pushrocks/smartjson)
|
||||
[](https://github.com/pushrocks/smartjson)
|
||||
[](https://pushrocks.gitlab.io/smartjson/)
|
||||
|
||||
## Status for master
|
||||
[](https://GitLab.com/pushrocks/smartjson/commits/master)
|
||||
[](https://GitLab.com/pushrocks/smartjson/commits/master)
|
||||
[](https://www.npmjs.com/package/smartjson)
|
||||
[](https://david-dm.org/pushrocks/smartjson)
|
||||
[](https://www.bithound.io/github/pushrocks/smartjson/master/dependencies/npm)
|
||||
[](https://www.bithound.io/github/pushrocks/smartjson)
|
||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[](http://standardjs.com/)
|
||||
|
||||
## Usage
|
||||
Use TypeScript for best in class instellisense.
|
||||
|
||||
### Classes
|
||||
SmartJson makes it easy to fold and enfold classes into and from JSON
|
||||
|
||||
```javascript
|
||||
import { Foldable, foldDec } from 'smartjson'
|
||||
|
||||
class AwesomeClass extends Foldable {
|
||||
computedValue: string
|
||||
|
||||
@foldDec() // mark anotherValueToStore as foldable
|
||||
anotherValueToStore: string = null
|
||||
constructor () {
|
||||
super() // this is important
|
||||
}
|
||||
}
|
||||
|
||||
let myAwesomeInstance = new AwesomeClass()
|
||||
let foldedObject = myAwesomeInstance.foldToObject() // will return {anotherValueToStore: null}
|
||||
myAwesomeInstance.enfoldFromObject({anotherValueToStore: 'hi'})
|
||||
foldedObject = myAwesomeInstance.foldToObject() // will return {anotherValueToStore: 'hi'}
|
||||
```
|
||||
|
||||
For further information read the linked docs at the top of this README.
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||
|
||||
[](https://push.rocks)
|
16
dist/index.d.ts
vendored
16
dist/index.d.ts
vendored
@ -1,16 +0,0 @@
|
||||
import 'typings-global';
|
||||
export declare class Foldable {
|
||||
saveableProperties: string[];
|
||||
/**
|
||||
* folds a class into an object
|
||||
*/
|
||||
foldToObject(): {};
|
||||
/**
|
||||
* enfolds data from an object
|
||||
*/
|
||||
enfoldFromObject(objectArg: any): void;
|
||||
}
|
||||
/**
|
||||
* Decorator that marks a property as foldable
|
||||
*/
|
||||
export declare let foldDec: () => (target: any, key: string) => void;
|
39
dist/index.js
vendored
39
dist/index.js
vendored
@ -1,39 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
require("typings-global");
|
||||
let lodash = require('lodash');
|
||||
class Foldable {
|
||||
/**
|
||||
* folds a class into an object
|
||||
*/
|
||||
foldToObject() {
|
||||
let newFoldedObject = {};
|
||||
for (let keyName of this.saveableProperties) {
|
||||
newFoldedObject[keyName] = lodash.cloneDeep(this[keyName]);
|
||||
}
|
||||
return newFoldedObject;
|
||||
}
|
||||
/**
|
||||
* enfolds data from an object
|
||||
*/
|
||||
enfoldFromObject(objectArg) {
|
||||
for (let keyName in objectArg) {
|
||||
if (this.saveableProperties.indexOf(keyName) !== -1) {
|
||||
this[keyName] = objectArg[keyName];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.Foldable = Foldable;
|
||||
/**
|
||||
* Decorator that marks a property as foldable
|
||||
*/
|
||||
exports.foldDec = () => {
|
||||
return (target, key) => {
|
||||
if (!target.saveableProperties) {
|
||||
target.saveableProperties = [];
|
||||
}
|
||||
target.saveableProperties.push(key);
|
||||
};
|
||||
};
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2QixJQUFJLE1BQU0sR0FBRyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUE7QUFFOUI7SUFHRTs7T0FFRztJQUNILFlBQVk7UUFDVixJQUFJLGVBQWUsR0FBRyxFQUFFLENBQUE7UUFDeEIsR0FBRyxDQUFDLENBQUMsSUFBSSxPQUFPLElBQUksSUFBSSxDQUFDLGtCQUFrQixDQUFDLENBQUMsQ0FBQztZQUM1QyxlQUFlLENBQUUsT0FBTyxDQUFFLEdBQUcsTUFBTSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUUsT0FBTyxDQUFFLENBQUMsQ0FBQTtRQUNoRSxDQUFDO1FBQ0QsTUFBTSxDQUFDLGVBQWUsQ0FBQTtJQUN4QixDQUFDO0lBRUQ7O09BRUc7SUFDSCxnQkFBZ0IsQ0FBQyxTQUFTO1FBQ3hCLEdBQUcsQ0FBQyxDQUFDLElBQUksT0FBTyxJQUFJLFNBQVMsQ0FBQyxDQUFDLENBQUM7WUFDOUIsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLGtCQUFrQixDQUFDLE9BQU8sQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7Z0JBQ3BELElBQUksQ0FBRSxPQUFPLENBQUUsR0FBRyxTQUFTLENBQUUsT0FBTyxDQUFFLENBQUE7WUFDeEMsQ0FBQztRQUNILENBQUM7SUFDSCxDQUFDO0NBQ0Y7QUF4QkQsNEJBd0JDO0FBRUQ7O0dBRUc7QUFDUSxRQUFBLE9BQU8sR0FBRztJQUNuQixNQUFNLENBQUMsQ0FBQyxNQUFXLEVBQUUsR0FBVztRQUM5QixFQUFFLENBQUMsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDLENBQUM7WUFBQyxNQUFNLENBQUMsa0JBQWtCLEdBQUcsRUFBRSxDQUFBO1FBQUMsQ0FBQztRQUNsRSxNQUFNLENBQUMsa0JBQWtCLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFBO0lBQ3JDLENBQUMsQ0FBQTtBQUNILENBQUMsQ0FBQSJ9
|
16
npmextra.json
Normal file
16
npmextra.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"npmci": {
|
||||
"npmAccessLevel": "public"
|
||||
},
|
||||
"gitzone": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "push.rocks",
|
||||
"gitrepo": "smartjson",
|
||||
"description": "typed json handlers",
|
||||
"npmPackagename": "@push.rocks/smartjson",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
45
package.json
45
package.json
@ -1,11 +1,14 @@
|
||||
{
|
||||
"name": "smartjson",
|
||||
"version": "1.0.1",
|
||||
"name": "@push.rocks/smartjson",
|
||||
"version": "5.0.8",
|
||||
"private": false,
|
||||
"description": "typed json handlers",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"scripts": {
|
||||
"test": "(npmts)"
|
||||
"test": "(tstest test/ --web)",
|
||||
"build": "(tsbuild --web --allowimplicitany)",
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -18,11 +21,33 @@
|
||||
},
|
||||
"homepage": "https://gitlab.com/pushrocks/smartjson#README",
|
||||
"devDependencies": {
|
||||
"smartchai": "^1.0.3",
|
||||
"typings-test": "^1.0.3"
|
||||
"@gitzone/tsbuild": "^2.1.66",
|
||||
"@gitzone/tsrun": "^1.2.44",
|
||||
"@gitzone/tstest": "^1.0.77",
|
||||
"@push.rocks/tapbundle": "^5.0.8",
|
||||
"@types/node": "^20.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash": "^4.17.4",
|
||||
"typings-global": "^1.0.14"
|
||||
}
|
||||
"@push.rocks/smartstring": "^4.0.8",
|
||||
"@types/buffer-json": "^2.0.1",
|
||||
"buffer-json": "^2.0.0",
|
||||
"fast-json-stable-stringify": "^2.1.0",
|
||||
"lodash.clonedeep": "^4.5.0"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
"ts_web/**/*",
|
||||
"dist/**/*",
|
||||
"dist_*/**/*",
|
||||
"dist_ts/**/*",
|
||||
"dist_ts_web/**/*",
|
||||
"assets/**/*",
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
],
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
],
|
||||
"type": "module"
|
||||
}
|
||||
|
5765
pnpm-lock.yaml
generated
Normal file
5765
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
64
readme.md
Normal file
64
readme.md
Normal file
@ -0,0 +1,64 @@
|
||||
# @push.rocks/smartjson
|
||||
typed json handlers
|
||||
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@push.rocks/smartjson)
|
||||
* [gitlab.com (source)](https://gitlab.com/push.rocks/smartjson)
|
||||
* [github.com (source mirror)](https://github.com/push.rocks/smartjson)
|
||||
* [docs (typedoc)](https://push.rocks.gitlab.io/smartjson/)
|
||||
|
||||
## Status for master
|
||||
|
||||
Status Category | Status Badge
|
||||
-- | --
|
||||
GitLab Pipelines | [](https://lossless.cloud)
|
||||
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||
npm | [](https://lossless.cloud)
|
||||
Snyk | [](https://lossless.cloud)
|
||||
TypeScript Support | [](https://lossless.cloud)
|
||||
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
Code Style | [](https://lossless.cloud)
|
||||
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||
|
||||
## Usage
|
||||
|
||||
Use TypeScript for best in class instellisense.
|
||||
|
||||
### Classes
|
||||
|
||||
SmartJson makes it easy to fold and enfold classes into and from JSON
|
||||
|
||||
```javascript
|
||||
import { Smartjson, foldDec } from 'smartjson';
|
||||
|
||||
class AwesomeClass extends Smartjson {
|
||||
static stringify;
|
||||
|
||||
computedValue: string;
|
||||
|
||||
@foldDec() // mark anotherValueToStore as foldable
|
||||
anotherValueToStore: string = null;
|
||||
constructor() {
|
||||
super(); // this is important
|
||||
}
|
||||
}
|
||||
|
||||
let myAwesomeInstance = new AwesomeClass();
|
||||
let foldedObject = myAwesomeInstance.foldToObject(); // will return {anotherValueToStore: null}
|
||||
// You can also fold to Json, with support for buffers
|
||||
// const jsonString = myAwesomeInstance.foldToJson();
|
||||
myAwesomeInstance = AwesomeClass.enfoldFromObject({ anotherValueToStore: 'hi' });
|
||||
foldedObject = myAwesomeInstance.foldToObject(); // will return {anotherValueToStore: 'hi'}
|
||||
```
|
||||
|
||||
## Contribution
|
||||
|
||||
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
|
||||
## Legal
|
||||
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
62
test/test.both.ts
Normal file
62
test/test.both.ts
Normal file
@ -0,0 +1,62 @@
|
||||
import { tap, expect } from '@push.rocks/tapbundle';
|
||||
|
||||
import * as smartjson from '../ts/index.js';
|
||||
|
||||
class SomeClass extends smartjson.Smartjson {
|
||||
@smartjson.foldDec() thisis: string = 'test';
|
||||
constructor() {
|
||||
super();
|
||||
console.log(this.saveableProperties);
|
||||
}
|
||||
}
|
||||
|
||||
let mySomeClass: SomeClass;
|
||||
|
||||
tap.test('should create a Foldable extended instance', async () => {
|
||||
mySomeClass = new SomeClass();
|
||||
expect(mySomeClass).toBeInstanceOf(SomeClass);
|
||||
expect(mySomeClass).toBeInstanceOf(smartjson.Smartjson);
|
||||
});
|
||||
|
||||
tap.test('should create a folded object', async () => {
|
||||
let foldedObject = mySomeClass.foldToObject();
|
||||
expect(foldedObject).property('thisis').toEqual('test');
|
||||
});
|
||||
|
||||
tap.test('should enfold from object', async () => {
|
||||
const mySomeClass2 = SomeClass.enfoldFromObject({ thisis: 'test2' });
|
||||
expect(mySomeClass2).property('thisis').toEqual('test2');
|
||||
});
|
||||
|
||||
tap.test('should products stable jsons', async () => {
|
||||
const jsonString = smartjson.stringify({
|
||||
a: 1,
|
||||
f: 6,
|
||||
b: 3,
|
||||
c: 3,
|
||||
e: 5,
|
||||
d: 4,
|
||||
});
|
||||
console.log(jsonString);
|
||||
});
|
||||
|
||||
tap.test('should work with base64', async () => {
|
||||
const someObject = {
|
||||
hi: 'there',
|
||||
thisIs: 'awesome',
|
||||
};
|
||||
|
||||
const base64Json = smartjson.stringifyBase64(someObject);
|
||||
console.log(base64Json);
|
||||
const decodedObject = smartjson.parseBase64(base64Json);
|
||||
expect(decodedObject).toEqual(someObject);
|
||||
});
|
||||
|
||||
tap.test('stringify should handle plain string', async () => {
|
||||
const stringifiedString = smartjson.stringify('hello');
|
||||
console.log(stringifiedString);
|
||||
expect(stringifiedString).toEqual('"hello"');
|
||||
expect(smartjson.parse(stringifiedString)).toEqual('hello');
|
||||
});
|
||||
|
||||
tap.start();
|
1
test/test.d.ts
vendored
1
test/test.d.ts
vendored
@ -1 +0,0 @@
|
||||
import 'typings-test';
|
42
test/test.js
42
test/test.js
@ -1,42 +0,0 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
require("typings-test");
|
||||
const smartchai_1 = require("smartchai");
|
||||
const index_1 = require("../dist/index");
|
||||
class SomeClass extends index_1.Foldable {
|
||||
constructor() {
|
||||
super();
|
||||
this.thisis = 'test';
|
||||
console.log(this.saveableProperties);
|
||||
}
|
||||
}
|
||||
__decorate([
|
||||
index_1.foldDec(),
|
||||
__metadata("design:type", String)
|
||||
], SomeClass.prototype, "thisis", void 0);
|
||||
let mySomeClass;
|
||||
describe('smartjson', function () {
|
||||
it('should create a Foldable extended instance', function () {
|
||||
mySomeClass = new SomeClass();
|
||||
smartchai_1.expect(mySomeClass).to.be.instanceof(SomeClass);
|
||||
smartchai_1.expect(mySomeClass).to.be.instanceof(index_1.Foldable);
|
||||
});
|
||||
it('should create a folded object', function () {
|
||||
let foldedObject = mySomeClass.foldToObject();
|
||||
smartchai_1.expect(foldedObject).property('thisis').to.equal('test');
|
||||
});
|
||||
it('should enfold from object', function () {
|
||||
mySomeClass.enfoldFromObject({ thisis: 'test2' });
|
||||
smartchai_1.expect(mySomeClass).property('thisis').to.equal('test2');
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQSx3QkFBcUI7QUFDckIseUNBQWtDO0FBRWxDLHlDQUFpRDtBQUVqRCxlQUFnQixTQUFRLGdCQUFRO0lBRzlCO1FBQ0UsS0FBSyxFQUFFLENBQUE7UUFGVCxXQUFNLEdBQVcsTUFBTSxDQUFBO1FBR3JCLE9BQU8sQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLGtCQUFrQixDQUFDLENBQUE7SUFDdEMsQ0FBQztDQUNGO0FBTEM7SUFEQyxlQUFPLEVBQUU7O3lDQUNhO0FBT3pCLElBQUksV0FBc0IsQ0FBQTtBQUUxQixRQUFRLENBQUMsV0FBVyxFQUFFO0lBQ3BCLEVBQUUsQ0FBQyw0Q0FBNEMsRUFBRTtRQUMvQyxXQUFXLEdBQUcsSUFBSSxTQUFTLEVBQUUsQ0FBQTtRQUM3QixrQkFBTSxDQUFDLFdBQVcsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsVUFBVSxDQUFDLFNBQVMsQ0FBQyxDQUFBO1FBQy9DLGtCQUFNLENBQUMsV0FBVyxDQUFDLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxVQUFVLENBQUMsZ0JBQVEsQ0FBQyxDQUFBO0lBQ2hELENBQUMsQ0FBQyxDQUFBO0lBRUYsRUFBRSxDQUFDLCtCQUErQixFQUFFO1FBQ2xDLElBQUksWUFBWSxHQUFHLFdBQVcsQ0FBQyxZQUFZLEVBQUUsQ0FBQTtRQUM3QyxrQkFBTSxDQUFDLFlBQVksQ0FBQyxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUMsQ0FBQyxFQUFFLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxDQUFBO0lBQzFELENBQUMsQ0FBQyxDQUFBO0lBRUYsRUFBRSxDQUFDLDJCQUEyQixFQUFFO1FBQzlCLFdBQVcsQ0FBQyxnQkFBZ0IsQ0FBQyxFQUFDLE1BQU0sRUFBRSxPQUFPLEVBQUMsQ0FBQyxDQUFBO1FBQy9DLGtCQUFNLENBQUMsV0FBVyxDQUFDLENBQUMsUUFBUSxDQUFDLFFBQVEsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUE7SUFDMUQsQ0FBQyxDQUFDLENBQUE7QUFDSixDQUFDLENBQUMsQ0FBQSJ9
|
33
test/test.ts
33
test/test.ts
@ -1,33 +0,0 @@
|
||||
import 'typings-test'
|
||||
import { expect } from 'smartchai'
|
||||
|
||||
import { Foldable, foldDec } from '../dist/index'
|
||||
|
||||
class SomeClass extends Foldable {
|
||||
@foldDec()
|
||||
thisis: string = 'test'
|
||||
constructor () {
|
||||
super()
|
||||
console.log(this.saveableProperties)
|
||||
}
|
||||
}
|
||||
|
||||
let mySomeClass: SomeClass
|
||||
|
||||
describe('smartjson', function () {
|
||||
it('should create a Foldable extended instance', function () {
|
||||
mySomeClass = new SomeClass()
|
||||
expect(mySomeClass).to.be.instanceof(SomeClass)
|
||||
expect(mySomeClass).to.be.instanceof(Foldable)
|
||||
})
|
||||
|
||||
it('should create a folded object', function () {
|
||||
let foldedObject = mySomeClass.foldToObject()
|
||||
expect(foldedObject).property('thisis').to.equal('test')
|
||||
})
|
||||
|
||||
it('should enfold from object', function () {
|
||||
mySomeClass.enfoldFromObject({thisis: 'test2'})
|
||||
expect(mySomeClass).property('thisis').to.equal('test2')
|
||||
})
|
||||
})
|
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartjson',
|
||||
version: '5.0.8',
|
||||
description: 'typed json handlers'
|
||||
}
|
111
ts/index.ts
111
ts/index.ts
@ -1,38 +1,109 @@
|
||||
import 'typings-global'
|
||||
let lodash = require('lodash')
|
||||
import * as plugins from './smartjson.plugins.js';
|
||||
|
||||
export class Foldable {
|
||||
saveableProperties: string[]
|
||||
/**
|
||||
* allows you to parse a json
|
||||
*/
|
||||
export const parse = plugins.bufferJson.parse;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param objArg
|
||||
* @param optionsArg
|
||||
*/
|
||||
export const stringify = (
|
||||
objArg: any,
|
||||
simpleOrderArray?: string[],
|
||||
optionsArg: plugins.IStableJsonTypes['Options'] = {}
|
||||
): string => {
|
||||
const bufferedJson = plugins.bufferJson.stringify(objArg);
|
||||
objArg = JSON.parse(bufferedJson);
|
||||
let returnJson = plugins.stableJson(objArg, optionsArg);
|
||||
return returnJson;
|
||||
};
|
||||
|
||||
export const stringifyBase64 = (...args: Parameters<typeof stringify>): string => {
|
||||
const stringifiedResult = stringify(...args);
|
||||
return plugins.smartstring.base64.encodeUri(stringifiedResult);
|
||||
};
|
||||
|
||||
export const parseBase64 = (base64JsonStringArg: string) => {
|
||||
const simpleStringified = plugins.smartstring.base64.decode(base64JsonStringArg);
|
||||
return parse(simpleStringified);
|
||||
};
|
||||
|
||||
parse;
|
||||
|
||||
export class Smartjson {
|
||||
/**
|
||||
* enfolds data from an object
|
||||
*/
|
||||
public static enfoldFromObject(objectArg) {
|
||||
const newInstance = new this();
|
||||
for (const keyName in objectArg) {
|
||||
if (newInstance.saveableProperties.indexOf(keyName) !== -1) {
|
||||
newInstance[keyName] = objectArg[keyName];
|
||||
}
|
||||
}
|
||||
return newInstance;
|
||||
}
|
||||
|
||||
/**
|
||||
* enfold from json
|
||||
*/
|
||||
public static enfoldFromJson(jsonArg: string) {
|
||||
const objectFromJson = parse(jsonArg);
|
||||
return this.enfoldFromObject(objectFromJson);
|
||||
}
|
||||
|
||||
// ========
|
||||
// INSTANCE
|
||||
// ========
|
||||
|
||||
public saveableProperties: string[];
|
||||
|
||||
/**
|
||||
* folds a class into an object
|
||||
*/
|
||||
foldToObject () {
|
||||
let newFoldedObject = {}
|
||||
for (let keyName of this.saveableProperties) {
|
||||
newFoldedObject[ keyName ] = lodash.cloneDeep(this[ keyName ])
|
||||
public foldToObject() {
|
||||
const newFoldedObject: { [key: string]: any } = {};
|
||||
const trackMap = [];
|
||||
for (const keyName of this.saveableProperties) {
|
||||
let value = this[keyName];
|
||||
if (value instanceof Smartjson) {
|
||||
if (trackMap.includes(value)) {
|
||||
throw new Error('cycle detected');
|
||||
}
|
||||
return newFoldedObject
|
||||
trackMap.push(value);
|
||||
value = value.foldToObject();
|
||||
}
|
||||
newFoldedObject[keyName] = plugins.lodashCloneDeep(value);
|
||||
}
|
||||
return newFoldedObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* enfolds data from an object
|
||||
* folds a class into an object
|
||||
*/
|
||||
enfoldFromObject(objectArg) {
|
||||
for (let keyName in objectArg) {
|
||||
if (this.saveableProperties.indexOf(keyName) !== -1) {
|
||||
this[ keyName ] = objectArg[ keyName ]
|
||||
}
|
||||
}
|
||||
public foldToJson() {
|
||||
const foldedObject = this.foldToObject();
|
||||
return stringify(foldedObject);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Decorator that marks a property as foldable
|
||||
*/
|
||||
export let foldDec = () => {
|
||||
export const foldDec = () => {
|
||||
return (target: any, key: string) => {
|
||||
if (!target.saveableProperties) { target.saveableProperties = [] }
|
||||
target.saveableProperties.push(key)
|
||||
}
|
||||
if (!target.saveableProperties) {
|
||||
target.saveableProperties = [];
|
||||
}
|
||||
target.saveableProperties.push(key);
|
||||
};
|
||||
};
|
||||
|
||||
export const deepEqualObjects = (object1: any, object2: any): boolean => {
|
||||
const object1String = stringify(object1);
|
||||
const object2String = stringify(object2);
|
||||
return object1String === object2String;
|
||||
};
|
||||
|
31
ts/smartjson.plugins.ts
Normal file
31
ts/smartjson.plugins.ts
Normal file
@ -0,0 +1,31 @@
|
||||
// @pushrocks scope
|
||||
import * as smartstring from '@push.rocks/smartstring';
|
||||
|
||||
export { smartstring };
|
||||
|
||||
// third party scope
|
||||
import lodashCloneDeep from 'lodash.clonedeep';
|
||||
import stableJson2 from 'fast-json-stable-stringify';
|
||||
import bufferJson from 'buffer-json';
|
||||
|
||||
const stableJson = stableJson2 as any;
|
||||
|
||||
export { bufferJson, lodashCloneDeep, stableJson };
|
||||
|
||||
export interface IStableJsonTypes {
|
||||
Comparator: (
|
||||
a: IStableJsonTypes['CompareDescriptor'],
|
||||
b: IStableJsonTypes['CompareDescriptor']
|
||||
) => number;
|
||||
CompareDescriptor: {
|
||||
key: string;
|
||||
value: any;
|
||||
};
|
||||
Options: {
|
||||
cmp?: (
|
||||
a: IStableJsonTypes['CompareDescriptor'],
|
||||
b: IStableJsonTypes['CompareDescriptor']
|
||||
) => number;
|
||||
cycles?: boolean;
|
||||
};
|
||||
}
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": true
|
||||
"experimentalDecorators": true,
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"moduleResolution": "nodenext",
|
||||
"esModuleInterop": true
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "tslint-config-standard"
|
||||
}
|
190
yarn.lock
190
yarn.lock
@ -1,190 +0,0 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@types/chai-as-promised@0.0.29":
|
||||
version "0.0.29"
|
||||
resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-0.0.29.tgz#43d52892aa998e185a3de3e2477edb8573be1d77"
|
||||
dependencies:
|
||||
"@types/chai" "*"
|
||||
"@types/promises-a-plus" "*"
|
||||
|
||||
"@types/chai-string@^1.1.30":
|
||||
version "1.1.30"
|
||||
resolved "https://registry.yarnpkg.com/@types/chai-string/-/chai-string-1.1.30.tgz#4d8744b31a5a2295fc01c981ed1e2d4c8a070f0a"
|
||||
dependencies:
|
||||
"@types/chai" "*"
|
||||
|
||||
"@types/chai@*", "@types/chai@^3.4.35":
|
||||
version "3.4.35"
|
||||
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.4.35.tgz#e8d65f83492d2944f816fc620741821c28a8c900"
|
||||
|
||||
"@types/mocha@^2.2.31":
|
||||
version "2.2.39"
|
||||
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.39.tgz#f68d63db8b69c38e9558b4073525cf96c4f7a829"
|
||||
|
||||
"@types/promises-a-plus@*":
|
||||
version "0.0.27"
|
||||
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
|
||||
|
||||
assertion-error@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
|
||||
|
||||
balanced-match@^0.4.1:
|
||||
version "0.4.2"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
|
||||
|
||||
brace-expansion@^1.0.0:
|
||||
version "1.1.6"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9"
|
||||
dependencies:
|
||||
balanced-match "^0.4.1"
|
||||
concat-map "0.0.1"
|
||||
|
||||
chai-as-promised@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-6.0.0.tgz#1a02a433a6f24dafac63b9c96fa1684db1aa8da6"
|
||||
dependencies:
|
||||
check-error "^1.0.2"
|
||||
|
||||
chai-string@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.3.0.tgz#df6139f294391b1035be5606f60a843b3a5041e7"
|
||||
|
||||
chai@^3.5.0:
|
||||
version "3.5.0"
|
||||
resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
|
||||
dependencies:
|
||||
assertion-error "^1.0.1"
|
||||
deep-eql "^0.1.3"
|
||||
type-detect "^1.0.0"
|
||||
|
||||
check-error@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
|
||||
|
||||
concat-map@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||
|
||||
deep-eql@^0.1.3:
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2"
|
||||
dependencies:
|
||||
type-detect "0.1.1"
|
||||
|
||||
fs.realpath@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||
|
||||
glob@^7.0.0:
|
||||
version "7.1.1"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
|
||||
dependencies:
|
||||
fs.realpath "^1.0.0"
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "^3.0.2"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||
dependencies:
|
||||
once "^1.3.0"
|
||||
wrappy "1"
|
||||
|
||||
inherits@2:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||
|
||||
interpret@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c"
|
||||
|
||||
lodash@^4.17.4:
|
||||
version "4.17.4"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
|
||||
|
||||
minimatch@^3.0.2:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
|
||||
dependencies:
|
||||
brace-expansion "^1.0.0"
|
||||
|
||||
once@^1.3.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
dependencies:
|
||||
wrappy "1"
|
||||
|
||||
path-is-absolute@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||
|
||||
path-parse@^1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
|
||||
|
||||
rechoir@^0.6.2:
|
||||
version "0.6.2"
|
||||
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
|
||||
dependencies:
|
||||
resolve "^1.1.6"
|
||||
|
||||
resolve@^1.1.6:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.2.tgz#1f0442c9e0cbb8136e87b9305f932f46c7f28235"
|
||||
dependencies:
|
||||
path-parse "^1.0.5"
|
||||
|
||||
semver@^5.3.0:
|
||||
version "5.3.0"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
|
||||
|
||||
shelljs@^0.7.4:
|
||||
version "0.7.6"
|
||||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad"
|
||||
dependencies:
|
||||
glob "^7.0.0"
|
||||
interpret "^1.0.0"
|
||||
rechoir "^0.6.2"
|
||||
|
||||
smartchai@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/smartchai/-/smartchai-1.0.3.tgz#de6d010bb8b5aef24cb70b31a5f5334e8c41b72f"
|
||||
dependencies:
|
||||
"@types/chai" "^3.4.35"
|
||||
"@types/chai-as-promised" "0.0.29"
|
||||
"@types/chai-string" "^1.1.30"
|
||||
chai "^3.5.0"
|
||||
chai-as-promised "^6.0.0"
|
||||
chai-string "^1.3.0"
|
||||
|
||||
type-detect@0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"
|
||||
|
||||
type-detect@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
|
||||
|
||||
typings-global@*, typings-global@^1.0.14:
|
||||
version "1.0.14"
|
||||
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.14.tgz#ab682720a03d6b9278869fb5c30c30d7dc61d12c"
|
||||
dependencies:
|
||||
semver "^5.3.0"
|
||||
shelljs "^0.7.4"
|
||||
|
||||
typings-test@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/typings-test/-/typings-test-1.0.3.tgz#fbab895eb3f0c44842e73db059f65946b971e369"
|
||||
dependencies:
|
||||
"@types/mocha" "^2.2.31"
|
||||
typings-global "*"
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
Reference in New Issue
Block a user