@atomservice/cli 0.1.9 → 0.1.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomservice/cli",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "atomservice 命令行工具(atom):init / run / add / service",
5
5
  "type": "module",
6
6
  "author": "openorson",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@clack/prompts": "1.5.0",
33
- "@atomservice/core": "0.1.9",
33
+ "@atomservice/core": "0.1.11",
34
34
  "citty": "0.2.2",
35
35
  "cli-table3": "0.6.5",
36
36
  "log-update": "8.0.0",
package/src/cli.core.ts CHANGED
@@ -1,7 +1,12 @@
1
+ import os from "node:os"
2
+ import path from "node:path"
3
+
4
+ const ATOMSERVICE_DIR = path.join(os.homedir(), ".atomservice")
5
+
1
6
  export async function resolveLocalCore(): Promise<typeof import("@atomservice/core")> {
2
7
  try {
3
- const url = import.meta.resolve("@atomservice/core", `file://${process.cwd()}/`)
4
- return (await import(url)) as typeof import("@atomservice/core")
8
+ const localPath = `file://${ATOMSERVICE_DIR}/node_modules/@atomservice/core/src/index.ts`
9
+ return (await import(localPath)) as typeof import("@atomservice/core")
5
10
  } catch {
6
11
  return import("@atomservice/core")
7
12
  }
@@ -57,7 +57,6 @@ export const initCmd = defineCommand({
57
57
  const content = `import { defineConfig } from "@atomservice/core"
58
58
 
59
59
  export default defineConfig({
60
- root: "${ATOMSERVICE_DIR}",
61
60
  services: [],
62
61
  })
63
62
  `