@frockbot/plugin-package-publisher 0.3.4 → 0.3.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/frockbot.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frockbot/plugin-package-publisher",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
"typecheck": "vue-tsc --noEmit -p tsconfig.json"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@frockbot/kernel-contracts": "0.3.
|
|
27
|
-
"@frockbot/plugin-prompt": "0.3.
|
|
28
|
-
"@frockbot/plugin-tools": "0.3.
|
|
29
|
-
"@frockbot/client-core": "0.3.
|
|
30
|
-
"@frockbot/client-ui": "0.3.
|
|
31
|
-
"@frockbot/plugin-shell": "0.3.
|
|
26
|
+
"@frockbot/kernel-contracts": "0.3.6",
|
|
27
|
+
"@frockbot/plugin-prompt": "0.3.6",
|
|
28
|
+
"@frockbot/plugin-tools": "0.3.6",
|
|
29
|
+
"@frockbot/client-core": "0.3.6",
|
|
30
|
+
"@frockbot/client-ui": "0.3.6",
|
|
31
|
+
"@frockbot/plugin-shell": "0.3.6",
|
|
32
32
|
"cordis": "4.0.0-rc.8",
|
|
33
33
|
"vue": "3.5.41"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@frockbot/computer-core": "0.3.
|
|
37
|
-
"@frockbot/plugin-testkit": "0.3.
|
|
36
|
+
"@frockbot/computer-core": "0.3.6",
|
|
37
|
+
"@frockbot/plugin-testkit": "0.3.6",
|
|
38
38
|
"@types/bun": "1.4.0",
|
|
39
39
|
"@vitejs/plugin-vue": "6.0.8",
|
|
40
40
|
"typescript": "5.9.3",
|
|
@@ -14,8 +14,8 @@ const summary = computed(() => {
|
|
|
14
14
|
const history = publisher.value.history;
|
|
15
15
|
if (!history) return "Not published yet";
|
|
16
16
|
const active = history.activePackageRevision;
|
|
17
|
-
if (active === undefined) return `${history.revisions.length}
|
|
18
|
-
return `
|
|
17
|
+
if (active === undefined) return `${history.revisions.length} versions`;
|
|
18
|
+
return `Version ${active} · in use`;
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
onMounted(() => publisher.value.load());
|
|
@@ -27,7 +27,7 @@ onMounted(() => publisher.value.load());
|
|
|
27
27
|
><UiIcon name="history"
|
|
28
28
|
/></span>
|
|
29
29
|
<span class="publisher-section__text">
|
|
30
|
-
<strong>
|
|
30
|
+
<strong>Published setup</strong>
|
|
31
31
|
<small>{{ summary }}</small>
|
|
32
32
|
</span>
|
|
33
33
|
<UiButton type="button" @click="surfaces.open('package-publisher')">
|
|
@@ -18,8 +18,8 @@ onMounted(() => state.value.load());
|
|
|
18
18
|
<header>
|
|
19
19
|
<h2>Published setup</h2>
|
|
20
20
|
<p>
|
|
21
|
-
Publishing
|
|
22
|
-
|
|
21
|
+
Publishing applies this setup to all of your Bots. You can go back to an
|
|
22
|
+
earlier one at any time.
|
|
23
23
|
</p>
|
|
24
24
|
</header>
|
|
25
25
|
|
|
@@ -30,9 +30,8 @@ onMounted(() => state.value.load());
|
|
|
30
30
|
class="revision-card"
|
|
31
31
|
>
|
|
32
32
|
<div>
|
|
33
|
-
<strong>
|
|
33
|
+
<strong>Version {{ revision.packageRevision }}</strong>
|
|
34
34
|
<small>{{ new Date(revision.publishedAt).toLocaleString() }}</small>
|
|
35
|
-
<code>{{ revision.applicationHash.slice(0, 22) }}…</code>
|
|
36
35
|
</div>
|
|
37
36
|
<span
|
|
38
37
|
v-if="
|
|
@@ -52,7 +51,7 @@ onMounted(() => state.value.load());
|
|
|
52
51
|
</article>
|
|
53
52
|
</div>
|
|
54
53
|
<p v-else-if="!state.error" class="empty-revisions">
|
|
55
|
-
|
|
54
|
+
Nothing published yet.
|
|
56
55
|
</p>
|
|
57
56
|
<p v-if="state.error" class="publisher-error" role="alert">
|
|
58
57
|
{{ state.error }}
|
package/src/client/index.ts
CHANGED
|
@@ -24,7 +24,7 @@ export const packagePublisherClientPlugin: ClientPlugin = (ctx) => {
|
|
|
24
24
|
busy: false,
|
|
25
25
|
async load() {
|
|
26
26
|
if (!ctx.transport.hostedRequest) {
|
|
27
|
-
state.value.error = "
|
|
27
|
+
state.value.error = "Published versions aren't available right now.";
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
try {
|
|
@@ -34,12 +34,14 @@ export const packagePublisherClientPlugin: ClientPlugin = (ctx) => {
|
|
|
34
34
|
state.value.error = undefined;
|
|
35
35
|
} catch (error) {
|
|
36
36
|
state.value.error =
|
|
37
|
-
error instanceof Error
|
|
37
|
+
error instanceof Error
|
|
38
|
+
? error.message
|
|
39
|
+
: "Couldn't load past versions.";
|
|
38
40
|
}
|
|
39
41
|
},
|
|
40
42
|
async rollback(packageRevision: number) {
|
|
41
43
|
if (!ctx.transport.hostedRequest || !state.value.history) {
|
|
42
|
-
throw new Error("
|
|
44
|
+
throw new Error("Published versions aren't available right now.");
|
|
43
45
|
}
|
|
44
46
|
state.value.busy = true;
|
|
45
47
|
try {
|