@cnbcool/cnb-api-generate 2.18.17 → 2.18.19

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.
@@ -9,6 +9,7 @@ const debug_1 = __importDefault(require("debug"));
9
9
  const get_config_1 = require("./utils/get-config");
10
10
  const logger = (0, debug_1.default)('cag:api');
11
11
  function generateApi(paths, definitions, defintionsMap) {
12
+ var _a;
12
13
  const config = (0, get_config_1.getConfig)();
13
14
  const pathList = Object.keys(paths);
14
15
  const requestMap = {};
@@ -22,6 +23,10 @@ function generateApi(paths, definitions, defintionsMap) {
22
23
  for (const method in methods) {
23
24
  if (config.whitelist && (!config.whitelist[path] || !config.whitelist[path].includes(method)))
24
25
  continue;
26
+ if (config.blacklist && ((_a = config.blacklist[path]) === null || _a === void 0 ? void 0 : _a.includes(method))) {
27
+ logger(`skip [${method}] ${path} (blacklisted)`);
28
+ continue;
29
+ }
25
30
  const methodName = method;
26
31
  const methodDefinitions = methods[methodName];
27
32
  if (!methodDefinitions) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cnbcool/cnb-api-generate",
3
- "version": "2.18.17",
3
+ "version": "2.18.19",
4
4
  "main": "./built/index.js",
5
5
  "module": "./src/index.ts",
6
6
  "types": "./src/index.ts",