fix(workflow): Corrected Docker image references and package scope in YAML workflows for compatibility.

This commit is contained in:
Philipp Kunz 2024-12-02 16:13:37 +01:00
parent 249d44d5fc
commit c949f1b968
19 changed files with 114 additions and 74 deletions

View File

@ -6,8 +6,8 @@ on:
- '**'
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
IMAGE: code.foss.global/hosttoday/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}}
@ -26,7 +26,7 @@ jobs:
- name: Install pnpm and npmci
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
pnpm install -g @ship.zone/npmci
- name: Run npm prepare
run: npmci npm prepare

View File

@ -6,8 +6,8 @@ on:
- '*'
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
IMAGE: code.foss.global/hosttoday/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}}
@ -26,7 +26,7 @@ jobs:
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
pnpm install -g @ship.zone/npmci
npmci npm prepare
- name: Audit production dependencies
@ -54,7 +54,7 @@ jobs:
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
pnpm install -g @ship.zone/npmci
npmci npm prepare
- name: Test stable
@ -82,7 +82,7 @@ jobs:
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
pnpm install -g @ship.zone/npmci
npmci npm prepare
- name: Release
@ -104,7 +104,7 @@ jobs:
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
pnpm install -g @ship.zone/npmci
npmci npm prepare
- name: Code quality

1
.gitignore vendored
View File

@ -3,7 +3,6 @@
# artifacts
coverage/
public/
pages/
# installs
node_modules/

View File

@ -1,5 +1,12 @@
# Changelog
## 2024-12-02 - 1.5.2 - fix(workflow)
Corrected Docker image references and package scope in YAML workflows for compatibility.
- Updated Docker image reference from GitLab to code.foss.global for npmci UI workflows.
- Fixed npm package scope for `@shipzone/npmci` in YAML workflows.
- Minor formatting corrections for better code readability.
## 2024-12-02 - 1.5.1 - fix(package)
Fix duplicate node export in package.json

View File

@ -1,6 +1,3 @@
<!--gitzone element-->
<!-- made by Task Venture Capital GmbH -->
<!-- checkout https://maintainedby.lossless.com for awesome OpenSource projects -->
<html lang="en">
<head>
<!--Lets set some basic meta tags-->
@ -11,8 +8,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--Lets load standard fonts-->
<link rel="preconnect" href="https://assetbroker.lossless.one/" crossorigin>
<link rel="stylesheet" href="https://assetbroker.lossless.one/fonts/fonts.css">
<link rel="preconnect" href="https://" crossorigin>
<link rel="stylesheet" href="https:///fonts/fonts.css">
<style>
body {

View File

@ -61,12 +61,12 @@
"type": "module",
"repository": {
"type": "git",
"url": "git+https://gitlab.com/designestate/private/dedocument-catalog.git"
"url": "git+https://code.foss.global/designestate/private/dedocument-catalog.git"
},
"bugs": {
"url": "https://gitlab.com/designestate/private/dedocument-catalog/issues"
"url": "https://code.foss.global/designestate/private/dedocument-catalog/issues"
},
"homepage": "https://gitlab.com/designestate/private/dedocument-catalog#readme",
"homepage": "https://code.foss.global/designestate/private/dedocument-catalog#readme",
"keywords": [
"document generation",
"invoice automation",

View File

@ -47,48 +47,48 @@ import { ILetter } from '@design.estate/dees-document';
const invoiceTemplate: ILetter = {
from: {
name: "Your Company Name",
name: 'Your Company Name',
address: {
streetName: "Your Street",
houseNumber: "123",
city: "Your City",
country: "Your Country",
postalCode: "12345",
streetName: 'Your Street',
houseNumber: '123',
city: 'Your City',
country: 'Your Country',
postalCode: '12345',
},
email: "your-email@example.com",
phone: "123-456-7890",
email: 'your-email@example.com',
phone: '123-456-7890',
},
to: {
name: "Recipient Company Name",
name: 'Recipient Company Name',
address: {
streetName: "Recipient Street",
houseNumber: "456",
city: "Recipient City",
country: "Recipient Country",
postalCode: "67890",
streetName: 'Recipient Street',
houseNumber: '456',
city: 'Recipient City',
country: 'Recipient Country',
postalCode: '67890',
},
email: "recipient-email@example.com",
phone: "098-765-4321",
email: 'recipient-email@example.com',
phone: '098-765-4321',
},
content: {
invoiceData: {
items: [
{
name: "Service or Product Name",
name: 'Service or Product Name',
unitQuantity: 2,
unitNetPrice: 100.00,
unitNetPrice: 100.0,
unitType: 'service',
vatPercentage: 19,
currency: 'EUR',
}
]
}
},
subject: "Invoice for Services Rendered",
],
},
},
subject: 'Invoice for Services Rendered',
date: new Date().getTime(),
versionInfo: {
type: "final",
version: "1.0.0"
type: 'final',
version: '1.0.0',
},
};
```
@ -133,22 +133,28 @@ This script encompasses initializing services and generating a PDF in a streamli
`@design.estate/dees-document` provides several advanced functionalities, enabling rich document creation:
1. **Custom Templates & Styling**
- Customize the styling through CSS or using inline styles in TypeScript.
- Templates can be adjusted to present different document types (e.g., contracts, reports).
2. **Modular Components and Reuse**
- Utilize modular components to create reusable parts across different documents, enhancing maintainability and reducing redundancy.
3. **Interactive Documents**
- Integrate interactivities like forms, buttons, and interactive charts within your documents.
4. **Localization Support**
- Documents can be localized to support multiple languages, enhancing accessibility and usability.
5. **Responsive and Adaptive Designs**
- Create documents that adjust layout dynamically depending on print or digital medium, maintaining consistency across platforms.
6. **Security Features**
- Apply digital signatures and encrypt sensitive documents to ensure secure and authentic document distribution.
7. **Complex Business Logic**

View File

@ -2,8 +2,4 @@ import * as tsclass from '@tsclass/tsclass';
import * as smartfile from '@push.rocks/smartfile';
import * as path from 'path';
export {
tsclass,
smartfile,
path,
}
export { tsclass, smartfile, path };

View File

@ -113,7 +113,7 @@ tap.test('should create an invoice', async () => {
const pdfResult = await testPdfServiceInstance.createPdfFromLetterObject(optionsArg);
await plugins.smartfile.memory.toFs(
Buffer.from(pdfResult.buffer),
plugins.path.join(paths.nogitDir, `test-${counter++}.pdf`)
plugins.path.join(paths.nogitDir, `test-${counter++}.pdf`),
);
};
await saveResult({

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@design.estate/dees-document',
version: '1.5.1',
version: '1.5.2',
description: 'A sophisticated framework for dynamically generating and rendering business documents like invoices with modern web technologies, featuring PDF creation, templating, and automation.'
}

View File

@ -1,9 +1,7 @@
import * as plugins from './plugins.js';
import * as helpers from './helpers.js';
export interface IPdfServiceConstructorOptions {
}
export interface IPdfServiceConstructorOptions {}
/**
* a pdf service for generating pdfs
@ -44,8 +42,8 @@ export class PdfService {
* creates an letter
*/
public async createPdfFromLetterObject(optionsArg: {
letterData: plugins.tsclass.business.ILetter,
documentSettings: plugins.shared.interfaces.IDocumentSettings
letterData: plugins.tsclass.business.ILetter;
documentSettings: plugins.shared.interfaces.IDocumentSettings;
}) {
const html = `
<script type="module">

