@freecodecamp/universe-cli 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/LICENSE +13 -0
- package/README.md +80 -0
- package/dist/index.cjs +49387 -0
- package/dist/index.js +1009 -0
- package/package.json +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Universe CLI
|
|
2
|
+
|
|
3
|
+
Static site deployment for the freeCodeCamp Universe platform.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
### npm
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
# Run directly
|
|
11
|
+
npx @freecodecamp/universe-cli <command>
|
|
12
|
+
|
|
13
|
+
# Or install globally
|
|
14
|
+
npm install -g @freecodecamp/universe-cli
|
|
15
|
+
universe <command>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Binary
|
|
19
|
+
|
|
20
|
+
Download the latest binary from [Releases](../../releases):
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
# macOS (Apple Silicon)
|
|
24
|
+
gh release download --repo freeCodeCamp-Universe/universe-cli --pattern "universe-darwin-arm64"
|
|
25
|
+
chmod +x universe-darwin-arm64
|
|
26
|
+
sudo mv universe-darwin-arm64 /usr/local/bin/universe
|
|
27
|
+
|
|
28
|
+
# macOS (Intel)
|
|
29
|
+
gh release download --repo freeCodeCamp-Universe/universe-cli --pattern "universe-darwin-amd64"
|
|
30
|
+
chmod +x universe-darwin-amd64
|
|
31
|
+
sudo mv universe-darwin-amd64 /usr/local/bin/universe
|
|
32
|
+
|
|
33
|
+
# Linux x64
|
|
34
|
+
gh release download --repo freeCodeCamp-Universe/universe-cli --pattern "universe-linux-amd64"
|
|
35
|
+
chmod +x universe-linux-amd64
|
|
36
|
+
sudo mv universe-linux-amd64 /usr/local/bin/universe
|
|
37
|
+
|
|
38
|
+
# Linux ARM64
|
|
39
|
+
gh release download --repo freeCodeCamp-Universe/universe-cli --pattern "universe-linux-arm64"
|
|
40
|
+
chmod +x universe-linux-arm64
|
|
41
|
+
sudo mv universe-linux-arm64 /usr/local/bin/universe
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Verify:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
universe --version
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Usage
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
# Deploy a static site (from a directory with platform.yaml and a built dist/)
|
|
54
|
+
universe static deploy
|
|
55
|
+
|
|
56
|
+
# Promote preview to production
|
|
57
|
+
universe static promote
|
|
58
|
+
|
|
59
|
+
# Rollback production to previous deploy
|
|
60
|
+
universe static rollback --confirm
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
All commands support `--json` for CI integration.
|
|
64
|
+
|
|
65
|
+
## Credentials
|
|
66
|
+
|
|
67
|
+
The CLI needs R2 credentials. See the [Staff Guide](STAFF-GUIDE.md#2-credentials) for setup.
|
|
68
|
+
|
|
69
|
+
## Development
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
pnpm install
|
|
73
|
+
pnpm vitest run # 180 tests
|
|
74
|
+
pnpm tsup # build to dist/
|
|
75
|
+
pnpm tsc --noEmit # typecheck
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Releasing
|
|
79
|
+
|
|
80
|
+
See [RELEASING.md](RELEASING.md).
|