@geekmidas/cli 0.0.2 → 0.0.4

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.
@@ -74,6 +74,7 @@ async function generateServerFile(outputDir, endpoints, envParserPath, envParser
74
74
  const imports = Array.from(importsByFile.entries()).map(([importPath, exports$1]) => `import { ${exports$1.join(", ")} } from '${importPath}';`).join("\n");
75
75
  const allExportNames = endpoints.map(({ exportName }) => exportName);
76
76
  const content = `import { HonoEndpoint } from '@geekmidas/api/hono';
77
+ import { Endpoint } from '@geekmidas/api/server';
77
78
  import { HermodServiceDiscovery } from '@geekmidas/api/services';
78
79
  import { Hono } from 'hono';
79
80
  import ${envParserImportPattern} from '${relativeEnvParserPath}';
@@ -73,6 +73,7 @@ async function generateServerFile(outputDir, endpoints, envParserPath, envParser
73
73
  const imports = Array.from(importsByFile.entries()).map(([importPath, exports]) => `import { ${exports.join(", ")} } from '${importPath}';`).join("\n");
74
74
  const allExportNames = endpoints.map(({ exportName }) => exportName);
75
75
  const content = `import { HonoEndpoint } from '@geekmidas/api/hono';
76
+ import { Endpoint } from '@geekmidas/api/server';
76
77
  import { HermodServiceDiscovery } from '@geekmidas/api/services';
77
78
  import { Hono } from 'hono';
78
79
  import ${envParserImportPattern} from '${relativeEnvParserPath}';
package/dist/build.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  require('./config-B-D8cs7V.cjs');
2
2
  require('./loadEndpoints-CYFwuPZr.cjs');
3
- const require_build = require('./build-CiwYwyHE.cjs');
3
+ const require_build = require('./build-DNUd8HBL.cjs');
4
4
 
5
5
  exports.buildCommand = require_build.buildCommand;
package/dist/build.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./config-Bzzc89wR.mjs";
2
2
  import "./loadEndpoints-BL8q2rTO.mjs";
3
- import { buildCommand } from "./build-DYmI5SHL.mjs";
3
+ import { buildCommand } from "./build-SdnSQPW7.mjs";
4
4
 
5
5
  export { buildCommand };
@@ -1,4 +1,4 @@
1
- import { buildCommand } from "./build-DYmI5SHL.mjs";
1
+ import { buildCommand } from "./build-SdnSQPW7.mjs";
2
2
  import { openapiCommand } from "./openapi-DLix_iqn.mjs";
3
3
  import { Command } from "commander";
4
4
 
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./chunk-CUT6urMc.cjs');
2
- const require_build = require('./build-CiwYwyHE.cjs');
2
+ const require_build = require('./build-DNUd8HBL.cjs');
3
3
  const require_openapi = require('./openapi-BKjcm03Q.cjs');
4
4
  const commander = require_chunk.__toESM(require("commander"));
5
5
 
package/dist/cli.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  require('./config-B-D8cs7V.cjs');
3
3
  require('./loadEndpoints-CYFwuPZr.cjs');
4
- require('./build-CiwYwyHE.cjs');
4
+ require('./build-DNUd8HBL.cjs');
5
5
  require('./openapi-BKjcm03Q.cjs');
6
- require('./cli-E1jTnJne.cjs');
6
+ require('./cli-DkqbpY0m.cjs');
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import "./config-Bzzc89wR.mjs";
3
3
  import "./loadEndpoints-BL8q2rTO.mjs";
4
- import "./build-DYmI5SHL.mjs";
4
+ import "./build-SdnSQPW7.mjs";
5
5
  import "./openapi-DLix_iqn.mjs";
6
- import "./cli-DRXcwF7E.mjs";
6
+ import "./cli-CfgR8d0p.mjs";
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env -S npx tsx
2
2
  require('./config-B-D8cs7V.cjs');
3
3
  require('./loadEndpoints-CYFwuPZr.cjs');
4
- require('./build-CiwYwyHE.cjs');
4
+ require('./build-DNUd8HBL.cjs');
5
5
  require('./openapi-BKjcm03Q.cjs');
6
- require('./cli-E1jTnJne.cjs');
6
+ require('./cli-DkqbpY0m.cjs');
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env -S npx tsx
2
2
  import "./config-Bzzc89wR.mjs";
3
3
  import "./loadEndpoints-BL8q2rTO.mjs";
4
- import "./build-DYmI5SHL.mjs";
4
+ import "./build-SdnSQPW7.mjs";
5
5
  import "./openapi-DLix_iqn.mjs";
6
- import "./cli-DRXcwF7E.mjs";
6
+ import "./cli-CfgR8d0p.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geekmidas/cli",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
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.3"
26
+ "@geekmidas/api": "0.0.5"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/lodash.get": "~4.4.9",
package/src/build.ts CHANGED
@@ -164,6 +164,7 @@ async function generateServerFile(
164
164
  const allExportNames = endpoints.map(({ exportName }) => exportName);
165
165
 
166
166
  const content = `import { HonoEndpoint } from '@geekmidas/api/hono';
167
+ import { Endpoint } from '@geekmidas/api/server';
167
168
  import { HermodServiceDiscovery } from '@geekmidas/api/services';
168
169
  import { Hono } from 'hono';
169
170
  import ${envParserImportPattern} from '${relativeEnvParserPath}';
@@ -1,5 +1,6 @@
1
1
  import { Endpoint } from '@geekmidas/api/server';
2
2
  import fg from 'fast-glob';
3
+ import type { Routes } from './types';
3
4
 
4
5
  export interface LoadedEndpoint {
5
6
  name: string;
@@ -7,7 +8,7 @@ export interface LoadedEndpoint {
7
8
  file: string;
8
9
  }
9
10
 
10
- export async function loadEndpoints(routes: string): Promise<LoadedEndpoint[]> {
11
+ export async function loadEndpoints(routes: Routes): Promise<LoadedEndpoint[]> {
11
12
  const logger = console;
12
13
 
13
14
  // Find all endpoint files
package/src/types.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  export type Provider = 'server' | 'aws-apigatewayv1' | 'aws-apigatewayv2';
2
2
 
3
+ export type Routes = string | string[];
4
+
3
5
  export interface GkmConfig {
4
- routes: string;
6
+ routes: Routes;
5
7
  envParser: string;
6
8
  logger: string;
7
9
  }