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: env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci IMAGE: code.foss.global/hosttoday/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}}@/${{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}}
@ -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

View File

@ -6,8 +6,8 @@ on:
- '*' - '*'
env: env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci IMAGE: code.foss.global/hosttoday/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}}@/${{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}}
@ -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
@ -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
@ -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
@ -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

1
.gitignore vendored
View File

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

View File

@ -1,5 +1,12 @@
# Changelog # 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) ## 2024-12-02 - 1.5.1 - fix(package)
Fix duplicate node export in package.json 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"> <html lang="en">
<head> <head>
<!--Lets set some basic meta tags--> <!--Lets set some basic meta tags-->
@ -11,8 +8,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--Lets load standard fonts--> <!--Lets load standard fonts-->
<link rel="preconnect" href="https://assetbroker.lossless.one/" crossorigin> <link rel="preconnect" href="https://" crossorigin>
<link rel="stylesheet" href="https://assetbroker.lossless.one/fonts/fonts.css"> <link rel="stylesheet" href="https:///fonts/fonts.css">
<style> <style>
body { body {

View File

@ -61,12 +61,12 @@
"type": "module", "type": "module",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://gitlab.com/designestate/private/dedocument-catalog.git" "url": "git+https://code.foss.global/designestate/private/dedocument-catalog.git"
}, },
"bugs": { "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": [ "keywords": [
"document generation", "document generation",
"invoice automation", "invoice automation",

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,9 @@
import * as plugins from './plugins.js'; 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/'); export const nogitDir = plugins.path.join(packageDir, '.nogit/');
plugins.smartfile.fs.ensureDirSync(nogitDir); plugins.smartfile.fs.ensureDirSync(nogitDir);

View File

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

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@design.estate/dees-document', 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.' 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", "module": "NodeNext",
"moduleResolution": "NodeNext", "moduleResolution": "NodeNext",
"esModuleInterop": true, "esModuleInterop": true,
"verbatimModuleSyntax": true "verbatimModuleSyntax": true,
"baseUrl": ".",
"paths": {
"undefined": [
"./ts_web/index.js"
]
}
}, },
"exclude": [ "exclude": [
"dist_*/**/*.d.ts" "dist_*/**/*.d.ts"