dsh-git-branch-manage 1.0.1 → 1.0.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/lib/client.js +10 -9
- package/package.json +1 -2
package/lib/client.js
CHANGED
|
@@ -3100,7 +3100,7 @@ window.__ModuleLoader__.load({
|
|
|
3100
3100
|
const KEEP_FIELD = "keepWorktrees";
|
|
3101
3101
|
const COPY_FILES_FIELD = "postCreateCopyFiles";
|
|
3102
3102
|
/**
|
|
3103
|
-
* Stages
|
|
3103
|
+
* Stages settings edits over the `dsh-git-branch` Host entry.
|
|
3104
3104
|
*
|
|
3105
3105
|
* The form publishes through a snapshot store because the slot component
|
|
3106
3106
|
* reads through a snapshot selector while both the scope and the local draft
|
|
@@ -3116,7 +3116,7 @@ window.__ModuleLoader__.load({
|
|
|
3116
3116
|
failed = false;
|
|
3117
3117
|
switchFailed = null;
|
|
3118
3118
|
/**
|
|
3119
|
-
* @param scope - the bound configuration form for the `git-
|
|
3119
|
+
* @param scope - the bound configuration form for the `dsh-git-branch` Host entry.
|
|
3120
3120
|
*/
|
|
3121
3121
|
constructor(scope) {
|
|
3122
3122
|
this.scope = scope;
|
|
@@ -4586,10 +4586,11 @@ window.__ModuleLoader__.load({
|
|
|
4586
4586
|
/** Dictionary namespace owned by this plugin. */
|
|
4587
4587
|
const NS = "git-worktree";
|
|
4588
4588
|
/**
|
|
4589
|
-
*
|
|
4590
|
-
*
|
|
4589
|
+
* Host composition entry id from cordis.patch.yml. Configuration forms use
|
|
4590
|
+
* this id; locale and route namespaces are independent. Kept client-local
|
|
4591
|
+
* because the browser bundle must not import the Host plugin.
|
|
4591
4592
|
*/
|
|
4592
|
-
const
|
|
4593
|
+
const PLUGIN_ENTRY_ID = "dsh-git-branch";
|
|
4593
4594
|
/**
|
|
4594
4595
|
* This package's own name — the key `plugins.bundle.config` dispatches by
|
|
4595
4596
|
* (the slot contract keys a bundle's own configuration by the bundle's
|
|
@@ -4614,7 +4615,7 @@ window.__ModuleLoader__.load({
|
|
|
4614
4615
|
zh,
|
|
4615
4616
|
en
|
|
4616
4617
|
}), "git-worktree: dictionaries");
|
|
4617
|
-
const
|
|
4618
|
+
const settingsForm = ctx.configForms.get(PLUGIN_ENTRY_ID);
|
|
4618
4619
|
/** The DSH half of one worktree removal, read from the live snapshots: the
|
|
4619
4620
|
* workspace registration sitting on the directory, whether any of its
|
|
4620
4621
|
* sessions is running (the verb withholds), and the archive set —
|
|
@@ -4678,7 +4679,7 @@ window.__ModuleLoader__.load({
|
|
|
4678
4679
|
});
|
|
4679
4680
|
},
|
|
4680
4681
|
pruneWorktrees: async (createdPath) => {
|
|
4681
|
-
const section =
|
|
4682
|
+
const section = settingsForm.getSnapshot();
|
|
4682
4683
|
if (section.status !== "ready") return void 0;
|
|
4683
4684
|
if ((section.value?.autoPruneWorktrees ?? false) !== true) return void 0;
|
|
4684
4685
|
const keep = section.value?.keepWorktrees ?? 30;
|
|
@@ -4822,13 +4823,13 @@ window.__ModuleLoader__.load({
|
|
|
4822
4823
|
archiveSession: (sessionId) => ctx.workspaces.archiveSession(sessionId),
|
|
4823
4824
|
deleteWorkspace: (workspaceId) => ctx.workspaces.delete(workspaceId)
|
|
4824
4825
|
});
|
|
4825
|
-
const form = new CardForm(
|
|
4826
|
+
const form = new CardForm(settingsForm);
|
|
4826
4827
|
const store = form.bind();
|
|
4827
4828
|
const describeFace = ctx.configForms.describe();
|
|
4828
4829
|
let configDisposer;
|
|
4829
4830
|
const syncCardSeat = () => {
|
|
4830
4831
|
const snapshot = describeFace.getSnapshot();
|
|
4831
|
-
const served = snapshot.status === "ready" && (snapshot.view?.namespaces.some((entry) => entry.ns ===
|
|
4832
|
+
const served = snapshot.status === "ready" && (snapshot.view?.namespaces.some((entry) => entry.ns === PLUGIN_ENTRY_ID) ?? false);
|
|
4832
4833
|
if (served && configDisposer === void 0) configDisposer = ctx.slots.inject("plugins.bundle.config", () => ctx.slots.register({
|
|
4833
4834
|
name: "plugins.bundle.config",
|
|
4834
4835
|
key: PLUGIN_PACKAGE,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-git-branch-manage",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "提供 git 分支与 worktree 管理:输入框工具栏显示当前分支、可原地切换;支持 IDEA 风格分支选择器、远程分支检出、右键操作菜单(新建/重命名/删除/复制)、推送与更新当前分支,以及把分支隔离到独立 worktree 工作区,并管理其创建与删除。",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"!lib/**/*.map",
|
|
46
46
|
"cordis.patch.yml",
|
|
47
47
|
"README.md",
|
|
48
|
-
"README.zh.md",
|
|
49
48
|
"locale/*.json",
|
|
50
49
|
"icon.svg"
|
|
51
50
|
],
|