@skills-store/rednote 0.1.12 → 0.1.13

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/bin/rednote.js +26 -0
  2. package/package.json +1 -1
package/bin/rednote.js ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ import { runRootCli } from '../dist/index.js';
3
+ import { stringifyError } from '../dist/utils/browser-cli.js';
4
+
5
+ async function finalizeCliProcess(exitCode) {
6
+ await new Promise((resolve) => process.stdout.write('', () => resolve()));
7
+ await new Promise((resolve) => process.stderr.write('', () => resolve()));
8
+ process.exit(exitCode);
9
+ }
10
+
11
+ try {
12
+ await runRootCli(process.argv.slice(2));
13
+ await finalizeCliProcess(0);
14
+ } catch (error) {
15
+ process.stderr.write(
16
+ `${JSON.stringify(
17
+ {
18
+ ok: false,
19
+ error: stringifyError(error),
20
+ },
21
+ null,
22
+ 2,
23
+ )}\n`,
24
+ );
25
+ await finalizeCliProcess(1);
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skills-store/rednote",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {