querysub 0.726.0 → 0.727.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "querysub",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.727.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"node-forge": "https://github.com/sliftist/forge#e618181b469b07bdc70b968b0391beb8ef5fecd6",
|
|
96
96
|
"pako": "^2.1.0",
|
|
97
97
|
"peggy": "^5.0.6",
|
|
98
|
-
"sliftutils": "^1.9.
|
|
98
|
+
"sliftutils": "^1.9.20",
|
|
99
99
|
"socket-function": "^1.3.1",
|
|
100
100
|
"terser": "^5.31.0",
|
|
101
101
|
"typenode": "^6.6.3",
|
|
@@ -134,8 +134,8 @@ export function confirmDeploy(config: {
|
|
|
134
134
|
alwaysConfirm?: boolean;
|
|
135
135
|
onConfirm: () => void;
|
|
136
136
|
}) {
|
|
137
|
-
let
|
|
138
|
-
if (!
|
|
137
|
+
let groupInfo = getDeployGroupInfo(config.group);
|
|
138
|
+
if (!groupInfo.deployWarning && (groupInfo.noOverlap || !config.noOverlap && !config.alwaysConfirm)) {
|
|
139
139
|
config.onConfirm();
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
@@ -207,26 +207,29 @@ export class DeployGroupButtons extends qreact.Component<{
|
|
|
207
207
|
</div>;
|
|
208
208
|
}
|
|
209
209
|
const latestRef = gitInfo.latestRef;
|
|
210
|
+
let noOverlapOnly = !!groupInfo.noOverlap;
|
|
210
211
|
return <div className={css.hbox(10).pad2(8).hsl(groupInfo.hue, 40, 95).bord2(groupInfo.hue, 40, 70)}>
|
|
211
212
|
{label}
|
|
212
213
|
<button
|
|
213
214
|
className={buttonStyle.hsl(120, 70, 90) + (isDeploying && css.opacity(0.6))}
|
|
214
|
-
title={
|
|
215
|
+
title={noOverlapOnly
|
|
216
|
+
? `Deploys every outdated ${groupInfo.label} service now; the old instances are shut down as soon as the new ones are up, so two copies never run at once`
|
|
217
|
+
: `Asks first, then deploys every outdated ${groupInfo.label} service; the old instances keep running for ${formatTime(DEFAULT_OVERLAP_TIME)} before shutting down`}
|
|
215
218
|
onClick={() => {
|
|
216
219
|
if (isDeploying) return;
|
|
217
220
|
confirmDeploy({
|
|
218
221
|
actionLabel: `Update ${groupInfo.label} to New & Restart (${outdatedServices.length})`,
|
|
219
222
|
group,
|
|
220
|
-
noOverlap:
|
|
223
|
+
noOverlap: noOverlapOnly,
|
|
221
224
|
services: outdatedServices,
|
|
222
225
|
latestRef,
|
|
223
|
-
alwaysConfirm:
|
|
224
|
-
onConfirm: () => this.deployGroup(outdatedServices, latestRef,
|
|
226
|
+
alwaysConfirm: !noOverlapOnly,
|
|
227
|
+
onConfirm: () => this.deployGroup(outdatedServices, latestRef, noOverlapOnly),
|
|
225
228
|
});
|
|
226
229
|
}}
|
|
227
230
|
>
|
|
228
231
|
<div>
|
|
229
|
-
{bigEmoji("🎯", -4)} <span>{isDeploying && "⏳ Deploying..." || `Update ${outdatedServices.length} to New & Restart`}</span>
|
|
232
|
+
{bigEmoji("🎯", -4)} <span>{isDeploying && "⏳ Deploying..." || `Update ${outdatedServices.length} to New${noOverlapOnly ? "" : " & Restart"}`}</span>
|
|
230
233
|
</div>
|
|
231
234
|
<div className={css.hbox(5)}>
|
|
232
235
|
<b>New</b>
|
|
@@ -237,7 +240,7 @@ export class DeployGroupButtons extends qreact.Component<{
|
|
|
237
240
|
<RenderGitRefInfo gitRef={ref} />
|
|
238
241
|
</div>)}
|
|
239
242
|
</button>
|
|
240
|
-
<button
|
|
243
|
+
{!noOverlapOnly && <button
|
|
241
244
|
className={buttonStyle.hsl(0, 85, 70).alignSelf("stretch") + (isDeploying && css.opacity(0.6))}
|
|
242
245
|
title={`Deploys every outdated ${groupInfo.label} service now AND shuts the old instances down as soon as the new ones are up (overlap of 0)`}
|
|
243
246
|
onClick={() => {
|
|
@@ -255,7 +258,7 @@ export class DeployGroupButtons extends qreact.Component<{
|
|
|
255
258
|
<div>
|
|
256
259
|
{bigEmoji("⚡", -4)} <span>{isDeploying && "⏳ Deploying..." || `Update ${outdatedServices.length} to New, No Overlap`}</span>
|
|
257
260
|
</div>
|
|
258
|
-
</button>
|
|
261
|
+
</button>}
|
|
259
262
|
</div>;
|
|
260
263
|
}
|
|
261
264
|
}
|
|
@@ -344,25 +347,28 @@ export class UpdateServiceButtons extends qreact.Component<{
|
|
|
344
347
|
const service = this.props.service;
|
|
345
348
|
const group = getServiceDeployGroup(service);
|
|
346
349
|
const latestRef = gitInfo.latestRef;
|
|
350
|
+
let noOverlapOnly = !!getDeployGroupInfo(group).noOverlap;
|
|
347
351
|
|
|
348
352
|
return <>
|
|
349
353
|
<button
|
|
350
354
|
className={buttonStyle.hsl(120, 70, 90).alignSelf("stretch")}
|
|
351
355
|
disabled={this.state.isDeploying}
|
|
352
|
-
title={
|
|
356
|
+
title={noOverlapOnly
|
|
357
|
+
? "Deploys now; the old instance is shut down as soon as the new one is up, so two copies never run at once"
|
|
358
|
+
: `Deploys now; the old instances keep running for ${formatTime(DEFAULT_OVERLAP_TIME)} before shutting down`}
|
|
353
359
|
onClick={() => {
|
|
354
360
|
confirmDeploy({
|
|
355
361
|
actionLabel: "Update to New & Restart",
|
|
356
362
|
group,
|
|
357
|
-
noOverlap:
|
|
363
|
+
noOverlap: noOverlapOnly,
|
|
358
364
|
services: [service],
|
|
359
365
|
latestRef,
|
|
360
|
-
onConfirm: () => this.deploy(latestRef,
|
|
366
|
+
onConfirm: () => this.deploy(latestRef, noOverlapOnly),
|
|
361
367
|
});
|
|
362
368
|
}}
|
|
363
369
|
>
|
|
364
370
|
<div>
|
|
365
|
-
{bigEmoji("🎯", -4)} <span>{this.state.isDeploying && "⏳ Deploying..." ||
|
|
371
|
+
{bigEmoji("🎯", -4)} <span>{this.state.isDeploying && "⏳ Deploying..." || `Update to New${noOverlapOnly ? "" : " & Restart"}`}</span>
|
|
366
372
|
</div>
|
|
367
373
|
<div className={css.hbox(5)}>
|
|
368
374
|
<b>New</b>
|
|
@@ -373,7 +379,7 @@ export class UpdateServiceButtons extends qreact.Component<{
|
|
|
373
379
|
<RenderGitRefInfo gitRef={gitRef} />
|
|
374
380
|
</div>
|
|
375
381
|
</button>
|
|
376
|
-
<button
|
|
382
|
+
{!noOverlapOnly && <button
|
|
377
383
|
className={buttonStyle.hsl(0, 85, 70).alignSelf("stretch")}
|
|
378
384
|
disabled={this.state.isDeploying}
|
|
379
385
|
title="Deploys now AND shuts the old instances down as soon as the new ones are up (overlap of 0)"
|
|
@@ -391,7 +397,7 @@ export class UpdateServiceButtons extends qreact.Component<{
|
|
|
391
397
|
<div>
|
|
392
398
|
{bigEmoji("⚡", -4)} <span>{this.state.isDeploying && "⏳ Deploying..." || "Update to New, No Overlap"}</span>
|
|
393
399
|
</div>
|
|
394
|
-
</button>
|
|
400
|
+
</button>}
|
|
395
401
|
</>;
|
|
396
402
|
}
|
|
397
403
|
}
|
|
@@ -36,6 +36,7 @@ export type DeployGroupInfo = {
|
|
|
36
36
|
hue: number;
|
|
37
37
|
description: string;
|
|
38
38
|
deployWarning?: { title: string; paragraphs: string[] };
|
|
39
|
+
noOverlap?: boolean;
|
|
39
40
|
};
|
|
40
41
|
|
|
41
42
|
export const DEPLOY_GROUPS: DeployGroupInfo[] = [
|
|
@@ -44,7 +45,8 @@ export const DEPLOY_GROUPS: DeployGroupInfo[] = [
|
|
|
44
45
|
label: "Background Tasks",
|
|
45
46
|
emoji: "🔧",
|
|
46
47
|
hue: 200,
|
|
47
|
-
description: "Non-essential services. They can go down without immediately affecting the site (eventually they will). Also the catch-all, for tests, pings, etc.",
|
|
48
|
+
description: "Non-essential services. They can go down without immediately affecting the site (eventually they will). Also the catch-all, for tests, pings, etc. Deployed without overlap, two copies of a background task must never run at once.",
|
|
49
|
+
noOverlap: true,
|
|
48
50
|
},
|
|
49
51
|
{
|
|
50
52
|
group: "mainSite",
|