page2pdf_server 1.1.0 → 1.1.1

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.
Files changed (39) hide show
  1. package/.babelrc +3 -3
  2. package/.eslintrc +32 -32
  3. package/.github/ISSUE_TEMPLATE/bug_report.md +28 -28
  4. package/.github/ISSUE_TEMPLATE/feature_request.md +15 -15
  5. package/.github/ISSUE_TEMPLATE/refactoring.md +15 -15
  6. package/.github/PULL_REQUEST_TEMPLATE.md +18 -18
  7. package/.github/stale.yml +17 -17
  8. package/.github/workflows/cd.yml +75 -75
  9. package/.github/workflows/ci.yml +36 -36
  10. package/.prettierrc +8 -8
  11. package/.vscode/settings.json +3 -3
  12. package/LICENSE +17 -17
  13. package/README.md +6 -1
  14. package/ecosystem.config.js +41 -41
  15. package/jest.config.js +35 -35
  16. package/nodemon.json +6 -6
  17. package/package.json +23 -15
  18. package/src/__tests__/UrltoPdf/generatePdf.test.d.ts +1 -0
  19. package/{__tests__ → src/__tests__}/UrltoPdf/generatePdf.test.ts +1 -1
  20. package/src/__tests__/UrltoPdf/pdfSplit.test.d.ts +1 -0
  21. package/{__tests__ → src/__tests__}/UrltoPdf/pdfSplit.test.ts +1 -1
  22. package/src/__tests__/helpers/index.d.ts +2 -0
  23. package/src/__tests__/home.test.d.ts +1 -0
  24. package/{__tests__ → src/__tests__}/home.test.ts +1 -1
  25. package/src/app.ts +1 -0
  26. package/src/components/home/controller.ts +6 -1
  27. package/src/components/home/pdfController.ts +2 -5
  28. package/src/components/home/splitController.ts +2 -5
  29. package/src/helpers/dataSanitizers.ts +1 -0
  30. package/src/helpers/loggers.ts +4 -2
  31. package/src/index.ts +2 -0
  32. package/src/types/request/config.ts +0 -95
  33. package/src/types.d.ts +97 -0
  34. package/src/utils/pdfgen.ts +3 -6
  35. package/tsconfig.json +44 -41
  36. package/tslint.json +22 -22
  37. package/.husky/pre-commit +0 -6
  38. package/.husky/pre-push +0 -4
  39. /package/{__tests__ → src/__tests__}/helpers/index.ts +0 -0
package/tsconfig.json CHANGED
@@ -1,41 +1,44 @@
1
- {
2
- "compilerOptions": {
3
- /* Basic Options */
4
- "incremental": true,
5
- "target": "ESNext",
6
- "module": "commonjs",
7
- "outDir": "dist",
8
- "pretty": true,
9
- "removeComments": true,
10
-
11
- /* Strict Type-Checking Options */
12
- "strict": true,
13
- "noImplicitAny": true,
14
- "strictNullChecks": true,
15
- "strictFunctionTypes": true,
16
- "strictBindCallApply": true,
17
- "strictPropertyInitialization": true,
18
- "noImplicitThis": false,
19
- "alwaysStrict": true,
20
-
21
- /* Additional Checks */
22
- "noUnusedLocals": true,
23
- "noUnusedParameters": true,
24
- "noImplicitReturns": true,
25
- "noFallthroughCasesInSwitch": true,
26
-
27
- /* Module Resolution Options */
28
- "moduleResolution": "node",
29
- "esModuleInterop": true,
30
- "resolveJsonModule": true,
31
- "sourceMap": true,
32
- "forceConsistentCasingInFileNames": true,
33
- "types": ["jest", "node"],
34
- "baseUrl": "src",
35
- "paths": {
36
- "@/*": ["./*"]
37
- },
38
- },
39
- "include": ["src/**/*", "**/__tests__/**/*"],
40
- "exclude": ["node_modules"]
41
- }
1
+ {
2
+ "compilerOptions": {
3
+ "declaration": false, // 关闭自动生成声明文件
4
+ "outDir": "./dist",
5
+ "rootDir": "./src",
6
+ "pretty": true,
7
+ "removeComments": true,
8
+
9
+ // "declarationDir": "./dist/types", // 声明文件输出目录
10
+ // "emitDeclarationOnly": true, // 仅生成声明文件
11
+ "module": "ESNext",
12
+ "target": "ES2021",
13
+
14
+ /* Strict Type-Checking Options */
15
+ "strict": true,
16
+ "noImplicitAny": true,
17
+ "strictNullChecks": true,
18
+ "strictFunctionTypes": true,
19
+ "strictBindCallApply": true,
20
+ "strictPropertyInitialization": true,
21
+ "noImplicitThis": false,
22
+ "alwaysStrict": true,
23
+
24
+ /* Additional Checks */
25
+ "noUnusedLocals": true,
26
+ "noUnusedParameters": true,
27
+ "noImplicitReturns": true,
28
+ "noFallthroughCasesInSwitch": true,
29
+
30
+ /* Module Resolution Options */
31
+ "moduleResolution": "node",
32
+ "esModuleInterop": true,
33
+ "resolveJsonModule": true,
34
+ "sourceMap": true,
35
+ "forceConsistentCasingInFileNames": true,
36
+ "types": ["jest", "node"],
37
+ "baseUrl": "src",
38
+ "paths": {
39
+ "@/*": ["./*"]
40
+ },
41
+ },
42
+ "include": ["src/**/*", "**/__tests__/**/*"],
43
+ "exclude": ["node_modules", "dist"] // 排除的目录
44
+ }
package/tslint.json CHANGED
@@ -1,22 +1,22 @@
1
- {
2
- "defaultSeverity": "error",
3
- "extends": ["tslint:recommended"],
4
- "jsRules": {
5
- "object-literal-sort-keys": false
6
- },
7
- "rules": {
8
- "ordered-imports": false,
9
- "object-literal-sort-keys": false,
10
- "quotemark": [true, "single"],
11
- "trailing-comma": [
12
- true,
13
- {
14
- "multiline": "never",
15
- "singleline": "never"
16
- }
17
- ],
18
- "arrow-parens": [true, "ban-single-arg-parens"],
19
- "interface-name": [true, "never-prefix"]
20
- },
21
- "rulesDirectory": []
22
- }
1
+ {
2
+ "defaultSeverity": "error",
3
+ "extends": ["tslint:recommended"],
4
+ "jsRules": {
5
+ "object-literal-sort-keys": false
6
+ },
7
+ "rules": {
8
+ "ordered-imports": false,
9
+ "object-literal-sort-keys": false,
10
+ "quotemark": [true, "single"],
11
+ "trailing-comma": [
12
+ true,
13
+ {
14
+ "multiline": "never",
15
+ "singleline": "never"
16
+ }
17
+ ],
18
+ "arrow-parens": [true, "ban-single-arg-parens"],
19
+ "interface-name": [true, "never-prefix"]
20
+ },
21
+ "rulesDirectory": []
22
+ }
package/.husky/pre-commit DELETED
@@ -1,6 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- yarn prettify
5
- yarn lint:fix
6
- git add
package/.husky/pre-push DELETED
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- yarn build
File without changes