@igniter-js/cli 0.4.8 → 0.4.91
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 +1 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -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
|
|
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
|
});
|