silgi 0.7.22 → 0.7.24

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.7.22";
1
+ const version = "0.7.24";
2
2
  const packageJson = {
3
3
  version: version};
4
4
 
@@ -305,21 +305,21 @@ function scanActionModulesUris(silgi, obj, currentPath = []) {
305
305
  if (path.length === 4) {
306
306
  const basePath = path.join("/");
307
307
  let moduleName = "";
308
- if (node.modules?.yoga) {
309
- let rootFieldName = null;
310
- if (node.modules?.yoga?.rootFieldName) {
311
- moduleName = "yoga";
312
- rootFieldName = node.modules?.yoga?.rootFieldName;
308
+ if (node.modules?.graphql) {
309
+ let field = null;
310
+ if (node.modules?.graphql?.field) {
311
+ moduleName = "graphql";
312
+ field = node.modules?.graphql?.field;
313
313
  }
314
- if (!rootFieldName) {
314
+ if (!field) {
315
315
  return;
316
316
  }
317
317
  uriMap[moduleName] ??= {};
318
- if (uriMap[moduleName].rootFieldName) {
319
- silgi.logger.withTag("scanActionModulesUris").error(`Hata ${moduleName} ${rootFieldName} ${basePath} bu zaten burada kullanilmis.`);
318
+ if (typeof uriMap[moduleName].field === "object" && uriMap[moduleName].field[field]) {
319
+ silgi.logger.withTag("scanActionModulesUris").error(`Hata ${moduleName} ${field} ${basePath} bu zaten burada kullanilmis.`);
320
320
  }
321
- uriMap[moduleName].rootFieldName ??= {};
322
- uriMap[moduleName].rootFieldName[rootFieldName] = basePath;
321
+ uriMap[moduleName].field ??= {};
322
+ uriMap[moduleName].field[field] = basePath;
323
323
  }
324
324
  return;
325
325
  }
@@ -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 };
@@ -642,6 +650,9 @@ async function silgiCoreFile(data, frameworkContext, silgi) {
642
650
  ""
643
651
  ];
644
652
  const importData = [
653
+ "",
654
+ "const mergeDeep = deepmerge({ all: true })",
655
+ "",
645
656
  "export const uris = {}",
646
657
  "",
647
658
  "export const modulesURIs = {}",
@@ -666,7 +677,8 @@ async function silgiCoreFile(data, frameworkContext, silgi) {
666
677
  "",
667
678
  `export const _silgiOptions: DeepPartial<SilgiRuntimeOptions> = ${JSON.stringify(_silgiOptions, null, 2)}`,
668
679
  "",
669
- "export async function buildSilgi(framework: FrameworkContext, moduleOptions?: Partial<SilgiRuntimeOptions>,buildOptions?: Partial<BuildConfig>, ) {",
680
+ "export async function buildSilgi(framework: FrameworkContext, moduleOptions?: Partial<SilgiRuntimeOptions>,buildOptions?: Partial<BuildConfig>) {",
681
+ "",
670
682
  " const silgi = await createSilgi({",
671
683
  " framework,",
672
684
  " shared: shareds as any,",
@@ -677,11 +689,11 @@ async function silgiCoreFile(data, frameworkContext, silgi) {
677
689
  ` plugins: [${plugins.join(", ")}],`,
678
690
  _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
691
  " ...buildOptions,",
680
- " options: {",
692
+ " options: mergeDeep({",
681
693
  ` present: '${silgi.options.preset}',`,
682
- " ..._silgiOptions,",
683
694
  " ...moduleOptions,",
684
- " },",
695
+ " ..._silgiOptions",
696
+ " }),",
685
697
  " })",
686
698
  "",
687
699
  ...frameworkContext,
@@ -1,3 +1,3 @@
1
- const version = "0.7.22";
1
+ const version = "0.7.24";
2
2
 
3
3
  export { version };
@@ -1,3 +1,3 @@
1
- const version = "0.7.22";
1
+ const version = "0.7.24";
2
2
 
3
3
  export { version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.7.22",
4
+ "version": "0.7.24",
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",