@done-coding/cli-inject 0.1.1 → 0.2.2

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/es/handler.mjs CHANGED
@@ -7,9 +7,9 @@ import e from "chalk";
7
7
  const P = async (a) => {
8
8
  const { sourceJsonFilePath: c, injectKeyPath: g, injectInfoFilePath: l } = a, i = process.cwd();
9
9
  if (!c.endsWith(".json"))
10
- return console.log(e.red("源文件必须是json格式")), process.exit(1);
10
+ return console.log(e.red("源文件必须是json")), process.exit(1);
11
11
  if (!l.endsWith(".json"))
12
- return console.log(e.red("注入文件必须是json格式")), process.exit(1);
12
+ return console.log(e.red("注入文件必须是json")), process.exit(1);
13
13
  const h = u.resolve(i, c), p = JSON.parse(
14
14
  r.readFileSync(h, "utf-8")
15
15
  ), s = g.reduce((n, f) => (j(n, f, d(p, f)), n), {}), o = u.resolve(i, l), t = JSON.stringify(s, null, 2);
@@ -21,7 +21,7 @@ const P = async (a) => {
21
21
  } else
22
22
  console.log(e.green("开始注入文件"));
23
23
  return r.writeFileSync(o, t), console.log(
24
- e.green(`文件注入成功过: ${o}`),
24
+ e.green(`文件注入成功: ${o}`),
25
25
  e.blue(t)
26
26
  ), s;
27
27
  };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  const n = {
3
- version: "0.1.1",
3
+ version: "0.2.2",
4
4
  name: "@done-coding/cli-inject",
5
5
  description: "信息注入命令行工具"
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@done-coding/cli-inject",
3
- "version": "0.1.1",
3
+ "version": "0.2.2",
4
4
  "description": "信息注入命令行工具",
5
5
  "private": false,
6
6
  "module": "es/index.mjs",
@@ -34,7 +34,8 @@
34
34
  "directory": "packages/inject"
35
35
  },
36
36
  "publishConfig": {
37
- "access": "public"
37
+ "access": "public",
38
+ "registry": "https://registry.npmjs.org/"
38
39
  },
39
40
  "author": "JustSoSu",
40
41
  "license": "MIT",
@@ -60,5 +61,5 @@
60
61
  "prompts": "^2.4.2",
61
62
  "yargs": "^17.7.2"
62
63
  },
63
- "gitHead": "454bb76eb20c9b732331c273435e0bf56c8c3f25"
64
+ "gitHead": "e2dc7c4b0fa74aa83dc6173416aaffe0a0a445ad"
64
65
  }
package/types/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export { handler } from "./handler";
2
2
  export { command } from "./main";
3
+ export * from './utils/types';
@@ -1,5 +1,5 @@
1
1
  declare const _default: {
2
- "version": "0.1.1",
2
+ "version": "0.2.2",
3
3
  "name": "@done-coding/cli-inject",
4
4
  "description": "信息注入命令行工具"
5
5
  };