@chenchaolong/plugin-mineru-chen 1.0.5 → 1.0.6

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":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,QAAA,MAAM,YAAY,gDAAe,CAAA;AAEjC,QAAA,MAAM,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CA4BrD,CAAA;AAED,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAIvD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAYvB,QAAA,MAAM,YAAY,gDAAe,CAAA;AAEjC,QAAA,MAAM,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CA4BrD,CAAA;AAED,eAAe,MAAM,CAAA"}
package/dist/index.js CHANGED
@@ -1,14 +1,17 @@
1
+ import { readFileSync } from 'fs';
2
+ import { fileURLToPath } from 'url';
3
+ import { dirname, join } from 'path';
1
4
  import { z } from 'zod';
2
5
  import { MinerUPlugin } from './lib/plugin.js';
3
6
  import { icon } from './lib/types.js';
4
- // Package metadata (embedded directly to avoid ESM/CJS file reading issues)
5
- const packageName = '@chenchaolong/plugin-mineru-chen';
6
- const packageVersion = '1.0.5';
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const dir_name = dirname(__filename);
9
+ const packageJson = JSON.parse(readFileSync(join(dir_name, '../package.json'), 'utf8'));
7
10
  const ConfigSchema = z.object({});
8
11
  const plugin = {
9
12
  meta: {
10
- name: packageName,
11
- version: packageVersion,
13
+ name: packageJson.name,
14
+ version: packageJson.version,
12
15
  category: 'tools',
13
16
  icon: {
14
17
  type: 'svg',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chenchaolong/plugin-mineru-chen",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",