silgi 0.37.8 → 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.
- package/dist/cli/build.mjs +5 -3
- package/dist/cli/index.mjs +1 -1
- package/package.json +1 -1
package/dist/cli/build.mjs
CHANGED
|
@@ -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 =
|
|
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 ??
|
|
745
|
-
const interfaceExtendsNames = scanOptions.interfaceExtendsNames ??
|
|
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")
|
package/dist/cli/index.mjs
CHANGED