Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathindex.mjs
More file actions
Latest commit
31 lines (26 loc) · 912 Bytes
/
Copy pathindex.mjs
File metadata and controls
31 lines (26 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import{setSatellitesController}from"@junobuild/admin";
import{defineRun}from"@junobuild/config";
exportconstonRun=defineRun(()=>({
run: async({ identity, satelliteId, container })=>{
constcontrollerId=process.argv
.find((arg)=>arg.indexOf(`--controllerId`)>-1)
?.replace(`--controllerId=`,"");
constprofile=process.argv
.find((arg)=>arg.indexOf(`--profile`)>-1)
?.replace(`--profile=`,"");
constmissionControl={
identity,
missionControlId: process.env.JUNO_MISSION_CONTROL_ID,
};
console.log(
`About to set ${controllerId} in satellite ${satelliteId} with the help of the mission control ${missionControl.missionControlId}.`,
);
awaitsetSatellitesController({
missionControl,
satelliteIds: [satelliteId],
controllerId,
profile,
});
console.log("Done.");
},
}));