Compare commits
44 Commits
Author | SHA1 | Date | |
---|---|---|---|
e292ec1de9 | |||
b1107a5945 | |||
45149ff081 | |||
caef1047e4 | |||
1b36f64e4c | |||
3cabc47e51 | |||
2c6a9d9fae | |||
1ee8d36b68 | |||
d6351421b3 | |||
d8ae73007a | |||
9a63a9197b | |||
07d5665deb | |||
9a14f7e356 | |||
600ca80d33 | |||
c6a9893ce1 | |||
ea60921761 | |||
fef1ddcd93 | |||
c54db0d9a8 | |||
5120d9b9bd | |||
2e40bc20df | |||
f64721addc | |||
17cc1c646a | |||
2a92733329 | |||
6d0993d381 | |||
5724d96f23 | |||
70fc60d865 | |||
e21d6dabe1 | |||
335717a025 | |||
69afa1dfcb | |||
b2e11c9841 | |||
69cb421ad1 | |||
c7f210a526 | |||
7c3976d169 | |||
6f92823f56 | |||
dac8ca4be5 | |||
a227973238 | |||
2307e01c81 | |||
852626457f | |||
ce8708266f | |||
4027eedf64 | |||
14314ee394 | |||
44b849bf86 | |||
b985bf1d30 | |||
7f29739ca0 |
4
.gitignore
vendored
4
.gitignore
vendored
@ -15,8 +15,6 @@ node_modules/
|
|||||||
|
|
||||||
# builds
|
# builds
|
||||||
dist/
|
dist/
|
||||||
dist_web/
|
dist_*/
|
||||||
dist_serve/
|
|
||||||
dist_ts_web/
|
|
||||||
|
|
||||||
# custom
|
# custom
|
@ -19,22 +19,35 @@ mirror:
|
|||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
- npmci git mirror
|
- npmci git mirror
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- lossless
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
snyk:
|
auditProductionDependencies:
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:snyk
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
stage: security
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci command npm install --production --ignore-scripts
|
||||||
|
- npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
- npmci command npm audit --audit-level=high --only=prod --production
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
auditDevDependencies:
|
||||||
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
- npmci command npm install --ignore-scripts
|
- npmci command npm install --ignore-scripts
|
||||||
- npmci command snyk test
|
- npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
- npmci command npm audit --audit-level=high --only=dev
|
||||||
tags:
|
tags:
|
||||||
- lossless
|
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
allow_failure: true
|
||||||
|
|
||||||
# ====================
|
# ====================
|
||||||
# test stage
|
# test stage
|
||||||
@ -49,9 +62,7 @@ testStable:
|
|||||||
- npmci npm test
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- lossless
|
|
||||||
- docker
|
- docker
|
||||||
- priv
|
|
||||||
|
|
||||||
testBuild:
|
testBuild:
|
||||||
stage: test
|
stage: test
|
||||||
@ -62,9 +73,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
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
@ -84,6 +93,8 @@ release:
|
|||||||
codequality:
|
codequality:
|
||||||
stage: metadata
|
stage: metadata
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
script:
|
script:
|
||||||
- npmci command npm install -g tslint typescript
|
- npmci command npm install -g tslint typescript
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -15,7 +15,7 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"projectType": {
|
"projectType": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["website", "element", "service", "npm"]
|
"enum": ["website", "element", "service", "npm", "wcc"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
11406
package-lock.json
generated
11406
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
25
package.json
25
package.json
@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "@tsclass/tsclass",
|
"name": "@tsclass/tsclass",
|
||||||
"version": "3.0.10",
|
"version": "3.0.32",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "common classes for TypeScript",
|
"description": "common classes for TypeScript",
|
||||||
"main": "dist/index.js",
|
"main": "dist_ts/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "tstest test/",
|
"test": "tstest test/",
|
||||||
"build": "tsbuild"
|
"build": "(tsbuild --web)"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -24,24 +24,29 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/tsclass/tsclass#readme",
|
"homepage": "https://github.com/tsclass/tsclass#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/tapbundle": "^3.0.13"
|
"@pushrocks/tapbundle": "^3.2.9",
|
||||||
|
"type-fest": "^0.16.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.17",
|
"@gitzone/tsbuild": "^2.1.25",
|
||||||
"@gitzone/tsrun": "^1.2.8",
|
"@gitzone/tsrun": "^1.2.12",
|
||||||
"@gitzone/tstest": "^1.0.27",
|
"@gitzone/tstest": "^1.0.44",
|
||||||
"tslint": "^5.20.0",
|
"tslint": "^6.1.3",
|
||||||
"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_*/**/*",
|
||||||
|
"dist_ts/**/*",
|
||||||
"dist_ts_web/**/*",
|
"dist_ts_web/**/*",
|
||||||
"assets/**/*",
|
"assets/**/*",
|
||||||
"cli.js",
|
"cli.js",
|
||||||
"npmextra.json",
|
"npmextra.json",
|
||||||
"readme.md"
|
"readme.md"
|
||||||
|
],
|
||||||
|
"browserslist": [
|
||||||
|
"last 1 chrome versions"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
21
readme.md
21
readme.md
@ -8,13 +8,20 @@ common classes for TypeScript
|
|||||||
* [docs (typedoc)](https://tsclass.gitlab.io/tsclass/)
|
* [docs (typedoc)](https://tsclass.gitlab.io/tsclass/)
|
||||||
|
|
||||||
## Status for master
|
## Status for master
|
||||||
[](https://gitlab.com/tsclass/tsclass/commits/master)
|
|
||||||
[](https://gitlab.com/tsclass/tsclass/commits/master)
|
Status Category | Status Badge
|
||||||
[](https://www.npmjs.com/package/@tsclass/tsclass)
|
-- | --
|
||||||
[](https://snyk.io/test/npm/@tsclass/tsclass)
|
GitLab Pipelines | [](https://lossless.cloud)
|
||||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
npm | [](https://lossless.cloud)
|
||||||
[](https://prettier.io/)
|
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)
|
||||||
|
Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
6
ts/authentication/claim.ts
Normal file
6
ts/authentication/claim.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export interface IClaim {
|
||||||
|
userName: string;
|
||||||
|
userId: string;
|
||||||
|
validUntil: number;
|
||||||
|
roles: string[];
|
||||||
|
}
|
1
ts/authentication/index.ts
Normal file
1
ts/authentication/index.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from './claim';
|
7
ts/authentication/processedclaim.ts
Normal file
7
ts/authentication/processedclaim.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { IClaim } from './claim';
|
||||||
|
|
||||||
|
export interface IProcessedClaim {
|
||||||
|
originalJWT: string;
|
||||||
|
claim: IClaim;
|
||||||
|
signed: boolean;
|
||||||
|
}
|
@ -19,8 +19,13 @@ export interface IContact {
|
|||||||
address: business.IAddress;
|
address: business.IAddress;
|
||||||
description: string;
|
description: string;
|
||||||
customerNumber?: string;
|
customerNumber?: string;
|
||||||
|
|
||||||
email?: string;
|
email?: string;
|
||||||
|
|
||||||
|
logoUrl?: string;
|
||||||
|
website?: string;
|
||||||
|
facebookUrl?: string;
|
||||||
|
twitterUrl?: string;
|
||||||
|
|
||||||
phone?: string;
|
phone?: string;
|
||||||
fax?: string;
|
fax?: string;
|
||||||
|
|
||||||
|
@ -1 +1,2 @@
|
|||||||
export * from './container';
|
export * from './container';
|
||||||
|
export * from './volumemount';
|
||||||
|
4
ts/container/volumemount.ts
Normal file
4
ts/container/volumemount.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export interface IVolumeMount {
|
||||||
|
hostFsPath: string;
|
||||||
|
containerFsPath: string;
|
||||||
|
}
|
@ -1,6 +1,16 @@
|
|||||||
import { content } from '..';
|
import { content } from '..';
|
||||||
|
|
||||||
export interface IArticle {
|
export interface IArticle {
|
||||||
|
/**
|
||||||
|
* the main url of an article
|
||||||
|
*/
|
||||||
|
url?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the mainimage of the article
|
||||||
|
*/
|
||||||
|
featuredImageUrl?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the title of an article
|
* the title of an article
|
||||||
*/
|
*/
|
||||||
@ -16,6 +26,11 @@ export interface IArticle {
|
|||||||
*/
|
*/
|
||||||
content: string;
|
content: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* a timestamp for when the article was written
|
||||||
|
*/
|
||||||
|
timestamp: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the tags of an article
|
* the tags of an article
|
||||||
*/
|
*/
|
||||||
|
@ -3,5 +3,5 @@ import { finance } from '../';
|
|||||||
export interface ICheckingAccount {
|
export interface ICheckingAccount {
|
||||||
name: string;
|
name: string;
|
||||||
currency: finance.TCurrency;
|
currency: finance.TCurrency;
|
||||||
transactions: finance.ITransaction[];
|
transactions?: finance.ITransaction[];
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,10 @@ export type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded';
|
|||||||
export interface IInvoiceItem {
|
export interface IInvoiceItem {
|
||||||
name: string;
|
name: string;
|
||||||
unitType: string;
|
unitType: string;
|
||||||
quantity: number;
|
unitQuantity: number;
|
||||||
|
unitNetPrice: number;
|
||||||
vatPercentage: number;
|
vatPercentage: number;
|
||||||
|
currency: 'EUR';
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IInvoice {
|
export interface IInvoice {
|
||||||
|
@ -16,4 +16,11 @@ import * as general from './general';
|
|||||||
// Network
|
// Network
|
||||||
import * as network from './network';
|
import * as network from './network';
|
||||||
|
|
||||||
export { business, container, finance, content, general, network };
|
// SaaS
|
||||||
|
import * as saas from './saas';
|
||||||
|
|
||||||
|
export { business, container, finance, content, general, network, saas };
|
||||||
|
|
||||||
|
import type * as typeFest from 'type-fest';
|
||||||
|
|
||||||
|
export { typeFest };
|
||||||
|
@ -2,4 +2,5 @@ export * from './cert';
|
|||||||
export * from './dns';
|
export * from './dns';
|
||||||
export * from './dnschallenge';
|
export * from './dnschallenge';
|
||||||
export * from './networknode';
|
export * from './networknode';
|
||||||
|
export * from './request';
|
||||||
export * from './reverseproxy';
|
export * from './reverseproxy';
|
||||||
|
26
ts/network/request.ts
Normal file
26
ts/network/request.ts
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
export interface ISimpleRequest {
|
||||||
|
headers: {};
|
||||||
|
parsedUrl: {
|
||||||
|
hash: string;
|
||||||
|
host: string;
|
||||||
|
hostname: string;
|
||||||
|
href: string;
|
||||||
|
readonly origin: string;
|
||||||
|
password: string;
|
||||||
|
pathname: string;
|
||||||
|
port: string;
|
||||||
|
protocol: string;
|
||||||
|
search: string;
|
||||||
|
readonly searchParams: any;
|
||||||
|
username: string;
|
||||||
|
toString: () => string;
|
||||||
|
toJSON: () => string;
|
||||||
|
};
|
||||||
|
body?: string | object | Buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISimpleResponse {
|
||||||
|
headers: { [key: string]: string };
|
||||||
|
body: string;
|
||||||
|
}
|
||||||
|
export type IRenderFunction = (req: ISimpleRequest) => Promise<ISimpleResponse>;
|
2
ts/saas/index.ts
Normal file
2
ts/saas/index.ts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export * from './subscriptionplan';
|
||||||
|
export * from './product';
|
1
ts/saas/product.ts
Normal file
1
ts/saas/product.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export interface IProduct {}
|
14
ts/saas/subscriptionplan.ts
Normal file
14
ts/saas/subscriptionplan.ts
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import { IProduct } from './product';
|
||||||
|
|
||||||
|
export interface ISubscriptionPlan {
|
||||||
|
name: string;
|
||||||
|
unit: 'device' | 'user';
|
||||||
|
quantity: boolean;
|
||||||
|
availableTerms: {
|
||||||
|
period: 'daily' | 'weekly' | 'monthly' | 'yearly';
|
||||||
|
price: number;
|
||||||
|
currency: 'EUR' | 'USD';
|
||||||
|
}[];
|
||||||
|
containedProducts: IProduct[];
|
||||||
|
limits: any;
|
||||||
|
}
|
Reference in New Issue
Block a user