@getvouch/sdk 0.1.1 → 0.1.3
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/dist/lib/vouch.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { validatedHost } from "
|
|
2
|
-
import { validatedUuidV4 } from "
|
|
3
|
-
import { encodeInputs } from "
|
|
1
|
+
import { validatedHost } from "../utils/validated-host";
|
|
2
|
+
import { validatedUuidV4 } from "../utils/validated-uuid";
|
|
3
|
+
import { encodeInputs } from "../utils/encode-inputs";
|
|
4
4
|
const DEFAULT_VOUCH_HOST = "https://app.getvouch.io";
|
|
5
5
|
const DEFAULT_CUSTOMER_ID = "1be03be8-5014-413c-835a-feddf4020da2";
|
|
6
6
|
export class Vouch {
|
package/dist/lib/vouch.test.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Vouch } from "./vouch";
|
|
2
2
|
import { beforeEach, expect } from "vitest";
|
|
3
|
-
import { validatedUuidV4 } from "
|
|
3
|
+
import { validatedUuidV4 } from "../utils/validated-uuid";
|
|
4
4
|
describe("Vouch SDK", () => {
|
|
5
5
|
it("correctly sets default vouch host", () => {
|
|
6
6
|
const vouch = new Vouch();
|
|
@@ -7,7 +7,12 @@ export function toBase64InBrowser(encodedText) {
|
|
|
7
7
|
}
|
|
8
8
|
export function toBase64(encodedText) {
|
|
9
9
|
if (typeof Buffer !== "undefined") {
|
|
10
|
-
|
|
10
|
+
try {
|
|
11
|
+
return Buffer.from(encodedText, "utf-8").toString("base64url");
|
|
12
|
+
}
|
|
13
|
+
catch (_a) {
|
|
14
|
+
/* empty */
|
|
15
|
+
}
|
|
11
16
|
}
|
|
12
17
|
return toBase64InBrowser(encodedText);
|
|
13
18
|
}
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "git+https://github.com/vlayer-xyz/vouch.git#main"
|
|
9
9
|
},
|
|
10
10
|
"private": false,
|
|
11
|
-
"version": "0.1.
|
|
11
|
+
"version": "0.1.3",
|
|
12
12
|
"description": "vouch SDK",
|
|
13
13
|
"keywords": [
|
|
14
14
|
"webproof",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"vouch"
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "tsc",
|
|
19
|
+
"build": "tsc && tsc-alias",
|
|
20
20
|
"test": "vitest run",
|
|
21
21
|
"lint": "eslint src && tsc --noEmit",
|
|
22
22
|
"lint:fix": "eslint src --fix && tsc --noEmit",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"eslint-config-prettier": "^10.1.1",
|
|
30
30
|
"eslint-plugin-prettier": "^5.2.6",
|
|
31
31
|
"prettier": "^3.5.3",
|
|
32
|
+
"tsc-alias": "^1.8.16",
|
|
32
33
|
"typescript": "^5",
|
|
33
34
|
"typescript-eslint": "^8.30.1",
|
|
34
35
|
"vite-tsconfig-paths": "^5.1.4",
|