@geekapps/auth-nextjs 0.21.0 → 0.24.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.
- package/README.md +56 -2
- package/dist/actions.js +1 -10
- package/dist/actions.js.map +1 -1
- package/dist/client.d.ts +33 -2
- package/dist/client.js +17 -2
- package/dist/client.js.map +1 -1
- package/dist/connections.d.ts +101 -9
- package/dist/connections.js +313 -19
- package/dist/connections.js.map +1 -1
- package/dist/middleware.js +47 -26
- package/dist/middleware.js.map +1 -1
- package/dist/server.d.ts +20 -2
- package/dist/server.js +65 -18
- package/dist/server.js.map +1 -1
- package/dist/typegen.d.ts +42 -10
- package/dist/typegen.js +116 -15
- package/dist/typegen.js.map +1 -1
- package/package.json +8 -3
package/dist/typegen.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/typegen.ts"],"sourcesContent":["// Gerador de tipos das App Connections (OpenAPI → TypeScript).\nimport { mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync, existsSync } from \"node:fs\";\nimport { join, resolve } from \"node:path\";\n\nexport const DEFAULT_ISSUER = \"https://accounts-api.geekapps.com.br\";\nexport const DEFAULT_OUT_DIR = \"geekapps-connections\";\n\n/** Uma app conectável que declarou um OpenAPI — o que o catálogo do auth-server devolve. */\nexport type CatalogApp = {\n targetAppId: string;\n name: string;\n /** Chave estável no tipo `GeekappsConnections` (ex: \"billing\"). */\n slug: string;\n apiBaseUrl: string | null;\n openApiUrl: string;\n};\n\nexport type Credentials = { issuer: string; clientId: string; clientSecret: string };\n\n/** Apps conectáveis com OpenAPI declarado, vistas por esta app (credenciais dela). */\nexport async function fetchCatalog({ issuer, clientId, clientSecret }: Credentials): Promise<CatalogApp[]> {\n const response = await fetch(`${issuer.replace(/\\/$/, \"\")}/connections/catalog`, {\n headers: { authorization: `Basic ${Buffer.from(`${clientId}:${clientSecret}`).toString(\"base64\")}` },\n cache: \"no-store\",\n });\n if (!response.ok) {\n throw new Error(`catálogo indisponível (${response.status}) — confira GEEKAPPS_AUTH_CLIENT_ID e GEEKAPPS_AUTH_CLIENT_SECRET`);\n }\n return (await response.json()) as CatalogApp[];\n}\n\nconst HEADER = \"// Gerado pelo SDK do Geekapps Auth. Não edite à mão.\\n\\n\";\n\n/**\n * Tipos de um OpenAPI, no formato do openapi-typescript. Import dinâmico: é\n * dependência opcional (só desenvolvimento) — sem ela, a geração só não roda.\n */\nasync function generateOpenApiTypes(openApiUrl: string) {\n const { default: openapiTS, astToString } = await import(\"openapi-typescript\");\n return HEADER + astToString(await openapiTS(new URL(openApiUrl)));\n}\n\n/** `index.d.ts`: liga cada app ao `GeekappsConnections` do módulo do SDK. */\nfunction renderIndex(apps: CatalogApp[], augment: string) {\n const imports = apps.map((app, i) => `import type { paths as paths${i} } from \"./${app.slug}\";`).join(\"\\n\");\n const members = apps.map((app, i) => ` ${JSON.stringify(app.slug)}: paths${i};`).join(\"\\n\");\n return `${HEADER}${imports}\n\ndeclare module ${JSON.stringify(augment)} {\n interface GeekappsConnections {\n${members}\n }\n}\n\nexport {};\n`;\n}\n\nexport type GenerateResult = {\n apps: string[];\n /** Apps do catálogo cujo OpenAPI não pôde ser baixado/convertido. */\n failed: Array<{ name: string; reason: string }>;\n /** Com `check`: arquivos que estariam diferentes. */\n stale: string[];\n};\n\n/**\n * Gerador de tipos das App Connections, embutido no SDK (sem pacote à parte).\n * Roda sozinho em desenvolvimento; para o CI, chame com `check: true`.\n *\n * Baixa o OpenAPI de cada app conectável e escreve os tipos em `outDir`\n * (`<slug>.d.ts` por app + `index.d.ts`, que estende `GeekappsConnections` do\n * módulo `augment`). Com `check`, não escreve nada: só diz o que estaria\n * diferente. Uma app cujo OpenAPI falha mantém o arquivo anterior.\n */\nexport async function generateConnectionTypes(params: {\n credentials: Credentials;\n outDir?: string;\n /** Módulo que recebe o `GeekappsConnections`. Padrão: \"@geekapps/auth-nextjs/connections\". */\n augment?: string;\n check?: boolean;\n}): Promise<GenerateResult> {\n const outDir = resolve(process.cwd(), params.outDir ?? DEFAULT_OUT_DIR);\n const catalog = (await fetchCatalog(params.credentials)).sort((a, b) => a.slug.localeCompare(b.slug));\n\n const files = new Map<string, string>();\n const result: GenerateResult = { apps: [], failed: [], stale: [] };\n const generated: CatalogApp[] = [];\n\n for (const app of catalog) {\n const file = `${app.slug}.d.ts`;\n try {\n files.set(file, await generateOpenApiTypes(app.openApiUrl));\n generated.push(app);\n } catch (error) {\n result.failed.push({ name: app.name, reason: (error as Error).message });\n // Mantém o que já existia, para a app não perder os tipos por uma falha de rede.\n const existing = join(outDir, file);\n if (existsSync(existing)) {\n files.set(file, readFileSync(existing, \"utf-8\"));\n generated.push(app);\n }\n }\n }\n result.apps = generated.map((app) => app.name);\n files.set(\"index.d.ts\", renderIndex(generated, params.augment ?? \"@geekapps/auth-nextjs/connections\"));\n\n const current = existsSync(outDir) ? new Set(readdirSync(outDir).filter((f) => f.endsWith(\".d.ts\"))) : new Set<string>();\n\n if (params.check) {\n for (const [file, content] of files) {\n const path = join(outDir, file);\n if (!existsSync(path) || readFileSync(path, \"utf-8\") !== content) result.stale.push(file);\n }\n for (const file of current) if (!files.has(file)) result.stale.push(file);\n return result;\n }\n\n mkdirSync(outDir, { recursive: true });\n for (const [file, content] of files) {\n const path = join(outDir, file);\n if (!existsSync(path) || readFileSync(path, \"utf-8\") !== content) writeFileSync(path, content, \"utf-8\");\n }\n // Apps que deixaram o catálogo não devem deixar tipos órfãos.\n for (const file of current) if (!files.has(file)) rmSync(join(outDir, file));\n\n return result;\n}\n"],"mappings":";AACA,SAAS,WAAW,aAAa,cAAc,QAAQ,eAAe,kBAAkB;AACxF,SAAS,MAAM,eAAe;AAEvB,IAAM,iBAAiB;AACvB,IAAM,kBAAkB;AAe/B,eAAsB,aAAa,EAAE,QAAQ,UAAU,aAAa,GAAuC;AACzG,QAAM,WAAW,MAAM,MAAM,GAAG,OAAO,QAAQ,OAAO,EAAE,CAAC,wBAAwB;AAAA,IA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IAAI,IAAI,EAAG,QAAO,KAAK,QAAQ,IAAI,CAAC;AAE3E,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/typegen.ts"],"sourcesContent":["// Gerador de tipos das App Connections: manifesto da app alvo\n// (/.well-known/geekapps-app.json) → TypeScript. O OpenAPI, quando a app\n// declara um, ainda gera os `paths` do cliente antigo (createConnectionClient).\nimport { mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync, existsSync } from \"node:fs\";\nimport { join, resolve } from \"node:path\";\n\nexport const DEFAULT_ISSUER = \"https://accounts-api.geekapps.com.br\";\nexport const DEFAULT_OUT_DIR = \"geekapps-connections\";\nconst DEFAULT_AUGMENT = \"@geekapps/auth-nextjs/connections\";\n\n/** Uma app conectável — o que o catálogo do auth-server devolve. */\nexport type CatalogApp = {\n targetAppId: string;\n name: string;\n /** Chave estável no tipo `GeekappsConnections` (ex: \"post\"). */\n slug: string;\n apiBaseUrl: string | null;\n /** `${apiBaseUrl}/.well-known/geekapps-app.json`, quando a app publica um manifesto. */\n manifestUrl?: string | null;\n /** OpenAPI declarado (opcional) — só para o cliente antigo. */\n openApiUrl?: string | null;\n};\n\nexport type Credentials = { issuer: string; clientId: string; clientSecret: string };\n\ntype JsonSchema = Record<string, unknown>;\n\n/** O manifesto publicado pelo plugin do @geekapps/auth-fastify. */\nexport type ConnectionManifest = {\n version: 1;\n appId: string | null;\n scopes: Record<string, { description: string }>;\n routes: Array<{\n method: string;\n path: string;\n scope: string;\n route: string;\n params: JsonSchema | null;\n query: JsonSchema | null;\n body: JsonSchema | null;\n response: JsonSchema | null;\n }>;\n};\n\n/** Apps conectáveis vistas por esta app (credenciais dela). */\nexport async function fetchCatalog({ issuer, clientId, clientSecret }: Credentials): Promise<CatalogApp[]> {\n const response = await fetch(`${issuer.replace(/\\/$/, \"\")}/connections/catalog`, {\n headers: { authorization: `Basic ${Buffer.from(`${clientId}:${clientSecret}`).toString(\"base64\")}` },\n cache: \"no-store\",\n });\n if (!response.ok) {\n throw new Error(`catálogo indisponível (${response.status}) — confira GEEKAPPS_AUTH_CLIENT_ID e GEEKAPPS_AUTH_CLIENT_SECRET`);\n }\n return (await response.json()) as CatalogApp[];\n}\n\nexport async function fetchManifest(manifestUrl: string): Promise<ConnectionManifest> {\n const response = await fetch(manifestUrl, { headers: { accept: \"application/json\" }, cache: \"no-store\" });\n if (!response.ok) throw new Error(`manifesto indisponível (${response.status})`);\n const manifest = (await response.json()) as ConnectionManifest;\n if (manifest?.version !== 1 || !manifest.scopes || !Array.isArray(manifest.routes)) {\n throw new Error(\"manifesto em formato inválido\");\n }\n return manifest;\n}\n\nconst HEADER = \"// Gerado pelo SDK do Geekapps Auth. Não edite à mão.\\n\\n\";\n\n/** \"messages.send\" → \"MessagesSend\". */\nfunction pascal(name: string) {\n return name\n .split(/[^a-zA-Z0-9]+/)\n .filter(Boolean)\n .map((part) => part[0]!.toUpperCase() + part.slice(1))\n .join(\"\");\n}\n\nfunction properties(schema: JsonSchema | null) {\n return (schema?.properties as Record<string, JsonSchema> | undefined) ?? {};\n}\n\nfunction required(schema: JsonSchema | null) {\n return Array.isArray(schema?.required) ? (schema!.required as string[]) : [];\n}\n\n/**\n * O cliente recebe params, query e body num objeto só (o manifesto garante\n * que não há campo repetido): junta os três num schema de objeto.\n */\nfunction mergeInputSchema(route: ConnectionManifest[\"routes\"][number]): JsonSchema {\n const parts = [route.params, route.query, route.body];\n // Path params são sempre obrigatórios, mesmo sem `required` no schema.\n const pathParams = [...route.path.matchAll(/:([A-Za-z0-9_]+)/g)].map((m) => m[1]!);\n return {\n type: \"object\",\n properties: Object.assign({}, ...parts.map(properties)),\n required: [...new Set([...pathParams, ...parts.flatMap(required)])],\n additionalProperties: false,\n };\n}\n\n/**\n * Tipos de um manifesto. Usa `json-schema-to-typescript` (import dinâmico:\n * dependência opcional, só de desenvolvimento — sem ela, a geração não roda).\n */\nexport async function generateManifestTypes(app: Pick<CatalogApp, \"slug\" | \"targetAppId\">, manifest: ConnectionManifest) {\n const { compile } = await import(\"json-schema-to-typescript\");\n const options = { bannerComment: \"\", additionalProperties: false, format: false, declareExternallyReferenced: true } as const;\n\n const blocks: string[] = [];\n const routeEntries: string[] = [];\n for (const route of manifest.routes) {\n const base = pascal(route.route);\n const input = `${base}Input`;\n const output = `${base}Output`;\n blocks.push(await compile(mergeInputSchema(route) as never, input, options));\n blocks.push(\n route.response\n ? await compile({ ...route.response, title: undefined } as never, output, options)\n : `export type ${output} = unknown;\\n`,\n );\n routeEntries.push(\n ` ${JSON.stringify(route.route)}: {\\n` +\n ` scope: ${JSON.stringify(route.scope)};\\n` +\n ` method: ${JSON.stringify(route.method)};\\n` +\n ` path: ${JSON.stringify(route.path)};\\n` +\n ` input: ${input};\\n` +\n ` output: ${output};\\n` +\n ` };`,\n );\n }\n\n const scopeIds = Object.keys(manifest.scopes);\n const scopeDocs = scopeIds\n .map((id) => ` ${JSON.stringify(id)}: ${JSON.stringify(manifest.scopes[id]!.description)};`)\n .join(\"\\n\");\n\n return `${HEADER}/** Escopos que esta app aceita em conexões. */\nexport type Scope = ${scopeIds.length ? scopeIds.map((id) => JSON.stringify(id)).join(\" | \") : \"never\"};\n\n/** Descrição de cada escopo, como aparece no consent. */\nexport interface ScopeDescriptions {\n${scopeDocs}\n}\n\n/** Rotas liberadas por escopo, pelo nome usado no cliente (\\`post.messages.send(...)\\`). */\nexport interface Routes {\n${routeEntries.join(\"\\n\")}\n}\n\nexport interface App {\n slug: ${JSON.stringify(app.slug)};\n targetAppId: ${JSON.stringify(app.targetAppId)};\n scopes: Scope;\n routes: Routes;\n}\n\n${blocks.join(\"\\n\")}`;\n}\n\n/** Tipos de um OpenAPI, no formato do openapi-typescript (cliente antigo). */\nasync function generateOpenApiTypes(openApiUrl: string) {\n const { default: openapiTS, astToString } = await import(\"openapi-typescript\");\n return HEADER + astToString(await openapiTS(new URL(openApiUrl)));\n}\n\ntype Generated = { app: CatalogApp; manifest: boolean; openApi: boolean };\n\n/** `index.d.ts`: liga cada app ao `GeekappsConnections` do módulo do SDK. */\nfunction renderIndex(apps: Generated[], augment: string) {\n const imports = apps\n .flatMap(({ app, manifest, openApi }, i) => [\n manifest ? `import type { App as App${i} } from \"./${app.slug}\";` : null,\n openApi ? `import type { paths as paths${i} } from \"./${app.slug}.openapi\";` : null,\n ])\n .filter(Boolean)\n .join(\"\\n\");\n const members = apps\n .map(({ app, manifest, openApi }, i) => {\n const fields = [manifest ? `app: App${i};` : null, openApi ? `paths: paths${i};` : null].filter(Boolean).join(\" \");\n return ` ${JSON.stringify(app.slug)}: { ${fields} };`;\n })\n .join(\"\\n\");\n return `${HEADER}${imports}\n\ndeclare module ${JSON.stringify(augment)} {\n interface GeekappsConnections {\n${members}\n }\n}\n\nexport {};\n`;\n}\n\nexport type GenerateResult = {\n apps: string[];\n /** Apps do catálogo cujo manifesto/OpenAPI não pôde ser baixado/convertido. */\n failed: Array<{ name: string; reason: string }>;\n /** Com `check`: arquivos que estariam diferentes. */\n stale: string[];\n};\n\n/**\n * Gerador de tipos das App Connections, embutido no SDK (sem pacote à parte).\n * Roda sozinho em desenvolvimento; para o CI, chame com `check: true`.\n *\n * Para cada app conectável escreve em `outDir`:\n * • `<slug>.d.ts` — a partir do manifesto (escopos, rotas e tipos de\n * entrada/saída de cada rota), requer `json-schema-to-typescript`;\n * • `<slug>.openapi.d.ts` — a partir do OpenAPI, se a app declarar um\n * (só para o `createConnectionClient` antigo), requer `openapi-typescript`;\n * • `index.d.ts`, que estende `GeekappsConnections` do módulo `augment`.\n * Com `check`, não escreve nada: só diz o que estaria diferente. Uma app cuja\n * busca falha mantém os arquivos anteriores.\n */\nexport async function generateConnectionTypes(params: {\n credentials: Credentials;\n outDir?: string;\n /** Módulo que recebe o `GeekappsConnections`. Padrão: \"@geekapps/auth-nextjs/connections\". */\n augment?: string;\n check?: boolean;\n}): Promise<GenerateResult> {\n const outDir = resolve(process.cwd(), params.outDir ?? DEFAULT_OUT_DIR);\n const catalog = (await fetchCatalog(params.credentials)).sort((a, b) => a.slug.localeCompare(b.slug));\n\n const files = new Map<string, string>();\n const result: GenerateResult = { apps: [], failed: [], stale: [] };\n const generated: Generated[] = [];\n\n // Mantém o que já existia, para a app não perder os tipos por uma falha de rede.\n const keepExisting = (file: string) => {\n const existing = join(outDir, file);\n if (!existsSync(existing)) return false;\n files.set(file, readFileSync(existing, \"utf-8\"));\n return true;\n };\n\n for (const app of catalog) {\n const entry: Generated = { app, manifest: false, openApi: false };\n\n if (app.manifestUrl) {\n const file = `${app.slug}.d.ts`;\n try {\n files.set(file, await generateManifestTypes(app, await fetchManifest(app.manifestUrl)));\n entry.manifest = true;\n } catch (error) {\n result.failed.push({ name: app.name, reason: `manifesto: ${(error as Error).message}` });\n entry.manifest = keepExisting(file);\n }\n }\n\n if (app.openApiUrl) {\n const file = `${app.slug}.openapi.d.ts`;\n try {\n files.set(file, await generateOpenApiTypes(app.openApiUrl));\n entry.openApi = true;\n } catch (error) {\n result.failed.push({ name: app.name, reason: `openapi: ${(error as Error).message}` });\n entry.openApi = keepExisting(file);\n }\n }\n\n if (entry.manifest || entry.openApi) generated.push(entry);\n }\n result.apps = generated.map(({ app }) => app.name);\n files.set(\"index.d.ts\", renderIndex(generated, params.augment ?? DEFAULT_AUGMENT));\n\n const current = existsSync(outDir) ? new Set(readdirSync(outDir).filter((f) => f.endsWith(\".d.ts\"))) : new Set<string>();\n\n if (params.check) {\n for (const [file, content] of files) {\n const path = join(outDir, file);\n if (!existsSync(path) || readFileSync(path, \"utf-8\") !== content) result.stale.push(file);\n }\n for (const file of current) if (!files.has(file)) result.stale.push(file);\n return result;\n }\n\n mkdirSync(outDir, { recursive: true });\n for (const [file, content] of files) {\n const path = join(outDir, file);\n if (!existsSync(path) || readFileSync(path, \"utf-8\") !== content) writeFileSync(path, content, \"utf-8\");\n }\n // Apps que deixaram o catálogo não devem deixar tipos órfãos.\n for (const file of current) if (!files.has(file)) rmSync(join(outDir, file));\n\n return result;\n}\n"],"mappings":";AAGA,SAAS,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AG,QAAO,KAAK,QAAQ,IAAI,CAAC;AAE3E,SAAO;AACT;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geekapps/auth-nextjs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"types": "/dist",
|
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
"openapi-fetch": ">=0.13",
|
|
47
47
|
"react": ">=18",
|
|
48
48
|
"typescript": ">=5",
|
|
49
|
-
"openapi-typescript": ">=7"
|
|
49
|
+
"openapi-typescript": ">=7",
|
|
50
|
+
"json-schema-to-typescript": ">=15"
|
|
50
51
|
},
|
|
51
52
|
"peerDependenciesMeta": {
|
|
52
53
|
"openapi-fetch": {
|
|
@@ -54,6 +55,9 @@
|
|
|
54
55
|
},
|
|
55
56
|
"openapi-typescript": {
|
|
56
57
|
"optional": true
|
|
58
|
+
},
|
|
59
|
+
"json-schema-to-typescript": {
|
|
60
|
+
"optional": true
|
|
57
61
|
}
|
|
58
62
|
},
|
|
59
63
|
"devDependencies": {
|
|
@@ -63,6 +67,7 @@
|
|
|
63
67
|
"openapi-fetch": "^0.17.0",
|
|
64
68
|
"tsup": "^8.5.1",
|
|
65
69
|
"typescript": "^5.0.0",
|
|
66
|
-
"openapi-typescript": "^7.13.0"
|
|
70
|
+
"openapi-typescript": "^7.13.0",
|
|
71
|
+
"json-schema-to-typescript": "^15.0.4"
|
|
67
72
|
}
|
|
68
73
|
}
|