pinme 2.0.2-beta.9 → 2.0.2
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 +207 -26
- package/dist/index.js +5172 -4303
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
# PinMe
|
|
15
15
|
|
|
16
16
|
[PinMe](https://pinme.eth.limo/) is a zero-config frontend deployment tool.
|
|
17
|
-
No servers
|
|
17
|
+
No servers to manage. Minimal setup.
|
|
18
18
|
|
|
19
19
|
Build a static site, generate a page with AI, export your frontend, or import CAR files — then deploy instantly with a single command.
|
|
20
20
|
|
|
@@ -33,9 +33,10 @@ Website: [https://pinme.eth.limo/](https://pinme.eth.limo/)
|
|
|
33
33
|
- [For AI](#for-ai)
|
|
34
34
|
- [Installation](#installation)
|
|
35
35
|
- [Usage](#usage)
|
|
36
|
-
- [Bind Domain](#bind-domain-requires-
|
|
36
|
+
- [Bind Domain](#bind-domain-requires-wallet-balance)
|
|
37
|
+
- [Full-Stack Projects](#full-stack-projects)
|
|
37
38
|
- [Command Details](#command-details)
|
|
38
|
-
- [
|
|
39
|
+
- [Wallet Billing](#wallet-billing)
|
|
39
40
|
- [Common Static File Directories](#common-static-file-directories)
|
|
40
41
|
- [Error Handling](#error-handling)
|
|
41
42
|
- [Upload Limits](#upload-limits)
|
|
@@ -54,14 +55,23 @@ Website: [https://pinme.eth.limo/](https://pinme.eth.limo/)
|
|
|
54
55
|
node --version
|
|
55
56
|
```
|
|
56
57
|
|
|
57
|
-
###
|
|
58
|
+
### Four Steps to Deploy
|
|
58
59
|
|
|
59
60
|
1. **Install PinMe**
|
|
60
61
|
```bash
|
|
61
62
|
npm install -g pinme
|
|
62
63
|
```
|
|
63
64
|
|
|
64
|
-
2. **
|
|
65
|
+
2. **Login or set AppKey**
|
|
66
|
+
```bash
|
|
67
|
+
# Recommended: browser login
|
|
68
|
+
pinme login
|
|
69
|
+
|
|
70
|
+
# Or use an AppKey in CLI/CI environments
|
|
71
|
+
pinme set-appkey <AppKey>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
3. **Build your project** (if not already built)
|
|
65
75
|
```bash
|
|
66
76
|
# For Vite/React/Vue projects
|
|
67
77
|
npm run build
|
|
@@ -70,7 +80,7 @@ npm run build
|
|
|
70
80
|
npm run build
|
|
71
81
|
```
|
|
72
82
|
|
|
73
|
-
|
|
83
|
+
4. **Upload to PinMe**
|
|
74
84
|
```bash
|
|
75
85
|
# Upload the dist directory (most common)
|
|
76
86
|
pinme upload dist
|
|
@@ -79,7 +89,7 @@ pinme upload dist
|
|
|
79
89
|
pinme upload build
|
|
80
90
|
```
|
|
81
91
|
|
|
82
|
-
That's it!
|
|
92
|
+
That's it! PinMe prints the best available public URL. If no domain is available, it falls back to a preview URL like `https://pinme.eth.limo/#/preview/*`.
|
|
83
93
|
|
|
84
94
|
---
|
|
85
95
|
|
|
@@ -89,7 +99,7 @@ This section provides AI-specific instructions for deploying websites using PinM
|
|
|
89
99
|
|
|
90
100
|
### AI Execution Protocol
|
|
91
101
|
|
|
92
|
-
**Goal:** Use PinMe CLI to upload static files to
|
|
102
|
+
**Goal:** Use PinMe CLI to upload static files to PinMe/IPFS and return the final public URL.
|
|
93
103
|
|
|
94
104
|
#### Required Steps
|
|
95
105
|
|
|
@@ -104,7 +114,16 @@ This section provides AI-specific instructions for deploying websites using PinM
|
|
|
104
114
|
npm install -g pinme
|
|
105
115
|
```
|
|
106
116
|
|
|
107
|
-
3. **
|
|
117
|
+
3. **Authenticate before upload**
|
|
118
|
+
```bash
|
|
119
|
+
# Recommended
|
|
120
|
+
pinme login
|
|
121
|
+
|
|
122
|
+
# Or for automation / non-browser environments
|
|
123
|
+
pinme set-appkey <AppKey>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
4. **Identify the Static File Directory**
|
|
108
127
|
Priority order to check:
|
|
109
128
|
- `dist/` - Default output directory for Vue/React/Vite projects
|
|
110
129
|
- `build/` - Output directory for Create React App
|
|
@@ -130,7 +149,9 @@ This section provides AI-specific instructions for deploying websites using PinM
|
|
|
130
149
|
```
|
|
131
150
|
|
|
132
151
|
6. **Return Result**
|
|
133
|
-
- Only return final
|
|
152
|
+
- Only return the final URL printed by PinMe
|
|
153
|
+
- URL priority is: DNS domain > Pinme subdomain > short URL > hash preview URL
|
|
154
|
+
- Hash fallback format: `https://pinme.eth.limo/#/preview/*`
|
|
134
155
|
- Do not output additional logs or intermediate steps
|
|
135
156
|
|
|
136
157
|
#### Prohibited Operations
|
|
@@ -151,8 +172,12 @@ For easy AI tool parsing:
|
|
|
151
172
|
"node_version": ">=16.13.0"
|
|
152
173
|
},
|
|
153
174
|
"install": "npm install -g pinme",
|
|
175
|
+
"login": "pinme login",
|
|
176
|
+
"set_appkey": "pinme set-appkey <AppKey>",
|
|
177
|
+
"auth_required_for_upload": true,
|
|
154
178
|
"upload": "pinme upload {{directory}}",
|
|
155
179
|
"upload_with_domain": "pinme upload {{directory}} --domain {{domain}}",
|
|
180
|
+
"upload_with_dns": "pinme upload {{directory}} --domain {{domain}} --dns",
|
|
156
181
|
"validDirectories": ["dist", "build", "out", "public"],
|
|
157
182
|
"requiredFiles": ["index.html"],
|
|
158
183
|
"excludePatterns": ["node_modules", ".env", ".git", "src"],
|
|
@@ -160,9 +185,11 @@ For easy AI tool parsing:
|
|
|
160
185
|
"single_file": "200MB",
|
|
161
186
|
"total_directory": "1GB"
|
|
162
187
|
},
|
|
163
|
-
"output": "
|
|
188
|
+
"output": "public_url",
|
|
189
|
+
"url_priority": ["dns_domain", "pinme_domain", "short_url", "hash_preview_url"],
|
|
164
190
|
"preview_url_format": "https://pinme.eth.limo/#/preview/*",
|
|
165
|
-
"
|
|
191
|
+
"pinme_domain_format": "https://<name>.<root-domain>",
|
|
192
|
+
"dns_domain_format": "https://<your-domain>",
|
|
166
193
|
"other_commands": {
|
|
167
194
|
"version": "pinme --version",
|
|
168
195
|
"list": "pinme list",
|
|
@@ -171,6 +198,14 @@ For easy AI tool parsing:
|
|
|
171
198
|
"set_appkey": "pinme set-appkey",
|
|
172
199
|
"show_appkey": "pinme show-appkey",
|
|
173
200
|
"my_domains": "pinme my-domains",
|
|
201
|
+
"wallet": "pinme wallet",
|
|
202
|
+
"bind": "pinme bind <path> --domain <domain>",
|
|
203
|
+
"create": "pinme create <project-name>",
|
|
204
|
+
"save": "pinme save",
|
|
205
|
+
"update_db": "pinme update-db",
|
|
206
|
+
"update_worker": "pinme update-worker",
|
|
207
|
+
"update_web": "pinme update-web",
|
|
208
|
+
"delete": "pinme delete <project-name>",
|
|
174
209
|
"remove": "pinme rm <hash>",
|
|
175
210
|
"logout": "pinme logout",
|
|
176
211
|
"help": "pinme help"
|
|
@@ -181,14 +216,15 @@ For easy AI tool parsing:
|
|
|
181
216
|
### AI Usage Template
|
|
182
217
|
|
|
183
218
|
> **Deployment Request:**
|
|
184
|
-
> Please read the PinMe documentation, then use PinMe CLI to deploy the specified website
|
|
219
|
+
> Please read the PinMe documentation, then use PinMe CLI to deploy the specified website by uploading static files to PinMe/IPFS.
|
|
185
220
|
>
|
|
186
221
|
> **Operation Steps:**
|
|
187
222
|
> 1. Check Node.js version (requires 16.13.0+)
|
|
188
223
|
> 2. Check if pinme is installed, install if not
|
|
189
|
-
> 3.
|
|
190
|
-
> 4.
|
|
191
|
-
> 5.
|
|
224
|
+
> 3. Authenticate with `pinme login` or `pinme set-appkey <AppKey>`
|
|
225
|
+
> 4. Identify the static file directory for the website to deploy
|
|
226
|
+
> 5. Execute deployment command
|
|
227
|
+
> 6. Return the final public URL printed by PinMe. If no custom URL is available, return the preview page link: `https://pinme.eth.limo/#/preview/*`
|
|
192
228
|
|
|
193
229
|
---
|
|
194
230
|
|
|
@@ -220,6 +256,9 @@ pinme --version
|
|
|
220
256
|
### Upload Files or Directories
|
|
221
257
|
|
|
222
258
|
```bash
|
|
259
|
+
# Login is required before upload
|
|
260
|
+
pinme login
|
|
261
|
+
|
|
223
262
|
# Interactive upload
|
|
224
263
|
pinme upload
|
|
225
264
|
|
|
@@ -227,6 +266,8 @@ pinme upload
|
|
|
227
266
|
pinme upload /path/to/file-or-directory
|
|
228
267
|
```
|
|
229
268
|
|
|
269
|
+
**Authentication requirement:** `pinme upload` and `pinme import` require a valid login session or AppKey. Use `pinme login` for browser login, or `pinme set-appkey <AppKey>` for CLI/CI environments.
|
|
270
|
+
|
|
230
271
|
### Bind Domain (requires wallet balance)
|
|
231
272
|
|
|
232
273
|
```bash
|
|
@@ -251,9 +292,54 @@ pinme upload ./dist --domain example.com
|
|
|
251
292
|
pinme upload ./dist --domain my-site --dns
|
|
252
293
|
```
|
|
253
294
|
|
|
295
|
+
### Full-Stack Projects
|
|
296
|
+
|
|
297
|
+
PinMe can also create and deploy a full-stack project template with frontend, Worker backend, and database migrations.
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
# Login with the browser-based flow
|
|
301
|
+
pinme login
|
|
302
|
+
|
|
303
|
+
# Create a new project from the PinMe worker template
|
|
304
|
+
pinme create my-app
|
|
305
|
+
|
|
306
|
+
# Enter the project and deploy frontend + backend + database
|
|
307
|
+
cd my-app
|
|
308
|
+
pinme save
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
Use targeted update commands when only one layer changed:
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
# Deploy frontend only
|
|
315
|
+
pinme update-web
|
|
316
|
+
|
|
317
|
+
# Deploy backend Worker only
|
|
318
|
+
pinme update-worker
|
|
319
|
+
|
|
320
|
+
# Run database SQL migrations only
|
|
321
|
+
pinme update-db
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Delete a platform project when needed:
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
# From a PinMe project directory
|
|
328
|
+
pinme delete
|
|
329
|
+
|
|
330
|
+
# Or specify a project name
|
|
331
|
+
pinme delete my-app
|
|
332
|
+
|
|
333
|
+
# Skip confirmation
|
|
334
|
+
pinme delete my-app --force
|
|
335
|
+
```
|
|
336
|
+
|
|
254
337
|
### Import CAR files
|
|
255
338
|
|
|
256
339
|
```bash
|
|
340
|
+
# Login is required before import
|
|
341
|
+
pinme login
|
|
342
|
+
|
|
257
343
|
# Interactive CAR import
|
|
258
344
|
pinme import
|
|
259
345
|
|
|
@@ -310,6 +396,12 @@ pinme rm <IPFS_hash>
|
|
|
310
396
|
### Authentication (AppKey)
|
|
311
397
|
|
|
312
398
|
```bash
|
|
399
|
+
# Browser login, recommended for full-stack project commands
|
|
400
|
+
pinme login
|
|
401
|
+
|
|
402
|
+
# Use a specific environment when needed
|
|
403
|
+
pinme login --env test
|
|
404
|
+
|
|
313
405
|
# Set AppKey for login and domain binding
|
|
314
406
|
pinme set-appkey
|
|
315
407
|
|
|
@@ -376,7 +468,7 @@ The selected directory must meet:
|
|
|
376
468
|
Upload files and bind them to a custom domain. **Domain binding deducts from your wallet balance.**
|
|
377
469
|
|
|
378
470
|
```bash
|
|
379
|
-
pinme
|
|
471
|
+
pinme bind [path] [options]
|
|
380
472
|
```
|
|
381
473
|
|
|
382
474
|
**Options:**
|
|
@@ -389,6 +481,9 @@ pinme upload <path> [options]
|
|
|
389
481
|
# Interactive mode (will prompt for path and domain)
|
|
390
482
|
pinme bind
|
|
391
483
|
|
|
484
|
+
# Bind a path with the dedicated bind command
|
|
485
|
+
pinme bind ./dist --domain my-site
|
|
486
|
+
|
|
392
487
|
# Bind to a Pinme subdomain (auto-detected: no dot in domain)
|
|
393
488
|
pinme upload ./dist --domain my-site
|
|
394
489
|
|
|
@@ -405,12 +500,13 @@ pinme upload ./dist --domain my-site --dns
|
|
|
405
500
|
- Use `--dns` or `-D` flag to force DNS domain mode when needed
|
|
406
501
|
|
|
407
502
|
**Requirements:**
|
|
503
|
+
- Login or AppKey authentication is required before upload/bind
|
|
408
504
|
- Sufficient wallet balance is required for domain binding
|
|
409
505
|
- Valid AppKey must be set (run: `pinme set-appkey <AppKey>`)
|
|
410
506
|
- For DNS domains, you must own the domain
|
|
411
507
|
|
|
412
508
|
**URL Formats:**
|
|
413
|
-
- Pinme subdomain: `https://<name
|
|
509
|
+
- Pinme subdomain: `https://<name>.<root-domain>`
|
|
414
510
|
- DNS domain: `https://<your-domain>`
|
|
415
511
|
|
|
416
512
|
**DNS Setup:**
|
|
@@ -426,7 +522,10 @@ pinme upload [path] [--domain <name>]
|
|
|
426
522
|
|
|
427
523
|
**Options:**
|
|
428
524
|
- `path`: Path to the file or directory to upload (optional, interactive if not provided)
|
|
429
|
-
- `-d, --domain <name>`: Pinme subdomain to bind after upload (optional, requires wallet balance)
|
|
525
|
+
- `-d, --domain <name>`: Pinme subdomain or DNS domain to bind after upload (optional, requires wallet balance)
|
|
526
|
+
- `--dns`, `-D`: Force DNS domain mode
|
|
527
|
+
|
|
528
|
+
**Authentication:** This command requires login. Run `pinme login` first, or configure `pinme set-appkey <AppKey>`.
|
|
430
529
|
|
|
431
530
|
**Examples:**
|
|
432
531
|
```bash
|
|
@@ -442,6 +541,14 @@ pinme upload ./example.jpg
|
|
|
442
541
|
|
|
443
542
|
**Note:** Domain binding during upload requires available wallet balance. Use the `bind` command for domain binding.
|
|
444
543
|
|
|
544
|
+
**Printed URL priority:** PinMe displays the best available final URL in this order:
|
|
545
|
+
1. DNS domain, for example `https://example.com`
|
|
546
|
+
2. Pinme subdomain, for example `https://my-site.<root-domain>`
|
|
547
|
+
3. Short URL returned by the upload service
|
|
548
|
+
4. Hash preview URL, for example `https://pinme.eth.limo/#/preview/*`
|
|
549
|
+
|
|
550
|
+
When the backend returns a Pinme subdomain without the root domain, the CLI automatically appends the current root domain before printing it.
|
|
551
|
+
|
|
445
552
|
### `import`
|
|
446
553
|
|
|
447
554
|
Import CAR (Content Addressable aRchive) files to the IPFS network. This command is specifically designed for importing CAR files while maintaining their original structure. Supports binding to a Pinme subdomain after import.
|
|
@@ -454,6 +561,8 @@ pinme import [path] [--domain <name>]
|
|
|
454
561
|
- `path`: Path to the CAR file to import (optional, if not provided, interactive mode will be entered)
|
|
455
562
|
- `-d, --domain <name>`: Pinme subdomain to bind after import (optional)
|
|
456
563
|
|
|
564
|
+
**Authentication:** This command requires login. Run `pinme login` first, or configure `pinme set-appkey <AppKey>`.
|
|
565
|
+
|
|
457
566
|
**Examples:**
|
|
458
567
|
```bash
|
|
459
568
|
# Interactive CAR import
|
|
@@ -540,7 +649,16 @@ Set AppKey for authentication and automatically merge anonymous upload history t
|
|
|
540
649
|
pinme set-appkey [AppKey]
|
|
541
650
|
```
|
|
542
651
|
|
|
543
|
-
**Note:**
|
|
652
|
+
**Note:** Domain binding requires authentication and sufficient wallet balance. Get your AppKey from [PinMe website](https://pinme.eth.limo/) or use `pinme login`.
|
|
653
|
+
|
|
654
|
+
### `login`
|
|
655
|
+
|
|
656
|
+
Start the browser-based login flow. After login, anonymous upload history is merged into the logged-in account.
|
|
657
|
+
|
|
658
|
+
```bash
|
|
659
|
+
pinme login
|
|
660
|
+
pinme login --env test
|
|
661
|
+
```
|
|
544
662
|
|
|
545
663
|
### `show-appkey` / `appkey`
|
|
546
664
|
|
|
@@ -564,6 +682,66 @@ pinme wallet-balance
|
|
|
564
682
|
pinme balance
|
|
565
683
|
```
|
|
566
684
|
|
|
685
|
+
### `create`
|
|
686
|
+
|
|
687
|
+
Create a new full-stack project from the PinMe Worker template. This creates the platform Worker/database, downloads the template, installs dependencies, injects API configuration, builds the frontend, uploads it, and writes project settings to `pinme.toml`.
|
|
688
|
+
|
|
689
|
+
```bash
|
|
690
|
+
pinme create [name]
|
|
691
|
+
pinme create my-app
|
|
692
|
+
pinme create my-app --force
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
**Project layout:**
|
|
696
|
+
- `frontend/`: Static frontend application
|
|
697
|
+
- `backend/`: Worker backend source and metadata
|
|
698
|
+
- `db/`: SQL migration files
|
|
699
|
+
- `pinme.toml`: Project name and deployed frontend URL
|
|
700
|
+
|
|
701
|
+
### `save`
|
|
702
|
+
|
|
703
|
+
Deploy the current full-stack project from its root directory. It installs dependencies, builds and saves the Worker, applies SQL files from `db/`, builds `frontend/`, uploads `frontend/dist`, and updates `pinme.toml` with the final frontend URL.
|
|
704
|
+
|
|
705
|
+
```bash
|
|
706
|
+
pinme save
|
|
707
|
+
pinme save --domain my-site
|
|
708
|
+
pinme save --domain example.com
|
|
709
|
+
```
|
|
710
|
+
|
|
711
|
+
### `update-web`
|
|
712
|
+
|
|
713
|
+
Build and deploy only the frontend from `frontend/`.
|
|
714
|
+
|
|
715
|
+
```bash
|
|
716
|
+
pinme update-web
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
### `update-worker`
|
|
720
|
+
|
|
721
|
+
Build and deploy only the Worker from `backend/`. SQL files and frontend assets are not processed.
|
|
722
|
+
|
|
723
|
+
```bash
|
|
724
|
+
pinme update-worker
|
|
725
|
+
```
|
|
726
|
+
|
|
727
|
+
### `update-db`
|
|
728
|
+
|
|
729
|
+
Upload and execute SQL migrations from the `db/` directory. The total SQL payload is limited to 10MB per run.
|
|
730
|
+
|
|
731
|
+
```bash
|
|
732
|
+
pinme update-db
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
### `delete`
|
|
736
|
+
|
|
737
|
+
Delete a platform project, including Worker, domain binding, and D1 database. Local files are kept unchanged.
|
|
738
|
+
|
|
739
|
+
```bash
|
|
740
|
+
pinme delete
|
|
741
|
+
pinme delete my-app
|
|
742
|
+
pinme delete my-app --force
|
|
743
|
+
```
|
|
744
|
+
|
|
567
745
|
---
|
|
568
746
|
|
|
569
747
|
## Wallet Billing
|
|
@@ -654,8 +832,8 @@ Uploaded files are stored on the IPFS network and accessible through the Glitter
|
|
|
654
832
|
|
|
655
833
|
**After successful upload, you receive:**
|
|
656
834
|
1. IPFS content hash
|
|
657
|
-
2.
|
|
658
|
-
3.
|
|
835
|
+
2. Final public URL, selected by priority: DNS domain > Pinme subdomain > short URL > hash preview URL
|
|
836
|
+
3. Hash preview fallback: `https://pinme.eth.limo/#/preview/*`
|
|
659
837
|
|
|
660
838
|
### Log Locations
|
|
661
839
|
|
|
@@ -668,17 +846,18 @@ Uploaded files are stored on the IPFS network and accessible through the Glitter
|
|
|
668
846
|
|
|
669
847
|
### Preview Page
|
|
670
848
|
- Access uploaded website via preview link: `https://pinme.eth.limo/#/preview/*`
|
|
671
|
-
- Get
|
|
849
|
+
- Get a Pinme subdomain: `https://<name>.<root-domain>`
|
|
850
|
+
- Use a custom DNS domain: `https://<your-domain>`
|
|
672
851
|
|
|
673
852
|
### Login and Management
|
|
674
|
-
- Support
|
|
853
|
+
- Support browser login and AppKey-based authentication
|
|
675
854
|
- View historical upload records
|
|
676
855
|
- Manage uploaded files
|
|
677
856
|
|
|
678
857
|
### Address Binding
|
|
679
|
-
- Bind uploads to fixed addresses (requires
|
|
858
|
+
- Bind uploads to fixed addresses (requires authentication and wallet balance)
|
|
680
859
|
- Convenient for long-term maintenance and access
|
|
681
|
-
- Requires
|
|
860
|
+
- Requires `pinme login` or AppKey setup
|
|
682
861
|
|
|
683
862
|
---
|
|
684
863
|
|
|
@@ -800,6 +979,8 @@ jobs:
|
|
|
800
979
|
- run: pinme upload dist --domain "${{ secrets.PINME_DOMAIN }}"
|
|
801
980
|
```
|
|
802
981
|
|
|
982
|
+
`pinme set-appkey` satisfies the authentication requirement for `pinme upload` in CI.
|
|
983
|
+
|
|
803
984
|
### Supported Build Tools
|
|
804
985
|
|
|
805
986
|
- **Vite**: Builds to `dist/`
|