@foldspace-fe/casdoor-next-auth-kit 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/README.md +96 -0
  2. package/package.json +3 -2
package/README.md ADDED
@@ -0,0 +1,96 @@
1
+ # @foldspace-fe/casdoor-next-auth-kit
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@foldspace-fe/casdoor-next-auth-kit?label=npm)](https://www.npmjs.com/package/@foldspace-fe/casdoor-next-auth-kit)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@foldspace-fe/casdoor-next-auth-kit?label=downloads)](https://www.npmjs.com/package/@foldspace-fe/casdoor-next-auth-kit)
5
+
6
+ Headless Casdoor auth and billing toolkit for Next.js.
7
+
8
+ This package provides:
9
+
10
+ - Host-side login, signup, callback, and logout route shells
11
+ - React provider and hook wrappers for auth state
12
+ - Headless billing runtime for SaaS subscriptions, virtual products, and credits
13
+ - CLI helpers to generate and validate the managed host files
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ npm install @foldspace-fe/casdoor-next-auth-kit
19
+ ```
20
+
21
+ Or with your preferred package manager:
22
+
23
+ ```bash
24
+ pnpm add @foldspace-fe/casdoor-next-auth-kit
25
+ yarn add @foldspace-fe/casdoor-next-auth-kit
26
+ ```
27
+
28
+ ## Quick Start
29
+
30
+ ### Auth
31
+
32
+ ```ts
33
+ import {
34
+ createLoginEntryResponse,
35
+ createSignupEntryResponse,
36
+ } from '@foldspace-fe/casdoor-next-auth-kit';
37
+ ```
38
+
39
+ ### React Auth Hooks
40
+
41
+ ```tsx
42
+ 'use client';
43
+
44
+ import {
45
+ AuthProvider,
46
+ useAuthSession,
47
+ useAuthUser,
48
+ } from '@foldspace-fe/casdoor-next-auth-kit/react';
49
+ ```
50
+
51
+ ### Billing Runtime
52
+
53
+ ```ts
54
+ import type { BillingCatalogConfig } from '@foldspace-fe/casdoor-next-auth-kit/billing';
55
+ import { BillingProvider } from '@foldspace-fe/casdoor-next-auth-kit/react';
56
+ ```
57
+
58
+ ### Billing Actions
59
+
60
+ ```tsx
61
+ 'use client';
62
+
63
+ import {
64
+ useSubscribePlan,
65
+ usePurchaseProduct,
66
+ usePurchaseCredits,
67
+ } from '@foldspace-fe/casdoor-next-auth-kit/react';
68
+ ```
69
+
70
+ ## CLI
71
+
72
+ ```bash
73
+ npx @foldspace-fe/casdoor-next-auth-kit init
74
+ npx @foldspace-fe/casdoor-next-auth-kit update
75
+ npx @foldspace-fe/casdoor-next-auth-kit check
76
+ ```
77
+
78
+ ## Package Exports
79
+
80
+ - `@foldspace-fe/casdoor-next-auth-kit`
81
+ - `@foldspace-fe/casdoor-next-auth-kit/react`
82
+ - `@foldspace-fe/casdoor-next-auth-kit/billing`
83
+ - `@foldspace-fe/casdoor-next-auth-kit/next`
84
+
85
+ ## Docs
86
+
87
+ - [Repository README](https://github.com/foldspace-stack/casdoor-next-auth-kit)
88
+ - [Auth docs](https://github.com/foldspace-stack/casdoor-next-auth-kit/blob/main/docs/auth/README.md)
89
+ - [Billing docs](https://github.com/foldspace-stack/casdoor-next-auth-kit/blob/main/docs/billing/README.md)
90
+ - [CLI docs](https://github.com/foldspace-stack/casdoor-next-auth-kit/blob/main/docs/cli/README.md)
91
+ - [Skills docs](https://github.com/foldspace-stack/casdoor-next-auth-kit/blob/main/docs/skills/README.md)
92
+
93
+ ## npm
94
+
95
+ - Package page: https://www.npmjs.com/package/@foldspace-fe/casdoor-next-auth-kit
96
+ - Publish scope: `@foldspace-fe`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foldspace-fe/casdoor-next-auth-kit",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "repository": {
@@ -43,7 +43,8 @@
43
43
  "provenance": true
44
44
  },
45
45
  "files": [
46
- "dist"
46
+ "dist",
47
+ "README.md"
47
48
  ],
48
49
  "scripts": {
49
50
  "build": "tsup && node ./scripts/copy-skill.mjs",