authhero 0.0.1

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.
@@ -0,0 +1,4 @@
1
+ export interface AuthHeroConfig {
2
+ }
3
+ export declare function init(): void;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,cAAc;CAAG;AAElC,wBAAgB,IAAI,SAMnB"}
@@ -0,0 +1,5 @@
1
+ export type Bindings = {
2
+ ISSUER: string;
3
+ ENVIRONMENT: string;
4
+ };
5
+ //# sourceMappingURL=Bindings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bindings.d.ts","sourceRoot":"","sources":["../../src/types/Bindings.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "authhero",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "bin": {
8
+ "authhero": "dist/index.js"
9
+ },
10
+ "devDependencies": {
11
+ "@types/node": "^20.14.9",
12
+ "typescript": "^5.5.2",
13
+ "vite": "^5.3.2",
14
+ "vite-plugin-dts": "^3.9.1"
15
+ },
16
+ "dependencies": {
17
+ "@hono/zod-openapi": "^0.14.5",
18
+ "hono": "^4.4.10"
19
+ },
20
+ "scripts": {
21
+ "build": "vite build",
22
+ "start": "pnpm build && node dist/index.js"
23
+ }
24
+ }
package/src/index.ts ADDED
@@ -0,0 +1,13 @@
1
+ import { OpenAPIHono } from "@hono/zod-openapi";
2
+ import { Context } from "hono";
3
+ import { Bindings } from "./types/Bindings";
4
+
5
+ export interface AuthHeroConfig {}
6
+
7
+ export function init() {
8
+ const app = new OpenAPIHono<{ Bindings: Bindings }>();
9
+
10
+ app.get("/test", (ctx: Context) => {
11
+ return ctx.text("Hello, world!");
12
+ });
13
+ }
@@ -0,0 +1,4 @@
1
+ export type Bindings = {
2
+ ISSUER: string;
3
+ ENVIRONMENT: string;
4
+ };
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
package/tsconfig.json ADDED
@@ -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
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,11 @@
1
+ import { defineConfig } from "vite";
2
+ import { resolve } from "path";
3
+ import dts from "vite-plugin-dts";
4
+
5
+ // https://vitejs.dev/config/
6
+ export default defineConfig({
7
+ build: {
8
+ lib: { entry: resolve(__dirname, "src/index.ts"), formats: ["es"] },
9
+ },
10
+ plugins: [dts()],
11
+ });