silgi 0.29.33 → 0.29.35

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.33";
4
+ const version = "0.29.35";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -1860,8 +1860,10 @@ async function scanExportFile(silgi) {
1860
1860
  if (type === "schema") {
1861
1861
  options.schemas.push(_name);
1862
1862
  }
1863
+ const relativePath = relativeWithDot(silgi.options.silgi.serverDir, path);
1864
+ const isExtension = silgi.options.typescript.removeFileExtension ? relativePath.replace(/\.+$/, "") : relativePath;
1863
1865
  options.addImportItem({
1864
- specifier: relativeWithDot(silgi.options.silgi.serverDir, path),
1866
+ specifier: isExtension,
1865
1867
  imports: [
1866
1868
  {
1867
1869
  name: exportName,
@@ -1888,6 +1890,8 @@ async function scanExportFile(silgi) {
1888
1890
  value: _name
1889
1891
  });
1890
1892
  }
1893
+ const relativePath = relativeWithDot(silgi.options.silgi.serverDir, path);
1894
+ const isExtension = silgi.options.typescript.removeFileExtension ? relativePath.replace(/\.+$/, "") : relativePath;
1891
1895
  options.addImportItem({
1892
1896
  imports: [
1893
1897
  {
@@ -1895,7 +1899,7 @@ async function scanExportFile(silgi) {
1895
1899
  as: _name
1896
1900
  }
1897
1901
  ],
1898
- specifier: relativeWithDot(silgi.options.build.typesDir, path)
1902
+ specifier: isExtension
1899
1903
  });
1900
1904
  }
1901
1905
  });
@@ -11,7 +11,7 @@ const npmPackage = defineSilgiPreset(
11
11
  },
12
12
  modules: ["./src"],
13
13
  typescript: {
14
- removeFileExtension: true
14
+ removeFileExtension: false
15
15
  },
16
16
  imports: {
17
17
  dirs: [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.29.33",
4
+ "version": "0.29.35",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {