@spfn/core 0.1.0-alpha.72 → 0.1.0-alpha.74
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/codegen/index.js
CHANGED
|
@@ -924,14 +924,20 @@ var CodegenOrchestrator = class {
|
|
|
924
924
|
});
|
|
925
925
|
}
|
|
926
926
|
};
|
|
927
|
+
var scannerLogger = logger.child("contract-scanner");
|
|
927
928
|
async function scanContracts(contractsDir, packagePrefix) {
|
|
929
|
+
scannerLogger.debug("Starting contract scan", { contractsDir, packagePrefix });
|
|
928
930
|
const contractFiles = await scanContractFiles(contractsDir);
|
|
931
|
+
scannerLogger.debug("Found contract files", { count: contractFiles.length, files: contractFiles });
|
|
929
932
|
const mappings = [];
|
|
930
933
|
for (let i = 0; i < contractFiles.length; i++) {
|
|
931
934
|
const filePath = contractFiles[i];
|
|
935
|
+
scannerLogger.debug("Extracting contracts from file", { filePath });
|
|
932
936
|
const exports = extractContractExports(filePath);
|
|
937
|
+
scannerLogger.debug("Extracted contracts", { filePath, count: exports.length, contracts: exports.map((e) => e.name) });
|
|
933
938
|
for (let j = 0; j < exports.length; j++) {
|
|
934
939
|
const contractExport = exports[j];
|
|
940
|
+
scannerLogger.debug("Processing contract", { name: contractExport.name, method: contractExport.method, path: contractExport.path });
|
|
935
941
|
if (!contractExport.path.startsWith("/")) {
|
|
936
942
|
throw new Error(
|
|
937
943
|
`Contract '${contractExport.name}' in ${filePath} must use absolute path. Found: '${contractExport.path}'. Use '/your-path' instead.`
|
|
@@ -955,6 +961,7 @@ async function scanContracts(contractsDir, packagePrefix) {
|
|
|
955
961
|
});
|
|
956
962
|
}
|
|
957
963
|
}
|
|
964
|
+
scannerLogger.info("Contract scan completed", { totalMappings: mappings.length });
|
|
958
965
|
return mappings;
|
|
959
966
|
}
|
|
960
967
|
async function scanContractFiles(dir, files = []) {
|