@brunoluizdesiqueira/bbuilder-cli 1.0.2 → 1.0.3
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/README.md +32 -0
- package/dist/build/compiler.js +4 -1
- package/dist/diagnostics/doctor.js +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -100,6 +100,38 @@ npm run version-packages
|
|
|
100
100
|
npm run release
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
+
### Troubleshooting do publish automático
|
|
104
|
+
|
|
105
|
+
Se a PR de release for mergeada, a versão subir para o `package.json`, mas o publish no npm falhar com erro parecido com:
|
|
106
|
+
|
|
107
|
+
```text
|
|
108
|
+
E404 Not Found - PUT https://registry.npmjs.org/@brunoluizdesiqueira%2fbbuilder-cli - Not found
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
verifique estes pontos:
|
|
112
|
+
|
|
113
|
+
1. o Trusted Publisher do pacote está configurado para:
|
|
114
|
+
- owner/user: `brunoluizdesiqueira`
|
|
115
|
+
- repository: `b-cli`
|
|
116
|
+
- workflow: `release.yml`
|
|
117
|
+
2. o repositório GitHub é público
|
|
118
|
+
3. o workflow `Release` tem `permissions.id-token: write`
|
|
119
|
+
4. o workflow roda com Node e npm atuais
|
|
120
|
+
|
|
121
|
+
O ajuste que resolveu esse cenário neste projeto foi:
|
|
122
|
+
|
|
123
|
+
- usar `actions/setup-node@v5`
|
|
124
|
+
- executar o workflow com Node `24`
|
|
125
|
+
- atualizar o npm antes do publish
|
|
126
|
+
- definir no `package.json`:
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
"publishConfig": {
|
|
130
|
+
"access": "public",
|
|
131
|
+
"provenance": true
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
103
135
|
## CI/CD
|
|
104
136
|
|
|
105
137
|
O repositório agora está preparado com GitHub Actions:
|
package/dist/build/compiler.js
CHANGED
|
@@ -70,7 +70,10 @@ function buildCompilerFlags(buildType) {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
function buildDependencies(opts) {
|
|
73
|
-
|
|
73
|
+
// execa passes each compiler switch as a single argv entry, so we should
|
|
74
|
+
// not embed quotes inside the semicolon-separated list. Doing that can make
|
|
75
|
+
// dcc64 fail to resolve paths such as the Delphi runtime library.
|
|
76
|
+
return opts.dependencyPaths.join(';');
|
|
74
77
|
}
|
|
75
78
|
async function runCgrc(opts, projectName) {
|
|
76
79
|
const tempDir = path.join(os.tmpdir(), `BimerBuild_${projectName}`);
|
|
@@ -62,9 +62,11 @@ function runDoctor(config, resolvedConfigPath) {
|
|
|
62
62
|
const checks = [];
|
|
63
63
|
const cgrcPath = path.win32.join(config.delphiDir, 'bin', 'cgrc.exe');
|
|
64
64
|
const dcc64Path = path.win32.join(config.delphiDir, 'bin', 'dcc64.exe');
|
|
65
|
+
const delphiRuntimePath = path.win32.join(config.delphiDir, 'lib', 'Win64', 'release');
|
|
65
66
|
checks.push(checkFile('Arquivo de configuração em uso', resolvedConfigPath));
|
|
66
67
|
checks.push(checkPath('repoBase', config.repoBase));
|
|
67
68
|
checks.push(checkPath('delphiDir', config.delphiDir));
|
|
69
|
+
checks.push(checkPath('Delphi runtime Win64', delphiRuntimePath));
|
|
68
70
|
checks.push(checkPath('libRoot', config.libRoot));
|
|
69
71
|
checks.push(checkPath('libErp', config.libErp));
|
|
70
72
|
checks.push(checkPath('libAlterdata', config.libAlterdata));
|
|
@@ -81,6 +83,11 @@ function runDoctor(config, resolvedConfigPath) {
|
|
|
81
83
|
ok: Array.isArray(config.dependencyPaths) && config.dependencyPaths.length > 0,
|
|
82
84
|
detail: `${config.dependencyPaths.length} path(s)`,
|
|
83
85
|
});
|
|
86
|
+
checks.push({
|
|
87
|
+
label: 'Delphi runtime presente em dependencyPaths',
|
|
88
|
+
ok: config.dependencyPaths.includes(delphiRuntimePath),
|
|
89
|
+
detail: delphiRuntimePath,
|
|
90
|
+
});
|
|
84
91
|
console.log('');
|
|
85
92
|
console.log(chalk_1.default.cyan(' Diagnóstico do Ambiente'));
|
|
86
93
|
console.log(chalk_1.default.blue(' ───────────────────────'));
|