25 Commits

Author SHA1 Message Date
e5cae293eb 1.0.16
Some checks failed
Default (tags) / security (push) Failing after 17s
Default (tags) / test (push) Failing after 25s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2023-11-16 02:09:48 +01:00
49bc354d01 fix(core): update 2023-11-16 02:09:48 +01:00
c7ce7af521 1.0.15 2021-04-16 20:28:50 +00:00
84c6a599ac fix(core): update 2021-04-16 20:28:49 +00:00
64e334761e 1.0.14 2021-04-15 01:06:42 +00:00
d2014b8e96 fix(core): update 2021-04-15 01:06:42 +00:00
fd3932976d 1.0.13 2021-04-15 01:06:14 +00:00
c0539be66e fix(core): update 2021-04-15 01:06:14 +00:00
00e5a96f05 1.0.12 2021-04-15 00:59:57 +00:00
53aada4638 fix(core): update 2021-04-15 00:59:56 +00:00
9724813028 1.0.11 2019-07-07 22:57:13 +02:00
e5b39e0709 fix(core): update 2019-07-07 22:57:12 +02:00
12242006aa 1.0.10 2019-07-07 18:10:57 +02:00
2e0164eaf0 fix(core): update 2019-07-07 18:10:57 +02:00
163f4c0154 1.0.9 2019-07-07 17:24:30 +02:00
7afcabf3f9 fix(core): add Base class for csv Parsers 2019-07-07 17:24:29 +02:00
9e7a23edb0 1.0.8 2019-07-07 17:18:13 +02:00
0cf6aab426 fix(core): update 2019-07-07 17:18:12 +02:00
a971c6e1bc 1.0.7 2019-06-24 15:51:33 +02:00
3470b66ef3 fix(core): update 2019-06-24 15:51:33 +02:00
444de6c2a1 1.0.6 2019-06-24 15:49:43 +02:00
acf9dac659 fix(core): update 2019-06-24 15:49:42 +02:00
41ba681227 1.0.5 2019-06-24 15:30:15 +02:00
9c4cab0a01 1.0.4 2019-05-23 17:55:03 +02:00
e6a97a07da 1.0.3 2019-05-23 17:43:46 +02:00
24 changed files with 6173 additions and 1757 deletions

View 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

View 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 @git.zone/tsdoc
npmci command tsdoc
continue-on-error: true

4
.gitignore vendored
View File

@ -15,8 +15,6 @@ node_modules/
# builds # builds
dist/ dist/
dist_web/ dist_*/
dist_serve/
dist_ts_web/
# custom # custom

View File

@ -1,16 +1,16 @@
# gitzone standard # gitzone ci_default
image: hosttoday/ht-docker-node:npmci 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
- test - test
- release - release
- metadata - metadata
# ==================== # ====================
# security stage # security stage
@ -18,102 +18,114 @@ stages:
mirror: mirror:
stage: security stage: security
script: script:
- npmci git mirror - npmci git mirror
only:
- tags
tags: tags:
- docker - lossless
- notpriv - docker
- notpriv
snyk: auditProductionDependencies:
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 -g snyk - npmci command npm install --production --ignore-scripts
- npmci command npm install --ignore-scripts - npmci command npm config set registry https://registry.npmjs.org
- npmci command snyk test - npmci command npm audit --audit-level=high --only=prod --production
tags: tags:
- docker - docker
- notpriv
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=dev
tags:
- docker
allow_failure: true
# ==================== # ====================
# 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 - docker
- notpriv
testSTABLE: testBuild:
stage: test stage: test
script: script:
- npmci npm prepare - npmci npm prepare
- npmci node install stable - npmci node install stable
- npmci npm install - npmci npm install
- npmci npm test - npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
- notpriv
release: release:
stage: release stage: release
script: script:
- npmci node install stable - 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
# ==================== # ====================
codequality: codequality:
stage: metadata stage: metadata
image: docker:stable
allow_failure: true allow_failure: true
services: only:
- docker:stable-dind - tags
script: script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') - npmci command npm install -g tslint typescript
- docker run - npmci npm prepare
--env SOURCE_CODE="$PWD" - npmci npm install
--volume "$PWD":/code - npmci command "tslint -c tslint.json ./ts/**/*.ts"
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
artifacts:
paths: [codeclimate.json]
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-node:npmci
stage: metadata stage: metadata
script: script:
- npmci command npm install -g @gitzone/tsdoc - npmci node install lts
- npmci command npm install -g @git.zone/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:
@ -121,5 +133,5 @@ pages:
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week
paths: paths:
- public - public
allow_failure: true allow_failure: true

