@dsh-workbench/shared 0.1.2 → 0.1.4
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/dist/api/host-write.d.ts +1 -0
- package/dist/api/host-write.js +7 -1
- package/dist/api/workbench-contract.d.ts +1 -1
- package/dist/components/ApprovalDetail.css +4 -0
- package/dist/components/ApprovalDetail.d.ts +1 -0
- package/dist/components/ApprovalDetail.js +5 -1
- package/dist/components/CardHead.css +92 -0
- package/dist/components/CardHead.d.ts +1 -0
- package/dist/components/CardHead.js +9 -7
- package/dist/components/ChoiceGroup.css +75 -0
- package/dist/components/ChoiceGroup.d.ts +1 -0
- package/dist/components/ChoiceGroup.js +1 -0
- package/dist/components/LongTaskRow.css +53 -0
- package/dist/components/LongTaskRow.d.ts +3 -0
- package/dist/components/LongTaskRow.js +11 -11
- package/dist/components/MockStrip.css +39 -0
- package/dist/components/MockStrip.d.ts +1 -0
- package/dist/components/MockStrip.js +1 -0
- package/dist/components/ResourceStates.css +111 -0
- package/dist/components/ResourceStates.d.ts +2 -1
- package/dist/components/ResourceStates.js +1 -0
- package/dist/components/SaveBar.css +7 -0
- package/dist/components/SaveBar.d.ts +1 -0
- package/dist/components/SaveBar.js +4 -2
- package/dist/components/TextField.css +22 -0
- package/dist/components/TextField.d.ts +6 -0
- package/dist/components/TextField.js +5 -0
- package/dist/components/icons.d.ts +0 -12
- package/dist/components/icons.js +0 -61
- package/dist/host/http.js +5 -29
- package/dist/host/provision.d.ts +18 -1
- package/dist/host/provision.js +73 -0
- package/dist/host.d.ts +8 -0
- package/dist/host.js +8 -0
- package/dist/i18n/en.js +126 -1
- package/dist/i18n/index.d.ts +129 -4
- package/dist/i18n/zh.d.ts +128 -3
- package/dist/i18n/zh.js +128 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -3
- package/src/api/__tests__/host-write.test.ts +20 -0
- package/src/api/host-write.ts +17 -3
- package/src/api/workbench-contract.ts +5 -1
- package/src/components/ApprovalDetail.css +4 -0
- package/src/components/ApprovalDetail.tsx +11 -1
- package/src/components/CardHead.css +92 -0
- package/src/components/CardHead.tsx +43 -31
- package/src/components/ChoiceGroup.css +75 -0
- package/src/components/ChoiceGroup.tsx +1 -0
- package/src/components/LongTaskRow.css +53 -0
- package/src/components/LongTaskRow.tsx +52 -13
- package/src/components/MockStrip.css +39 -0
- package/src/components/MockStrip.tsx +1 -0
- package/src/components/ResourceStates.css +111 -0
- package/src/components/ResourceStates.tsx +2 -1
- package/src/components/SaveBar.css +7 -0
- package/src/components/SaveBar.tsx +8 -5
- package/src/components/TextField.css +22 -0
- package/src/components/TextField.tsx +17 -0
- package/src/components/icons.tsx +0 -164
- package/src/host/__tests__/provision.test.ts +90 -0
- package/src/host/http.ts +5 -33
- package/src/host/provision.ts +87 -0
- package/src/host.ts +8 -0
- package/src/i18n/en.ts +127 -1
- package/src/i18n/zh.ts +128 -4
- package/src/index.ts +1 -1
- package/dist/components/StateDot.d.ts +0 -5
- package/dist/components/StateDot.js +0 -10
- package/dist/host/__tests__/fakes.d.ts +0 -41
- package/dist/host/__tests__/fakes.js +0 -76
- package/dist/host/__tests__/preflight-fixtures.d.ts +0 -19
- package/dist/host/__tests__/preflight-fixtures.js +0 -47
- package/dist/host/context-inject.d.ts +0 -24
- package/dist/host/context-inject.js +0 -74
- package/dist/host/events.d.ts +0 -9
- package/dist/host/events.js +0 -70
- package/dist/host/mount-units.d.ts +0 -52
- package/dist/host/mount-units.js +0 -186
- package/dist/host/preflight.d.ts +0 -58
- package/dist/host/preflight.js +0 -233
- package/dist/host/probe-cache.d.ts +0 -6
- package/dist/host/probe-cache.js +0 -19
- package/dist/host/probe-libs.d.ts +0 -45
- package/dist/host/probe-libs.js +0 -61
- package/dist/host/probe-units.d.ts +0 -17
- package/dist/host/probe-units.js +0 -102
- package/dist/host/probe-verdict.d.ts +0 -7
- package/dist/host/probe-verdict.js +0 -143
- package/dist/host/tool-scope.d.ts +0 -32
- package/dist/host/tool-scope.js +0 -84
- package/dist/host/unit-readiness.d.ts +0 -7
- package/dist/host/unit-readiness.js +0 -5
- package/dist/host/unit-registry.d.ts +0 -9
- package/dist/host/unit-registry.js +0 -33
- package/dist/host/version-range.d.ts +0 -2
- package/dist/host/version-range.js +0 -73
- package/src/components/StateDot.tsx +0 -31
package/src/components/icons.tsx
CHANGED
|
@@ -31,170 +31,6 @@ function Shell({
|
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
export function IconPanelLeft({ size = 16 }: IconProps) {
|
|
35
|
-
return (
|
|
36
|
-
<Shell size={size}>
|
|
37
|
-
<path
|
|
38
|
-
d="M13.5 1.5H2.5C1.94772 1.5 1.5 1.94772 1.5 2.5V13.5C1.5 14.0523 1.94772 14.5 2.5 14.5H13.5C14.0523 14.5 14.5 14.0523 14.5 13.5V2.5C14.5 1.94772 14.0523 1.5 13.5 1.5Z"
|
|
39
|
-
stroke="currentColor"
|
|
40
|
-
/>
|
|
41
|
-
<path d="M5.5 1.5V14.5" stroke="currentColor" />
|
|
42
|
-
</Shell>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export function IconFolder({ size = 16 }: IconProps) {
|
|
47
|
-
return (
|
|
48
|
-
<Shell size={size}>
|
|
49
|
-
<path
|
|
50
|
-
d="M1.50439 3.11059C1.50439 2.55831 1.95211 2.1106 2.50439 2.1106H5.43389C5.67773 2.1106 5.91318 2.19969 6.09593 2.36113L7.71649 3.79265C7.89924 3.95409 8.1347 4.04319 8.3785 4.04319H13.4958C14.0481 4.04319 14.4958 4.4909 14.4958 5.04319V12.8894C14.4958 13.4417 14.0481 13.8894 13.4958 13.8894H2.50439C1.95211 13.8894 1.50439 13.4417 1.50439 12.8894V4.04319V3.11059Z"
|
|
51
|
-
stroke="currentColor"
|
|
52
|
-
/>
|
|
53
|
-
<path d="M3.63501 7.66614H12.3647" stroke="currentColor" />
|
|
54
|
-
</Shell>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export function IconFolderOpen({ size = 16 }: IconProps) {
|
|
59
|
-
return (
|
|
60
|
-
<Shell size={size}>
|
|
61
|
-
<path
|
|
62
|
-
d="M2.55912 7.93683C2.67584 7.49906 3.0723 7.19446 3.52536 7.19446H13.6491C14.3061 7.19446 14.7846 7.81725 14.6153 8.45209L13.4411 12.856C13.3244 13.2938 12.9279 13.5984 12.4748 13.5984H2.35113C1.69411 13.5984 1.21562 12.9756 1.38489 12.3407L2.55912 7.93683Z"
|
|
63
|
-
fill="currentColor"
|
|
64
|
-
opacity={0.16}
|
|
65
|
-
/>
|
|
66
|
-
<path
|
|
67
|
-
d="M13.6491 6.69446C14.6346 6.69453 15.3522 7.62895 15.0983 8.58118L13.9245 12.9845C13.7494 13.6412 13.1539 14.0988 12.4743 14.0988H2.35126C1.36574 14.0988 0.648153 13.1643 0.902044 12.212L2.07587 7.80774C2.25102 7.15128 2.84567 6.69455 3.52509 6.69446H13.6491ZM3.52509 7.69446C3.29865 7.69455 3.10004 7.84674 3.04169 8.06555L1.86786 12.4698C1.78345 12.7872 2.02285 13.0988 2.35126 13.0988H12.4743C12.7007 13.0988 12.8992 12.9463 12.9577 12.7277L14.1325 8.32336C14.2171 8.00598 13.9776 7.69453 13.6491 7.69446H3.52509Z"
|
|
68
|
-
fill="currentColor"
|
|
69
|
-
/>
|
|
70
|
-
<path
|
|
71
|
-
d="M4.7666 1.90137C5.13227 1.90144 5.48571 2.03525 5.75977 2.27734L7.27246 3.61328C7.36379 3.69382 7.48174 3.73828 7.60352 3.73828H12.3994C13.2276 3.73841 13.8993 4.41005 13.8994 5.23828V6.7168C13.8183 6.70327 13.735 6.69436 13.6494 6.69434H12.8994V5.23828C12.8993 4.96233 12.6754 4.73841 12.3994 4.73828H7.60352C7.23781 4.73828 6.88446 4.60438 6.61035 4.3623L5.09766 3.02637C5.00636 2.94576 4.88838 2.90144 4.7666 2.90137H2.0498C1.77366 2.90137 1.5498 3.12523 1.5498 3.40137V9.78223L0.902344 12.2119C0.648452 13.1642 1.36604 14.0986 2.35156 14.0986H2.0498C1.2214 14.0986 0.549838 13.427 0.549805 12.5986V3.40137C0.549805 2.57294 1.22138 1.90137 2.0498 1.90137H4.7666Z"
|
|
72
|
-
fill="currentColor"
|
|
73
|
-
/>
|
|
74
|
-
</Shell>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export function IconChevronDown({ size = 14 }: IconProps) {
|
|
79
|
-
return (
|
|
80
|
-
<Shell size={size}>
|
|
81
|
-
<path
|
|
82
|
-
d="M4 6L7.29289 9.29289C7.68342 9.68342 8.31658 9.68342 8.70711 9.29289L12 6"
|
|
83
|
-
stroke="currentColor"
|
|
84
|
-
/>
|
|
85
|
-
</Shell>
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export function IconPlus({ size = 16 }: IconProps) {
|
|
90
|
-
return (
|
|
91
|
-
<Shell size={size}>
|
|
92
|
-
<path d="M8 2V14" stroke="currentColor" />
|
|
93
|
-
<path d="M2 8H14" stroke="currentColor" />
|
|
94
|
-
</Shell>
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export function IconEllipsis({ size = 16 }: IconProps) {
|
|
99
|
-
return (
|
|
100
|
-
<Shell size={size}>
|
|
101
|
-
<path
|
|
102
|
-
d="M3 9C3.55228 9 4 8.55228 4 8C4 7.44772 3.55228 7 3 7C2.44772 7 2 7.44772 2 8C2 8.55228 2.44772 9 3 9Z"
|
|
103
|
-
fill="currentColor"
|
|
104
|
-
/>
|
|
105
|
-
<path
|
|
106
|
-
d="M8 9C8.55228 9 9 8.55228 9 8C9 7.44772 8.55228 7 8 7C7.44772 7 7 7.44772 7 8C7 8.55228 7.44772 9 8 9Z"
|
|
107
|
-
fill="currentColor"
|
|
108
|
-
/>
|
|
109
|
-
<path
|
|
110
|
-
d="M13 9C13.5523 9 14 8.55228 14 8C14 7.44772 13.5523 7 13 7C12.4477 7 12 7.44772 12 8C12 8.55228 12.4477 9 13 9Z"
|
|
111
|
-
fill="currentColor"
|
|
112
|
-
/>
|
|
113
|
-
</Shell>
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export function IconSettings({ size = 16 }: IconProps) {
|
|
118
|
-
return (
|
|
119
|
-
<Shell size={size}>
|
|
120
|
-
<path
|
|
121
|
-
d="M8 9.75012C8.9665 9.75012 9.75 8.96662 9.75 8.00012C9.75 7.03362 8.9665 6.25012 8 6.25012C7.0335 6.25012 6.25 7.03362 6.25 8.00012C6.25 8.96662 7.0335 9.75012 8 9.75012Z"
|
|
122
|
-
stroke="currentColor"
|
|
123
|
-
/>
|
|
124
|
-
<path
|
|
125
|
-
d="M13.0107 7.79377C12.9505 7.89401 12.9205 7.94413 12.9205 7.99951C12.9205 8.0549 12.9505 8.10502 13.0106 8.20528L13.9849 9.83006C14.045 9.93029 14.0751 9.9804 14.0751 10.0358C14.0751 10.0911 14.045 10.1413 13.9849 10.2415L13.0037 11.8777C12.9468 11.9726 12.9184 12.0201 12.8725 12.0461C12.8267 12.072 12.7713 12.072 12.6607 12.072H10.6704C10.5598 12.072 10.5045 12.072 10.4586 12.098C10.4128 12.1239 10.3843 12.1714 10.3274 12.2662L9.33825 13.9142C9.28133 14.009 9.25287 14.0564 9.20703 14.0823C9.16118 14.1083 9.10588 14.1083 8.99529 14.1083H7.00486C6.89426 14.1083 6.83896 14.1083 6.79312 14.0823C6.74727 14.0564 6.71881 14.009 6.6619 13.9142L5.67273 12.2662C5.61581 12.1714 5.58735 12.1239 5.54151 12.098C5.49566 12.072 5.44036 12.072 5.32977 12.072H3.33945C3.2288 12.072 3.17347 12.072 3.12761 12.0461C3.08176 12.0201 3.0533 11.9726 2.9964 11.8777L2.0152 10.2415C1.9551 10.1413 1.92505 10.0911 1.92505 10.0358C1.92505 9.9804 1.9551 9.93029 2.0152 9.83006L2.98951 8.20528C3.04963 8.10502 3.07969 8.0549 3.07969 7.99951C3.07968 7.94413 3.04961 7.89401 2.98946 7.79377L2.01529 6.17011C1.95514 6.06987 1.92507 6.01975 1.92507 5.96437C1.92506 5.90899 1.95512 5.85886 2.01524 5.7586L2.9964 4.1224C3.0533 4.0275 3.08176 3.98005 3.12761 3.95408C3.17347 3.92811 3.2288 3.92811 3.33945 3.92811H5.32977C5.44036 3.92811 5.49566 3.92811 5.54151 3.90216C5.58735 3.87621 5.61581 3.82879 5.67273 3.73397L6.6619 2.08599C6.71881 1.99116 6.74727 1.94375 6.79312 1.9178C6.83896 1.89185 6.89426 1.89185 7.00486 1.89185H8.99529C9.10588 1.89185 9.16118 1.89185 9.20703 1.9178C9.25287 1.94375 9.28133 1.99116 9.33825 2.08599L10.3274 3.73397C10.3843 3.82879 10.4128 3.87621 10.4586 3.90216C10.5045 3.92811 10.5598 3.92811 10.6704 3.92811H12.6607C12.7713 3.92811 12.8267 3.92811 12.8725 3.95408C12.9184 3.98005 12.9468 4.0275 13.0037 4.1224L13.9849 5.7586C14.045 5.85886 14.0751 5.90899 14.0751 5.96437C14.0751 6.01975 14.045 6.06987 13.9849 6.17011L13.0107 7.79377Z"
|
|
126
|
-
stroke="currentColor"
|
|
127
|
-
strokeMiterlimit={10}
|
|
128
|
-
/>
|
|
129
|
-
</Shell>
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export function IconPin({ size = 16 }: IconProps) {
|
|
134
|
-
return (
|
|
135
|
-
<Shell size={size}>
|
|
136
|
-
<path
|
|
137
|
-
d="M9.96976 1.70572L13.1554 3.93629L10.9019 8.12317L11.5158 11.605L10.7192 12.7427L2.52767 7.00693L3.3243 5.86922L6.80612 5.25528L9.96976 1.70572Z"
|
|
138
|
-
fill="currentColor"
|
|
139
|
-
stroke="currentColor"
|
|
140
|
-
strokeLinejoin="round"
|
|
141
|
-
/>
|
|
142
|
-
<path
|
|
143
|
-
d="M6.05285 9.47511C6.27284 9.16094 6.70586 9.08458 7.02003 9.30457C7.3342 9.52455 7.41055 9.95757 7.19057 10.2717L3.98587 14.4708L3.21223 13.9291L6.05285 9.47511Z"
|
|
144
|
-
fill="currentColor"
|
|
145
|
-
/>
|
|
146
|
-
</Shell>
|
|
147
|
-
);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export function IconCheck({ size = 16 }: IconProps) {
|
|
151
|
-
return (
|
|
152
|
-
<Shell size={size}>
|
|
153
|
-
<path
|
|
154
|
-
d="M2.25 8.5L5.49732 11.7473C5.90519 12.1552 6.57263 12.1344 6.95426 11.7018L13.75 4"
|
|
155
|
-
stroke="currentColor"
|
|
156
|
-
/>
|
|
157
|
-
</Shell>
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export function IconNewChat({ size = 14 }: IconProps) {
|
|
162
|
-
return (
|
|
163
|
-
<Shell size={size} strokeWidth={1.3}>
|
|
164
|
-
<path
|
|
165
|
-
d="M2.37091 11.2501C1.58745 9.89288 1.32067 8.29835 1.61969 6.76006C1.91872 5.22177 2.76342 3.8433 3.99826 2.87846C5.2331 1.91362 6.77494 1.42737 8.33988 1.50925C9.90482 1.59113 11.3875 2.23562 12.5149 3.32406C13.6425 4.41269 14.3387 5.87206 14.4754 7.4334C14.612 8.99474 14.18 10.5529 13.2587 11.8209C12.3375 13.0888 10.9891 13.9813 9.46194 14.3337C8.18691 14.628 6.85895 14.5294 5.64989 14.0605C5.1712 13.8748 4.76962 13.4932 4.26534 13.3967C3.67413 13.2835 2.95257 13.5598 2.03794 14.3337"
|
|
166
|
-
stroke="currentColor"
|
|
167
|
-
/>
|
|
168
|
-
<path d="M8 5V11" stroke="currentColor" />
|
|
169
|
-
<path d="M5 8H11" stroke="currentColor" />
|
|
170
|
-
</Shell>
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export function IconRefresh({ size = 16 }: IconProps) {
|
|
175
|
-
return (
|
|
176
|
-
<Shell size={size}>
|
|
177
|
-
<path
|
|
178
|
-
d="M14.5001 8C14.5 9.28552 14.1188 10.5422 13.4045 11.611C12.6903 12.6799 11.6752 13.5129 10.4875 14.0049C9.29982 14.4968 7.99295 14.6255 6.73212 14.3747C5.4713 14.124 4.31314 13.505 3.4041 12.596C2.49514 11.687 1.87614 10.5288 1.62537 9.26798C1.37459 8.00716 1.50331 6.70028 1.99525 5.51261C2.48719 4.32494 3.32025 3.30981 4.3891 2.59557C5.45795 1.88134 6.71458 1.50008 8.0001 1.5C9.9001 1.5 11.7001 2.3 13.0001 3.6L14.5001 5.1"
|
|
179
|
-
stroke="currentColor"
|
|
180
|
-
/>
|
|
181
|
-
<path d="M14.4999 1.5V5.1H10.8999" stroke="currentColor" />
|
|
182
|
-
</Shell>
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export function IconRightUp({ size = 14 }: IconProps) {
|
|
187
|
-
return (
|
|
188
|
-
<Shell size={size}>
|
|
189
|
-
<path
|
|
190
|
-
d="M11.7256 2.77441C12.5538 2.77469 13.2256 3.44616 13.2256 4.27441V10.1416H12.2256V4.27441C12.2256 3.99844 12.0015 3.77469 11.7256 3.77441H5.7207V2.77441H11.7256Z"
|
|
191
|
-
fill="currentColor"
|
|
192
|
-
/>
|
|
193
|
-
<path d="M2.77441 13.2255L12.3756 3.62427" stroke="currentColor" />
|
|
194
|
-
</Shell>
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
34
|
export function IconConversation({ size = 16 }: IconProps) {
|
|
199
35
|
return (
|
|
200
36
|
<Shell size={size} strokeWidth={1.3}>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { PROVISION_ACTIONS, parseProvisionBody, provisionTargetOf } from '../provision.js';
|
|
3
|
+
|
|
4
|
+
describe('provision 请求体:每类动作各有各的目标字段', () => {
|
|
5
|
+
it('每个声明过的动作都分得出去一个目标字段(加动作忘了配就会红)', () => {
|
|
6
|
+
expect(PROVISION_ACTIONS.map((action) => [action, provisionTargetOf(action)])).toEqual([
|
|
7
|
+
['install', 'unit'],
|
|
8
|
+
['update', 'unit'],
|
|
9
|
+
['uninstall', 'unit'],
|
|
10
|
+
['install-bundle', 'spec'],
|
|
11
|
+
['update-bundle', 'unit'],
|
|
12
|
+
['remove-bundle', 'name'],
|
|
13
|
+
['cancel-install', 'requestId'],
|
|
14
|
+
['update-dependency', 'id'],
|
|
15
|
+
]);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('老三种动作照旧只认 unit / id,请求里不多带字段', () => {
|
|
19
|
+
expect(parseProvisionBody({ action: 'install', unit: ' issues ' })).toEqual({
|
|
20
|
+
ok: true,
|
|
21
|
+
request: { action: 'install', unit: 'issues' },
|
|
22
|
+
});
|
|
23
|
+
expect(parseProvisionBody({ action: 'update-dependency', id: 'plugin:coding' })).toEqual({
|
|
24
|
+
ok: true,
|
|
25
|
+
request: { action: 'update-dependency', id: 'plugin:coding' },
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('install-bundle:spec 必填,registry / approvedBuilds 可选且会清空串', () => {
|
|
30
|
+
expect(parseProvisionBody({ action: 'install-bundle', spec: '@a/b@1.2.3' })).toEqual({
|
|
31
|
+
ok: true,
|
|
32
|
+
request: { action: 'install-bundle', spec: '@a/b@1.2.3' },
|
|
33
|
+
});
|
|
34
|
+
expect(
|
|
35
|
+
parseProvisionBody({
|
|
36
|
+
action: 'install-bundle',
|
|
37
|
+
spec: '@a/b',
|
|
38
|
+
registry: ' https://r.example/ ',
|
|
39
|
+
approvedBuilds: ['esbuild', '', 7, 'sharp'],
|
|
40
|
+
}),
|
|
41
|
+
).toEqual({
|
|
42
|
+
ok: true,
|
|
43
|
+
request: { action: 'install-bundle', spec: '@a/b', registry: 'https://r.example/', approvedBuilds: ['esbuild', 'sharp'] },
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('remove-bundle / cancel-install 各认各的字段', () => {
|
|
48
|
+
expect(parseProvisionBody({ action: 'remove-bundle', name: '@a/b' })).toEqual({
|
|
49
|
+
ok: true,
|
|
50
|
+
request: { action: 'remove-bundle', name: '@a/b' },
|
|
51
|
+
});
|
|
52
|
+
expect(parseProvisionBody({ action: 'cancel-install', requestId: 'req-1' })).toEqual({
|
|
53
|
+
ok: true,
|
|
54
|
+
request: { action: 'cancel-install', requestId: 'req-1' },
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it('拿错字段不算数(spec 动作给了 unit 也要打回)', () => {
|
|
59
|
+
expect(parseProvisionBody({ action: 'install-bundle', unit: 'issues' })).toEqual({
|
|
60
|
+
ok: false,
|
|
61
|
+
code: 'workbench/no-spec',
|
|
62
|
+
message: '缺少 spec',
|
|
63
|
+
});
|
|
64
|
+
expect(parseProvisionBody({ action: 'install', spec: 'x' })).toEqual({
|
|
65
|
+
ok: false,
|
|
66
|
+
code: 'workbench/no-unit',
|
|
67
|
+
message: '缺少 unit',
|
|
68
|
+
});
|
|
69
|
+
expect(parseProvisionBody({ action: 'remove-bundle', name: ' ' })).toEqual({
|
|
70
|
+
ok: false,
|
|
71
|
+
code: 'workbench/no-name',
|
|
72
|
+
message: '缺少 name',
|
|
73
|
+
});
|
|
74
|
+
expect(parseProvisionBody({ action: 'cancel-install' })).toEqual({
|
|
75
|
+
ok: false,
|
|
76
|
+
code: 'workbench/no-request-id',
|
|
77
|
+
message: '缺少 requestId',
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it('不认识的 action / 不是对象 / 空体 → 都是 bad-action', () => {
|
|
82
|
+
for (const body of [{ action: 'destroy' }, {}, null, 'nonsense', undefined]) {
|
|
83
|
+
const parsed = parseProvisionBody(body);
|
|
84
|
+
expect(parsed.ok).toBe(false);
|
|
85
|
+
if (!parsed.ok) expect(parsed.code).toBe('workbench/bad-action');
|
|
86
|
+
}
|
|
87
|
+
const parsed = parseProvisionBody({ action: 'destroy' });
|
|
88
|
+
if (!parsed.ok) expect(parsed.message).toContain('不认识的 action:destroy');
|
|
89
|
+
});
|
|
90
|
+
});
|
package/src/host/http.ts
CHANGED
|
@@ -2,9 +2,7 @@ import type { DshHostContext, DshRequest, DshResponse } from '../api/dsh.js';
|
|
|
2
2
|
import { unitFactScope } from '../api/facts.js';
|
|
3
3
|
import { ACTIONS_PREFIX, API_PREFIX, PLUGIN_ID, PREFS_PREFIX, PROVISION_PREFIX } from '../config/constants.js';
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
PROVISION_ACTIONS,
|
|
7
|
-
type ProvisionAction,
|
|
5
|
+
parseProvisionBody,
|
|
8
6
|
type ProvisionHandler,
|
|
9
7
|
type ProvisionRequest,
|
|
10
8
|
} from './provision.js';
|
|
@@ -118,38 +116,12 @@ export function registerProvision(
|
|
|
118
116
|
return;
|
|
119
117
|
}
|
|
120
118
|
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
: {};
|
|
125
|
-
const action = body.action;
|
|
126
|
-
if (typeof action !== 'string' || !PROVISION_ACTIONS.includes(action as ProvisionAction)) {
|
|
127
|
-
sendJson(res, 400, {
|
|
128
|
-
ok: false,
|
|
129
|
-
error: {
|
|
130
|
-
code: 'workbench/bad-action',
|
|
131
|
-
message: `不认识的 action:${String(action)}(可用:${PROVISION_ACTIONS.join(' / ')})`,
|
|
132
|
-
},
|
|
133
|
-
});
|
|
119
|
+
const parsed = parseProvisionBody(payload);
|
|
120
|
+
if (!parsed.ok) {
|
|
121
|
+
sendJson(res, 400, { ok: false, error: { code: parsed.code, message: parsed.message } });
|
|
134
122
|
return;
|
|
135
123
|
}
|
|
136
|
-
const
|
|
137
|
-
const target = isDependencyAction(wanted) ? body.id : body.unit;
|
|
138
|
-
if (typeof target !== 'string' || target.trim() === '') {
|
|
139
|
-
sendJson(res, 400, {
|
|
140
|
-
ok: false,
|
|
141
|
-
error: {
|
|
142
|
-
code: isDependencyAction(wanted) ? 'workbench/no-id' : 'workbench/no-unit',
|
|
143
|
-
message: isDependencyAction(wanted) ? '缺少 id' : '缺少 unit',
|
|
144
|
-
},
|
|
145
|
-
});
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
const key = target.trim();
|
|
150
|
-
const request: ProvisionRequest = isDependencyAction(wanted)
|
|
151
|
-
? { action: wanted, id: key }
|
|
152
|
-
: { action: wanted, unit: key };
|
|
124
|
+
const request: ProvisionRequest = parsed.request;
|
|
153
125
|
try {
|
|
154
126
|
const result = await provision.handle(request);
|
|
155
127
|
log?.bump(provisionFacts(provision, request));
|
package/src/host/provision.ts
CHANGED
|
@@ -6,6 +6,10 @@ export const PROVISION_ACTIONS = [
|
|
|
6
6
|
'install',
|
|
7
7
|
'update',
|
|
8
8
|
'uninstall',
|
|
9
|
+
'install-bundle',
|
|
10
|
+
'update-bundle',
|
|
11
|
+
'remove-bundle',
|
|
12
|
+
'cancel-install',
|
|
9
13
|
'update-dependency',
|
|
10
14
|
] as const satisfies readonly ProvisionAction[];
|
|
11
15
|
|
|
@@ -22,13 +26,96 @@ type MissingAction = Exclude<ProvisionAction, (typeof PROVISION_ACTIONS)[number]
|
|
|
22
26
|
const ALL_ACTIONS_COVERED: MissingAction extends never ? true : never = true;
|
|
23
27
|
void ALL_ACTIONS_COVERED;
|
|
24
28
|
|
|
29
|
+
export type ProvisionTarget = 'unit' | 'id' | 'spec' | 'name' | 'requestId';
|
|
30
|
+
|
|
31
|
+
export function provisionTargetOf(action: ProvisionAction): ProvisionTarget {
|
|
32
|
+
if (action === 'update-dependency') return 'id';
|
|
33
|
+
if (action === 'install-bundle') return 'spec';
|
|
34
|
+
if (action === 'remove-bundle') return 'name';
|
|
35
|
+
if (action === 'cancel-install') return 'requestId';
|
|
36
|
+
return 'unit';
|
|
37
|
+
}
|
|
38
|
+
|
|
25
39
|
export interface ProvisionRequest {
|
|
26
40
|
readonly action: ProvisionAction;
|
|
27
41
|
readonly unit?: string;
|
|
28
42
|
readonly id?: string;
|
|
43
|
+
readonly spec?: string;
|
|
44
|
+
readonly name?: string;
|
|
45
|
+
readonly requestId?: string;
|
|
46
|
+
readonly registry?: string;
|
|
47
|
+
readonly approvedBuilds?: readonly string[];
|
|
29
48
|
}
|
|
30
49
|
|
|
31
50
|
export interface ProvisionHandler {
|
|
32
51
|
handle(request: ProvisionRequest): Promise<unknown> | unknown;
|
|
33
52
|
affectedUnits?(request: ProvisionRequest): readonly string[];
|
|
34
53
|
}
|
|
54
|
+
|
|
55
|
+
const TARGET_CODE: Readonly<Record<ProvisionTarget, string>> = {
|
|
56
|
+
unit: 'workbench/no-unit',
|
|
57
|
+
id: 'workbench/no-id',
|
|
58
|
+
spec: 'workbench/no-spec',
|
|
59
|
+
name: 'workbench/no-name',
|
|
60
|
+
requestId: 'workbench/no-request-id',
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
function asRecord(value: unknown): Readonly<Record<string, unknown>> {
|
|
64
|
+
return typeof value === 'object' && value !== null ? (value as Readonly<Record<string, unknown>>) : {};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function stringsOf(value: unknown): string[] | undefined {
|
|
68
|
+
if (!Array.isArray(value)) return undefined;
|
|
69
|
+
const items = value.filter((item): item is string => typeof item === 'string' && item.trim() !== '');
|
|
70
|
+
return items.length === 0 ? undefined : items;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function requestOf(action: ProvisionAction, value: string): ProvisionRequest {
|
|
74
|
+
if (action === 'update-dependency') return { action, id: value };
|
|
75
|
+
if (action === 'install-bundle') return { action, spec: value };
|
|
76
|
+
if (action === 'remove-bundle') return { action, name: value };
|
|
77
|
+
if (action === 'cancel-install') return { action, requestId: value };
|
|
78
|
+
return { action, unit: value };
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface ProvisionRejected {
|
|
82
|
+
readonly ok: false;
|
|
83
|
+
readonly code: string;
|
|
84
|
+
readonly message: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export type ProvisionParsed =
|
|
88
|
+
| { readonly ok: true; readonly request: ProvisionRequest }
|
|
89
|
+
| ProvisionRejected;
|
|
90
|
+
|
|
91
|
+
export function parseProvisionBody(body: unknown): ProvisionParsed {
|
|
92
|
+
const raw = asRecord(body);
|
|
93
|
+
const action = raw.action;
|
|
94
|
+
if (typeof action !== 'string' || !(PROVISION_ACTIONS as readonly string[]).includes(action)) {
|
|
95
|
+
return {
|
|
96
|
+
ok: false,
|
|
97
|
+
code: 'workbench/bad-action',
|
|
98
|
+
message: `不认识的 action:${String(action)}(可用:${PROVISION_ACTIONS.join(' / ')})`,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
const wanted = action as ProvisionAction;
|
|
102
|
+
const target = provisionTargetOf(wanted);
|
|
103
|
+
const value = raw[target];
|
|
104
|
+
if (typeof value !== 'string' || value.trim() === '') {
|
|
105
|
+
return { ok: false, code: TARGET_CODE[target], message: `缺少 ${target}` };
|
|
106
|
+
}
|
|
107
|
+
if (wanted !== 'install-bundle') return { ok: true, request: requestOf(wanted, value.trim()) };
|
|
108
|
+
|
|
109
|
+
const registry = typeof raw.registry === 'string' && raw.registry.trim() !== '' ? raw.registry.trim() : undefined;
|
|
110
|
+
const approvedBuilds = stringsOf(raw.approvedBuilds);
|
|
111
|
+
const requestId = typeof raw.requestId === 'string' && raw.requestId.trim() !== '' ? raw.requestId.trim() : undefined;
|
|
112
|
+
return {
|
|
113
|
+
ok: true,
|
|
114
|
+
request: {
|
|
115
|
+
...requestOf(wanted, value.trim()),
|
|
116
|
+
...(registry === undefined ? {} : { registry }),
|
|
117
|
+
...(approvedBuilds === undefined ? {} : { approvedBuilds }),
|
|
118
|
+
...(requestId === undefined ? {} : { requestId }),
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
}
|
package/src/host.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
export * from './config/constants.js';
|
|
2
|
+
export * from './api/context-ref.js';
|
|
3
|
+
export * from './api/unit.js';
|
|
4
|
+
export * from './api/facts.js';
|
|
5
|
+
export * from './api/long-task.js';
|
|
6
|
+
export * from './lib/text.js';
|
|
7
|
+
export * from './lib/ui.js';
|
|
8
|
+
export * from './api/blocker-table.js';
|
|
1
9
|
export * from './host/cli-error.js';
|
|
2
10
|
export * from './host/data-root.js';
|
|
3
11
|
export * from './host/facts.js';
|
package/src/i18n/en.ts
CHANGED
|
@@ -68,12 +68,15 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
68
68
|
'panels.market.install': 'Install',
|
|
69
69
|
'panels.market.update': 'Update',
|
|
70
70
|
'panels.market.uninstall': 'Uninstall',
|
|
71
|
+
'panels.market.uninstallLabel': 'Uninstall {name}',
|
|
71
72
|
'panels.market.installing': 'Installing…',
|
|
72
73
|
'panels.market.updating': 'Updating…',
|
|
73
74
|
'panels.market.uninstalling': 'Uninstalling…',
|
|
74
|
-
'panels.market.
|
|
75
|
+
'panels.market.confirmUninstallTitle': 'Uninstall "{name}"?',
|
|
75
76
|
'panels.market.confirmUninstallDetail':
|
|
76
77
|
'It will be gone from this machine, and removed from every project panel (bindings and settings are kept).',
|
|
78
|
+
'panels.market.confirmUninstallAck':
|
|
79
|
+
'I understand: using it again means reinstalling it.',
|
|
77
80
|
'panels.market.confirmYes': 'Uninstall',
|
|
78
81
|
'panels.market.confirmNo': 'Cancel',
|
|
79
82
|
'panels.market.failed': 'Failed: {reason}',
|
|
@@ -81,6 +84,10 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
81
84
|
'panels.market.noSource': 'This module declares no install method — install it yourself',
|
|
82
85
|
'panels.market.badSource': 'The install method is incomplete — install it yourself',
|
|
83
86
|
'panels.market.empty': 'No modules available',
|
|
87
|
+
'panels.market.installedSection': 'Installed',
|
|
88
|
+
'panels.market.moduleOutdated': 'update available',
|
|
89
|
+
'panels.market.moduleRestartHint': 'it may need a restart after installing',
|
|
90
|
+
'panels.market.restartNeeded': 'The new version is installed — restart once to pick it up.',
|
|
84
91
|
'panels.market.foot': 'After installing, enable it in the panel page of that project.',
|
|
85
92
|
'panels.market.recheck': 'Check for updates',
|
|
86
93
|
'panels.market.checkUpdates': 'Check for updates',
|
|
@@ -88,6 +95,125 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
88
95
|
'panels.market.justNow': 'just now',
|
|
89
96
|
'panels.market.minutesAgo': '{n} min ago',
|
|
90
97
|
'panels.market.hoursAgo': '{n} h ago',
|
|
98
|
+
'panels.market.add.description': 'Enter a package name, a Git URL, or a path to a local directory.',
|
|
99
|
+
'panels.market.add.specPlaceholder': 'e.g. @dsh-workbench/module-hello',
|
|
100
|
+
'panels.market.add.guideToggle': 'Install guide and examples',
|
|
101
|
+
'panels.market.add.guideHide': 'Hide guide',
|
|
102
|
+
'panels.market.add.guideIdTitle': 'Package name',
|
|
103
|
+
'panels.market.add.guideIdExample': '@dsh-workbench/module-hello',
|
|
104
|
+
'panels.market.add.guideIdHint': 'The module package name is its npm name (like dsh-workbench-module-xxx or @author/module) — whatever follows dsh plugin add or pnpm add in the README of a community module.',
|
|
105
|
+
'panels.market.add.guideGitTitle': 'Git URL',
|
|
106
|
+
'panels.market.add.guideGitExample': 'https://github.com/author/dsh-workbench-module-x',
|
|
107
|
+
'panels.market.add.guideGitHint': 'The public repository of the module on GitHub; other Git hosts work too.',
|
|
108
|
+
'panels.market.add.guidePathTitle': 'Local module directory',
|
|
109
|
+
'panels.market.add.guidePathExample': '/Users/name/my-workbench-module',
|
|
110
|
+
'panels.market.add.guidePathHint': 'Absolute path to the module directory on this machine, for modules you develop or have already downloaded.',
|
|
111
|
+
'panels.market.add.guideExampleLabel': 'Example:',
|
|
112
|
+
'panels.market.add.guideFill': 'Fill in',
|
|
113
|
+
'panels.market.add.guideSafety': 'Make sure you trust the source. Modules run on this machine with your permissions; an unknown module can damage the workbench or read and leak your data.',
|
|
114
|
+
'panels.market.add.registryLegend': 'Which npm registry to download from',
|
|
115
|
+
'panels.market.add.registryOfficial': 'npm registry',
|
|
116
|
+
'panels.market.add.registryMirror': 'China mirror',
|
|
117
|
+
'panels.market.add.registryWithHost': '{name} ({host})',
|
|
118
|
+
'panels.market.add.registryToggle': 'Source',
|
|
119
|
+
'panels.market.add.installVersion': 'Version {version}',
|
|
120
|
+
'panels.market.add.registryDefault': 'Default source',
|
|
121
|
+
'panels.market.add.registryCustom': 'Custom address',
|
|
122
|
+
'panels.market.add.registryCustomPlaceholder': 'https://npm.example.com/',
|
|
123
|
+
'panels.market.add.registryCustomHint': 'A corporate or private npm registry; for one that needs auth, put the credentials in ~/.npmrc on this machine',
|
|
124
|
+
'panels.market.add.registryCustomInvalid': 'Enter an address starting with http:// or https://',
|
|
125
|
+
'panels.market.add.run': 'Install',
|
|
126
|
+
'panels.market.add.edit': 'Edit',
|
|
127
|
+
'panels.market.add.changeRegistry': 'Change source',
|
|
128
|
+
'panels.market.add.installingTitle': 'Installing the module…',
|
|
129
|
+
'panels.market.add.installedTitle': 'Installed',
|
|
130
|
+
'panels.market.add.failedTitle': 'Module install failed',
|
|
131
|
+
'panels.market.add.cancelledTitle': 'Cancelled',
|
|
132
|
+
'panels.market.add.failureNetworkHost': 'Cannot reach {host}. Git URLs and .tgz links bypass the registry, so this machine needs direct access or a proxy; if the module is also on npm, use its package name instead.',
|
|
133
|
+
'panels.market.add.problemInvalid': 'Cannot read this package name or address: {reason}',
|
|
134
|
+
'panels.market.add.problemInstalled': 'This module is already installed',
|
|
135
|
+
'panels.market.add.problemNotFound': 'No such module found',
|
|
136
|
+
'panels.market.add.problemNotPackage': 'That path does not exist or is not a valid module package',
|
|
137
|
+
'panels.market.add.problemNotBundle': 'This package declares no bundle, so it cannot be installed as a module: {reason}',
|
|
138
|
+
'panels.market.add.problemNetwork': 'Cannot reach the module source; check the network and retry',
|
|
139
|
+
'panels.market.add.problemUnknown': 'Cannot fetch module information: {reason}',
|
|
140
|
+
'panels.market.add.failureNetwork': 'The network connection failed',
|
|
141
|
+
'panels.market.add.failureNotFound': 'No such module found',
|
|
142
|
+
'panels.market.add.failureNoMatchingVersion': 'No matching version',
|
|
143
|
+
'panels.market.add.failureDiskFull': 'Out of disk space, install stopped',
|
|
144
|
+
'panels.market.add.failurePermission': 'No write permission, cannot install',
|
|
145
|
+
'panels.market.add.failureBuildBlocked': 'A dependency wants to run install scripts; you have to allow it first',
|
|
146
|
+
'panels.market.add.failureIntegrity': 'The downloaded package failed its integrity check',
|
|
147
|
+
'panels.market.add.failureTimeout': 'The install timed out',
|
|
148
|
+
'panels.market.add.failurePnpmMissing': 'pnpm was not found, cannot install',
|
|
149
|
+
'panels.market.add.failureGeneric': 'Something went wrong during install — see the install details',
|
|
150
|
+
'panels.market.add.approveTitle': 'Your approval is needed for install scripts',
|
|
151
|
+
'panels.market.add.approveCaution': 'Only allow packages you trust: install scripts run on this machine with your permissions.',
|
|
152
|
+
'panels.market.add.approveRun': 'Allow and continue installing',
|
|
153
|
+
'panels.market.add.restart': 'Installed — restart once to pick it up.',
|
|
154
|
+
'panels.market.add.tookEffect': 'Live.',
|
|
155
|
+
'panels.market.add.details': 'Install details',
|
|
156
|
+
'panels.market.add.open': 'Add module',
|
|
157
|
+
'panels.market.add.title': 'Add module',
|
|
158
|
+
'panels.market.add.intro': 'Install a workbench module by package name. It goes on this machine, shared by every project.',
|
|
159
|
+
'panels.market.add.specLabel': 'Package',
|
|
160
|
+
'panels.market.add.specHint': 'The same thing you would put after `dsh plugin add`: a package name (optional @version), a git URL, a tarball, or an absolute local path.',
|
|
161
|
+
'panels.market.add.exampleTitle': 'Examples',
|
|
162
|
+
'panels.market.add.exampleFill': 'Fill in an example',
|
|
163
|
+
'panels.market.add.registryLabel': 'Source',
|
|
164
|
+
'panels.market.add.registryProfile': "This profile's registry",
|
|
165
|
+
'panels.market.add.registryPnpm': "pnpm's own registry",
|
|
166
|
+
'panels.market.add.check': 'Check',
|
|
167
|
+
'panels.market.add.checking': 'Checking…',
|
|
168
|
+
'panels.market.add.change': 'Edit',
|
|
169
|
+
'panels.market.add.previewTitle': 'About to install',
|
|
170
|
+
'panels.market.add.fieldName': 'Package',
|
|
171
|
+
'panels.market.add.fieldVersion': 'Version',
|
|
172
|
+
'panels.market.add.fieldDescription': 'Description',
|
|
173
|
+
'panels.market.add.fieldSource': 'Source',
|
|
174
|
+
'panels.market.add.install': 'Install',
|
|
175
|
+
'panels.market.add.installing': 'Installing…',
|
|
176
|
+
'panels.market.add.cancel': 'Cancel install',
|
|
177
|
+
'panels.market.add.close': 'Close',
|
|
178
|
+
'panels.market.add.retry': 'Retry',
|
|
179
|
+
'panels.market.add.changeSource': 'Change source',
|
|
180
|
+
'panels.market.add.approveBuilds': 'Allow these scripts and retry',
|
|
181
|
+
'panels.market.add.approveHint': 'These packages want to run install scripts: {packages}',
|
|
182
|
+
'panels.market.add.doneApplied': 'Installed and live.',
|
|
183
|
+
'panels.market.add.doneRestart': 'Installed — restart once to pick it up.',
|
|
184
|
+
'panels.market.add.cancelled': 'Cancelled.',
|
|
185
|
+
'panels.market.add.failed': "Didn't work: {reason}",
|
|
186
|
+
'panels.market.add.removed': 'It has been removed.',
|
|
187
|
+
'panels.market.add.supplyPending': 'Its plugins install after you restart.',
|
|
188
|
+
'panels.market.add.supplyFailed': "Its plugins didn't install: {reason}",
|
|
189
|
+
'panels.market.add.notModule': "This is not a workbench module (no dsh.workbench declaration), so it will not show up on the board.",
|
|
190
|
+
'panels.market.add.removedRestart': 'Removed — restart once to finish.',
|
|
191
|
+
'panels.market.add.remove': 'Remove it',
|
|
192
|
+
'panels.market.add.problem.invalidSpec': "That is not a spec we accept: it cannot be empty or start with a dash.",
|
|
193
|
+
'panels.market.add.problem.alreadyInstalled': 'That package is already in the profile (add @version to switch versions).',
|
|
194
|
+
'panels.market.add.problem.notFound': 'No such package on that source.',
|
|
195
|
+
'panels.market.add.problem.notAPackage': 'There is no package at that location.',
|
|
196
|
+
'panels.market.add.problem.notABundle': 'It is an npm package, but not a dsh plugin (no bundle patch).',
|
|
197
|
+
'panels.market.add.problem.network': 'The source is unreachable.',
|
|
198
|
+
'panels.market.add.problem.unknown': 'The check did not pass (reason unknown).',
|
|
199
|
+
'panels.market.add.reason.invalidSpec': 'the spec is not accepted',
|
|
200
|
+
'panels.market.add.reason.incompatible': 'it wants a different dsh version than this machine runs',
|
|
201
|
+
'panels.market.add.reason.notBundle': 'it is not a dsh plugin package',
|
|
202
|
+
'panels.market.add.reason.notRemovable': 'it ships with the installation and cannot be removed',
|
|
203
|
+
'panels.market.add.reason.bundleInUse': 'something is still using it',
|
|
204
|
+
'panels.market.add.reason.stopProfile': 'this profile has no hot reload, so stop the process first',
|
|
205
|
+
'panels.market.add.reason.staleApproval': 'the scripts to allow changed — start over',
|
|
206
|
+
'panels.market.add.reason.operationError': 'pnpm failed (see the install output)',
|
|
207
|
+
'panels.market.add.reason.buildBlocked': 'pnpm blocked install scripts',
|
|
208
|
+
'panels.market.add.reason.pnpmMissing': 'pnpm is not on this machine',
|
|
209
|
+
'panels.market.add.reason.noMatchingVersion': 'no version matching that range on the source',
|
|
210
|
+
'panels.market.add.reason.diskFull': 'the disk is full',
|
|
211
|
+
'panels.market.add.reason.permission': 'no permission to write',
|
|
212
|
+
'panels.market.add.reason.integrity': 'the download failed its integrity check',
|
|
213
|
+
'panels.market.add.reason.timeout': 'no output for too long, so it was stopped',
|
|
214
|
+
'panels.market.add.reason.network': 'the network is unreachable',
|
|
215
|
+
'panels.market.add.reason.notFound': 'no such package on the source',
|
|
216
|
+
'panels.market.add.reason.unknown': 'It failed without saying why (see the install output)',
|
|
91
217
|
'blocker.fix.install': 'Install for me',
|
|
92
218
|
'blocker.fix.update': 'Upgrade for me',
|
|
93
219
|
'blocker.fix.running': 'Running…',
|