@vardario/cognito-client 0.1.7 → 0.1.8

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.
@@ -1,6 +1,7 @@
1
1
  import { addSeconds } from "date-fns";
2
2
  import hashJs from "hash.js";
3
3
  import { BigInteger } from "jsbn";
4
+ import { Buffer } from "buffer";
4
5
  import { AuthError, AuthException, getAuthError, } from "./error.js";
5
6
  import { calculateSignature, calculateU, decodeJwt, generateA, generateSmallA, getPasswordAuthenticationKey, randomBytes, } from "./utils.js";
6
7
  /**
package/lib/utils.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
2
  import { BigInteger } from "jsbn";
3
+ import { Buffer } from "buffer";
3
4
  export declare function padHex(bigInt: BigInteger): string;
4
5
  export declare function hashHexString(str: string): string;
5
6
  export declare function hashBuffer(buffer: Buffer): string;
package/lib/utils.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import formatInTimeZone from "date-fns-tz/formatInTimeZone";
2
2
  import hashJs from "hash.js";
3
3
  import { BigInteger } from "jsbn";
4
+ import { Buffer } from "buffer";
4
5
  const initN = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" +
5
6
  "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" +
6
7
  "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vardario/cognito-client",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",
@@ -11,10 +11,11 @@
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
13
  "@vardario/cookies": "^0.1.4",
14
+ "buffer": "^6.0.3",
14
15
  "date-fns": "^2.29.3",
15
16
  "date-fns-tz": "^1.3.7",
16
- "jsbn": "^1.1.0",
17
- "hash.js": "^1.1.7"
17
+ "hash.js": "^1.1.7",
18
+ "jsbn": "^1.1.0"
18
19
  },
19
20
  "devDependencies": {
20
21
  "@aws-sdk/client-cognito-identity-provider": "^3.209.0",
@@ -23,14 +24,14 @@
23
24
  "isomorphic-fetch": "^3.0.0",
24
25
  "jsdom": "^20.0.2",
25
26
  "testcontainers": "^9.0.0",
26
- "ts-jest": "^29.0.3",
27
+ "typescript": "^5.1.3",
27
28
  "vitest": "^0.31.0"
28
29
  },
29
30
  "repository": {
30
31
  "type": "git",
31
32
  "url": "git@github.com:vardario/cognito-client.git"
32
33
  },
33
- "packageManager": "pnpm@8.3.1",
34
+ "packageManager": "pnpm@8.6.0",
34
35
  "scripts": {
35
36
  "test": "vitest run",
36
37
  "build": "tsc --build",