1
.npmrc Normal file
View File

@ -0,0 +1 @@
registry=https://verdaccio.nevermind.cloud

11
.vscode/launch.json vendored Normal file
View 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
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", "wcc"]
}
}
}
}
}
}
]
}

View File

@ -1,4 +1,4 @@
Copyright (c) 2019 Lossless GmbH (hello@lossless.com) Copyright (c) 2019 Task Venture Capital GmbH (hello@task.vc)
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -1,13 +1,14 @@
{ {
"gitzone": { "gitzone": {
"projectType": "npm",
"module": { "module": {
"githost": "gitlab.com", "githost": "gitlab.com",
"gitscope": "financeplus", "gitscope": "fin.cx",
"gitrepo": "finplus-interfaces", "gitrepo": "portablefinance",
"shortDescription": "an interface package for the financeplus organization", "description": "an interface package for the financeplus organization",
"npmPackagename": "@financeplus/finplus-interfaces", "npmPackagename": "@fin.cx/portablefinance",
"license": "MIT", "license": "MIT",
"projectDomain": "finance.plus" "projectDomain": "fin.cx"
} }
}, },
"npmci": { "npmci": {

1644
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +1,46 @@
{ {
"name": "@financeplus/finplus-interfaces", "name": "@fin.cx/portablefinance",
"version": "1.0.2", "version": "1.0.16",
"private": false, "private": false,
"description": "an interface package for the financeplus organization", "description": "an interface package for the financeplus organization",
"main": "dist/index.js", "main": "dist_ts/index.js",
"typings": "dist/index.d.ts", "typings": "dist_ts/index.d.ts",
"author": "Lossless GmbH", "author": "Lossless GmbH",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"test": "(tstest test/)", "test": "(tstest test/ --web)",
"build": "(tsbuild)", "build": "(tsbuild --web)",
"format": "(gitzone format)" "buildDocs": "tsdoc"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.0.22", "@git.zone/tsbuild": "^2.1.25",
"@gitzone/tstest": "^1.0.15", "@git.zone/tsrun": "^1.2.46",
"@pushrocks/tapbundle": "^3.0.7", "@git.zone/tstest": "^1.0.52",
"@types/node": "^10.11.7", "@push.rocks/tapbundle": "^5.0.15",
"tslint": "^5.11.0", "@types/node": "^20.9.0"
"tslint-config-prettier": "^1.15.0"
}, },
"dependencies": {} "files": [
"ts/**/*",
"ts_web/**/*",
"dist/**/*",
"dist_*/**/*",
"dist_ts/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
"npmextra.json",
"readme.md"
],
"browserslist": [
"last 1 chrome versions"
],
"repository": {
"type": "git",
"url": "git+https://gitlab.com/fin.cx/portablefinance.git"
},
"bugs": {
"url": "https://gitlab.com/fin.cx/portablefinance/issues"
},
"homepage": "https://gitlab.com/fin.cx/portablefinance#readme",
"type": "module"
} }

5701
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -8,19 +8,31 @@ an interface package for the financeplus organization
* [docs (typedoc)](https://financeplus.gitlab.io/finplus-interfaces/) * [docs (typedoc)](https://financeplus.gitlab.io/finplus-interfaces/)
## Status for master ## Status for master
[![build status](https://gitlab.com/financeplus/finplus-interfaces/badges/master/build.svg)](https://gitlab.com/financeplus/finplus-interfaces/commits/master)
[![coverage report](https://gitlab.com/financeplus/finplus-interfaces/badges/master/coverage.svg)](https://gitlab.com/financeplus/finplus-interfaces/commits/master) Status Category | Status Badge
[![npm downloads per month](https://img.shields.io/npm/dm/@financeplus/finplus-interfaces.svg)](https://www.npmjs.com/package/@financeplus/finplus-interfaces) -- | --
[![Known Vulnerabilities](https://snyk.io/test/npm/@financeplus/finplus-interfaces/badge.svg)](https://snyk.io/test/npm/@financeplus/finplus-interfaces) GitLab Pipelines | [![pipeline status](https://gitlab.com/financeplus/finplus-interfaces/badges/master/pipeline.svg)](https://lossless.cloud)
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/financeplus/finplus-interfaces/badges/master/coverage.svg)](https://lossless.cloud)
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) npm | [![npm downloads per month](https://badgen.net/npm/dy/@financeplus/finplus-interfaces)](https://lossless.cloud)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/) Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/financeplus/finplus-interfaces)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@financeplus/finplus-interfaces)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@financeplus/finplus-interfaces)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@financeplus/finplus-interfaces)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
## Usage ## Usage
## 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)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html) | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
[![repo-footer](https://financeplus.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com) [![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)

View File

@ -1,8 +1,19 @@
import { expect, tap } from '@pushrocks/tapbundle'; import { expect, tap } from '@push.rocks/tapbundle';
import * as finplusInterfaces from '../ts/index'; import * as finplusInterfaces from '../ts/index.js';
tap.test('first test', async () => { interface ITestTransaction {
console.log(finplusInterfaces.standardExport); date: Date;
amount: number;
}
tap.test('implement test csv parser', async () => {
class MyCsvParser extends finplusInterfaces.AcCsvParser<ITestTransaction> {
paymentProviderName: 'bunq';
public transactionArray: ITestTransaction[] = [];
public async getTransactions(): Promise<ITestTransaction[]> {
return this.transactionArray;
}
}
}); });
tap.start(); tap.start();

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@fin.cx/portablefinance',
version: '1.0.16',
description: 'an interface package for the financeplus organization'
}

View File

@ -0,0 +1,5 @@
export abstract class AcCsvParser<T> {
public abstract paymentProviderName: string;
public abstract transactionArray: T[];
public abstract getTransactions(): Promise<T[]>;
}

View File

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

View File

@ -1,3 +1,2 @@
import * as plugins from './finplus-interfaces.plugins'; export * from './abstractclasses/index.js';
export * from './interfaces/index.js';
export let standardExport = 'Hi there! :) This is an exported string';

3
ts/interfaces/index.ts Normal file
View File

@ -0,0 +1,3 @@
export * from './paymentaccount.js';
export * from './transaction.js';
export * from './voucher.js';

View File

@ -0,0 +1,36 @@
import { type IVoucher } from './voucher.js';
export interface IMonthlyCheckpoint {
start: number;
end: number;
pdfVoucher: IVoucher;
}
export interface IPaymentAccount {
id: string;
data: {
status: 'active' | 'inactive' | 'deleted';
connectionData: {
bankAdapterType: string;
credentials: unknown;
};
currency: 'EUR' | 'USD';
name: string;
checkpoints: {
[key: string]: {
1: IMonthlyCheckpoint;
2: IMonthlyCheckpoint;
3: IMonthlyCheckpoint;
4: IMonthlyCheckpoint;
5: IMonthlyCheckpoint;
6: IMonthlyCheckpoint;
7: IMonthlyCheckpoint;
8: IMonthlyCheckpoint;
9: IMonthlyCheckpoint;
10: IMonthlyCheckpoint;
11: IMonthlyCheckpoint;
12: IMonthlyCheckpoint;
};
};
};
}

View File

@ -0,0 +1,21 @@
import { type IVoucher } from './voucher.js';
export interface IMonetaryTransaction {
id: string;
data: {
paymentAccountId: string;
originTransactionId: string;
originAccountId: string;
additionalIds: string[];
date: number;
amount: number;
description: string;
name: string;
voucherData?: IVoucher;
justForLooks?: {
paymentAcountName: string;
voucherSizeInMB: number;
dateIso?: string;
};
};
}

5
ts/interfaces/voucher.ts Normal file
View File

@ -0,0 +1,5 @@
export interface IVoucher {
voucherDate: Date;
voucherId: string;
voucherStatus: 'uploaded' | 'transmitted';
}

14
tsconfig.json Normal file
View File

@ -0,0 +1,14 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"verbatimModuleSyntax": true
},
"exclude": [
"dist_*/**/*.d.ts"
]
}

View File

@ -1,17 +0,0 @@
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}