Compare commits

...

30 Commits

Author SHA1 Message Date
c453dc9001 3.0.10 2020-02-20 22:13:58 +00:00
cd4127da73 fix(core): update 2020-02-20 22:13:57 +00:00
ab5f8bf470 3.0.9 2020-02-20 22:13:15 +00:00
968219384d fix(core): update 2020-02-20 22:13:14 +00:00
dd5ca4b3f1 3.0.8 2020-02-20 22:06:38 +00:00
3c99bfe922 fix(core): update 2020-02-20 22:06:37 +00:00
4f62bfb622 3.0.7 2020-02-15 16:28:47 +00:00
5f00526a7c fix(core): update 2020-02-15 16:28:46 +00:00
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
26 changed files with 2272 additions and 138 deletions

View File

@ -4,7 +4,7 @@ image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache: cache:
paths: paths:
- .npmci_cache/ - .npmci_cache/
key: "$CI_BUILD_STAGE" key: '$CI_BUILD_STAGE'
stages: stages:
- security - security
@ -20,17 +20,19 @@ mirror:
script: script:
- npmci git mirror - npmci git mirror
tags: tags:
- lossless
- docker - docker
- notpriv - 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:
- lossless
- docker - docker
- notpriv - notpriv
@ -47,6 +49,7 @@ testStable:
- npmci npm test - npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- lossless
- docker - docker
- priv - priv
@ -59,6 +62,7 @@ testBuild:
- npmci command npm run build - npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- lossless
- docker - docker
- notpriv - notpriv
@ -70,6 +74,7 @@ release:
only: only:
- tags - tags
tags: tags:
- lossless
- docker - docker
- notpriv - notpriv
@ -85,6 +90,7 @@ codequality:
- npmci npm install - npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts" - npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags: tags:
- lossless
- docker - docker
- priv - priv
@ -95,20 +101,20 @@ trigger:
only: only:
- tags - tags
tags: tags:
- lossless
- docker - docker
- notpriv - notpriv
pages: pages:
image: hosttoday/ht-docker-dbase:npmci
services:
- docker:stable-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:

29
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,29 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "current file",
"type": "node",
"request": "launch",
"args": [
"${relativeFile}"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "test.ts",
"type": "node",
"request": "launch",
"args": [
"test/test.ts"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
}
]
}

26
.vscode/settings.json vendored Normal file
View 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"]
}
}
}
}
}
}
]
}

View File

View File

@ -4,6 +4,7 @@
"npmAccessLevel": "public" "npmAccessLevel": "public"
}, },
"gitzone": { "gitzone": {
"projectType": "npm",
"module": { "module": {
"githost": "gitlab.com", "githost": "gitlab.com",
"gitscope": "tsclass", "gitscope": "tsclass",

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.9", "version": "3.0.10",
"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

@ -8,7 +8,7 @@ common classes for TypeScript
* [docs (typedoc)](https://tsclass.gitlab.io/tsclass/) * [docs (typedoc)](https://tsclass.gitlab.io/tsclass/)
## Status for master ## Status for master
[![build status](https://gitlab.com/tsclass/tsclass/badges/master/build.svg)](https://gitlab.com/tsclass/tsclass/commits/master) [![pipeline status](https://gitlab.com/tsclass/tsclass/badges/master/pipeline.svg)](https://gitlab.com/tsclass/tsclass/commits/master)
[![coverage report](https://gitlab.com/tsclass/tsclass/badges/master/coverage.svg)](https://gitlab.com/tsclass/tsclass/commits/master) [![coverage report](https://gitlab.com/tsclass/tsclass/badges/master/coverage.svg)](https://gitlab.com/tsclass/tsclass/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/@tsclass/tsclass.svg)](https://www.npmjs.com/package/@tsclass/tsclass) [![npm downloads per month](https://img.shields.io/npm/dm/@tsclass/tsclass.svg)](https://www.npmjs.com/package/@tsclass/tsclass)
[![Known Vulnerabilities](https://snyk.io/test/npm/@tsclass/tsclass/badge.svg)](https://snyk.io/test/npm/@tsclass/tsclass) [![Known Vulnerabilities](https://snyk.io/test/npm/@tsclass/tsclass/badge.svg)](https://snyk.io/test/npm/@tsclass/tsclass)
@ -49,6 +49,10 @@ 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,7 +16,7 @@ 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;

View File

@ -0,0 +1,5 @@
export interface IContainer {
registryUrl: string;
tag: string;
version: string;
}

1
ts/container/index.ts Normal file
View File

@ -0,0 +1 @@
export * from './container';

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

@ -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,19 @@
// Business // Business
import * as business from './business'; import * as business from './business';
export * from './business';
// Container
import * as container from './container';
// 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, container, 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,20 @@
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 {
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;
};
} }