authhero 0.0.1 → 1.0.0

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 (89) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +11 -0
  3. package/.github/workflows/release.yml +34 -0
  4. package/.prettierignore +3 -0
  5. package/.prettierrc.json +1 -0
  6. package/README.md +9 -4
  7. package/apps/react-admin/.eslintrc.js +21 -0
  8. package/apps/react-admin/README.md +50 -0
  9. package/apps/react-admin/index.html +125 -0
  10. package/apps/react-admin/package.json +45 -0
  11. package/apps/react-admin/prettier.config.js +1 -0
  12. package/apps/react-admin/public/favicon.ico +0 -0
  13. package/apps/react-admin/public/manifest.json +15 -0
  14. package/apps/react-admin/src/App.spec.tsx +39 -0
  15. package/apps/react-admin/src/App.tsx +75 -0
  16. package/apps/react-admin/src/Layout.tsx +12 -0
  17. package/apps/react-admin/src/TenantsApp.tsx +21 -0
  18. package/apps/react-admin/src/auth0DataProvider.ts +220 -0
  19. package/apps/react-admin/src/authProvider.ts +42 -0
  20. package/apps/react-admin/src/components/TenantAppBar.tsx +46 -0
  21. package/apps/react-admin/src/components/TenantLayout.tsx +17 -0
  22. package/apps/react-admin/src/components/applications/create.tsx +29 -0
  23. package/apps/react-admin/src/components/applications/edit.tsx +40 -0
  24. package/apps/react-admin/src/components/applications/index.ts +3 -0
  25. package/apps/react-admin/src/components/applications/list.tsx +37 -0
  26. package/apps/react-admin/src/components/common/DateAgo.tsx +6 -0
  27. package/apps/react-admin/src/components/common/JsonOutput.tsx +3 -0
  28. package/apps/react-admin/src/components/common/index.ts +1 -0
  29. package/apps/react-admin/src/components/connections/create.tsx +11 -0
  30. package/apps/react-admin/src/components/connections/edit.tsx +66 -0
  31. package/apps/react-admin/src/components/connections/index.ts +3 -0
  32. package/apps/react-admin/src/components/connections/list.tsx +15 -0
  33. package/apps/react-admin/src/components/domains/create.tsx +11 -0
  34. package/apps/react-admin/src/components/domains/edit.tsx +49 -0
  35. package/apps/react-admin/src/components/domains/index.ts +3 -0
  36. package/apps/react-admin/src/components/domains/list.tsx +15 -0
  37. package/apps/react-admin/src/components/listActions/PostListActions.tsx +10 -0
  38. package/apps/react-admin/src/components/tenants/create.tsx +15 -0
  39. package/apps/react-admin/src/components/tenants/edit.tsx +51 -0
  40. package/apps/react-admin/src/components/tenants/index.ts +2 -0
  41. package/apps/react-admin/src/components/tenants/list.tsx +48 -0
  42. package/apps/react-admin/src/components/users/create.tsx +15 -0
  43. package/apps/react-admin/src/components/users/edit.tsx +108 -0
  44. package/apps/react-admin/src/components/users/index.ts +3 -0
  45. package/apps/react-admin/src/components/users/list.tsx +30 -0
  46. package/apps/react-admin/src/data.json +121 -0
  47. package/apps/react-admin/src/dataProvider.ts +48 -0
  48. package/apps/react-admin/src/index.tsx +30 -0
  49. package/apps/react-admin/src/lib/logs.ts +19 -0
  50. package/apps/react-admin/tsconfig.json +9 -0
  51. package/apps/react-admin/tsconfig.node.json +4 -0
  52. package/apps/react-admin/vercel.json +20 -0
  53. package/apps/react-admin/vite.config.ts +19 -0
  54. package/eslint.config.mjs +25 -0
  55. package/package.json +22 -16
  56. package/packages/authhero/CHANGELOG.md +7 -0
  57. package/packages/authhero/README.md +9 -0
  58. package/packages/authhero/package.json +25 -0
  59. package/packages/authhero/src/bun.ts +16 -0
  60. package/packages/authhero/src/index.ts +34 -0
  61. package/packages/authhero/src/routes/oauth2/index.ts +1 -0
  62. package/packages/authhero/src/routes/oauth2/well-known.ts +179 -0
  63. package/{src → packages/authhero/src}/types/Bindings.ts +3 -0
  64. package/packages/authhero/src/types/JWKS.ts +37 -0
  65. package/packages/authhero/src/types/Variables.ts +1 -0
  66. package/packages/authhero/src/types/index.ts +3 -0
  67. package/packages/authhero/src/vite-env.d.ts +1 -0
  68. package/packages/authhero/tsconfig.json +11 -0
  69. package/packages/authhero/tsconfig.node.json +4 -0
  70. package/packages/create-authhero/package.json +22 -0
  71. package/packages/create-authhero/src/index.ts +72 -0
  72. package/packages/create-authhero/src/vite-env.d.ts +1 -0
  73. package/packages/create-authhero/templates/sqlite/package.json +17 -0
  74. package/packages/create-authhero/templates/sqlite/src/index.ts +19 -0
  75. package/packages/create-authhero/templates/sqlite/yarn.lock +48 -0
  76. package/packages/create-authhero/tsconfig.json +9 -0
  77. package/packages/create-authhero/tsconfig.node.json +4 -0
  78. package/packages/create-authhero/vite.config.ts +14 -0
  79. package/pnpm-workspace.yaml +3 -0
  80. package/tsconfig.json +28 -8
  81. package/tsconfig.node.json +7 -2
  82. package/dist/authhero.js +0 -4912
  83. package/dist/index.d.ts +0 -4
  84. package/dist/index.d.ts.map +0 -1
  85. package/dist/types/Bindings.d.ts +0 -5
  86. package/dist/types/Bindings.d.ts.map +0 -1
  87. package/src/index.ts +0 -13
  88. /package/{src → apps/react-admin/src}/vite-env.d.ts +0 -0
  89. /package/{vite.config.ts → packages/authhero/vite.config.ts} +0 -0
