@renovatebot/pgp 1.0.1 → 1.0.2
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/index.js +27 -0
- package/package.json +6 -5
package/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
let decryptDotnet, decryptWasmJava, decryptJsJava;
|
|
2
|
+
|
|
3
|
+
export async function decrypt(key, data, options) {
|
|
4
|
+
switch (options?.runtime) {
|
|
5
|
+
case 'js-java':
|
|
6
|
+
if (!decryptJsJava) {
|
|
7
|
+
decryptJsJava = (await import('./dist/teavm/lib.js')).decrypt;
|
|
8
|
+
}
|
|
9
|
+
return decryptJsJava(key, data);
|
|
10
|
+
case 'wasm-java':
|
|
11
|
+
if (!decryptWasmJava) {
|
|
12
|
+
const { load } = await import('./dist/teavm/lib.wasm-runtime.js');
|
|
13
|
+
const teavm = await load(
|
|
14
|
+
new URL(`./dist/teavm/lib.wasm`, import.meta.url),
|
|
15
|
+
);
|
|
16
|
+
decryptWasmJava = teavm.exports.decrypt;
|
|
17
|
+
}
|
|
18
|
+
return decryptWasmJava(key, data);
|
|
19
|
+
case 'wasm-dotnet':
|
|
20
|
+
if (!decryptDotnet) {
|
|
21
|
+
decryptDotnet = (await import('./dist/dotnet/main.mjs')).decrypt;
|
|
22
|
+
}
|
|
23
|
+
return decryptDotnet(key, data);
|
|
24
|
+
default:
|
|
25
|
+
throw new Error('Unsupported runtime specified in options');
|
|
26
|
+
}
|
|
27
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@renovatebot/pgp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "PGP library for renovate",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"renovate",
|
|
@@ -16,21 +16,22 @@
|
|
|
16
16
|
"files": [
|
|
17
17
|
"README.md",
|
|
18
18
|
"LICENSE",
|
|
19
|
+
"index.js",
|
|
19
20
|
"index.d.ts",
|
|
20
21
|
"dist/"
|
|
21
22
|
],
|
|
22
23
|
"devDependencies": {
|
|
23
|
-
"@containerbase/semantic-release-pnpm": "1.3.
|
|
24
|
-
"@types/node": "22.
|
|
24
|
+
"@containerbase/semantic-release-pnpm": "1.3.1",
|
|
25
|
+
"@types/node": "22.18.12",
|
|
25
26
|
"@vitest/coverage-v8": "3.2.4",
|
|
26
27
|
"conventional-changelog-conventionalcommits": "9.1.0",
|
|
27
28
|
"husky": "9.1.7",
|
|
28
|
-
"lint-staged": "16.
|
|
29
|
+
"lint-staged": "16.2.6",
|
|
29
30
|
"markdownlint-cli2": "0.18.1",
|
|
30
31
|
"prettier": "3.6.2",
|
|
31
32
|
"prettier-plugin-packagejson": "2.5.19",
|
|
32
33
|
"semantic-release": "25.0.1",
|
|
33
|
-
"typescript": "5.
|
|
34
|
+
"typescript": "5.9.3",
|
|
34
35
|
"vitest": "3.2.4"
|
|
35
36
|
},
|
|
36
37
|
"engines": {
|