@benchme/scenarios 0.11.0 → 0.12.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/dist/cuj-v1/index.d.ts +6 -0
- package/dist/cuj-v1/index.js +7 -0
- package/dist/cuj-v1/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/scenario.d.ts +14 -0
- package/dist/scenario.js +11 -0
- package/dist/scenario.js.map +1 -1
- package/package.json +1 -1
package/dist/cuj-v1/index.d.ts
CHANGED
|
@@ -6,5 +6,11 @@ import type { Scenario } from "../scenario.js";
|
|
|
6
6
|
* few accounts already signed up on each site (`accounts`), so a journey can
|
|
7
7
|
* begin with someone signing in to their own account. Its workspaces
|
|
8
8
|
* advertise the nine sites and the inbox their sign-up codes land in.
|
|
9
|
+
*
|
|
10
|
+
* Its mailboxes are private: everyone its rows already hold (a guest, an
|
|
11
|
+
* organiser, an account's owner) has a mailbox of their own, which the inbox
|
|
12
|
+
* never shows. A journey acts for its people through the accounts they have,
|
|
13
|
+
* and cannot sign up as one of them on a site where they have none: the code
|
|
14
|
+
* would go to their own mailbox. A new person a task names signs up as ever.
|
|
9
15
|
*/
|
|
10
16
|
export declare const cujV1: Scenario;
|
package/dist/cuj-v1/index.js
CHANGED
|
@@ -8,11 +8,18 @@ import { siteAccounts } from "./accounts.js";
|
|
|
8
8
|
* few accounts already signed up on each site (`accounts`), so a journey can
|
|
9
9
|
* begin with someone signing in to their own account. Its workspaces
|
|
10
10
|
* advertise the nine sites and the inbox their sign-up codes land in.
|
|
11
|
+
*
|
|
12
|
+
* Its mailboxes are private: everyone its rows already hold (a guest, an
|
|
13
|
+
* organiser, an account's owner) has a mailbox of their own, which the inbox
|
|
14
|
+
* never shows. A journey acts for its people through the accounts they have,
|
|
15
|
+
* and cannot sign up as one of them on a site where they have none: the code
|
|
16
|
+
* would go to their own mailbox. A new person a task names signs up as ever.
|
|
11
17
|
*/
|
|
12
18
|
export const cujV1 = {
|
|
13
19
|
key: "cuj-v1",
|
|
14
20
|
description: "Critical user journeys on the nine sites of webmcp-v1 (hotels, flights, restaurants, pizza, cinema, a sports store, homes, clinics, office events), with a few accounts already signed up on each",
|
|
15
21
|
apps: [...SITE_APPS, "mail"],
|
|
22
|
+
mailboxes: "private",
|
|
16
23
|
generate(seed) {
|
|
17
24
|
const rows = webmcpV1.generate(seed);
|
|
18
25
|
return { ...rows, accounts: siteAccounts(seed, rows) };
|
package/dist/cuj-v1/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cuj-v1/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cuj-v1/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,KAAK,GAAa;IAC7B,GAAG,EAAE,QAAQ;IACb,WAAW,EAAE,mMAAmM;IAChN,IAAI,EAAE,CAAC,GAAG,SAAS,EAAE,MAAM,CAAC;IAC5B,SAAS,EAAE,SAAS;IACpB,QAAQ,CAAC,IAAY;QACnB,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACrC,OAAO,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;IACzD,CAAC;CACF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export * from "./sites/events/index.js";
|
|
|
19
19
|
export { documentsMatching, lowStock, openOrdersFor, openTicketsFor, orderTotalCents, slaBreaches, stockOf } from "./answers.js";
|
|
20
20
|
export { int, minstd, pick, shuffle, substream, type Rng } from "./prng.js";
|
|
21
21
|
export { MAX_NIGHTS, STAY_WINDOW, addDays, checkOutOf, fitProblem, isDate, nightsOf, roomsLeft, searchStays, stayProblem, stayTotalCents, type Stay, type StayOffer, type StayProblem, type StayQuery, } from "./stays.js";
|
|
22
|
-
export { ScenarioRegistry, UnknownScenarioError, type Agent, type Booking, type BookingStatus, type Comment, type CompanyFacts, type Customer, type Document, type DocumentKind, type Hotel, type HotelRows, type Location, type Order, type OrderLine, type OrderStatus, type Product, type RoomType, type Scenario, type ScenarioRows, type SiteAccount, type SiteAccounts, type SlaPolicy, type Stock, type Ticket, type TicketPriority, type TicketStatus, type Transfer, type TransferStatus, } from "./scenario.js";
|
|
22
|
+
export { MAILBOXES, ScenarioRegistry, UnknownScenarioError, mailboxesOf, type Agent, type Booking, type BookingStatus, type Comment, type CompanyFacts, type Customer, type Document, type DocumentKind, type Hotel, type HotelRows, type Location, type Mailboxes, type Order, type OrderLine, type OrderStatus, type Product, type RoomType, type Scenario, type ScenarioRows, type SiteAccount, type SiteAccounts, type SlaPolicy, type Stock, type Ticket, type TicketPriority, type TicketStatus, type Transfer, type TransferStatus, } from "./scenario.js";
|
|
23
23
|
/**
|
|
24
24
|
* The default registry with every shipped scenario. acme-v1 stays first: the
|
|
25
25
|
* gateway's robots.txt advertises the shared workspace of the first one.
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ export * from "./sites/events/index.js";
|
|
|
25
25
|
export { documentsMatching, lowStock, openOrdersFor, openTicketsFor, orderTotalCents, slaBreaches, stockOf } from "./answers.js";
|
|
26
26
|
export { int, minstd, pick, shuffle, substream } from "./prng.js";
|
|
27
27
|
export { MAX_NIGHTS, STAY_WINDOW, addDays, checkOutOf, fitProblem, isDate, nightsOf, roomsLeft, searchStays, stayProblem, stayTotalCents, } from "./stays.js";
|
|
28
|
-
export { ScenarioRegistry, UnknownScenarioError, } from "./scenario.js";
|
|
28
|
+
export { MAILBOXES, ScenarioRegistry, UnknownScenarioError, mailboxesOf, } from "./scenario.js";
|
|
29
29
|
/**
|
|
30
30
|
* The default registry with every shipped scenario. acme-v1 stays first: the
|
|
31
31
|
* gateway's robots.txt advertises the shared workspace of the first one.
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,sBAAs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AQ,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC"}
|
package/dist/scenario.d.ts
CHANGED
|
@@ -191,6 +191,16 @@ export type ScenarioRows = {
|
|
|
191
191
|
/** Accounts the sites start with (cuj-v1); absent where a scenario seeds none, as every other does. */
|
|
192
192
|
accounts?: SiteAccounts;
|
|
193
193
|
};
|
|
194
|
+
/**
|
|
195
|
+
* How a workspace's mailboxes work, as the inbox (apps/mail) keeps them:
|
|
196
|
+
* - `shared`: one inbox shows the mail to every address, so a site's sign-up code can be read whoever it was sent to;
|
|
197
|
+
* - `private`: every address the workspace's rows already hold (a guest, an organiser, an account's owner) has a
|
|
198
|
+
* mailbox of its own, which the inbox never shows. Signing up in the name of someone who already exists cannot be
|
|
199
|
+
* finished, because their code goes to their own mailbox; mail to any other address (one the user makes up, a new
|
|
200
|
+
* person a task names) is shown as in a shared inbox.
|
|
201
|
+
*/
|
|
202
|
+
export declare const MAILBOXES: readonly ["shared", "private"];
|
|
203
|
+
export type Mailboxes = (typeof MAILBOXES)[number];
|
|
194
204
|
/** A scenario is a pure function of its seed: same seed, byte-identical rows. */
|
|
195
205
|
export interface Scenario {
|
|
196
206
|
readonly key: string;
|
|
@@ -201,8 +211,12 @@ export interface Scenario {
|
|
|
201
211
|
* workspaces. Absent: every listed app, as before.
|
|
202
212
|
*/
|
|
203
213
|
readonly apps?: readonly string[];
|
|
214
|
+
/** How its workspaces' mailboxes work (`Mailboxes`). Absent: `shared`, as every scenario's were before (`mailboxesOf`). */
|
|
215
|
+
readonly mailboxes?: Mailboxes;
|
|
204
216
|
generate(seed: number): ScenarioRows;
|
|
205
217
|
}
|
|
218
|
+
/** A scenario's mailboxes: what it declares, or `shared` when it says nothing — the one place that default lives. */
|
|
219
|
+
export declare const mailboxesOf: (scenario: Pick<Scenario, "mailboxes">) => Mailboxes;
|
|
206
220
|
export declare class UnknownScenarioError extends Error {
|
|
207
221
|
constructor(key: string);
|
|
208
222
|
}
|
package/dist/scenario.js
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a workspace's mailboxes work, as the inbox (apps/mail) keeps them:
|
|
3
|
+
* - `shared`: one inbox shows the mail to every address, so a site's sign-up code can be read whoever it was sent to;
|
|
4
|
+
* - `private`: every address the workspace's rows already hold (a guest, an organiser, an account's owner) has a
|
|
5
|
+
* mailbox of its own, which the inbox never shows. Signing up in the name of someone who already exists cannot be
|
|
6
|
+
* finished, because their code goes to their own mailbox; mail to any other address (one the user makes up, a new
|
|
7
|
+
* person a task names) is shown as in a shared inbox.
|
|
8
|
+
*/
|
|
9
|
+
export const MAILBOXES = ["shared", "private"];
|
|
10
|
+
/** A scenario's mailboxes: what it declares, or `shared` when it says nothing — the one place that default lives. */
|
|
11
|
+
export const mailboxesOf = (scenario) => scenario.mailboxes ?? "shared";
|
|
1
12
|
export class UnknownScenarioError extends Error {
|
|
2
13
|
constructor(key) {
|
|
3
14
|
super(`unknown scenario: ${key}`);
|
package/dist/scenario.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenario.js","sourceRoot":"","sources":["../src/scenario.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scenario.js","sourceRoot":"","sources":["../src/scenario.ts"],"names":[],"mappings":"AAiIA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAU,CAAC;AAkBxD,qHAAqH;AACrH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAqC,EAAa,EAAE,CAAC,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC;AAEhH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,GAAW;QACrB,KAAK,CAAC,qBAAqB,GAAG,EAAE,CAAC,CAAC;Q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