@devbro/pashmak 0.1.44 → 0.1.45

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.
@@ -133,7 +133,7 @@ class GenerateApiDocsCommand extends Command {
133
133
  let final_api_docs = {};
134
134
  for (let file_path of files_to_merge) {
135
135
  let file_json = JSON.parse(await fs.readFile(file_path, "utf8"));
136
- Arr.deepMerge(final_api_docs, file_json);
136
+ final_api_docs = Arr.deepMerge(final_api_docs, file_json);
137
137
  }
138
138
  await fs.writeFile(
139
139
  config.get("api_docs.output"),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/app/console/generate/GenerateApiDocsCommand.mts"],"sourcesContent":["import { cli, router } from \"../../../facades.mjs\";\nimport { Command, Option } from \"clipanion\";\nimport path from \"path\";\nimport * as fs from \"fs/promises\";\nimport { config } from \"../../../config.mjs\";\nimport { Arr } from \"@devbro/neko-helper\";\n\nexport class GenerateApiDocsCommand extends Command {\n static paths = [\n [`make`, `apidocs`],\n [`generate`, `apidocs`],\n ];\n\n static usage = Command.Usage({\n category: `Generate`,\n description: `Generate OpenAPI documentation from routes`,\n details: `\n This command generates OpenAPI 3.0 specification documentation by analyzing\n your application's routes and merging with example files.\n \n The generated documentation includes:\n - All registered routes with their HTTP methods\n - Path parameters extracted from route definitions\n - Request body schemas for POST, PUT, and PATCH methods\n - Response schemas\n \n The command will merge files specified in config.api_docs.merge_files\n and output the final documentation to config.api_docs.output.\n\n This command depends on config data. make sure your default config contains the following:\n api_docs: {\n merge_files: [\n path.join(__dirname, '../..', 'private', 'openapi_examples.json'),\n path.join(__dirname, '../..', 'private', 'openapi_base.json'),\n path.join(__dirname, '../..', 'private', 'openapi_user_changes.json'),\n ],\n output: path.join(__dirname, '../..', 'private', 'openapi.json'),\n }\n `,\n examples: [[`Generate API documentation`, `$0 generate apidocs`]],\n });\n\n help = Option.Boolean(`--help,-h`, false, {\n description: `Show help message for this command`,\n });\n\n async execute() {\n if (this.help) {\n this.context.stdout.write(\n this.constructor.usage?.toString() || \"No help available\\n\",\n );\n return 0;\n }\n\n const rootDir = process.cwd();\n\n this.context.stdout.write(`Generating OpenAPI documentation...\\n`);\n\n // Get all routes from the router\n const routes = router().routes;\n\n // Generate OpenAPI 3.0 specification\n const openApiSpec = {\n openapi: \"3.0.0\",\n info: {\n title: \"API Documentation\",\n version: \"1.0.0\",\n description: \"Auto-generated API documentation\",\n },\n servers: [\n {\n url: \"/\",\n description: \"Local server\",\n },\n ],\n paths: {} as Record<string, any>,\n };\n\n // Process each route\n for (const route of routes) {\n const routePath = route.path;\n // Convert route path to OpenAPI format (e.g., /api/:id -> /api/{id})\n const openApiPath = routePath.replace(/:([a-zA-Z0-9_]+)/g, \"{$1}\");\n\n if (!openApiSpec.paths[openApiPath]) {\n openApiSpec.paths[openApiPath] = {};\n }\n\n // Add each HTTP method for this route\n for (const method of route.methods) {\n const lowerMethod = method.toLowerCase();\n\n // Skip HEAD as it's usually auto-generated\n if (lowerMethod === \"head\") {\n continue;\n }\n\n openApiSpec.paths[openApiPath][lowerMethod] = {\n summary: `${method} ${routePath}`,\n description: `Endpoint for ${method} ${routePath}`,\n parameters: this.extractParameters(routePath),\n responses: {\n \"200\": {\n description: \"Successful response\",\n content: {\n \"application/json\": {\n schema: {\n type: \"object\",\n },\n },\n },\n },\n \"500\": {\n description: \"Internal server error\",\n },\n },\n };\n\n // Add request body for POST, PUT, PATCH\n if ([\"post\", \"put\", \"patch\"].includes(lowerMethod)) {\n openApiSpec.paths[openApiPath][lowerMethod].requestBody = {\n required: true,\n content: {\n \"application/json\": {\n schema: {\n type: \"object\",\n },\n },\n },\n };\n }\n }\n }\n\n // Ensure public directory exists\n await fs.mkdir(config.get(\"private_path\"), { recursive: true });\n\n // Write the OpenAPI spec to public/openapi.json\n const outputPath = path.join(config.get(\"private_path\"), \"openapi.json\");\n await fs.writeFile(\n outputPath,\n JSON.stringify(openApiSpec, null, 2),\n \"utf-8\",\n );\n\n this.context.stdout.write(\n `OpenAPI documentation generated at: ${outputPath}\\n`,\n );\n this.context.stdout.write(`Total routes documented: ${routes.length}\\n`);\n\n let files_to_merge: string[] = config.get(\"api_docs.merge_files\");\n let final_api_docs = {};\n for (let file_path of files_to_merge) {\n let file_json = JSON.parse(await fs.readFile(file_path, \"utf8\"));\n Arr.deepMerge(final_api_docs, file_json);\n }\n\n await fs.writeFile(\n config.get(\"api_docs.output\"),\n JSON.stringify(final_api_docs, null, 2),\n );\n\n this.context.stdout.write(\n `wrote final open api document to : ${config.get(\"api_docs.output\")}\\n`,\n );\n }\n\n private extractParameters(routePath: string): any[] {\n const paramRegex = /:([a-zA-Z0-9_]+)/g;\n const parameters: any[] = [];\n let match;\n\n while ((match = paramRegex.exec(routePath)) !== null) {\n parameters.push({\n name: match[1],\n in: \"path\",\n required: true,\n schema: {\n type: \"string\",\n },\n description: `Path parameter ${match[1]}`,\n });\n }\n\n return parameters;\n }\n}\n\ncli().register(GenerateApiDocsCommand);\n"],"mappings":";;AAAA,SAAS,KAAK,cAAc;AAC5B,SAAS,SAAS,cAAc;AAChC,OAAO,UAAU;AACjB,YAAY,QAAQ;AACpB,SAAS,cAAc;AACvB,SAAS,WAAW;AAEb,MAAM,+BAA+B,QAAQ;AAAA,EAPpD,OAOoD;AAAA;AAAA;AAAA,EAClD,OAAO,QAAQ;AAAA,IACb,CAAC,QAAQ,SAAS;AAAA,IAClB,CAAC,YAAY,SAAS;AAAA,EACxB;AAAA,EAEA,OAAO,QAAQ,QAAQ,MAAM;AAAA,IAC3B,UAAU;AAAA,IACV,aAAa;AAAA,IACb,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAuBT,UAAU,CAAC,CAAC,8BAA8B,qBAAqB,CAAC;AAAA,EAClE,CAAC;AAAA,EAED,OAAO,OAAO,QAAQ,aAAa,OAA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M,CAAC;AAAA,QACb,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,QAAQ;AAAA,UACN,MAAM;AAAA,QACR;AAAA,QACA,aAAa,kBAAkB,MAAM,CAAC,CAAC;AAAA,MACzC,CAAC;AAAA,IACH;AAEA,WAAO;AAAA,EACT;AACF;AAEA,IAAI,EAAE,SAAS,sBAAsB;","names":[]}
