silgi 0.29.16 → 0.29.18

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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
 
4
- const version = "0.29.16";
4
+ const version = "0.29.18";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -33,6 +33,7 @@ import { snakeCase } from 'scule';
33
33
  async function generateApiFul(silgi) {
34
34
  const config = silgi.options.apiFul;
35
35
  if (!hasSilgiModule("openapi")) {
36
+ consola.info("Silgi OpenAPI module not found, if you want to use it, please install it @silgi/openapi");
36
37
  return;
37
38
  }
38
39
  if (!config.services || hasSilgiModule("openapi")) {
@@ -1806,13 +1807,14 @@ async function scanExportFile(silgi) {
1806
1807
  if (type === "schema") {
1807
1808
  options.schemas.push(_name);
1808
1809
  }
1809
- options.importItems[path] ??= {
1810
- import: [],
1811
- from: relativeWithDot(silgi.options.silgi.serverDir, path)
1812
- };
1813
- options.importItems[path].import.push({
1814
- name: `${exportName} as ${_name}`,
1815
- key: _name
1810
+ options.addImportItem({
1811
+ specifier: relativeWithDot(silgi.options.silgi.serverDir, path),
1812
+ imports: [
1813
+ {
1814
+ name: exportName,
1815
+ as: _name
1816
+ }
1817
+ ]
1816
1818
  });
1817
1819
  }
1818
1820
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.29.16",
4
+ "version": "0.29.18",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {