@aponiajs/cli 0.0.0 → 0.1.0

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/README.md CHANGED
@@ -1,15 +1,35 @@
1
1
  # @aponiajs/cli
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/%40aponiajs%2Fcli)](https://www.npmjs.com/package/@aponiajs/cli)
4
+
3
5
  The Bun-native Aponia command-line interface.
4
6
 
5
- ## Create a project
7
+ ## Install
8
+
9
+ ```bash
10
+ bun add --dev @aponiajs/cli
11
+ ```
12
+
13
+ ## Commands
6
14
 
7
15
  ```bash
8
- aponia new my-api
9
- aponia n my-api --dry-run
10
- aponia new my-api --skip-install
16
+ bunx aponia new my-api
17
+ bunx aponia n my-api --dry-run
18
+ bunx aponia new my-api --skip-install
19
+ bunx aponia --version
11
20
  ```
12
21
 
13
22
  The initial CLI implements the standard application generator. Component and
14
23
  resource schematics will be added behind the same command architecture after
15
24
  their module-registration transforms are safe and testable.
25
+
26
+ For one-command project creation, use the separately published
27
+ [`create-aponia`](https://www.npmjs.com/package/create-aponia) entrypoint:
28
+
29
+ ```bash
30
+ bun create aponia my-api
31
+ ```
32
+
33
+ [npm package](https://www.npmjs.com/package/@aponiajs/cli) ·
34
+ [complete CLI guide](../../docs/cli.md) ·
35
+ [complete package catalog](../../docs/packages.md)
package/dist/index.mjs CHANGED
@@ -1,6 +1,9 @@
1
1
  import { mkdir, readdir } from "node:fs/promises";
2
2
  import { basename, dirname, join, relative } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
+ //#region package.json
5
+ var version = "0.1.0";
6
+ //#endregion
4
7
  //#region src/arguments.ts
5
8
  function parseArguments(arguments_) {
6
9
  const [command = "help", ...rest] = arguments_;
@@ -88,7 +91,7 @@ async function runCli(arguments_) {
88
91
  return 0;
89
92
  }
90
93
  if (command.command === "version") {
91
- console.log("0.0.0");
94
+ console.log(version);
92
95
  return 0;
93
96
  }
94
97
  const result = await generateProject(command);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aponiajs/cli",
3
- "version": "0.0.0",
3
+ "version": "0.1.0",
4
4
  "description": "Bun-native project generator and command-line interface for Aponia.",
5
5
  "homepage": "https://github.com/aponiajs/aponiajs#readme",
6
6
  "bugs": {
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import cliManifest from "../package.json" with { type: "json" };
1
2
  import { parseArguments } from "./arguments.ts";
2
3
  import { generateProject } from "./project-generator.ts";
3
4
 
@@ -18,7 +19,7 @@ export async function runCli(arguments_: readonly string[]): Promise<number> {
18
19
  }
19
20
 
20
21
  if (command.command === "version") {
21
- console.log("0.0.0");
22
+ console.log(cliManifest.version);
22
23
  return 0;
23
24
  }
24
25