@benchme/scenarios 0.7.1 → 0.8.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/guide-v1/index.d.ts +8 -0
- package/dist/guide-v1/index.js +21 -0
- package/dist/guide-v1/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/scenario.d.ts +6 -0
- package/dist/scenario.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Scenario } from "../scenario.js";
|
|
2
|
+
/**
|
|
3
|
+
* guide-v1: the buyer's guide (apps/guide). The guide's pages are a pure function of the workspace's seed, which
|
|
4
|
+
* names one edition of it (a category, an arm, a target product — apps/guide's edition table), so the acme apps seed
|
|
5
|
+
* nothing and minting stays cheap. Its workspaces advertise the guide alone: the gateway keeps `guide` UNLISTED, so
|
|
6
|
+
* no other scenario's workspace names it.
|
|
7
|
+
*/
|
|
8
|
+
export declare const guideV1: Scenario;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { acmeV1 } from "../acme-v1/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* guide-v1: the buyer's guide (apps/guide). The guide's pages are a pure function of the workspace's seed, which
|
|
4
|
+
* names one edition of it (a category, an arm, a target product — apps/guide's edition table), so the acme apps seed
|
|
5
|
+
* nothing and minting stays cheap. Its workspaces advertise the guide alone: the gateway keeps `guide` UNLISTED, so
|
|
6
|
+
* no other scenario's workspace names it.
|
|
7
|
+
*/
|
|
8
|
+
export const guideV1 = {
|
|
9
|
+
key: "guide-v1",
|
|
10
|
+
description: "A buyer's guide to four fictional products in one category — the edition is chosen by the seed (apps/guide)",
|
|
11
|
+
apps: ["guide"],
|
|
12
|
+
generate() {
|
|
13
|
+
return {
|
|
14
|
+
company: acmeV1.generate(1).company,
|
|
15
|
+
warehouse: { products: [], locations: [], stock: [], customers: [], orders: [], orderLines: [], transfers: [] },
|
|
16
|
+
helpdesk: { agents: [], tickets: [], comments: [], slaPolicies: [] },
|
|
17
|
+
vault: { documents: [] },
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/guide-v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAa;IAC/B,GAAG,EAAE,UAAU;IACf,WAAW,EAAE,6GAA6G;IAC1H,IAAI,EAAE,CAAC,OAAO,CAAC;IACf,QAAQ;QACN,OAAO;YACL,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO;YACnC,SAAS,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;YAC/G,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;YACpE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;SACzB,CAAC;IACJ,CAAC;CACF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ScenarioRegistry } from "./scenario.js";
|
|
2
2
|
export { ACME_V1_SIZES, acmeV1 } from "./acme-v1/index.js";
|
|
3
3
|
export { shopsV1 } from "./shops-v1/index.js";
|
|
4
|
+
export { guideV1 } from "./guide-v1/index.js";
|
|
4
5
|
export { documentsMatching, lowStock, openOrdersFor, openTicketsFor, orderTotalCents, slaBreaches, stockOf } from "./answers.js";
|
|
5
6
|
export { int, minstd, pick, shuffle, type Rng } from "./prng.js";
|
|
6
7
|
export { ScenarioRegistry, UnknownScenarioError, type Agent, type Comment, type CompanyFacts, type Customer, type Document, type DocumentKind, type Location, type Order, type OrderLine, type OrderStatus, type Product, type Scenario, type ScenarioRows, type SlaPolicy, type Stock, type Ticket, type TicketPriority, type TicketStatus, type Transfer, type TransferStatus, } from "./scenario.js";
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { acmeV1 } from "./acme-v1/index.js";
|
|
2
|
+
import { guideV1 } from "./guide-v1/index.js";
|
|
2
3
|
import { ScenarioRegistry } from "./scenario.js";
|
|
3
4
|
import { shopsV1 } from "./shops-v1/index.js";
|
|
4
5
|
export { ACME_V1_SIZES, acmeV1 } from "./acme-v1/index.js";
|
|
5
6
|
export { shopsV1 } from "./shops-v1/index.js";
|
|
7
|
+
export { guideV1 } from "./guide-v1/index.js";
|
|
6
8
|
export { documentsMatching, lowStock, openOrdersFor, openTicketsFor, orderTotalCents, slaBreaches, stockOf } from "./answers.js";
|
|
7
9
|
export { int, minstd, pick, shuffle } from "./prng.js";
|
|
8
10
|
export { ScenarioRegistry, UnknownScenarioError, } from "./scenario.js";
|
|
@@ -10,5 +12,5 @@ export { ScenarioRegistry, UnknownScenarioError, } from "./scenario.js";
|
|
|
10
12
|
* The default registry with every shipped scenario. acme-v1 stays first: the
|
|
11
13
|
* gateway's robots.txt advertises the shared workspace of the first one.
|
|
12
14
|
*/
|
|
13
|
-
export const scenarios = new ScenarioRegistry().register(acmeV1).register(shopsV1);
|
|
15
|
+
export const scenarios = new ScenarioRegistry().register(acmeV1).register(shopsV1).register(guideV1);
|
|
14
16
|
//# sourceMappingURL=index.js.map
|
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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O,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAY,MAAM,WAAW,CAAC;AACjE,OAAO,EACL,gBAAgB,EAChB,oBAAoB,GAqBrB,MAAM,eAAe,CAAC;AAEvB;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,gBAAgB,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC"}
|
package/dist/scenario.d.ts
CHANGED
|
@@ -117,6 +117,12 @@ export type ScenarioRows = {
|
|
|
117
117
|
export interface Scenario {
|
|
118
118
|
readonly key: string;
|
|
119
119
|
readonly description: string;
|
|
120
|
+
/**
|
|
121
|
+
* The apps this scenario's workspaces advertise (their `urls`, their portal page), in this order — an app named
|
|
122
|
+
* here is advertised even when the gateway lists it as UNLISTED, which keeps it out of every OTHER scenario's
|
|
123
|
+
* workspaces. Absent: every listed app, as before.
|
|
124
|
+
*/
|
|
125
|
+
readonly apps?: readonly string[];
|
|
120
126
|
generate(seed: number): ScenarioRows;
|
|
121
127
|
}
|
|
122
128
|
export declare class UnknownScenarioError extends Error {
|
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":"AA6EA,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,GAAW;QACrB,KAAK,CAAC,qBAAqB,GAAG,EAAE,CAAC,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,+EAA+E;AAC/E,MAAM,OAAO,gBAAgB;IACV,KAAK,GAAG,IAAI,GAAG,EAAoB,CAAC;IAErD,QAAQ,CAAC,QAAkB;QACzB,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;QAClG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,GAAG,CAAC,GAAW;QACb,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,CAAC;YAAE,MAAM,IAAI,oBAAoB,CAAC,GAAG,CAAC,CAAC;QAC5C,OAAO,CAAC,CAAC;IACX,CAAC;IAED,GAAG,CAAC,GAAW;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAED,IAAI;QACF,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IAClC,CAAC;CACF"}
|