cloudron 5.3.0 → 5.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudron",
3
- "version": "5.3.0",
3
+ "version": "5.3.2",
4
4
  "license": "MIT",
5
5
  "description": "Cloudron Commandline Tool",
6
6
  "main": "main.js",
@@ -10,7 +10,7 @@
10
10
  "url": "https://git.cloudron.io/cloudron/cloudron-cli.git"
11
11
  },
12
12
  "scripts": {
13
- "test": "./node_modules/.bin/mocha test/*-test.js"
13
+ "test": "./node_modules/.bin/mocha test/test.js"
14
14
  },
15
15
  "bin": {
16
16
  "cloudron": "./bin/cloudron"
@@ -18,7 +18,7 @@
18
18
  "author": "Cloudron Developers <support@cloudron.io>",
19
19
  "dependencies": {
20
20
  "async": "^3.2.4",
21
- "cloudron-manifestformat": "^5.19.1",
21
+ "cloudron-manifestformat": "^5.20.0",
22
22
  "commander": "^9.5.0",
23
23
  "debug": "^4.3.4",
24
24
  "delay": "^5.0.0",
package/src/actions.js CHANGED
@@ -92,7 +92,7 @@ function createRequest(method, apiPath, options) {
92
92
  function requestError(response) {
93
93
  if (response.statusCode === 401) return 'Invalid token. Use cloudron login again.';
94
94
 
95
- return `${response.statusCode} message: ${response.body.message || response.body}`; // body is sometimes just a string like in 401
95
+ return `${response.statusCode} message: ${response.body.message || JSON.stringify(response.body)}`; // body is sometimes just a string like in 401
96
96
  }
97
97
 
98
98
  async function selectDomain(location, options) {
@@ -561,7 +561,7 @@ async function install(localOptions, cmd) {
561
561
  const result = await getManifest(options.appstoreId || '');
562
562
  const { manifest, manifestFilePath } = result;
563
563
 
564
- if (!manifest.dockerImage) {
564
+ if (!manifest.dockerImage) { // not a manifest from appstore
565
565
  const sourceDir = path.dirname(manifestFilePath);
566
566
  const image = options.image || config.getAppConfig(sourceDir).dockerImage;
567
567
 
@@ -773,7 +773,7 @@ async function update(localOptions, cmd) {
773
773
 
774
774
  let data = {};
775
775
 
776
- if (!manifest.dockerImage) {
776
+ if (!manifest.dockerImage) { // not a manifest from appstore
777
777
  const sourceDir = path.dirname(manifestFilePath);
778
778
  const image = options.image || config.getAppConfig(sourceDir).dockerImage;
779
779
 
@@ -144,9 +144,9 @@ describe('Push', function () {
144
144
  });
145
145
 
146
146
  it('can push to directory', function () {
147
- var testFile = __dirname + '/cloudron-test.js';
147
+ var testFile = __dirname + '/test.js';
148
148
  cli(util.format('push --app %s %s /tmp/', app.id, testFile));
149
- var out = cli(util.format('exec --app %s md5sum /tmp/cloudron-test.js', app.id));
149
+ var out = cli(util.format('exec --app %s md5sum /tmp/test.js', app.id));
150
150
  expect(out.stdout).to.contain(md5(testFile));
151
151
  });
152
152
 
@@ -165,9 +165,9 @@ describe('Push', function () {
165
165
  });
166
166
 
167
167
  it('can push a directory', function () {
168
- var testDir = __dirname, testFile = __dirname + '/cloudron-test.js';
168
+ var testDir = __dirname, testFile = __dirname + '/test.js';
169
169
  cli(util.format('push --app %s %s /run', app.id, testDir));
170
- var out = cli(util.format('exec --app %s md5sum /run/' + path.basename(__dirname) + '/cloudron-test.js', app.id));
170
+ var out = cli(util.format('exec --app %s md5sum /run/' + path.basename(__dirname) + '/test.js', app.id));
171
171
  expect(out.stdout).to.contain(md5(testFile));
172
172
  });
173
173