@brunoluizdesiqueira/bbuilder-cli 1.0.13 → 1.0.15

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.
@@ -101,9 +101,8 @@ async function getDelphiEnvironment(delphiDir) {
101
101
  }
102
102
  try {
103
103
  const command = `call "${rsvarsPath}" >nul && set`;
104
- const result = await execa_1.default.command(command, {
104
+ const result = await (0, execa_1.default)('cmd.exe', ['/d', '/c', command], {
105
105
  env: process.env,
106
- shell: 'cmd.exe',
107
106
  });
108
107
  const resolved = {
109
108
  ...process.env,
@@ -51,7 +51,7 @@ async function executeBuild(opts) {
51
51
  const oldRes = path.win32.join(workspaceDir, `${projectName}.res`);
52
52
  if (fs.existsSync(oldRes))
53
53
  fs.unlinkSync(oldRes);
54
- const resFile = await (0, output_1.withProgress)(2, totalStages, 'Compilando recursos nativos', () => (0, compiler_1.runCgrc)(opts, projectName));
54
+ const resFile = await (0, output_1.withProgress)(2, totalStages, 'Compilando recursos nativos', () => (0, compiler_1.runCgrc)(opts, projectName), { streamingOutput: true });
55
55
  await (0, output_1.withProgress)(3, totalStages, 'Sincronizando recurso final no projeto', () => {
56
56
  fs.copyFileSync(resFile, path.win32.join(workspaceDir, `${projectName}.res`));
57
57
  });
package/dist/ui/output.js CHANGED
@@ -171,21 +171,13 @@ async function withProgress(stage, total, label, task, options) {
171
171
  drawProgressLine(renderProgressLine(stage, total, label, startTime, frameIndex));
172
172
  rendered = true;
173
173
  };
174
- const startTimer = () => {
175
- if (timer)
176
- return;
177
- timer = setInterval(() => {
178
- frameIndex += 1;
179
- render();
180
- }, 120);
181
- };
182
- const initialDelay = setTimeout(() => {
174
+ render();
175
+ timer = setInterval(() => {
176
+ frameIndex += 1;
183
177
  render();
184
- startTimer();
185
- }, 180);
178
+ }, 120);
186
179
  try {
187
180
  const result = await task();
188
- clearTimeout(initialDelay);
189
181
  if (timer)
190
182
  clearInterval(timer);
191
183
  if (rendered)
@@ -194,7 +186,6 @@ async function withProgress(stage, total, label, task, options) {
194
186
  return result;
195
187
  }
196
188
  catch (error) {
197
- clearTimeout(initialDelay);
198
189
  if (timer)
199
190
  clearInterval(timer);
200
191
  if (rendered)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brunoluizdesiqueira/bbuilder-cli",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "CLI de build local para projetos Delphi do Bimer",
5
5
  "license": "ISC",
6
6
  "repository": {