Cleanup to help me debug build errors
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
"multer": "^1.4.5-lts.1",
|
||||
"pdf-lib": "^1.17.1",
|
||||
"rollup-plugin-copy": "^3.5.0",
|
||||
"rollup-plugin-dynamic-import-variables": "^1.1.0",
|
||||
"tsconfig-paths": "^4.2.0",
|
||||
"vite-plugin-compile-time": "^0.2.1",
|
||||
"vite-plugin-dynamic-import": "^1.5.0",
|
||||
|
||||
@@ -12,15 +12,16 @@ export default {
|
||||
output: {
|
||||
dir: "dist/",
|
||||
format: "es",
|
||||
strict: false,
|
||||
},
|
||||
watch: {
|
||||
include: [ './src/**', '../shared-operations/src/**' ]
|
||||
},
|
||||
plugins: [
|
||||
compileTime(),
|
||||
json(),
|
||||
typescript(),
|
||||
dynamicImportVars(),
|
||||
compileTime(),
|
||||
dynamicImportVars({errorWhenNoFilesFound: true, warnOnError: true}),
|
||||
copy({
|
||||
targets: [
|
||||
{ src: '../shared-operations/public', dest: 'dist' },
|
||||
|
||||
@@ -4,9 +4,12 @@ import express from "express";
|
||||
const app = express();
|
||||
const PORT = 8000;
|
||||
|
||||
|
||||
import { listOperatorNames } from "@stirling-pdf/shared-operations/src/workflow/operatorAccessor";
|
||||
console.log("Available Modules: ", listOperatorNames())
|
||||
|
||||
// server-node: backend api
|
||||
import api from "./routes/api/api-controller";
|
||||
import { listOperatorNames } from "@stirling-pdf/shared-operations/src/workflow/operatorAccessor";
|
||||
app.use("/api", api);
|
||||
|
||||
// serve
|
||||
@@ -17,5 +20,3 @@ app.listen(PORT, () => {
|
||||
process.on('unhandledRejection', (reason, promise) => {
|
||||
console.error('Unhandled Rejection at:', promise, 'reason:', reason);
|
||||
});
|
||||
|
||||
console.log("Available Modules: ", listOperatorNames())
|
||||
@@ -44,7 +44,6 @@ async function handleEndpoint(req: Request, res: Response) {
|
||||
else {
|
||||
action.values = validationResults.value.values;
|
||||
const operation = new operator(action);
|
||||
|
||||
operation.run(validationResults.value.input, (progress) => {}).then(pdfFiles => {
|
||||
respondWithPdfFiles(res, pdfFiles, req.params.func + "_result");
|
||||
});
|
||||
|
||||
@@ -48,7 +48,7 @@ router.post("/:workflowUuid?", [
|
||||
res.status(400).json({error: "PDF validation failed", details: validationResults.error.message});
|
||||
return;
|
||||
}
|
||||
const inputs: PdfFile[] = validationResults.value;
|
||||
const inputs: PdfFile[] = validationResults;
|
||||
|
||||
// Allow option to do it synchronously and just make a long request
|
||||
if(req.body.async === "false") {
|
||||
|
||||
@@ -112,8 +112,8 @@
|
||||
},
|
||||
"include": [
|
||||
"src",
|
||||
"declarations/*.d.ts",
|
||||
"../shared-operations/src/wasm/pdfcpu/PdfcpuWrapper.d.ts"
|
||||
"./declarations/",
|
||||
"../shared-operations/declarations/"
|
||||
],
|
||||
"ts-node": {
|
||||
"experimentalSpecifierResolution": "node",
|
||||
|
||||
Reference in New Issue
Block a user