@axiomify/cli 6.0.0-rc.2 → 6.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 (29) hide show
  1. package/README.md +7 -1
  2. package/dist/{dist-PKSGYMK7.mjs → dist-SYWHGZLI.mjs} +17 -30
  3. package/dist/index.js +440 -345
  4. package/dist/index.mjs +424 -316
  5. package/dist/{uws_darwin_arm64_108-CLFXMYPI.node → uws_darwin_arm64_127-NGHTXN5Q.node} +0 -0
  6. package/dist/{uws_darwin_arm64_127-KHC2FVAM.node → uws_darwin_arm64_137-ESY6MPLH.node} +0 -0
  7. package/dist/{uws_darwin_arm64_115-7FFEG3YF.node → uws_darwin_arm64_147-V7BKA3SU.node} +0 -0
  8. package/dist/{uws_darwin_x64_127-NHKQMMST.node → uws_darwin_x64_127-WIZGG7MS.node} +0 -0
  9. package/dist/{uws_darwin_x64_108-BRGT45AT.node → uws_darwin_x64_137-APKZWL4Y.node} +0 -0
  10. package/dist/{uws_darwin_x64_115-4HGPQGDD.node → uws_darwin_x64_147-W2HKFQZT.node} +0 -0
  11. package/dist/{uws_linux_arm64_115-EIAAY4WO.node → uws_linux_arm64_127-3CO7NSFJ.node} +0 -0
  12. package/dist/{uws_linux_arm64_120-OADY5FIN.node → uws_linux_arm64_137-HWEDGGZV.node} +0 -0
  13. package/dist/{uws_linux_arm64_108-YHK7ACON.node → uws_linux_arm64_147-7UCIYMK2.node} +0 -0
  14. package/dist/{uws_linux_x64_108-QSNE6XWU.node → uws_linux_x64_127-KA4E76LJ.node} +0 -0
  15. package/dist/{uws_linux_x64_127-HBA6RNSU.node → uws_linux_x64_137-DDFLTTJR.node} +0 -0
  16. package/dist/{uws_linux_x64_120-AIZ6RIW2.node → uws_linux_x64_147-MJSFREL3.node} +0 -0
  17. package/dist/{uws_win32_x64_120-XH4MVJGN.node → uws_win32_x64_127-O4US4Y4L.node} +0 -0
  18. package/dist/{uws_win32_x64_127-JBAEKR4X.node → uws_win32_x64_137-L5OZROQ7.node} +0 -0
  19. package/dist/{uws_win32_x64_115-V5N4NHJ5.node → uws_win32_x64_147-D7MGKVRG.node} +0 -0
  20. package/package.json +30 -14
  21. package/dist/uws_darwin_arm64_120-GFZT7CLS.node +0 -0
  22. package/dist/uws_darwin_x64_120-C2SGUHP4.node +0 -0
  23. package/dist/uws_linux_arm64_127-U2SRLYQM.node +0 -0
  24. package/dist/uws_linux_arm_108-BKVITVZA.node +0 -0
  25. package/dist/uws_linux_arm_115-7IORQF77.node +0 -0
  26. package/dist/uws_linux_arm_120-LCX4ED5F.node +0 -0
  27. package/dist/uws_linux_arm_127-6UTO7TL6.node +0 -0
  28. package/dist/uws_linux_x64_115-7AAZWMWE.node +0 -0
  29. package/dist/uws_win32_x64_108-J6KONPDM.node +0 -0
package/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @axiomify/cli
2
2
 
