@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 CHANGED
@@ -1,4 +0,0 @@
1
- export * as expo from "./pkce/expo";
2
- export * as nodejs from "./pkce/nodejs";
3
- export declare const generateCodeVerifier: any;
4
- export declare const createCodeChallenge: any;
package/dist/index.js CHANGED
@@ -1,23 +1 @@
1
- // Direct exports for specific platforms
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.1",
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