@rljson/edge 0.0.0 → 0.0.1
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.de.md +181 -0
- package/README.md +165 -1
- package/dist/README.de.md +181 -0
- package/dist/README.md +165 -1
- package/dist/car-world/bom-builder.d.ts +57 -0
- package/dist/car-world/brands.d.ts +17 -0
- package/dist/car-world/car-world.d.ts +135 -0
- package/dist/car-world/catalog-generator.d.ts +99 -0
- package/dist/car-world/generate-car-world.d.ts +16 -0
- package/dist/car-world/plan.d.ts +130 -0
- package/dist/car-world/prices.d.ts +32 -0
- package/dist/car-world/scene-builder.d.ts +40 -0
- package/dist/car-world/table-cfgs.d.ts +22 -0
- package/dist/car-world/workshops.d.ts +39 -0
- package/dist/config/config.d.ts +177 -0
- package/dist/config/presets.d.ts +13 -0
- package/dist/core/emitter.d.ts +71 -0
- package/dist/core/estimate.d.ts +33 -0
- package/dist/core/pick.d.ts +69 -0
- package/dist/core/sink.d.ts +49 -0
- package/dist/dictionaries/cad.d.ts +13 -0
- package/dist/dictionaries/manufacturers.d.ts +21 -0
- package/dist/dictionaries/parts.d.ts +29 -0
- package/dist/dictionaries/people.d.ts +4 -0
- package/dist/dictionaries/places.d.ts +27 -0
- package/dist/dictionaries/vehicles.d.ts +22 -0
- package/dist/edge.d.ts +59 -1
- package/dist/edge.js +11322 -3
- package/dist/edge.js.map +1 -1
- package/dist/edge_version.d.ts +2 -0
- package/dist/example.d.ts +7 -1
- package/dist/index.d.ts +23 -1
- package/dist/src/example.ts +57 -15
- package/package.json +4 -4
package/dist/edge.d.ts
CHANGED
|
@@ -1,4 +1,62 @@
|
|
|
1
|
+
import { ECarWorld } from './car-world/car-world.ts';
|
|
2
|
+
import { EConfig, EResolvedConfig } from './config/config.ts';
|
|
3
|
+
import { EPresetName } from './config/presets.ts';
|
|
4
|
+
import { EEstimate } from './core/estimate.ts';
|
|
5
|
+
import { ESink } from './core/sink.ts';
|
|
6
|
+
/** What a run produced */
|
|
7
|
+
export interface EStats extends EEstimate {
|
|
8
|
+
/** How long the run took, in milliseconds */
|
|
9
|
+
durationMs: number;
|
|
10
|
+
/** The share of produced rows that equalled an earlier row and were dropped */
|
|
11
|
+
dedupRatio: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Edge, the example data generator for Rljson.
|
|
15
|
+
*
|
|
16
|
+
* Edge builds a car world: manufacturers with catalogs of cars, and for every
|
|
17
|
+
* car a price, a brand, a workshop, a bill of materials and a CAD scene. The
|
|
18
|
+
* world uses components, slice ids, layers, cakes, trees, revisions and table
|
|
19
|
+
* configurations. Nothing is random: the same configuration yields the same
|
|
20
|
+
* data and the same hashes, everywhere.
|
|
21
|
+
*/
|
|
1
22
|
export declare class Edge {
|
|
2
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Constructor
|
|
25
|
+
* @param config - The configuration; every field has a default
|
|
26
|
+
*/
|
|
27
|
+
constructor(config?: EConfig);
|
|
28
|
+
/**
|
|
29
|
+
* Creates a generator from a preset.
|
|
30
|
+
* @param name - tiny, small, medium, large or xl
|
|
31
|
+
* @param overrides - Settings that replace parts of the preset
|
|
32
|
+
*/
|
|
33
|
+
static preset(name: EPresetName, overrides?: EConfig): Edge;
|
|
34
|
+
/** Returns an example instance for test purposes: the tiny preset */
|
|
3
35
|
static get example(): Edge;
|
|
36
|
+
/** Calculates how big the world will be, without generating a row */
|
|
37
|
+
estimate(): EEstimate;
|
|
38
|
+
/**
|
|
39
|
+
* Generates the world in memory and returns it with the statistics of the
|
|
40
|
+
* run. This is the default way to use Edge and fits worlds up to the medium
|
|
41
|
+
* preset.
|
|
42
|
+
*/
|
|
43
|
+
generate(): Promise<{
|
|
44
|
+
world: ECarWorld;
|
|
45
|
+
stats: EStats;
|
|
46
|
+
}>;
|
|
47
|
+
/**
|
|
48
|
+
* Generates the world and hands every row to a sink, in the order of the
|
|
49
|
+
* references. Nothing is kept. Without a sink the rows are dropped, which
|
|
50
|
+
* serves benchmarks and progress tests.
|
|
51
|
+
* @param sink - Receives the rows
|
|
52
|
+
*/
|
|
53
|
+
run(sink?: ESink): Promise<EStats>;
|
|
54
|
+
/** The configuration with every default filled in */
|
|
55
|
+
readonly config: EResolvedConfig;
|
|
4
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Merges overrides into a configuration, section by section.
|
|
59
|
+
* @param base - The configuration to start from
|
|
60
|
+
* @param overrides - The settings that replace parts of it
|
|
61
|
+
*/
|
|
62
|
+
export declare const mergeConfigs: (base: EConfig, overrides: EConfig) => EConfig;
|