1
+ {"version":3,"sources":["../../../../src/app/console/generate/GenerateApiDocsCommand.mts"],"sourcesContent":["import { cli, router } from \"../../../facades.mjs\";\nimport { Command, Option } from \"clipanion\";\nimport path from \"path\";\nimport * as fs from \"fs/promises\";\nimport { config } from \"../../../config.mjs\";\nimport { Arr } from \"@devbro/neko-helper\";\n\nexport class GenerateApiDocsCommand extends Command {\n static paths = [\n [`make`, `apidocs`],\n [`generate`, `apidocs`],\n ];\n\n static usage = Command.Usage({\n category: `Generate`,\n description: `Generate OpenAPI documentation from routes`,\n details: `\n This command generates OpenAPI 3.0 specification documentation by analyzing\n your application's routes and merging with example files.\n \n The generated documentation includes:\n - All registered routes with their HTTP methods\n - Path parameters extracted from route definitions\n - Request body schemas for POST, PUT, and PATCH methods\n - Response schemas\n \n The command will merge files specified in config.api_docs.merge_files\n and output the final documentation to config.api_docs.output.\n\n This command depends on config data. make sure your default config contains the following:\n api_docs: {\n merge_files: [\n path.join(__dirname, '../..', 'private', 'openapi_examples.json'),\n path.join(__dirname, '../..', 'private', 'openapi_base.json'),\n path.join(__dirname, '../..', 'private', 'openapi_user_changes.json'),\n ],\n output: path.join(__dirname, '../..', 'private', 'openapi.json'),\n }\n `,\n examples: [[`Generate API documentation`, `$0 generate apidocs`]],\n });\n\n help = Option.Boolean(`--help,-h`, false, {\n description: `Show help message for this command`,\n });\n\n async execute() {\n if (this.help) {\n this.context.stdout.write(\n this.constructor.usage?.toString() || \"No help available\\n\",\n );\n return 0;\n }\n\n const rootDir = process.cwd();\n\n this.context.stdout.write(`Generating OpenAPI documentation...\\n`);\n\n // Get all routes from the router\n const routes = router().routes;\n\n // Generate OpenAPI 3.0 specification\n const openApiSpec = {\n openapi: \"3.0.0\",\n info: {\n title: \"API Documentation\",\n version: \"1.0.0\",\n description: \"Auto-generated API documentation\",\n },\n servers: [\n {\n url: \"/\",\n description: \"Local server\",\n },\n ],\n paths: {} as Record<string, any>,\n };\n\n // Process each route\n for (const route of routes) {\n const routePath = route.path;\n // Convert route path to OpenAPI format (e.g., /api/:id -> /api/{id})\n const openApiPath = routePath.replace(/:([a-zA-Z0-9_]+)/g, \"{$1}\");\n\n if (!openApiSpec.paths[openApiPath]) {\n openApiSpec.paths[openApiPath] = {};\n }\n\n // Add each HTTP method for this route\n for (const method of route.methods) {\n const lowerMethod = method.toLowerCase();\n\n // Skip HEAD as it's usually auto-generated\n if (lowerMethod === \"head\") {\n continue;\n }\n\n openApiSpec.paths[openApiPath][lowerMethod] = {\n summary: `${method} ${routePath}`,\n description: `Endpoint for ${method} ${routePath}`,\n parameters: this.extractParameters(routePath),\n responses: {\n \"200\": {\n description: \"Successful response\",\n content: {\n \"application/json\": {\n schema: {\n type: \"object\",\n },\n },\n },\n },\n \"500\": {\n description: \"Internal server error\",\n },\n },\n };\n\n // Add request body for POST, PUT, PATCH\n if ([\"post\", \"put\", \"patch\"].includes(lowerMethod)) {\n openApiSpec.paths[openApiPath][lowerMethod].requestBody = {\n required: true,\n content: {\n \"application/json\": {\n schema: {\n type: \"object\",\n },\n },\n },\n };\n }\n }\n }\n\n // Ensure public directory exists\n await fs.mkdir(config.get(\"private_path\"), { recursive: true });\n\n // Write the OpenAPI spec to public/openapi.json\n const outputPath = path.join(config.get(\"private_path\"), \"openapi.json\");\n await fs.writeFile(\n outputPath,\n JSON.stringify(openApiSpec, null, 2),\n \"utf-8\",\n );\n\n this.context.stdout.write(\n `OpenAPI documentation generated at: ${outputPath}\\n`,\n );\n this.context.stdout.write(`Total routes documented: ${routes.length}\\n`);\n\n let files_to_merge: string[] = config.get(\"api_docs.merge_files\");\n let final_api_docs = {};\n for (let file_path of files_to_merge) {\n let file_json = JSON.parse(await fs.readFile(file_path, \"utf8\"));\n final_api_docs = Arr.deepMerge(final_api_docs, file_json);\n }\n\n await fs.writeFile(\n config.get(\"api_docs.output\"),\n JSON.stringify(final_api_docs, null, 2),\n );\n\n this.context.stdout.write(\n `wrote final open api document to : ${config.get(\"api_docs.output\")}\\n`,\n );\n }\n\n private extractParameters(routePath: string): any[] {\n const paramRegex = /:([a-zA-Z0-9_]+)/g;\n const parameters: any[] = [];\n let match;\n\n while ((match = paramRegex.exec(routePath)) !== null) {\n parameters.push({\n name: match[1],\n in: \"path\",\n required: true,\n schema: {\n type: \"string\",\n },\n description: `Path parameter ${match[1]}`,\n });\n }\n\n return parameters;\n }\n}\n\ncli().register(GenerateApiDocsCommand);\n"],"mappings":";;AAAA,SAAS,KAAK,cAAc;AAC5B,SAAS,SAAS,cAAc;AAChC,OAAO,UAAU;AACjB,YAAY,QAAQ;AACpB,SAAS,cAAc;AACvB,SAAS,WAAW;AAEb,MAAM,+BAA+B,QAAQ;AAAA,EAPpD,OAOoD;AAAA;AAAA;AAAA,EAClD,OAAO,QAAQ;AAAA,IACb,CAAC,QAAQ,SAAS;AAAA,IAClB,CAAC,YAAY,SAAS;AAAA,EACxB;AAAA,EAEA,OAAO,QAAQ,QAAQ,MAAM;AAAA,IAC3B,UAAU;AAAA,IACV,aAAa;AAAA,IACb,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAuBT,UAAU,CAAC,CAAC,8BAA8B,qBAAqB,CAAC;AAAA,EAClE,CAAC;AAAA,EAED,OAAO,OAAO,QAAQ,aAAa,OAAO;AAAA,IACxC,aAAa;AAAA,EACf,CAAC;AAAA,EAED,MAAM,UAAU;AACd,QAAI,KAAK,MAAM;AACb,WAAK,QAAQ,OAAO;AAAA,QAClB,KAAK,YAAY,OAA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,CAAC;AAAA,MACzC,CAAC;AAAA,IACH;AAEA,WAAO;AAAA,EACT;AACF;AAEA,IAAI,EAAE,SAAS,sBAAsB;","names":[]}
@@ -873,7 +873,7 @@ var GenerateApiDocsCommand = class extends import_clipanion2.Command {
873
873
  let final_api_docs = {};
874
874
  for (let file_path of files_to_merge) {
875
875
  let file_json = JSON.parse(await fs.readFile(file_path, "utf8"));
876
- import_neko_helper3.Arr.deepMerge(final_api_docs, file_json);
876
+ final_api_docs = import_neko_helper3.Arr.deepMerge(final_api_docs, file_json);
877
877
  }
878
878
  await fs.writeFile(
879
879
  config_exports.config.get("api_docs.output"),
@@ -927,7 +927,7 @@ var GenerateApiDocsCommand = class extends import_clipanion3.Command {
927
927
  let final_api_docs = {};
928
928
  for (let file_path of files_to_merge) {
929
929
  let file_json = JSON.parse(await fs2.readFile(file_path, "utf8"));
930
- import_neko_helper3.Arr.deepMerge(final_api_docs, file_json);
930
+ final_api_docs = import_neko_helper3.Arr.deepMerge(final_api_docs, file_json);
931
931
  }
932
932
  await fs2.writeFile(
933
933
  config_exports.config.get("api_docs.output"),
@@ -2453,7 +2453,7 @@ var GenerateApiDocsCommand = class extends import_clipanion9.Command {
2453
2453
  let final_api_docs = {};
2454
2454
  for (let file_path of files_to_merge) {
2455
2455
  let file_json = JSON.parse(await fs6.readFile(file_path, "utf8"));
2456
- import_neko_helper3.Arr.deepMerge(final_api_docs, file_json);
2456
+ final_api_docs = import_neko_helper3.Arr.deepMerge(final_api_docs, file_json);
2457
2457
  }
2458
2458
  await fs6.writeFile(
2459
2459
  config_exports.config.get("api_docs.output"),
@@ -2629,7 +2629,7 @@ var init_GenerateApiDocsCommand = __esm({
2629
2629
  let final_api_docs = {};
2630
2630
  for (let file_path of files_to_merge) {
2631
2631
  let file_json = JSON.parse(await fs6.readFile(file_path, "utf8"));
2632
- import_neko_helper3.Arr.deepMerge(final_api_docs, file_json);
2632
+ final_api_docs = import_neko_helper3.Arr.deepMerge(final_api_docs, file_json);
2633
2633
  }
2634
2634
  await fs6.writeFile(
2635
2635
  config_exports.config.get("api_docs.output"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devbro/pashmak",
3
- "version": "0.1.44",
3
+ "version": "0.1.45",
4
4
  "description": "testing application for the entire repo",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",