@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.
- package/dist/projetoOrigens.js +8 -2
- package/package.json +1 -1
package/dist/projetoOrigens.js
CHANGED
|
@@ -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
|
-
|
|
56
|
-
|
|
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