make-mp-data 1.4.4 → 1.5.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/.vscode/launch.json +1 -1
- package/.vscode/settings.json +1 -0
- package/index.js +1410 -0
- package/package.json +12 -9
- package/schemas/adspend.js +96 -0
- package/schemas/anon.js +4 -4
- package/schemas/big.js +160 -0
- package/schemas/complex.js +32 -25
- package/schemas/foobar.js +22 -7
- package/schemas/funnels.js +12 -12
- package/schemas/mirror.js +129 -0
- package/schemas/simple.js +18 -32
- package/scratch.mjs +33 -11
- package/scripts/jsdoctest.js +1 -1
- package/scripts/new.sh +68 -0
- package/{core → src}/cli.js +10 -3
- package/{core → src}/utils.js +167 -197
- package/tests/benchmark/concurrency.mjs +52 -0
- package/tests/coverage/.gitkeep +0 -0
- package/tests/e2e.test.js +245 -58
- package/tests/int.test.js +618 -0
- package/tests/jest.config.js +11 -2
- package/tests/testSoup.mjs +3 -3
- package/tests/unit.test.js +351 -227
- package/tsconfig.json +1 -1
- package/types.d.ts +217 -97
- package/core/index.js +0 -1008
- package/schemas/deepNest.js +0 -106
- /package/{data → dungeons}/.gitkeep +0 -0
- /package/{core → src}/chart.js +0 -0
- /package/{core → src}/defaults.js +0 -0
package/schemas/deepNest.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
const Chance = require('chance');
|
|
2
|
-
const chance = new Chance();
|
|
3
|
-
const u = require('../core/utils');
|
|
4
|
-
|
|
5
|
-
const plans = ['free', 'premium', 'casual', 'influencer'];
|
|
6
|
-
const marketingChannels = ["Organic", "Organic", "Organic", "Organic", "Instagram Ads", "Facebook Ads", "Google Ads", "Youtube Ads", "Instagram Post", "Instagram Post", "Facebook Post"];
|
|
7
|
-
|
|
8
|
-
const config = {
|
|
9
|
-
token: "",
|
|
10
|
-
secret: "",
|
|
11
|
-
seed: "get nesty!",
|
|
12
|
-
events: ['watch video', 'upload video', 'like video', 'dislike video', 'subscribe'],
|
|
13
|
-
eventProperties: {
|
|
14
|
-
videoMeta: generateVideoMeta
|
|
15
|
-
},
|
|
16
|
-
userProperties: {
|
|
17
|
-
userMeta: generateUserMeta
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
groupKeys: [],
|
|
22
|
-
groupProperties: {}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
function generateVideoMeta() {
|
|
27
|
-
let formats = ['2160p', '1440p', '1080p', '720p', '480p', '360p', '240p'];
|
|
28
|
-
let ratios = ['4:3', '16:10', '16:9'];
|
|
29
|
-
let containers = ["WEBM", ["MPG", "MP2", "MPEG"], ["MP4", "M4P", "M4V"], ["AVI", "WMV"], ["MOV", "QT"], ["FLV", "SWF"], "AVCHD"];
|
|
30
|
-
let hashtags = ["#AK", "#bitcoin", "#cureForMiley", "#faceValue", "#blm", "#fwiw", "#inappropriateFuneralSongs", "#jurassicPork", "#lolCats", "#wheatForSheep", "#momTexts", "#myWeirdGymStory", "#poppy", "#resist", "#tbt", "#wilson", "#worstGiftEver", "#yolo", "#phish", "#crypto", "#memes", "#wrongMovie", "#careerEndingTwitterTypos", "#twoThingsThatDontMix"];
|
|
31
|
-
let platforms = ["Web", "Mobile Web", "Native (Android)", "Native (iOS)", "Native (Desktop)", "IoT"];
|
|
32
|
-
let plans = ['free', 'premium', 'casual', 'influencer'];
|
|
33
|
-
let categories = ["Product reviews video", "How-to videos", "Vlogs", "Gaming videos", "Comedy/skit videos", "Haul videos", "Memes/tags", "Favorites/best of", "Educational videos", "Unboxing videos", "Q&A videos", "Collection", "Prank videos"];
|
|
34
|
-
let marketingChannels = ["Organic", "Organic", "Organic", "Organic", "Instagram Ads", "Facebook Ads", "Google Ads", "Youtube Ads", "Instagram Post", "Instagram Post", "Facebook Post"];
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
let videoTemplate = {
|
|
38
|
-
videoFormatInfo: {
|
|
39
|
-
availableFormats: chance.pickset(formats, int(1, formats.length)),
|
|
40
|
-
availableAspectRatios: chance.pickset(ratios, int(1, ratios.length)),
|
|
41
|
-
availableContainerFormats: chance.pickset(containers, int(1, containers.length)),
|
|
42
|
-
observedLatencyTimestamps: chance.pickset(u.range(1, 300000), int(1, 40))
|
|
43
|
-
},
|
|
44
|
-
videoStats: {
|
|
45
|
-
numberOfPlays: int(10, 10000000),
|
|
46
|
-
isRecommendedVideo: chance.bool(),
|
|
47
|
-
inPlaylists: chance.pickset(hashtags, int(1, hashtags.length)),
|
|
48
|
-
likers: chance.n(chance.guid, int(3, 100)),
|
|
49
|
-
dislikers: chance.n(chance.guid, int(3, 100)),
|
|
50
|
-
},
|
|
51
|
-
videoContentInfo: {
|
|
52
|
-
categories: {
|
|
53
|
-
hashtags: chance.pickset(hashtags, int(1, 10)),
|
|
54
|
-
category: chance.pickone(categories),
|
|
55
|
-
},
|
|
56
|
-
availability: {
|
|
57
|
-
hasAdvertisements: chance.bool(),
|
|
58
|
-
canBeSeenOnPlans: chance.pickset(plans, int(1, plans.length)),
|
|
59
|
-
releaseInfo: {
|
|
60
|
-
isReleased: chance.bool({ likelihood: 90 }),
|
|
61
|
-
releaseDate: chance.date({ year: 2021 })
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
uploaderInfo: {
|
|
67
|
-
platform: chance.pickone(platforms),
|
|
68
|
-
uuid: chance.guid(),
|
|
69
|
-
plan: chance.pickone(plans)
|
|
70
|
-
},
|
|
71
|
-
viewerInfo: {
|
|
72
|
-
platform: chance.pickone(platforms),
|
|
73
|
-
uuid: chance.guid(),
|
|
74
|
-
plan: chance.pickone(plans)
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
return videoTemplate;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function generateUserMeta() {
|
|
82
|
-
|
|
83
|
-
let userTemplate = {
|
|
84
|
-
favoriteNumber: chance.prime(),
|
|
85
|
-
attributionChain: chance.pickset(marketingChannels, int(1, 10)),
|
|
86
|
-
importantUserDates: {
|
|
87
|
-
firstSeenDate: chance.date({ year: 2010 }),
|
|
88
|
-
firstPurchaseDate: chance.date({ year: 2011 }),
|
|
89
|
-
firstSubscribeDate: chance.date({ year: 2011 }),
|
|
90
|
-
lastPurchaseDate: chance.date({ year: 2012 })
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
plan: chance.pickone(plans),
|
|
94
|
-
followers: chance.n(chance.guid, int(1, 100)),
|
|
95
|
-
follows: chance.n(chance.guid, int(1, 100))
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
return userTemplate;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
function int(min, max) {
|
|
103
|
-
return chance.integer({ min, max });
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
module.exports = config;
|
|
File without changes
|
/package/{core → src}/chart.js
RENAMED
|
File without changes
|
|
File without changes
|