3
+
4
+ [![npm version](https://img.shields.io/npm/v/@axiomify/cli.svg)](https://npmjs.com/package//@axiomify/cli)
5
+ [![codecov](https://codecov.io/github/otopman/axiomify/graph/badge.svg)](https://codecov.io/github/otopman/axiomify)
6
+ [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/OTopman/axiomify/badge)](https://securityscorecards.dev/viewer/?uri=github.com/OTopman/axiomify)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
8
+
3
9
  The official CLI for the Axiomify framework — scaffold projects, run the
4
10
  dev server, build production bundles, inspect routes, generate OpenAPI
5
11
  specs, and audit production readiness.
@@ -30,7 +36,7 @@ the same major as your `@axiomify/*` runtime packages.
30
36
  `[entry]` defaults to `src/index.ts` everywhere it's accepted.
31
37
 
32
38
  For the full reference (flags, exit codes, CI examples), see
33
- [`docs/packages/cli.md`](../../docs/packages/cli.md).
39
+ [`[./docs/packages/cli.md](./docs/packages/cli.md)`](https://github.com/OTopman/axiomify/blob/main/docs/packages/cli.md).
34
40
 
35
41
  ## `axiomify init`
36
42
 
@@ -33,7 +33,7 @@ var OpenApiGenerator = class {
33
33
  options;
34
34
  generate() {
35
35
  const spec = {
36
- openapi: "3.0.3",
36
+ openapi: "3.1.0",
37
37
  info: this.options.info,
38
38
  paths: {}
39
39
  };
@@ -44,39 +44,27 @@ var OpenApiGenerator = class {
44
44
  const method = route.method.toLowerCase();
45
45
  const paths = spec.paths;
46
46
  if (!paths[openApiPath]) paths[openApiPath] = {};
47
- const op = route.openapi ?? void 0;
47
+ const s = route.schema ?? {};
48
48
  const operation = {
49
- // OAS §4.7.10.2 — summary. Default to `${method} ${path}` so the
50
- // docs UI always has a human-readable title even without user input.
51
- summary: op?.summary ?? `${route.method} ${route.path}`,
52
- // OAS §4.7.10.5 operationId. Client codegen tools
53
- // (openapi-typescript, openapi-generator) use this to name the
54
- // generated function. When the user doesn't supply one we
55
- // synthesise a stable name from method+path:
56
- // GET /users/:id → "getUsersById"
57
- // POST /users → "postUsers"
58
- // Determinism matters here — codegen output should not drift
59
- // between releases unless method+path actually change.
60
- operationId: op?.operationId ?? this.synthesiseOperationId(route.method, route.path),
49
+ // OAS §4.8.10.2 — summary. Defaults to `${method} ${path}`.
50
+ summary: s.summary ?? `${route.method} ${route.path}`,
51
+ // OAS §4.8.10.5 — operationId for client codegen tools.
52
+ // Auto-synthesised from method+path when omitted:
53
+ // GET /users/:id "getUsersById" POST /users "postUsers"
54
+ operationId: s.operationId ?? this.synthesiseOperationId(route.method, route.path),
61
55
  parameters: this.extractParameters(route),
62
56
  responses: this.extractResponses(route)
63
57
  };
64
- const legacySchema = route.schema ?? {};
65
- const description = op?.description ?? legacySchema.description;
66
- const tags = op?.tags ?? legacySchema.tags;
67
- const security = op?.security ?? legacySchema.security;
68
- if (description) operation.description = description;
69
- if (tags) operation.tags = tags;
70
- if (security !== void 0) operation.security = security;
71
- if (op?.deprecated) operation.deprecated = true;
72
- if (op?.externalDocs) operation.externalDocs = op.externalDocs;
73
- if (op?.servers) operation.servers = op.servers;
74
- if (op?.callbacks) operation.callbacks = op.callbacks;
58
+ if (s.description) operation.description = s.description;
59
+ if (s.tags) operation.tags = s.tags;
60
+ if (s.security !== void 0) operation.security = s.security;
61
+ if (s.deprecated) operation.deprecated = true;
62
+ if (s.externalDocs) operation.externalDocs = s.externalDocs;
63
+ if (s.servers) operation.servers = s.servers;
64
+ if (s.callbacks) operation.callbacks = s.callbacks;
75
65
  const body = this.extractBody(route);
76
66
  if (body) {
77
- if (op?.requestBodyDescription) {
78
- body.description = op.requestBodyDescription;
79
- }
67
+ if (s.requestBodyDescription) body.description = s.requestBodyDescription;
80
68
  operation.requestBody = body;
81
69
  }
82
70
  paths[openApiPath][method] = operation;
@@ -170,8 +158,7 @@ var OpenApiGenerator = class {
170
158
  return { required: true, content: { [contentType]: { schema: finalSchema } } };
171
159
  }
172
160
  extractResponses(route) {
173
- const op = route.openapi;
174
- const descriptions = op?.responseDescriptions ?? {};
161
+ const descriptions = route.schema?.responseDescriptions ?? {};
175
162
  const defaultResponse = {
176
163
  "200": {
177
164
  description: descriptions["200"] ?? "Successful response",