gemi 0.4.67 → 0.4.68

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.
@@ -19874,7 +19874,7 @@ function requireNamedTypes() {
19874
19874
  })(main);
19875
19875
  async function customRequestParser(original) {
19876
19876
  function isExportedControllerClassDeclaration(body) {
19877
- return body.type === "ExportNamedDeclaration" && body.declaration.type === "ClassDeclaration" && body.declaration.superClass.name === "Controller";
19877
+ return (body.type === "ExportNamedDeclaration" || body.type === "ExportDefaultDeclaration") && body.declaration.type === "ClassDeclaration" && body.declaration.superClass.name === "Controller";
19878
19878
  }
19879
19879
  function isController(body) {
19880
19880
  return body.type === "ClassDeclaration" && body.superClass.name === "Controller";
@@ -19883,7 +19883,7 @@ async function customRequestParser(original) {
19883
19883
  return body.type === "ClassDeclaration" && (body.superClass.name === "ApiRouter" || body.superClass.name === "ViewRouter");
19884
19884
  }
19885
19885
  function isRouterExportedClassDeclaration(body) {
19886
- return body.type === "ExportNamedDeclaration" && body.declaration.type === "ClassDeclaration" && (body.declaration.superClass.name === "ApiRouter" || body.declaration.superClass.name === "ViewRouter");
19886
+ return (body.type === "ExportNamedDeclaration" || body.type === "ExportDefaultDeclaration") && body.declaration.type === "ClassDeclaration" && (body.declaration.superClass.name === "ApiRouter" || body.declaration.superClass.name === "ViewRouter");
19887
19887
  }
19888
19888
  function controllerBodyParser(body) {
19889
19889
  for (const node of body.body) {
@@ -19911,11 +19911,14 @@ async function customRequestParser(original) {
19911
19911
  }
19912
19912
  }
19913
19913
  function apiRouterParser(body) {
19914
- var _a;
19914
+ var _a, _b;
19915
19915
  for (const node of body) {
19916
19916
  if (node.key.name === "routes" && node.value.type === "ObjectExpression") {
19917
19917
  for (const property of node.value.properties) {
19918
- for (const arg of ((_a = property == null ? void 0 : property.value) == null ? void 0 : _a.arguments) ?? []) {
19918
+ if (((_a = property == null ? void 0 : property.value) == null ? void 0 : _a.type) === "Identifier") {
19919
+ continue;
19920
+ }
19921
+ for (const arg of ((_b = property == null ? void 0 : property.value) == null ? void 0 : _b.arguments) ?? []) {
19919
19922
  if (!(arg.type === "ArrowFunctionExpression" || arg.type === "FunctionExpression")) {
19920
19923
  continue;
19921
19924
  }
@@ -19945,12 +19948,13 @@ async function customRequestParser(original) {
19945
19948
  }
19946
19949
  }
19947
19950
  const orgFile = await main$2.parse(original, {
19948
- parser: await import("./typescript-CZ-I7GwY.mjs").then((n) => n.t)
19951
+ parser: await import("./typescript-DximJlM5.mjs").then((n) => n.t)
19949
19952
  });
19950
19953
  for (const body of orgFile.program.body) {
19951
19954
  if (!body || (body == null ? void 0 : body.type) === "ImportDeclaration") {
19952
19955
  continue;
19953
19956
  }
19957
+ console.log(body.type);
19954
19958
  if (isExportedControllerClassDeclaration(body)) {
19955
19959
  controllerBodyParser(body.declaration.body);
19956
19960
  continue;
@@ -1,4 +1,4 @@
1
- import { g } from "./index-s0zduTTb.mjs";
1
+ import { g } from "./index-CMpQi8Ml.mjs";
2
2
  export {
3
3
  g as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { r as requireUtil, a as require$$0 } from "./index-s0zduTTb.mjs";
1
+ import { r as requireUtil, a as require$$0 } from "./index-CMpQi8Ml.mjs";
2
2
  function _mergeNamespaces(n, m) {
3
3
  for (var i = 0; i < m.length; i++) {
4
4
  const e = m[i];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemi",
3
- "version": "0.4.67",
3
+ "version": "0.4.68",
4
4
  "devDependencies": {
5
5
  "@babel/parser": "^7.25.4",
6
6
  "@repo/eslint-config": "*",