silgi 0.36.3 → 0.36.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,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
 
4
- const version = "0.36.3";
4
+ const version = "0.36.5";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -659,6 +659,10 @@ async function silgiGenerateType(silgi) {
659
659
  noEmit: true,
660
660
  /* If NOT transpiling with TypeScript: */
661
661
  module: "Preserve",
662
+ moduleResolution: "bundler",
663
+ useDefineForClassFields: true,
664
+ noImplicitThis: true,
665
+ jsx: "preserve",
662
666
  customConditions: silgi.options.typescript.customConditions,
663
667
  paths: {
664
668
  // '#silgiImports': [
@@ -720,6 +724,27 @@ async function silgiGenerateType(silgi) {
720
724
  exclude: [...exclude]
721
725
  });
722
726
  }
727
+ if (isPresents(["next"])) {
728
+ tsConfig = defu(tsConfig, {
729
+ compilerOptions: {
730
+ incremental: true,
731
+ plugins: [
732
+ { name: "next" }
733
+ ],
734
+ paths: {
735
+ "@/*": [
736
+ relativeWithDot(tsconfigDir, join(silgi.options.rootDir, "src", "*"))
737
+ ]
738
+ }
739
+ },
740
+ include: [
741
+ relativeWithDot(tsconfigDir, join(silgi.options.rootDir, "next-env.d.ts")),
742
+ relativeWithDot(tsconfigDir, join(silgi.options.rootDir, "**", "*.ts")),
743
+ relativeWithDot(tsconfigDir, join(silgi.options.rootDir, "**", "*.tsx")),
744
+ relativeWithDot(tsconfigDir, join(silgi.options.rootDir, ".next", "types", "**", "*.ts"))
745
+ ]
746
+ });
747
+ }
723
748
  tsConfig.compilerOptions ||= {};
724
749
  tsConfig.compilerOptions.paths ||= {};
725
750
  tsConfig.include ||= [];
@@ -817,7 +817,8 @@ async function silgiFetch(_request, options, context) {
817
817
  request = new Request(_request, options);
818
818
  } else {
819
819
  request = _request;
820
- const match = findRoute(silgiCtx.router, _request.method, _request.url);
820
+ const silgiURL = getUrlPrefix(request.url, request.method);
821
+ const match = findRoute(silgiCtx.router, _request.method, silgiURL.path);
821
822
  if (!match) {
822
823
  throw createError({
823
824
  message: "Route not found",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.36.3",
4
+ "version": "0.36.5",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {