@glash/cli 0.2.16 → 0.2.19
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/README.md +53 -1
- package/commands/deploy.mjs +3 -2
- package/lib/version.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,12 +2,64 @@
|
|
|
2
2
|
|
|
3
3
|
The official command-line interface for [glashDB](https://glashdb.com).
|
|
4
4
|
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
Pick whichever install style you prefer — all four produce the same `glash` command:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Short-name (recommended)
|
|
11
|
+
npm install -g glash
|
|
12
|
+
|
|
13
|
+
# Scoped package
|
|
14
|
+
npm install -g @glash/cli@latest
|
|
15
|
+
|
|
16
|
+
# pnpm / yarn / bun
|
|
17
|
+
pnpm add -g glash
|
|
18
|
+
yarn global add glash
|
|
19
|
+
bun add -g glash
|
|
20
|
+
|
|
21
|
+
# No install — run on demand
|
|
22
|
+
npx -y glash deploy
|
|
5
23
|
```
|
|
6
|
-
|
|
24
|
+
|
|
25
|
+
Then:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
7
28
|
glash login
|
|
8
29
|
glash deploy
|
|
9
30
|
```
|
|
10
31
|
|
|
32
|
+
### `glash: command not found`
|
|
33
|
+
|
|
34
|
+
If npm says the install completed but your shell can't find `glash`, your npm
|
|
35
|
+
global `bin` folder isn't on `PATH`. Fix it once:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm list -g glash --depth=0 # confirm install
|
|
39
|
+
ls -la "$(npm prefix -g)/bin/glash" # confirm bin exists
|
|
40
|
+
echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.zshrc
|
|
41
|
+
source ~/.zshrc
|
|
42
|
+
hash -r
|
|
43
|
+
glash --version
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
On macOS with Homebrew Node, the global prefix is usually
|
|
47
|
+
`/opt/homebrew/bin` (Apple Silicon) or `/usr/local/bin` (Intel) — both are
|
|
48
|
+
typically already on `PATH`. With `nvm`, re-run `nvm use` in new shells or
|
|
49
|
+
add `nvm use --default` to your shell init.
|
|
50
|
+
|
|
51
|
+
### EACCES / permission errors
|
|
52
|
+
|
|
53
|
+
Don't `sudo npm install -g`. Instead, point npm at a user-owned prefix:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
mkdir -p ~/.npm-global
|
|
57
|
+
npm config set prefix ~/.npm-global
|
|
58
|
+
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.zshrc
|
|
59
|
+
source ~/.zshrc
|
|
60
|
+
npm install -g glash
|
|
61
|
+
```
|
|
62
|
+
|
|
11
63
|
## Commands
|
|
12
64
|
|
|
13
65
|
| Command | Purpose |
|
package/commands/deploy.mjs
CHANGED
|
@@ -123,7 +123,8 @@ export async function deploy({ flags }) {
|
|
|
123
123
|
let projectId;
|
|
124
124
|
try { projectId = await resolveProjectId(flags); } catch (e) { return fail(e.message); }
|
|
125
125
|
|
|
126
|
-
const
|
|
126
|
+
const remoteDeploy = Boolean(flags.git || flags.repo || flags.remote);
|
|
127
|
+
const commitHash = flags.commit || (remoteDeploy ? undefined : currentCommit());
|
|
127
128
|
const gitBranch = flags.branch || currentBranch();
|
|
128
129
|
const target = flags.prod || flags.production ? 'production' : (flags.target || 'production');
|
|
129
130
|
|
|
@@ -137,7 +138,7 @@ export async function deploy({ flags }) {
|
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
140
|
|
|
140
|
-
if (!
|
|
141
|
+
if (!remoteDeploy) {
|
|
141
142
|
info(color.dim(`→ uploading local source for project ${projectId} (${target})`));
|
|
142
143
|
const zipPath = join(tmpdir(), `glash-deploy-${Date.now()}.zip`);
|
|
143
144
|
try {
|
package/lib/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.2.
|
|
1
|
+
export const VERSION = '0.2.19';
|
package/package.json
CHANGED