@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.
- package/dist/{build-GTFSYaDw.cjs → build-CTKUZTHx.cjs} +2 -2
- package/dist/{build-fWeaXigm.mjs → build-DgeiXkH-.mjs} +2 -2
- package/dist/build.cjs +2 -2
- package/dist/build.mjs +2 -2
- package/dist/{cli--DOGIUC5.mjs → cli-BuIVmCrJ.mjs} +3 -3
- package/dist/{cli-BFQ-Dso8.cjs → cli-DLypHuNF.cjs} +3 -3
- package/dist/cli.cjs +4 -4
- package/dist/cli.mjs +4 -4
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{loadEndpoints-BL8q2rTO.mjs → loadEndpoints-DKaw6Eqm.mjs} +8 -5
- package/dist/{loadEndpoints-CYFwuPZr.cjs → loadEndpoints-Dh-dSqZX.cjs} +8 -5
- package/dist/loadEndpoints.cjs +1 -1
- package/dist/loadEndpoints.mjs +1 -1
- package/dist/{openapi-BxI6zE0N.mjs → openapi-DgLItZw-.mjs} +1 -1
- package/dist/{openapi-BX7ba0w0.cjs → openapi-DrPYAlJ_.cjs} +1 -1
- package/dist/openapi.cjs +2 -2
- package/dist/openapi.mjs +2 -2
- package/package.json +2 -2
- package/src/build.ts +1 -1
- package/src/loadEndpoints.ts +2 -1
|
@@ -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-
|
|
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.
|
|
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-
|
|
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.
|
|
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-
|
|
3
|
-
const require_build = require('./build-
|
|
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,10 +1,10 @@
|
|
|
1
|
-
import { buildCommand } from "./build-
|
|
2
|
-
import { openapiCommand } from "./openapi-
|
|
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.
|
|
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-
|
|
3
|
-
const require_openapi = require('./openapi-
|
|
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.
|
|
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-
|
|
4
|
-
require('./build-
|
|
5
|
-
require('./cli-
|
|
6
|
-
require('./openapi-
|
|
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-
|
|
4
|
-
import "./build-
|
|
5
|
-
import "./cli
|
|
6
|
-
import "./openapi-
|
|
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-
|
|
4
|
-
require('./build-
|
|
5
|
-
require('./cli-
|
|
6
|
-
require('./openapi-
|
|
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-
|
|
4
|
-
import "./build-
|
|
5
|
-
import "./cli
|
|
6
|
-
import "./openapi-
|
|
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))
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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))
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
}
|
package/dist/loadEndpoints.cjs
CHANGED
package/dist/loadEndpoints.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { loadConfig } from "./config-DV1Lwdkx.mjs";
|
|
2
|
-
import { loadEndpoints } from "./loadEndpoints-
|
|
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-
|
|
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-
|
|
4
|
-
const require_openapi = require('./openapi-
|
|
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-
|
|
4
|
-
import { openapiCommand } from "./openapi-
|
|
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.
|
|
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.
|
|
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.
|
|
46
|
+
path: endpoint._path,
|
|
47
47
|
method: endpoint.method,
|
|
48
48
|
handler: '', // Will be filled in later
|
|
49
49
|
};
|
package/src/loadEndpoints.ts
CHANGED
|
@@ -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
|
|
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>,
|