silgi 0.35.6 → 0.35.8
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.
- package/dist/cli/build.mjs +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/types.mjs +42 -34
- package/dist/types/index.d.mts +1 -1
- package/package.json +1 -1
package/dist/cli/build.mjs
CHANGED
|
@@ -1701,7 +1701,7 @@ async function prepareCoreFile(silgi) {
|
|
|
1701
1701
|
];
|
|
1702
1702
|
const importData = [
|
|
1703
1703
|
"",
|
|
1704
|
-
"export async function buildSilgi(option
|
|
1704
|
+
"export async function buildSilgi(option?: BuildSilgi) {",
|
|
1705
1705
|
"",
|
|
1706
1706
|
"// buildSilgiBefore",
|
|
1707
1707
|
...before,
|
package/dist/cli/index.mjs
CHANGED
package/dist/cli/types.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import escapeRE from 'escape-string-regexp';
|
|
|
9
9
|
import { resolveModuleExportNames } from 'mlly';
|
|
10
10
|
import { existsSync, promises, lstatSync } from 'node:fs';
|
|
11
11
|
import { findWorkspaceDir, readPackageJSON } from 'pkg-types';
|
|
12
|
-
import { resolveSilgiPath, relativeWithDot, resolveSilgiModule } from 'silgi/kit';
|
|
12
|
+
import { resolveSilgiPath, relativeWithDot, resolveSilgiModule, isPresents } from 'silgi/kit';
|
|
13
13
|
import { runtimeDir, pkgDir } from 'silgi/runtime/meta';
|
|
14
14
|
import { withLeadingSlash, withTrailingSlash } from 'ufo';
|
|
15
15
|
import { defu } from 'defu';
|
|
@@ -636,7 +636,8 @@ async function silgiGenerateType(silgi) {
|
|
|
636
636
|
include.add(join(relative2, "dist/runtime"));
|
|
637
637
|
exclude.add(join(relative2, "dist/runtime/server"));
|
|
638
638
|
}
|
|
639
|
-
|
|
639
|
+
let tsConfig = silgi.options.typescript?.tsConfig;
|
|
640
|
+
const defaultConfig = defu(tsConfig, {
|
|
640
641
|
compilerOptions: {
|
|
641
642
|
/* Base options: */
|
|
642
643
|
esModuleInterop: true,
|
|
@@ -655,6 +656,7 @@ async function silgiGenerateType(silgi) {
|
|
|
655
656
|
noUncheckedIndexedAccess: true,
|
|
656
657
|
noImplicitOverride: true,
|
|
657
658
|
forceConsistentCasingInFileNames: true,
|
|
659
|
+
noEmit: true,
|
|
658
660
|
/* If NOT transpiling with TypeScript: */
|
|
659
661
|
module: "Preserve",
|
|
660
662
|
customConditions: silgi.options.typescript.customConditions,
|
|
@@ -679,38 +681,44 @@ async function silgiGenerateType(silgi) {
|
|
|
679
681
|
},
|
|
680
682
|
include: [...include],
|
|
681
683
|
exclude: [...exclude]
|
|
682
|
-
};
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
684
|
+
});
|
|
685
|
+
if (isPresents(["hono"])) {
|
|
686
|
+
tsConfig = defu(defaultConfig, {
|
|
687
|
+
compilerOptions: {
|
|
688
|
+
jsx: "react-jsx",
|
|
689
|
+
jsxImportSource: "hono/jsx"
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
if (isPresents(["npm-package"])) {
|
|
694
|
+
tsConfig = defu(tsConfig, {
|
|
695
|
+
compilerOptions: {
|
|
696
|
+
target: "es2022",
|
|
697
|
+
lib: ["es2022", "webworker", "dom.iterable"],
|
|
698
|
+
moduleDetection: "force",
|
|
699
|
+
/* If NOT transpiling with TypeScript: */
|
|
700
|
+
module: "preserve",
|
|
701
|
+
paths: {},
|
|
702
|
+
resolveJsonModule: true,
|
|
703
|
+
allowJs: true,
|
|
704
|
+
/* Strictness */
|
|
705
|
+
strict: true,
|
|
706
|
+
noImplicitOverride: true,
|
|
707
|
+
noEmit: true,
|
|
708
|
+
allowSyntheticDefaultImports: true,
|
|
709
|
+
/* Base options: */
|
|
710
|
+
esModuleInterop: false,
|
|
711
|
+
forceConsistentCasingInFileNames: true,
|
|
712
|
+
isolatedModules: true,
|
|
713
|
+
verbatimModuleSyntax: true,
|
|
714
|
+
skipLibCheck: true
|
|
715
|
+
},
|
|
716
|
+
// include: ['src', 'test', './moduleTypes.d.ts'],
|
|
717
|
+
// exclude: ['dist', 'examples', 'playground', 'test/fixture'],
|
|
718
|
+
include: [...include],
|
|
719
|
+
exclude: [...exclude]
|
|
720
|
+
});
|
|
721
|
+
}
|
|
714
722
|
tsConfig.compilerOptions ||= {};
|
|
715
723
|
tsConfig.compilerOptions.paths ||= {};
|
|
716
724
|
tsConfig.include ||= [];
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1035,7 +1035,7 @@ interface SilgiConfig extends Partial<Omit<Silgi, 'options'>>, Partial<SilgiRunt
|
|
|
1035
1035
|
options: DeepPartial<SilgiOptions>;
|
|
1036
1036
|
}
|
|
1037
1037
|
interface BuildSilgi {
|
|
1038
|
-
framework
|
|
1038
|
+
framework?: {
|
|
1039
1039
|
nitro?: NitroApp;
|
|
1040
1040
|
};
|
|
1041
1041
|
modules?: Partial<SilgiRuntimeOptions>;
|