api-core-lib 12.0.83 → 12.0.84

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.
Files changed (2) hide show
  1. package/dist/cli.cjs +16 -6
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -141,17 +141,22 @@ ${shape}
141
141
  return zodChain;
142
142
  }
143
143
 
144
- // src/generator/index.ts
145
- var DEBUG_MODE = process.env.DEBUG === "true";
146
- var debugLog = (title, data) => DEBUG_MODE && console.log(import_chalk.default.yellow(`
147
- [DEBUG: ${title}]`), import_util.default.inspect(data, { depth: 5, colors: true }));
148
- var toPascalCase = (str) => str.replace(/[^a-zA-Z0-9_]/g, " ").replace(/(?:^\w|[A-Z]|\b\w)/g, (w) => w.toUpperCase()).replace(/\s+/g, "");
144
+ // src/generator/utils/index.ts
145
+ var getActionName = (opId) => {
146
+ const cleanOpId = opId.replace(/_v\d+$/, "");
147
+ const parts = cleanOpId.split("_");
148
+ if (parts.length > 1) {
149
+ const actionPart = parts.slice(1).join("_");
150
+ return toCamelCase(actionPart);
151
+ }
152
+ return toCamelCase(cleanOpId);
153
+ };
149
154
  var toCamelCase = (str) => {
150
155
  const s = toPascalCase(str);
151
156
  return s.charAt(0).toLowerCase() + s.slice(1);
152
157
  };
158
+ var toPascalCase = (str) => str.replace(/[^a-zA-Z0-9_]/g, " ").replace(/(?:^\w|[A-Z]|\b\w)/g, (w) => w.toUpperCase()).replace(/\s+/g, "");
153
159
  var sanitizeForModuleName = (tagName) => `${toPascalCase(tagName.replace(/[^a-zA-Z0-9]/g, " "))}Api`;
154
- var getActionName = (opId) => toCamelCase(opId.replace(/^(central|tenant)/i, "").replace(/_v\d+$/, ""));
155
160
  var findCommonPath = (paths) => {
156
161
  if (!paths || paths.length === 0) return "/";
157
162
  const sorted = [...paths].sort();
@@ -162,6 +167,11 @@ var findCommonPath = (paths) => {
162
167
  const prefix = first.substring(0, i);
163
168
  return prefix.substring(0, prefix.lastIndexOf("/") + 1) || "/";
164
169
  };
170
+
171
+ // src/generator/index.ts
172
+ var DEBUG_MODE = process.env.DEBUG === "true";
173
+ var debugLog = (title, data) => DEBUG_MODE && console.log(import_chalk.default.yellow(`
174
+ [DEBUG: ${title}]`), import_util.default.inspect(data, { depth: 5, colors: true }));
165
175
  function parseSchema(name, schema, allEnums) {
166
176
  const properties = [];
167
177
  const enums = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "api-core-lib",
3
- "version": "12.0.83",
3
+ "version": "12.0.84",
4
4
  "description": "A flexible and powerful API client library for modern web applications.",
5
5
  "type": "module",
6
6
  "exports": {