Compare commits

...

26 Commits

Author SHA1 Message Date
0c1b9b3345 3.0.6 2020-02-15 15:17:47 +00:00
b32d64e5f2 fix(core): update 2020-02-15 15:17:46 +00:00
8342460c65 3.0.5 2020-02-15 15:16:52 +00:00
363142392b fix(core): update 2020-02-15 15:16:51 +00:00
390ee5edb7 3.0.4 2020-02-09 16:38:23 +00:00
35341c49ab fix(core): update 2020-02-09 16:38:22 +00:00
ba42658ee9 3.0.3 2020-01-19 10:20:40 +00:00
68687c2bca fix(core): update 2020-01-19 10:20:39 +00:00
2b76f54408 3.0.2 2020-01-19 10:20:19 +00:00
64561ab878 fix(core): update 2020-01-19 10:20:19 +00:00
8bb8574da7 3.0.1 2020-01-19 10:19:39 +00:00
6a5ecfcb19 fix(core): update 2020-01-19 10:19:38 +00:00
9a1c79c5de 3.0.0 2020-01-19 09:57:18 +00:00
1da9d73e5a BREAKING CHANGE(removed direct links in favour of directory style api): update 2020-01-19 09:57:17 +00:00
75173b1b37 2.0.13 2019-11-03 01:21:38 +01:00
e826047b9c fix(core): update 2019-11-03 01:21:38 +01:00
dd39b5d2ce 2.0.12 2019-10-21 17:29:11 +02:00
ab24929c6c fix(core): update 2019-10-21 17:29:10 +02:00
5da0b73a9d 2.0.11 2019-10-02 11:30:22 +02:00
73e10fc59b fix(core): update 2019-10-02 11:30:21 +02:00
a2e8b41042 2.0.10 2019-10-02 11:11:22 +02:00
a0ff9427cb fix(core): update 2019-10-02 11:11:22 +02:00
e37485adbd 2.0.9 2019-10-01 11:28:47 +02:00
e1592f322c fix(core): update 2019-10-01 11:28:47 +02:00
6604a58885 2.0.8 2019-10-01 11:25:12 +02:00
312b6d0e67 fix(core): update 2019-10-01 11:25:12 +02:00
26 changed files with 2220 additions and 144 deletions

View File

@ -1,18 +1,16 @@
# gitzone ci_default # gitzone ci_default
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
variables:
GIT_STRATEGY: clone
cache: cache:
paths: paths:
- .npmci_cache/ - .npmci_cache/
key: "$CI_BUILD_STAGE" key: '$CI_BUILD_STAGE'
stages: stages:
- security - security
- test - test
- release - release
- metadata - metadata
# ==================== # ====================
# security stage # security stage
@ -20,60 +18,65 @@ stages:
mirror: mirror:
stage: security stage: security
script: script:
- npmci git mirror - npmci git mirror
tags: tags:
- docker - lossless
- notpriv - docker
- notpriv
snyk: snyk:
image: registry.gitlab.com/hosttoday/ht-docker-node:snyk
stage: security stage: security
script: script:
- npmci npm prepare - npmci npm prepare
- npmci command npm install -g snyk
- npmci command npm install --ignore-scripts - npmci command npm install --ignore-scripts
- npmci command snyk test - npmci command snyk test
tags: tags:
- docker - lossless
- notpriv - docker
- notpriv
# ==================== # ====================
# test stage # test stage
# ==================== # ====================
testLTS: testStable:
stage: test stage: test
script: script:
- npmci npm prepare - npmci npm prepare
- npmci node install lts - npmci node install stable
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - lossless
- priv - docker
- priv
testBuild: testBuild:
stage: test stage: test
script: script:
- npmci npm prepare - npmci npm prepare
- npmci node install lts - npmci node install stable
- npmci npm install - npmci npm install
- npmci command npm run build - npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - lossless
- notpriv - docker
- notpriv
release: release:
stage: release stage: release
script: script:
- npmci node install lts - npmci node install stable
- npmci npm publish - npmci npm publish
only: only:
- tags - tags
tags: tags:
- docker - lossless
- notpriv - docker
- notpriv
# ==================== # ====================
# metadata stage # metadata stage
@ -83,33 +86,35 @@ codequality:
allow_failure: true allow_failure: true
script: script:
- npmci command npm install -g tslint typescript - npmci command npm install -g tslint typescript
- npmci npm prepare
- npmci npm install - npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts" - npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags: tags:
- docker - lossless
- priv - docker
- priv
trigger: trigger:
stage: metadata stage: metadata
script: script:
- npmci trigger - npmci trigger
only: only:
- tags - tags
tags: tags:
- docker - lossless
- notpriv - docker
- notpriv
pages: pages:
image: hosttoday/ht-docker-dbase:npmci
services:
- docker:18-dind
stage: metadata stage: metadata
script: script:
- npmci node install lts
- npmci command npm install -g @gitzone/tsdoc - npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare - npmci npm prepare
- npmci npm install - npmci npm install
- npmci command tsdoc - npmci command tsdoc
tags: tags:
- lossless
- docker - docker
- notpriv - notpriv
only: only:
@ -117,5 +122,5 @@ pages:
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week
paths: paths:
- public - public
allow_failure: true allow_failure: true

