@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 +29 -13
- package/README.md +12 -58
- package/dist/index.cjs +1103 -82
- package/dist/index.js +899 -34
- package/package.json +3 -3
package/LICENSE
CHANGED
|
@@ -1,13 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
|
70
|
-
|
|
71
|
-
universe static
|
|
72
|
-
universe static
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
68
|
+
## License
|
|
111
69
|
|
|
112
|
-
|
|
70
|
+
Copyright © 2014 freeCodeCamp.org
|
|
113
71
|
|
|
114
|
-
|
|
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
|
-
|
|
74
|
+
- The computer software is licensed under the [BSD-3-Clause](LICENSE) license.
|