@benchme/scenarios 0.6.0 → 0.7.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/README.md +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/shops-v1/index.d.ts +7 -0
- package/dist/shops-v1/index.js +19 -0
- package/dist/shops-v1/index.js.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# @benchme/scenarios
|
|
2
2
|
|
|
3
|
-
Part of [benchme](https://github.com/orabenchmarks/benchme): benchme seeded scenario generators (acme-v1) and the derived ground truths tasks are graded against
|
|
3
|
+
Part of [benchme](https://github.com/orabenchmarks/benchme): benchme seeded scenario generators (acme-v1; shops-v1 for the consumer stores, whose catalogues live in apps/shops) and the derived ground truths tasks are graded against
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { ScenarioRegistry } from "./scenario.js";
|
|
2
2
|
export { ACME_V1_SIZES, acmeV1 } from "./acme-v1/index.js";
|
|
3
|
+
export { shopsV1 } from "./shops-v1/index.js";
|
|
3
4
|
export { documentsMatching, lowStock, openOrdersFor, openTicketsFor, orderTotalCents, slaBreaches, stockOf } from "./answers.js";
|
|
4
5
|
export { int, minstd, pick, shuffle, type Rng } from "./prng.js";
|
|
5
6
|
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";
|
|
6
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* The default registry with every shipped scenario. acme-v1 stays first: the
|
|
9
|
+
* gateway's robots.txt advertises the shared workspace of the first one.
|
|
10
|
+
*/
|
|
7
11
|
export declare const scenarios: ScenarioRegistry;
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { acmeV1 } from "./acme-v1/index.js";
|
|
2
2
|
import { ScenarioRegistry } from "./scenario.js";
|
|
3
|
+
import { shopsV1 } from "./shops-v1/index.js";
|
|
3
4
|
export { ACME_V1_SIZES, acmeV1 } from "./acme-v1/index.js";
|
|
5
|
+
export { shopsV1 } from "./shops-v1/index.js";
|
|
4
6
|
export { documentsMatching, lowStock, openOrdersFor, openTicketsFor, orderTotalCents, slaBreaches, stockOf } from "./answers.js";
|
|
5
7
|
export { int, minstd, pick, shuffle } from "./prng.js";
|
|
6
8
|
export { ScenarioRegistry, UnknownScenarioError, } from "./scenario.js";
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
+
/**
|
|
10
|
+
* The default registry with every shipped scenario. acme-v1 stays first: the
|
|
11
|
+
* gateway's robots.txt advertises the shared workspace of the first one.
|
|
12
|
+
*/
|
|
13
|
+
export const scenarios = new ScenarioRegistry().register(acmeV1).register(shopsV1);
|
|
9
14
|
//# 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;
|
|
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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Scenario } from "../scenario.js";
|
|
2
|
+
/**
|
|
3
|
+
* shops-v1: the consumer stores. Each store owns its catalogue (apps/shops),
|
|
4
|
+
* so the acme apps seed nothing and minting stays cheap; `company` is acme-v1's
|
|
5
|
+
* of seed 1, the same in every shops-v1 workspace whatever its seed.
|
|
6
|
+
*/
|
|
7
|
+
export declare const shopsV1: Scenario;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { acmeV1 } from "../acme-v1/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* shops-v1: the consumer stores. Each store owns its catalogue (apps/shops),
|
|
4
|
+
* so the acme apps seed nothing and minting stays cheap; `company` is acme-v1's
|
|
5
|
+
* of seed 1, the same in every shops-v1 workspace whatever its seed.
|
|
6
|
+
*/
|
|
7
|
+
export const shopsV1 = {
|
|
8
|
+
key: "shops-v1",
|
|
9
|
+
description: "Consumer stores (Wrenfield, Halden, Quillfeather) — catalogues live in apps/shops; the acme apps are empty",
|
|
10
|
+
generate() {
|
|
11
|
+
return {
|
|
12
|
+
company: acmeV1.generate(1).company,
|
|
13
|
+
warehouse: { products: [], locations: [], stock: [], customers: [], orders: [], orderLines: [], transfers: [] },
|
|
14
|
+
helpdesk: { agents: [], tickets: [], comments: [], slaPolicies: [] },
|
|
15
|
+
vault: { documents: [] },
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shops-v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAa;IAC/B,GAAG,EAAE,UAAU;IACf,WAAW,EAAE,4GAA4G;IACzH,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.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"build": "tsc -b",
|
|
16
16
|
"test": "vitest run"
|
|
17
17
|
},
|
|
18
|
-
"description": "benchme seeded scenario generators (acme-v1) and the derived ground truths tasks are graded against",
|
|
18
|
+
"description": "benchme seeded scenario generators (acme-v1; shops-v1 for the consumer stores) and the derived ground truths tasks are graded against",
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
21
|
"url": "git+https://github.com/orabenchmarks/benchme.git",
|