silgi 0.7.23 → 0.7.25
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/_chunks/index.mjs +1 -1
- package/dist/cli/prepare.mjs +22 -4
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/types/index.d.mts +4 -0
- package/dist/types/index.d.ts +4 -0
- package/package.json +2 -1
package/dist/_chunks/index.mjs
CHANGED
package/dist/cli/prepare.mjs
CHANGED
|
@@ -576,6 +576,14 @@ async function silgiCoreFile(data, frameworkContext, silgi) {
|
|
|
576
576
|
"#silgi/vfs": {
|
|
577
577
|
import: [],
|
|
578
578
|
from: "./vfs"
|
|
579
|
+
},
|
|
580
|
+
"@fastify/deepmerge": {
|
|
581
|
+
import: [
|
|
582
|
+
{
|
|
583
|
+
name: "deepmerge"
|
|
584
|
+
}
|
|
585
|
+
],
|
|
586
|
+
from: "@fastify/deepmerge"
|
|
579
587
|
}
|
|
580
588
|
};
|
|
581
589
|
importItems = { ...data._importItems, ...importItems };
|
|
@@ -597,6 +605,7 @@ async function silgiCoreFile(data, frameworkContext, silgi) {
|
|
|
597
605
|
const shareds = [];
|
|
598
606
|
const schemas = [];
|
|
599
607
|
const buildSilgiExtraContent = [];
|
|
608
|
+
const beforeBuildSilgiExtraContent = [];
|
|
600
609
|
const _silgiOptions = {};
|
|
601
610
|
const _silgiConfigs = [];
|
|
602
611
|
for (const module of silgi.scanModules) {
|
|
@@ -612,6 +621,7 @@ async function silgiCoreFile(data, frameworkContext, silgi) {
|
|
|
612
621
|
shareds,
|
|
613
622
|
schemas,
|
|
614
623
|
buildSilgiExtraContent,
|
|
624
|
+
beforeBuildSilgiExtraContent,
|
|
615
625
|
_silgiOptions,
|
|
616
626
|
_silgiConfigs
|
|
617
627
|
});
|
|
@@ -642,6 +652,9 @@ async function silgiCoreFile(data, frameworkContext, silgi) {
|
|
|
642
652
|
""
|
|
643
653
|
];
|
|
644
654
|
const importData = [
|
|
655
|
+
"",
|
|
656
|
+
"const mergeDeep = deepmerge({ all: true })",
|
|
657
|
+
"",
|
|
645
658
|
"export const uris = {}",
|
|
646
659
|
"",
|
|
647
660
|
"export const modulesURIs = {}",
|
|
@@ -666,7 +679,12 @@ async function silgiCoreFile(data, frameworkContext, silgi) {
|
|
|
666
679
|
"",
|
|
667
680
|
`export const _silgiOptions: DeepPartial<SilgiRuntimeOptions> = ${JSON.stringify(_silgiOptions, null, 2)}`,
|
|
668
681
|
"",
|
|
669
|
-
"export async function buildSilgi(framework: FrameworkContext, moduleOptions?: Partial<SilgiRuntimeOptions>,buildOptions?: Partial<BuildConfig
|
|
682
|
+
"export async function buildSilgi(framework: FrameworkContext, moduleOptions?: Partial<SilgiRuntimeOptions>,buildOptions?: Partial<BuildConfig>) {",
|
|
683
|
+
"",
|
|
684
|
+
beforeBuildSilgiExtraContent.length > 0 ? beforeBuildSilgiExtraContent.map(({ value, type }) => {
|
|
685
|
+
return type === "function" ? value : `const ${value}`;
|
|
686
|
+
}) : "",
|
|
687
|
+
"",
|
|
670
688
|
" const silgi = await createSilgi({",
|
|
671
689
|
" framework,",
|
|
672
690
|
" shared: shareds as any,",
|
|
@@ -677,11 +695,11 @@ async function silgiCoreFile(data, frameworkContext, silgi) {
|
|
|
677
695
|
` plugins: [${plugins.join(", ")}],`,
|
|
678
696
|
_silgiConfigs.length > 0 ? ` ${_silgiConfigs.map((config) => typeof config === "string" ? config : typeof config === "object" ? Object.entries(config).map(([key, value]) => `${key}: ${value}`).join(",\n ") : "").join(",\n ")},` : "",
|
|
679
697
|
" ...buildOptions,",
|
|
680
|
-
" options: {",
|
|
698
|
+
" options: mergeDeep({",
|
|
681
699
|
` present: '${silgi.options.preset}',`,
|
|
682
|
-
" ..._silgiOptions,",
|
|
683
700
|
" ...moduleOptions,",
|
|
684
|
-
"
|
|
701
|
+
" ..._silgiOptions",
|
|
702
|
+
" }),",
|
|
685
703
|
" })",
|
|
686
704
|
"",
|
|
687
705
|
...frameworkContext,
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED
package/dist/types/index.d.mts
CHANGED
|
@@ -312,6 +312,10 @@ interface SilgiCLIHooks extends SilgiHooks {
|
|
|
312
312
|
shareds: string[];
|
|
313
313
|
schemas: string[];
|
|
314
314
|
buildSilgiExtraContent: string[];
|
|
315
|
+
beforeBuildSilgiExtraContent: {
|
|
316
|
+
value: string;
|
|
317
|
+
type: 'function' | 'variable';
|
|
318
|
+
}[];
|
|
315
319
|
_silgiOptions: {
|
|
316
320
|
[key: string]: any;
|
|
317
321
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -312,6 +312,10 @@ interface SilgiCLIHooks extends SilgiHooks {
|
|
|
312
312
|
shareds: string[];
|
|
313
313
|
schemas: string[];
|
|
314
314
|
buildSilgiExtraContent: string[];
|
|
315
|
+
beforeBuildSilgiExtraContent: {
|
|
316
|
+
value: string;
|
|
317
|
+
type: 'function' | 'variable';
|
|
318
|
+
}[];
|
|
315
319
|
_silgiOptions: {
|
|
316
320
|
[key: string]: any;
|
|
317
321
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "silgi",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.25",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"exports": {
|
|
@@ -109,6 +109,7 @@
|
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
"dependencies": {
|
|
112
|
+
"@fastify/deepmerge": "^2.0.2",
|
|
112
113
|
"@oxc-parser/wasm": "^0.49.0",
|
|
113
114
|
"@standard-schema/spec": "^1.0.0",
|
|
114
115
|
"c12": "^2.0.1",
|