apiblaze 0.21.16 → 0.21.17
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/index.js +5 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1352,7 +1352,7 @@ var import_commander = require("commander");
|
|
|
1352
1352
|
var import_chalk67 = __toESM(require("chalk"));
|
|
1353
1353
|
|
|
1354
1354
|
// package.json
|
|
1355
|
-
var version = "0.21.
|
|
1355
|
+
var version = "0.21.17";
|
|
1356
1356
|
|
|
1357
1357
|
// src/index.ts
|
|
1358
1358
|
init_types();
|
|
@@ -6736,6 +6736,7 @@ var CP_TOOLS = [
|
|
|
6736
6736
|
function skillMarkdown() {
|
|
6737
6737
|
const P = B.product;
|
|
6738
6738
|
const cli = B.cli;
|
|
6739
|
+
const LIB = "apiblaze";
|
|
6739
6740
|
const other = BRAND === "mcpblaze" ? "APIblaze" : "MCPblaze";
|
|
6740
6741
|
const doors = BRAND === "mcpblaze" ? `${P} ships your code to agents (an MCP server); ${other} ships the same code to users (API keys + sign-in).` : `${P} ships your code to users (API keys + sign-in); ${other} ships the same code to agents (an MCP server).`;
|
|
6741
6742
|
return `---
|
|
@@ -6807,7 +6808,7 @@ ship; \`/\` is the same thing behind ${P}. Narrate each step in one line and sho
|
|
|
6807
6808
|
\`npx ${cli}\` command \u2014 the commands are the product. Everything goes in \`${cli}-demo/\`.
|
|
6808
6809
|
|
|
6809
6810
|
1. **Scaffold.** \`npx create-next-app@latest ${cli}-demo\` (TypeScript, App Router). Then
|
|
6810
|
-
\`npm i hono ${
|
|
6811
|
+
\`npm i hono ${LIB}\`.
|
|
6811
6812
|
2. **The backend.** Hono mounted at \`app/api/[[...route]]/route.ts\` (\`import { handle } from
|
|
6812
6813
|
'hono/vercel'\`). Three resources \u2014 restaurants, tables, reservations \u2014 in an in-memory Map,
|
|
6813
6814
|
every row stamped with \`owner\` = the \`x-abz-user-id\` header (${P} sets it on every call it
|
|
@@ -6835,8 +6836,8 @@ ship; \`/\` is the same thing behind ${P}. Narrate each step in one line and sho
|
|
|
6835
6836
|
6. **/.** \`app/page.tsx\`: the same UI, plus a **user picker** (ana \xB7 ben \xB7 admin \u2014 a select, no
|
|
6836
6837
|
real login; the demo is about authorization, not building sign-in). Its server route calls
|
|
6837
6838
|
\`process.env.APIBLAZE_URL\` with \`X-API-Key: APIBLAZE_SERVER_KEY\` and \`X-End-User-Id: <the
|
|
6838
|
-
picked user>\`. Add the three widgets from \`${
|
|
6839
|
-
- \`<ApiKeyWidget />\` + \`app/api/apiblaze/keys/route.ts\` (\`createApiblazeKeys\` from \`${
|
|
6839
|
+
picked user>\`. Add the three widgets from \`${LIB}/react\`, each with its server route:
|
|
6840
|
+
- \`<ApiKeyWidget />\` + \`app/api/apiblaze/keys/route.ts\` (\`createApiblazeKeys\` from \`${LIB}/server\`)
|
|
6840
6841
|
- \`<UsersGroupsWidget />\` + \`app/api/apiblaze/groups/route.ts\` (\`createApiblazeGroups\` \u2014
|
|
6841
6842
|
the keys route with one word changed)
|
|
6842
6843
|
- \`<ChatWidget />\` + \`app/api/apiblaze/chat/route.ts\` (\`createApiblazeChat\`)
|