silgi 0.41.46 → 0.41.47

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.
@@ -1587,7 +1587,23 @@ async function generateApp(app, options = {}) {
1587
1587
  const dirs = /* @__PURE__ */ new Set();
1588
1588
  const changedTemplates = [];
1589
1589
  async function processTemplate(template) {
1590
- const dir = template.where === ".silgi" ? app.options.build.dir : template.where === "server" ? app.options.silgi.serverDir : template.where === "client" ? app.options.silgi.clientDir : app.options.silgi.vfsDir;
1590
+ let dir;
1591
+ switch (template.where) {
1592
+ case ".silgi":
1593
+ dir = app.options.build.dir;
1594
+ break;
1595
+ case "server":
1596
+ dir = app.options.silgi.serverDir;
1597
+ break;
1598
+ case "client":
1599
+ dir = app.options.silgi.clientDir;
1600
+ break;
1601
+ case "root":
1602
+ dir = app.options.rootDir;
1603
+ break;
1604
+ default:
1605
+ dir = app.options.silgi.vfsDir;
1606
+ }
1591
1607
  const fullPath = template.dst || resolve(dir, template.filename);
1592
1608
  const start = performance.now();
1593
1609
  const contents = await compileTemplate(template, templateContext).catch((e) => {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
 
4
- const version = "0.41.46";
4
+ const version = "0.41.47";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -959,7 +959,7 @@ function normalizeTemplate(template, buildDir) {
959
959
  dir = silgi.options.rootDir;
960
960
  break;
961
961
  default:
962
- dir = silgi.options.rootDir;
962
+ dir = silgi.options.silgi.serverDir;
963
963
  }
964
964
  template.dst = resolve(buildDir ?? dir, template.filename);
965
965
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.41.46",
4
+ "version": "0.41.47",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {