@ak--47/dungeon-master 1.2.0 → 1.2.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/dungeons/technical/ad-spend.js +15 -4
- package/dungeons/technical/anonymous-users.js +15 -5
- package/dungeons/technical/array-of-object-lookup.js +21 -5
- package/dungeons/technical/experiments.js +23 -5
- package/dungeons/technical/foobar.js +28 -12
- package/dungeons/technical/group-analytics.js +15 -5
- package/dungeons/technical/mirror-strategies.js +15 -5
- package/dungeons/technical/nested-objects.js +15 -4
- package/dungeons/technical/retention-cadence.js +13 -7
- package/dungeons/technical/sanity.js +25 -6
- package/dungeons/technical/scale-test.js +15 -4
- package/dungeons/technical/scd.js +24 -5
- package/dungeons/technical/simple.js +20 -5
- package/dungeons/technical/simplest.js +23 -6
- package/dungeons/technical/text-generation.js +22 -6
- package/dungeons/user/.gitkeep +0 -0
- package/dungeons/user/shalini.js +847 -0
- package/dungeons/vertical/community-schema.json +1 -1
- package/dungeons/vertical/community.js +49 -28
- package/dungeons/vertical/devtools-schema.json +1 -1
- package/dungeons/vertical/devtools.js +50 -29
- package/dungeons/vertical/ecommerce.js +23 -6
- package/dungeons/vertical/education-schema.json +1 -1
- package/dungeons/vertical/education.js +29 -19
- package/dungeons/vertical/fintech-schema.json +1 -1
- package/dungeons/vertical/fintech.js +27 -8
- package/dungeons/vertical/fitness-schema.json +1 -1
- package/dungeons/vertical/fitness.js +48 -22
- package/dungeons/vertical/food-delivery-schema.json +1 -1
- package/dungeons/vertical/food-delivery.js +51 -12
- package/dungeons/vertical/gaming-schema.json +1 -1
- package/dungeons/vertical/gaming.js +41 -7
- package/dungeons/vertical/healthcare-schema.json +1 -1
- package/dungeons/vertical/healthcare.js +69 -40
- package/dungeons/vertical/insurance-application-schema.json +1 -1
- package/dungeons/vertical/insurance-application.js +26 -8
- package/dungeons/vertical/logistics-schema.json +1 -1
- package/dungeons/vertical/logistics.js +69 -41
- package/dungeons/vertical/marketplace-schema.json +1 -1
- package/dungeons/vertical/marketplace.js +44 -19
- package/dungeons/vertical/media.js +56 -15
- package/dungeons/vertical/rpg-schema.json +1 -1
- package/dungeons/vertical/rpg.js +38 -8
- package/dungeons/vertical/sass.js +24 -7
- package/dungeons/vertical/social.js +23 -7
- package/dungeons/vertical/travel-schema.json +1 -1
- package/dungeons/vertical/travel.js +50 -19
- package/index.js +3 -0
- package/lib/core/config-validator.js +13 -2
- package/lib/generators/events.js +3 -5
- package/lib/orchestrators/user-loop.js +20 -0
- package/lib/utils/utils.js +129 -9
- package/package.json +1 -1
- package/types.d.ts +5 -3
|
@@ -1,14 +1,21 @@
|
|
|
1
|
+
// ── TWEAK THESE ──
|
|
2
|
+
const SEED = "SUPER DUPER DANGEROUS BROOO";
|
|
3
|
+
const num_days = 92;
|
|
4
|
+
const num_users = 8_000;
|
|
5
|
+
const avg_events_per_user = 120;
|
|
6
|
+
let token = "your-mixpanel-token";
|
|
7
|
+
|
|
8
|
+
// ── env overrides ──
|
|
9
|
+
if (process.env.MP_TOKEN) token = process.env.MP_TOKEN;
|
|
10
|
+
|
|
1
11
|
import dayjs from "dayjs";
|
|
2
12
|
import utc from "dayjs/plugin/utc.js";
|
|
3
13
|
import "dotenv/config";
|
|
4
14
|
import { weighNumRange, range, date, initChance, exhaust, choose, integer } from "../../lib/utils/utils.js";
|
|
5
15
|
import { createTextGenerator, generateBatch } from "../../lib/generators/text.js";
|
|
6
16
|
|
|
7
|
-
const SEED = "SUPER DUPER DANGEROUS BROOO";
|
|
8
17
|
dayjs.extend(utc);
|
|
9
18
|
const chance = initChance(SEED);
|
|
10
|
-
const num_users = 8_000;
|
|
11
|
-
const days = 92;
|
|
12
19
|
|
|
13
20
|
/** @typedef {import("../../types").Dungeon} Dungeon */
|
|
14
21
|
|
|
@@ -398,9 +405,9 @@ const webinarChatGen = createTextGenerator({
|
|
|
398
405
|
/** @type {Dungeon} */
|
|
399
406
|
const dungeon = {
|
|
400
407
|
seed: SEED,
|
|
401
|
-
token
|
|
402
|
-
numDays:
|
|
403
|
-
numEvents: num_users *
|
|
408
|
+
token,
|
|
409
|
+
numDays: num_days,
|
|
410
|
+
numEvents: num_users * avg_events_per_user,
|
|
404
411
|
numUsers: num_users,
|
|
405
412
|
hasAnonIds: false,
|
|
406
413
|
hasSessionIds: true, // Enable for chat flow tracking
|
|
@@ -770,6 +777,8 @@ const dungeon = {
|
|
|
770
777
|
preferred_communication: ["email", "chat", "phone", "self_service"],
|
|
771
778
|
is_power_user: [false],
|
|
772
779
|
risk_level: ["healthy"],
|
|
780
|
+
product_tier: ["free", "basic", "pro", "enterprise"],
|
|
781
|
+
data_center: ["us-east", "us-west", "eu-central", "asia-pacific"],
|
|
773
782
|
},
|
|
774
783
|
|
|
775
784
|
// ============= Slowly Changing Dimensions =============
|
|
@@ -804,6 +813,13 @@ const dungeon = {
|
|
|
804
813
|
|
|
805
814
|
// --- everything hook: enterprise users get a satisfaction survey event ---
|
|
806
815
|
if (type === "everything" && meta && meta.profile) {
|
|
816
|
+
// stamp superProps from profile for consistency (skip feature_flags — intentionally per-event)
|
|
817
|
+
const profile = meta.profile;
|
|
818
|
+
record.forEach(e => {
|
|
819
|
+
e.product_tier = profile.product_tier;
|
|
820
|
+
e.data_center = profile.data_center;
|
|
821
|
+
});
|
|
822
|
+
|
|
807
823
|
if (meta.profile.user_tier === "enterprise" && record.length > 5) {
|
|
808
824
|
const lastEvent = record[record.length - 1];
|
|
809
825
|
record.push({
|
|
File without changes
|