Compare commits

..

10 Commits

19 changed files with 304 additions and 64 deletions

View File

@ -0,0 +1,66 @@
name: Default (not tags)
on:
push:
tags-ignore:
- '**'
env:
IMAGE: code.foss.global/host.today/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@/${{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 @ship.zone/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: code.foss.global/host.today/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@/${{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 @ship.zone/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 @ship.zone/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 @ship.zone/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 @ship.zone/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

3
.gitignore vendored
View File

@ -3,7 +3,6 @@
# artifacts
coverage/
public/
pages/
# installs
node_modules/
@ -17,4 +16,4 @@ node_modules/
dist/
dist_*/
# custom
#------# custom

View File

@ -1,5 +1,26 @@
# Changelog
## 2025-03-25 - 8.0.4 - fix(license/business-letter)
Remove legacy commented-out code from letter module and update copyright header
- Removed unused commented block in ts/business/letter.ts
- Updated copyright header in license file
## 2025-03-24 - 8.0.3 - fix(ci)
Add Gitea workflow files for CI/CD, update repository URLs, and standardize formatting
- Added .gitea/workflows/default_nottags.yaml and default_tags.yaml to manage CI for tagged and non-tagged pushes
- Updated package.json repository, homepage, and bugs URLs to reflect the new code.foss.global location
- Modified .gitignore custom section comment for clarity
- Standardized code formatting and string quoting across various source files
- Enhanced tsconfig.json by adding baseUrl and paths settings
## 2025-03-24 - 8.0.2 - fix(commitinfo)
Refresh autogenerated commit info and internal metadata for version consistency
- No functional changes were made
- Updated internal commit metadata to reflect the current project state
## 2025-03-24 - 8.0.1 - fix(documentation)
Improve documentation clarity and update package metadata

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2016
Copyright (c) 2016 Task Venture Capital GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,6 +1,6 @@
{
"name": "@tsclass/tsclass",
"version": "8.0.1",
"version": "8.0.4",
"private": false,
"description": "Provides TypeScript definitions for various business, financial, networking, content, and other common classes.",
"main": "dist_ts/index.js",
@ -13,7 +13,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/tsclass/tsclass.git"
"url": "https://code.foss.global/tsclass/tsclass.git"
},
"keywords": [
"TypeScript",
@ -33,9 +33,9 @@
"author": "Task Venture Capital GmbH",
"license": "MIT",
"bugs": {
"url": "https://github.com/tsclass/tsclass/issues"
"url": "https://code.foss.global/tsclass/tsclass/issues"
},
"homepage": "https://github.com/tsclass/tsclass#readme",
"homepage": "https://code.foss.global/tsclass/tsclass#readme",
"dependencies": {
"type-fest": "^4.37.0"
},
@ -60,5 +60,8 @@
],
"browserslist": [
"last 1 chrome versions"
]
],
"pnpm": {
"overrides": {}
}
}

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@tsclass/tsclass',
version: '8.0.1',
version: '8.0.4',
description: 'Provides TypeScript definitions for various business, financial, networking, content, and other common classes.'
}

View File

@ -47,14 +47,38 @@ export type TPerson = TContactEnvelope<
};
}
>;
type TCompanyInCreation = {
status: "planned" | "founding";
};
type TCompanyActive = {
status: "active";
foundedDate: general.IDate;
};
type TCompanyInLiquidation = {
status: "liquidation";
foundedDate: general.IDate;
liquidationDate: general.IDate;
};
type TCompanyClosed = {
status: "closed";
foundedDate: general.IDate;
liquidationDate: general.IDate;
closedDate: general.IDate;
};
type TCompanyStatus =
| TCompanyInCreation
| TCompanyActive
| TCompanyInLiquidation
| TCompanyClosed;
export type TCompany = TContactEnvelope<
"company",
{
registrationDetails: TRegistrationDetails;
foundedDate: general.IDate;
closedDate: general.IDate;
status: "planned" | "founding" | "active" | "liquidation" | "closed";
}
{ registrationDetails: TRegistrationDetails } & TCompanyStatus
>;
export type TContact = TPerson | TCompany;

