dsh-panel-control 0.3.15 → 0.4.0
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/README.md +18 -0
- package/client.js +1 -6
- package/index.js +726 -804
- package/package.json +1 -1
- package/scripts/host-smoke.mjs +13 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-panel-control",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Manage the global panel navigation at the top of the DSH sidebar: reorder, hide and group every entry, with the layout persisted per installation.",
|
|
6
6
|
"keywords": [
|
package/scripts/host-smoke.mjs
CHANGED
|
@@ -67,7 +67,9 @@ const clientModulesStub = {
|
|
|
67
67
|
}),
|
|
68
68
|
async bundleResource(method, url) {
|
|
69
69
|
clientModulesStub.served.push(String(url));
|
|
70
|
-
if (String(url).includes('rev-now')
|
|
70
|
+
if (String(url).includes('rev-now') && !clientModulesStub.dropRev) {
|
|
71
|
+
return { status: 200, headers: { 'content-type': 'text/javascript' }, body: 'current' };
|
|
72
|
+
}
|
|
71
73
|
return { status: 404 };
|
|
72
74
|
},
|
|
73
75
|
};
|
|
@@ -193,6 +195,16 @@ if (route) {
|
|
|
193
195
|
'/plugins/??dsh-panel-control/client.js&rev=rev-old',
|
|
194
196
|
);
|
|
195
197
|
check('stale revision is served at the current one', stale.status === 200, `status ${stale.status}`);
|
|
198
|
+
// A revision this Host already handed out must survive the registry
|
|
199
|
+
// forgetting it: the page keeps asking for the list it booted with.
|
|
200
|
+
await clientModulesStub.bundleResource('GET', '/plugins/??dsh-panel-control/client.js&rev=rev-now');
|
|
201
|
+
clientModulesStub.dropRev = true;
|
|
202
|
+
const remembered = await clientModulesStub.bundleResource(
|
|
203
|
+
'GET',
|
|
204
|
+
'/plugins/??dsh-panel-control/client.js&rev=rev-now',
|
|
205
|
+
);
|
|
206
|
+
check('a remembered revision is served after the registry drops it', remembered.status === 200, `status ${remembered.status}`);
|
|
207
|
+
clientModulesStub.dropRev = false;
|
|
196
208
|
const fresh = await clientModulesStub.bundleResource(
|
|
197
209
|
'GET',
|
|
198
210
|
'/plugins/??dsh-panel-control/client.js&rev=rev-now',
|