@geekmidas/cli 0.0.16 → 0.0.18
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-DgeiXkH-.mjs → build-DqTE4qtW.mjs} +2 -2
- package/dist/{build-CTKUZTHx.cjs → build-HWB991oI.cjs} +2 -2
- package/dist/build.cjs +3 -3
- package/dist/build.mjs +3 -3
- package/dist/{config-D8AyiwBU.cjs → config-BNqUMsvc.cjs} +4 -3
- package/dist/{config-DV1Lwdkx.mjs → config-BciAdY6_.mjs} +4 -3
- package/dist/config.cjs +1 -1
- package/dist/config.mjs +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +5 -5
- package/dist/{loadEndpoints-Dh-dSqZX.cjs → loadEndpoints-BBIavB9h.cjs} +1 -0
- package/dist/{loadEndpoints-DKaw6Eqm.mjs → loadEndpoints-DAZ53Og2.mjs} +1 -0
- package/dist/loadEndpoints.cjs +1 -1
- package/dist/loadEndpoints.mjs +1 -1
- package/dist/{openapi-DgLItZw-.mjs → openapi-CksVdkh2.mjs} +2 -2
- package/dist/{openapi-DrPYAlJ_.cjs → openapi-D4QQJUPY.cjs} +2 -2
- package/dist/openapi.cjs +3 -3
- package/dist/openapi.mjs +3 -3
- package/package.json +2 -2
- package/src/config.ts +5 -4
- package/src/loadEndpoints.ts +3 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadConfig } from "./config-
|
|
2
|
-
import { loadEndpoints } from "./loadEndpoints-
|
|
1
|
+
import { loadConfig } from "./config-BciAdY6_.mjs";
|
|
2
|
+
import { loadEndpoints } from "./loadEndpoints-DAZ53Og2.mjs";
|
|
3
3
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
4
4
|
import { dirname, join, relative } from "path";
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_config = require('./config-
|
|
3
|
-
const require_loadEndpoints = require('./loadEndpoints-
|
|
2
|
+
const require_config = require('./config-BNqUMsvc.cjs');
|
|
3
|
+
const require_loadEndpoints = require('./loadEndpoints-BBIavB9h.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
|
|
package/dist/build.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
require('./config-
|
|
2
|
-
require('./loadEndpoints-
|
|
3
|
-
const require_build = require('./build-
|
|
1
|
+
require('./config-BNqUMsvc.cjs');
|
|
2
|
+
require('./loadEndpoints-BBIavB9h.cjs');
|
|
3
|
+
const require_build = require('./build-HWB991oI.cjs');
|
|
4
4
|
|
|
5
5
|
exports.buildCommand = require_build.buildCommand;
|
package/dist/build.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./config-
|
|
2
|
-
import "./loadEndpoints-
|
|
3
|
-
import { buildCommand } from "./build-
|
|
1
|
+
import "./config-BciAdY6_.mjs";
|
|
2
|
+
import "./loadEndpoints-DAZ53Og2.mjs";
|
|
3
|
+
import { buildCommand } from "./build-DqTE4qtW.mjs";
|
|
4
4
|
|
|
5
5
|
export { buildCommand };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
2
|
const path = require_chunk.__toESM(require("path"));
|
|
3
3
|
const fs = require_chunk.__toESM(require("fs"));
|
|
4
|
+
const fs_promises = require_chunk.__toESM(require("fs/promises"));
|
|
4
5
|
|
|
5
6
|
//#region src/config.ts
|
|
6
7
|
async function loadConfig() {
|
|
7
8
|
const configPath = (0, path.join)(process.cwd(), "gkm.config.json");
|
|
8
9
|
if (!(0, fs.existsSync)(configPath)) throw new Error("gkm.config.json not found. Please create a configuration file.");
|
|
9
10
|
try {
|
|
10
|
-
const config = await
|
|
11
|
-
return
|
|
11
|
+
const config = await (0, fs_promises.readFile)(configPath, "utf-8");
|
|
12
|
+
return JSON.parse(config);
|
|
12
13
|
} catch (error) {
|
|
13
|
-
throw new Error(`Failed to load gkm.config.
|
|
14
|
+
throw new Error(`Failed to load gkm.config.json: ${error.message}`);
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { join } from "path";
|
|
2
2
|
import { existsSync } from "fs";
|
|
3
|
+
import { readFile } from "fs/promises";
|
|
3
4
|
|
|
4
5
|
//#region src/config.ts
|
|
5
6
|
async function loadConfig() {
|
|
6
7
|
const configPath = join(process.cwd(), "gkm.config.json");
|
|
7
8
|
if (!existsSync(configPath)) throw new Error("gkm.config.json not found. Please create a configuration file.");
|
|
8
9
|
try {
|
|
9
|
-
const config = await
|
|
10
|
-
return
|
|
10
|
+
const config = await readFile(configPath, "utf-8");
|
|
11
|
+
return JSON.parse(config);
|
|
11
12
|
} catch (error) {
|
|
12
|
-
throw new Error(`Failed to load gkm.config.
|
|
13
|
+
throw new Error(`Failed to load gkm.config.json: ${error.message}`);
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
|
package/dist/config.cjs
CHANGED
package/dist/config.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env -S npx tsx
|
|
2
2
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
3
|
-
require('./config-
|
|
4
|
-
require('./loadEndpoints-
|
|
5
|
-
const require_build = require('./build-
|
|
3
|
+
require('./config-BNqUMsvc.cjs');
|
|
4
|
+
require('./loadEndpoints-BBIavB9h.cjs');
|
|
5
|
+
const require_build = require('./build-HWB991oI.cjs');
|
|
6
6
|
const require_openapi_react_query = require('./openapi-react-query-C1JLYUOs.cjs');
|
|
7
|
-
const require_openapi = require('./openapi-
|
|
7
|
+
const require_openapi = require('./openapi-D4QQJUPY.cjs');
|
|
8
8
|
const commander = require_chunk.__toESM(require("commander"));
|
|
9
9
|
|
|
10
10
|
//#region package.json
|
|
11
11
|
var name = "@geekmidas/cli";
|
|
12
|
-
var version = "0.0.
|
|
12
|
+
var version = "0.0.17";
|
|
13
13
|
var private$1 = false;
|
|
14
14
|
var type = "module";
|
|
15
15
|
var bin = { "gkm": "./dist/index.cjs" };
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env -S npx tsx
|
|
2
|
-
import "./config-
|
|
3
|
-
import "./loadEndpoints-
|
|
4
|
-
import { buildCommand } from "./build-
|
|
2
|
+
import "./config-BciAdY6_.mjs";
|
|
3
|
+
import "./loadEndpoints-DAZ53Og2.mjs";
|
|
4
|
+
import { buildCommand } from "./build-DqTE4qtW.mjs";
|
|
5
5
|
import { generateReactQueryCommand } from "./openapi-react-query-DpT3XHFC.mjs";
|
|
6
|
-
import { openapiCommand } from "./openapi-
|
|
6
|
+
import { openapiCommand } from "./openapi-CksVdkh2.mjs";
|
|
7
7
|
import { Command } from "commander";
|
|
8
8
|
|
|
9
9
|
//#region package.json
|
|
10
10
|
var name = "@geekmidas/cli";
|
|
11
|
-
var version = "0.0.
|
|
11
|
+
var version = "0.0.17";
|
|
12
12
|
var private$1 = false;
|
|
13
13
|
var type = "module";
|
|
14
14
|
var bin = { "gkm": "./dist/index.cjs" };
|
package/dist/loadEndpoints.cjs
CHANGED
package/dist/loadEndpoints.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadConfig } from "./config-
|
|
2
|
-
import { loadEndpoints } from "./loadEndpoints-
|
|
1
|
+
import { loadConfig } from "./config-BciAdY6_.mjs";
|
|
2
|
+
import { loadEndpoints } from "./loadEndpoints-DAZ53Og2.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
|
-
const require_config = require('./config-
|
|
3
|
-
const require_loadEndpoints = require('./loadEndpoints-
|
|
2
|
+
const require_config = require('./config-BNqUMsvc.cjs');
|
|
3
|
+
const require_loadEndpoints = require('./loadEndpoints-BBIavB9h.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
|
-
require('./config-
|
|
3
|
-
require('./loadEndpoints-
|
|
4
|
-
const require_openapi = require('./openapi-
|
|
2
|
+
require('./config-BNqUMsvc.cjs');
|
|
3
|
+
require('./loadEndpoints-BBIavB9h.cjs');
|
|
4
|
+
const require_openapi = require('./openapi-D4QQJUPY.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
|
-
import "./config-
|
|
3
|
-
import "./loadEndpoints-
|
|
4
|
-
import { openapiCommand } from "./openapi-
|
|
2
|
+
import "./config-BciAdY6_.mjs";
|
|
3
|
+
import "./loadEndpoints-DAZ53Og2.mjs";
|
|
4
|
+
import { openapiCommand } from "./openapi-CksVdkh2.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.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"lodash.set": "~4.3.2",
|
|
17
17
|
"zod": "~3.25.67",
|
|
18
18
|
"fast-glob": "~3.3.3",
|
|
19
|
-
"@geekmidas/api": "0.0.
|
|
19
|
+
"@geekmidas/api": "0.0.36"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/lodash.get": "~4.4.9",
|
package/src/config.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { existsSync } from 'fs';
|
|
2
2
|
import { join } from 'path';
|
|
3
|
-
import
|
|
3
|
+
import { readFile } from 'fs/promises';
|
|
4
|
+
import type { GkmConfig } from './types.ts';
|
|
4
5
|
|
|
5
6
|
export async function loadConfig(): Promise<GkmConfig> {
|
|
6
7
|
const configPath = join(process.cwd(), 'gkm.config.json');
|
|
@@ -12,11 +13,11 @@ export async function loadConfig(): Promise<GkmConfig> {
|
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
try {
|
|
15
|
-
const config = await
|
|
16
|
-
return
|
|
16
|
+
const config = await readFile(configPath, 'utf-8');
|
|
17
|
+
return JSON.parse(config);
|
|
17
18
|
} catch (error) {
|
|
18
19
|
throw new Error(
|
|
19
|
-
`Failed to load gkm.config.
|
|
20
|
+
`Failed to load gkm.config.json: ${(error as Error).message}`,
|
|
20
21
|
);
|
|
21
22
|
}
|
|
22
23
|
}
|
package/src/loadEndpoints.ts
CHANGED
|
@@ -38,6 +38,9 @@ export async function loadEndpoints(routes: Routes): Promise<LoadedEndpoint[]> {
|
|
|
38
38
|
}
|
|
39
39
|
} catch (error) {
|
|
40
40
|
logger.warn(`Failed to load ${f}:`, (error as Error).message);
|
|
41
|
+
throw new Error(
|
|
42
|
+
'Failed to load endpoints. Please check the logs for details.',
|
|
43
|
+
);
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
|