silgi 0.37.9 → 0.37.10

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.
@@ -575,6 +575,8 @@ function resolveGroupSyntax(group) {
575
575
  return groups;
576
576
  }
577
577
 
578
+ const DEFAULT_FUNCTION_EXPORT_NAMES = ["createSchema", "createService", "createRoute", "createShared"];
579
+ const DEFAULT_INTERFACE_EXTENDS_NAMES = ["ExtendShared", "ExtendContext"];
578
580
  function generateUniqueIdentifier(filePath, exportName) {
579
581
  const fileBaseName = basename(filePath);
580
582
  const uniqueString = `${fileBaseName}${exportName}`;
@@ -700,7 +702,7 @@ async function verifyDirectoryCaseSensitivity(directoryPath, rootDirectory) {
700
702
  } catch {
701
703
  }
702
704
  }
703
- async function extractExportEntitiesFromFile(absoluteFilePath, functionExportNames = ["createSchema", "createService", "createRoute", "createShared"], interfaceExtendsNames = ["ExtendShared", "ExtendContext"]) {
705
+ async function extractExportEntitiesFromFile(absoluteFilePath, functionExportNames = DEFAULT_FUNCTION_EXPORT_NAMES, interfaceExtendsNames = DEFAULT_INTERFACE_EXTENDS_NAMES) {
704
706
  const exportEntities = [];
705
707
  const fileContent = await readFile(absoluteFilePath, "utf-8");
706
708
  const parsed = await parseAsync(absoluteFilePath, fileContent);
@@ -741,8 +743,8 @@ async function scanSilgiExports(path, packageName, silgiInstance = useSilgiCLI()
741
743
  const processedFilePaths = /* @__PURE__ */ new Set();
742
744
  const alreadyScannedPaths = [];
743
745
  const serverDirectory = path || silgiInstance.options.serverDir;
744
- const functionExportNames = scanOptions.functionExportNames ?? ["createSchema", "createService", "createRoute"];
745
- const interfaceExtendsNames = scanOptions.interfaceExtendsNames ?? ["ExtendShared", "ExtendContext"];
746
+ const functionExportNames = scanOptions.functionExportNames ?? DEFAULT_FUNCTION_EXPORT_NAMES;
747
+ const interfaceExtendsNames = scanOptions.interfaceExtendsNames ?? DEFAULT_INTERFACE_EXTENDS_NAMES;
746
748
  const functionExportCategories = {};
747
749
  functionExportNames.forEach((name) => {
748
750
  if (name === "createService")
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
 
4
- const version = "0.37.9";
4
+ const version = "0.37.10";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.37.9",
4
+ "version": "0.37.10",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {