cloudron 7.1.1 → 7.1.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/bin/cloudron +2 -1
- package/package.json +1 -1
- package/src/login-success.html +20 -9
- package/src/versions-actions.js +16 -7
package/bin/cloudron
CHANGED
|
@@ -418,7 +418,8 @@ versionsCommand.command('list')
|
|
|
418
418
|
.action(versionsActions.list);
|
|
419
419
|
|
|
420
420
|
versionsCommand.command('revoke')
|
|
421
|
-
.description('Revoke
|
|
421
|
+
.description('Revoke a version')
|
|
422
|
+
.option('--version <version>', 'Version to revoke (defaults to latest)')
|
|
422
423
|
.action(versionsActions.revoke);
|
|
423
424
|
|
|
424
425
|
versionsCommand.command('update')
|
package/package.json
CHANGED
package/src/login-success.html
CHANGED
|
@@ -2,38 +2,49 @@
|
|
|
2
2
|
<head>
|
|
3
3
|
<meta charset="utf-8">
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
|
-
<title>
|
|
5
|
+
<title>Authentication successful</title>
|
|
6
6
|
<style>
|
|
7
7
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
8
8
|
body {
|
|
9
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
9
|
+
font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
10
10
|
min-height: 100vh;
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
justify-content: center;
|
|
14
|
-
background: #
|
|
14
|
+
background: #f3f4f6;
|
|
15
15
|
color: #333;
|
|
16
16
|
}
|
|
17
17
|
.card {
|
|
18
18
|
text-align: center;
|
|
19
19
|
background: #fff;
|
|
20
|
-
border-radius:
|
|
20
|
+
border-radius: 4px;
|
|
21
21
|
padding: 48px 40px;
|
|
22
|
-
box-shadow: 0 2px
|
|
23
|
-
max-width: 420px;
|
|
22
|
+
box-shadow: 0 2px 5px rgba(0,0,0,.1);
|
|
24
23
|
}
|
|
25
24
|
.icon {
|
|
26
25
|
width: 64px; height: 64px;
|
|
27
26
|
margin: 0 auto 24px;
|
|
28
|
-
background: #
|
|
27
|
+
background: #1a76bf21;
|
|
29
28
|
border-radius: 50%;
|
|
30
29
|
display: flex;
|
|
31
30
|
align-items: center;
|
|
32
31
|
justify-content: center;
|
|
33
32
|
}
|
|
34
|
-
.icon svg { width: 32px; height: 32px; color: #
|
|
33
|
+
.icon svg { width: 32px; height: 32px; color: #1a76bf; }
|
|
35
34
|
h1 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
|
|
36
35
|
p { font-size: 15px; color: #666; line-height: 1.5; }
|
|
36
|
+
@media (prefers-color-scheme: dark) {
|
|
37
|
+
body {
|
|
38
|
+
background-color: black;
|
|
39
|
+
color: white;
|
|
40
|
+
}
|
|
41
|
+
.card {
|
|
42
|
+
background: #15181f;
|
|
43
|
+
}
|
|
44
|
+
p {
|
|
45
|
+
color: #aaa;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
37
48
|
</style>
|
|
38
49
|
</head>
|
|
39
50
|
<body>
|
|
@@ -43,7 +54,7 @@
|
|
|
43
54
|
<polyline points="20 6 9 17 4 12"/>
|
|
44
55
|
</svg>
|
|
45
56
|
</div>
|
|
46
|
-
<h1>Authentication
|
|
57
|
+
<h1>Authentication successful</h1>
|
|
47
58
|
<p>You can close this tab and return to your command line.</p>
|
|
48
59
|
</div>
|
|
49
60
|
</body>
|
package/src/versions-actions.js
CHANGED
|
@@ -252,21 +252,30 @@ async function list(/*localOptions, cmd*/) {
|
|
|
252
252
|
console.log(t.toString());
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
async function revoke() {
|
|
255
|
+
async function revoke(localOptions, cmd) {
|
|
256
256
|
const versionsFilePath = await locateVersions();
|
|
257
257
|
if (!versionsFilePath) return exit(NO_VERSIONS_FOUND_ERROR_STRING);
|
|
258
258
|
|
|
259
|
+
const options = cmd.optsWithGlobals();
|
|
259
260
|
const versionsRoot = await readVersions(versionsFilePath);
|
|
260
261
|
const versions = versionsRoot.versions;
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
if (
|
|
264
|
-
|
|
262
|
+
|
|
263
|
+
let targetVersion;
|
|
264
|
+
if (options.version) {
|
|
265
|
+
if (!(options.version in versions)) exit(`${options.version} does not exist in ${path.relative(process.cwd(), versionsFilePath)}.`);
|
|
266
|
+
targetVersion = options.version;
|
|
267
|
+
} else {
|
|
268
|
+
const sortedVersions = Object.keys(versions).sort(manifestFormat.packageVersionCompare);
|
|
269
|
+
targetVersion = sortedVersions.at(-1);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (versions[targetVersion].publishState !== PUBLISH_STATE_PUBLISHED) {
|
|
273
|
+
return exit(`Only versions in "${PUBLISH_STATE_PUBLISHED}" can be revoked. ${targetVersion} is currently marked as "${versions[targetVersion].publishState}"`);
|
|
265
274
|
}
|
|
266
275
|
|
|
267
|
-
versions[
|
|
276
|
+
versions[targetVersion].publishState = PUBLISH_STATE_REVOKED;
|
|
268
277
|
await writeVersions(versionsFilePath, versionsRoot);
|
|
269
|
-
console.log(`Marked ${
|
|
278
|
+
console.log(`Marked ${targetVersion} as revoked in ${path.relative(process.cwd(), versionsFilePath)}`);
|
|
270
279
|
}
|
|
271
280
|
|
|
272
281
|
export default {
|