silgi 0.17.3 → 0.17.5

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,4 +1,4 @@
1
- const version = "0.17.3";
1
+ const version = "0.17.5";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^2.0.2",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -757,7 +757,7 @@ async function prepareServerFiles(silgi) {
757
757
  const importsContent = [
758
758
  ...Object.entries(importItems).map(([_name, { from, import: imports }]) => {
759
759
  if (silgi.options.typescript.removeFileExtension) {
760
- from = from.replace(/\.\w+$/, "");
760
+ from = from.replace(/\.(js|ts|mjs|cjs|jsx|tsx)$/, "");
761
761
  }
762
762
  return `import { ${imports.map(({ type, name }) => type ? `type ${name}` : name).join(", ")} } from '${from}'`;
763
763
  }),
@@ -1698,7 +1698,7 @@ async function prepareCoreFile(data, frameworkContext, silgi) {
1698
1698
  const importsContent = [
1699
1699
  ...Object.entries(importItems).map(([_name, { from, import: imports }]) => {
1700
1700
  if (silgi.options.typescript.removeFileExtension) {
1701
- from = from.replace(/\.\w+$/, "");
1701
+ from = from.replace(/\.(js|ts|mjs|cjs|jsx|tsx)$/, "");
1702
1702
  }
1703
1703
  return `import { ${imports.map(({ type, name }) => type ? `type ${name}` : name).join(", ")} } from '${from}'`;
1704
1704
  }),
@@ -1803,7 +1803,7 @@ async function createDTSFramework(silgi) {
1803
1803
  ...Object.entries(importItems).map(([_name, { from, import: imports }]) => {
1804
1804
  const path = isAbsolute(from) ? relativeWithDot(silgi.options.build.typesDir, from) : from;
1805
1805
  if (silgi.options.typescript.removeFileExtension) {
1806
- from = from.replace(/\.\w+$/, "");
1806
+ from = from.replace(/\.(js|ts|mjs|cjs|jsx|tsx)$/, "");
1807
1807
  }
1808
1808
  return `import { ${imports.map(({ type, name }) => type ? `type ${name}` : name).join(", ")} } from '${path}'`;
1809
1809
  }),
@@ -1970,7 +1970,7 @@ async function prepareSchema(silgi) {
1970
1970
  ...Object.entries(importItems).map(([_name, { from, import: imports }]) => {
1971
1971
  const path = isAbsolute(from) ? relativeWithDot(silgi.options.build.typesDir, from) : from;
1972
1972
  if (silgi.options.typescript.removeFileExtension) {
1973
- from = from.replace(/\.\w+$/, "");
1973
+ from = from.replace(/\.(js|ts|mjs|cjs|jsx|tsx)$/, "");
1974
1974
  }
1975
1975
  return `import { ${imports.map(({ type, name }) => type ? `type ${name}` : name).join(", ")} } from '${path}'`;
1976
1976
  }),
@@ -1,4 +1,4 @@
1
- const version = "0.17.3";
1
+ const version = "0.17.5";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^2.0.2",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -1,4 +1,4 @@
1
- const version = "0.17.3";
1
+ const version = "0.17.5";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^2.0.2",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -12,6 +12,18 @@ const nitro = defineSilgiPreset(
12
12
  envOptions: {
13
13
  prefix: "NITRO_"
14
14
  },
15
+ imports: {
16
+ exclude: [
17
+ /[/\\]data[/\\]/,
18
+ /[/\\]assets[/\\]/,
19
+ /[/\\]public[/\\]/,
20
+ /[/\\]static[/\\]/,
21
+ /[/\\]api[/\\]/,
22
+ /[/\\]routers[/\\]/,
23
+ /[/\\]modules[/\\]/,
24
+ /[/\\]generated[/\\]/
25
+ ]
26
+ },
15
27
  storages: ["data", "/assets"]
16
28
  },
17
29
  {
@@ -12,6 +12,21 @@ const npmPackage = defineSilgiPreset(
12
12
  modules: ["./src"],
13
13
  typescript: {
14
14
  removeFileExtension: true
15
+ },
16
+ imports: {
17
+ exclude: [
18
+ /[/\\]data[/\\]/,
19
+ /[/\\]assets[/\\]/,
20
+ /[/\\]public[/\\]/,
21
+ /[/\\]static[/\\]/,
22
+ /[/\\]api[/\\]/,
23
+ /[/\\]routers[/\\]/,
24
+ /[/\\]modules[/\\]/,
25
+ /[/\\]generated[/\\]/,
26
+ /[/\\]runtime[/\\]/,
27
+ /[/\\]types[/\\]/,
28
+ /[/\\]src[/\\][^/\\]+\.ts$/
29
+ ]
15
30
  }
16
31
  },
17
32
  {
@@ -13,6 +13,18 @@ const nuxt = defineSilgiPreset(
13
13
  prefix: "NITRO_",
14
14
  altPrefix: "NUXT_"
15
15
  },
16
+ imports: {
17
+ exclude: [
18
+ /[/\\]data[/\\]/,
19
+ /[/\\]assets[/\\]/,
20
+ /[/\\]public[/\\]/,
21
+ /[/\\]static[/\\]/,
22
+ /[/\\]api[/\\]/,
23
+ /[/\\]routers[/\\]/,
24
+ /[/\\]modules[/\\]/,
25
+ /[/\\]generated[/\\]/
26
+ ]
27
+ },
16
28
  storages: ["data", "/assets"]
17
29
  },
18
30
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.17.3",
4
+ "version": "0.17.5",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {