@replayci/replay 0.1.1 → 0.1.2

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/index.cjs CHANGED
@@ -1593,17 +1593,29 @@ function loadContractsFromPaths(inputs) {
1593
1593
  );
1594
1594
  }
1595
1595
  });
1596
- return contractFiles.map((contractFile) => {
1596
+ const loaded = [];
1597
+ for (const contractFile of contractFiles) {
1597
1598
  const contractPath = (0, import_node_path.relative)(repoRoot, contractFile);
1598
- const contract = (0, import_contracts_core2.loadContractSync)({
1599
- repoRoot,
1600
- contractPath
1601
- });
1602
- return normalizeInlineContract({
1603
- ...contract,
1604
- contract_file: contractFile
1605
- });
1606
- });
1599
+ try {
1600
+ const contract = (0, import_contracts_core2.loadContractSync)({
1601
+ repoRoot,
1602
+ contractPath
1603
+ });
1604
+ loaded.push(normalizeInlineContract({
1605
+ ...contract,
1606
+ contract_file: contractFile
1607
+ }));
1608
+ } catch (error) {
1609
+ const msg = error instanceof Error ? error.message : String(error);
1610
+ if (msg.startsWith("ContractMissingTool:")) {
1611
+ continue;
1612
+ }
1613
+ throw new ReplayConfigurationError(
1614
+ `Failed to parse contract "${contractPath}": ${msg}`
1615
+ );
1616
+ }
1617
+ }
1618
+ return loaded;
1607
1619
  }
1608
1620
  function collectContractFiles(inputPath) {
1609
1621
  const stat = (0, import_node_fs.statSync)(inputPath);
package/dist/index.js CHANGED
@@ -1581,17 +1581,29 @@ function loadContractsFromPaths(inputs) {
1581
1581
  );
1582
1582
  }
1583
1583
  });
1584
- return contractFiles.map((contractFile) => {
1584
+ const loaded = [];
1585
+ for (const contractFile of contractFiles) {
1585
1586
  const contractPath = relative(repoRoot, contractFile);
1586
- const contract = loadContractSync({
1587
- repoRoot,
1588
- contractPath
1589
- });
1590
- return normalizeInlineContract({
1591
- ...contract,
1592
- contract_file: contractFile
1593
- });
1594
- });
1587
+ try {
1588
+ const contract = loadContractSync({
1589
+ repoRoot,
1590
+ contractPath
1591
+ });
1592
+ loaded.push(normalizeInlineContract({
1593
+ ...contract,
1594
+ contract_file: contractFile
1595
+ }));
1596
+ } catch (error) {
1597
+ const msg = error instanceof Error ? error.message : String(error);
1598
+ if (msg.startsWith("ContractMissingTool:")) {
1599
+ continue;
1600
+ }
1601
+ throw new ReplayConfigurationError(
1602
+ `Failed to parse contract "${contractPath}": ${msg}`
1603
+ );
1604
+ }
1605
+ }
1606
+ return loaded;
1595
1607
  }
1596
1608
  function collectContractFiles(inputPath) {
1597
1609
  const stat = statSync(inputPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replayci/replay",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "ReplayCI SDK for deterministic tool-call validation and observation.",
5
5
  "license": "ISC",
6
6
  "author": "ReplayCI",