miqro 5.0.1 → 5.0.2
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/build/cmd-map.js
CHANGED
|
@@ -245,27 +245,29 @@ export const CMD_MAP = {
|
|
|
245
245
|
//section: "api documentation",
|
|
246
246
|
tabs: 4,
|
|
247
247
|
cb: async () => {
|
|
248
|
-
if (process.argv.length < 5 || process.argv.length >
|
|
249
|
-
throw new Error(`usage: [NODE_ENV=development] npx miqro doc <api_folder> <subPath> [apiName]`);
|
|
248
|
+
if (process.argv.length < 5 || process.argv.length > 7) {
|
|
249
|
+
throw new Error(`usage: [NODE_ENV=development] npx miqro doc <api_folder> <subPath> [apiName] [ignore]`);
|
|
250
250
|
}
|
|
251
251
|
const dirname = process.argv[3];
|
|
252
252
|
const subPath = process.argv[4];
|
|
253
253
|
const apiName = process.argv[5];
|
|
254
|
+
const ignore = process.argv[6];
|
|
254
255
|
loadConfig();
|
|
255
|
-
console.log(JSON.stringify(await getDOCJSON({ dirname, subPath, apiName }), undefined, 2));
|
|
256
|
+
console.log(JSON.stringify(await getDOCJSON({ dirname, subPath, apiName, ignore: ignore ? ignore.split(",") : undefined }), undefined, 2));
|
|
256
257
|
},
|
|
257
258
|
description: `api folder auto doc as a json.`
|
|
258
259
|
},
|
|
259
260
|
["doc:md"]: {
|
|
260
261
|
cb: async () => {
|
|
261
|
-
if (process.argv.length < 5 || process.argv.length >
|
|
262
|
-
throw new Error(`usage: [NODE_ENV=development] npx miqro doc <api_folder> <subPath> [apiName]`);
|
|
262
|
+
if (process.argv.length < 5 || process.argv.length > 7) {
|
|
263
|
+
throw new Error(`usage: [NODE_ENV=development] npx miqro doc <api_folder> <subPath> [apiName] [ignore]`);
|
|
263
264
|
}
|
|
264
265
|
const dirname = process.argv[3];
|
|
265
266
|
const subPath = process.argv[4];
|
|
266
267
|
const apiName = process.argv[5];
|
|
268
|
+
const ignore = process.argv[6];
|
|
267
269
|
loadConfig();
|
|
268
|
-
console.log(await getMDDoc({ dirname, subPath, apiName }));
|
|
270
|
+
console.log(await getMDDoc({ dirname, subPath, apiName, ignore: ignore.split(",") }));
|
|
269
271
|
},
|
|
270
272
|
tabs: 4,
|
|
271
273
|
description: `api folder auto doc as a markdown.`
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Logger, RouterJSONDoc } from "@miqro/core";
|
|
2
|
-
export declare const getDOCJSON: ({ dirname, subPath, apiName }: {
|
|
2
|
+
export declare const getDOCJSON: ({ dirname, subPath, apiName, ignore }: {
|
|
3
|
+
ignore?: string[] | undefined;
|
|
3
4
|
apiName?: string | undefined;
|
|
4
5
|
dirname: string;
|
|
5
6
|
subPath: string;
|
package/build/utils/doc/json.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { APIRouter, ConfigPathResolver } from "@miqro/core";
|
|
2
2
|
import { resolve } from "path";
|
|
3
|
-
export const getDOCJSON = async ({ dirname, subPath, apiName }, logger) => {
|
|
3
|
+
export const getDOCJSON = async ({ dirname, subPath, apiName, ignore }, logger) => {
|
|
4
4
|
//const apiTraverse = traverseAPIRouteDir(basename(dirname).toUpperCase(), resolve(ConfigPathResolver.getBaseDirname(), dirname), subPath, undefined, logger);
|
|
5
5
|
const router = await APIRouter({
|
|
6
6
|
apiName,
|
|
7
7
|
dirname: resolve(ConfigPathResolver.getBaseDirname(), dirname),
|
|
8
|
-
path: subPath
|
|
8
|
+
path: subPath,
|
|
9
|
+
ignore
|
|
9
10
|
}, logger);
|
|
10
11
|
return router.getJSONDoc();
|
|
11
12
|
};
|
package/build/utils/doc/md.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "miqro",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"miqro": "build/cli.js"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
|
-
"
|
|
12
|
+
"prepare2": "npm run build",
|
|
13
13
|
"prebuild": "rm -Rf build;",
|
|
14
14
|
"build": "tsc",
|
|
15
15
|
"pretest": "npm run build",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"author": "claukers",
|
|
20
20
|
"license": "ISC",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@miqro/core": "^5.0.
|
|
22
|
+
"@miqro/core": "^5.0.9",
|
|
23
23
|
"@miqro/parser": "^2.0.2",
|
|
24
24
|
"@miqro/runner": "^2.0.1"
|
|
25
25
|
},
|