@geekmidas/cli 0.0.10 → 0.0.12

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.
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require('./chunk-CUT6urMc.cjs');
2
2
  const require_config = require('./config-D8AyiwBU.cjs');
3
- const require_loadEndpoints = require('./loadEndpoints-CYFwuPZr.cjs');
3
+ const require_loadEndpoints = require('./loadEndpoints-Dh-dSqZX.cjs');
4
4
  const node_fs_promises = require_chunk.__toESM(require("node:fs/promises"));
5
5
  const path = require_chunk.__toESM(require("path"));
6
6
 
@@ -22,7 +22,7 @@ async function buildCommand(options) {
22
22
  }
23
23
  const allEndpoints = loadedEndpoints.map(({ name, endpoint, file }) => {
24
24
  const routeInfo = {
25
- path: endpoint.route,
25
+ path: endpoint._path,
26
26
  method: endpoint.method,
27
27
  handler: ""
28
28
  };
@@ -1,5 +1,5 @@
1
1
  import { loadConfig } from "./config-DV1Lwdkx.mjs";
2
- import { loadEndpoints } from "./loadEndpoints-BL8q2rTO.mjs";
2
+ import { loadEndpoints } from "./loadEndpoints-DKaw6Eqm.mjs";
3
3
  import { mkdir, writeFile } from "node:fs/promises";
4
4
  import { dirname, join, relative } from "path";
5
5
 
@@ -21,7 +21,7 @@ async function buildCommand(options) {
21
21
  }
22
22
  const allEndpoints = loadedEndpoints.map(({ name, endpoint, file }) => {
23
23
  const routeInfo = {
24
- path: endpoint.route,
24
+ path: endpoint._path,
25
25
  method: endpoint.method,
26
26
  handler: ""
27
27
  };
package/dist/build.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  require('./config-D8AyiwBU.cjs');
2
- require('./loadEndpoints-CYFwuPZr.cjs');
3
- const require_build = require('./build-GTFSYaDw.cjs');
2
+ require('./loadEndpoints-Dh-dSqZX.cjs');
3
+ const require_build = require('./build-CTKUZTHx.cjs');
4
4
 
5
5
  exports.buildCommand = require_build.buildCommand;
package/dist/build.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./config-DV1Lwdkx.mjs";
2
- import "./loadEndpoints-BL8q2rTO.mjs";
3
- import { buildCommand } from "./build-fWeaXigm.mjs";
2
+ import "./loadEndpoints-DKaw6Eqm.mjs";
3
+ import { buildCommand } from "./build-DgeiXkH-.mjs";
4
4
 
5
5
  export { buildCommand };
@@ -1,10 +1,10 @@
1
- import { buildCommand } from "./build-fWeaXigm.mjs";
2
- import { openapiCommand } from "./openapi-BxI6zE0N.mjs";
1
+ import { buildCommand } from "./build-DgeiXkH-.mjs";
2
+ import { openapiCommand } from "./openapi-DgLItZw-.mjs";
3
3
  import { Command } from "commander";
4
4
 
5
5
  //#region package.json
6
6
  var name = "@geekmidas/cli";
7
- var version = "0.0.10";
7
+ var version = "0.0.12";
8
8
  var private$1 = false;
9
9
  var type = "module";
10
10
  var bin = { "gkm": "./src/index.ts" };
@@ -1,11 +1,11 @@
1
1
  const require_chunk = require('./chunk-CUT6urMc.cjs');
2
- const require_build = require('./build-GTFSYaDw.cjs');
3
- const require_openapi = require('./openapi-BX7ba0w0.cjs');
2
+ const require_build = require('./build-CTKUZTHx.cjs');
3
+ const require_openapi = require('./openapi-DrPYAlJ_.cjs');
4
4
  const commander = require_chunk.__toESM(require("commander"));
5
5
 
6
6
  //#region package.json
7
7
  var name = "@geekmidas/cli";
8
- var version = "0.0.10";
8
+ var version = "0.0.12";
9
9
  var private$1 = false;
10
10
  var type = "module";
11
11
  var bin = { "gkm": "./src/index.ts" };
package/dist/cli.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  require('./config-D8AyiwBU.cjs');
3
- require('./loadEndpoints-CYFwuPZr.cjs');
4
- require('./build-GTFSYaDw.cjs');
5
- require('./cli-BFQ-Dso8.cjs');
6
- require('./openapi-BX7ba0w0.cjs');
3
+ require('./loadEndpoints-Dh-dSqZX.cjs');
4
+ require('./build-CTKUZTHx.cjs');
5
+ require('./cli-DLypHuNF.cjs');
6
+ require('./openapi-DrPYAlJ_.cjs');
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import "./config-DV1Lwdkx.mjs";
3
- import "./loadEndpoints-BL8q2rTO.mjs";
4
- import "./build-fWeaXigm.mjs";
5
- import "./cli--DOGIUC5.mjs";
6
- import "./openapi-BxI6zE0N.mjs";
3
+ import "./loadEndpoints-DKaw6Eqm.mjs";
4
+ import "./build-DgeiXkH-.mjs";
5
+ import "./cli-BuIVmCrJ.mjs";
6
+ import "./openapi-DgLItZw-.mjs";
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env -S npx tsx
2
2
  require('./config-D8AyiwBU.cjs');
3
- require('./loadEndpoints-CYFwuPZr.cjs');
4
- require('./build-GTFSYaDw.cjs');
5
- require('./cli-BFQ-Dso8.cjs');
6
- require('./openapi-BX7ba0w0.cjs');
3
+ require('./loadEndpoints-Dh-dSqZX.cjs');
4
+ require('./build-CTKUZTHx.cjs');
5
+ require('./cli-DLypHuNF.cjs');
6
+ require('./openapi-DrPYAlJ_.cjs');
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env -S npx tsx
2
2
  import "./config-DV1Lwdkx.mjs";
3
- import "./loadEndpoints-BL8q2rTO.mjs";
4
- import "./build-fWeaXigm.mjs";
5
- import "./cli--DOGIUC5.mjs";
6
- import "./openapi-BxI6zE0N.mjs";
3
+ import "./loadEndpoints-DKaw6Eqm.mjs";
4
+ import "./build-DgeiXkH-.mjs";
5
+ import "./cli-BuIVmCrJ.mjs";
6
+ import "./openapi-DgLItZw-.mjs";
@@ -12,11 +12,14 @@ async function loadEndpoints(routes) {
12
12
  for await (const f of files) try {
13
13
  const file = f.toString();
14
14
  const module = await import(file);
15
- for (const [exportName, exportValue] of Object.entries(module)) if (Endpoint.isEndpoint(exportValue)) endpoints.push({
16
- name: exportName,
17
- endpoint: exportValue,
18
- file
19
- });
15
+ for (const [exportName, exportValue] of Object.entries(module)) if (Endpoint.isEndpoint(exportValue)) {
16
+ exportValue.operationId = exportName;
17
+ endpoints.push({
18
+ name: exportName,
19
+ endpoint: exportValue,
20
+ file
21
+ });
22
+ }
20
23
  } catch (error) {
21
24
  logger.warn(`Failed to load ${f}:`, error.message);
22
25
  }
@@ -13,11 +13,14 @@ async function loadEndpoints(routes) {
13
13
  for await (const f of files) try {
14
14
  const file = f.toString();
15
15
  const module$1 = await import(file);
16
- for (const [exportName, exportValue] of Object.entries(module$1)) if (__geekmidas_api_server.Endpoint.isEndpoint(exportValue)) endpoints.push({
17
- name: exportName,
18
- endpoint: exportValue,
19
- file
20
- });
16
+ for (const [exportName, exportValue] of Object.entries(module$1)) if (__geekmidas_api_server.Endpoint.isEndpoint(exportValue)) {
17
+ exportValue.operationId = exportName;
18
+ endpoints.push({
19
+ name: exportName,
20
+ endpoint: exportValue,
21
+ file
22
+ });
23
+ }
21
24
  } catch (error) {
22
25
  logger.warn(`Failed to load ${f}:`, error.message);
23
26
  }
@@ -1,3 +1,3 @@
1
- const require_loadEndpoints = require('./loadEndpoints-CYFwuPZr.cjs');
1
+ const require_loadEndpoints = require('./loadEndpoints-Dh-dSqZX.cjs');
2
2
 
3
3
  exports.loadEndpoints = require_loadEndpoints.loadEndpoints;
@@ -1,3 +1,3 @@
1
- import { loadEndpoints } from "./loadEndpoints-BL8q2rTO.mjs";
1
+ import { loadEndpoints } from "./loadEndpoints-DKaw6Eqm.mjs";
2
2
 
3
3
  export { loadEndpoints };
@@ -1,5 +1,5 @@
1
1
  import { loadConfig } from "./config-DV1Lwdkx.mjs";
2
- import { loadEndpoints } from "./loadEndpoints-BL8q2rTO.mjs";
2
+ import { loadEndpoints } from "./loadEndpoints-DKaw6Eqm.mjs";
3
3
  import { mkdir, writeFile } from "node:fs/promises";
4
4
  import { Endpoint } from "@geekmidas/api/server";
5
5
  import { join } from "node:path";
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require('./chunk-CUT6urMc.cjs');
2
2
  const require_config = require('./config-D8AyiwBU.cjs');
3
- const require_loadEndpoints = require('./loadEndpoints-CYFwuPZr.cjs');
3
+ const require_loadEndpoints = require('./loadEndpoints-Dh-dSqZX.cjs');
4
4
  const node_fs_promises = require_chunk.__toESM(require("node:fs/promises"));
5
5
  const __geekmidas_api_server = require_chunk.__toESM(require("@geekmidas/api/server"));
6
6
  const node_path = require_chunk.__toESM(require("node:path"));
package/dist/openapi.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env -S npx tsx
2
2
  require('./config-D8AyiwBU.cjs');
3
- require('./loadEndpoints-CYFwuPZr.cjs');
4
- const require_openapi = require('./openapi-BX7ba0w0.cjs');
3
+ require('./loadEndpoints-Dh-dSqZX.cjs');
4
+ const require_openapi = require('./openapi-DrPYAlJ_.cjs');
5
5
 
6
6
  exports.openapiCommand = require_openapi.openapiCommand;
package/dist/openapi.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env -S npx tsx
2
2
  import "./config-DV1Lwdkx.mjs";
3
- import "./loadEndpoints-BL8q2rTO.mjs";
4
- import { openapiCommand } from "./openapi-BxI6zE0N.mjs";
3
+ import "./loadEndpoints-DKaw6Eqm.mjs";
4
+ import { openapiCommand } from "./openapi-DgLItZw-.mjs";
5
5
 
6
6
  export { openapiCommand };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geekmidas/cli",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
@@ -23,7 +23,7 @@
23
23
  "lodash.set": "~4.3.2",
24
24
  "zod": "~3.25.67",
25
25
  "fast-glob": "~3.3.3",
26
- "@geekmidas/api": "0.0.22"
26
+ "@geekmidas/api": "0.0.26"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/lodash.get": "~4.4.9",
package/src/build.ts CHANGED
@@ -43,7 +43,7 @@ export async function buildCommand(options: BuildOptions): Promise<void> {
43
43
 
44
44
  const allEndpoints = loadedEndpoints.map(({ name, endpoint, file }) => {
45
45
  const routeInfo: RouteInfo = {
46
- path: endpoint.route,
46
+ path: endpoint._path,
47
47
  method: endpoint.method,
48
48
  handler: '', // Will be filled in later
49
49
  };
@@ -27,7 +27,8 @@ export async function loadEndpoints(routes: Routes): Promise<LoadedEndpoint[]> {
27
27
 
28
28
  // Check all exports for endpoints
29
29
  for (const [exportName, exportValue] of Object.entries(module)) {
30
- if (Endpoint.isEndpoint(exportValue as any)) {
30
+ if (Endpoint.isEndpoint(exportValue)) {
31
+ exportValue.operationId = exportName;
31
32
  endpoints.push({
32
33
  name: exportName,
33
34
  endpoint: exportValue as Endpoint<any, any, any, any, any, any>,