View File

@ -3,4 +3,4 @@ import * as paths from './paths.js';
export const getBundleAsString = async () => {
return plugins.smartfile.fs.toStringSync(paths.bundleFile);
}
};

View File

@ -1,6 +1,9 @@
import * as plugins from './plugins.js';
export const packageDir = plugins.path.join(plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url), '../');
export const packageDir = plugins.path.join(
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
'../',
);
export const nogitDir = plugins.path.join(packageDir, '.nogit/');
plugins.smartfile.fs.ensureDirSync(nogitDir);

View File

@ -1,9 +1,7 @@
// node native
import * as path from 'path';
export {
path
}
export { path };
// dees-document scope
import * as shared from '../dist_ts_shared/index.js';
@ -16,16 +14,9 @@ import * as smartjson from '@push.rocks/smartjson';
import * as smartpath from '@push.rocks/smartpath';
import * as smartpdf from '@push.rocks/smartpdf';
export {
smartfile,
smartpath,
smartjson,
smartpdf,
}
export { smartfile, smartpath, smartjson, smartpdf };
// @tsclass scope
import * as tsclass from '@tsclass/tsclass';
export {
tsclass,
}
export { tsclass };

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@design.estate/dees-document',
version: '1.5.1',
version: '1.5.2',
description: 'A sophisticated framework for dynamically generating and rendering business documents like invoices with modern web technologies, featuring PDF creation, templating, and automation.'
}

2
ts_web/pages/index.ts Normal file
View File

@ -0,0 +1,2 @@
export * from './page1.js';
export * from './page2.js';

17
ts_web/pages/page1.ts Normal file
View File

@ -0,0 +1,17 @@
import * as plugins from '../plugins.js';
import { html } from '@design.estate/dees-element';
export const page1 = () => html`
<style>
dedocument-dedocument {
margin: 16px;
}
</style>
<dedocument-dedocument .printMode=${false} letterData=${plugins.smartjson.stringifyBase64({
...plugins.shared.demoLetter,
from: {
...plugins.shared.demoLetter.from,
description: 'a string set via stringified JSON'
}
} as plugins.tsclass.business.ILetter)}> </dedocument-dedocument>
`;

18
ts_web/pages/page2.ts Normal file
View File

@ -0,0 +1,18 @@
import { html } from "@design.estate/dees-element";
export const page2 = () => html`
<style>
.demoPort {
margin: auto;
width: 400px;
}
dedocument-page {
margin-top: 16px;
margin-bottom: 16px;
}
</style>
<div class="demoPort">
<dedocument-page .format="${"a4"}" .viewWidth=${400}></dedocument-page>
<dedocument-page .format="${"a4"}" .viewWidth=${400}></dedocument-page>
</div>
`;

View File

@ -6,7 +6,13 @@
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"verbatimModuleSyntax": true
"verbatimModuleSyntax": true,
"baseUrl": ".",
"paths": {
"undefined": [
"./ts_web/index.js"
]
}
},
"exclude": [
"dist_*/**/*.d.ts"