chore: update faker functions (2)
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
forks: faker.number.int(1000),
|
||||
releases: faker.number.int(1000),
|
||||
},
|
||||
diskUsage: `${faker.datatype.float({min: 1, max: 999}).toFixed(1)}MB`,
|
||||
diskUsage: `${faker.number.float({min: 1, max: 999}).toFixed(1)}MB`,
|
||||
registration: `${faker.number.int({min: 2, max: 10})} years ago`,
|
||||
cakeday: false,
|
||||
calendar: new Array(14).fill(null).map(_ => ({color: faker.helpers.arrayElement(["#ebedf0", "#9be9a8", "#40c463", "#30a14e", "#216e39"])})),
|
||||
@@ -274,7 +274,7 @@
|
||||
? {
|
||||
user: {
|
||||
commits: faker.number.int(100),
|
||||
percentage: faker.datatype.float({max: 1}),
|
||||
percentage: faker.number.float({max: 1}),
|
||||
maintainer: false,
|
||||
stars: faker.number.int(100),
|
||||
},
|
||||
@@ -679,10 +679,10 @@
|
||||
url: options["pagespeed.url"] || "(attached website url)",
|
||||
detailed: options["pagespeed.detailed"] || false,
|
||||
scores: [
|
||||
{score: faker.datatype.float({max: 1}), title: "Performance"},
|
||||
{score: faker.datatype.float({max: 1}), title: "Accessibility"},
|
||||
{score: faker.datatype.float({max: 1}), title: "Best Practices"},
|
||||
{score: faker.datatype.float({max: 1}), title: "SEO"},
|
||||
{score: faker.number.float({max: 1}), title: "Performance"},
|
||||
{score: faker.number.float({max: 1}), title: "Accessibility"},
|
||||
{score: faker.number.float({max: 1}), title: "Best Practices"},
|
||||
{score: faker.number.float({max: 1}), title: "SEO"},
|
||||
...options["pagespeed.pwa"] ? [{score: faker.number.int({max: 1}), title: "PWA"}] : [],
|
||||
],
|
||||
metrics: {
|
||||
@@ -695,12 +695,12 @@
|
||||
maxPotentialFID: faker.number.int(500),
|
||||
observedLoad: faker.number.int(500),
|
||||
firstMeaningfulPaint: faker.number.int(500),
|
||||
observedCumulativeLayoutShift: faker.datatype.float({max: 1}),
|
||||
observedCumulativeLayoutShift: faker.number.float({max: 1}),
|
||||
observedSpeedIndex: faker.number.int(1000),
|
||||
observedSpeedIndexTs: faker.date.recent(),
|
||||
observedTimeOriginTs: faker.date.recent(),
|
||||
observedLargestContentfulPaint: faker.number.int(1000),
|
||||
cumulativeLayoutShift: faker.datatype.float({max: 1}),
|
||||
cumulativeLayoutShift: faker.number.float({max: 1}),
|
||||
observedFirstPaintTs: faker.date.recent(),
|
||||
observedTraceEndTs: faker.date.recent(),
|
||||
largestContentfulPaint: faker.number.int(2000),
|
||||
@@ -1326,7 +1326,7 @@
|
||||
isocalendar: {
|
||||
streak: {max: 30 + faker.number.int(20), current: faker.number.int(30)},
|
||||
max: 10 + faker.number.int(40),
|
||||
average: faker.datatype.float(10),
|
||||
average: faker.number.float(10),
|
||||
svg: await staticPlaceholder(set.plugins.enabled.isocalendar, `isocalendar.${options["isocalendar.duration"]}.svg`),
|
||||
duration: options["isocalendar.duration"],
|
||||
},
|
||||
|
||||
@@ -33,19 +33,19 @@ export default function({faker, url, options, login = faker.internet.userName()}
|
||||
image: [
|
||||
{
|
||||
size: "small",
|
||||
"#text": faker.image.abstract(),
|
||||
"#text": faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
},
|
||||
{
|
||||
size: "medium",
|
||||
"#text": faker.image.abstract(),
|
||||
"#text": faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
},
|
||||
{
|
||||
size: "large",
|
||||
"#text": faker.image.abstract(),
|
||||
"#text": faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
},
|
||||
{
|
||||
size: "extralarge",
|
||||
"#text": faker.image.abstract(),
|
||||
"#text": faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
},
|
||||
],
|
||||
streamable: "0",
|
||||
@@ -86,19 +86,19 @@ export default function({faker, url, options, login = faker.internet.userName()}
|
||||
image: [
|
||||
{
|
||||
size: "small",
|
||||
"#text": faker.image.abstract(),
|
||||
"#text": faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
},
|
||||
{
|
||||
size: "medium",
|
||||
"#text": faker.image.abstract(),
|
||||
"#text": faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
},
|
||||
{
|
||||
size: "large",
|
||||
"#text": faker.image.abstract(),
|
||||
"#text": faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
},
|
||||
{
|
||||
size: "extralarge",
|
||||
"#text": faker.image.abstract(),
|
||||
"#text": faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
},
|
||||
],
|
||||
url: faker.internet.url(),
|
||||
@@ -130,19 +130,19 @@ export default function({faker, url, options, login = faker.internet.userName()}
|
||||
image: [
|
||||
{
|
||||
size: "small",
|
||||
"#text": faker.image.abstract(),
|
||||
"#text": faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
},
|
||||
{
|
||||
size: "medium",
|
||||
"#text": faker.image.abstract(),
|
||||
"#text": faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
},
|
||||
{
|
||||
size: "large",
|
||||
"#text": faker.image.abstract(),
|
||||
"#text": faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
},
|
||||
{
|
||||
size: "extralarge",
|
||||
"#text": faker.image.abstract(),
|
||||
"#text": faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
},
|
||||
],
|
||||
streamable: "0",
|
||||
|
||||
@@ -43,12 +43,12 @@ export default function({faker, url, options, login = faker.internet.userName()}
|
||||
maxPotentialFID: faker.number.int(500),
|
||||
observedLoad: faker.number.int(500),
|
||||
firstMeaningfulPaint: faker.number.int(500),
|
||||
observedCumulativeLayoutShift: faker.datatype.float({max: 1}),
|
||||
observedCumulativeLayoutShift: faker.number.float({max: 1}),
|
||||
observedSpeedIndex: faker.number.int(1000),
|
||||
observedSpeedIndexTs: faker.date.recent(),
|
||||
observedTimeOriginTs: faker.date.recent(),
|
||||
observedLargestContentfulPaint: faker.number.int(1000),
|
||||
cumulativeLayoutShift: faker.datatype.float({max: 1}),
|
||||
cumulativeLayoutShift: faker.number.float({max: 1}),
|
||||
observedFirstPaintTs: faker.date.recent(),
|
||||
observedTraceEndTs: faker.date.recent(),
|
||||
largestContentfulPaint: faker.number.int(2000),
|
||||
@@ -78,22 +78,22 @@ export default function({faker, url, options, login = faker.internet.userName()}
|
||||
"best-practices": {
|
||||
id: "best-practices",
|
||||
title: "Best Practices",
|
||||
score: faker.datatype.float({max: 1}),
|
||||
score: faker.number.float({max: 1}),
|
||||
},
|
||||
seo: {
|
||||
id: "seo",
|
||||
title: "SEO",
|
||||
score: faker.datatype.float({max: 1}),
|
||||
score: faker.number.float({max: 1}),
|
||||
},
|
||||
accessibility: {
|
||||
id: "accessibility",
|
||||
title: "Accessibility",
|
||||
score: faker.datatype.float({max: 1}),
|
||||
score: faker.number.float({max: 1}),
|
||||
},
|
||||
performance: {
|
||||
id: "performance",
|
||||
title: "Performance",
|
||||
score: faker.datatype.float({max: 1}),
|
||||
score: faker.number.float({max: 1}),
|
||||
},
|
||||
pwa: {
|
||||
id: "pwa",
|
||||
|
||||
@@ -24,17 +24,17 @@ export default function({faker, url, options, login = faker.internet.userName()}
|
||||
images: [
|
||||
{
|
||||
height: 640,
|
||||
url: faker.image.abstract(),
|
||||
url: faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
width: 640,
|
||||
},
|
||||
{
|
||||
height: 300,
|
||||
url: faker.image.abstract(),
|
||||
url: faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
height: 64,
|
||||
url: faker.image.abstract(),
|
||||
url: faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
width: 64,
|
||||
},
|
||||
],
|
||||
@@ -81,17 +81,17 @@ export default function({faker, url, options, login = faker.internet.userName()}
|
||||
images: [
|
||||
{
|
||||
height: 640,
|
||||
url: faker.image.abstract(),
|
||||
url: faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
width: 640,
|
||||
},
|
||||
{
|
||||
height: 300,
|
||||
url: faker.image.abstract(),
|
||||
url: faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
height: 64,
|
||||
url: faker.image.abstract(),
|
||||
url: faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
width: 64,
|
||||
},
|
||||
],
|
||||
@@ -126,17 +126,17 @@ export default function({faker, url, options, login = faker.internet.userName()}
|
||||
images: [
|
||||
{
|
||||
height: 640,
|
||||
url: faker.image.abstract(),
|
||||
url: faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
width: 640,
|
||||
},
|
||||
{
|
||||
height: 300,
|
||||
url: faker.image.abstract(),
|
||||
url: faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
height: 64,
|
||||
url: faker.image.abstract(),
|
||||
url: faker.image.urlLoremFlickr({ category: 'abstract' }),
|
||||
width: 64,
|
||||
},
|
||||
],
|
||||
|
||||
@@ -64,9 +64,9 @@ export default function({faker, url, body, login = faker.internet.userName()}) {
|
||||
],
|
||||
matchedUser: {
|
||||
problemsSolvedBeatsStats: [
|
||||
{difficulty: "Easy", percentage: faker.datatype.float({max: 100})},
|
||||
{difficulty: "Medium", percentage: faker.datatype.float({max: 100})},
|
||||
{difficulty: "Hard", percentage: faker.datatype.float({max: 100})},
|
||||
{difficulty: "Easy", percentage: faker.number.float({max: 100})},
|
||||
{difficulty: "Medium", percentage: faker.number.float({max: 100})},
|
||||
{difficulty: "Hard", percentage: faker.number.float({max: 100})},
|
||||
],
|
||||
submitStatsGlobal: {
|
||||
acSubmissionNum: [
|
||||
|
||||
Reference in New Issue
Block a user