ci: Improve Docker build workflow and update dependencies
- Add release type detection to distinguish between version tags and edge builds - Implement separate Docker build steps for release and edge builds with appropriate tags - Add edge and SHA-based image tags for main branch builds - Update nginx configuration to support Vietnamese (vi) language routing - Simplify nginx location block to handle static files and fallback to index.html - Remove javascript-obfuscator and ts-migrate from dependencies - Update README with simplified self-hosting instructions using npx http-server - Consolidate multiple server setup examples into single recommended approach - Update build preview command to use npm run preview instead of npx serve - Improve localization files for German, English, Vietnamese, and Chinese - Update worker files and TypeScript logic files for improved functionality - Enhance PDF tool pages with better structure and internationalization support
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
self.importScripts('../coherentpdf.browser.min.js');
|
||||
const baseUrl = self.location.href.substring(0, self.location.href.lastIndexOf('/workers/') + 1);
|
||||
self.importScripts(baseUrl + 'coherentpdf.browser.min.js');
|
||||
|
||||
function parsePageRange(rangeString, totalPages) {
|
||||
const pages = new Set();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
self.importScripts('../coherentpdf.browser.min.js');
|
||||
const baseUrl = self.location.href.substring(0, self.location.href.lastIndexOf('/workers/') + 1);
|
||||
self.importScripts(baseUrl + 'coherentpdf.browser.min.js');
|
||||
|
||||
self.onmessage = function (e) {
|
||||
const { command, files } = e.data;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
self.importScripts('../coherentpdf.browser.min.js');
|
||||
const baseUrl = self.location.href.substring(0, self.location.href.lastIndexOf('/workers/') + 1);
|
||||
self.importScripts(baseUrl + 'coherentpdf.browser.min.js');
|
||||
|
||||
function getAttachmentsFromPDFInWorker(fileBuffer, fileName) {
|
||||
try {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
self.importScripts('../coherentpdf.browser.min.js');
|
||||
const baseUrl = self.location.href.substring(0, self.location.href.lastIndexOf('/workers/') + 1);
|
||||
self.importScripts(baseUrl + 'coherentpdf.browser.min.js');
|
||||
|
||||
function extractAttachmentsFromPDFsInWorker(fileBuffers, fileNames) {
|
||||
try {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
self.importScripts('/coherentpdf.browser.min.js');
|
||||
const baseUrl = self.location.href.substring(0, self.location.href.lastIndexOf('/workers/') + 1);
|
||||
self.importScripts(baseUrl + 'coherentpdf.browser.min.js');
|
||||
|
||||
function convertJSONsToPDFInWorker(fileBuffers, fileNames) {
|
||||
try {
|
||||
@@ -14,8 +15,8 @@ function convertJSONsToPDFInWorker(fileBuffers, fileNames) {
|
||||
try {
|
||||
pdf = coherentpdf.fromJSONMemory(uint8Array);
|
||||
} catch (error) {
|
||||
const errorMsg = error && error.message
|
||||
? error.message
|
||||
const errorMsg = error && error.message
|
||||
? error.message
|
||||
: 'Unknown error';
|
||||
throw new Error(
|
||||
`Failed to convert "${fileName}" to PDF. ` +
|
||||
@@ -23,7 +24,7 @@ function convertJSONsToPDFInWorker(fileBuffers, fileNames) {
|
||||
`Error: ${errorMsg}`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
const pdfData = coherentpdf.toMemory(pdf, false, false);
|
||||
|
||||
const pdfBuffer = pdfData.buffer.slice(0);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
self.importScripts('../coherentpdf.browser.min.js');
|
||||
const baseUrl = self.location.href.substring(0, self.location.href.lastIndexOf('/workers/') + 1);
|
||||
self.importScripts(baseUrl + 'coherentpdf.browser.min.js');
|
||||
|
||||
self.onmessage = function (e) {
|
||||
const { command, files, jobs } = e.data;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
self.importScripts('/coherentpdf.browser.min.js');
|
||||
const baseUrl = self.location.href.substring(0, self.location.href.lastIndexOf('/workers/') + 1);
|
||||
self.importScripts(baseUrl + 'coherentpdf.browser.min.js');
|
||||
|
||||
function convertPDFsToJSONInWorker(fileBuffers, fileNames) {
|
||||
try {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
self.importScripts('/coherentpdf.browser.min.js');
|
||||
const baseUrl = self.location.href.substring(0, self.location.href.lastIndexOf('/workers/') + 1);
|
||||
self.importScripts(baseUrl + 'coherentpdf.browser.min.js');
|
||||
|
||||
function generateTableOfContentsInWorker(
|
||||
pdfData,
|
||||
|
||||
Reference in New Issue
Block a user