@jsm-mit/tigi-sharded-package 0.5.1 → 0.6.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/declarations/worker/worker.did +1 -0
- package/declarations/worker/worker.did.d.ts +1 -0
- package/declarations/worker/worker.did.js +1 -0
- package/dist/actors/rides-actor.d.ts +7 -0
- package/dist/actors/rides-actor.d.ts.map +1 -1
- package/dist/actors/rides-actor.js +3 -1
- package/package.json +3 -3
|
@@ -193,6 +193,7 @@ export interface RequestRef { 'requestId' : RequestId }
|
|
|
193
193
|
export interface RequestRideArgs {
|
|
194
194
|
'destination' : Geo,
|
|
195
195
|
'requestId' : RequestId,
|
|
196
|
+
'realDriversOnly' : [] | [boolean],
|
|
196
197
|
'pickup' : Geo,
|
|
197
198
|
'radiusMeters' : number,
|
|
198
199
|
'riderName' : string,
|
|
@@ -272,6 +272,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
272
272
|
const RequestRideArgs = IDL.Record({
|
|
273
273
|
'destination' : Geo,
|
|
274
274
|
'requestId' : RequestId,
|
|
275
|
+
'realDriversOnly' : IDL.Opt(IDL.Bool),
|
|
275
276
|
'pickup' : Geo,
|
|
276
277
|
'radiusMeters' : IDL.Nat32,
|
|
277
278
|
'riderName' : IDL.Text,
|
|
@@ -30,6 +30,8 @@ interface RequestState {
|
|
|
30
30
|
widened: boolean;
|
|
31
31
|
othersClosed: boolean;
|
|
32
32
|
sawOffer: boolean;
|
|
33
|
+
/** ZO-23: kept for the widening and "Szukaj ponownie". */
|
|
34
|
+
realDriversOnly?: boolean;
|
|
33
35
|
accepted?: {
|
|
34
36
|
worker: string;
|
|
35
37
|
canister: string;
|
|
@@ -43,6 +45,11 @@ export interface RequestRideArgs {
|
|
|
43
45
|
riderName?: string;
|
|
44
46
|
/** Only for tests and resumed flows: the id of the request (1–64 characters). */
|
|
45
47
|
requestId?: string;
|
|
48
|
+
/**
|
|
49
|
+
* ZO-23 (test builds): true = the simulator's drivers are not asked, only real driver
|
|
50
|
+
* canisters (the Test Manager's switch). Left out = everyone, as before.
|
|
51
|
+
*/
|
|
52
|
+
realDriversOnly?: boolean;
|
|
46
53
|
}
|
|
47
54
|
/**
|
|
48
55
|
* The refusal key of a worker's answer (WO-N9): `ALREADY_OPEN`, `NOT_MY_AREA`, `FULL`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rides-actor.d.ts","sourceRoot":"","sources":["../../src/actors/rides-actor.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAKpD,OAAO,EAAgJ,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC7M,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAA2B,KAAK,GAAG,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAa,eAAe,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAInI,sFAAsF;AACtF,eAAO,MAAM,oBAAoB,OAAQ,CAAC;AAC1C,eAAO,MAAM,kBAAkB,OAAQ,CAAC;AACxC,yEAAyE;AACzE,eAAO,MAAM,cAAc,QAAS,CAAC;AACrC,qFAAqF;AACrF,eAAO,MAAM,eAAe,OAAQ,CAAC;AACrC;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAS,CAAC;AACtC,+GAA+G;AAC/G,eAAO,MAAM,YAAY,OAAQ,CAAC;AAClC,eAAO,MAAM,iBAAiB,OAAQ,CAAC;AAEvC,wFAAwF;AACxF,UAAU,YAAY;IAClB,CAAC,EAAE,CAAC,CAAC;IACL,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,GAAG,CAAC;IACZ,WAAW,EAAE,GAAG,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,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
|
|
91
91
|
sawOffer: false,
|
|
92
|
+
...(args.realDriversOnly ? { realDriversOnly: true } : {}),
|
|
92
93
|
};
|
|
93
94
|
const request = new RideRequest(this.group, this.identity, this.options, state, () => this.simulatorIdAsync());
|
|
94
95
|
await request.placeAsyncUnsafe(SEARCH_RADIUS_METERS);
|
|
@@ -193,7 +194,7 @@ export class RideRequest {
|
|
|
193
194
|
const workers = (await workersForAsync(this.group, this.state.pickup, radiusMeters, fresh)).filter((worker) => !tried.has(worker));
|
|
194
195
|
const results = await Promise.allSettled(workers.map(async (worker) => {
|
|
195
196
|
tried.add(worker);
|
|
196
|
-
await this.group.onWorkerAsyncUnsafe(worker, (actor) => actor.requestRide({ requestId: this.state.requestId, pickup: this.state.pickup, destination: this.state.destination, riderName: this.state.riderName, radiusMeters }));
|
|
197
|
+
await this.group.onWorkerAsyncUnsafe(worker, (actor) => actor.requestRide({ requestId: this.state.requestId, pickup: this.state.pickup, destination: this.state.destination, riderName: this.state.riderName, radiusMeters, realDriversOnly: this.state.realDriversOnly ? [true] : [] }));
|
|
197
198
|
return worker;
|
|
198
199
|
}));
|
|
199
200
|
let staleMap = false;
|
|
@@ -387,6 +388,7 @@ export class RideRequest {
|
|
|
387
388
|
widened: false,
|
|
388
389
|
othersClosed: false,
|
|
389
390
|
sawOffer: false,
|
|
391
|
+
...(this.state.realDriversOnly ? { realDriversOnly: true } : {}),
|
|
390
392
|
};
|
|
391
393
|
const request = new RideRequest(this.group, this.identity, this.options, state, this.simulatorIdAsync);
|
|
392
394
|
await request.placeAsyncUnsafe(SEARCH_RADIUS_METERS);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsm-mit/tigi-sharded-package",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "The one package of the Tigi network group: takes the coordinator's id and hides the coordinator, the core and the workers — for a consumer the group is one canister; plus the rider's few driver-canister endpoints (U-14).",
|
|
5
5
|
"homepage": "https://github.com/JSM-Tigi/tigi-sharded/tree/master/package#readme",
|
|
6
6
|
"repository": {
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"tigiSharded": {
|
|
60
60
|
"repo": "tigi-sharded",
|
|
61
61
|
"repoUrl": "https://github.com/JSM-Tigi/tigi-sharded",
|
|
62
|
-
"commit": "
|
|
62
|
+
"commit": "148160dc78284db42f421146b0b68d5404bb6926"
|
|
63
63
|
},
|
|
64
64
|
"tigiDriverRust": {
|
|
65
65
|
"repo": "tigi-driver-rust",
|
|
66
66
|
"repoUrl": "https://github.com/JSM-Tigi/tigi-driver-rust",
|
|
67
|
-
"commit": "
|
|
67
|
+
"commit": "d39d7dc2b06358a570c3f07cbba17900297047a3"
|
|
68
68
|
}
|
|
69
69
|
}
|