@freecodecamp/universe-cli 0.7.2 → 0.8.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.
package/LICENSE CHANGED
@@ -1,13 +1,29 @@
1
- Copyright (c) freeCodeCamp
2
-
3
- Permission to use, copy, modify, and/or distribute this software for any
4
- purpose with or without fee is hereby granted, provided that the above
5
- copyright notice and this permission notice appear in all copies.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2014, freeCodeCamp.
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Universe CLI
2
2
 
3
- Static site deployment for the freeCodeCamp Universe platform.
3
+ A CLI for freeCodeCamp staff and operators to deploy, manage and maintain constellation apps on the freeCodeCamp Universe Platform.
4
4
 
5
5
  ## Install
6
6
 
@@ -52,69 +52,23 @@ Verify:
52
52
  universe --version
53
53
  ```
54
54
 
55
- ## CLI surface
56
-
57
- Top-level (cross-cutting):
58
-
59
- ```sh
60
- universe login # GitHub OAuth device flow → ~/.config/universe-cli/token
61
- universe logout # delete stored token
62
- universe whoami # echo current login + authorized-sites count
63
- universe --version # CLI version
64
- ```
65
-
66
- Static-site verbs (namespaced under `static`):
55
+ ## Quickstart
67
56
 
68
57
  ```sh
69
- universe static deploy [--promote] [--dir <path>]
70
- universe static promote [--from <deployId>]
71
- universe static rollback --to <deployId>
72
- universe static ls [--site <site>]
58
+ universe login # GitHub OAuth device flow
59
+ # add a platform.yaml at your repo root with: site: my-site
60
+ universe static deploy # upload the build to a new preview deploy
61
+ universe static promote # point production at that deploy
73
62
  ```
74
63
 
75
- Static-app registry (namespaced under `sites`, staff-gated writes):
76
-
77
- ```sh
78
- universe sites ls [--mine] # list registered sites; `--mine` filters to your authorized set
79
- universe sites register <slug> [--team=<name>...] # create new entry (staff; defaults --team to staff)
80
- universe sites update <slug> --team=<name>... # replace teams list (staff)
81
- universe sites rm <slug> # delete entry (staff; R2 deploy bytes untouched)
82
- ```
83
-
84
- All commands support `--json` for CI integration.
85
-
86
- ## Identity (priority chain)
87
-
88
- The CLI resolves a GitHub identity in this order — first match wins:
89
-
90
- 1. `$GITHUB_TOKEN` / `$GH_TOKEN` env (CI explicit)
91
- 1. Device-flow stored token at `~/.config/universe-cli/token` (`universe login`)
92
- 1. `gh auth token` shell-out (laptop fallback when no `universe login` token)
93
-
94
- CI runners must export `$GITHUB_TOKEN` explicitly. artemis validates the bearer via GitHub `GET /user`, then authorizes server-side against the Valkey-backed registry. Run `universe whoami` to see which slot resolved; inspect the sites you can deploy to with `universe sites ls --mine`.
95
-
96
- ## Configuration (`platform.yaml`)
97
-
98
- Every site has a `platform.yaml` at its repo root. Minimal valid file:
99
-
100
- ```yaml
101
- site: my-site
102
- ```
103
-
104
- Full schema reference (every field, defaults, validation rules): [`docs/platform-yaml.md`](docs/platform-yaml.md).
105
-
106
- No credential fields. The proxy holds the R2 admin key; the CLI never reads or writes one.
64
+ ## Docs
107
65
 
108
- ## Common flows
66
+ Start with the [Staff Guide](docs/STAFF-GUIDE.md). See the [command reference](docs/reference.md), the [`platform.yaml` schema](docs/platform-yaml.md), or [architecture & internals](docs/README.md).
109
67
 
110
- Full operator walkthrough (login → deploy → promote → rollback, CI shape, registry admin, troubleshooting) lives in [`docs/STAFF-GUIDE.md`](docs/STAFF-GUIDE.md).
68
+ ## License
111
69
 
112
- ## Environment overrides
70
+ Copyright © 2014 freeCodeCamp.org
113
71
 
114
- | Env | Default | Purpose |
115
- | --------------------------- | ---------------------------------------------- | ---------------------------------------------------------- |
116
- | `UNIVERSE_PROXY_URL` | `https://uploads.freecode.camp` | Override proxy host (staging etc.) |
117
- | `UNIVERSE_GH_CLIENT_ID` | _baked-in freeCodeCamp-Universe GitHub App id_ | Override GitHub App client id (fork tenants, `login` only) |
118
- | `GITHUB_TOKEN` / `GH_TOKEN` | — | Slot 1 of identity chain |
72
+ The content of this repository is bound by the following license:
119
73
 
120
- The shipped binary embeds the `freeCodeCamp-Universe` GitHub App client id (public; device flow uses no `client_secret`), so `universe login` works out of the box for staff once the App is installed on their org. Fork operators and self-hosted mirror tenants set `UNIVERSE_GH_CLIENT_ID` to their own GitHub App's id — env value wins when set.
74
+ - The computer software is licensed under the [BSD-3-Clause](LICENSE) license.