{"_id":"@astro-content/faker","name":"@astro-content/faker","dist-tags":{"latest":"0.0.0-alpha.16"},"versions":{"0.0.0-alpha.16":{"name":"@astro-content/faker","version":"0.0.0-alpha.16","description":"Quickly populate content collections from your schemas.","keywords":["astro","astro-integration","json-schema","faker","frontmatter","markdown"],"homepage":"https://astro-content.dev","repository":{"type":"git","url":"git+https://github.com/JulianCataldo/astro-content.git","directory":"packages/faker"},"license":"ISC","author":{"name":"Julian Cataldo"},"type":"module","main":"./dist/index.js","bin":{"content-faker":"dist/cli.js"},"dependencies":{"@apidevtools/json-schema-ref-parser":"^9.0.9","@faker-js/faker":"^7.6.0","json-schema-faker":"0.5.0-rcv.46","yaml":"^2.1.3"},"devDependencies":{"typescript":"^4.8.4"},"publishConfig":{"access":"public"},"// source":"./index.ts","scripts":{"build":"tsc","clean":"rm -rf dist .turbo","dev":"tsc -w","test":"echo \"Error: no test specified\" && exit 1"},"types":"./dist/index.d.ts","bugs":{"url":"https://github.com/JulianCataldo/astro-content/issues"},"_id":"@astro-content/faker@0.0.0-alpha.16","_integrity":"sha512-e99zu+Y3rypKgKrZvb5FacGtpogPyP9gJL248JXC/FpphbIp0l0ZfeW7TyFXHABoei+RgnfMFmMiYXrmTnWobA==","_resolved":"/private/var/folders/ws/pjfy5qlj1bv4g2byw3s1_csw0000gn/T/6ba3a165d847e8ceb1f2c476baef15b7/astro-content-faker-0.0.0-alpha.16.tgz","_from":"file:astro-content-faker-0.0.0-alpha.16.tgz","_nodeVersion":"18.9.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-e99zu+Y3rypKgKrZvb5FacGtpogPyP9gJL248JXC/FpphbIp0l0ZfeW7TyFXHABoei+RgnfMFmMiYXrmTnWobA==","shasum":"6b4f20e7bcbe3adec05dc49b7fcbc305d8905d10","tarball":"https://registry.npmjs.org/@astro-content/faker/-/faker-0.0.0-alpha.16.tgz","fileCount":7,"unpackedSize":9572,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB71jRcLjYuUOic+lgWwW1nrBrSNhuY4nVNNtqSxbApPAiBdzHdsfY4QMei8uYsO3HYC/EuQJc23vD980XaSOtJ57Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjd/ZPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpolg/+LX7r78cU33zaw4NzJ+Amy6q2LiJ/2CIp5+hO3v0wwrqonBK3\r\nSrwnUZ7Fz1MogDZbRxPDs7aalAQDliiugGuItafhGO28Uag7jbDpGzE0pU8g\r\nknp+aBPwgqk0zyaRCjUN6Jk3uo1VyN5M6t9N6nvNvRFWiJSYeaV7l5fpj+pu\r\neUrYNZNdPWygD7QhRXjKwXTk636hb/cTicm80fycG3luNRYeyBbvkcHhV5Na\r\nob4J3b4RpzRbO66r1t+viaeEry/MnySCz9EPOLRx0A3dmD0+KH5mf36CVx/U\r\nJz/S6GlyC/IsVxUljYNwQxUc/iDNelvWiVBkL87QY41qtyABOpTwDkLe8kBi\r\nLGYCGwrl6boQA40GvavdlobGcuMO6RN+b6esHPS/v+BSfWQZpU2B1hiEnYr5\r\nW8LR6Q4lqDeJD9cgbq3+HtBelAJTzp28A6/WjGoZ1lzMYPfDeJUe8aTB9dJ5\r\nN+5YLaOGdiJxzzynH6g3bISwH3y5a4eVb4vq7q0+qSLQek43gQiDPU0cq7qj\r\nOR1Qh3wKRdXRixAh9iiIsft5CkFxAuSOjn8ttwBo0kSYweQDbWc9YjKf8gmU\r\npxTH0Sjx1suc4hRrr/M+wmdOpTkWsG95mrOTbM9p+c9gQwl9qBtr2nltoOrn\r\njCdeeveiZugUQNOul5YYWxCQJxk/1SenWLU=\r\n=Dczz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"julian.cataldo","email":"co@jc0.eu"},"directories":{},"maintainers":[{"name":"julian.cataldo","email":"co@jc0.eu"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/faker_0.0.0-alpha.16_1668806223418_0.4575979772253522"},"_hasShrinkwrap":false}},"time":{"created":"2022-11-18T21:17:03.370Z","0.0.0-alpha.16":"2022-11-18T21:17:03.618Z","modified":"2022-11-18T21:17:03.796Z"},"maintainers":[{"name":"julian.cataldo","email":"co@jc0.eu"}],"description":"Quickly populate content collections from your schemas.","homepage":"https://astro-content.dev","keywords":["astro","astro-integration","json-schema","faker","frontmatter","markdown"],"repository":{"type":"git","url":"git+https://github.com/JulianCataldo/astro-content.git","directory":"packages/faker"},"author":{"name":"Julian Cataldo"},"bugs":{"url":"https://github.com/JulianCataldo/astro-content/issues"},"license":"ISC","readme":"# Astro Content — Content faker for Markdown + front matter\n\nQuickly populate content collections from your schemas.\n\nPerfect match with [remark-lint-frontmatter-schema](https://github.com/JulianCataldo/remark-lint-frontmatter-schema) and [@astro-content/validator](https://github.com/JulianCataldo/astro-content/tree/develop/packages/validator).\n\n# Installation\n\n```sh\npnpm i @astro-content/faker\n```\n\n—_OR_—\n\nShallow clone [demo project](./demo):\n\n```sh\npnpx degit JulianCataldo/astro-content/packages/faker/demo ./ac-faker-demo\n```\n\n# Usage\n\n### CLI\n\n```sh\n# content-faker $SOURCE_TEMPLATE $DESTINATION_DIR $ENTRIES_COUNT\n#                             Default to 1 if unset ———^\n\n# E.g.\ncontent-faker src/mocks/blog-post.template.md content/blog-posts 20\n```\n\n#### Example template\n\nGist:\n\n<div align=\"center\">\n\n[<img width=\"400\" src=\"https://res.cloudinary.com/dzfylx93l/image/upload/w_800/astro-content-faker-1_auxvod.png\"/>](https://res.cloudinary.com/dzfylx93l/image/upload/astro-content-faker-1_auxvod.png)\n\n</div>\n\nComplete example:\n\n````markdown\n---\n'$schema': src/schemas/blog-post.schema.yaml\n---\n\n```js:faker\n'# ' + faker.lorem.sentence(10)\n```\n\n```js:faker\n'## ' + faker.lorem.sentence(9)\n```\n\n```js:faker\n`**${faker.address.city()}**`\n```\n\n```js:faker\nfaker.lorem.sentence(12)\n```\n\n```js:faker\n'### ' + faker.lorem.sentence(9)\n```\n\n```js:faker\n`<SomeMap address=\"${faker.address.city()}\" />`\n```\n\n---\n\n```js:faker\n'> ' + faker.lorem.sentence(10)\n```\n\n---\n\n```js:faker\n`- ${faker.lorem.sentence(6)}\\n- ${faker.lorem.sentence(8)}\\n- ${faker.lorem.sentence(10)}`\n```\n\n```js:faker\n`<SomeTweet id=\"${faker.helpers.arrayElement(['1590042307163717635','1593680639005315073','1587901468585205760','1578871432700125185'])}\" />`\n```\n\n```js:faker\n'## ' + faker.lorem.sentence(9)\n```\n\n```js:faker\nfaker.lorem.paragraphs(2)\n```\n\n```js:faker\n'### ' + faker.lorem.sentence(9)\n```\n\n```js:faker\n`<SomeYoutubeVideo id=\"${faker.helpers.arrayElement(['xtTy5nKay_Y','BZZ9rGN4GK8','GPelHyt7iJ8','py8nD37SVDU'])}\" />`\n```\n\n```js:faker\nfaker.lorem.paragraphs(1)\n```\n\n---\n\n```js:faker\nfaker.date.recent().toLocaleDateString()\n```\n````\n\n🎊 Yields:\n\n```markdown\n---\ntitle: dolor\ndescription: deseruntut laboris sit laborumin labore ullamcovoluptate laboris\n  occaecat nisi fugiatfugiat labore dolore in\ntags:\n  - Music\n  - Cooking\n  - Gardening\n  - Video\n  - Sport\n  - Development\n---\n\n<!-- GENERATED CONTENT -->\n\n# Aperiam tempora animi necessitatibus eligendi quas explicabo reprehenderit fugiat nobis.\n\n## Iure delectus sapiente voluptas possimus provident maiores ipsam mollitia.\n\n**Wizaberg**\n\nUllam voluptatibus perspiciatis placeat in officiis odio laborum cumque excepturi ut eveniet.\n\n### Dolor assumenda similique aspernatur soluta provident exercitationem dolorum reiciendis.\n\n<SomeMap address=\"Coleborough\" />\n\n---\n\n> Vitae quibusdam doloremque consequuntur facilis quisquam corporis saepe aperiam adipisci.\n\n---\n\n- Autem vitae voluptate modi vero pariatur.\n- Unde fuga iure eos assumenda iste atque voluptas.\n- Aliquid est harum quod explicabo facilis quidem placeat error unde.\n\n<SomeTweet id=\"1587901468585205760\" />\n\n## Quia perspiciatis laborum quasi nostrum dolor molestiae ex consequuntur.\n\nCupiditate quam labore aliquam at quisquam natus molestiae laboriosam. Ullam harum occaecati quidem dolorem sint libero. Reiciendis incidunt illo repudiandae nostrum quidem. Saepe beatae sequi quasi culpa quas cum quo. Odit perspiciatis reprehenderit quos id quae autem ab beatae. Corrupti nemo perferendis mollitia facilis.\nNostrum ad laboriosam. Rerum libero possimus est expedita possimus placeat veniam necessitatibus voluptas. Exercitationem blanditiis odio illum totam id repudiandae.\n\n### Tenetur similique cupiditate illo doloremque similique commodi reiciendis est.\n\n<SomeYoutubeVideo id=\"GPelHyt7iJ8\" />\n\nRepudiandae distinctio exercitationem. Quo totam esse debitis. Nihil velit a expedita laboriosam. Minus quas itaque iusto quis non quod. Aut sapiente soluta voluptate ipsum ducimus mollitia commodi veniam animi.\n\n---\n\n18/11/2022\n```\n\n### API\n\nAlternatively from the CLI, you can use this library programmatically:\n\n```ts\nimport { generateFakeContent } from '@astro-content/faker';\n\nawait generateFakeContent(mdTemplatePath, outDir, count).catch((error) => {\n  console.log(error);\n});\n```\n\nSee also the **[demo project](./demo)** to play with.\n\n# Recommendations\n\nFor the best experience, use these helpers in combination with [remark-lint-frontmatter-schema](https://github.com/JulianCataldo/remark-lint-frontmatter-schema).\n[![](https://res.cloudinary.com/dzfylx93l/image/upload/c_scale,w_1280/eslint-plugin-mdx-1.png)](https://res.cloudinary.com/dzfylx93l/image/upload/eslint-plugin-mdx-1.png)\n\n---\n\n🔗  [JulianCataldo.com](https://www.juliancataldo.com/)\n","readmeFilename":"README.md"}