launchpd 1.0.2 → 1.0.5

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 CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Launchpd
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Launchpd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -5,18 +5,20 @@
5
5
  [![npm version](https://img.shields.io/npm/v/launchpd.svg)](https://www.npmjs.com/package/launchpd)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
7
  [![GitHub stars](https://img.shields.io/github/stars/kents00/launchpd.svg?style=social)](https://github.com/kents00/launchpd)
8
+ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=kents00_Launchpd&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=kents00_Launchpd)
9
+ [![DeepSource](https://app.deepsource.com/gh/kents00/Launchpd.svg/?label=resolved+issues&show_trend=true&token=UIl3aQ-ZhB-iXYsoVgn0-spU)](https://app.deepsource.com/gh/kents00/Launchpd/)
8
10
 
9
11
  ---
10
12
 
11
13
  ## Features
12
14
 
13
- * **Blazing Fast**: Deploy folders in seconds with a single command.
14
- * **Project-Based**: Link local folders to subdomains once and deploy without re-typing names.
15
- * **Zero Config**: No complex setup; optionally use `.launchpd.json` for project persistence.
16
- * **Version Control**: Every deployment is versioned with messages. Roll back instantly.
17
- * **Static-Only Security**: Strict validation ensures only high-performance static assets are deployed.
18
- * **Secure**: Private uploads with API key authentication or safe anonymous testing.
19
- * **Auto-Expiration**: Set temporary deployments that delete themselves automatically.
15
+ - **Blazing Fast**: Deploy folders in seconds with a single command.
16
+ - **Project-Based**: Link local folders to subdomains once and deploy without re-typing names.
17
+ - **Zero Config**: No complex setup; optionally use `.launchpd.json` for project persistence.
18
+ - **Version Control**: Every deployment is versioned with messages. Roll back instantly.
19
+ - **Static-Only Security**: Strict validation ensures only high-performance static assets are deployed.
20
+ - **Secure**: Private uploads with API key authentication or safe anonymous testing.
21
+ - **Auto-Expiration**: Set temporary deployments that delete themselves automatically.
20
22
 
21
23
  ## Quick Start
22
24
 
@@ -35,39 +37,45 @@ launchpd deploy .
35
37
  ```bash
36
38
  npm install -g launchpd
37
39
  ```
38
- *Requires **Node.js 20** or higher.*
40
+
41
+ _Requires **Node.js 20** or higher._
39
42
 
40
43
  ---
41
44
 
42
45
  ## Command Reference
43
46
 
44
47
  ### Deployment
45
- | Command | Description |
46
- | :--- | :--- |
47
- | `launchpd init` | Link current folder to a subdomain (persisted in `.launchpd.json`) |
48
- | `launchpd deploy <folder>` | Deploy a local folder (uses linked subdomain if available) |
49
- | `launchpd deploy . -m "Fix layout"` | Deploy with a message (like a git commit) |
50
- | `launchpd deploy . --name site` | Deploy with a custom subdomain explicitly |
51
- | `launchpd deploy . --expires 2h` | Set auto-deletion (e.g., `30m`, `1d`, `7d`) |
52
- | `launchpd deploy . --open` | Deploy and immediately open the site in your browser |
48
+
49
+ | Command | Description |
50
+ | :---------------------------------- | :----------------------------------------------------------------- |
51
+ | `launchpd init` | Link current folder to a subdomain (persisted in `.launchpd.json`) |
52
+ | `launchpd deploy <folder>` | Deploy a local folder (uses linked subdomain if available) |
53
+ | `launchpd deploy . -m "Fix layout"` | Deploy with a message (like a git commit) |
54
+ | `launchpd deploy . --name site` | Deploy with a custom subdomain explicitly |
55
+ | `launchpd deploy . --expires 2h` | Set auto-deletion (e.g., `30m`, `1d`, `7d`) |
56
+ | `launchpd deploy . --open` | Deploy and immediately open the site in your browser |
53
57
 
54
58
  ### Management
55
- | Command | Description |
56
- | :--- | :--- |
57
- | `launchpd status` | Show linked subdomain and latest deployment info |
58
- | `launchpd list` | View your active deployments |
59
- | `launchpd versions <subdomain>` | See version history with messages |
60
- | `launchpd rollback <subdomain>` | Rollback to the previous version |
61
- | `launchpd rollback <subdomain> --to <v>` | Rollback to a specific version number |
59
+
60
+ | Command | Description |
61
+ | :--------------------------------------- | :----------------------------------------------- |
62
+ | `launchpd status` | Show linked subdomain and latest deployment info |
63
+ | `launchpd list` | View your active deployments |
64
+ | `launchpd versions <subdomain>` | See version history with messages |
65
+ | `launchpd rollback <subdomain>` | Rollback to the previous version |
66
+ | `launchpd rollback <subdomain> --to <v>` | Rollback to a specific version number |
62
67
 
63
68
  ### Identity & Auth
64
- | Command | Description |
65
- | :--- | :--- |
69
+
70
+ | Command | Description |
71
+ | :------------------ | :-------------------------------------- |
66
72
  | `launchpd register` | Open the dashboard to create an account |
67
- | `launchpd login` | Authenticate with your API key |
68
- | `launchpd whoami` | Show current account status |
69
- | `launchpd quota` | View storage and site limits |
70
- | `launchpd logout` | Remove stored credentials |
73
+ | `launchpd login` | Authenticate with your API key |
74
+ | `launchpd whoami` | Show current account status |
75
+ | `launchpd quota` | View storage and site limits |
76
+ | `launchpd logout` | Remove stored credentials |
77
+
78
+ **API Key format**: keys start with `lpd_` and are validated before network requests.
71
79
 
72
80
  ---
73
81
 
@@ -75,13 +83,13 @@ npm install -g launchpd
75
83
 
76
84
  While anonymous deployments are great for testing, registered users get more power:
77
85
 
78
- | Feature | Anonymous | Registered (Free) |
79
- | :--- | :--- | :--- |
80
- | **Max Sites** | 3 | 10+ |
81
- | **Storage** | 50MB | 100MB+ |
82
- | **Custom Names** | No | **Yes** |
83
- | **Retention** | 7 Days | **Permanent** |
84
- | **Versions** | 1 per site | 10 per site |
86
+ | Feature | Anonymous | Registered (Free) |
87
+ | :--------------- | :--------- | :---------------- |
88
+ | **Max Sites** | 3 | 10+ |
89
+ | **Storage** | 50MB | 100MB+ |
90
+ | **Custom Names** | No | **Yes** |
91
+ | **Retention** | 7 Days | **Permanent** |
92
+ | **Versions** | 1 per site | 10 per site |
85
93
 
86
94
  Run `launchpd register` to unlock these benefits!
87
95
 
@@ -89,12 +97,25 @@ Run `launchpd register` to unlock these benefits!
89
97
 
90
98
  ## Support
91
99
 
92
- * **Bugs & Feedback**: [GitHub Issues](https://github.com/kents00/launchpd/issues)
93
- * **Website**: [launchpd.cloud](https://launchpd.cloud)
94
- * **Docs**: [launchpd.cloud/docs](https://launchpd.cloud/docs)
100
+ - **Bugs & Feedback**: [GitHub Issues](https://github.com/kents00/launchpd/issues)
101
+ - **Website**: [launchpd.cloud](https://launchpd.cloud)
102
+ - **Docs**: [launchpd.cloud/docs](https://launchpd.cloud/docs)
95
103
 
96
104
  ---
97
105
 
98
106
  ## License
99
107
 
100
108
  [MIT](LICENSE) © [Kent Edoloverio](https://github.com/kents00)
109
+
110
+ ---
111
+
112
+ ## Publishing (Maintainers)
113
+
114
+ Publishing is automated from GitHub Releases. Create a release tag like `v1.0.4` and the workflow will:
115
+
116
+ 1. Extract the version from the tag
117
+ 2. Update `package.json`
118
+ 3. Run tests
119
+ 4. Publish to npm
120
+
121
+ Ensure `NPM_TOKEN` is set in GitHub Actions secrets.
package/bin/cli.js CHANGED
@@ -1,111 +1,147 @@
1
- #!/usr/bin/env node
2
-
3
- import { Command } from 'commander';
4
- import { deploy, list, rollback, versions, init, status, login, logout, register, whoami, quota } from '../src/commands/index.js';
5
-
6
-
7
- const program = new Command();
8
-
9
- program
10
- .name('launchpd')
11
- .description('Deploy static sites instantly to a live URL')
12
- .version('0.1.12');
13
-
14
- program
15
- .command('deploy')
16
- .description('Deploy a folder to a live URL')
17
- .argument('[folder]', 'Path to the folder to deploy', '.')
18
- .option('--name <subdomain>', 'Use a custom subdomain (optional)')
19
- .option('-m, --message <text>', 'Deployment message (optional)')
20
- .option('--expires <time>', 'Auto-delete after time (e.g., 30m, 2h, 1d). Minimum: 30m')
21
- .option('-y, --yes', 'Auto-confirm all prompts')
22
- .option('--force', 'Force deployment even with warnings')
23
- .option('-o, --open', 'Open the site URL in the default browser after deployment')
24
- .option('--verbose', 'Show detailed error information')
25
- .action(async (folder, options) => {
26
- await deploy(folder || '.', options);
27
- });
28
-
29
- program
30
- .command('list')
31
- .description('List your past deployments')
32
- .option('--json', 'Output as JSON')
33
- .option('--local', 'Only show local deployments')
34
- .option('--verbose', 'Show detailed error information')
35
- .action(async (options) => {
36
- await list(options);
37
- });
38
-
39
- program
40
- .command('versions')
41
- .description('List all versions for a subdomain')
42
- .argument('<subdomain>', 'The subdomain to list versions for')
43
- .option('--json', 'Output as JSON')
44
- .option('--to <n>', 'Specific version number to rollback to (use with rollback)')
45
- .option('--verbose', 'Show detailed error information')
46
- .action(async (subdomain, options) => {
47
- await versions(subdomain, options);
48
- });
49
-
50
- program
51
- .command('rollback')
52
- .description('Rollback a subdomain to a previous version')
53
- .argument('<subdomain>', 'The subdomain to rollback')
54
- .option('--to <n>', 'Specific version number to rollback to')
55
- .option('--verbose', 'Show detailed error information')
56
- .action(async (subdomain, options) => {
57
- await rollback(subdomain, options);
58
- });
59
-
60
- program
61
- .command('init')
62
- .description('Initialize a new project in the current directory')
63
- .option('--name <subdomain>', 'Subdomain to link to')
64
- .action(async (options) => {
65
- await init(options);
66
- });
67
-
68
- program
69
- .command('status')
70
- .description('Show current project status')
71
- .action(async () => {
72
- await status();
73
- });
74
-
75
- // Authentication commands
76
- program
77
- .command('login')
78
- .description('Login with your API key')
79
- .action(async () => {
80
- await login();
81
- });
82
-
83
- program
84
- .command('logout')
85
- .description('Clear stored credentials')
86
- .action(async () => {
87
- await logout();
88
- });
89
-
90
- program
91
- .command('register')
92
- .description('Open browser to create a new account')
93
- .action(async () => {
94
- await register();
95
- });
96
-
97
- program
98
- .command('whoami')
99
- .description('Show current user info and quota status')
100
- .action(async () => {
101
- await whoami();
102
- });
103
-
104
- program
105
- .command('quota')
106
- .description('Check current quota and usage')
107
- .action(async () => {
108
- await quota();
109
- });
110
-
111
- program.parseAsync();
1
+ #!/usr/bin/env node
2
+
3
+ import fs from 'node:fs'
4
+ import { Command } from 'commander'
5
+ import updateNotifier from 'update-notifier'
6
+ import {
7
+ deploy,
8
+ list,
9
+ rollback,
10
+ versions,
11
+ init,
12
+ status,
13
+ login,
14
+ logout,
15
+ register,
16
+ whoami,
17
+ quota,
18
+ resendEmailVerification
19
+ } from '../src/commands/index.js'
20
+
21
+ const packageJson = JSON.parse(
22
+ fs.readFileSync(new URL('../package.json', import.meta.url))
23
+ )
24
+ updateNotifier({ pkg: packageJson }).notify()
25
+
26
+ const program = new Command()
27
+
28
+ program
29
+ .name('launchpd')
30
+ .description('Deploy static sites instantly to a live URL')
31
+ .version(packageJson.version)
32
+
33
+ program
34
+ .command('deploy')
35
+ .description('Deploy a folder to a live URL')
36
+ .argument('[folder]', 'Path to the folder to deploy', '.')
37
+ .option('--name <subdomain>', 'Use a custom subdomain (optional)')
38
+ .option('-m, --message <text>', 'Deployment message (optional)')
39
+ .option(
40
+ '--expires <time>',
41
+ 'Auto-delete after time (e.g., 30m, 2h, 1d). Minimum: 30m'
42
+ )
43
+ .option('-y, --yes', 'Auto-confirm all prompts')
44
+ .option('--force', 'Force deployment even with warnings')
45
+ .option(
46
+ '-o, --open',
47
+ 'Open the site URL in the default browser after deployment'
48
+ )
49
+ .option('--verbose', 'Show detailed error information')
50
+ .option('--qr', 'Show QR code for deployment')
51
+ .action(async (folder, options) => {
52
+ await deploy(folder || '.', options)
53
+ })
54
+
55
+ program
56
+ .command('list')
57
+ .description('List your past deployments')
58
+ .option('--json', 'Output as JSON')
59
+ .option('--local', 'Only show local deployments')
60
+ .option('--verbose', 'Show detailed error information')
61
+ .action(async (options) => {
62
+ await list(options)
63
+ })
64
+
65
+ program
66
+ .command('versions')
67
+ .description('List all versions for a subdomain')
68
+ .argument('<subdomain>', 'The subdomain to list versions for')
69
+ .option('--json', 'Output as JSON')
70
+ .option(
71
+ '--to <n>',
72
+ 'Specific version number to rollback to (use with rollback)'
73
+ )
74
+ .option('--verbose', 'Show detailed error information')
75
+ .action(async (subdomain, options) => {
76
+ await versions(subdomain, options)
77
+ })
78
+
79
+ program
80
+ .command('rollback')
81
+ .description('Rollback a subdomain to a previous version')
82
+ .argument('<subdomain>', 'The subdomain to rollback')
83
+ .option('--to <n>', 'Specific version number to rollback to')
84
+ .option('--verbose', 'Show detailed error information')
85
+ .action(async (subdomain, options) => {
86
+ await rollback(subdomain, options)
87
+ })
88
+
89
+ program
90
+ .command('init')
91
+ .description('Initialize a new project in the current directory')
92
+ .option('--name <subdomain>', 'Subdomain to link to')
93
+ .action(async (options) => {
94
+ await init(options)
95
+ })
96
+
97
+ program
98
+ .command('status')
99
+ .description('Show current project status')
100
+ .action(async () => {
101
+ await status()
102
+ })
103
+
104
+ // Authentication commands
105
+ program
106
+ .command('login')
107
+ .description('Login with your API key')
108
+ .action(async () => {
109
+ await login()
110
+ })
111
+
112
+ program
113
+ .command('logout')
114
+ .description('Clear stored credentials')
115
+ .action(async () => {
116
+ await logout()
117
+ })
118
+
119
+ program
120
+ .command('register')
121
+ .description('Open browser to create a new account')
122
+ .action(async () => {
123
+ await register()
124
+ })
125
+
126
+ program
127
+ .command('whoami')
128
+ .description('Show current user info and quota status')
129
+ .action(async () => {
130
+ await whoami()
131
+ })
132
+
133
+ program
134
+ .command('quota')
135
+ .description('Check current quota and usage')
136
+ .action(async () => {
137
+ await quota()
138
+ })
139
+
140
+ program
141
+ .command('verify')
142
+ .description('Resend email verification')
143
+ .action(async () => {
144
+ await resendEmailVerification()
145
+ })
146
+
147
+ program.parseAsync()
package/bin/setup.js CHANGED
@@ -1,40 +1,42 @@
1
- #!/usr/bin/env node
2
-
3
- import { config } from '../src/config.js';
4
- import { info, success } from '../src/utils/logger.js';
5
- import chalk from 'chalk';
6
-
7
- /**
8
- * Setup script to display CLI information
9
- */
10
- async function setup() {
11
- console.log('\n' + chalk.bold.blue('═══════════════════════════════════════'));
12
- console.log(chalk.bold.blue(' Launchpd CLI'));
13
- console.log(chalk.bold.blue('═══════════════════════════════════════\n'));
14
-
15
- info('Launchpd is ready to use!\n');
16
-
17
- console.log(chalk.bold('Configuration:'));
18
- console.log(chalk.gray('─'.repeat(50)));
19
- console.log(chalk.cyan(' Domain: '), config.domain);
20
- console.log(chalk.cyan(' API: '), config.apiUrl);
21
- console.log(chalk.cyan(' Version: '), config.version);
22
- console.log(chalk.gray('─'.repeat(50)) + '\n');
23
-
24
- console.log(chalk.bold('Quick Start:'));
25
- console.log(chalk.gray(' Deploy your first site:'));
26
- console.log(chalk.cyan(' launchpd deploy ./your-folder\n'));
27
-
28
- console.log(chalk.gray(' Login for more quota:'));
29
- console.log(chalk.cyan(' launchpd login\n'));
30
-
31
- console.log(chalk.gray(' List your deployments:'));
32
- console.log(chalk.cyan(' launchpd list\n'));
33
-
34
- success('No configuration needed - just deploy!');
35
- }
36
-
37
- setup().catch(err => {
38
- console.error(`Setup failed: ${err.message}`);
39
- process.exit(1);
40
- });
1
+ import { config } from '../src/config.js'
2
+ import { info, success } from '../src/utils/logger.js'
3
+ import chalk from 'chalk'
4
+
5
+ /**
6
+ * Setup script to display CLI information
7
+ */
8
+ async function setup () {
9
+ console.log(
10
+ '\n' + chalk.bold.blue('═══════════════════════════════════════')
11
+ )
12
+ console.log(chalk.bold.blue(' Launchpd CLI'))
13
+ console.log(chalk.bold.blue('═══════════════════════════════════════\n'))
14
+
15
+ info('Launchpd is ready to use!\n')
16
+
17
+ console.log(chalk.bold('Configuration:'))
18
+ console.log(chalk.gray('─'.repeat(50)))
19
+ console.log(chalk.cyan(' Domain: '), config.domain)
20
+ console.log(chalk.cyan(' API: '), config.apiUrl)
21
+ console.log(chalk.cyan(' Version: '), config.version)
22
+ console.log(chalk.gray('─'.repeat(50)) + '\n')
23
+
24
+ console.log(chalk.bold('Quick Start:'))
25
+ console.log(chalk.gray(' Deploy your first site:'))
26
+ console.log(chalk.cyan(' launchpd deploy ./your-folder\n'))
27
+
28
+ console.log(chalk.gray(' Login for more quota:'))
29
+ console.log(chalk.cyan(' launchpd login\n'))
30
+
31
+ console.log(chalk.gray(' List your deployments:'))
32
+ console.log(chalk.cyan(' launchpd list\n'))
33
+
34
+ success('No configuration needed - just deploy!')
35
+ }
36
+
37
+ try {
38
+ await setup()
39
+ } catch (err) {
40
+ console.error(`Setup failed: ${err.message}`)
41
+ process.exit(1)
42
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "launchpd",
3
- "version": "1.0.2",
3
+ "version": "1.0.5",
4
4
  "description": "Deploy static sites instantly to a live URL",
5
5
  "keywords": [
6
6
  "static",
@@ -54,13 +54,15 @@
54
54
  "launchpd": "^1.0.0",
55
55
  "mime-types": "^2.1.35",
56
56
  "nanoid": "^5.1.0",
57
- "ora": "^8.0.1"
57
+ "ora": "^8.0.1",
58
+ "qrcode": "^1.5.4",
59
+ "update-notifier": "^7.3.1"
58
60
  },
59
61
  "devDependencies": {
60
62
  "@eslint/js": "^9.39.2",
61
- "@vitest/coverage-v8": "^4.0.17",
63
+ "@vitest/coverage-v8": "^4.0.18",
62
64
  "eslint": "^9.0.0",
63
- "vitest": "^4.0.17"
65
+ "vitest": "^4.0.18"
64
66
  },
65
67
  "engines": {
66
68
  "node": ">=20.0.0"