edockit 0.1.1 → 0.2.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.
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Cross-platform encoding utilities for ArrayBuffer/Base64/Hex conversions
3
+ * Works in both browser and Node.js environments
4
+ */
5
+ /**
6
+ * Convert ArrayBuffer to base64 string
7
+ */
8
+ export declare function arrayBufferToBase64(buffer: ArrayBuffer): string;
9
+ /**
10
+ * Convert base64 string to ArrayBuffer
11
+ */
12
+ export declare function base64ToArrayBuffer(base64: string): ArrayBuffer;
13
+ /**
14
+ * Convert base64 string to Uint8Array
15
+ */
16
+ export declare function base64ToUint8Array(base64: string): Uint8Array;
17
+ /**
18
+ * Convert ArrayBuffer to hex string
19
+ */
20
+ export declare function arrayBufferToHex(buffer: ArrayBuffer): string;
21
+ /**
22
+ * Convert hex string to ArrayBuffer
23
+ */
24
+ export declare function hexToArrayBuffer(hex: string): ArrayBuffer;
25
+ /**
26
+ * Format DER bytes as PEM certificate
27
+ */
28
+ export declare function arrayBufferToPEM(buffer: ArrayBuffer, type?: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edockit",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "main": "dist/index.cjs.js",
5
5
  "scripts": {
6
6
  "test": "jest --silent",
@@ -12,6 +12,7 @@
12
12
  "clean": "rimraf dist",
13
13
  "prebuild": "npm run clean",
14
14
  "prepublishOnly": "npm run build",
15
+ "prepare": "simple-git-hooks",
15
16
  "test:integration": "jest tests/integration --silent",
16
17
  "test:integration:verbose": "jest tests/integration",
17
18
  "test:browser": "web-test-runner",
@@ -36,6 +37,8 @@
36
37
  "license": "MIT",
37
38
  "description": "A JavaScript library for listing, parsing, and verifying the contents and signatures of electronic documents (eDoc) and Associated Signature Containers (ASiC-E), supporting EU eIDAS standards for digital signatures and electronic seals.",
38
39
  "dependencies": {
40
+ "@peculiar/asn1-ocsp": "^2.6.0",
41
+ "@peculiar/asn1-tsp": "^2.6.0",
39
42
  "@peculiar/x509": "^1.12.3",
40
43
  "@xmldom/xmldom": "^0.9.8",
41
44
  "fflate": "^0.8.2",
@@ -52,10 +55,12 @@
52
55
  "@web/test-runner": "^0.20.1",
53
56
  "@web/test-runner-chrome": "^0.18.1",
54
57
  "jest": "^29.7.0",
58
+ "lint-staged": "^16.2.7",
55
59
  "prettier": "^3.5.3",
56
60
  "rimraf": "^6.0.1",
57
61
  "rollup": "^2.79.2",
58
62
  "rollup-plugin-esbuild": "^6.2.1",
63
+ "simple-git-hooks": "^2.13.1",
59
64
  "ts-jest": "^29.2.6",
60
65
  "typescript": "^5.8.2"
61
66
  },
@@ -65,7 +70,8 @@
65
70
  "files": [
66
71
  "dist",
67
72
  "LICENSE",
68
- "README.md"
73
+ "README.md",
74
+ "CHANGELOG.md"
69
75
  ],
70
76
  "repository": {
71
77
  "type": "git",
@@ -74,5 +80,11 @@
74
80
  "bugs": {
75
81
  "url": "https://github.com/edgarsj/edockit/issues"
76
82
  },
77
- "homepage": "https://github.com/edgarsj/edockit#readme"
83
+ "homepage": "https://github.com/edgarsj/edockit#readme",
84
+ "simple-git-hooks": {
85
+ "pre-commit": "npx lint-staged"
86
+ },
87
+ "lint-staged": {
88
+ "*.{ts,js}": "prettier --check"
89
+ }
78
90
  }