View File

@ -52,14 +52,3 @@ export type TLetterSimple = TLetterEnvelope<"simple", {}>;
export type TLetter = TLetterSimple;
// type: "invoice" | "notice" | "warning" | "verification" | "contract";
/* content: {
textData: string[];
invoiceData?: finance.IInvoice;
contractData?: {
id: string;
contractDate: number;
};
timesheetData: string;
}; */

View File

@ -11,14 +11,17 @@ export type TInvoiceItem = {
unitQuantity: number;
unitNetPrice: number;
vatPercentage: number;
}
};
export type TInvoiceEnvelope<TYPE extends 'creditnote' | 'debitnote', FIELDS> = business.TLetterEnvelope<
export type TInvoiceEnvelope<
TYPE extends 'creditnote' | 'debitnote',
FIELDS,
> = business.TLetterEnvelope<
'invoice',
{
invoiceId: string;
invoiceType: TYPE;
status: TInvoiceStatus;
type: TYPE;
items: TInvoiceItem[];
periodOfPerformance?: {
from: number;

View File

@ -31,7 +31,19 @@ import * as storage from './storage/index.js';
// Website
import * as website from './website/index.js';
export { business, container, code, database, finance, content, general, network, saas, storage, website };
export {
business,
container,
code,
database,
finance,
content,
general,
network,
saas,
storage,
website,
};
import type * as typeFest from 'type-fest';
import * as typeFestOwn from './typefest.own.js';

View File

@ -1,4 +1,4 @@
import { type ICert } from "./cert.js";
import { type ICert } from './cert.js';
export class ICnameDescriptor {
/**
@ -26,4 +26,4 @@ export class ICnameDescriptor {
* the ssl certificate
*/
sslCertificate?: ICert;
};
}

View File

@ -1,24 +1,24 @@
export type TDnsRecordType =
| "A"
| "AAAA"
| "CNAME"
| "LOC"
| "PTR"
| "MX"
| "NAPTR"
| "NS"
| "SRV"
| "TXT"
| "CAA"
| "CERT"
| "DNSKEY"
| "DS"
| "HTTPS"
| "SMIMEA"
| "SSHFP"
| "SVCB"
| "TLSA"
| "URI";
| 'A'
| 'AAAA'
| 'CNAME'
| 'LOC'
| 'PTR'
| 'MX'
| 'NAPTR'
| 'NS'
| 'SRV'
| 'TXT'
| 'CAA'
| 'CERT'
| 'DNSKEY'
| 'DS'
| 'HTTPS'
| 'SMIMEA'
| 'SSHFP'
| 'SVCB'
| 'TLSA'
| 'URI';
export interface IDnsRecord {
name: string;

View File

@ -1,4 +1,4 @@
export interface IJwtKeypair {
privatePem: string;
publicPem: string;
}
}

View File

@ -2,4 +2,4 @@ export interface ISshKey {
keyName: string;
public: string;
private?: string;
}
}

View File

@ -1,11 +1,11 @@
import type { TCompany } from "../business/contact.js";
import type { TCompany } from '../business/contact.js';
export interface IProduct {
name: string;
slogan: string;
description: string;
os: "web-based";
category: "Business Application";
os: 'web-based';
category: 'Business Application';
offers: any[];
features: IProductFeature[];
landingPage: string;

View File

@ -2,7 +2,4 @@ type SecondArgument<T> = T extends (arg1: any, arg2: infer P, ...args: any[]) =>
type ValueType<T> = T extends { [key: string]: infer U } ? U : never;
export type {
SecondArgument,
ValueType
}
export type { SecondArgument, ValueType };

View File

@ -4,4 +4,4 @@ export interface ILink {
description?: string;
icon?: string;
target?: '_blank' | '_self' | '_parent' | '_top';
}
}

View File

@ -6,9 +6,11 @@
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"verbatimModuleSyntax": true
"verbatimModuleSyntax": true,
"baseUrl": ".",
"paths": {}
},
"exclude": [
"dist_*/**/*.d.ts"
]
}
}