pac-proxy-cli 1.0.2 → 1.0.4

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.
Files changed (2) hide show
  1. package/lib/index.js +5 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1,14 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import { createRequire } from 'module';
3
4
  import { Command } from 'commander';
4
5
  import { startServer } from './server.js';
5
6
 
7
+ const require = createRequire(import.meta.url);
8
+ const pkg = require('../package.json');
9
+
6
10
  const program = new Command();
7
11
 
8
12
  program
9
13
  .name('pac-proxy')
10
14
  .description('PAC/全局代理本地控制台')
11
- .version(require('../package.json').version);
15
+ .version(pkg.version);
12
16
 
13
17
  program
14
18
  .command('serve')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pac-proxy-cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "node pac proxy and web control panel",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",