puter-cli 1.5.4 → 1.5.6
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/.env.example +2 -2
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/commands/sites.js +5 -2
- package/src/commons.js +2 -2
package/.env.example
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# Default Puter's API
|
|
2
|
-
PUTER_API_BASE='
|
|
3
|
-
PUTER_BASE_URL='
|
|
2
|
+
PUTER_API_BASE='http://api.puter.localhost:4100'
|
|
3
|
+
PUTER_BASE_URL='http://puter.localhost:4100'
|
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,20 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [v1.5.6](https://github.com/HeyPuter/puter-cli/compare/v1.5.5...v1.5.6)
|
|
8
|
+
|
|
9
|
+
- fix: default api values [`146eda5`](https://github.com/HeyPuter/puter-cli/commit/146eda560da02f21a04523333b615c9ee2372322)
|
|
10
|
+
|
|
11
|
+
#### [v1.5.5](https://github.com/HeyPuter/puter-cli/compare/v1.5.4...v1.5.5)
|
|
12
|
+
|
|
13
|
+
> 13 February 2025
|
|
14
|
+
|
|
15
|
+
- fix: improve error handling [`d1fa91d`](https://github.com/HeyPuter/puter-cli/commit/d1fa91db09f08238c6be684ffe4688a0064f06cd)
|
|
16
|
+
|
|
7
17
|
#### [v1.5.4](https://github.com/HeyPuter/puter-cli/compare/v1.5.3...v1.5.4)
|
|
8
18
|
|
|
19
|
+
> 13 February 2025
|
|
20
|
+
|
|
9
21
|
- Remove "subdomain deletion" under Known Issues in README.md [`#8`](https://github.com/HeyPuter/puter-cli/pull/8)
|
|
10
22
|
- dev: add last-error command, context, and modules [`#7`](https://github.com/HeyPuter/puter-cli/pull/7)
|
|
11
23
|
- fix: delete a subdomain error message [`ed676dc`](https://github.com/HeyPuter/puter-cli/commit/ed676dc9d1364fabf242098e142a84c305dff177)
|
package/package.json
CHANGED
package/src/commands/sites.js
CHANGED
|
@@ -123,9 +123,12 @@ export async function infoSite(args = []) {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
const data = await response.json();
|
|
126
|
-
|
|
126
|
+
if (Object.keys(data).length==0) {
|
|
127
|
+
console.log(chalk.green(`Site ID: "${uuid}" has been deleted.`));
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
127
130
|
|
|
128
|
-
console.log(chalk.
|
|
131
|
+
console.log(chalk.yellow(`Site ID: "${uuid}" should be deleted.`));
|
|
129
132
|
} catch (error) {
|
|
130
133
|
console.error(chalk.red('Error deleting site:'), error.message);
|
|
131
134
|
return false;
|
package/src/commons.js
CHANGED
|
@@ -10,8 +10,8 @@ dotenv.config();
|
|
|
10
10
|
|
|
11
11
|
export const PROJECT_NAME = 'puter-cli';
|
|
12
12
|
// If you haven't defined your own values in .env file, we'll assume you're running Puter on a local instance:
|
|
13
|
-
export const API_BASE = process.env.PUTER_API_BASE || '
|
|
14
|
-
export const BASE_URL = process.env.PUTER_BASE_URL || '
|
|
13
|
+
export const API_BASE = process.env.PUTER_API_BASE || 'https://api.puter.com';
|
|
14
|
+
export const BASE_URL = process.env.PUTER_BASE_URL || 'https://puter.com';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Get headers with the correct Content-Type for multipart form data.
|