@elysiajs/openapi 1.4.7 → 1.4.8-beta.0

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.
@@ -8314,7 +8314,6 @@ var import_path2 = require("path");
8314
8314
  var import_child_process = require("child_process");
8315
8315
  var matchRoute = /: Elysia<(.*)>/gs;
8316
8316
  var matchStatus = /(\d{3}):/g;
8317
- var wrapStatusInQuote = (value) => value.replace(matchStatus, '"$1":');
8318
8317
  function extractRootObjects(code) {
8319
8318
  const results = [];
8320
8319
  let i = 0;
@@ -8458,10 +8457,9 @@ var fromTypes = (targetFilePath, {
8458
8457
  3
8459
8458
  )
8460
8459
  );
8461
- const routesString = wrapStatusInQuote(
8462
- // Intentionally not adding "}"
8463
- // to avoid mismatched bracket in loop below
8464
- instance.slice(3, instance.indexOf("}, {", 4))
8460
+ const routesString = extractRootObjects(instance)[0].replace(
8461
+ matchStatus,
8462
+ '"$1":'
8465
8463
  );
8466
8464
  const routes = {};
8467
8465
  for (const route of extractRootObjects(routesString)) {
@@ -8303,7 +8303,6 @@ import { join } from "path";
8303
8303
  import { spawnSync } from "child_process";
8304
8304
  var matchRoute = /: Elysia<(.*)>/gs;
8305
8305
  var matchStatus = /(\d{3}):/g;
8306
- var wrapStatusInQuote = (value) => value.replace(matchStatus, '"$1":');
8307
8306
  function extractRootObjects(code) {
8308
8307
  const results = [];
8309
8308
  let i = 0;
@@ -8447,10 +8446,9 @@ var fromTypes = (targetFilePath, {
8447
8446
  3
8448
8447
  )
8449
8448
  );
8450
- const routesString = wrapStatusInQuote(
8451
- // Intentionally not adding "}"
8452
- // to avoid mismatched bracket in loop below
8453
- instance.slice(3, instance.indexOf("}, {", 4))
8449
+ const routesString = extractRootObjects(instance)[0].replace(
8450
+ matchStatus,
8451
+ '"$1":'
8454
8452
  );
8455
8453
  const routes = {};
8456
8454
  for (const route of extractRootObjects(routesString)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elysiajs/openapi",
3
- "version": "1.4.7",
3
+ "version": "1.4.8-beta.0",
4
4
  "description": "Plugin for Elysia to auto-generate API documentation",
5
5
  "author": {
6
6
  "name": "saltyAom",
package/bunfig.toml DELETED
@@ -1,2 +0,0 @@
1
- [install]
2
- registry = "https://registry.npmjs.org/"