@jacebenson/jsn 4.3.7-dev.30 → 4.3.7-dev.31
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
|
@@ -17,7 +17,7 @@ declareCapabilities('midservers', { mutationSubcommands: ['add', 'remove', 'exec
|
|
|
17
17
|
|
|
18
18
|
function agentName(record) {
|
|
19
19
|
const name = getStringField(record, 'name');
|
|
20
|
-
return
|
|
20
|
+
return `mid.server.${name}`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
function queueValue(value) {
|
|
@@ -150,8 +150,8 @@ export function assertMidServerUp(record) {
|
|
|
150
150
|
export function assertMidServerReady(record) {
|
|
151
151
|
assertMidServerUp(record);
|
|
152
152
|
const name = getStringField(record, 'name') || getStringField(record, 'sys_id') || 'MID Server';
|
|
153
|
-
const validated =
|
|
154
|
-
if (validated !== '
|
|
153
|
+
const validated = queueValue(record.validated).toLowerCase();
|
|
154
|
+
if (validated !== 'true') {
|
|
155
155
|
const error = new Error(`MID Server '${name}' is not validated yet (validation: ${validated || 'unknown'}). Wait for ServiceNow validation to complete before executing a command.`);
|
|
156
156
|
error.code = 'midserver_not_validated';
|
|
157
157
|
throw error;
|
|
@@ -186,9 +186,9 @@ async function promptMidCredentials(app, argv) {
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
async function waitForMidServerUp(app, name, timeoutMs, intervalMs) {
|
|
189
|
+
export async function waitForMidServerUp(app, name, timeoutMs, intervalMs) {
|
|
190
190
|
const started = Date.now();
|
|
191
|
-
const fullName =
|
|
191
|
+
const fullName = name;
|
|
192
192
|
while (Date.now() - started <= timeoutMs) {
|
|
193
193
|
const params = new URLSearchParams({
|
|
194
194
|
sysparm_query: `name=${fullName}`,
|
package/src/midserver-install.js
CHANGED
|
@@ -108,7 +108,7 @@ export async function installDockerMidServer({
|
|
|
108
108
|
}) {
|
|
109
109
|
const dockerAvailable = detectDocker(run).available;
|
|
110
110
|
const shortName = normalizeMidName(name);
|
|
111
|
-
const displayName =
|
|
111
|
+
const displayName = shortName;
|
|
112
112
|
const releaseName = suppliedReleaseName || (await validateMidCredentials(instanceURL, username, password, fetchImpl)).releaseName;
|
|
113
113
|
const recipeURL = buildMidRecipeUrl(releaseName);
|
|
114
114
|
const installDir = directory || midInstallDirectory(instanceURL, name);
|