assuremind 1.2.0 → 1.2.3
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 +340 -265
- package/dist/cli/index.js +1595 -362
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.mts +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +204 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +202 -1
- package/dist/index.mjs.map +1 -1
- package/docs/CLI-REFERENCE.md +19 -3
- package/docs/GETTING-STARTED.md +42 -1
- package/docs/STUDIO.md +205 -3
- package/package.json +5 -1
- package/templates/ASSUREMIND.md +7 -0
- package/templates/docs/GETTING-STARTED.md +13 -0
- package/templates/docs/STUDIO.md +11 -1
- package/ui/dist/assets/index-B2cmnLeA.js +942 -0
- package/ui/dist/assets/index-Bz5b82ao.css +1 -0
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-DTtYd1hD.js +0 -837
- package/ui/dist/assets/index-lOAh29q9.css +0 -1
package/dist/index.mjs
CHANGED
|
@@ -202,8 +202,10 @@ var TestStepSchema = z2.object({
|
|
|
202
202
|
mockStatus: z2.number().int().optional(),
|
|
203
203
|
runAudit: z2.boolean().optional(),
|
|
204
204
|
// Mark this step as a Lighthouse audit checkpoint
|
|
205
|
-
soft: z2.boolean().optional()
|
|
205
|
+
soft: z2.boolean().optional(),
|
|
206
206
|
// Use expect.soft() — test continues on assertion failure
|
|
207
|
+
visualCheck: z2.boolean().optional()
|
|
208
|
+
// Enable visual regression comparison for this step
|
|
207
209
|
});
|
|
208
210
|
var DataSourceSchema = z2.object({
|
|
209
211
|
type: z2.enum(["inline", "json-file", "csv-file"]),
|
|
@@ -1529,6 +1531,203 @@ function tryGetEnv() {
|
|
|
1529
1531
|
}
|
|
1530
1532
|
}
|
|
1531
1533
|
|
|
1534
|
+
// src/engine/data-generator.ts
|
|
1535
|
+
import { faker } from "@faker-js/faker";
|
|
1536
|
+
function getAvailableGenerators() {
|
|
1537
|
+
return [
|
|
1538
|
+
{
|
|
1539
|
+
category: "person",
|
|
1540
|
+
methods: [
|
|
1541
|
+
{ name: "fullName", example: faker.person.fullName() },
|
|
1542
|
+
{ name: "firstName", example: faker.person.firstName() },
|
|
1543
|
+
{ name: "lastName", example: faker.person.lastName() },
|
|
1544
|
+
{ name: "middleName", example: faker.person.middleName() },
|
|
1545
|
+
{ name: "sex", example: faker.person.sex() },
|
|
1546
|
+
{ name: "prefix", example: faker.person.prefix() },
|
|
1547
|
+
{ name: "suffix", example: faker.person.suffix() },
|
|
1548
|
+
{ name: "jobTitle", example: faker.person.jobTitle() },
|
|
1549
|
+
{ name: "jobArea", example: faker.person.jobArea() },
|
|
1550
|
+
{ name: "jobType", example: faker.person.jobType() },
|
|
1551
|
+
{ name: "bio", example: faker.person.bio() }
|
|
1552
|
+
]
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
category: "internet",
|
|
1556
|
+
methods: [
|
|
1557
|
+
{ name: "email", example: faker.internet.email() },
|
|
1558
|
+
{ name: "userName", example: faker.internet.username() },
|
|
1559
|
+
{ name: "password", example: faker.internet.password() },
|
|
1560
|
+
{ name: "url", example: faker.internet.url() },
|
|
1561
|
+
{ name: "domainName", example: faker.internet.domainName() },
|
|
1562
|
+
{ name: "domainWord", example: faker.internet.domainWord() },
|
|
1563
|
+
{ name: "ip", example: faker.internet.ip() },
|
|
1564
|
+
{ name: "ipv6", example: faker.internet.ipv6() },
|
|
1565
|
+
{ name: "mac", example: faker.internet.mac() },
|
|
1566
|
+
{ name: "userAgent", example: faker.internet.userAgent() },
|
|
1567
|
+
{ name: "emoji", example: faker.internet.emoji() }
|
|
1568
|
+
]
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
category: "phone",
|
|
1572
|
+
methods: [
|
|
1573
|
+
{ name: "number", example: faker.phone.number() },
|
|
1574
|
+
{ name: "imei", example: faker.phone.imei() }
|
|
1575
|
+
]
|
|
1576
|
+
},
|
|
1577
|
+
{
|
|
1578
|
+
category: "location",
|
|
1579
|
+
methods: [
|
|
1580
|
+
{ name: "streetAddress", example: faker.location.streetAddress() },
|
|
1581
|
+
{ name: "street", example: faker.location.street() },
|
|
1582
|
+
{ name: "city", example: faker.location.city() },
|
|
1583
|
+
{ name: "state", example: faker.location.state() },
|
|
1584
|
+
{ name: "zipCode", example: faker.location.zipCode() },
|
|
1585
|
+
{ name: "country", example: faker.location.country() },
|
|
1586
|
+
{ name: "countryCode", example: faker.location.countryCode() },
|
|
1587
|
+
{ name: "county", example: faker.location.county() },
|
|
1588
|
+
{ name: "latitude", example: String(faker.location.latitude()) },
|
|
1589
|
+
{ name: "longitude", example: String(faker.location.longitude()) },
|
|
1590
|
+
{ name: "timeZone", example: faker.location.timeZone() },
|
|
1591
|
+
{ name: "buildingNumber", example: faker.location.buildingNumber() }
|
|
1592
|
+
]
|
|
1593
|
+
},
|
|
1594
|
+
{
|
|
1595
|
+
category: "company",
|
|
1596
|
+
methods: [
|
|
1597
|
+
{ name: "name", example: faker.company.name() },
|
|
1598
|
+
{ name: "catchPhrase", example: faker.company.catchPhrase() },
|
|
1599
|
+
{ name: "buzzPhrase", example: faker.company.buzzPhrase() },
|
|
1600
|
+
{ name: "buzzNoun", example: faker.company.buzzNoun() },
|
|
1601
|
+
{ name: "buzzVerb", example: faker.company.buzzVerb() },
|
|
1602
|
+
{ name: "buzzAdjective", example: faker.company.buzzAdjective() }
|
|
1603
|
+
]
|
|
1604
|
+
},
|
|
1605
|
+
{
|
|
1606
|
+
category: "finance",
|
|
1607
|
+
methods: [
|
|
1608
|
+
{ name: "accountNumber", example: faker.finance.accountNumber() },
|
|
1609
|
+
{ name: "accountName", example: faker.finance.accountName() },
|
|
1610
|
+
{ name: "creditCardNumber", example: faker.finance.creditCardNumber() },
|
|
1611
|
+
{ name: "creditCardCVV", example: faker.finance.creditCardCVV() },
|
|
1612
|
+
{ name: "currencyCode", example: faker.finance.currencyCode() },
|
|
1613
|
+
{ name: "currencyName", example: faker.finance.currencyName() },
|
|
1614
|
+
{ name: "amount", example: faker.finance.amount() },
|
|
1615
|
+
{ name: "iban", example: faker.finance.iban() },
|
|
1616
|
+
{ name: "bic", example: faker.finance.bic() },
|
|
1617
|
+
{ name: "bitcoinAddress", example: faker.finance.bitcoinAddress() },
|
|
1618
|
+
{ name: "transactionType", example: faker.finance.transactionType() }
|
|
1619
|
+
]
|
|
1620
|
+
},
|
|
1621
|
+
{
|
|
1622
|
+
category: "date",
|
|
1623
|
+
methods: [
|
|
1624
|
+
{ name: "past", example: faker.date.past().toISOString() },
|
|
1625
|
+
{ name: "future", example: faker.date.future().toISOString() },
|
|
1626
|
+
{ name: "recent", example: faker.date.recent().toISOString() },
|
|
1627
|
+
{ name: "soon", example: faker.date.soon().toISOString() },
|
|
1628
|
+
{ name: "birthdate", example: faker.date.birthdate().toISOString() },
|
|
1629
|
+
{ name: "month", example: faker.date.month() },
|
|
1630
|
+
{ name: "weekday", example: faker.date.weekday() }
|
|
1631
|
+
]
|
|
1632
|
+
},
|
|
1633
|
+
{
|
|
1634
|
+
category: "lorem",
|
|
1635
|
+
methods: [
|
|
1636
|
+
{ name: "word", example: faker.lorem.word() },
|
|
1637
|
+
{ name: "words", example: faker.lorem.words() },
|
|
1638
|
+
{ name: "sentence", example: faker.lorem.sentence() },
|
|
1639
|
+
{ name: "sentences", example: faker.lorem.sentences() },
|
|
1640
|
+
{ name: "paragraph", example: faker.lorem.paragraph() },
|
|
1641
|
+
{ name: "slug", example: faker.lorem.slug() },
|
|
1642
|
+
{ name: "lines", example: faker.lorem.lines(1) }
|
|
1643
|
+
]
|
|
1644
|
+
},
|
|
1645
|
+
{
|
|
1646
|
+
category: "string",
|
|
1647
|
+
methods: [
|
|
1648
|
+
{ name: "uuid", example: faker.string.uuid() },
|
|
1649
|
+
{ name: "alphanumeric", example: faker.string.alphanumeric(10) },
|
|
1650
|
+
{ name: "numeric", example: faker.string.numeric(6) },
|
|
1651
|
+
{ name: "alpha", example: faker.string.alpha(8) },
|
|
1652
|
+
{ name: "nanoid", example: faker.string.nanoid() },
|
|
1653
|
+
{ name: "hexadecimal", example: faker.string.hexadecimal({ length: 8 }) },
|
|
1654
|
+
{ name: "sample", example: faker.string.sample(12) }
|
|
1655
|
+
]
|
|
1656
|
+
},
|
|
1657
|
+
{
|
|
1658
|
+
category: "number",
|
|
1659
|
+
methods: [
|
|
1660
|
+
{ name: "int", example: String(faker.number.int({ max: 9999 })) },
|
|
1661
|
+
{ name: "float", example: String(faker.number.float({ max: 100, fractionDigits: 2 })) }
|
|
1662
|
+
]
|
|
1663
|
+
},
|
|
1664
|
+
{
|
|
1665
|
+
category: "datatype",
|
|
1666
|
+
methods: [
|
|
1667
|
+
{ name: "boolean", example: String(faker.datatype.boolean()) }
|
|
1668
|
+
]
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
category: "image",
|
|
1672
|
+
methods: [
|
|
1673
|
+
{ name: "avatar", example: faker.image.avatar() },
|
|
1674
|
+
{ name: "url", example: faker.image.url() }
|
|
1675
|
+
]
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
category: "color",
|
|
1679
|
+
methods: [
|
|
1680
|
+
{ name: "human", example: faker.color.human() },
|
|
1681
|
+
{ name: "rgb", example: faker.color.rgb() },
|
|
1682
|
+
{ name: "hex", example: faker.color.rgb({ format: "hex" }) }
|
|
1683
|
+
]
|
|
1684
|
+
},
|
|
1685
|
+
{
|
|
1686
|
+
category: "commerce",
|
|
1687
|
+
methods: [
|
|
1688
|
+
{ name: "productName", example: faker.commerce.productName() },
|
|
1689
|
+
{ name: "price", example: faker.commerce.price() },
|
|
1690
|
+
{ name: "department", example: faker.commerce.department() },
|
|
1691
|
+
{ name: "productDescription", example: faker.commerce.productDescription().slice(0, 60) + "..." },
|
|
1692
|
+
{ name: "isbn", example: faker.commerce.isbn() }
|
|
1693
|
+
]
|
|
1694
|
+
},
|
|
1695
|
+
{
|
|
1696
|
+
category: "vehicle",
|
|
1697
|
+
methods: [
|
|
1698
|
+
{ name: "vehicle", example: faker.vehicle.vehicle() },
|
|
1699
|
+
{ name: "manufacturer", example: faker.vehicle.manufacturer() },
|
|
1700
|
+
{ name: "model", example: faker.vehicle.model() },
|
|
1701
|
+
{ name: "vin", example: faker.vehicle.vin() },
|
|
1702
|
+
{ name: "vrm", example: faker.vehicle.vrm() }
|
|
1703
|
+
]
|
|
1704
|
+
},
|
|
1705
|
+
{
|
|
1706
|
+
category: "system",
|
|
1707
|
+
methods: [
|
|
1708
|
+
{ name: "fileName", example: faker.system.fileName() },
|
|
1709
|
+
{ name: "mimeType", example: faker.system.mimeType() },
|
|
1710
|
+
{ name: "fileExt", example: faker.system.fileExt() },
|
|
1711
|
+
{ name: "filePath", example: faker.system.filePath() },
|
|
1712
|
+
{ name: "semver", example: faker.system.semver() }
|
|
1713
|
+
]
|
|
1714
|
+
}
|
|
1715
|
+
];
|
|
1716
|
+
}
|
|
1717
|
+
var METHOD_ALIASES = {
|
|
1718
|
+
"internet.userName": "username"
|
|
1719
|
+
};
|
|
1720
|
+
function callFaker(category, method) {
|
|
1721
|
+
const fakerModule = faker[category];
|
|
1722
|
+
const resolvedMethod = METHOD_ALIASES[`${category}.${method}`] ?? method;
|
|
1723
|
+
if (!fakerModule || typeof fakerModule[resolvedMethod] !== "function") {
|
|
1724
|
+
return `[unknown: ${category}.${method}]`;
|
|
1725
|
+
}
|
|
1726
|
+
const result = fakerModule[resolvedMethod]();
|
|
1727
|
+
if (result instanceof Date) return result.toISOString();
|
|
1728
|
+
return String(result);
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1532
1731
|
// src/index.ts
|
|
1533
1732
|
function defineConfig(config) {
|
|
1534
1733
|
const merged = { ...DEFAULT_CONFIG, ...config };
|
|
@@ -1550,6 +1749,7 @@ export {
|
|
|
1550
1749
|
ValidationError,
|
|
1551
1750
|
acceptHealingEvent,
|
|
1552
1751
|
appendPendingEvent,
|
|
1752
|
+
callFaker,
|
|
1553
1753
|
clearEnvCache,
|
|
1554
1754
|
configExists,
|
|
1555
1755
|
createCase,
|
|
@@ -1562,6 +1762,7 @@ export {
|
|
|
1562
1762
|
deleteSuite,
|
|
1563
1763
|
formatError,
|
|
1564
1764
|
generateCacheKey,
|
|
1765
|
+
getAvailableGenerators,
|
|
1565
1766
|
getCasePath,
|
|
1566
1767
|
getHealingStats,
|
|
1567
1768
|
isAssuremindError,
|