eser 0.8.2 → 0.8.3

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/bin.ts ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env -S node
2
+ // Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license.
3
+
4
+ import { main } from "./main.ts";
5
+
6
+ await main();
package/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eser/cli",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "exports": "./main.ts",
5
5
  "imports": {
6
6
  "@std/cli": "jsr:@std/cli@^1.0.25",
package/main.ts CHANGED
@@ -19,6 +19,7 @@
19
19
  import * as cliParseArgs from "@std/cli/parse-args";
20
20
  import * as standardsRuntime from "@eser/standards/runtime";
21
21
  import { codebaseCommand } from "./commands/codebase/mod.ts";
22
+ import config from "./deno.json" with { type: "json" };
22
23
 
23
24
  type CommandHandler = (
24
25
  args: string[],
@@ -40,7 +41,7 @@ const showHelp = (): void => {
40
41
  console.log("\nRun 'eser <command> --help' for command-specific help.");
41
42
  };
42
43
 
43
- const main = async (): Promise<void> => {
44
+ export const main = async (): Promise<void> => {
44
45
  // @ts-ignore parseArgs doesn't mutate the array, readonly is safe
45
46
  const args = cliParseArgs.parseArgs(standardsRuntime.runtime.process.args, {
46
47
  boolean: ["help", "version"],
@@ -49,7 +50,7 @@ const main = async (): Promise<void> => {
49
50
  });
50
51
 
51
52
  if (args.version) {
52
- console.log("eser 0.8.0");
53
+ console.log(`eser ${config.version}`);
53
54
  return;
54
55
  }
55
56
 
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "eser",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "type": "module",
5
5
  "exports": "./main.ts",
6
6
  "bin": {
7
- "eser": "./main.ts"
7
+ "eser": "./bin.ts"
8
8
  },
9
9
  "dependencies": {
10
- "@eser/codebase": "npm:@jsr/eser__codebase@^0.8.2",
11
- "@eser/standards": "npm:@jsr/eser__standards@^0.8.2",
10
+ "@eser/codebase": "npm:@jsr/eser__codebase@^0.8.3",
11
+ "@eser/standards": "npm:@jsr/eser__standards@^0.8.3",
12
12
  "@std/cli": "npm:@jsr/std__cli@^1.0.25",
13
13
  "@std/fmt": "npm:@jsr/std__fmt@^1.0.8",
14
14
  "@std/path": "npm:@jsr/std__path@^1.1.4"
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@eser/cli",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "type": "module",
5
5
  "exports": "./main.ts",
6
6
  "bin": {
7
- "eser": "./main.ts"
7
+ "eser": "./bin.ts"
8
8
  },
9
9
  "dependencies": {
10
10
  "@eser/codebase": "workspace:*",