View File

2119
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,12 @@
{ {
"name": "@tsclass/tsclass", "name": "@tsclass/tsclass",
"version": "2.0.7", "version": "3.0.6",
"private": false, "private": false,
"description": "common classes for TypeScript", "description": "common classes for TypeScript",
"main": "dist/index.js", "main": "dist/index.js",
"typings": "dist/index.d.ts", "typings": "dist/index.d.ts",
"scripts": { "scripts": {
"test": "tsrun test/test.ts", "test": "tstest test/",
"build": "tsbuild" "build": "tsbuild"
}, },
"repository": { "repository": {
@ -23,20 +23,23 @@
"url": "https://github.com/tsclass/tsclass/issues" "url": "https://github.com/tsclass/tsclass/issues"
}, },
"homepage": "https://github.com/tsclass/tsclass#readme", "homepage": "https://github.com/tsclass/tsclass#readme",
"dependencies": {}, "dependencies": {
"@pushrocks/tapbundle": "^3.0.13"
},
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.17", "@gitzone/tsbuild": "^2.1.17",
"@gitzone/tsrun": "^1.2.8", "@gitzone/tsrun": "^1.2.8",
"tslint": "^5.19.0", "@gitzone/tstest": "^1.0.27",
"tslint": "^5.20.0",
"tslint-config-prettier": "^1.18.0" "tslint-config-prettier": "^1.18.0"
}, },
"files": [ "files": [
"ts/*", "ts/**/*",
"ts_web/*", "ts_web/**/*",
"dist/*", "dist/**/*",
"dist_web/*", "dist_web/**/*",
"dist_ts_web/*", "dist_ts_web/**/*",
"assets/*", "assets/**/*",
"cli.js", "cli.js",
"npmextra.json", "npmextra.json",
"readme.md" "readme.md"

View File

@ -49,6 +49,11 @@ class myOwnInvoice implements IInvoice {
> The modules in bold letters exist as own modules and can be used seperately > The modules in bold letters exist as own modules and can be used seperately
## 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. For further information read the linked docs at the top of this readme.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) > MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)

9
test/test.node.ts Normal file
View File

@ -0,0 +1,9 @@
import { tap, expect } from '@pushrocks/tapbundle';
import * as tsclass from '../ts/index';
tap.test('should assign a correct type', async () => {
let contact: tsclass.business.IContact;
});
tap.start();

View File

@ -1,3 +0,0 @@
import * as tsclass from '../ts/index';
let contact: tsclass.IContact;

View File

@ -1,5 +1,4 @@
import { IContact } from '..'; import { business, general } from '..';
import { IDate } from '..';
/** /**
* describes a company's lifecycle state * describes a company's lifecycle state
@ -11,8 +10,8 @@ export type TCompanyStatus = 'planed' | 'founding' | 'active' | 'liquidation' |
*/ */
export interface ICompany { export interface ICompany {
name: string; name: string;
foundedDate: IDate; foundedDate: general.IDate;
closedDate: IDate; closedDate: general.IDate;
status: TCompanyStatus; status: business.TCompanyStatus;
contact: IContact; contact: business.IContact;
} }

View File

@ -1,4 +1,4 @@
import { IAddress } from '..'; import { business } from '..';
export type TContactSalutation = 'Mr' | 'Ms' | 'Mrs'; export type TContactSalutation = 'Mr' | 'Ms' | 'Mrs';
@ -16,12 +16,13 @@ export interface IContact {
name: string; name: string;
surname?: string; surname?: string;
legalEntity?: string; legalEntity?: string;
address: IAddress; address: business.IAddress;
description: string; description: string;
customerNumber?: string; customerNumber?: string;
email?: string; email?: string;
phone?: string; phone?: string;
fax?: string;
// ========= // =========
// financial // financial

View File

@ -1,3 +1,4 @@
export * from './address'; export * from './address';
export * from './company'; export * from './company';
export * from './contact'; export * from './contact';
export * from './person';

6
ts/business/person.ts Normal file
View File

@ -0,0 +1,6 @@
export interface IPerson {
title: string;
name: string;
surname: string;
sex: 'male' | 'female' | 'queer';
}

View File

@ -1,4 +1,4 @@
import { IAuthor } from '..'; import { content } from '..';
export interface IArticle { export interface IArticle {
/** /**
@ -9,7 +9,7 @@ export interface IArticle {
/** /**
* the Author of an article * the Author of an article
*/ */
author: IAuthor; author: content.IAuthor;
/** /**
* the content of an article * the content of an article

View File

@ -1,5 +1,4 @@
import { IDate } from '..'; import { general, content } from '..';
import { IArticle } from '..';
export interface IAuthor { export interface IAuthor {
/** /**
@ -15,10 +14,10 @@ export interface IAuthor {
/** /**
* the birthday of an author * the birthday of an author
*/ */
birthday: IDate; birthday: general.IDate;
/** /**
* articles of an author * articles of an author
*/ */
articles: IArticle[]; articles: content.IArticle[];
} }

View File

@ -3,4 +3,4 @@ export * from './moneyevent';
export * from './releaseevent'; export * from './releaseevent';
export * from './requestevent'; export * from './requestevent';
export * from './sessionevent'; export * from './sessionevent';
export * from './userevent'; export * from './userevent';

View File

@ -1,4 +1,4 @@
export interface IEvent_Session { export interface IEvent_Session {
userID: string; userID: string;
sessionType: 'new' | 'reactivated' sessionType: 'new' | 'reactivated';
} }

View File

@ -1,3 +1 @@
export interface IEvent_User { export interface IEvent_User {}
}

View File

@ -1,8 +1,7 @@
import { TCurrency } from './currency'; import { finance } from '../';
import { ITransaction } from './transaction';
export interface ICheckingAccount { export interface ICheckingAccount {
name: string; name: string;
currency: TCurrency; currency: finance.TCurrency;
transactions: ITransaction[]; transactions: finance.ITransaction[];
} }

View File

@ -1,5 +1,4 @@
import { IInvoice } from './invoice'; import { business } from '../';
import { IContact } from '../business/contact';
export interface IExpenseItem { export interface IExpenseItem {
description: string; description: string;
@ -14,5 +13,5 @@ export interface IVoucher {
date: Date; date: Date;
description: string; description: string;
expenseItems: IExpenseItem[]; expenseItems: IExpenseItem[];
contactRef: IContact; contactRef: business.IContact;
} }

View File

@ -1,4 +1,4 @@
import { IContact } from '..'; import { business } from '..';
export type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded'; export type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded';
@ -10,8 +10,8 @@ export interface IInvoiceItem {
} }
export interface IInvoice { export interface IInvoice {
billedBy: IContact; billedBy: business.IContact;
billedTo: IContact; billedTo: business.IContact;
status: TInvoiceStatus; status: TInvoiceStatus;
items: IInvoiceItem[]; items: IInvoiceItem[];
} }

View File

@ -1,21 +1,16 @@
// Business // Business
import * as business from './business'; import * as business from './business';
export * from './business';
// Finance // Finance
import * as finance from './finance'; import * as finance from './finance';
export * from './finance';
// Content // Content
import * as content from './content'; import * as content from './content';
export * from './content';
// General // General
import * as general from './general'; import * as general from './general';
export * from './general';
// Network // Network
import * as network from './network'; import * as network from './network';
export * from './network';
export { business, finance, content, general, network }; export { business, finance, content, general, network };

9
ts/network/cert.ts Normal file
View File

@ -0,0 +1,9 @@
export interface ICert {
id: string;
domainName: string;
created: number;
validUntil: number;
privateKey: string;
publicKey: string;
csr: string;
}

View File

@ -1 +1,21 @@
export type TDnsRecord = 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SRV' | 'LOC' | 'MX' | 'NS' | 'SPF'; export type TDnsRecordType =
| 'A'
| 'AAAA'
| 'CNAME'
| 'LOC'
| 'PTR'
| 'MX'
| 'NAPTR'
| 'NS'
| 'SOA'
| 'SPF'
| 'SRV'
| 'TXT';
export interface IDnsRecord {
chunked?: string[];
name: string;
type: TDnsRecordType;
value: string;
dnsSecEnabled: boolean;
}

View File

@ -0,0 +1,4 @@
export interface IDnsChallenge {
hostName: string;
challenge: string;
}

View File

@ -1,2 +1,5 @@
export * from './reverseproxy'; export * from './cert';
export * from './dns'; export * from './dns';
export * from './dnschallenge';
export * from './networknode';
export * from './reverseproxy';

View File

@ -0,0 +1,6 @@
export interface INetworkNode {
name: string;
ipv4: string;
ipv6: string;
securityLevel: 'private' | 'public' | 'confidential';
}

View File

@ -4,4 +4,9 @@ export interface IReverseProxyConfig {
hostName: string; hostName: string;
privateKey: string; privateKey: string;
publicKey: string; publicKey: string;
authentication?: {
type: 'Basic';
user: string;
pass: string;
};
} }