@spyglassmc/mcdoc-cli 0.1.4 → 0.1.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,4 +1,4 @@
1
- #!/usr/bin/env -S tsx
1
+ #!/usr/bin/env -S node
2
2
  import { dirname, join, parse, resolve } from 'path';
3
3
  import { fileURLToPath, pathToFileURL } from 'url';
4
4
  import fs from 'fs-extra';
@@ -8,7 +8,6 @@ import yargs from 'yargs';
8
8
  import { hideBin } from 'yargs/helpers';
9
9
  import { ConfigService, fileUtil, Service, VanillaConfig, } from '@spyglassmc/core';
10
10
  import { NodeJsExternals } from '@spyglassmc/core/lib/nodejs.js';
11
- import * as je from '@spyglassmc/java-edition';
12
11
  import * as mcdoc from '@spyglassmc/mcdoc';
13
12
  const parentPath = dirname(fileURLToPath(import.meta.url));
14
13
  const cacheRoot = join(parentPath, 'cache');
@@ -64,7 +63,7 @@ await CLI.scriptName('mcdoc')
64
63
  info: (...log_args) => args.verbose ? console.info(...log_args) : false,
65
64
  trace: (message, ...params) => console.trace(message, ...params),
66
65
  };
67
- const projectPath = resolve(parentPath, args.source);
66
+ const projectPath = resolve(process.cwd(), args.source);
68
67
  await fileUtil.ensureDir(NodeJsExternals, projectPath);
69
68
  const service = new Service({
70
69
  logger,
@@ -74,7 +73,7 @@ await CLI.scriptName('mcdoc')
74
73
  env: { dependencies: [] },
75
74
  }),
76
75
  externals: NodeJsExternals,
77
- initializers: [mcdoc.initialize, je.initialize],
76
+ initializers: [mcdoc.initialize],
78
77
  projectRoot: fileUtil.ensureEndingSlash(pathToFileURL(projectPath).toString()),
79
78
  },
80
79
  });
@@ -240,7 +239,7 @@ await CLI.scriptName('mcdoc')
240
239
  console.warn(`parsing error, ${orphaned_doc.length} orphaned doc comments or incorrectly parsed markup comments`);
241
240
  console.warn(internal_locales);
242
241
  }
243
- await fs.writeFile(join('out', 'locale', 'locale.en-us.json'), JSON.stringify(locales, undefined, 3));
242
+ await fs.writeFile(join('out', 'locale', 'en-us.json'), JSON.stringify(locales, undefined, 3));
244
243
  }
245
244
  }
246
245
  console.log(`Generated JSON files with ${errors} errors.`);
@@ -249,4 +248,4 @@ await CLI.scriptName('mcdoc')
249
248
  .strict()
250
249
  .demandCommand(1)
251
250
  .parse();
252
- //# sourceMappingURL=index.mjs.map
251
+ //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@spyglassmc/mcdoc-cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
- "main": "lib/index.mjs",
6
- "types": "lib/index.d.mts",
5
+ "main": "lib/index.js",
6
+ "types": "lib/index.d.ts",
7
7
  "contributors": [
8
8
  {
9
9
  "name": "Misode",
@@ -19,7 +19,7 @@
19
19
  "test": "test/"
20
20
  },
21
21
  "bin": {
22
- "mcdoc": "lib/index.mjs"
22
+ "mcdoc": "lib/index.js"
23
23
  },
24
24
  "scripts": {
25
25
  "release": "npm publish",
@@ -31,8 +31,8 @@
31
31
  "klaw": "^4.1.0",
32
32
  "line-column": "^1.0.2",
33
33
  "yargs": "17.6.2",
34
- "@spyglassmc/core": "0.4.4",
35
- "@spyglassmc/mcdoc": "0.3.5"
34
+ "@spyglassmc/core": "0.4.5",
35
+ "@spyglassmc/mcdoc": "0.3.7"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/fs-extra": "^11.0.2",
package/lib/index.d.mts DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env -S tsx
2
- export {};
3
- //# sourceMappingURL=index.d.mts.map