querysub 0.264.0 → 0.265.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 +1 -1
- package/src/3-path-functions/pathFunctionLoader.ts +4 -2
- package/src/4-deploy/edgeNodes.ts +6 -3
- package/src/deployManager/components/MachineDetailPage.tsx +3 -0
- package/src/deployManager/components/deployButtons.tsx +1 -1
- package/src/deployManager/machineApplyMainCode.ts +7 -0
- package/src/deployManager/machineSchema.ts +2 -0
package/package.json
CHANGED
|
@@ -379,8 +379,10 @@ async function getModuleFromSpecBase(
|
|
|
379
379
|
throw new Error(`Module not found: ${moduleId} (for ${spec.FunctionId})`);
|
|
380
380
|
}
|
|
381
381
|
|
|
382
|
-
if (
|
|
383
|
-
|
|
382
|
+
if (!isPublic()) {
|
|
383
|
+
if (hotReloadPackagePath) {
|
|
384
|
+
hotReloadUnderPath(hotReloadPackagePath);
|
|
385
|
+
}
|
|
384
386
|
}
|
|
385
387
|
|
|
386
388
|
return moduleImported;
|
|
@@ -136,11 +136,14 @@ const loadEntryPointsByHash = runInSerial(async function loadEntryPointsByHash(c
|
|
|
136
136
|
let gitHash = config.hash;
|
|
137
137
|
let entryPaths = config.entryPaths;
|
|
138
138
|
|
|
139
|
+
let gitURL = await getGitURLLive();
|
|
140
|
+
let filePath = entryPaths[0];
|
|
141
|
+
console.log(magenta(`Loading entry point from ${gitHash}, path: ${filePath}`));
|
|
139
142
|
|
|
140
143
|
let module = await getModuleFromConfig({
|
|
141
|
-
gitURL
|
|
144
|
+
gitURL,
|
|
142
145
|
gitRef: gitHash,
|
|
143
|
-
FilePath:
|
|
146
|
+
FilePath: filePath,
|
|
144
147
|
FunctionId: "entryPoint",
|
|
145
148
|
});
|
|
146
149
|
|
|
@@ -165,7 +168,7 @@ const loadEntryPointsByHash = runInSerial(async function loadEntryPointsByHash(c
|
|
|
165
168
|
};
|
|
166
169
|
|
|
167
170
|
await edgeNodeStorage.set(getNextNodePath(), Buffer.from(JSON.stringify(edgeNodeConfig)));
|
|
168
|
-
console.log(magenta(`
|
|
171
|
+
console.log(magenta(`Registered edge node`), edgeNodeConfig);
|
|
169
172
|
|
|
170
173
|
await updateEdgeNodesFile();
|
|
171
174
|
|
|
@@ -134,6 +134,9 @@ export class MachineDetailPage extends qreact.Component {
|
|
|
134
134
|
<div>
|
|
135
135
|
Launches: {serviceInfo.totalTimesLaunched}
|
|
136
136
|
</div>
|
|
137
|
+
<div>
|
|
138
|
+
Guessed Node ID: {serviceInfo.nodeId}
|
|
139
|
+
</div>
|
|
137
140
|
{hasError && (
|
|
138
141
|
<div className={css.colorhsl(0, 80, 50)}>
|
|
139
142
|
⚠️ Has Error
|
|
@@ -28,7 +28,7 @@ export class RenderGitRefInfo extends qreact.Component<{
|
|
|
28
28
|
});
|
|
29
29
|
if (!gitRefInfo) return undefined;
|
|
30
30
|
return <div className={css.fontWeight("normal")}>
|
|
31
|
-
{formatDateJSX(gitRefInfo.time)} AGO <span className={css.hsl(0, 0, 80).pad2(5, 2).italic}>{gitRefInfo.description}</span>
|
|
31
|
+
{formatDateJSX(gitRefInfo.time)} AGO <span className={css.hsl(0, 0, 80).pad2(5, 2).italic}>{gitRefInfo.description}</span> ({this.props.gitRef.slice(0, 6)})
|
|
32
32
|
</div>;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -481,6 +481,7 @@ const resyncServicesBase = runInSerial(measureWrap(async function resyncServices
|
|
|
481
481
|
lastLaunchedTime,
|
|
482
482
|
errorFromLastRun: "",
|
|
483
483
|
totalTimesLaunched: launchCount,
|
|
484
|
+
nodeId: "",
|
|
484
485
|
};
|
|
485
486
|
try {
|
|
486
487
|
let folder = root + screenName + "/";
|
|
@@ -523,6 +524,12 @@ const resyncServicesBase = runInSerial(measureWrap(async function resyncServices
|
|
|
523
524
|
|
|
524
525
|
await fs.promises.writeFile(parameterPath, newParametersString);
|
|
525
526
|
|
|
527
|
+
let nodePathId = folder + SERVICE_NODE_FILE_NAME;
|
|
528
|
+
if (fs.existsSync(nodePathId)) {
|
|
529
|
+
let nodeId = await fs.promises.readFile(nodePathId, "utf8");
|
|
530
|
+
machineInfo.services[config.serviceId].nodeId = nodeId;
|
|
531
|
+
}
|
|
532
|
+
|
|
526
533
|
await runScreenCommand({
|
|
527
534
|
screenName,
|
|
528
535
|
command: config.parameters.command,
|
|
@@ -52,6 +52,8 @@ export type MachineInfo = {
|
|
|
52
52
|
errorFromLastRun: string;
|
|
53
53
|
// Only times launched for the current applyNodeId, but... still very useful.
|
|
54
54
|
totalTimesLaunched: number;
|
|
55
|
+
// Might take a while to set (15 minutes or more). It's better to look in the nodes list and find the one that seems to match (maybe looking at the startup path to find it?)
|
|
56
|
+
nodeId: string;
|
|
55
57
|
}>;
|
|
56
58
|
};
|
|
57
59
|
|