@workos-inc/authkit-react
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -0,5 +1,10 @@ | ||
"use strict"; | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __defProps = Object.defineProperties; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropDescs = Object.getOwnPropertyDescriptors; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
@@ -20,2 +25,23 @@ var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); | ||
var __export = (target, all) => { | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | ||
// If the importer is in node compatibility mode or this is not an ESM | ||
// file that has been converted to a CommonJS file using a Babel- | ||
// compatible transform (i.e. "__esModule" has not been set), then set | ||
// "default" to the CommonJS "module.exports" for node compatibility. | ||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | ||
mod | ||
)); | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
var __async = (__this, __arguments, generator) => { | ||
@@ -42,7 +68,15 @@ return new Promise((resolve, reject) => { | ||
// src/index.ts | ||
var src_exports = {}; | ||
__export(src_exports, { | ||
AuthKitProvider: () => AuthKitProvider, | ||
useAuth: () => useAuth | ||
}); | ||
module.exports = __toCommonJS(src_exports); | ||
// src/hook.ts | ||
import * as React2 from "react"; | ||
var React2 = __toESM(require("react")); | ||
// src/context.ts | ||
import * as React from "react"; | ||
var React = __toESM(require("react")); | ||
@@ -68,4 +102,4 @@ // src/state.ts | ||
// src/provider.tsx | ||
import * as React3 from "react"; | ||
import { createClient } from "@workos-inc/authkit-js"; | ||
var React3 = __toESM(require("react")); | ||
var import_authkit_js = require("@workos-inc/authkit-js"); | ||
function AuthKitProvider(props) { | ||
@@ -78,3 +112,3 @@ const { clientId, devMode, apiHostname, https, port, redirectUri, children, onRedirectCallback } = props; | ||
const timeoutId = setTimeout(() => { | ||
createClient(clientId, { apiHostname, port, https, redirectUri, devMode, onRedirectCallback }).then( | ||
(0, import_authkit_js.createClient)(clientId, { apiHostname, port, https, redirectUri, devMode, onRedirectCallback }).then( | ||
(client2) => { | ||
@@ -109,6 +143,7 @@ const user = client2.getUser(); | ||
}; | ||
export { | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
AuthKitProvider, | ||
useAuth | ||
}; | ||
}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@workos-inc/authkit-react", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "AuthKit React SDK", | ||
"type": "module", | ||
"exports": { | ||
"import": "./dist/index.js", | ||
"require": "./dist/index.cjs" | ||
}, | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
@@ -37,3 +34,3 @@ "files": [ | ||
"peerDependencies": { | ||
"react": "^18.3.1" | ||
"react": "18.3.1" | ||
}, | ||
@@ -40,0 +37,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24174
No