From 997d28239f31fa2d357cbc856404b171cc58c174 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Tue, 1 Oct 2019 13:05:02 +0200 Subject: [PATCH] fix(core): update --- package-lock.json | 22 ++++++++---------- package.json | 5 ++-- ts/index.ts | 6 ++--- ts/smartpersona.classes.company.ts | 23 +++++++++++++++++++ ts/smartpersona.classes.person.ts | 5 ++++ ...zation.ts => smartpersona.classes.role.ts} | 4 ++++ ts/smartpersona.plugins.ts | 10 +++++++- ts/tsconfig.json | 16 +++++++++++++ 8 files changed, 72 insertions(+), 19 deletions(-) create mode 100644 ts/smartpersona.classes.company.ts rename ts/{smartpersona.classes.organization.ts => smartpersona.classes.role.ts} (67%) create mode 100644 ts/tsconfig.json diff --git a/package-lock.json b/package-lock.json index cecaf05..464cecd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -199,7 +199,6 @@ "version": "3.0.8", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartjson/-/smartjson-3.0.8.tgz", "integrity": "sha512-EjC3611RSZaZmK+nXxXrYDBxdxYWtrxjOrZtQzbYn0yM33KSCH0sLIAG8B2wYZVAOj4A2pC8mVxFSJ1w3iRFHg==", - "dev": true, "requires": { "@types/fast-json-stable-stringify": "^2.0.0", "fast-json-stable-stringify": "^2.0.0", @@ -325,9 +324,9 @@ } }, "@tsclass/tsclass": { - "version": "2.0.6", - "resolved": "https://verdaccio.lossless.one/@tsclass%2ftsclass/-/tsclass-2.0.6.tgz", - "integrity": "sha512-D+qusqR6A8PBwkY68o082H5ba7VdwD/cJJ5e3QB2AF/Jov63t8m/NCEGQpSNRwFtmH189/wT5ih0AifbvgiFig==" + "version": "2.0.9", + "resolved": "https://verdaccio.lossless.one/@tsclass%2ftsclass/-/tsclass-2.0.9.tgz", + "integrity": "sha512-IS3D3Fqso4/kSPuVnJuxF6rAU4yj1WuJL5++5A/LocGfaOTaP0WLBPaapuy/BHlPD3mPKY6KmGFXtV0iszu+eA==" }, "@types/chai": { "version": "4.2.3", @@ -366,8 +365,7 @@ "@types/fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://verdaccio.lossless.one/@types%2ffast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha512-mky/O83TXmGY39P1H9YbUpjV6l6voRYlufqfFCvel8l1phuy8HRjdWc1rrPuN53ITBJlbyMSV6z3niOySO5pgQ==", - "dev": true + "integrity": "sha512-mky/O83TXmGY39P1H9YbUpjV6l6voRYlufqfFCvel8l1phuy8HRjdWc1rrPuN53ITBJlbyMSV6z3niOySO5pgQ==" }, "@types/figures": { "version": "3.0.1", @@ -409,9 +407,9 @@ "dev": true }, "@types/node": { - "version": "10.14.19", - "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-10.14.19.tgz", - "integrity": "sha512-j6Sqt38ssdMKutXBUuAcmWF8QtHW1Fwz/mz4Y+Wd9mzpBiVFirjpNQf363hG5itkG+yGaD+oiLyb50HxJ36l9Q==", + "version": "12.7.8", + "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.7.8.tgz", + "integrity": "sha512-FMdVn84tJJdV+xe+53sYiZS4R5yn1mAIxfj+DVoNiQjTYz1+OYmjwEZr1ev9nU0axXwda0QDbYl06QHanRVH3A==", "dev": true }, "@types/through2": { @@ -766,8 +764,7 @@ "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://verdaccio.lossless.one/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, "figures": { "version": "3.0.0", @@ -964,8 +961,7 @@ "lodash.clonedeep": { "version": "4.5.0", "resolved": "https://verdaccio.lossless.one/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" }, "log-symbols": { "version": "2.2.0", diff --git a/package.json b/package.json index db2fa65..e98fd6c 100644 --- a/package.json +++ b/package.json @@ -16,11 +16,12 @@ "@gitzone/tsbuild": "^2.0.22", "@gitzone/tstest": "^1.0.15", "@pushrocks/tapbundle": "^3.0.7", - "@types/node": "^10.11.7", + "@types/node": "^12.7.8", "tslint": "^5.11.0", "tslint-config-prettier": "^1.15.0" }, "dependencies": { - "@tsclass/tsclass": "^2.0.6" + "@pushrocks/smartjson": "^3.0.8", + "@tsclass/tsclass": "^2.0.9" } } diff --git a/ts/index.ts b/ts/index.ts index 5feb638..f8d69bf 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -1,3 +1,3 @@ -import * as plugins from './smartpersona.plugins'; - -export let standardExport = 'Hi there! :) This is an exported string'; +export * from './smartpersona.classes.company'; +export * from './smartpersona.classes.person'; +export * from './smartpersona.classes.role'; diff --git a/ts/smartpersona.classes.company.ts b/ts/smartpersona.classes.company.ts new file mode 100644 index 0000000..4d42338 --- /dev/null +++ b/ts/smartpersona.classes.company.ts @@ -0,0 +1,23 @@ +import * as plugins from './smartpersona.plugins'; +import { foldDec } from '@pushrocks/smartjson'; + +export class Company extends plugins.smartjson.Smartjson implements plugins.tsclass.ICompany { + @foldDec() + public foundedDate: plugins.tsclass.IDate; + + @foldDec() + public closedDate: plugins.tsclass.IDate; + + @foldDec() + public name: string; + + @foldDec() + public status: plugins.tsclass.TCompanyStatus; + + @foldDec() + public contact: plugins.tsclass.IContact; + + constructor() { + super(); + } +} \ No newline at end of file diff --git a/ts/smartpersona.classes.person.ts b/ts/smartpersona.classes.person.ts index e69de29..045da97 100644 --- a/ts/smartpersona.classes.person.ts +++ b/ts/smartpersona.classes.person.ts @@ -0,0 +1,5 @@ +import * as plugins from './smartpersona.plugins'; + +export class Person extends plugins.smartjson.Smartjson implements plugins.tsclass.IPerson { + +} diff --git a/ts/smartpersona.classes.organization.ts b/ts/smartpersona.classes.role.ts similarity index 67% rename from ts/smartpersona.classes.organization.ts rename to ts/smartpersona.classes.role.ts index fac902e..cf811d8 100644 --- a/ts/smartpersona.classes.organization.ts +++ b/ts/smartpersona.classes.role.ts @@ -1 +1,5 @@ import * as plugins from './smartpersona.plugins'; + +export class Role { + +}; diff --git a/ts/smartpersona.plugins.ts b/ts/smartpersona.plugins.ts index 4d82f82..4fcd111 100644 --- a/ts/smartpersona.plugins.ts +++ b/ts/smartpersona.plugins.ts @@ -1,5 +1,13 @@ +// @tsclass scope import * as tsclass from '@tsclass/tsclass'; export { tsclass -}; \ No newline at end of file +}; + +// @pushrocks scope +import * as smartjson from '@pushrocks/smartjson'; + +export { + smartjson +}; diff --git a/ts/tsconfig.json b/ts/tsconfig.json new file mode 100644 index 0000000..dba076c --- /dev/null +++ b/ts/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "es2017", + "module": "es2015", + "moduleResolution": "node", + "lib": ["es2017", "dom"], + "declaration": true, + "inlineSources": true, + "inlineSourceMap": true, + "noUnusedLocals": true, + "noFallthroughCasesInSwitch": true, + "outDir": "dist/", + "skipLibCheck": true, + "experimentalDecorators": true + } +}