@appling/cli 0.1.0 → 0.1.1

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/README.md +59 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # @appling/cli
2
+
3
+ Command line tool to check and format Appling models (`.appling` files).
4
+
5
+ Appling is a declarative language that describes a business or web application in five layers: domain, behavior, application, interfaces and experience. The language itself lives in [`@appling/lang`](https://www.npmjs.com/package/@appling/lang).
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install --save-dev @appling/cli
11
+ ```
12
+
13
+ Or run it without installing:
14
+
15
+ ```sh
16
+ npx @appling/cli check models
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ```sh
22
+ appling check [files or folders...]
23
+ appling fmt [files or folders...]
24
+ ```
25
+
26
+ Folders are searched recursively for `.appling` files. Hidden folders and `node_modules` are skipped. Without a path, the current folder is used.
27
+
28
+ All files are loaded as one workspace, so references between modules resolve across files.
29
+
30
+ ### check
31
+
32
+ Parses, links and validates every file and prints one line per problem:
33
+
34
+ ```
35
+ models/sales.appling:13:23 error A machine must govern an entity field marked "state" with an enum type.
36
+ 2 file(s), 1 error(s)
37
+ ```
38
+
39
+ ### fmt
40
+
41
+ Rewrites every file into its canonical form:
42
+
43
+ - Gives every element without a stable id a new one, such as `entity Order #1kzox`.
44
+ - Normalizes whitespace, indentation and line breaks. Comments are kept.
45
+ - Running it twice changes nothing.
46
+
47
+ Files with syntax errors are left untouched and reported.
48
+
49
+ ## Exit codes
50
+
51
+ | Code | Meaning |
52
+ |---|---|
53
+ | 0 | No errors |
54
+ | 1 | `check` found errors, or `fmt` skipped a file with syntax errors |
55
+ | 2 | Unknown command |
56
+
57
+ ## License
58
+
59
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appling/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Command line tool to check and format Appling models",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,7 +10,7 @@
10
10
  "out"
11
11
  ],
12
12
  "dependencies": {
13
- "@appling/lang": "0.1.0",
13
+ "@appling/lang": "0.1.1",
14
14
  "langium": "4.4.0"
15
15
  },
16
16
  "devDependencies": {