@legalplace/prerenderx 3.7.16 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.8.0](https://git.legalplace.eu/legalplace/prerenderx/compare/@legalplace/prerenderx@3.7.17...@legalplace/prerenderx@3.8.0) (2026-02-03)
7
+
8
+
9
+ ### Features
10
+
11
+ * update typeorm typescript eslint ([17c8ba4](https://git.legalplace.eu/legalplace/prerenderx/commits/17c8ba48c1351ee18df6fc07988453f05e74e303)), closes [api#86c4](https://git.legalplace.eu/api/issues/86c4)
12
+
13
+
14
+
15
+
16
+
17
+ ## [3.7.17](https://git.legalplace.eu/legalplace/prerenderx/compare/@legalplace/prerenderx@3.7.16...@legalplace/prerenderx@3.7.17) (2026-02-02)
18
+
19
+ **Note:** Version bump only for package @legalplace/prerenderx
20
+
21
+
22
+
23
+
24
+
6
25
  ## [3.7.16](https://git.legalplace.eu/legalplace/prerenderx/compare/@legalplace/prerenderx@3.7.15...@legalplace/prerenderx@3.7.16) (2026-01-20)
7
26
 
8
27
  **Note:** Version bump only for package @legalplace/prerenderx
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -1,5 +1,5 @@
1
1
  import FillPdfFormBase from "./misc/FillPdfFormBase";
2
- declare type FDFType = {
2
+ type FDFType = {
3
3
  id: string;
4
4
  fields: Record<string, string>;
5
5
  };
@@ -37,11 +37,11 @@ var FillPdfForm = (function (_super) {
37
37
  var form = pdf.form;
38
38
  result.id = pdf.id;
39
39
  form.inputs.forEach(function (input) {
40
- var id = "" + input.name;
40
+ var id = "".concat(input.name);
41
41
  result.fields[id] = _this.getInputValue(input);
42
42
  });
43
43
  form.boxes.forEach(function (box) {
44
- var id = "" + box.name;
44
+ var id = "".concat(box.name);
45
45
  var value = _this.getBoxValue(box);
46
46
  if (!(value === "" &&
47
47
  Object.prototype.hasOwnProperty.call(result.fields, id)))
@@ -1,6 +1,6 @@
1
1
  import type { Types } from "@legalplace/referencesparser";
2
- declare type References = Types.ReferencesType;
3
- declare type OVC_TYPE = {
2
+ type References = Types.ReferencesType;
3
+ type OVC_TYPE = {
4
4
  options: {
5
5
  [key: string]: boolean[];
6
6
  };
@@ -1,11 +1,11 @@
1
1
  import type { Types } from "@legalplace/referencesparser";
2
2
  import type InputsType from "@legalplace/types/dist/inputs";
3
- declare type relVarsValsT = Record<string, string | number>;
4
- declare type getRelatedVarsT = (optionId: number, index: number, variables: number[], ovc: InputsType, references: Types.ReferencesType) => relVarsValsT;
3
+ type relVarsValsT = Record<string, string | number>;
4
+ type getRelatedVarsT = (optionId: number, index: number, variables: number[], ovc: InputsType, references: Types.ReferencesType) => relVarsValsT;
5
5
  export declare const getRelatedVariablesValues: getRelatedVarsT;
6
- declare type autonumsType = [string, string, number, string | null][];
7
- declare type parseOutputT = (output: string, index: number, variables: relVarsValsT, autonums: autonumsType) => string;
6
+ type autonumsType = [string, string, number, string | null][];
7
+ type parseOutputT = (output: string, index: number, variables: relVarsValsT, autonums: autonumsType) => string;
8
8
  export declare const parseOutputWithVariables: parseOutputT;
9
- declare type TParseDocumentNameWithVariables = (text: string, ovc: InputsType, references: Types.ReferencesType, fallback?: string) => string;
9
+ type TParseDocumentNameWithVariables = (text: string, ovc: InputsType, references: Types.ReferencesType, fallback?: string) => string;
10
10
  export declare const parseDocumentNameWithVariables: TParseDocumentNameWithVariables;
11
11
  export {};
@@ -34,11 +34,11 @@ var getRelatedVariablesValues = function (optionId, index, variables, ovc, refer
34
34
  var value = ovc.variables[currentVariableId] || [""];
35
35
  var variableParents = references.relations.variables[currentVariableId].parents;
36
36
  if (variableParents === undefined)
37
- throw new Error("Variable " + currentVariableId + " parents object does not exist");
37
+ throw new Error("Variable ".concat(currentVariableId, " parents object does not exist"));
38
38
  var rootVariableParentId = variableParents[variableParents.length - 1];
39
39
  var rootVariableParentRelations = references.relations.options[rootVariableParentId];
40
40
  if (rootVariableParentRelations === undefined)
41
- throw new Error("Option " + rootVariableParentId + " does not exist");
41
+ throw new Error("Option ".concat(rootVariableParentId, " does not exist"));
42
42
  if (typeof variableParents === "undefined")
43
43
  return;
44
44
  if (rootVariableParentRelations.children.options.includes(optionId) ||
@@ -57,43 +57,43 @@ var getRelatedVariablesValues = function (optionId, index, variables, ovc, refer
57
57
  };
58
58
  exports.getRelatedVariablesValues = getRelatedVariablesValues;
59
59
  var parseOutputWithVariables = function (output, index, variables, autonums) {
60
- var parsedOutput = "" + output;
60
+ var parsedOutput = "".concat(output);
61
61
  Object.keys(variables).forEach(function (variableId) {
62
62
  var value = variables[variableId].toString();
63
63
  if (value.trim().length === 0) {
64
64
  value = new Array(16).join("_");
65
65
  }
66
66
  value = value.replace(/\n/g, "<br />");
67
- parsedOutput = parsedOutput.replace(new RegExp("\\[var:" + variableId + "\\]", "g"), value);
67
+ parsedOutput = parsedOutput.replace(new RegExp("\\[var:".concat(variableId, "\\]"), "g"), value);
68
68
  });
69
69
  parsedOutput = parsedOutput.replace(/\[\[PAGE_BREAK\]\]/gi, '<div style="page-break-after:always"></div>');
70
70
  parsedOutput = parsedOutput.replace(/\[(E|B)_BLUR\]/gi, "");
71
71
  parsedOutput = parsedOutput.replace(/\[signature:([0-9]+)\]/g, function (v, signatureId) {
72
- return "<span data-signature=\"signature\" data-signature-id=\"" + signatureId + "\" data-signer-index=\"" + index + "\"></span>";
72
+ return "<span data-signature=\"signature\" data-signature-id=\"".concat(signatureId, "\" data-signer-index=\"").concat(index, "\"></span>");
73
73
  });
74
74
  parsedOutput = parsedOutput.replace(/\[signature:date\]/g, function () { return '<span data-signature="date"></span>'; });
75
75
  parsedOutput = parsedOutput.replace(/\[signature:date:([0-9]+)\]/g, function (v, signatureId) {
76
- return "<span data-signature=\"date\" data-signature-id=\"" + signatureId + "\" data-signer-index=\"" + index + "\"></span>";
76
+ return "<span data-signature=\"date\" data-signature-id=\"".concat(signatureId, "\" data-signer-index=\"").concat(index, "\"></span>");
77
77
  });
78
78
  parsedOutput = parsedOutput.replace(/\[signature:mention:([0-9]+):(?:&quot;|")((?:[^"&]|\\.)*?)(?:&quot;|")\]/g, function (v, signatureId, mention) {
79
- return "<span data-signature=\"mention\" data-signature-id=\"" + signatureId + "\" data-signer-index=\"" + index + "\" data-signer-mention=\"" + mention + "\"></span>";
79
+ return "<span data-signature=\"mention\" data-signature-id=\"".concat(signatureId, "\" data-signer-index=\"").concat(index, "\" data-signer-mention=\"").concat(mention, "\"></span>");
80
80
  });
81
81
  parsedOutput = parsedOutput.replace(/\[date\]/g, function () { return '<span data-signature="date"></span>'; });
82
82
  parsedOutput = parsedOutput.replace(new RegExp(yousign_1.yousignTagFieldRegex, "g"), function (v, paramsString) {
83
83
  try {
84
- var parsedParams = (0, yousign_1.parseYousignTag)("[yousign:" + paramsString.replace(/((=)&quot;)|(&quot;(;|$))/g, '$2"$4') + "]");
84
+ var parsedParams = (0, yousign_1.parseYousignTag)("[yousign:".concat(paramsString.replace(/((=)&quot;)|(&quot;(;|$))/g, '$2"$4'), "]"));
85
85
  return (0, yousign_1.convertParamsToHtmlTag)(__assign(__assign({}, parsedParams), { signerIndex: index }));
86
86
  }
87
87
  catch (error) {
88
- console.error("Failed to parse Yousign tag: " + v, error);
88
+ console.error("Failed to parse Yousign tag: ".concat(v), error);
89
89
  return v;
90
90
  }
91
91
  });
92
92
  autonums.forEach(function (currentAn) {
93
93
  if (currentAn[3] === null)
94
- parsedOutput = parsedOutput.replace("[" + currentAn[0] + ":" + currentAn[1] + "]", "<span class=\"" + currentAn[0] + "\">" + currentAn[2] + "</span>");
94
+ parsedOutput = parsedOutput.replace("[".concat(currentAn[0], ":").concat(currentAn[1], "]"), "<span class=\"".concat(currentAn[0], "\">").concat(currentAn[2], "</span>"));
95
95
  else
96
- parsedOutput = parsedOutput.replace("[" + currentAn[0] + ":" + currentAn[1] + "](" + currentAn[3] + ")", "<span class=\"" + currentAn[0] + "\">" + currentAn[2] + "</span>");
96
+ parsedOutput = parsedOutput.replace("[".concat(currentAn[0], ":").concat(currentAn[1], "](").concat(currentAn[3], ")"), "<span class=\"".concat(currentAn[0], "\">").concat(currentAn[2], "</span>"));
97
97
  });
98
98
  return parsedOutput;
99
99
  };
@@ -118,14 +118,14 @@ var parseDocumentNameWithVariables = function (text, ovc, references, fallback)
118
118
  var value = ((_a = ovc.variables[variableId]) === null || _a === void 0 ? void 0 : _a[0]) || "";
119
119
  variablesValues[variableId] = value.toString();
120
120
  });
121
- var parsedText = "" + text;
121
+ var parsedText = "".concat(text);
122
122
  variables.forEach(function (variableId) {
123
123
  var value = variablesValues[variableId];
124
124
  if (value.trim().length === 0 && fallback)
125
125
  parsedText = fallback;
126
126
  if (parsedText === fallback && fallback)
127
127
  return;
128
- parsedText = parsedText.replace(new RegExp("\\[var:" + variableId + "\\]", "gi"), value);
128
+ parsedText = parsedText.replace(new RegExp("\\[var:".concat(variableId, "\\]"), "gi"), value);
129
129
  });
130
130
  return parsedText;
131
131
  };
@@ -63,7 +63,7 @@ var FillPdfFormBase = (function () {
63
63
  if (sections[i].options.includes(rootId))
64
64
  return sections[i].id;
65
65
  }
66
- throw new Error("Cannot find parent section for option " + id + " (Root option id: " + rootId + ")");
66
+ throw new Error("Cannot find parent section for option ".concat(id, " (Root option id: ").concat(rootId, ")"));
67
67
  };
68
68
  return FillPdfFormBase;
69
69
  }());
@@ -1,17 +1,17 @@
1
- export declare type DocumentOutputIndex = {
1
+ export type DocumentOutputIndex = {
2
2
  name: string;
3
3
  slug: string;
4
4
  pdf: boolean;
5
5
  docx: boolean;
6
6
  };
7
- export declare type DocumentPdfFormIndex = {
7
+ export type DocumentPdfFormIndex = {
8
8
  name: string;
9
9
  slug: string;
10
10
  form: boolean;
11
11
  fdf: FDFType;
12
12
  };
13
- export declare type DocumentIndex = Record<string, DocumentOutputIndex | DocumentPdfFormIndex>;
14
- export declare type FDFType = {
13
+ export type DocumentIndex = Record<string, DocumentOutputIndex | DocumentPdfFormIndex>;
14
+ export type FDFType = {
15
15
  id: string;
16
16
  fields: Record<string, string>;
17
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legalplace/prerenderx",
3
- "version": "3.7.16",
3
+ "version": "3.8.0",
4
4
  "description": "PrerenderX",
5
5
  "main": "dist/index.js",
6
6
  "repository": "https://git.legalplace.eu/legalplace/prerenderx",
@@ -16,14 +16,14 @@
16
16
  "release": "standard-version -a --no-verify"
17
17
  },
18
18
  "dependencies": {
19
- "@legalplace/conditions-runner": "^2.1.42",
19
+ "@legalplace/conditions-runner": "^2.1.44",
20
20
  "@legalplace/eslint-config-base": "^1.2.0",
21
21
  "@legalplace/lplogic": "2.3.1",
22
- "@legalplace/models-v3-types": "^5.15.8",
23
- "@legalplace/ovc-converter": "^2.1.7",
22
+ "@legalplace/models-v3-types": "^5.15.11",
23
+ "@legalplace/ovc-converter": "^2.1.9",
24
24
  "@legalplace/prettier-config": "^2.1.3",
25
- "@legalplace/referencesparser": "^3.1.90",
26
- "@legalplace/yousign": "^0.7.69",
25
+ "@legalplace/referencesparser": "^3.1.94",
26
+ "@legalplace/yousign": "^0.8.0",
27
27
  "crypto": "^1.0.1",
28
28
  "standard-version": "^9.3.1"
29
29
  },
@@ -37,5 +37,5 @@
37
37
  "ts-jest": "^24.0.2"
38
38
  },
39
39
  "prettier": "@legalplace/prettier-config",
40
- "gitHead": "f37e442fc90385e82b44b637f5ed72f9e5184e84"
40
+ "gitHead": "26e3e07833416d5dba91fd29e4fa1652dda8ca4b"
41
41
  }
package/tsconfig.json CHANGED
@@ -2,6 +2,7 @@
2
2
  "extends": "../../tsconfig.json",
3
3
  "compileOnSave": true,
4
4
  "compilerOptions": {
5
+ "skipLibCheck": true,
5
6
  "target": "es5",
6
7
  "module": "commonjs",
7
8
  "lib": ["es2018"],