@@ -0,0 +1,16 @@
1
+ import { OpenAPIHono } from "@hono/zod-openapi";
2
+ import { Bindings } from "./types/Bindings";
3
+ import { Context } from "hono";
4
+ import { init } from "./";
5
+
6
+ const app = new OpenAPIHono<{ Bindings: Bindings }>();
7
+
8
+ const authhero = init();
9
+
10
+ app.get("/test", (ctx: Context) => {
11
+ return ctx.text("Hello, world!");
12
+ });
13
+
14
+ app.route("/", authhero);
15
+
16
+ export default app;
@@ -0,0 +1,34 @@
1
+ import { OpenAPIHono } from "@hono/zod-openapi";
2
+ import { Context } from "hono";
3
+ import { Bindings, Variables } from "./types";
4
+ import { wellKnownRoutes } from "./routes/oauth2";
5
+
6
+ export interface AuthHeroConfig {}
7
+
8
+ export function init() {
9
+ const rootApp = new OpenAPIHono<{ Bindings: Bindings }>();
10
+
11
+ rootApp.get("/", (ctx: Context) => {
12
+ return ctx.text("Hello, authhero!");
13
+ });
14
+
15
+ /**
16
+ * The oauth routes
17
+ */
18
+ const oauthApp = new OpenAPIHono<{
19
+ Bindings: Bindings;
20
+ Variables: Variables;
21
+ }>().route("/.well-known", wellKnownRoutes);
22
+
23
+ oauthApp.doc("/spec", {
24
+ openapi: "3.0.0",
25
+ info: {
26
+ version: "1.0.0",
27
+ title: "Oauth endpoints",
28
+ },
29
+ });
30
+
31
+ rootApp.route("/", oauthApp);
32
+
33
+ return rootApp;
34
+ }
@@ -0,0 +1 @@
1
+ export * from "./well-known";
@@ -0,0 +1,179 @@
1
+ import {
2
+ Bindings,
3
+ jwksKeySchema,
4
+ // jwksSchema,
5
+ openIDConfigurationSchema,
6
+ } from "../../types";
7
+ import { OpenAPIHono, createRoute } from "@hono/zod-openapi";
8
+
9
+ export const wellKnownRoutes = new OpenAPIHono<{ Bindings: Bindings }>()
10
+ // --------------------------------
11
+ // GET /.well-known/jwks.json
12
+ // --------------------------------
13
+ .openapi(
14
+ createRoute({
15
+ tags: ["jwks"],
16
+ method: "get",
17
+ path: "/jwks.json",
18
+ request: {},
19
+ responses: {
20
+ 200: {
21
+ content: {
22
+ "application/json": {
23
+ schema: jwksKeySchema,
24
+ },
25
+ },
26
+ description: "List of tenants",
27
+ },
28
+ },
29
+ }),
30
+ async (ctx) => {
31
+ const { env } = ctx;
32
+
33
+ // const certificates = await env.data.keys.list();
34
+ // const keys = certificates.map((cert) => {
35
+ // const { alg, n, e, kty } = JSON.parse(cert.public_key);
36
+ // if (!alg || !e || !kty || !n) {
37
+ // throw new Error("Invalid public key");
38
+ // }
39
+
40
+ // return jwksSchema.parse({
41
+ // kid: cert.kid,
42
+ // alg,
43
+ // n,
44
+ // e,
45
+ // kty,
46
+ // });
47
+ // });
48
+
49
+ // TODO: This is a stub implementation. Replace with the actual implementation
50
+ const keys = [
51
+ {
52
+ alg: "RS256",
53
+ e: "AQAB",
54
+ kid: "hZ42TWGWLdmyKfwGVA6c2",
55
+ kty: "RSA",
56
+ n: "nUd-mktFZQNfVwmXufxcVcvJo6Lkb-jDuymtfQunmEhWCctOccWx9e7LX7_9uN15ZnRS7XJInPMRs9KLYdZ0GCnE2HM_QbrEoHpdkCRgyTE-KzmoaEv_AOVGE_Kg0-0ct3r9Z7aJLDVAsxXl1C9y8Gr7ZYkq0c4DyZr9VT8nQiwZQERbfxXdXw-5RLj21S_Lm-LL-AjKvry_TDBLpfUFJV18SVsM07lY_V45TwykNewRdaGLspFIeGdG5j5eByV8ifzBqvzOSptSCsmOTtW-ceWUk0FPD7g_KKzjjbzenoB0TC8mBb_4vWZlHnuGIAs2YoTFglp9uNu7t_OVl3Svo6ZE6alzUnaNfZNeAi78KPHYQ4tDWPjpYNfGynsiD0nojkDSPCIak56jWNYjj614cPEBiv9MVQRiSbBxpiGhMoHlW_QCCPMcXygLAaRs_tUksqoH4QB80krifG2yHPgGDPjXK1_0cYzV80iOcQIeoceqhkSSc6YxzzgDrQcsV2k3bizRQSL83GWkpdHhTZn-Q_JzsW_bDY_f9fjigYbRnoDSgS7038VFIPc92StE41MdgvIQMomcyEE4lYK1uv1Mo6cnXbCZhm8tvddo7VKNorOB4nsiv8DGrWPlzQBca9VN4C1oE2mH-3WLFR7XEkBHWVouOdTWM2S3K9F10YtahkM",
57
+ },
58
+ ];
59
+
60
+ return ctx.json(
61
+ { keys },
62
+ {
63
+ headers: {
64
+ "access-control-allow-origin": "*",
65
+ "access-control-allow-method": "GET",
66
+ "cache-control": `public, max-age=${env.JWKS_CACHE_TIMEOUT_IN_SECONDS}, stale-while-revalidate=${
67
+ env.JWKS_CACHE_TIMEOUT_IN_SECONDS * 2
68
+ }, stale-if-error=86400`,
69
+ },
70
+ },
71
+ );
72
+ },
73
+ )
74
+ // --------------------------------
75
+ // GET /.well-known/openid-configuration
76
+ // --------------------------------
77
+ .openapi(
78
+ createRoute({
79
+ tags: ["well known"],
80
+ method: "get",
81
+ path: "/openid-configuration",
82
+ request: {},
83
+ responses: {
84
+ 200: {
85
+ content: {
86
+ "application/json": {
87
+ schema: openIDConfigurationSchema,
88
+ },
89
+ },
90
+ description: "List of tenants",
91
+ },
92
+ },
93
+ }),
94
+ async (ctx) => {
95
+ const { env } = ctx;
96
+ const { ISSUER } = env;
97
+
98
+ const result = openIDConfigurationSchema.parse({
99
+ issuer: ISSUER,
100
+ authorization_endpoint: `${ISSUER}authorize`,
101
+ token_endpoint: `${ISSUER}oauth/token`,
102
+ device_authorization_endpoint: `${ISSUER}oauth/device/code`,
103
+ userinfo_endpoint: `${ISSUER}userinfo`,
104
+ mfa_challenge_endpoint: `${ISSUER}mfa/challenge`,
105
+ jwks_uri: `${ISSUER}.well-known/jwks.json`,
106
+ registration_endpoint: `${ISSUER}oidc/register`,
107
+ revocation_endpoint: `${ISSUER}oauth/revoke`,
108
+ scopes_supported: [
109
+ "openid",
110
+ "profile",
111
+ "offline_access",
112
+ "name",
113
+ "given_name",
114
+ "family_name",
115
+ "nickname",
116
+ "email",
117
+ "email_verified",
118
+ "picture",
119
+ "created_at",
120
+ "identities",
121
+ "phone",
122
+ "address",
123
+ ],
124
+ response_types_supported: [
125
+ "code",
126
+ "token",
127
+ "id_token",
128
+ "code token",
129
+ "code id_token",
130
+ "token id_token",
131
+ "code token id_token",
132
+ ],
133
+ code_challenge_methods_supported: ["S256", "plain"],
134
+ response_modes_supported: ["query", "fragment", "form_post"],
135
+ subject_types_supported: ["public"],
136
+ id_token_signing_alg_values_supported: ["HS256", "RS256"],
137
+ token_endpoint_auth_methods_supported: [
138
+ "client_secret_basic",
139
+ "client_secret_post",
140
+ "private_key_jwt",
141
+ ],
142
+ claims_supported: [
143
+ "aud",
144
+ "auth_time",
145
+ "created_at",
146
+ "email",
147
+ "email_verified",
148
+ "exp",
149
+ "family_name",
150
+ "given_name",
151
+ "iat",
152
+ "identities",
153
+ "iss",
154
+ "name",
155
+ "nickname",
156
+ "phone_number",
157
+ "picture",
158
+ "sub",
159
+ ],
160
+ request_uri_parameter_supported: false,
161
+ request_parameter_supported: false,
162
+ token_endpoint_auth_signing_alg_values_supported: [
163
+ "RS256",
164
+ "RS384",
165
+ "PS256",
166
+ ],
167
+ });
168
+
169
+ return ctx.json(result, {
170
+ headers: {
171
+ "access-control-allow-origin": "*",
172
+ "access-control-allow-method": "GET",
173
+ "cache-control": `public, max-age=${env.JWKS_CACHE_TIMEOUT_IN_SECONDS}, stale-while-revalidate=${
174
+ env.JWKS_CACHE_TIMEOUT_IN_SECONDS * 2
175
+ }, stale-if-error=86400`,
176
+ },
177
+ });
178
+ },
179
+ );
@@ -1,4 +1,7 @@
1
1
  export type Bindings = {
2
2
  ISSUER: string;
3
3
  ENVIRONMENT: string;
4
+
5
+ // Constants
6
+ JWKS_CACHE_TIMEOUT_IN_SECONDS: number;
4
7
  };
