@igniter-js/cli 0.4.9 → 0.4.92

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/index.mjs CHANGED
@@ -94,10 +94,10 @@ import { execa } from "execa";
94
94
  import { existsSync } from "fs";
95
95
  import { readFile, writeFile } from "fs/promises";
96
96
  import { join as join2 } from "path";
97
- import * as handlebars2 from "handlebars";
97
+ import handlebars2 from "handlebars";
98
98
 
99
99
  // src/core/handlebars-helpers.ts
100
- import * as handlebars from "handlebars";
100
+ import handlebars from "handlebars";
101
101
  function registerHandlebarsHelpers() {
102
102
  handlebars.registerHelper("includes", function(array, value) {
103
103
  if (!Array.isArray(array)) {
@@ -676,7 +676,7 @@ import path4 from "path";
676
676
  import { readFile as readFile2, writeFile as writeFile2 } from "fs/promises";
677
677
  import { existsSync as existsSync2 } from "fs";
678
678
  import { join as join3 } from "path";
679
- import * as handlebars3 from "handlebars";
679
+ import handlebars3 from "handlebars";
680
680
  var BaseAddOn = class {
681
681
  async runSetup(projectDir, config) {
682
682
  await this.addToPackageJson(projectDir, config);
@@ -2302,7 +2302,7 @@ import { writeFile as writeFile5 } from "fs/promises";
2302
2302
  import { mkdirSync, existsSync as existsSync3 } from "fs";
2303
2303
  import { readFile as readFile3, writeFile as writeFile3 } from "fs/promises";
2304
2304
  import * as path14 from "path";
2305
- import * as handlebars4 from "handlebars/runtime";
2305
+ import handlebars4 from "handlebars";
2306
2306
  import { fileURLToPath } from "url";
2307
2307
  var __filename = fileURLToPath(import.meta?.url);
2308
2308
  var __dirname = path14.dirname(__filename);
@@ -3331,7 +3331,6 @@ import { Command as Command4 } from "commander";
3331
3331
  // src/commands/generate/schema/action.ts
3332
3332
  import * as fs6 from "fs";
3333
3333
  import * as path20 from "path";
3334
- import * as handlebars5 from "handlebars";
3335
3334
  import * as p10 from "@clack/prompts";
3336
3335
  async function generateSchemaWatchMode(routerPath, outputPath) {
3337
3336
  const startTime = Date.now();
@@ -3340,9 +3339,7 @@ async function generateSchemaWatchMode(routerPath, outputPath) {
3340
3339
  const { schema, stats } = routerInstrospector.introspectRouter(router);
3341
3340
  const templateEngine = TemplateEngine.create();
3342
3341
  const templatePath = templateEngine.resolvePath("scaffold", "igniter.schema.hbs");
3343
- const templateSource = fs6.readFileSync(templatePath, "utf8");
3344
- const template = handlebars5.compile(templateSource);
3345
- const schemaContent = template({
3342
+ const schemaContent = await templateEngine.render(templatePath, {
3346
3343
  generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
3347
3344
  schemaString: JSON.stringify(schema, null, 2)
3348
3345
  });