@saacms/cli 0.1.1 → 0.1.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.
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA6HH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;EA0HtB,CAAA"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA4IH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;EA0HtB,CAAA"}
package/dist/main.js CHANGED
@@ -12,6 +12,7 @@ import {
12
12
  readFileSync,
13
13
  writeFileSync
14
14
  } from "node:fs";
15
+ import { createRequire } from "node:module";
15
16
  import { basename, dirname, join, resolve } from "node:path";
16
17
  import { fileURLToPath } from "node:url";
17
18
  var ASTRO_CONFIG_FILES = [
@@ -59,10 +60,11 @@ function detectHost(cwd) {
59
60
  }
60
61
  function locateApiMountTemplate(cwd) {
61
62
  const here = dirname(fileURLToPath(import.meta.url));
62
- const candidates = [
63
- resolve(here, "..", "..", "..", "host-astro", "templates", "api-mount.ts.txt"),
64
- resolve(cwd, "packages", "host-astro", "templates", "api-mount.ts.txt")
65
- ];
63
+ const candidates = [];
64
+ try {
65
+ candidates.push(createRequire(import.meta.url).resolve("@saacms/host-astro/templates/api-mount.ts.txt"));
66
+ } catch {}
67
+ candidates.push(resolve(here, "..", "..", "..", "host-astro", "templates", "api-mount.ts.txt"), resolve(cwd, "packages", "host-astro", "templates", "api-mount.ts.txt"));
66
68
  for (const candidate of candidates) {
67
69
  if (existsSync(candidate))
68
70
  return candidate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saacms/cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "main": "./dist/main.js",
6
6
  "bin": {
@@ -21,7 +21,7 @@
21
21
  "access": "public"
22
22
  },
23
23
  "dependencies": {
24
- "@saacms/core": "workspace:*",
24
+ "@saacms/core": "0.1.3",
25
25
  "citty": "^0.1.6"
26
26
  },
27
27
  "devDependencies": {