@otplib/uri 13.0.0 → 13.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/README.md +0 -48
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -210,54 +210,6 @@ const qrDataUrl = await QRCode.toDataURL(uri);
|
|
|
210
210
|
const qrSvg = await QRCode.toString(uri, { type: "svg" });
|
|
211
211
|
```
|
|
212
212
|
|
|
213
|
-
## Type Definitions
|
|
214
|
-
|
|
215
|
-
### OTPAuthURI
|
|
216
|
-
|
|
217
|
-
```typescript
|
|
218
|
-
interface OTPAuthURI {
|
|
219
|
-
type: "hotp" | "totp";
|
|
220
|
-
label: string;
|
|
221
|
-
params: OTPAuthParams;
|
|
222
|
-
}
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
### OTPAuthParams
|
|
226
|
-
|
|
227
|
-
```typescript
|
|
228
|
-
interface OTPAuthParams {
|
|
229
|
-
secret: string; // Required
|
|
230
|
-
issuer?: string; // Recommended
|
|
231
|
-
algorithm?: "sha1" | "sha256" | "sha512"; // Default: 'sha1'
|
|
232
|
-
digits?: 6 | 7 | 8; // Default: 6
|
|
233
|
-
counter?: number; // HOTP only
|
|
234
|
-
period?: number; // TOTP only, default: 30
|
|
235
|
-
}
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
### URIOptions
|
|
239
|
-
|
|
240
|
-
```typescript
|
|
241
|
-
interface URIOptions {
|
|
242
|
-
issuer?: string;
|
|
243
|
-
label?: string;
|
|
244
|
-
secret: string;
|
|
245
|
-
algorithm?: "sha1" | "sha256" | "sha512";
|
|
246
|
-
digits?: 6 | 7 | 8;
|
|
247
|
-
period?: number; // TOTP only
|
|
248
|
-
counter?: number; // HOTP only
|
|
249
|
-
}
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
## Error Classes
|
|
253
|
-
|
|
254
|
-
| Error | Description |
|
|
255
|
-
| ----------------------- | -------------------------------------- |
|
|
256
|
-
| `URIParseError` | Base error for all URI parsing errors |
|
|
257
|
-
| `InvalidURIError` | URI format is invalid |
|
|
258
|
-
| `MissingParameterError` | Required parameter (secret) is missing |
|
|
259
|
-
| `InvalidParameterError` | Parameter value is invalid |
|
|
260
|
-
|
|
261
213
|
## Documentation
|
|
262
214
|
|
|
263
215
|
Full documentation available at [otplib.yeojz.dev](https://otplib.yeojz.dev):
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/types.ts":{"bytes":2038,"imports":[],"format":"esm"},"src/parse.ts":{"bytes":5156,"imports":[{"path":"src/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/generate.ts":{"bytes":3864,"imports":[],"format":"esm"},"src/index.ts":{"bytes":395,"imports":[{"path":"src/parse.ts","kind":"import-statement","original":"./parse.js"},{"path":"src/generate.ts","kind":"import-statement","original":"./generate.js"},{"path":"src/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"}},"outputs":{"dist/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17145},"dist/index.cjs":{"imports":[],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":214},"src/types.ts":{"bytesInOutput":408},"src/parse.ts":{"bytesInOutput":1509},"src/generate.ts":{"bytesInOutput":920}},"bytes":3623}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/types.ts":{"bytes":2038,"imports":[],"format":"esm"},"src/parse.ts":{"bytes":5156,"imports":[{"path":"src/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/generate.ts":{"bytes":3864,"imports":[],"format":"esm"},"src/index.ts":{"bytes":395,"imports":[{"path":"src/parse.ts","kind":"import-statement","original":"./parse.js"},{"path":"src/generate.ts","kind":"import-statement","original":"./generate.js"},{"path":"src/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":16369},"dist/index.js":{"imports":[],"exports":["InvalidParameterError","InvalidURIError","MissingParameterError","URIParseError","generate","generateHOTP","generateTOTP","parse","parseURI"],"entryPoint":"src/index.ts","inputs":{"src/types.ts":{"bytesInOutput":408},"src/parse.ts":{"bytesInOutput":1509},"src/index.ts":{"bytesInOutput":0},"src/generate.ts":{"bytesInOutput":920}},"bytes":3015}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@otplib/uri",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.2",
|
|
4
4
|
"description": "otpauth:// URI parsing and generation for otplib",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Gerald Yeo <support@yeojz.dev>",
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"LICENSE"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@otplib/core": "13.0.
|
|
47
|
+
"@otplib/core": "13.0.2"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"tsup": "^8.0.1",
|
|
51
51
|
"typescript": "^5.3.3",
|
|
52
52
|
"vitest": "^4.0.16",
|
|
53
|
-
"@repo/testing": "13.0.
|
|
53
|
+
"@repo/testing": "13.0.1"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|