{"_id":"@bojidar-bg/tina-simple-git-provider","_rev":"2-0baff799553d63acbd099a980a116ad3","name":"@bojidar-bg/tina-simple-git-provider","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@bojidar-bg/tina-simple-git-provider","version":"0.1.0","keywords":["tinacms","simple-git"],"author":{"name":"Bojidar Marinov","email":"bojidar.marinov.bg@gmail.com"},"license":"Apache-2.0","_id":"@bojidar-bg/tina-simple-git-provider@0.1.0","maintainers":[{"name":"bojidar-bg","email":"bojidar.marinov.bg@gmail.com"}],"dist":{"shasum":"7e54914694a760de6fff9cfca8b95467dfc6eacc","tarball":"https://registry.npmjs.org/@bojidar-bg/tina-simple-git-provider/-/tina-simple-git-provider-0.1.0.tgz","fileCount":7,"integrity":"sha512-sVlpeCiugXeAYkbT28jfoJVTBUBw4hgUnvG6ycCzpClwGNhe0gdJKIzQPEBQF52zN+3BbjDCsxC8GqdBmx4VRg==","signatures":[{"sig":"MEUCICtVXtfMqRjvU+dnhCLQH6YCrKbRovFEVMVJsCTRQu+rAiEAt74GivD0DW1DyXE+a0dxof3x+i0F1OwTFC3SfteMi+U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18457},"main":"dist/index.js","_from":"file:bojidar-bg-tina-simple-git-provider-0.1.0.tgz","types":"dist/index.d.ts","scripts":{},"_npmUser":{"name":"bojidar-bg","email":"bojidar.marinov.bg@gmail.com"},"_resolved":"/tmp/17b0b4688a46c741bfc4603f66bc28b0/bojidar-bg-tina-simple-git-provider-0.1.0.tgz","_integrity":"sha512-sVlpeCiugXeAYkbT28jfoJVTBUBw4hgUnvG6ycCzpClwGNhe0gdJKIzQPEBQF52zN+3BbjDCsxC8GqdBmx4VRg==","_npmVersion":"10.9.2","description":"An GitProvider for TinaCMS built on top of simple-git.","directories":{},"_nodeVersion":"22.17.0","dependencies":{"fs-extra":"^11.3.2","simple-git":"^3.28.0","@tinacms/datalayer":"^1.4.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/fs-extra":"^11.0.4","@types/readable-stream":"^4.0.21"},"_npmOperationalInternal":{"tmp":"tmp/tina-simple-git-provider_0.1.0_1760720265646_0.8585847323131213","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bojidar-bg/tina-simple-git-provider","version":"0.1.1","description":"An GitProvider for TinaCMS built on top of simple-git.","author":{"name":"Bojidar Marinov","email":"bojidar.marinov.bg@gmail.com"},"license":"Apache-2.0","main":"dist/index.js","types":"dist/index.d.ts","keywords":["tinacms","simple-git"],"dependencies":{"@tinacms/datalayer":"^1.4.1","fs-extra":"^11.3.2","simple-git":"^3.28.0"},"devDependencies":{"@types/fs-extra":"^11.0.4","@types/readable-stream":"^4.0.21"},"scripts":{},"_id":"@bojidar-bg/tina-simple-git-provider@0.1.1","_integrity":"sha512-ZbARzN3/fvNTqvjWWzvavQdFuw7WHhwM1DuByFNw+sClueTktRWoNSbJkrNJxUh1WXAUvMugiV9P3EghfhKSEA==","_resolved":"/tmp/edeb9881e7ce0151be484dd19558aa36/bojidar-bg-tina-simple-git-provider-0.1.1.tgz","_from":"file:bojidar-bg-tina-simple-git-provider-0.1.1.tgz","_nodeVersion":"22.17.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-ZbARzN3/fvNTqvjWWzvavQdFuw7WHhwM1DuByFNw+sClueTktRWoNSbJkrNJxUh1WXAUvMugiV9P3EghfhKSEA==","shasum":"a78b53570213fcf07b2e3d4932e10809dfbb5ea3","tarball":"https://registry.npmjs.org/@bojidar-bg/tina-simple-git-provider/-/tina-simple-git-provider-0.1.1.tgz","fileCount":7,"unpackedSize":18527,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCwMxx3Hke1lhErfPmrKwofAg1uSqJKSKcojW2FGtPPYwIhAJAkDHe1Bw8DOQmvoI6QV5lh5+zuDEXpQIS5/w418IDq"}]},"_npmUser":{"name":"bojidar-bg","email":"bojidar.marinov.bg@gmail.com"},"directories":{},"maintainers":[{"name":"bojidar-bg","email":"bojidar.marinov.bg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tina-simple-git-provider_0.1.1_1761140208506_0.09525783044192959"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-17T16:57:45.504Z","modified":"2025-10-22T13:36:48.875Z","0.1.0":"2025-10-17T16:57:45.842Z","0.1.1":"2025-10-22T13:36:48.691Z"},"author":{"name":"Bojidar Marinov","email":"bojidar.marinov.bg@gmail.com"},"license":"Apache-2.0","keywords":["tinacms","simple-git"],"description":"An GitProvider for TinaCMS built on top of simple-git.","maintainers":[{"name":"bojidar-bg","email":"bojidar.marinov.bg@gmail.com"}],"readme":"# `simple-git` for TinaCMS\n\nDo you hate it when a cool open-source static CMS has no integration for self-hostable Git solutions.. even though they claim to be fully self-hostable?\n\nHate no more! `SimpleGitProvider` implements a TinaCMS-compatible GitProvider using spit, duct-tape, and a local git repository checkout.\n\nP.S. If you like this package, you would probably also like [`@bojidar-bg/tina-simple-media-store`](https://www.npmjs.com/package/@bojidar-bg/tina-simple-media-store), which implements\n\n## Usage\n\nTo use Git Provider in your [TinaCMS database config](https://tina.io/docs/reference/self-hosted/git-provider/overview), you can import it in your `tina/database.ts` file and use it like so:\n\n```ts\nimport { defineConfig, wrapFieldsWithMeta } from \"tinacms\";\nimport { SimpleGitProvider } from \"@bojidar-bg/tina-simple-git-provider\";\n\nexport const gitProvider = new SimpleGitProvider({\n  // Required: path to the repository that we will be creating commits in\n  repoDir: process.env.GIT_REPO_DIR || '.',\n  \n  // If set, configures how to clone the repository\n  // cloneRepo: { remote: \"my-host.example/my-repo.git\" }\n  \n  // Controls if we should do a git pull upon starting the backend\n  pullRepo: true, // Default value\n  \n  // Controls if we should do a git push upon making a new commit\n  pushRepo: true, // Default value\n  /// commit message for the created commits.\n  commitMessage: \"Edited with TinaCMS\", // Default value\n  // commitMessage: (path) => `Update ${path}`, // Can also pass a function\n  \n  // Encoding to use for files\n  encoding: \"utf8\"\n  \n  // Options to pass to simple-git\n  // simpleGit: { ... }\n})\n\nexport default createDatabase({\n  gitProvider,\n  // databaseAdapter: <your database of choice, perhaps RaveLevel>\n})\n\n// Now, edits from Tina will be committed whenever you save an article.\n// To commit a file modified through other means, say via SimpleMediaStore, you can use:\n// gitProvider.makeCommit(pathToModifiedFile)\n```\n\n## Credits\n\nThis package was initially created as part of [tina-true-selfhosted-example](https://github.com/bojidar-bg/tina-true-selfhosted-example).\n\n[`simple-git`](https://www.npmjs.com/package/simple-git) is awesome!\n","readmeFilename":"README.md"}