@@ -0,0 +1,37 @@
1
+ import { z } from "@hono/zod-openapi";
2
+
3
+ export const jwksSchema = z.object({
4
+ alg: z.string(),
5
+ e: z.string(),
6
+ kid: z.string(),
7
+ kty: z.string(),
8
+ n: z.string(),
9
+ use: z.string().optional(),
10
+ });
11
+
12
+ export const jwksKeySchema = z.object({
13
+ keys: z.array(jwksSchema),
14
+ });
15
+
16
+ export const openIDConfigurationSchema = z.object({
17
+ issuer: z.string(),
18
+ authorization_endpoint: z.string(),
19
+ token_endpoint: z.string(),
20
+ device_authorization_endpoint: z.string(),
21
+ userinfo_endpoint: z.string(),
22
+ mfa_challenge_endpoint: z.string(),
23
+ jwks_uri: z.string(),
24
+ registration_endpoint: z.string(),
25
+ revocation_endpoint: z.string(),
26
+ scopes_supported: z.array(z.string()),
27
+ response_types_supported: z.array(z.string()),
28
+ code_challenge_methods_supported: z.array(z.string()),
29
+ response_modes_supported: z.array(z.string()),
30
+ subject_types_supported: z.array(z.string()),
31
+ id_token_signing_alg_values_supported: z.array(z.string()),
32
+ token_endpoint_auth_methods_supported: z.array(z.string()),
33
+ claims_supported: z.array(z.string()),
34
+ request_uri_parameter_supported: z.boolean(),
35
+ request_parameter_supported: z.boolean(),
36
+ token_endpoint_auth_signing_alg_values_supported: z.array(z.string()),
37
+ });
@@ -0,0 +1 @@
1
+ export type Variables = {};
@@ -0,0 +1,3 @@
1
+ export * from "./Bindings";
2
+ export * from "./JWKS";
3
+ export * from "./Variables";
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ // "noEmit": true,
5
+ "baseUrl": ".",
6
+ "outDir": "./dist",
7
+ "rootDir": "./src"
8
+ },
9
+ "include": ["src"],
10
+ "references": [{ "path": "./tsconfig.node.json" }]
11
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../tsconfig.node.json",
3
+ "include": ["vite.config.ts"]
4
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "create-authhero",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "main": "dist/create-authhero.js",
6
+ "bin": {
7
+ "create-authhero": "dist/create-authhero.js"
8
+ },
9
+ "scripts": {
10
+ "build": "tsc && vite build",
11
+ "start": "pnpm build && node dist/create-authhero.js"
12
+ },
13
+ "devDependencies": {
14
+ "@types/node": "^20.14.9",
15
+ "typescript": "^5.5.2",
16
+ "vite": "^5.3.2"
17
+ },
18
+ "dependencies": {
19
+ "commander": "^12.1.0",
20
+ "inquirer": "^9.3.1"
21
+ }
22
+ }
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { Command } from "commander";
4
+ import inquirer from "inquirer";
5
+ import fs from "fs";
6
+ import path from "path";
7
+
8
+ const program = new Command();
9
+
10
+ program
11
+ .version("1.0.0")
12
+ .description("Create a new AuthHero project")
13
+ .argument("[project-name]", "name of the project")
14
+ .action(async (projectName) => {
15
+ if (!projectName) {
16
+ const answers = await inquirer.prompt([
17
+ {
18
+ type: "input",
19
+ name: "projectName",
20
+ message: "Project name:",
21
+ default: "auth-server",
22
+ validate: (input) => input !== "" || "Project name cannot be empty",
23
+ },
24
+ ]);
25
+ projectName = answers.projectName;
26
+ }
27
+
28
+ const projectPath = path.join(process.cwd(), projectName);
29
+
30
+ if (fs.existsSync(projectPath)) {
31
+ console.error(`Project "${projectName}" already exists.`);
32
+ process.exit(1);
33
+ }
34
+
35
+ const answers = await inquirer.prompt([
36
+ {
37
+ type: "input",
38
+ name: "description",
39
+ message: "Project description:",
40
+ },
41
+ {
42
+ type: "input",
43
+ name: "author",
44
+ message: "Author name:",
45
+ },
46
+ ]);
47
+
48
+ fs.mkdirSync(projectPath);
49
+ fs.writeFileSync(
50
+ path.join(projectPath, "package.json"),
51
+ JSON.stringify(
52
+ {
53
+ name: projectName,
54
+ version: "1.0.0",
55
+ description: answers.description,
56
+ author: answers.author,
57
+ scripts: {
58
+ start: "node index.js",
59
+ },
60
+ },
61
+ null,
62
+ 2,
63
+ ),
64
+ );
65
+ fs.writeFileSync(
66
+ path.join(projectPath, "index.js"),
67
+ `console.log('Welcome to AuthHero!');`,
68
+ );
69
+ console.log(`Project "${projectName}" has been created.`);
70
+ });
71
+
72
+ program.parse(process.argv);
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "sqlite",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "dev": "bun src/index.ts"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "MIT",
12
+ "dependencies": {
13
+ "@hono/zod-openapi": "^0.14.9",
14
+ "authhero": "workspace:^",
15
+ "hono": "^4.4.10"
16
+ }
17
+ }
@@ -0,0 +1,19 @@
1
+ import { Hono } from "hono";
2
+ import { init } from "../../../../authhero";
3
+
4
+ // function init() {
5
+ // const app = new OpenAPIHono<{ Bindings: Bindings }>();
6
+
7
+ // app.get("/test", (ctx: Context) => {
8
+ // return ctx.text("Hello, world!");
9
+ // });
10
+
11
+ // return app;
12
+ // }
13
+
14
+ const app = new Hono();
15
+ app.get("/", (c) => c.text("Hono!"));
16
+ const authhero = init();
17
+
18
+ app.route("/", authhero);
19
+ export default app;
@@ -0,0 +1,48 @@
1
+ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+ # yarn lockfile v1
3
+
4
+
5
+ "@asteasolutions/zod-to-openapi@^7.1.0":
6
+ version "7.1.1"
7
+ resolved "https://registry.yarnpkg.com/@asteasolutions/zod-to-openapi/-/zod-to-openapi-7.1.1.tgz#27784396d9f854db975a3b784095efef25258422"
8
+ integrity sha512-lF0d1gAc0lYLO9/BAGivwTwE2Sh9h6CHuDcbk5KnGBfIuAsAkDC+Fdat4dkQY3CS/zUWKHRmFEma0B7X132Ymw==
9
+ dependencies:
10
+ openapi3-ts "^4.1.2"
11
+
12
+ "@hono/zod-openapi@^0.14.5", "@hono/zod-openapi@^0.14.9":
13
+ version "0.14.9"
14
+ resolved "https://registry.yarnpkg.com/@hono/zod-openapi/-/zod-openapi-0.14.9.tgz#f0722f323f89ba4bb887b2b4242a6b13838ca960"
15
+ integrity sha512-7qWxZiSG4CogPb00TKorPMb2YsniOI0AReFrR7nIvsIdZ5XeorIQtFTI7G+o7HaaKPyzSPqcRllkFnQIIqxCMQ==
16
+ dependencies:
17
+ "@asteasolutions/zod-to-openapi" "^7.1.0"
18
+ "@hono/zod-validator" "0.2.2"
19
+
20
+ "@hono/zod-validator@0.2.2":
21
+ version "0.2.2"
22
+ resolved "https://registry.yarnpkg.com/@hono/zod-validator/-/zod-validator-0.2.2.tgz#929a1c40aee5eac1ed9c84094d6d977e0b70187a"
23
+ integrity sha512-dSDxaPV70Py8wuIU2QNpoVEIOSzSXZ/6/B/h4xA7eOMz7+AarKTSGV8E6QwrdcCbBLkpqfJ4Q2TmBO0eP1tCBQ==
24
+
25
+ "authhero@workspace:^":
26
+ version "0.0.1"
27
+ resolved "https://registry.yarnpkg.com/authhero/-/authhero-0.0.1.tgz#6d1e8a3b1ff40be9f771e8ae1f04451fb44e1b31"
28
+ integrity sha512-iLV7EoYKMYism/CY+G7tjXFZ6G09aX/+ircsQtnO48re0ujEkj1VTGR5OY87mimI1yH1BlA69hyMBtnwBQUUag==
29
+ dependencies:
30
+ "@hono/zod-openapi" "^0.14.5"
31
+ hono "^4.4.10"
32
+
33
+ hono@^4.4.10:
34
+ version "4.4.13"
35
+ resolved "https://registry.yarnpkg.com/hono/-/hono-4.4.13.tgz#954e8f6e4bab14f3f9d7bac4eef4c56d23e7f900"
36
+ integrity sha512-c6qqenclmQ6wpXzqiElMa2jt423PVCmgBreDfC5s2lPPpGk7d0lOymd8QTzFZyYC5mSSs6imiTMPip+gLwuW/g==
37
+
38
+ openapi3-ts@^4.1.2:
39
+ version "4.3.3"
40
+ resolved "https://registry.yarnpkg.com/openapi3-ts/-/openapi3-ts-4.3.3.tgz#de43a2f2fab912939495c169b92d81fe78a4ec10"
41
+ integrity sha512-LKkzBGJcZ6wdvkKGMoSvpK+0cbN5Xc3XuYkJskO+vjEQWJgs1kgtyUk0pjf8KwPuysv323Er62F5P17XQl96Qg==
42
+ dependencies:
43
+ yaml "^2.4.5"
44
+
45
+ yaml@^2.4.5:
46
+ version "2.4.5"
47
+ resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.4.5.tgz#60630b206dd6d84df97003d33fc1ddf6296cca5e"
48
+ integrity sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ // "noEmit": true,
5
+ "baseUrl": "."
6
+ },
7
+ "include": ["src"],
8
+ "references": [{ "path": "./tsconfig.node.json" }]
9
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../tsconfig.node.json",
3
+ "include": ["vite.config.ts"]
4
+ }
@@ -0,0 +1,14 @@
1
+ import { defineConfig } from "vite";
2
+
3
+ export default defineConfig({
4
+ build: {
5
+ lib: {
6
+ entry: "src/index.ts",
7
+ formats: ["es"],
8
+ fileName: "create-authhero",
9
+ },
10
+ rollupOptions: {
11
+ external: ["commander", "inquirer", "fs", "path"],
12
+ },
13
+ },
14
+ });
@@ -0,0 +1,3 @@
1
+ packages:
2
+ - "apps/*"
3
+ - "packages/*"
package/tsconfig.json CHANGED
@@ -1,11 +1,31 @@
1
1
  {
2
- "extends": "../../tsconfig.json",
3
2
  "compilerOptions": {
4
- // "noEmit": true,
5
- "baseUrl": ".",
6
- "outDir": "./dist",
7
- "rootDir": "./src"
8
- },
9
- "include": ["src"],
10
- "references": [{ "path": "./tsconfig.node.json" }]
3
+ "target": "ESNext",
4
+ "lib": ["DOM", "DOM.Iterable", "ESNext"],
5
+ "module": "ESNext",
6
+ "skipLibCheck": true,
7
+ "noImplicitAny": false,
8
+ "allowJs": true,
9
+ "noErrorTruncation": true,
10
+
11
+ /* Bundler mode */
12
+ "moduleResolution": "bundler",
13
+ "allowImportingTsExtensions": true,
14
+ "resolveJsonModule": true,
15
+ "isolatedModules": true,
16
+ "noEmit": true,
17
+ "jsx": "react-jsx",
18
+
19
+ /* Linting */
20
+ "strict": true,
21
+ "noUncheckedIndexedAccess": true,
22
+ "noUnusedLocals": true,
23
+ "noUnusedParameters": true,
24
+ "noFallthroughCasesInSwitch": true,
25
+
26
+ "declaration": true,
27
+ "composite": true,
28
+ "sourceMap": true,
29
+ "declarationMap": true
30
+ }
11
31
  }
@@ -1,4 +1,9 @@
1
1
  {
2
- "extends": "../../tsconfig.node.json",
3
- "include": ["vite.config.ts"]
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "skipLibCheck": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "allowSyntheticDefaultImports": true
8
+ }
4
9
  }