entrify-deploy 0.0.0-stage → 1.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.
- package/README.md +216 -2
- package/dist/api.d.ts +88 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +124 -0
- package/dist/api.js.map +1 -0
- package/dist/auth.d.ts +12 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +74 -0
- package/dist/auth.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +745 -0
- package/dist/cli.js.map +1 -0
- package/dist/detector.d.ts +14 -0
- package/dist/detector.d.ts.map +1 -0
- package/dist/detector.js +47 -0
- package/dist/detector.js.map +1 -0
- package/dist/util.d.ts +58 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/util.js +145 -0
- package/dist/util.js.map +1 -0
- package/package.json +33 -4
package/README.md
CHANGED
|
@@ -1,3 +1,217 @@
|
|
|
1
|
-
#
|
|
1
|
+
# entrify-deploy
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Official CLI for [Entrify](https://entrify.site): deploy any project from the terminal in seconds.
|
|
4
|
+
|
|
5
|
+
Formerly `dropdeploy-cli`. To switch: `npm uninstall -g dropdeploy-cli && npm install -g entrify-deploy`. Your saved login carries over.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g entrify-deploy
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
This installs the `entrify` command. The older `dropdeploy` command is installed too and does the same thing, so existing scripts keep working.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Use it from Claude Code
|
|
16
|
+
|
|
17
|
+
Install the plugin, then ask Claude to "deploy this":
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/plugin install entrify --marketplace kpndevrootentri/entrify-cli
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
On Claude Code older than 2.1.275, run `/plugin marketplace add kpndevrootentri/entrify-cli`, then `/plugin install entrify@entrify`.
|
|
24
|
+
|
|
25
|
+
Claude installs the CLI if needed, deploys, and reads the build log when a deploy fails. It then fixes the cause (code, settings or environment variables) and deploys again. It asks before pushing code or rolling back, and never asks for your password in the chat.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Quick start
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Log in (one time)
|
|
33
|
+
entrify auth login
|
|
34
|
+
|
|
35
|
+
# Deploy from any git repo
|
|
36
|
+
entrify deploy
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Commands
|
|
42
|
+
|
|
43
|
+
### `entrify auth login`
|
|
44
|
+
Log in to your Entrify account.
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
entrify auth login # interactive login
|
|
48
|
+
entrify auth login --email you@example.com # pre-fill email
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Password is always entered interactively; it is never passed as a flag. Logins last 7 days. After that, any command tells you to log in again.
|
|
52
|
+
|
|
53
|
+
### `entrify auth status`
|
|
54
|
+
Show the currently logged-in account.
|
|
55
|
+
|
|
56
|
+
### `entrify auth logout`
|
|
57
|
+
Clear saved credentials.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
### `entrify deploy`
|
|
62
|
+
Trigger a deployment for the current repository.
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
entrify deploy # auto-match project by git remote
|
|
66
|
+
entrify deploy --project-id my-app # deploy to a specific project
|
|
67
|
+
entrify deploy --project-id=my-app # same
|
|
68
|
+
entrify deploy --create # create a project from this repo if none matches
|
|
69
|
+
entrify deploy --dir /path/to/repo # use a different directory
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Entrify deploys from your **git remote**, not local files. Push your changes before deploying. With `--create`, a repository that has no project yet gets one, named after the repository, with its framework detected.
|
|
73
|
+
|
|
74
|
+
The project is matched by your `origin` remote, whether it's an HTTPS or SSH URL. If several projects use the same repo, the one on your current branch wins. The server always builds the **project's** branch; the CLI warns you when that isn't the branch you have checked out.
|
|
75
|
+
|
|
76
|
+
During the build, the CLI streams live output:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
▶ Entrify
|
|
80
|
+
|
|
81
|
+
Checking repository… ✓
|
|
82
|
+
Validating project… ✓
|
|
83
|
+
Detecting framework… ✓ NEXTJS (next.config.js)
|
|
84
|
+
Resolving project… ✓ my-app (my-app)
|
|
85
|
+
Triggering deployment… ✓
|
|
86
|
+
|
|
87
|
+
› Cloning repository
|
|
88
|
+
› Building Docker image
|
|
89
|
+
› Starting container
|
|
90
|
+
|
|
91
|
+
✓ Deployed successfully
|
|
92
|
+
|
|
93
|
+
Live URL → https://my-app.entrify.site
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
On failure, the last 20 lines of the build log and a probable cause are printed.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### `entrify projects`
|
|
101
|
+
List all your projects and their current status.
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
Your projects:
|
|
105
|
+
my-app My App DEPLOYED
|
|
106
|
+
→ https://my-app.entrify.site
|
|
107
|
+
|
|
108
|
+
api-server API Server FAILED
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
The commands below act on the project matched from the current repository. Pass `--project-id <id|slug>` to choose another.
|
|
114
|
+
|
|
115
|
+
### `entrify status`
|
|
116
|
+
The latest deployment and the live URL. The live version can be older than the latest deployment when the latest one failed.
|
|
117
|
+
|
|
118
|
+
### `entrify logs`
|
|
119
|
+
The build log of the latest deployment.
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
entrify logs # last 200 lines
|
|
123
|
+
entrify logs --lines all
|
|
124
|
+
entrify logs --follow # stream a build that is still running
|
|
125
|
+
entrify logs --deployment <id> # a specific deployment
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### `entrify env`
|
|
129
|
+
Environment variables. Entrify stores the values encrypted, and the CLI never prints them back. Changes apply on the next deploy.
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
entrify env list # names only
|
|
133
|
+
entrify env set API_URL=https://x.io DEBUG=0
|
|
134
|
+
entrify env push .env.production # every variable in a .env file (default: .env)
|
|
135
|
+
entrify env unset DEBUG
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### `entrify rollback`
|
|
139
|
+
Go back to the previous successful deployment, or to `--to <deployment-id>`.
|
|
140
|
+
|
|
141
|
+
### `entrify cancel`
|
|
142
|
+
Cancel the deployment that is queued or building.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
### `entrify help`
|
|
147
|
+
Print the full command reference.
|
|
148
|
+
|
|
149
|
+
### `entrify --version`
|
|
150
|
+
Print the installed version.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## CI / automation
|
|
155
|
+
|
|
156
|
+
Skip interactive login by setting environment variables:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
export ENTRIFY_TOKEN=your-jwt-token
|
|
160
|
+
export ENTRIFY_URL=https://entrify.site
|
|
161
|
+
|
|
162
|
+
entrify deploy --project-id my-app
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
`DROPDEPLOY_TOKEN`, `DROPDEPLOY_URL` and `DROPDEPLOY_EMAIL` still work. Without a terminal, the CLI never prompts. If it can't match the repository to a project, it exits with an error asking for `--project-id` or `--create`.
|
|
166
|
+
|
|
167
|
+
Add `--json` to any command for a single JSON object on stdout: `{ "ok": true, ... }`, or `{ "ok": false, "error": { "code": "...", "message": "..." }, ... }`. A failed deploy also includes `cause`, `fix` and the last 40 lines of the log (`logTail`). Exit codes:
|
|
168
|
+
|
|
169
|
+
| Code | Meaning |
|
|
170
|
+
|---|---|
|
|
171
|
+
| 0 | Success |
|
|
172
|
+
| 1 | The operation failed (for example, the build failed) |
|
|
173
|
+
| 2 | Needs input: a flag, a project, a file |
|
|
174
|
+
| 3 | Not logged in, or the login expired |
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Supported frameworks
|
|
179
|
+
|
|
180
|
+
Entrify auto-detects your framework from the repository contents:
|
|
181
|
+
|
|
182
|
+
| Framework | Detection |
|
|
183
|
+
|-----------|-----------|
|
|
184
|
+
| Next.js | `next.config.js` / `.ts` / `.mjs` |
|
|
185
|
+
| React (Vite) | `vite.config` + React dependency |
|
|
186
|
+
| Vue (Vite) | `vite.config` + Vue dependency |
|
|
187
|
+
| Svelte | `vite.config` + Svelte dependency |
|
|
188
|
+
| Node.js | `package.json` with `start` script |
|
|
189
|
+
| Django | `manage.py` |
|
|
190
|
+
| FastAPI | `main.py` with `FastAPI()` |
|
|
191
|
+
| Flask | `app.py` with `Flask()` |
|
|
192
|
+
| Go | `go.mod` |
|
|
193
|
+
| Rust | `Cargo.toml` |
|
|
194
|
+
| Java / Spring Boot | `pom.xml` |
|
|
195
|
+
| Static HTML | `index.html` |
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Installation
|
|
200
|
+
|
|
201
|
+
Always install globally so the `entrify` command is available system-wide:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
npm install -g entrify-deploy
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Verify the installation:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
entrify --version
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## License
|
|
216
|
+
|
|
217
|
+
MIT
|
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { Credentials } from './auth.js';
|
|
2
|
+
export interface Project {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
slug: string;
|
|
6
|
+
type: string;
|
|
7
|
+
/** GITHUB, GITLAB or UPLOAD. */
|
|
8
|
+
source?: string;
|
|
9
|
+
githubUrl: string | null;
|
|
10
|
+
/** The branch the server builds, whatever is checked out locally. */
|
|
11
|
+
branch?: string;
|
|
12
|
+
deployments?: Array<{
|
|
13
|
+
id: string;
|
|
14
|
+
status: string;
|
|
15
|
+
subdomain: string | null;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
export interface DeployResult {
|
|
20
|
+
deploymentId: string;
|
|
21
|
+
message: string;
|
|
22
|
+
queued: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface DeployStatus {
|
|
25
|
+
status: string;
|
|
26
|
+
buildLog: string | null;
|
|
27
|
+
commitHash: string | null;
|
|
28
|
+
subdomain: string | null;
|
|
29
|
+
}
|
|
30
|
+
export interface Deployment {
|
|
31
|
+
id: string;
|
|
32
|
+
status: string;
|
|
33
|
+
subdomain: string | null;
|
|
34
|
+
commitHash?: string | null;
|
|
35
|
+
createdAt: string;
|
|
36
|
+
}
|
|
37
|
+
export interface EnvVar {
|
|
38
|
+
id: string;
|
|
39
|
+
key: string;
|
|
40
|
+
environment: string;
|
|
41
|
+
}
|
|
42
|
+
export interface DetectResult {
|
|
43
|
+
type: string;
|
|
44
|
+
confidence: 'high' | 'medium' | 'low';
|
|
45
|
+
hint: string;
|
|
46
|
+
}
|
|
47
|
+
export type SseEvent = {
|
|
48
|
+
type: 'line';
|
|
49
|
+
text: string;
|
|
50
|
+
} | {
|
|
51
|
+
type: 'existing';
|
|
52
|
+
log: string;
|
|
53
|
+
} | {
|
|
54
|
+
type: 'done';
|
|
55
|
+
};
|
|
56
|
+
export declare class EntrifyApi {
|
|
57
|
+
private base;
|
|
58
|
+
private token;
|
|
59
|
+
constructor(creds: Credentials);
|
|
60
|
+
private authHeaders;
|
|
61
|
+
private json;
|
|
62
|
+
listProjects(): Promise<Project[]>;
|
|
63
|
+
detectType(repoUrl: string, branch: string): Promise<DetectResult>;
|
|
64
|
+
triggerDeploy(projectId: string): Promise<DeployResult>;
|
|
65
|
+
createProject(dto: {
|
|
66
|
+
name: string;
|
|
67
|
+
source: 'GITHUB' | 'GITLAB';
|
|
68
|
+
githubUrl: string;
|
|
69
|
+
type?: string;
|
|
70
|
+
branch?: string;
|
|
71
|
+
}): Promise<Project>;
|
|
72
|
+
/** Newest first. */
|
|
73
|
+
listDeployments(projectId: string, limit?: number): Promise<Deployment[]>;
|
|
74
|
+
/** Re-runs an earlier deployment; resolves to the new deployment's id. */
|
|
75
|
+
rollback(projectId: string, deploymentId: string): Promise<{
|
|
76
|
+
deploymentId: string;
|
|
77
|
+
queued: boolean;
|
|
78
|
+
}>;
|
|
79
|
+
cancelDeployment(projectId: string, deploymentId: string): Promise<void>;
|
|
80
|
+
/** Keys only: the API never returns values. */
|
|
81
|
+
listEnv(projectId: string): Promise<EnvVar[]>;
|
|
82
|
+
createEnv(projectId: string, key: string, value: string): Promise<void>;
|
|
83
|
+
updateEnv(projectId: string, varId: string, value: string): Promise<void>;
|
|
84
|
+
deleteEnv(projectId: string, varId: string): Promise<void>;
|
|
85
|
+
getDeploymentStatus(projectId: string, deploymentId: string): Promise<DeployStatus>;
|
|
86
|
+
streamLogs(projectId: string, deploymentId: string): AsyncGenerator<SseEvent>;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG7C,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,qEAAqE;IACrE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AAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzE,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1D,mBAAmB,CACvB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,YAAY,CAAC;IAOjB,UAAU,CACf,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,cAAc,CAAC,QAAQ,CAAC;CAoC5B"}
|
package/dist/api.js
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { CliError, EXIT, apiErrorMessage, cliName } from './util.js';
|
|
2
|
+
function isSseEvent(x) {
|
|
3
|
+
if (typeof x !== 'object' || x === null)
|
|
4
|
+
return false;
|
|
5
|
+
const t = x.type;
|
|
6
|
+
return t === 'line' || t === 'existing' || t === 'done';
|
|
7
|
+
}
|
|
8
|
+
export class EntrifyApi {
|
|
9
|
+
base;
|
|
10
|
+
token;
|
|
11
|
+
constructor(creds) {
|
|
12
|
+
this.base = creds.apiUrl;
|
|
13
|
+
this.token = creds.token;
|
|
14
|
+
}
|
|
15
|
+
authHeaders() {
|
|
16
|
+
return {
|
|
17
|
+
'Content-Type': 'application/json',
|
|
18
|
+
Authorization: `Bearer ${this.token}`,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
async json(method, path, body) {
|
|
22
|
+
const controller = new AbortController();
|
|
23
|
+
const timer = setTimeout(() => controller.abort(), 30_000);
|
|
24
|
+
try {
|
|
25
|
+
const res = await fetch(`${this.base}${path}`, {
|
|
26
|
+
method,
|
|
27
|
+
headers: this.authHeaders(),
|
|
28
|
+
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
29
|
+
signal: controller.signal,
|
|
30
|
+
});
|
|
31
|
+
if (res.status === 401) {
|
|
32
|
+
// CLI logins are JWTs that expire (7 days by default).
|
|
33
|
+
throw new CliError(`Your login has expired or is no longer valid. Run: ${cliName()} auth login`, 'AUTH_EXPIRED', EXIT.AUTH);
|
|
34
|
+
}
|
|
35
|
+
if (!res.ok) {
|
|
36
|
+
const body = await res.json().catch(() => null);
|
|
37
|
+
throw new CliError(apiErrorMessage(body, `API ${res.status} on ${method} ${path}`), `HTTP_${res.status}`);
|
|
38
|
+
}
|
|
39
|
+
const payload = (await res.json());
|
|
40
|
+
return payload.data;
|
|
41
|
+
}
|
|
42
|
+
finally {
|
|
43
|
+
clearTimeout(timer);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
async listProjects() {
|
|
47
|
+
return this.json('GET', '/api/projects');
|
|
48
|
+
}
|
|
49
|
+
async detectType(repoUrl, branch) {
|
|
50
|
+
return this.json('POST', '/api/detect-type', { repoUrl, branch });
|
|
51
|
+
}
|
|
52
|
+
async triggerDeploy(projectId) {
|
|
53
|
+
return this.json('POST', `/api/projects/${projectId}/deploy`);
|
|
54
|
+
}
|
|
55
|
+
async createProject(dto) {
|
|
56
|
+
return this.json('POST', '/api/projects', dto);
|
|
57
|
+
}
|
|
58
|
+
/** Newest first. */
|
|
59
|
+
async listDeployments(projectId, limit = 20) {
|
|
60
|
+
const data = await this.json('GET', `/api/projects/${projectId}/deployments?limit=${limit}`);
|
|
61
|
+
return data.deployments;
|
|
62
|
+
}
|
|
63
|
+
/** Re-runs an earlier deployment; resolves to the new deployment's id. */
|
|
64
|
+
async rollback(projectId, deploymentId) {
|
|
65
|
+
return this.json('POST', `/api/projects/${projectId}/deployments/${deploymentId}/rollback`);
|
|
66
|
+
}
|
|
67
|
+
async cancelDeployment(projectId, deploymentId) {
|
|
68
|
+
await this.json('POST', `/api/projects/${projectId}/deployments/${deploymentId}/cancel`);
|
|
69
|
+
}
|
|
70
|
+
/** Keys only: the API never returns values. */
|
|
71
|
+
async listEnv(projectId) {
|
|
72
|
+
return this.json('GET', `/api/projects/${projectId}/env-vars`);
|
|
73
|
+
}
|
|
74
|
+
async createEnv(projectId, key, value) {
|
|
75
|
+
await this.json('POST', `/api/projects/${projectId}/env-vars`, { key, value });
|
|
76
|
+
}
|
|
77
|
+
async updateEnv(projectId, varId, value) {
|
|
78
|
+
await this.json('PUT', `/api/projects/${projectId}/env-vars/${varId}`, { value });
|
|
79
|
+
}
|
|
80
|
+
async deleteEnv(projectId, varId) {
|
|
81
|
+
await this.json('DELETE', `/api/projects/${projectId}/env-vars/${varId}`);
|
|
82
|
+
}
|
|
83
|
+
async getDeploymentStatus(projectId, deploymentId) {
|
|
84
|
+
return this.json('GET', `/api/projects/${projectId}/deployments/${deploymentId}/logs`);
|
|
85
|
+
}
|
|
86
|
+
async *streamLogs(projectId, deploymentId) {
|
|
87
|
+
const res = await fetch(`${this.base}/api/projects/${projectId}/deployments/${deploymentId}/logs/stream`, { headers: { Authorization: `Bearer ${this.token}` } });
|
|
88
|
+
if (!res.ok || !res.body) {
|
|
89
|
+
throw new Error(`Stream connect failed: ${res.status}`);
|
|
90
|
+
}
|
|
91
|
+
const reader = res.body.getReader();
|
|
92
|
+
const decoder = new TextDecoder();
|
|
93
|
+
let buffer = '';
|
|
94
|
+
try {
|
|
95
|
+
while (true) {
|
|
96
|
+
const { done, value } = await reader.read();
|
|
97
|
+
if (done)
|
|
98
|
+
break;
|
|
99
|
+
buffer += decoder.decode(value, { stream: true });
|
|
100
|
+
const chunks = buffer.split('\n\n');
|
|
101
|
+
buffer = chunks.pop() ?? '';
|
|
102
|
+
for (const chunk of chunks) {
|
|
103
|
+
if (!chunk.startsWith('data: '))
|
|
104
|
+
continue;
|
|
105
|
+
try {
|
|
106
|
+
const raw = JSON.parse(chunk.slice(6));
|
|
107
|
+
if (!isSseEvent(raw))
|
|
108
|
+
continue;
|
|
109
|
+
yield raw;
|
|
110
|
+
if (raw.type === 'done')
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
// malformed SSE chunk — skip
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
finally {
|
|
120
|
+
reader.cancel().catch(() => { });
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=api.js.map
|
package/dist/api.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0DrE,SAAS,UAAU,CAAC,CAAU;IAC5B,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,CAAC,GAAI,CAA6B,CAAC,IAAI,CAAC;IAC9C,OAAO,CAAC,KAAK,MAAM,IAAI,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,MAAM,CAAC;AAC1D,CAAC;AAED,MAAM,OAAO,UAAU;IACb,IAAI,CAAS;IACb,KAAK,CAAS;IAEtB,YAAY,KAAkB;QAC5B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC3B,CAAC;IAEO,WAAW;QACjB,OAAO;YACL,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,UAAU,IAAI,CAAC,KAAK,EAAE;SACtC,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,IAAI,CAAI,MAAc,EAAE,IAAY,EAAE,IAAc;QAChE,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACzC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,MAAM,CAAC,CAAC;QAC3D,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,EAAE;gBAC7C,MAAM;gBACN,OAAO,EA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AAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;gBACpC,MAAM,GAAG,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;gBAC5B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;oBAC3B,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC;wBAAE,SAAS;oBAC1C,IAAI,CAAC;wBACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAY,CAAC;wBAClD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;4BAAE,SAAS;wBAC/B,MAAM,GAAG,CAAC;wBACV,IAAI,GAAG,CAAC,IAAI,KAAK,MAAM;4BAAE,OAAO;oBAClC,CAAC;oBAAC,MAAM,CAAC;wBACP,6BAA6B;oBAC/B,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;CACF"}
|
package/dist/auth.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Where `entrify auth login` connects unless --api-url says otherwise. */
|
|
2
|
+
export declare const PRODUCTION_URL = "https://entrify.site";
|
|
3
|
+
export interface Credentials {
|
|
4
|
+
token: string;
|
|
5
|
+
email: string;
|
|
6
|
+
apiUrl: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function saveCredentials(creds: Credentials): Promise<void>;
|
|
9
|
+
export declare function readCredentials(): Promise<Credentials | null>;
|
|
10
|
+
export declare function clearCredentials(): Promise<void>;
|
|
11
|
+
export declare function login(apiUrl: string, email: string, password: string): Promise<Credentials>;
|
|
12
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAKA,2EAA2E;AAC3E,eAAO,MAAM,cAAc,yBAAyB,CAAC;AAQrD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAYD,wBAAsB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAMvE;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAmBnE;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAEtD;AAED,wBAAsB,KAAK,CACzB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,CAwBtB"}
|
package/dist/auth.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { homedir } from 'node:os';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { readFile, writeFile, rename, mkdir, unlink } from 'node:fs/promises';
|
|
4
|
+
import { apiErrorMessage } from './util.js';
|
|
5
|
+
/** Where `entrify auth login` connects unless --api-url says otherwise. */
|
|
6
|
+
export const PRODUCTION_URL = 'https://entrify.site';
|
|
7
|
+
// ponytail: the platform moved from app.en3.wtf; drop this once that domain is retired.
|
|
8
|
+
const LEGACY_PRODUCTION_URL = 'https://app.en3.wtf';
|
|
9
|
+
/** Saved logins keep working after the move: same server, same token, new host. */
|
|
10
|
+
const currentUrl = (url) => url.replace(/\/$/, '') === LEGACY_PRODUCTION_URL ? PRODUCTION_URL : url;
|
|
11
|
+
// Kept under the old name so logins saved by earlier versions keep working.
|
|
12
|
+
function configDir() {
|
|
13
|
+
if (process.platform === 'win32' && process.env.APPDATA) {
|
|
14
|
+
return join(process.env.APPDATA, 'dropdeploy');
|
|
15
|
+
}
|
|
16
|
+
return join(homedir(), '.config', 'dropdeploy');
|
|
17
|
+
}
|
|
18
|
+
const credsPath = () => join(configDir(), 'credentials.json');
|
|
19
|
+
export async function saveCredentials(creds) {
|
|
20
|
+
const dir = configDir();
|
|
21
|
+
await mkdir(dir, { recursive: true });
|
|
22
|
+
const tmp = join(dir, '.credentials.tmp');
|
|
23
|
+
await writeFile(tmp, JSON.stringify(creds, null, 2), { mode: 0o600 });
|
|
24
|
+
await rename(tmp, credsPath());
|
|
25
|
+
}
|
|
26
|
+
export async function readCredentials() {
|
|
27
|
+
// Allow overriding via environment variable (useful in CI). The DROPDEPLOY_* names still work.
|
|
28
|
+
const env = process.env;
|
|
29
|
+
const token = env.ENTRIFY_TOKEN ?? env.DROPDEPLOY_TOKEN;
|
|
30
|
+
const url = env.ENTRIFY_URL ?? env.DROPDEPLOY_URL;
|
|
31
|
+
if (token && url) {
|
|
32
|
+
return {
|
|
33
|
+
token,
|
|
34
|
+
email: env.ENTRIFY_EMAIL ?? env.DROPDEPLOY_EMAIL ?? 'env',
|
|
35
|
+
apiUrl: currentUrl(url),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
const raw = await readFile(credsPath(), 'utf8');
|
|
40
|
+
const creds = JSON.parse(raw);
|
|
41
|
+
return { ...creds, apiUrl: currentUrl(creds.apiUrl) };
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export async function clearCredentials() {
|
|
48
|
+
await unlink(credsPath()).catch(() => { });
|
|
49
|
+
}
|
|
50
|
+
export async function login(apiUrl, email, password) {
|
|
51
|
+
const base = apiUrl.replace(/\/$/, '');
|
|
52
|
+
try {
|
|
53
|
+
const { protocol, hostname } = new URL(base);
|
|
54
|
+
const isLocal = hostname === 'localhost' || hostname.startsWith('127.') || hostname.startsWith('192.168.');
|
|
55
|
+
if (protocol === 'http:' && !isLocal) {
|
|
56
|
+
process.stderr.write('\x1b[33m⚠ Warning: connecting over HTTP — credentials will be sent in plaintext.\x1b[0m\n');
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
catch { /* invalid URL will be caught by the fetch below */ }
|
|
60
|
+
const res = await fetch(`${base}/api/auth/token`, {
|
|
61
|
+
method: 'POST',
|
|
62
|
+
headers: { 'Content-Type': 'application/json' },
|
|
63
|
+
body: JSON.stringify({ email, password }),
|
|
64
|
+
});
|
|
65
|
+
if (!res.ok) {
|
|
66
|
+
const body = await res.json().catch(() => null);
|
|
67
|
+
throw new Error(apiErrorMessage(body, `Login failed (${res.status})`));
|
|
68
|
+
}
|
|
69
|
+
const { data } = (await res.json());
|
|
70
|
+
const creds = { token: data.token, email: data.email, apiUrl: base };
|
|
71
|
+
await saveCredentials(creds);
|
|
72
|
+
return creds;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=auth.js.map
|
package/dist/auth.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,2EAA2E;AAC3E,MAAM,CAAC,MAAM,cAAc,GAAG,sBAAsB,CAAC;AACrD,wFAAwF;AACxF,MAAM,qBAAqB,GAAG,qBAAqB,CAAC;AAEpD,mFAAmF;AACnF,MAAM,UAAU,GAAG,CAAC,GAAW,EAAU,EAAE,CACzC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,qBAAqB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC;AAQ1E,4EAA4E;AAC5E,SAAS,SAAS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