@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.
- package/dist/{build-CiwYwyHE.cjs → build-DNUd8HBL.cjs} +1 -0
- package/dist/{build-DYmI5SHL.mjs → build-SdnSQPW7.mjs} +1 -0
- package/dist/build.cjs +1 -1
- package/dist/build.mjs +1 -1
- package/dist/{cli-DRXcwF7E.mjs → cli-CfgR8d0p.mjs} +1 -1
- package/dist/{cli-E1jTnJne.cjs → cli-DkqbpY0m.cjs} +1 -1
- package/dist/cli.cjs +2 -2
- package/dist/cli.mjs +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
- package/src/build.ts +1 -0
- package/src/loadEndpoints.ts +2 -1
- package/src/types.ts +3 -1
|
@@ -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
package/dist/build.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_build = require('./build-
|
|
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-
|
|
4
|
+
require('./build-DNUd8HBL.cjs');
|
|
5
5
|
require('./openapi-BKjcm03Q.cjs');
|
|
6
|
-
require('./cli-
|
|
6
|
+
require('./cli-DkqbpY0m.cjs');
|
package/dist/cli.mjs
CHANGED
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-
|
|
4
|
+
require('./build-DNUd8HBL.cjs');
|
|
5
5
|
require('./openapi-BKjcm03Q.cjs');
|
|
6
|
-
require('./cli-
|
|
6
|
+
require('./cli-DkqbpY0m.cjs');
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geekmidas/cli",
|
|
3
|
-
"version": "0.0.
|
|
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.
|
|
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}';
|
package/src/loadEndpoints.ts
CHANGED
|
@@ -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:
|
|
11
|
+
export async function loadEndpoints(routes: Routes): Promise<LoadedEndpoint[]> {
|
|
11
12
|
const logger = console;
|
|
12
13
|
|
|
13
14
|
// Find all endpoint files
|