querysub 0.253.0 → 0.254.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.253.0",
3
+ "version": "0.254.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",
@@ -7,6 +7,7 @@ import { css } from "../../4-dom/css";
7
7
  import { formatTime } from "socket-function/src/formatting/format";
8
8
  import { formatTimeJSX } from "../../misc/formatJSX";
9
9
  import { MachineController } from "../machineController";
10
+ import { closeAllModals } from "../../5-diagnostics/Modal";
10
11
 
11
12
  module.hotreload = true;
12
13
 
@@ -52,13 +53,15 @@ export class UpdateButtons extends qreact.Component<{
52
53
  showFullscreenModal({
53
54
  content: <div>
54
55
  <InputLabel
55
- label="Commit message (enter to commit, escape to cancel)"
56
+ label="Commit message (shift+enter to commit, escape to cancel)"
56
57
  value={""}
57
58
  textarea
58
59
  fillWidth
59
- onChangeValue={value => {
60
+ focusOnMount
61
+ onChangeValue={async value => {
60
62
  if (!value) return;
61
- void controller.commitPushAndPublishQuerysub.promise(value);
63
+ await controller.commitPushAndPublishQuerysub.promise(value);
64
+ closeAllModals();
62
65
  }}
63
66
  />
64
67
  <div className={css.vbox(5)}>
@@ -85,13 +88,15 @@ export class UpdateButtons extends qreact.Component<{
85
88
  showFullscreenModal({
86
89
  content: <div>
87
90
  <InputLabel
88
- label="Commit message (enter to commit, escape to cancel)"
91
+ label="Commit message (shift+enter to commit, escape to cancel)"
89
92
  value={""}
90
93
  textarea
91
94
  fillWidth
92
- onChangeValue={value => {
95
+ focusOnMount
96
+ onChangeValue={async value => {
93
97
  if (!value) return;
94
- void controller.commitPushService.promise(value);
98
+ await controller.commitPushService.promise(value);
99
+ closeAllModals();
95
100
  }}
96
101
  />
97
102
  <div className={css.vbox(5)}>
@@ -93,12 +93,12 @@ class MachineControllerBase {
93
93
  machineNodeId: string;
94
94
  gitRef: string;
95
95
  }) {
96
- await MachineController(config.machineNodeId).deployService.promise({
96
+ await MachineController(config.machineNodeId).deployMachine.promise({
97
97
  gitRef: config.gitRef,
98
98
  });
99
99
  }
100
100
 
101
- public async deployService(config: {
101
+ public async deployMachine(config: {
102
102
  gitRef: string;
103
103
  }) {
104
104
  let gitFolder = os.homedir() + "/machine-alwaysup";
@@ -120,12 +120,17 @@ export const MachineController = getSyncedController(SocketFunction.register(
120
120
  streamScreenOutput: {},
121
121
  watchOtherScreenOutput: {},
122
122
  deployMachineFromBrowser: {},
123
- deployService: {},
123
+ deployMachine: {},
124
124
  }),
125
125
  () => ({
126
126
  hooks: [assertIsManagementUser],
127
127
  }),
128
- ));
128
+ ), {
129
+ writes: {
130
+ deployMachineFromBrowser: ["MachineInfo"],
131
+ deployMachine: ["MachineInfo"],
132
+ }
133
+ });
129
134
 
130
135
  let callbacks = new Map<string, (data: string) => Promise<void>>();
131
136
  export async function watchScreenOutput(config: {
@@ -305,8 +305,8 @@ export const MachineServiceController = getSyncedController(
305
305
  addServiceConfig: ["ServiceConfig", "ServiceConfigList"],
306
306
  setServiceConfigs: ["ServiceConfig"],
307
307
  deleteServiceConfig: ["ServiceConfig", "ServiceConfigList"],
308
- commitPushService: ["gitInfo"],
309
- commitPushAndPublishQuerysub: ["gitInfo"],
308
+ commitPushService: ["gitInfo", "ServiceConfig"],
309
+ commitPushAndPublishQuerysub: ["gitInfo", "ServiceConfig"],
310
310
  },
311
311
  reads: {
312
312
  getMachineList: ["MachineInfoList"],