@uniac/cli 0.2.1 → 0.3.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.
Files changed (3) hide show
  1. package/README.md +38 -3
  2. package/package.json +6 -9
  3. package/targets.js +20 -0
package/README.md CHANGED
@@ -14,6 +14,35 @@ Or run without installing:
14
14
  npx -y @uniac/cli version
15
15
  ```
16
16
 
17
+ ## Quickstart
18
+
19
+ A project is a directory with a `uniac.yaml` describing its services
20
+ and deployments as static resources:
21
+
22
+ ```yaml
23
+ runtime: yaml
24
+ default: shop
25
+ resources:
26
+ worker:
27
+ type: service
28
+ image: "mendhak/http-https-echo:31"
29
+ public_ports: [8080]
30
+ env: { GREETING: hello }
31
+ shop:
32
+ type: deployment
33
+ services:
34
+ workera: { from: worker }
35
+ ```
36
+
37
+ ```bash
38
+ uniac init # scaffold uniac.yaml
39
+ uniac plan # resolve + preview the deployable (no network)
40
+ uniac deploy # ship it (links the project on first run)
41
+ ```
42
+
43
+ Full manifest reference:
44
+ [docs/uniac-yaml.md](https://github.com/uniac-ai/Uniac/blob/main/docs/uniac-yaml.md).
45
+
17
46
  ## How it works
18
47
 
19
48
  `@uniac/cli` is a tiny JS shim plus one `optionalDependencies` entry
@@ -37,11 +66,17 @@ On any other platform, grab a tar.gz from
37
66
 
38
67
  `.github/workflows/release.yml` publishes on `cli-v*` tags: it runs
39
68
  [`scripts/package-platform-npm.js`](./scripts/package-platform-npm.js)
40
- to turn GoReleaser's `dist/` into the platform packages and pin them
41
- as exact-version `optionalDependencies` here, then publishes the
42
- platform packages followed by this meta package. See
69
+ to stage the platform packages and this meta package (with
70
+ exact-version `optionalDependencies` pins) from GoReleaser's `dist/`,
71
+ then publishes the platform packages followed by the meta package.
72
+ This directory is the staging template; the published copies live only
73
+ under the gitignored `platform-packages/`. See
43
74
  [`../go/README.md`](../go/README.md) for the full release runbook.
44
75
 
76
+ To deprecate (or un-deprecate) a published version, dispatch
77
+ `.github/workflows/npm-deprecate.yml` — the npm token lives only in
78
+ CI.
79
+
45
80
  ## License
46
81
 
47
82
  MIT. See [LICENSE](./LICENSE).
package/package.json CHANGED
@@ -1,17 +1,14 @@
1
1
  {
2
2
  "name": "@uniac/cli",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "Control-plane CLI for Uniac services",
6
6
  "bin": {
7
7
  "uniac": "bin/uniac.js"
8
8
  },
9
- "scripts": {
10
- "postinstall": "node ./npm-install/postinstall.js"
11
- },
12
9
  "files": [
13
10
  "bin/uniac.js",
14
- "npm-install/",
11
+ "targets.js",
15
12
  "README.md",
16
13
  "LICENSE"
17
14
  ],
@@ -26,9 +23,9 @@
26
23
  },
27
24
  "homepage": "https://uniac.ai",
28
25
  "optionalDependencies": {
29
- "@uniac/cli-darwin-arm64": "0.2.1",
30
- "@uniac/cli-darwin-x64": "0.2.1",
31
- "@uniac/cli-linux-arm64": "0.2.1",
32
- "@uniac/cli-linux-x64": "0.2.1"
26
+ "@uniac/cli-darwin-arm64": "0.3.0",
27
+ "@uniac/cli-darwin-x64": "0.3.0",
28
+ "@uniac/cli-linux-arm64": "0.3.0",
29
+ "@uniac/cli-linux-x64": "0.3.0"
33
30
  }
34
31
  }
package/targets.js ADDED
@@ -0,0 +1,20 @@
1
+ // The npm distribution's platform matrix — the one statement of which
2
+ // prebuilt-binary packages exist. Consumed at runtime by bin/uniac.js
3
+ // (to resolve the matching package) and at release time by
4
+ // scripts/package-platform-npm.js (which fails the release if this
5
+ // table and GoReleaser's build matrix disagree, so the two change
6
+ // together deliberately).
7
+ //
8
+ // Key: `${process.platform}-${process.arch}` of the installing
9
+ // machine. Value: the GoReleaser build (goos/goarch) that serves it.
10
+ export const TARGETS = {
11
+ "darwin-arm64": { goos: "darwin", goarch: "arm64" },
12
+ "darwin-x64": { goos: "darwin", goarch: "amd64" },
13
+ "linux-arm64": { goos: "linux", goarch: "arm64" },
14
+ "linux-x64": { goos: "linux", goarch: "amd64" },
15
+ };
16
+
17
+ // One binary package per target, version-locked to @uniac/cli.
18
+ export function packageName(key) {
19
+ return `@uniac/cli-${key}`;
20
+ }