@semacode/cli 3.8.0 → 3.8.1

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.
@@ -52,8 +52,14 @@ async function resolverDiretoriosConfiguradosConfinados(baseProjeto, baseConfigu
52
52
  let canonico = absoluto;
53
53
  try {
54
54
  const [real, informacao] = await Promise.all([realpath(absoluto), stat(absoluto)]);
55
- if (!informacao.isDirectory()) {
56
- throw new Error(`${identificadorSeguro} nao e diretorio`);
55
+ const ehContratoIndividual = campo === "origens"
56
+ && informacao.isFile()
57
+ && absoluto.toLowerCase().endsWith(".sema");
58
+ if (!informacao.isDirectory() && !ehContratoIndividual) {
59
+ const esperado = campo === "origens"
60
+ ? "um diretorio de contratos (ex.: ./contratos) ou um arquivo .sema individual"
61
+ : "um diretorio de codigo vivo";
62
+ throw new Error(`${identificadorSeguro} nao e ${esperado}. Corrija "${campo}" no sema.config.json; configuracoes geradas por versoes antigas da CLI podem listar arquivos direto.`);
57
63
  }
58
64
  if (!caminhoEstaDentro(baseReal, real)) {
59
65
  throw new Error(`${identificadorSeguro} resolve fora da base do projeto`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semacode/cli",
3
- "version": "3.8.0",
3
+ "version": "3.8.1",
4
4
  "description": "Codex-native local semantic governance CLI for contracts, drift, impact, documentation gates, and code generation.",
5
5
  "type": "module",
6
6
  "icon": "logo.png",