Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f46d8a54cd | |||
| 4f08d09552 | |||
| 4bd61aed70 | |||
| e5ca606e3c | |||
| 2f97b407a2 | |||
| 6f60cb216d | |||
| e68524bc19 | |||
| daad17354d | |||
| c01c1904cf | |||
| 7bb1b22ea6 | |||
| 5d275dd9d5 | |||
| 871ed4fc91 | |||
| d53bc96947 | |||
| 2078c6c7c8 | |||
| 12eba17c7c | |||
| 033024951d |
@@ -6,19 +6,19 @@ on:
|
|||||||
- '**'
|
- '**'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
IMAGE: code.foss.global/host.today/ht-docker-node:npmci
|
||||||
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
NPMCI_COMPUTED_REPOURL: https://${-{gitea.repository_owner}-}:${-{secrets.GITEA_TOKEN}-}@{{module.githost}}/${-{gitea.repository}-}.git
|
||||||
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
NPMCI_TOKEN_NPM: ${-{secrets.NPMCI_TOKEN_NPM}-}
|
||||||
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
NPMCI_TOKEN_NPM2: ${-{secrets.NPMCI_TOKEN_NPM2}-}
|
||||||
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
NPMCI_GIT_GITHUBTOKEN: ${-{secrets.NPMCI_GIT_GITHUBTOKEN}-}
|
||||||
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
NPMCI_URL_CLOUDLY: ${-{secrets.NPMCI_URL_CLOUDLY}-}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
security:
|
security:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
container:
|
container:
|
||||||
image: ${{ env.IMAGE }}
|
image: ${-{ env.IMAGE }-}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
- name: Install pnpm and npmci
|
- name: Install pnpm and npmci
|
||||||
run: |
|
run: |
|
||||||
pnpm install -g pnpm
|
pnpm install -g pnpm
|
||||||
pnpm install -g @shipzone/npmci
|
pnpm install -g @ship.zone/npmci
|
||||||
|
|
||||||
- name: Run npm prepare
|
- name: Run npm prepare
|
||||||
run: npmci npm prepare
|
run: npmci npm prepare
|
||||||
@@ -44,11 +44,11 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
test:
|
test:
|
||||||
if: ${{ always() }}
|
if: ${-{ always() }-}
|
||||||
needs: security
|
needs: security
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ${{ env.IMAGE }}
|
image: ${-{ env.IMAGE }-}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|||||||
@@ -6,19 +6,19 @@ on:
|
|||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
IMAGE: code.foss.global/host.today/ht-docker-node:npmci
|
||||||
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
NPMCI_COMPUTED_REPOURL: https://${-{gitea.repository_owner}-}:${-{secrets.GITEA_TOKEN}-}@{{module.githost}}/${-{gitea.repository}-}.git
|
||||||
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
NPMCI_TOKEN_NPM: ${-{secrets.NPMCI_TOKEN_NPM}-}
|
||||||
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
NPMCI_TOKEN_NPM2: ${-{secrets.NPMCI_TOKEN_NPM2}-}
|
||||||
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
NPMCI_GIT_GITHUBTOKEN: ${-{secrets.NPMCI_GIT_GITHUBTOKEN}-}
|
||||||
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
NPMCI_URL_CLOUDLY: ${-{secrets.NPMCI_URL_CLOUDLY}-}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
security:
|
security:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
container:
|
container:
|
||||||
image: ${{ env.IMAGE }}
|
image: ${-{ env.IMAGE }-}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
- name: Prepare
|
- name: Prepare
|
||||||
run: |
|
run: |
|
||||||
pnpm install -g pnpm
|
pnpm install -g pnpm
|
||||||
pnpm install -g @shipzone/npmci
|
pnpm install -g @ship.zone/npmci
|
||||||
npmci npm prepare
|
npmci npm prepare
|
||||||
|
|
||||||
- name: Audit production dependencies
|
- name: Audit production dependencies
|
||||||
@@ -42,11 +42,11 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
test:
|
test:
|
||||||
if: ${{ always() }}
|
if: ${-{ always() }-}
|
||||||
needs: security
|
needs: security
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ${{ env.IMAGE }}
|
image: ${-{ env.IMAGE }-}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@@ -54,7 +54,7 @@ jobs:
|
|||||||
- name: Prepare
|
- name: Prepare
|
||||||
run: |
|
run: |
|
||||||
pnpm install -g pnpm
|
pnpm install -g pnpm
|
||||||
pnpm install -g @shipzone/npmci
|
pnpm install -g @ship.zone/npmci
|
||||||
npmci npm prepare
|
npmci npm prepare
|
||||||
|
|
||||||
- name: Test stable
|
- name: Test stable
|
||||||
@@ -74,7 +74,7 @@ jobs:
|
|||||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ${{ env.IMAGE }}
|
image: ${-{ env.IMAGE }-}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@@ -82,7 +82,7 @@ jobs:
|
|||||||
- name: Prepare
|
- name: Prepare
|
||||||
run: |
|
run: |
|
||||||
pnpm install -g pnpm
|
pnpm install -g pnpm
|
||||||
pnpm install -g @shipzone/npmci
|
pnpm install -g @ship.zone/npmci
|
||||||
npmci npm prepare
|
npmci npm prepare
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
@@ -95,7 +95,7 @@ jobs:
|
|||||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ${{ env.IMAGE }}
|
image: ${-{ env.IMAGE }-}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -104,7 +104,7 @@ jobs:
|
|||||||
- name: Prepare
|
- name: Prepare
|
||||||
run: |
|
run: |
|
||||||
pnpm install -g pnpm
|
pnpm install -g pnpm
|
||||||
pnpm install -g @shipzone/npmci
|
pnpm install -g @ship.zone/npmci
|
||||||
npmci npm prepare
|
npmci npm prepare
|
||||||
|
|
||||||
- name: Code quality
|
- name: Code quality
|
||||||
|
|||||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -3,7 +3,6 @@
|
|||||||
# artifacts
|
# artifacts
|
||||||
coverage/
|
coverage/
|
||||||
public/
|
public/
|
||||||
pages/
|
|
||||||
|
|
||||||
# installs
|
# installs
|
||||||
node_modules/
|
node_modules/
|
||||||
@@ -17,4 +16,8 @@ node_modules/
|
|||||||
dist/
|
dist/
|
||||||
dist_*/
|
dist_*/
|
||||||
|
|
||||||
# custom
|
# AI
|
||||||
|
.claude/
|
||||||
|
.serena/
|
||||||
|
|
||||||
|
#------# custom
|
||||||
|
|||||||
59
changelog.md
59
changelog.md
@@ -1,6 +1,64 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-12-18 - 1.2.0 - feat(tools)
|
||||||
|
add demodata feature, update package metadata, tsconfig paths, CI/workflows, and bump deps
|
||||||
|
|
||||||
|
- Add demodata subpackage (@signature.digital/demodata) and export entry
|
||||||
|
- Introduce tsconfig path aliases for @signature.digital/tools, @signature.digital/demodata, and @signature.digital/interfaces
|
||||||
|
- Update package.json metadata (repository, bugs, homepage), add pnpm overrides, and bump dev/deps (@git.zone/tsbuild, @git.zone/tstest, @tsclass/tsclass)
|
||||||
|
- Rename and configure tspublish.json files to include package names and registries for publishing
|
||||||
|
- Fix interfaces: change IInvolvedParty.contact type to plugins.tsclass.business.TContact
|
||||||
|
- Update tests to use @git.zone/tstest/tapbundle and export tap.start()
|
||||||
|
- Revise CI workflow files to use code.foss.global image, new secret placeholder formatting, and @ship.zone/npmci package name
|
||||||
|
- Rework npmextra.json structure and add release registries and szci config
|
||||||
|
- Update README and changelog content and add minor .gitignore entries for AI tools
|
||||||
|
|
||||||
|
## 2024-12-19 - 1.1.0 - feat(demodata)
|
||||||
|
|
||||||
|
Add demo data feature for contracts
|
||||||
|
|
||||||
|
- Introduced demo contract data for Minijob Employment Contract outlining details for employer and employee roles.
|
||||||
|
- Enhanced package.json with new export entry for demodata.
|
||||||
|
- Implemented new ts_demodata directory with sample contract representation.
|
||||||
|
|
||||||
|
## 2024-12-19 - 1.0.11 - fix(interfaces)
|
||||||
|
|
||||||
|
Fixed import path in ts_interfaces/index.ts
|
||||||
|
|
||||||
|
- Corrected import path for plugins in ts_interfaces/index.ts to prevent module resolution issues.
|
||||||
|
|
||||||
|
## 2024-12-18 - 1.0.10 - fix(test)
|
||||||
|
|
||||||
|
Add initial test for portablecontract
|
||||||
|
|
||||||
|
## 2024-12-18 - 1.0.9 - fix(ts_interfaces)
|
||||||
|
|
||||||
|
Resolved missing exports in plugins.ts
|
||||||
|
|
||||||
|
- Added export statements in ts_interfaces/plugins.ts to resolve module issues.
|
||||||
|
|
||||||
|
## 2024-12-18 - 1.0.8 - fix(core)
|
||||||
|
|
||||||
|
Fixed export paths in package configuration
|
||||||
|
|
||||||
|
- Updated exports paths in package.json for proper module resolution.
|
||||||
|
- Fixed export statement in ts/index.ts to reference the correct path for interface exports.
|
||||||
|
|
||||||
|
## 2024-12-18 - 1.0.7 - fix(project)
|
||||||
|
|
||||||
|
Corrected misalignment in file structure and package metadata.
|
||||||
|
|
||||||
|
- Updated the file export path in ts/index.ts to correct interface export location.
|
||||||
|
- Transferred the interfaces from ts/interfaces/index.ts to ts_interfaces/index.ts maintaining consistency in folder structure.
|
||||||
|
- Synchronized package description and keywords between package.json and npmextra.json.
|
||||||
|
- Ensured proper build script path in package.json.
|
||||||
|
|
||||||
|
## 2024-12-18 - 1.0.6 - fix(core)
|
||||||
|
|
||||||
|
No code changes detected.
|
||||||
|
|
||||||
## 2024-12-18 - 1.0.5 - fix(core)
|
## 2024-12-18 - 1.0.5 - fix(core)
|
||||||
|
|
||||||
Corrected package and npm extra configuration to ensure consistent naming.
|
Corrected package and npm extra configuration to ensure consistent naming.
|
||||||
|
|
||||||
- Updated 'name' field in package.json from '@signature.digital/portablecontract' to '@signature.digital/tools'.
|
- Updated 'name' field in package.json from '@signature.digital/portablecontract' to '@signature.digital/tools'.
|
||||||
@@ -8,6 +66,7 @@ Corrected package and npm extra configuration to ensure consistent naming.
|
|||||||
- Updated 'npmPackagename' in npmextra.json from '@signature.digital/portablecontract' to '@signature.digital/tools'.
|
- Updated 'npmPackagename' in npmextra.json from '@signature.digital/portablecontract' to '@signature.digital/tools'.
|
||||||
|
|
||||||
## 2023-11-22 to 2023-11-28 - 1.0.1 to 1.0.4 - core updates
|
## 2023-11-22 to 2023-11-28 - 1.0.1 to 1.0.4 - core updates
|
||||||
|
|
||||||
Fixes and updates in the core component.
|
Fixes and updates in the core component.
|
||||||
|
|
||||||
- Updated core module to enhance performance and fix minor bugs in version 1.0.1
|
- Updated core module to enhance performance and fix minor bugs in version 1.0.1
|
||||||
|
|||||||
@@ -1,18 +1,42 @@
|
|||||||
{
|
{
|
||||||
"gitzone": {
|
"@git.zone/cli": {
|
||||||
"projectType": "npm",
|
"projectType": "npm",
|
||||||
"module": {
|
"module": {
|
||||||
"githost": "gitlab.com",
|
"githost": "gitlab.com",
|
||||||
"gitscope": "signature.digital",
|
"gitscope": "signature.digital",
|
||||||
"gitrepo": "tools",
|
"gitrepo": "tools",
|
||||||
"description": "a package that defines standard tools for working with contracts.",
|
"description": "A TypeScript package providing utilities for managing digital contracts with modular interfaces and business context integration.",
|
||||||
"npmPackagename": "@signature.digital/tools",
|
"npmPackagename": "@signature.digital/tools",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"projectDomain": "signature.digital"
|
"projectDomain": "signature.digital",
|
||||||
|
"keywords": [
|
||||||
|
"TypeScript",
|
||||||
|
"digital contracts",
|
||||||
|
"contract management",
|
||||||
|
"modular design",
|
||||||
|
"business integration",
|
||||||
|
"interfaces",
|
||||||
|
"typescript utilities",
|
||||||
|
"contract structures",
|
||||||
|
"interfaces-driven architecture",
|
||||||
|
"contract modeling",
|
||||||
|
"business relationships",
|
||||||
|
"data handling",
|
||||||
|
"asynchronous loading",
|
||||||
|
"dynamic role assignment",
|
||||||
|
"contract validation",
|
||||||
|
"unit testing"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"release": {
|
||||||
|
"registries": ["https://verdaccio.lossless.digital"],
|
||||||
|
"accessLevel": "public"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"npmci": {
|
"@git.zone/tsdoc": {
|
||||||
"npmGlobalTools": [],
|
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||||
"npmAccessLevel": "public"
|
},
|
||||||
|
"@ship.zone/szci": {
|
||||||
|
"npmGlobalTools": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
55
package.json
55
package.json
@@ -1,37 +1,39 @@
|
|||||||
{
|
{
|
||||||
"name": "@signature.digital/tools",
|
"name": "@signature.digital/tools",
|
||||||
"version": "1.0.5",
|
"version": "1.2.0",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "a package that defines standard tools for working with contracts.",
|
"description": "A TypeScript package providing utilities for managing digital contracts with modular interfaces and business context integration.",
|
||||||
"main": "dist_ts/index.js",
|
"exports": {
|
||||||
"typings": "dist_ts/index.d.ts",
|
".": "./ts/index.js",
|
||||||
|
"./interfaces": "./dist_ts_interfaces/index.js",
|
||||||
|
"./demodata": "./dist_ts_demodata/index.js"
|
||||||
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"author": "Task Venture Capital GmbH",
|
"author": "Task Venture Capital GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/ --web)",
|
"test": "(tstest test/ --web)",
|
||||||
"build": "(tsbuild --web --allowimplicitany)",
|
"build": "(tsbuild tsfolders --web --allowimplicitany)",
|
||||||
"buildDocs": "(tsdoc)"
|
"buildDocs": "(tsdoc)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@git.zone/tsbuild": "^2.1.25",
|
"@git.zone/tsbuild": "^2.6.1",
|
||||||
"@git.zone/tsbundle": "^2.0.5",
|
"@git.zone/tsbundle": "^2.1.0",
|
||||||
"@git.zone/tsrun": "^1.2.46",
|
"@git.zone/tsrun": "^1.3.3",
|
||||||
"@git.zone/tstest": "^1.0.44",
|
"@git.zone/tstest": "^1.0.96",
|
||||||
"@push.rocks/tapbundle": "^5.0.15",
|
"@types/node": "^22.10.2"
|
||||||
"@types/node": "^20.8.7"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tsclass/tsclass": "^4.0.46"
|
"@tsclass/tsclass": "^9.3.0"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://gitlab.com/signature.digital/portablecontract.git"
|
"url": "https://gitlab.com/signature.digital/tools.git"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://gitlab.com/signature.digital/portablecontract/issues"
|
"url": "https://gitlab.com/signature.digital/tools/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/signature.digital/portablecontract#readme",
|
"homepage": "https://gitlab.com/signature.digital/tools#readme",
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 1 chrome versions"
|
"last 1 chrome versions"
|
||||||
],
|
],
|
||||||
@@ -46,5 +48,26 @@
|
|||||||
"cli.js",
|
"cli.js",
|
||||||
"npmextra.json",
|
"npmextra.json",
|
||||||
"readme.md"
|
"readme.md"
|
||||||
]
|
],
|
||||||
|
"keywords": [
|
||||||
|
"TypeScript",
|
||||||
|
"digital contracts",
|
||||||
|
"contract management",
|
||||||
|
"modular design",
|
||||||
|
"business integration",
|
||||||
|
"interfaces",
|
||||||
|
"typescript utilities",
|
||||||
|
"contract structures",
|
||||||
|
"interfaces-driven architecture",
|
||||||
|
"contract modeling",
|
||||||
|
"business relationships",
|
||||||
|
"data handling",
|
||||||
|
"asynchronous loading",
|
||||||
|
"dynamic role assignment",
|
||||||
|
"contract validation",
|
||||||
|
"unit testing"
|
||||||
|
],
|
||||||
|
"pnpm": {
|
||||||
|
"overrides": {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
11808
pnpm-lock.yaml
generated
11808
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
203
readme.md
203
readme.md
@@ -1,31 +1,184 @@
|
|||||||
# @signature.digital/portablecontract
|
# @signature.digital/tools
|
||||||
a package that defines standard tools for working with contracts.
|
|
||||||
|
|
||||||
## Availabililty and Links
|
A TypeScript package providing utility interfaces and classes for efficient digital contract management and business context integration with a modular design. 📝
|
||||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@signature.digital/portablecontract)
|
|
||||||
* [gitlab.com (source)](https://gitlab.com/signature.digital/portablecontract)
|
|
||||||
* [github.com (source mirror)](https://github.com/signature.digital/portablecontract)
|
|
||||||
* [docs (typedoc)](https://signature.digital.gitlab.io/portablecontract/)
|
|
||||||
|
|
||||||
## Status for master
|
## Issue Reporting and Security
|
||||||
|
|
||||||
Status Category | Status Badge
|
For reporting bugs, issues, or security vulnerabilities, please visit [community.foss.global/](https://community.foss.global/). This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a [code.foss.global/](https://code.foss.global/) account to submit Pull Requests directly.
|
||||||
-- | --
|
|
||||||
GitLab Pipelines | [](https://lossless.cloud)
|
## Install
|
||||||
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
|
||||||
npm | [](https://lossless.cloud)
|
Install using your preferred package manager:
|
||||||
Snyk | [](https://lossless.cloud)
|
|
||||||
TypeScript Support | [](https://lossless.cloud)
|
```bash
|
||||||
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
# Using pnpm (recommended)
|
||||||
Code Style | [](https://lossless.cloud)
|
pnpm add @signature.digital/tools
|
||||||
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
|
||||||
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
# Using npm
|
||||||
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
npm install @signature.digital/tools
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
Use TypeScript for best in class intellisense
|
|
||||||
For further information read the linked docs at the top of this readme.
|
|
||||||
|
|
||||||
## Legal
|
This package provides TypeScript interfaces for modeling digital contracts with support for roles, paragraphs, and involved parties.
|
||||||
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
|
|
||||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
### Core Interfaces
|
||||||
|
|
||||||
|
The package exports these key interfaces:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import type {
|
||||||
|
IPortableContract,
|
||||||
|
IRole,
|
||||||
|
IInvolvedParty,
|
||||||
|
IParagraph,
|
||||||
|
} from '@signature.digital/tools';
|
||||||
|
```
|
||||||
|
|
||||||
|
### Interface Overview
|
||||||
|
|
||||||
|
#### `IPortableContract`
|
||||||
|
|
||||||
|
The main contract interface containing:
|
||||||
|
|
||||||
|
- `title` - Contract title
|
||||||
|
- `context` - Description of the contract context
|
||||||
|
- `availableRoles` - Array of available roles
|
||||||
|
- `involvedParties` - Parties involved with their contacts
|
||||||
|
- `priorContracts` - Reference to preceding contracts
|
||||||
|
- `paragraphs` - Contract content sections
|
||||||
|
|
||||||
|
#### `IRole`
|
||||||
|
|
||||||
|
Defines a role within the contract:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
interface IRole {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
description: string;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### `IParagraph`
|
||||||
|
|
||||||
|
Represents a contract section:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
interface IParagraph {
|
||||||
|
uniqueId: string;
|
||||||
|
parent: IParagraph | null;
|
||||||
|
title: string;
|
||||||
|
content: string;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### `IInvolvedParty`
|
||||||
|
|
||||||
|
Links a role to a contact:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
interface IInvolvedParty {
|
||||||
|
role: string;
|
||||||
|
contact: TContact; // from @tsclass/tsclass
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example: Creating a Contract
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import type {
|
||||||
|
IPortableContract,
|
||||||
|
IRole,
|
||||||
|
IParagraph,
|
||||||
|
} from '@signature.digital/tools';
|
||||||
|
|
||||||
|
const roles: IRole[] = [
|
||||||
|
{
|
||||||
|
id: 'employer',
|
||||||
|
name: 'Employer',
|
||||||
|
description: 'The party offering the position.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'employee',
|
||||||
|
name: 'Employee',
|
||||||
|
description: 'The party accepting the position.',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const paragraphs: IParagraph[] = [
|
||||||
|
{
|
||||||
|
uniqueId: '1',
|
||||||
|
parent: null,
|
||||||
|
title: 'Introduction',
|
||||||
|
content: 'This contract outlines the terms of employment.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
uniqueId: '2',
|
||||||
|
parent: null,
|
||||||
|
title: 'Scope of Work',
|
||||||
|
content: 'The employee will perform the following duties...',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const contract: IPortableContract = {
|
||||||
|
title: 'Employment Contract',
|
||||||
|
context: 'Standard employment agreement',
|
||||||
|
availableRoles: roles,
|
||||||
|
involvedParties: [
|
||||||
|
{ role: 'employer', contact: null },
|
||||||
|
{ role: 'employee', contact: null },
|
||||||
|
],
|
||||||
|
priorContracts: [],
|
||||||
|
paragraphs,
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### Using Demo Data
|
||||||
|
|
||||||
|
The package includes demo data for testing and development:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { demoContract } from '@signature.digital/tools/demodata';
|
||||||
|
|
||||||
|
console.log(demoContract.title); // "Minijob Employment Contract"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Separate Interface Import
|
||||||
|
|
||||||
|
You can import just the interfaces without the full package:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import type { IPortableContract } from '@signature.digital/tools/interfaces';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Module Exports
|
||||||
|
|
||||||
|
The package provides three entry points:
|
||||||
|
|
||||||
|
| Entry Point | Description |
|
||||||
|
| ------------------------------------- | ------------------------------- |
|
||||||
|
| `@signature.digital/tools` | Main export with all interfaces |
|
||||||
|
| `@signature.digital/tools/interfaces` | Interface definitions only |
|
||||||
|
| `@signature.digital/tools/demodata` | Demo contract data |
|
||||||
|
|
||||||
|
## License and Legal Information
|
||||||
|
|
||||||
|
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [LICENSE](./LICENSE) file.
|
||||||
|
|
||||||
|
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
### Trademarks
|
||||||
|
|
||||||
|
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.
|
||||||
|
|
||||||
|
Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.
|
||||||
|
|
||||||
|
### Company Information
|
||||||
|
|
||||||
|
Task Venture Capital GmbH
|
||||||
|
Registered at District Court Bremen HRB 35230 HB, Germany
|
||||||
|
|
||||||
|
For any legal inquiries or further information, please contact us via email at hello@task.vc.
|
||||||
|
|
||||||
|
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { expect, expectAsync, tap } from '@push.rocks/tapbundle';
|
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||||
import * as portablecontract from '../ts/index.js'
|
import * as portablecontract from '../ts/index.js'
|
||||||
|
|
||||||
tap.test('first test', async () => {
|
tap.test('first test', async () => {
|
||||||
console.log(portablecontract)
|
console.log(portablecontract)
|
||||||
})
|
})
|
||||||
|
|
||||||
tap.start()
|
export default tap.start();
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@signature.digital/tools',
|
name: '@signature.digital/tools',
|
||||||
version: '1.0.5',
|
version: '1.2.0',
|
||||||
description: 'a package that defines standard tools for working with contracts.'
|
description: 'A TypeScript package providing utilities for managing digital contracts with modular interfaces and business context integration.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export * from './interfaces/index.js';
|
export * from '../dist_ts_interfaces/index.js';
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
// project scope
|
||||||
|
import * as interfaces from '@signature.digital/interfaces';
|
||||||
|
|
||||||
|
// @tsclass scope
|
||||||
import * as tsclass from '@tsclass/tsclass';
|
import * as tsclass from '@tsclass/tsclass';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
|||||||
5
ts/tspublish.json
Normal file
5
ts/tspublish.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"name": "@signature.digital/tools",
|
||||||
|
"order": 2,
|
||||||
|
"registries": ["useBase"]
|
||||||
|
}
|
||||||
49
ts_demodata/democontract.ts
Normal file
49
ts_demodata/democontract.ts
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
import * as plugins from './plugins.js';
|
||||||
|
|
||||||
|
export const demoContract: plugins.interfaces.IPortableContract = {
|
||||||
|
"title": "Minijob Employment Contract",
|
||||||
|
"context": "This contract is for a Minijob position under German law.",
|
||||||
|
"availableRoles": [
|
||||||
|
{
|
||||||
|
"id": "employer",
|
||||||
|
"name": "Employer",
|
||||||
|
"description": "The party offering the Minijob position."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "employee",
|
||||||
|
"name": "Employee",
|
||||||
|
"description": "The party accepting the Minijob position."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"involvedParties": [
|
||||||
|
{
|
||||||
|
"role": "employer",
|
||||||
|
"contact": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "employee",
|
||||||
|
"contact": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"priorContracts": [],
|
||||||
|
"paragraphs": [
|
||||||
|
{
|
||||||
|
"uniqueId": "1",
|
||||||
|
"parent": null,
|
||||||
|
"title": "Introduction",
|
||||||
|
"content": "This contract outlines the terms of employment for a Minijob position between [Employer Name] and [Employee Name]."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueId": "2",
|
||||||
|
"parent": null,
|
||||||
|
"title": "Scope of Work",
|
||||||
|
"content": "The employee will perform the following duties: [List of Duties]."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uniqueId": "3",
|
||||||
|
"parent": null,
|
||||||
|
"title": "Compensation",
|
||||||
|
"content": "The employee will be compensated with a monthly salary of [Salary Amount], in accordance with Minijob regulations."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
1
ts_demodata/index.ts
Normal file
1
ts_demodata/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from './democontract.js';
|
||||||
5
ts_demodata/plugins.ts
Normal file
5
ts_demodata/plugins.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import * as interfaces from '@signature.digital/interfaces';
|
||||||
|
|
||||||
|
export {
|
||||||
|
interfaces,
|
||||||
|
}
|
||||||
5
ts_demodata/tspublish.json
Normal file
5
ts_demodata/tspublish.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"name": "@signature.digital/demodata",
|
||||||
|
"order": 3,
|
||||||
|
"registries": ["useBase"]
|
||||||
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import * as plugins from '../portablecontract.plugins.js';
|
import * as plugins from './plugins.js';
|
||||||
|
|
||||||
export interface IParagraph {
|
export interface IParagraph {
|
||||||
uniqueId: string;
|
uniqueId: string;
|
||||||
parent: IParagraph | null;
|
parent: IParagraph | null;
|
||||||
@@ -15,7 +14,7 @@ export interface IRole {
|
|||||||
|
|
||||||
export interface IInvolvedParty {
|
export interface IInvolvedParty {
|
||||||
role: string;
|
role: string;
|
||||||
contact: plugins.tsclass.business.IContact;
|
contact: plugins.tsclass.business.TContact;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IPortableContract {
|
export interface IPortableContract {
|
||||||
5
ts_interfaces/plugins.ts
Normal file
5
ts_interfaces/plugins.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import * as tsclass from '@tsclass/tsclass';
|
||||||
|
|
||||||
|
export {
|
||||||
|
tsclass
|
||||||
|
}
|
||||||
5
ts_interfaces/tspublish.json
Normal file
5
ts_interfaces/tspublish.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"name": "@signature.digital/interfaces",
|
||||||
|
"order": 1,
|
||||||
|
"registries": ["useBase"]
|
||||||
|
}
|
||||||
@@ -1,14 +1,16 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"experimentalDecorators": true,
|
|
||||||
"useDefineForClassFields": false,
|
|
||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"module": "NodeNext",
|
"module": "NodeNext",
|
||||||
"moduleResolution": "NodeNext",
|
"moduleResolution": "NodeNext",
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"verbatimModuleSyntax": true
|
"verbatimModuleSyntax": true,
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"@signature.digital/tools": ["./ts/index.js"],
|
||||||
|
"@signature.digital/demodata": ["./ts_demodata/index.js"],
|
||||||
|
"@signature.digital/interfaces": ["./ts_interfaces/index.js"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": ["dist_*/**/*.d.ts"]
|
||||||
"dist_*/**/*.d.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user