@casual-simulation/aux-vm 2.0.10 → 2.0.12
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/managers/BaseSimulation.d.ts +3 -3
- package/managers/BaseSimulation.js +3 -3
- package/managers/BotDimensionManager.js +2 -2
- package/managers/ConnectionManager.d.ts +1 -1
- package/managers/ConnectionManager.js +2 -2
- package/managers/ConnectionManager.js.map +1 -1
- package/managers/Simulation.d.ts +4 -4
- package/managers/SimulationHelpers.d.ts +1 -1
- package/managers/SimulationHelpers.js +2 -2
- package/managers/SimulationHelpers.js.map +1 -1
- package/package.json +6 -6
|
@@ -39,12 +39,12 @@ export declare class BaseSimulation implements Simulation {
|
|
|
39
39
|
get parsedId(): SimulationIdParseSuccess;
|
|
40
40
|
set parsedId(id: SimulationIdParseSuccess);
|
|
41
41
|
/**
|
|
42
|
-
* Gets whether the app is connected to the
|
|
43
|
-
* or may not be synced to the
|
|
42
|
+
* Gets whether the app is connected to the inst but may
|
|
43
|
+
* or may not be synced to the inst.
|
|
44
44
|
*/
|
|
45
45
|
get isOnline(): boolean;
|
|
46
46
|
/**
|
|
47
|
-
* Gets whether the app is synced to the
|
|
47
|
+
* Gets whether the app is synced to the inst.
|
|
48
48
|
*/
|
|
49
49
|
get isSynced(): boolean;
|
|
50
50
|
/**
|
|
@@ -58,15 +58,15 @@ export class BaseSimulation {
|
|
|
58
58
|
this._parsedId = id;
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
* Gets whether the app is connected to the
|
|
62
|
-
* or may not be synced to the
|
|
61
|
+
* Gets whether the app is connected to the inst but may
|
|
62
|
+
* or may not be synced to the inst.
|
|
63
63
|
*/
|
|
64
64
|
get isOnline() {
|
|
65
65
|
// return this._aux.channel.isConnected;
|
|
66
66
|
return false;
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
|
-
* Gets whether the app is synced to the
|
|
69
|
+
* Gets whether the app is synced to the inst.
|
|
70
70
|
*/
|
|
71
71
|
get isSynced() {
|
|
72
72
|
return this.isOnline;
|
|
@@ -80,7 +80,7 @@ export function processIndexEvents(prevState, calc, events, index, dimensionTags
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
// Check for user bots
|
|
83
|
-
if (event.tag === '
|
|
83
|
+
if (event.tag === 'gridPortal') {
|
|
84
84
|
if (event.type === 'bot_tag_updated') {
|
|
85
85
|
const currentDimension = calculateStringTagValue(calc, event.oldBot, event.tag, null);
|
|
86
86
|
addOrRemoveFromDimension(currentDimension, event);
|
|
@@ -154,7 +154,7 @@ export function processIndexEvents(prevState, calc, events, index, dimensionTags
|
|
|
154
154
|
}
|
|
155
155
|
function addDimension(newState, index, dimension, calc, dimensionEvents, bot, tag) {
|
|
156
156
|
let botsWithDimensionTag = index.findBotsWithTag(dimension);
|
|
157
|
-
let userBots = index.findBotsWithTag('
|
|
157
|
+
let userBots = index.findBotsWithTag('gridPortal');
|
|
158
158
|
let allBots = union(userBots, botsWithDimensionTag);
|
|
159
159
|
let botsInDimension = allBots.filter((b) => isBotInDimension(calc, b, dimension));
|
|
160
160
|
dimensionEvents.push({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Observable, SubscriptionLike } from 'rxjs';
|
|
2
2
|
import { AuxVM } from '../vm/AuxVM';
|
|
3
3
|
/**
|
|
4
|
-
* Defines a class that manages the connection status to the
|
|
4
|
+
* Defines a class that manages the connection status to the inst.
|
|
5
5
|
*/
|
|
6
6
|
export declare class ConnectionManager implements SubscriptionLike {
|
|
7
7
|
private _vm;
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { setForcedOffline } from '@casual-simulation/aux-common';
|
|
11
11
|
import { distinctUntilChanged, scan, shareReplay, map, skipWhile, } from 'rxjs/operators';
|
|
12
12
|
/**
|
|
13
|
-
* Defines a class that manages the connection status to the
|
|
13
|
+
* Defines a class that manages the connection status to the inst.
|
|
14
14
|
*/
|
|
15
15
|
export class ConnectionManager {
|
|
16
16
|
constructor(vm) {
|
|
@@ -25,7 +25,7 @@ export class ConnectionManager {
|
|
|
25
25
|
return Object.assign(Object.assign({}, acc), { init: true });
|
|
26
26
|
}
|
|
27
27
|
return acc;
|
|
28
|
-
}, { synced: false, init: false }), skipWhile(a => !a.init), map(a => a.synced), distinctUntilChanged(), shareReplay(1));
|
|
28
|
+
}, { synced: false, init: false }), skipWhile((a) => !a.init), map((a) => a.synced), distinctUntilChanged(), shareReplay(1));
|
|
29
29
|
this._sub = this._connectionStateChanged.subscribe();
|
|
30
30
|
this._sub.add(this._syncStateChanged.subscribe());
|
|
31
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionManager.js","sourceRoot":"","sources":["ConnectionManager.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EACH,oBAAoB,EACpB,IAAI,EACJ,WAAW,EACX,GAAG,EACH,SAAS,GACZ,MAAM,gBAAgB,CAAC;AAGxB;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAwB1B,YAAY,EAAS;QACjB,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5B,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,GAAG,CAAC,sBAAsB,CAAC,IAAI,CAC/D,IAAI,CACA,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CACV,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EACrD,KAAK,CACR,EACD,oBAAoB,EAAE,EACtB,WAAW,CAAC,CAAC,CAAC,CACjB,CAAC;QACF,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,GAAG,CAAC,sBAAsB,CAAC,IAAI,CACzD,IAAI,CACA,CAAC,G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AAI,CAAC,MAAM,CAAC;IAC5B,CAAC;CACJ"}
|
package/managers/Simulation.d.ts
CHANGED
|
@@ -22,12 +22,12 @@ export interface Simulation extends Initable {
|
|
|
22
22
|
*/
|
|
23
23
|
parsedId: SimulationIdParseSuccess;
|
|
24
24
|
/**
|
|
25
|
-
* Gets whether the app is connected to the
|
|
26
|
-
* or may not be synced to the
|
|
25
|
+
* Gets whether the app is connected to the inst but may
|
|
26
|
+
* or may not be synced to the inst.
|
|
27
27
|
*/
|
|
28
28
|
isOnline: boolean;
|
|
29
29
|
/**
|
|
30
|
-
* Gets whether the app is synced to the
|
|
30
|
+
* Gets whether the app is synced to the inst.
|
|
31
31
|
*/
|
|
32
32
|
isSynced: boolean;
|
|
33
33
|
/**
|
|
@@ -48,7 +48,7 @@ export interface Simulation extends Initable {
|
|
|
48
48
|
*/
|
|
49
49
|
watcher: BotWatcher;
|
|
50
50
|
/**
|
|
51
|
-
* Gets the manager in charge of the
|
|
51
|
+
* Gets the manager in charge of the inst connection status.
|
|
52
52
|
*/
|
|
53
53
|
connection: ConnectionManager;
|
|
54
54
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Simulation } from './Simulation';
|
|
2
2
|
/**
|
|
3
|
-
* Gets a promise that waits for the given simulation to become synced with the
|
|
3
|
+
* Gets a promise that waits for the given simulation to become synced with the inst.
|
|
4
4
|
* Once the simulation is synced, you can be sure that everything is initialized.
|
|
5
5
|
*
|
|
6
6
|
* If the simulation is already synced, then the returned promise will resolve immediately.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { first } from 'rxjs/operators';
|
|
2
2
|
/**
|
|
3
|
-
* Gets a promise that waits for the given simulation to become synced with the
|
|
3
|
+
* Gets a promise that waits for the given simulation to become synced with the inst.
|
|
4
4
|
* Once the simulation is synced, you can be sure that everything is initialized.
|
|
5
5
|
*
|
|
6
6
|
* If the simulation is already synced, then the returned promise will resolve immediately.
|
|
@@ -9,7 +9,7 @@ import { first } from 'rxjs/operators';
|
|
|
9
9
|
*/
|
|
10
10
|
export function waitForSync(simulation) {
|
|
11
11
|
return simulation.connection.syncStateChanged
|
|
12
|
-
.pipe(first(synced => synced))
|
|
12
|
+
.pipe(first((synced) => synced))
|
|
13
13
|
.toPromise();
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=SimulationHelpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimulationHelpers.js","sourceRoot":"","sources":["SimulationHelpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,UAAsB;IAC9C,OAAO,UAAU,CAAC,UAAU,CAAC,gBAAgB;SACxC,IAAI,CAAC,KAAK,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"SimulationHelpers.js","sourceRoot":"","sources":["SimulationHelpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,UAAsB;IAC9C,OAAO,UAAU,CAAC,UAAU,CAAC,gBAAgB;SACxC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;SAC/B,SAAS,EAAE,CAAC;AACrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@casual-simulation/aux-vm",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.12",
|
|
4
4
|
"description": "A set of abstractions required to securely run an AUX.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aux"
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"url": "https://github.com/casual-simulation/casualos/issues"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@casual-simulation/aux-common": "^2.0.
|
|
44
|
-
"@casual-simulation/causal-tree-client-socketio": "^2.0.
|
|
45
|
-
"@casual-simulation/causal-trees": "^2.0.
|
|
46
|
-
"@casual-simulation/crypto": "^2.0.
|
|
43
|
+
"@casual-simulation/aux-common": "^2.0.12",
|
|
44
|
+
"@casual-simulation/causal-tree-client-socketio": "^2.0.12",
|
|
45
|
+
"@casual-simulation/causal-trees": "^2.0.12",
|
|
46
|
+
"@casual-simulation/crypto": "^2.0.12",
|
|
47
47
|
"@casual-simulation/undom": "^2.0.4",
|
|
48
48
|
"esbuild": "^0.8.43",
|
|
49
49
|
"esbuild-wasm": "^0.8.43",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"rxjs": "^6.5.2",
|
|
53
53
|
"uuid": "^8.3.2"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "fdcd097e87afbd35b7cf9050c8b8c0cde73c1b2b"
|
|
56
56
|
}
|