@tsed/cli 7.3.2 → 7.3.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.
@@ -265,7 +265,7 @@ export class InitCmd {
265
265
  const runtimes = inject(RuntimesModule);
266
266
  const runtime = runtimes.get();
267
267
  // files with higher priority
268
- const promises = [
268
+ const files = [
269
269
  "tsconfig.base.json",
270
270
  "tsconfig.json",
271
271
  "tsconfig.spec.json",
@@ -287,10 +287,12 @@ export class InitCmd {
287
287
  `pm2.${pm2}`,
288
288
  "/views/home.ejs",
289
289
  ...runtime.files()
290
- ].map((id) => {
291
- return id && render(id, ctx);
292
- });
293
- await Promise.all(promises);
290
+ ];
291
+ for (const id of files) {
292
+ if (id) {
293
+ await render(id, ctx);
294
+ }
295
+ }
294
296
  }
295
297
  async renderFiles(ctx) {
296
298
  // base files
@@ -299,28 +301,26 @@ export class InitCmd {
299
301
  taskOutput(`Base files rendered (${Date.now() - startTime}ms)`);
300
302
  const files = await $asyncAlter("$alterRenderFiles", [], [ctx]);
301
303
  startTime = Date.now();
302
- const promises = files.map((option) => {
304
+ for (const option of files) {
303
305
  if (!option) {
304
- return;
306
+ continue;
305
307
  }
306
308
  if (isString(option)) {
307
309
  const [id, name] = option.split(":");
308
- return render(id, {
310
+ await render(id, {
309
311
  ...ctx,
310
312
  from: TEMPLATE_DIR,
311
313
  name: name || id
312
314
  });
315
+ continue;
313
316
  }
314
- else {
315
- if ("id" in option) {
316
- return render(option.id, {
317
- ...ctx,
318
- ...option
319
- });
320
- }
317
+ if ("id" in option) {
318
+ await render(option.id, {
319
+ ...ctx,
320
+ ...option
321
+ });
321
322
  }
322
- });
323
- await Promise.all(promises);
323
+ }
324
324
  taskOutput(`Plugins files rendered (${Date.now() - startTime}ms)`);
325
325
  }
326
326
  $onFinish(data, er) {