querysub 0.602.0 → 0.603.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.603.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",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"node-forge": "https://github.com/sliftist/forge#e618181b469b07bdc70b968b0391beb8ef5fecd6",
|
|
76
76
|
"pako": "^2.1.0",
|
|
77
77
|
"peggy": "^5.0.6",
|
|
78
|
-
"sliftutils": "^1.7.
|
|
78
|
+
"sliftutils": "^1.7.81",
|
|
79
79
|
"socket-function": "^1.2.29",
|
|
80
80
|
"terser": "^5.31.0",
|
|
81
81
|
"typenode": "^6.6.1",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangesAfterConfig, GetConfig, IArchives, RemoteConfigBase, SetConfig } from "sliftutils/storage/IArchives";
|
|
1
|
+
import { ChangesAfterConfig, DelConfig, GetConfig, GetInfoConfig, IArchives, RemoteConfigBase, SetConfig } from "sliftutils/storage/IArchives";
|
|
2
2
|
import { createArchives } from "sliftutils/storage/remoteStorage/createArchives";
|
|
3
3
|
import { cache, cacheJSONArgsEqual } from "socket-function/src/caching";
|
|
4
4
|
import { formatDateTime } from "socket-function/src/formatting/format";
|
|
@@ -92,12 +92,12 @@ function nestBucket(folder: string, archives: ReturnType<typeof createArchives>)
|
|
|
92
92
|
return {
|
|
93
93
|
get: (path: string, config?: GetConfig) => archives.get(folder + path, config),
|
|
94
94
|
set: (path: string, data: Buffer, config?: SetConfig) => archives.set(folder + path, data, config),
|
|
95
|
-
del: (path: string) => archives.del(folder + path),
|
|
95
|
+
del: (path: string, config?: DelConfig) => archives.del(folder + path, config),
|
|
96
96
|
find: async (prefix: string, config?: FindConfig) => (await archives.find(folder + prefix, config)).map(x => x.slice(folder.length)),
|
|
97
97
|
findInfo: async (prefix: string, config?: FindConfig) => (await archives.findInfo(folder + prefix, config)).map(x => ({ ...x, path: x.path.slice(folder.length) })),
|
|
98
98
|
get2: (path: string, config?: GetConfig) => archives.get2(folder + path, config),
|
|
99
99
|
setLargeFile: (config: { path: string; lastModified?: number; getNextData(): Promise<Buffer | undefined>; }) => archives.setLargeFile({ ...config, path: folder + config.path }),
|
|
100
|
-
getInfo: (path: string) => archives.getInfo(folder + path),
|
|
100
|
+
getInfo: (path: string, config?: GetInfoConfig) => archives.getInfo(folder + path, config),
|
|
101
101
|
getDebugName: () => archives.getDebugName() + "/" + folder,
|
|
102
102
|
hasWriteAccess: () => archives.hasWriteAccess(),
|
|
103
103
|
getConfig: () => archives.getConfig(),
|
|
@@ -50,7 +50,7 @@ export class ServiceMeasureBars extends qreact.Component<{
|
|
|
50
50
|
render() {
|
|
51
51
|
let controller = ServiceMeasureController(SocketFunction.browserNodeId());
|
|
52
52
|
|
|
53
|
-
return <div className={css.
|
|
53
|
+
return <div className={css.hbox(1).wrap}>
|
|
54
54
|
{this.props.serviceNodeIds.map(nodeId => {
|
|
55
55
|
let isExpanded = this.props.expandedNodeId === nodeId;
|
|
56
56
|
let summary: MeasureSummary | undefined;
|
|
@@ -14,7 +14,7 @@ import { Anchor } from "../../library-components/ATag";
|
|
|
14
14
|
import { isPublic } from "../../config";
|
|
15
15
|
// ResyncMachinesButton is still exported from deployButtons, for whenever forcing a resync becomes useful
|
|
16
16
|
import { PendingDeployInfo, UpdateButtons, UpdateServiceButtons } from "./deployButtons";
|
|
17
|
-
import { isDefined } from "../../misc";
|
|
17
|
+
import { isDefined, unique } from "../../misc";
|
|
18
18
|
import { formatDateJSX } from "../../misc/formatJSX";
|
|
19
19
|
import { Tools } from "./Tools";
|
|
20
20
|
import { ServiceMeasureBars, ServiceMeasureBreakdown, ServiceMeasureController } from "./ServiceMeasureBars";
|
|
@@ -81,7 +81,7 @@ export class ServicesListPage extends qreact.Component {
|
|
|
81
81
|
let serviceInfo = getMachineInfo(machineId)?.services[serviceId];
|
|
82
82
|
nodeIds.push(...Object.values(serviceInfo?.nodeIds || {}));
|
|
83
83
|
}
|
|
84
|
-
serviceNodeIds.set(serviceId, nodeIds);
|
|
84
|
+
serviceNodeIds.set(serviceId, unique(nodeIds));
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -186,90 +186,90 @@ export class ServicesListPage extends qreact.Component {
|
|
|
186
186
|
let duplicateKey = (keyCounts.get(config.parameters.key || "") || 0) > 1;
|
|
187
187
|
let measureNodeIds = serviceNodeIds.get(serviceId) || [];
|
|
188
188
|
let expandedMeasureNodeId = this.state.expandedMeasureNodes[serviceId] || "";
|
|
189
|
-
return <div className={css.vbox(4).alignItems("stretch")} key={serviceId}>
|
|
189
|
+
return <div className={css.vbox(4).alignItems("stretch").flexShrink(1000000000000)} key={serviceId}>
|
|
190
190
|
<div className={css.hbox(10)}>
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
>
|
|
204
|
-
<div className={css.hbox(12)}>
|
|
205
|
-
<div className={css.vbox(4).flexGrow(1)}>
|
|
206
|
-
<div className={css.fontSize(14).boldStyle}>{config.info.title}</div>
|
|
207
|
-
<div className={css
|
|
208
|
-
+ (duplicateKey
|
|
209
|
-
&& css.hsl(0, 50, 50).colorhsl(0, 0, 95).pad2(4, 2))
|
|
191
|
+
<ServiceCategoryBadge config={config} />
|
|
192
|
+
<div className={css.vbox(4).alignItems("stretch")}>
|
|
193
|
+
<Anchor noStyles
|
|
194
|
+
values={[currentViewParam.getOverride("service-detail"), selectedServiceIdParam.getOverride(serviceId)]}
|
|
195
|
+
className={
|
|
196
|
+
css.pad2(12).button.bord2(0, 0, 20)
|
|
197
|
+
+ (
|
|
198
|
+
failingMachines.length > 0 && css.hsl(0, 50, 60)
|
|
199
|
+
|| config.parameters.deploy && css.hsl(0, 0, 100)
|
|
200
|
+
|| !config.parameters.deploy && css.hsl(0, 0, 70)
|
|
201
|
+
)
|
|
210
202
|
}
|
|
211
|
-
|
|
212
|
-
>
|
|
213
|
-
{
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
</div>
|
|
219
|
-
</div>
|
|
220
|
-
<div className={css.vbox(4)}>
|
|
221
|
-
<div>Updated {formatDateJSX(config.info.lastUpdatedTime)} AGO</div>
|
|
222
|
-
{(() => {
|
|
223
|
-
// The old instances probably still run out their overlap (purely time-based, we don't verify they're actually running)
|
|
224
|
-
let releaseTime = config.parameters.releaseTime || 0;
|
|
225
|
-
let overlapTime = config.parameters.overlapTime ?? DEFAULT_OVERLAP_TIME;
|
|
226
|
-
if (!releaseTime || !config.oldParameters) return undefined;
|
|
227
|
-
if (now < releaseTime || now >= releaseTime + overlapTime) return undefined;
|
|
228
|
-
return <div
|
|
229
|
-
className={css.colorhsl(280, 60, 45).fontSize(14).fontWeight("bold")}
|
|
230
|
-
title={`Old instances shut down at ${formatDateTimeDetailed(releaseTime + overlapTime)}`}
|
|
231
|
-
>
|
|
232
|
-
🔀 Old version still running for {formatTime(releaseTime + overlapTime - now)}
|
|
233
|
-
</div>;
|
|
234
|
-
})()}
|
|
235
|
-
{(() => {
|
|
236
|
-
let releaseTime = config.parameters.releaseTime || 0;
|
|
237
|
-
if (!releaseTime || releaseTime <= now || !config.oldParameters) return undefined;
|
|
238
|
-
let live = getLiveServiceParameters(config) as Record<string, unknown>;
|
|
239
|
-
let next = config.parameters as Record<string, unknown>;
|
|
240
|
-
let diffLines: string[] = [];
|
|
241
|
-
for (let key of new Set([...Object.keys(live), ...Object.keys(next)])) {
|
|
242
|
-
if (key === "releaseTime") continue;
|
|
243
|
-
let oldValue = JSON.stringify(live[key]);
|
|
244
|
-
let newValue = JSON.stringify(next[key]);
|
|
245
|
-
if (oldValue !== newValue) {
|
|
246
|
-
diffLines.push(`${key}: ${oldValue} -> ${newValue}`);
|
|
203
|
+
>
|
|
204
|
+
<div className={css.hbox(12)}>
|
|
205
|
+
<div className={css.vbox(4).flexGrow(1)}>
|
|
206
|
+
<div className={css.fontSize(14).boldStyle}>{config.info.title}</div>
|
|
207
|
+
<div className={css
|
|
208
|
+
+ (duplicateKey
|
|
209
|
+
&& css.hsl(0, 50, 50).colorhsl(0, 0, 95).pad2(4, 2))
|
|
247
210
|
}
|
|
211
|
+
title={duplicateKey ? "Duplicate key" : undefined}
|
|
212
|
+
>
|
|
213
|
+
{config.parameters.key}
|
|
214
|
+
</div>
|
|
215
|
+
<div>
|
|
216
|
+
<span className={css.boldStyle.fontSize(14)}>{enabledMachineIds.length}</span> configured {disabledMachines.length > 0 && `(+${disabledMachines.length} on disabled machines)`} {failingMachines.length > 0 && `(${failingMachines.length} failing)`} {missingMachines.length > 0 && `(${missingMachines.length} machine hasn't run service yet)`} {unknown > 0 && `(${unknown} unknown)`} • {totalLaunches} launches •
|
|
217
|
+
Deploy: {config.parameters.deploy ? "enabled" : "disabled"}
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
<div className={css.vbox(4)}>
|
|
221
|
+
<div>Updated {formatDateJSX(config.info.lastUpdatedTime)} AGO</div>
|
|
222
|
+
{(() => {
|
|
223
|
+
// The old instances probably still run out their overlap (purely time-based, we don't verify they're actually running)
|
|
224
|
+
let releaseTime = config.parameters.releaseTime || 0;
|
|
225
|
+
let overlapTime = config.parameters.overlapTime ?? DEFAULT_OVERLAP_TIME;
|
|
226
|
+
if (!releaseTime || !config.oldParameters) return undefined;
|
|
227
|
+
if (now < releaseTime || now >= releaseTime + overlapTime) return undefined;
|
|
228
|
+
return <div
|
|
229
|
+
className={css.colorhsl(280, 60, 45).fontSize(14).fontWeight("bold")}
|
|
230
|
+
title={`Old instances shut down at ${formatDateTimeDetailed(releaseTime + overlapTime)}`}
|
|
231
|
+
>
|
|
232
|
+
🔀 Old version still running for {formatTime(releaseTime + overlapTime - now)}
|
|
233
|
+
</div>;
|
|
234
|
+
})()}
|
|
235
|
+
{(() => {
|
|
236
|
+
let releaseTime = config.parameters.releaseTime || 0;
|
|
237
|
+
if (!releaseTime || releaseTime <= now || !config.oldParameters) return undefined;
|
|
238
|
+
let live = getLiveServiceParameters(config) as Record<string, unknown>;
|
|
239
|
+
let next = config.parameters as Record<string, unknown>;
|
|
240
|
+
let diffLines: string[] = [];
|
|
241
|
+
for (let key of new Set([...Object.keys(live), ...Object.keys(next)])) {
|
|
242
|
+
if (key === "releaseTime") continue;
|
|
243
|
+
let oldValue = JSON.stringify(live[key]);
|
|
244
|
+
let newValue = JSON.stringify(next[key]);
|
|
245
|
+
if (oldValue !== newValue) {
|
|
246
|
+
diffLines.push(`${key}: ${oldValue} -> ${newValue}`);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return <div
|
|
250
|
+
className={css.colorhsl(35, 80, 45).fontSize(14).fontWeight("bold")}
|
|
251
|
+
title={`Deploys at ${formatDateTimeDetailed(releaseTime)}\n\n${diffLines.join("\n")}`}
|
|
252
|
+
>
|
|
253
|
+
🕐 Deploys in {formatTime(releaseTime - now)}
|
|
254
|
+
</div>;
|
|
255
|
+
})()}
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
</Anchor>
|
|
259
|
+
{this.state.measurementsEnabled && measureNodeIds.length > 0 && <ServiceMeasureBars
|
|
260
|
+
serviceNodeIds={measureNodeIds}
|
|
261
|
+
expandedNodeId={expandedMeasureNodeId}
|
|
262
|
+
onToggleNode={nodeId => {
|
|
263
|
+
if (this.state.expandedMeasureNodes[serviceId] === nodeId) {
|
|
264
|
+
delete this.state.expandedMeasureNodes[serviceId];
|
|
265
|
+
} else {
|
|
266
|
+
this.state.expandedMeasureNodes[serviceId] = nodeId;
|
|
248
267
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
title={`Deploys at ${formatDateTimeDetailed(releaseTime)}\n\n${diffLines.join("\n")}`}
|
|
252
|
-
>
|
|
253
|
-
🕐 Deploys in {formatTime(releaseTime - now)}
|
|
254
|
-
</div>;
|
|
255
|
-
})()}
|
|
256
|
-
</div>
|
|
268
|
+
}}
|
|
269
|
+
/>}
|
|
257
270
|
</div>
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
serviceNodeIds={measureNodeIds}
|
|
261
|
-
expandedNodeId={expandedMeasureNodeId}
|
|
262
|
-
onToggleNode={nodeId => {
|
|
263
|
-
if (this.state.expandedMeasureNodes[serviceId] === nodeId) {
|
|
264
|
-
delete this.state.expandedMeasureNodes[serviceId];
|
|
265
|
-
} else {
|
|
266
|
-
this.state.expandedMeasureNodes[serviceId] = nodeId;
|
|
267
|
-
}
|
|
268
|
-
}}
|
|
269
|
-
/>}
|
|
270
|
-
</div>
|
|
271
|
-
<UpdateServiceButtons service={config} />
|
|
272
|
-
<PendingDeployInfo service={config} />
|
|
271
|
+
<UpdateServiceButtons service={config} />
|
|
272
|
+
<PendingDeployInfo service={config} />
|
|
273
273
|
</div>
|
|
274
274
|
{this.state.measurementsEnabled && expandedMeasureNodeId && <ServiceMeasureBreakdown
|
|
275
275
|
nodeId={expandedMeasureNodeId}
|