@lapis-notes/workspace 0.3.4 → 0.3.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/CHANGELOG.md +27 -0
- package/dist/plugin-management/PluginBrowser.svelte +1 -4
- package/dist/plugin-management/PluginRegistrySettingsPage.svelte +5 -5
- package/dist/plugin-management/plugin-registry-controller.svelte.d.ts +2 -0
- package/dist/plugin-management/plugin-registry-controller.svelte.js +30 -13
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @lapis-notes/workspace
|
|
2
2
|
|
|
3
|
+
## 0.3.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#85](https://github.com/lapismd/lapis-notes/pull/85)
|
|
8
|
+
[`8325b5e`](https://github.com/lapismd/lapis-notes/commit/8325b5eb7adef358ac577b457278a19637c13571)
|
|
9
|
+
Thanks [@stevejuma](https://github.com/stevejuma)! - Reuse scanned identities
|
|
10
|
+
during unchanged startup, exclude installed plugin assets from content
|
|
11
|
+
polling, avoid eagerly reading lazy ESM chunks, queue plugin operations with
|
|
12
|
+
independent progress and cancellation, and enable bundled AI by default on the
|
|
13
|
+
Rust server.
|
|
14
|
+
|
|
15
|
+
Renew the native AI feature session after disable/re-enable so startup
|
|
16
|
+
recovery cannot reuse a fenced session.
|
|
17
|
+
|
|
18
|
+
- [#82](https://github.com/lapismd/lapis-notes/pull/82)
|
|
19
|
+
[`e7b96fb`](https://github.com/lapismd/lapis-notes/commit/e7b96fb7f901c6ffff7e92815b29a82bea5c5264)
|
|
20
|
+
Thanks
|
|
21
|
+
[@lapismd-dependency-bot](https://github.com/apps/lapismd-dependency-bot)! -
|
|
22
|
+
Refresh first-party Lapis dependencies to the published versions recorded in
|
|
23
|
+
this pull request.
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
[[`8325b5e`](https://github.com/lapismd/lapis-notes/commit/8325b5eb7adef358ac577b457278a19637c13571),
|
|
26
|
+
[`e7b96fb`](https://github.com/lapismd/lapis-notes/commit/e7b96fb7f901c6ffff7e92815b29a82bea5c5264)]:
|
|
27
|
+
- @lapis-notes/api@0.2.7
|
|
28
|
+
- @lapis-notes/ui@0.1.8
|
|
29
|
+
|
|
3
30
|
## 0.3.4
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -131,10 +131,7 @@
|
|
|
131
131
|
registry.actionFeedback?.pluginId === selected.id
|
|
132
132
|
? registry.actionFeedback
|
|
133
133
|
: null;
|
|
134
|
-
if (
|
|
135
|
-
registry.runningAction === `install:${selected.id}` ||
|
|
136
|
-
registry.runningAction === `update:${selected.id}`
|
|
137
|
-
)
|
|
134
|
+
if (registry.isPluginActionPending(selected.id))
|
|
138
135
|
return { state: "installing" };
|
|
139
136
|
if (feedback?.state === "error")
|
|
140
137
|
return { state: "rejected", reason: feedback.message };
|
|
@@ -771,8 +771,9 @@
|
|
|
771
771
|
size="icon"
|
|
772
772
|
variant="outline"
|
|
773
773
|
aria-label={`Update ${installedName(record)}`}
|
|
774
|
-
disabled={registry.
|
|
775
|
-
|
|
774
|
+
disabled={registry.isPluginActionPending(
|
|
775
|
+
record.pluginId,
|
|
776
|
+
)}
|
|
776
777
|
onclick={() => void updatePlugin(update)}
|
|
777
778
|
><ArrowUpCircle /></Button.Root
|
|
778
779
|
>
|
|
@@ -922,8 +923,7 @@
|
|
|
922
923
|
><Check data-icon="inline-start" />Bundled</Button.Root
|
|
923
924
|
>
|
|
924
925
|
{:else}
|
|
925
|
-
{@const installing =
|
|
926
|
-
registry.runningAction === `install:${entry.id}`}
|
|
926
|
+
{@const installing = registry.isPluginActionPending(entry.id)}
|
|
927
927
|
<Button.Root
|
|
928
928
|
size="sm"
|
|
929
929
|
aria-label={installing
|
|
@@ -1041,7 +1041,7 @@
|
|
|
1041
1041
|
variant="outline"
|
|
1042
1042
|
aria-label={`Update ${update.name}`}
|
|
1043
1043
|
disabled={!update.canUpdate ||
|
|
1044
|
-
registry.
|
|
1044
|
+
registry.isPluginActionPending(update.id)}
|
|
1045
1045
|
onclick={() => void updatePlugin(update)}
|
|
1046
1046
|
><ArrowUpCircle /></Button.Root
|
|
1047
1047
|
>
|
|
@@ -14,6 +14,8 @@ export declare class PluginRegistryController {
|
|
|
14
14
|
initialLoading: boolean;
|
|
15
15
|
refreshing: boolean;
|
|
16
16
|
runningAction: string | null;
|
|
17
|
+
pendingPluginActions: Record<string, true>;
|
|
18
|
+
isPluginActionPending(pluginId: string): boolean;
|
|
17
19
|
actionFeedback: PluginRegistryActionFeedback | null;
|
|
18
20
|
pluginLifecycleRevision: number;
|
|
19
21
|
private references;
|
|
@@ -25,6 +25,10 @@ export class PluginRegistryController {
|
|
|
25
25
|
initialLoading = $state(true);
|
|
26
26
|
refreshing = $state(false);
|
|
27
27
|
runningAction = $state(null);
|
|
28
|
+
pendingPluginActions = $state({});
|
|
29
|
+
isPluginActionPending(pluginId) {
|
|
30
|
+
return this.pendingPluginActions[pluginId] === true;
|
|
31
|
+
}
|
|
28
32
|
actionFeedback = $state(null);
|
|
29
33
|
pluginLifecycleRevision = $state(0);
|
|
30
34
|
references = 0;
|
|
@@ -110,20 +114,32 @@ export class PluginRegistryController {
|
|
|
110
114
|
this.refreshTask = null;
|
|
111
115
|
}
|
|
112
116
|
async runPluginAction(actionId, pluginId, title, action) {
|
|
113
|
-
if (this.
|
|
117
|
+
if (this.isPluginActionPending(pluginId))
|
|
114
118
|
return;
|
|
115
|
-
this.
|
|
116
|
-
|
|
119
|
+
this.pendingPluginActions = {
|
|
120
|
+
...this.pendingPluginActions,
|
|
121
|
+
[pluginId]: true,
|
|
122
|
+
};
|
|
117
123
|
try {
|
|
118
|
-
await withPluginInstallProgress(this.app, { pluginId, title },
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
await withPluginInstallProgress(this.app, { pluginId, title }, async (signal) => {
|
|
125
|
+
this.runningAction = actionId;
|
|
126
|
+
this.actionFeedback = { pluginId, state: "running", message: title };
|
|
127
|
+
try {
|
|
128
|
+
await action(signal);
|
|
129
|
+
await this.refresh(false);
|
|
130
|
+
this.actionFeedback = {
|
|
131
|
+
pluginId,
|
|
132
|
+
state: "success",
|
|
133
|
+
message: actionId.startsWith("update:")
|
|
134
|
+
? "Update installed"
|
|
135
|
+
: "Installed",
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
finally {
|
|
139
|
+
if (this.runningAction === actionId)
|
|
140
|
+
this.runningAction = null;
|
|
141
|
+
}
|
|
142
|
+
});
|
|
127
143
|
}
|
|
128
144
|
catch (error) {
|
|
129
145
|
if (isAbortError(error)) {
|
|
@@ -139,7 +155,8 @@ export class PluginRegistryController {
|
|
|
139
155
|
new Notice(`Plugin registry action failed: ${registryErrorMessage(error)}`, undefined, this.app);
|
|
140
156
|
}
|
|
141
157
|
finally {
|
|
142
|
-
|
|
158
|
+
const { [pluginId]: _finished, ...pending } = this.pendingPluginActions;
|
|
159
|
+
this.pendingPluginActions = pending;
|
|
143
160
|
}
|
|
144
161
|
}
|
|
145
162
|
install(entry, version) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lapis-notes/workspace",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Lapis Notes workspace shell backed by design-core",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@lapis-notes/api": "^0.2.
|
|
42
|
-
"@lapis-notes/ui": "^0.1.
|
|
43
|
-
"@lapismd/design-core": "^0.8.0 || ^0.9.0 || ^0.10.0",
|
|
41
|
+
"@lapis-notes/api": "^0.2.7",
|
|
42
|
+
"@lapis-notes/ui": "^0.1.8",
|
|
43
|
+
"@lapismd/design-core": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.12.0",
|
|
44
44
|
"@lucide/svelte": "^0.523.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|