mirror of
https://github.com/hanzoai/iam-sdk.git
synced 2026-10-30 14:54:01 +00:00
CI / go (push) Waiting to run
CI / node (22) (push) Waiting to run
CI / node (24) (push) Waiting to run
CI / node (26) (push) Waiting to run
exports["."] sent the browser condition to dist/browser.js, which exports
13 names, while TypeScript types the entry from index.d.ts, which declares
25. So `import { validateToken, IamClient } from "@hanzo/iam"` typechecked,
and then esbuild --platform=browser failed with "No matching export in
dist/browser.js", as it did with Worker conditions. The 12 missing names
(IamClient, IamApiError, validateToken, clearJwksCache, OIDC_PATHS,
IAM_PATHS, BRAND_SERVER_URLS, iamUrl, serverUrlForBrand, trimServerUrl,
generatePKCEChallenge, generateState) need only fetch, WebCrypto and jose,
and dist/index.js imports nothing but jose, so the browser branch had no
reason to exist.
"." now names index.js and index.cjs under every condition, like the other
entries, and ./browser stays the browser half on its own. A browser bundle
of `{ IAM }` from "." still leaves out jose and IamClient: 35,327 bytes,
against 35,012 before.
A new dist test loads every file each exports entry names and fails when
one lacks a name another has. On the old map it lists the 12 names missing
from dist/browser.js and dist/browser.cjs.
Co-authored-by: Hanzo Dev <[email protected]>
149 lines
3.5 KiB
JSON
149 lines
3.5 KiB
JSON
{
|
|
"name": "@hanzo/iam",
|
|
"version": "0.13.8",
|
|
"private": true,
|
|
"description": "TypeScript SDK for Hanzo IAM \u2014 OIDC auth, JWT validation, OAuth2 PKCE, user/org/project APIs",
|
|
"type": "module",
|
|
"main": "dist/index.cjs",
|
|
"module": "dist/index.js",
|
|
"types": "dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"import": "./dist/index.js",
|
|
"require": "./dist/index.cjs",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./auth": {
|
|
"import": "./dist/auth.js",
|
|
"require": "./dist/auth.cjs",
|
|
"default": "./dist/auth.js"
|
|
},
|
|
"./browser": {
|
|
"import": "./dist/browser.js",
|
|
"require": "./dist/browser.cjs"
|
|
},
|
|
"./session": {
|
|
"import": "./dist/session.js",
|
|
"require": "./dist/session.cjs"
|
|
},
|
|
"./paths": {
|
|
"import": "./dist/paths.js",
|
|
"require": "./dist/paths.cjs",
|
|
"default": "./dist/paths.js"
|
|
},
|
|
"./server": {
|
|
"import": "./dist/server.js",
|
|
"require": "./dist/server.cjs",
|
|
"default": "./dist/server.js"
|
|
},
|
|
"./types": {
|
|
"import": "./dist/types.js",
|
|
"require": "./dist/types.cjs"
|
|
},
|
|
"./react": {
|
|
"import": "./dist/react.js",
|
|
"require": "./dist/react.cjs"
|
|
},
|
|
"./views": {
|
|
"import": "./dist/views.js",
|
|
"require": "./dist/views.cjs"
|
|
},
|
|
"./nextauth": {
|
|
"import": "./dist/nextauth.js",
|
|
"require": "./dist/nextauth.cjs"
|
|
},
|
|
"./sveltekit": {
|
|
"import": "./dist/sveltekit.js",
|
|
"require": "./dist/sveltekit.cjs"
|
|
},
|
|
"./remix": {
|
|
"import": "./dist/remix.js",
|
|
"require": "./dist/remix.cjs"
|
|
},
|
|
"./express": {
|
|
"import": "./dist/express.js",
|
|
"require": "./dist/express.cjs"
|
|
},
|
|
"./hono": {
|
|
"import": "./dist/hono.js",
|
|
"require": "./dist/hono.cjs"
|
|
},
|
|
"./passport": {
|
|
"import": "./dist/passport.js",
|
|
"require": "./dist/passport.cjs"
|
|
},
|
|
"./betterauth": {
|
|
"import": "./dist/betterauth.js",
|
|
"require": "./dist/betterauth.cjs"
|
|
},
|
|
"./validation": {
|
|
"import": "./dist/validation.js",
|
|
"require": "./dist/validation.cjs",
|
|
"default": "./dist/validation.js"
|
|
}
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"src",
|
|
"!src/**/*.test.ts",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"scripts": {
|
|
"build": "rm -rf dist && tsup && pnpm declarations",
|
|
"declarations": "tsc -p tsconfig.build.json && node scripts/cts.mjs",
|
|
"dev": "tsup --watch --onSuccess \"pnpm declarations\"",
|
|
"clean": "rm -rf dist",
|
|
"typecheck": "tsc --noEmit",
|
|
"prepare": "pnpm build",
|
|
"test": "node --test --import tsx \"src/**/*.test.ts\""
|
|
},
|
|
"dependencies": {
|
|
"jose": "catalog:",
|
|
"libphonenumber-js": "catalog:",
|
|
"passport-oauth2": "catalog:"
|
|
},
|
|
"peerDependencies": {
|
|
"react": ">=19.2.8"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"react": {
|
|
"optional": true
|
|
}
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "catalog:",
|
|
"@types/passport-oauth2": "catalog:",
|
|
"@types/react": "catalog:",
|
|
"tsup": "catalog:",
|
|
"tsx": "catalog:",
|
|
"typescript": "catalog:"
|
|
},
|
|
"keywords": [
|
|
"hanzo",
|
|
"iam",
|
|
"oidc",
|
|
"oauth2",
|
|
"pkce",
|
|
"auth",
|
|
"jwt",
|
|
"identity",
|
|
"access-management",
|
|
"sso"
|
|
],
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/hanzoai/iam-sdk"
|
|
},
|
|
"homepage": "https://docs.hanzo.ai/services/iam/sdk",
|
|
"bugs": {
|
|
"url": "https://github.com/hanzoai/iam-sdk/issues"
|
|
},
|
|
"author": "Hanzo AI <[email protected]>",
|
|
"engines": {
|
|
"node": ">=22.12"
|
|
},
|
|
"packageManager": "[email protected]"
|
|
}
|