@bb-labs/pkce 0.0.1 → 0.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/dist/index.d.ts +0 -4
- package/dist/index.js +1 -23
- package/package.json +6 -1
- /package/dist/{pkce/expo.d.ts → expo/index.d.ts} +0 -0
- /package/dist/{pkce/expo.js → expo/index.js} +0 -0
- /package/dist/{pkce/nodejs.d.ts → node/index.d.ts} +0 -0
- /package/dist/{pkce/nodejs.js → node/index.js} +0 -0
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,23 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export * as expo from "./pkce/expo";
|
|
3
|
-
export * as nodejs from "./pkce/nodejs";
|
|
4
|
-
// Default export - try to auto-detect environment
|
|
5
|
-
let defaultExport;
|
|
6
|
-
try {
|
|
7
|
-
// Try React Native/expo first
|
|
8
|
-
require("expo-crypto");
|
|
9
|
-
defaultExport = require("./pkce/expo");
|
|
10
|
-
}
|
|
11
|
-
catch {
|
|
12
|
-
try {
|
|
13
|
-
// Try Node.js crypto
|
|
14
|
-
require("crypto");
|
|
15
|
-
defaultExport = require("./pkce/nodejs");
|
|
16
|
-
}
|
|
17
|
-
catch {
|
|
18
|
-
// Fallback - neither crypto is available
|
|
19
|
-
throw new Error("No suitable crypto implementation found. Install expo-crypto for React Native or use Node.js.");
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
export const generateCodeVerifier = defaultExport.generateCodeVerifier;
|
|
23
|
-
export const createCodeChallenge = defaultExport.createCodeChallenge;
|
|
1
|
+
"use strict";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bb-labs/pkce",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "A library for PKCE",
|
|
5
5
|
"homepage": "https://github.com/beepbop-labs/pkce",
|
|
6
6
|
"keywords": [
|
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
"dist",
|
|
20
20
|
"README.md"
|
|
21
21
|
],
|
|
22
|
+
"exports": {
|
|
23
|
+
".": "./dist/index.js",
|
|
24
|
+
"./node": "./dist/node/index.js",
|
|
25
|
+
"./expo": "./dist/expo/index.js"
|
|
26
|
+
},
|
|
22
27
|
"scripts": {
|
|
23
28
|
"clean": "rm -rf dist",
|
|
24
29
|
"build": "npm run clean && tsc -p tsconfig.json",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|