@benchme/scenarios 0.7.2 → 0.9.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.
@@ -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,8 @@
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";
5
+ export { webV1 } from "./web-v1/index.js";
4
6
  export { documentsMatching, lowStock, openOrdersFor, openTicketsFor, orderTotalCents, slaBreaches, stockOf } from "./answers.js";
5
7
  export { int, minstd, pick, shuffle, type Rng } from "./prng.js";
6
8
  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,12 @@
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";
5
+ import { webV1 } from "./web-v1/index.js";
4
6
  export { ACME_V1_SIZES, acmeV1 } from "./acme-v1/index.js";
5
7
  export { shopsV1 } from "./shops-v1/index.js";
8
+ export { guideV1 } from "./guide-v1/index.js";
9
+ export { webV1 } from "./web-v1/index.js";
6
10
  export { documentsMatching, lowStock, openOrdersFor, openTicketsFor, orderTotalCents, slaBreaches, stockOf } from "./answers.js";
7
11
  export { int, minstd, pick, shuffle } from "./prng.js";
8
12
  export { ScenarioRegistry, UnknownScenarioError, } from "./scenario.js";
@@ -10,5 +14,5 @@ export { ScenarioRegistry, UnknownScenarioError, } from "./scenario.js";
10
14
  * The default registry with every shipped scenario. acme-v1 stays first: the
11
15
  * gateway's robots.txt advertises the shared workspace of the first one.
12
16
  */
13
- export const scenarios = new ScenarioRegistry().register(acmeV1).register(shopsV1);
17
+ export const scenarios = new ScenarioRegistry().register(acmeV1).register(shopsV1).register(guideV1).register(webV1);
14
18
  //# 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,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACjI,OAAO,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"}
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;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC3D,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,iBAAiB,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACjI,OAAO,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,QAAQ,CAAC,KAAK,CAAC,CAAC"}
@@ -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 {
@@ -1 +1 @@
1
- {"version":3,"file":"scenario.js","sourceRoot":"","sources":["../src/scenario.ts"],"names":[],"mappings":"AAuEA,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"}
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"}
@@ -0,0 +1,9 @@
1
+ import type { Scenario } from "../scenario.js";
2
+ /**
3
+ * web-v1: the site network (apps/guide, under /web) — a start page listing four fictional products of one category,
4
+ * each product's own site, and a chain of recommendation sites. Its pages are a pure function of the workspace's seed,
5
+ * which names one edition (a category, an arm, a target product — apps/guide's network edition table), so the acme
6
+ * apps seed nothing and minting stays cheap. Its workspaces advertise the network alone: the gateway keeps `web`
7
+ * UNLISTED, so no other scenario's workspace names it.
8
+ */
9
+ export declare const webV1: Scenario;
@@ -0,0 +1,22 @@
1
+ import { acmeV1 } from "../acme-v1/index.js";
2
+ /**
3
+ * web-v1: the site network (apps/guide, under /web) — a start page listing four fictional products of one category,
4
+ * each product's own site, and a chain of recommendation sites. Its pages are a pure function of the workspace's seed,
5
+ * which names one edition (a category, an arm, a target product — apps/guide's network edition table), so the acme
6
+ * apps seed nothing and minting stays cheap. Its workspaces advertise the network alone: the gateway keeps `web`
7
+ * UNLISTED, so no other scenario's workspace names it.
8
+ */
9
+ export const webV1 = {
10
+ key: "web-v1",
11
+ description: "A small web of sites about four fictional products in one category — the edition is chosen by the seed (apps/guide, /web)",
12
+ apps: ["web"],
13
+ generate() {
14
+ return {
15
+ company: acmeV1.generate(1).company,
16
+ warehouse: { products: [], locations: [], stock: [], customers: [], orders: [], orderLines: [], transfers: [] },
17
+ helpdesk: { agents: [], tickets: [], comments: [], slaPolicies: [] },
18
+ vault: { documents: [] },
19
+ };
20
+ },
21
+ };
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/web-v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,KAAK,GAAa;IAC7B,GAAG,EAAE,QAAQ;IACb,WAAW,EAAE,2HAA2H;IACxI,IAAI,EAAE,CAAC,KAAK,CAAC;IACb,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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@benchme/scenarios",
3
- "version": "0.7.2",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",