@pithy-sh/auth 0.1.3 → 0.1.4
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/admin/users.d.ts +2 -0
- package/dist/admin/users.js +2 -0
- package/dist/audit/actions.d.ts +2 -0
- package/dist/audit/actions.js +2 -0
- package/dist/audit/emit.d.ts +2 -0
- package/dist/audit/emit.js +2 -0
- package/dist/capability.d.ts +2 -0
- package/dist/capability.js +2 -0
- package/dist/client/api.d.ts +2 -0
- package/dist/client/api.js +2 -0
- package/dist/client/projection.d.ts +2 -0
- package/dist/client/projection.js +2 -0
- package/dist/data/betterAuth.d.ts +2 -0
- package/dist/data/betterAuth.js +2 -0
- package/dist/data/device.d.ts +2 -0
- package/dist/data/device.js +2 -0
- package/dist/data/kitFields.d.ts +2 -0
- package/dist/data/kitFields.js +2 -0
- package/dist/data/rotatedToken.d.ts +2 -0
- package/dist/data/rotatedToken.js +2 -0
- package/dist/data/tables.d.ts +2 -0
- package/dist/data/tables.js +2 -0
- package/dist/device/registry.d.ts +2 -0
- package/dist/device/registry.js +2 -0
- package/dist/email/send.d.ts +2 -0
- package/dist/email/send.js +2 -0
- package/dist/http/adminRoutes.d.ts +2 -0
- package/dist/http/adminRoutes.js +2 -0
- package/dist/http/baseUrl.d.ts +2 -0
- package/dist/http/baseUrl.js +2 -0
- package/dist/http/csrf.d.ts +2 -0
- package/dist/http/csrf.js +2 -0
- package/dist/http/devLoginRoute.d.ts +2 -0
- package/dist/http/devLoginRoute.js +2 -0
- package/dist/http/errors.d.ts +2 -0
- package/dist/http/errors.js +2 -0
- package/dist/http/guards.d.ts +2 -0
- package/dist/http/guards.js +2 -0
- package/dist/http/middleware.d.ts +2 -0
- package/dist/http/middleware.js +2 -0
- package/dist/http/rateLimit.d.ts +2 -0
- package/dist/http/rateLimit.js +2 -0
- package/dist/http/resolve.d.ts +2 -0
- package/dist/http/resolve.js +2 -0
- package/dist/http/responses.d.ts +2 -0
- package/dist/http/responses.js +2 -0
- package/dist/http/routes.d.ts +2 -0
- package/dist/http/routes.js +2 -0
- package/dist/http/schemas.d.ts +2 -0
- package/dist/http/schemas.js +2 -0
- package/dist/http/views.d.ts +2 -0
- package/dist/http/views.js +2 -0
- package/dist/i18n/errorCopy.d.ts +2 -0
- package/dist/i18n/errorCopy.es.d.ts +2 -0
- package/dist/i18n/errorCopy.es.js +2 -0
- package/dist/i18n/errorCopy.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/instance/auth.d.ts +2 -0
- package/dist/instance/auth.js +2 -0
- package/dist/instance/plugins.d.ts +2 -0
- package/dist/instance/plugins.js +2 -0
- package/dist/instance/providers.d.ts +2 -0
- package/dist/instance/providers.js +2 -0
- package/dist/instance/secrets.d.ts +2 -0
- package/dist/instance/secrets.js +2 -0
- package/dist/migrations/0001_init.d.ts +2 -0
- package/dist/migrations/0001_init.js +2 -0
- package/dist/migrations/pluginTables.d.ts +2 -0
- package/dist/migrations/pluginTables.js +2 -0
- package/dist/seeds/devSession.d.ts +2 -0
- package/dist/seeds/devSession.js +2 -0
- package/dist/seeds/example.d.ts +2 -0
- package/dist/seeds/example.js +2 -0
- package/dist/test-utils/liveApp.d.ts +2 -0
- package/dist/test-utils/liveApp.js +2 -0
- package/dist/token/rotation.d.ts +2 -0
- package/dist/token/rotation.js +2 -0
- package/dist/version.generated.d.ts +3 -1
- package/dist/version.generated.js +3 -1
- package/package.json +6 -6
- package/src/version.generated.ts +1 -1
package/dist/admin/users.d.ts
CHANGED
package/dist/admin/users.js
CHANGED
package/dist/audit/actions.d.ts
CHANGED
package/dist/audit/actions.js
CHANGED
package/dist/audit/emit.d.ts
CHANGED
package/dist/audit/emit.js
CHANGED
package/dist/capability.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import type { Capability } from "@pithy-sh/core/src/capability/capability";
|
|
2
4
|
import type { EmailCapability } from "@pithy-sh/email/src/capability";
|
|
3
5
|
import { type TurnstileMode } from "@pithy-sh/turnstile/src/config/config";
|
package/dist/capability.js
CHANGED
package/dist/client/api.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/**
|
|
2
4
|
* The browser half of `@pithy-sh/auth`: the one place that knows how a browser program makes a
|
|
3
5
|
* same-origin, cookie-bearing request to this Worker, and the calls made through it — the six a
|
package/dist/client/api.js
CHANGED
package/dist/data/betterAuth.js
CHANGED
package/dist/data/device.d.ts
CHANGED
package/dist/data/device.js
CHANGED
package/dist/data/kitFields.d.ts
CHANGED
package/dist/data/kitFields.js
CHANGED
package/dist/data/tables.d.ts
CHANGED
package/dist/data/tables.js
CHANGED
package/dist/device/registry.js
CHANGED
package/dist/email/send.d.ts
CHANGED
package/dist/email/send.js
CHANGED
package/dist/http/adminRoutes.js
CHANGED
package/dist/http/baseUrl.d.ts
CHANGED
package/dist/http/baseUrl.js
CHANGED
package/dist/http/csrf.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import type { PithyMiddleware } from "@pithy-sh/core/src/capability/capability";
|
|
2
4
|
import { type AmbientEnv } from "@pithy-sh/core/src/env/ambient";
|
|
3
5
|
import type { AuthWiring } from "../capability";
|
package/dist/http/csrf.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { authDatabase } from "../data/tables.js";
|
|
2
4
|
import { resolveSessionSecret } from "../instance/secrets.js";
|
|
3
5
|
import { DEV_SESSION_COOKIE_NAME, DEV_SESSION_TOKEN_PREFIX, secretFingerprint, signCookieValue } from "../seeds/devSession.js";
|
package/dist/http/errors.d.ts
CHANGED
package/dist/http/errors.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { ConflictError, ForbiddenError, InternalError, NotFoundError, PithyError, RateLimitError, UnauthorizedError, ValidationError } from "@pithy-sh/core/src/error/pithyError";
|
|
2
4
|
import { isAPIError } from "better-auth/api";
|
|
3
5
|
//#region src/http/errors.ts
|
package/dist/http/guards.d.ts
CHANGED
package/dist/http/guards.js
CHANGED
package/dist/http/middleware.js
CHANGED
package/dist/http/rateLimit.d.ts
CHANGED
package/dist/http/rateLimit.js
CHANGED
package/dist/http/resolve.d.ts
CHANGED
package/dist/http/resolve.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { authDatabase } from "../data/tables.js";
|
|
2
4
|
import { baseURLResolver } from "./baseUrl.js";
|
|
3
5
|
import { resolveAppleCredentials, resolveFacebookCredentials, resolveGithubCredentials, resolveGoogleCredentials, resolveSessionSecret } from "../instance/secrets.js";
|
package/dist/http/responses.d.ts
CHANGED
package/dist/http/responses.js
CHANGED
package/dist/http/routes.d.ts
CHANGED
package/dist/http/routes.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { authDatabase } from "../data/tables.js";
|
|
2
4
|
import { correlation, emitDenied, emitDeviceRevoked, emitTokenRefresh, emitTokenReuseDetected } from "../audit/emit.js";
|
|
3
5
|
import { deleteDevice, deviceSessionTokens, listDevices } from "../device/registry.js";
|
package/dist/http/schemas.d.ts
CHANGED
package/dist/http/schemas.js
CHANGED
package/dist/http/views.d.ts
CHANGED
package/dist/http/views.js
CHANGED
package/dist/i18n/errorCopy.d.ts
CHANGED
package/dist/i18n/errorCopy.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/**
|
|
2
4
|
* The package entrypoint — the surface `pithy add auth` wires into `pithy.config.ts`. Deliberately
|
|
3
5
|
* narrow: the capability factory, the `requireAuth()` gate other capabilities stack, and the data /
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { DevicePlatform } from "./data/device.js";
|
|
2
4
|
import { authDatabase } from "./data/tables.js";
|
|
3
5
|
import { AUTH_APPLE_CREDENTIALS, AUTH_GOOGLE_CREDENTIALS, AUTH_SESSION_SECRET, AppleOAuthCredentials, GoogleOAuthCredentials, authSecretsRegistry } from "./instance/secrets.js";
|
package/dist/instance/auth.d.ts
CHANGED
package/dist/instance/auth.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { emitAfterRequest, emitProviderUnavailable } from "../audit/emit.js";
|
|
2
4
|
import { KIT_SESSION_FIELDS, KIT_USER_FIELDS } from "../data/kitFields.js";
|
|
3
5
|
import { parseDeviceMeta, registerDevice } from "../device/registry.js";
|
package/dist/instance/plugins.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { PithyError } from "@pithy-sh/core/src/error/pithyError";
|
|
2
4
|
import type { AppleOAuthCredentials, FacebookOAuthCredentials, GithubOAuthCredentials, GoogleOAuthCredentials } from "./secrets";
|
|
3
5
|
/**
|
package/dist/instance/secrets.js
CHANGED
package/dist/seeds/devSession.js
CHANGED
package/dist/seeds/example.d.ts
CHANGED
package/dist/seeds/example.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
import { User } from "../data/betterAuth.js";
|
|
2
4
|
import { d1SeedGroup, defineSeed } from "@pithy-sh/core/src/seed/seed";
|
|
3
5
|
import { EXAMPLE_IDENTITIES } from "@pithy-sh/core/src/seed/exampleIdentities";
|
package/dist/token/rotation.d.ts
CHANGED
package/dist/token/rotation.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
/** This package's npm name — the join key against a release feed. */
|
|
2
4
|
export declare const PACKAGE_NAME = "@pithy-sh/auth";
|
|
3
5
|
/** This package's version, stamped from its own package.json at generation time. */
|
|
4
|
-
export declare const PACKAGE_VERSION = "0.1.
|
|
6
|
+
export declare const PACKAGE_VERSION = "0.1.4";
|
|
5
7
|
//# sourceMappingURL=version.generated.d.ts.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
1
3
|
//#region src/version.generated.ts
|
|
2
4
|
/** This package's npm name — the join key against a release feed. */
|
|
3
5
|
const PACKAGE_NAME = "@pithy-sh/auth";
|
|
4
6
|
/** This package's version, stamped from its own package.json at generation time. */
|
|
5
|
-
const PACKAGE_VERSION = "0.1.
|
|
7
|
+
const PACKAGE_VERSION = "0.1.4";
|
|
6
8
|
//#endregion
|
|
7
9
|
export { PACKAGE_NAME, PACKAGE_VERSION };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pithy-sh/auth",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
|
-
"build": "tsdown && tsc -p tsconfig.build.json",
|
|
29
|
+
"build": "tsdown && tsc -p tsconfig.build.json && bun ../../tooling/build/src/stampDeclarations.ts",
|
|
30
30
|
"typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.client.json",
|
|
31
31
|
"test": "vitest run",
|
|
32
32
|
"test:node": "vitest run --project=node",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"@better-auth/i18n": "^1.7.1",
|
|
40
40
|
"@cloudflare/workers-types": "^5.20260729.1",
|
|
41
41
|
"@hono/zod-validator": "^0.9.0",
|
|
42
|
-
"@pithy-sh/core": "^0.1.
|
|
43
|
-
"@pithy-sh/email": "^0.1.
|
|
44
|
-
"@pithy-sh/secrets": "^0.1.
|
|
45
|
-
"@pithy-sh/turnstile": "^0.1.
|
|
42
|
+
"@pithy-sh/core": "^0.1.5",
|
|
43
|
+
"@pithy-sh/email": "^0.1.4",
|
|
44
|
+
"@pithy-sh/secrets": "^0.1.4",
|
|
45
|
+
"@pithy-sh/turnstile": "^0.1.4",
|
|
46
46
|
"better-auth": "^1.7.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
package/src/version.generated.ts
CHANGED