{"_id":"typeorm-pglite","_rev":"6-cf2d704030dbe21bb8e0a0c4922bcfb1","name":"typeorm-pglite","dist-tags":{"latest":"0.3.4"},"versions":{"0.1.0":{"name":"typeorm-pglite","version":"0.1.0","keywords":["typeorm","pglite","postgres"],"author":{"name":"Murli Prajapati"},"license":"MIT","_id":"typeorm-pglite@0.1.0","maintainers":[{"name":"murliprajapati","email":"murali.prajapati555@gmail.com"}],"homepage":"https://github.com/muraliprajapati/typeorm-pglite","bugs":{"url":"https://github.com/muraliprajapati/typeorm-pglite/issues"},"dist":{"shasum":"d40345204a61aac87ded76690af3351e644bb93f","tarball":"https://registry.npmjs.org/typeorm-pglite/-/typeorm-pglite-0.1.0.tgz","fileCount":10,"integrity":"sha512-f5z9nCNJmkTyGdcqj4IC7IyEI0iEag1GrKm1Y6BCdfY6mQ2h4xIJaHnDzg35iexkTRuFnywryEPpIgTGowt0IQ==","signatures":[{"sig":"MEUCIQD1J3tgedrhUuSkqqkOmrahEDLfsVCyyhhew8fSAmddVgIgJwpI4GzmWHGCI6p5t47xSQx7SkGUCTcgWjh9M1VMesQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7450},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"6d222e440ffa93f1de99fa79c0b46c6e44be743a","scripts":{"build":"tsc"},"_npmUser":{"name":"murliprajapati","email":"murali.prajapati555@gmail.com"},"repository":{"url":"git+https://github.com/muraliprajapati/typeorm-pglite.git","type":"git"},"_npmVersion":"10.2.4","description":"PGlite support for TypeORM","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"pg":"^8.13.0","typeorm":"^0.3.20","typescript":"^5.6.3","@types/node":"^22.7.7","reflect-metadata":"^0.2.2"},"peerDependencies":{"@electric-sql/pglite":">= 0.2.12"},"_npmOperationalInternal":{"tmp":"tmp/typeorm-pglite_0.1.0_1729786827251_0.3672434229941943","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"typeorm-pglite","version":"0.2.0","keywords":["typeorm","pglite","postgres"],"author":{"name":"Murli Prajapati"},"license":"MIT","_id":"typeorm-pglite@0.2.0","maintainers":[{"name":"murliprajapati","email":"murali.prajapati555@gmail.com"}],"homepage":"https://github.com/muraliprajapati/typeorm-pglite","bugs":{"url":"https://github.com/muraliprajapati/typeorm-pglite/issues"},"dist":{"shasum":"0fcdc59c6a5d9a604a6cd934a7b0051ba2576c4d","tarball":"https://registry.npmjs.org/typeorm-pglite/-/typeorm-pglite-0.2.0.tgz","fileCount":10,"integrity":"sha512-C36UNKo3eksQsOE1WPehRmT6KC7K3KGEpNZ3qN6pj34kk+uiurmeSHA3X+vwV2k0IJZlTIYvaADLL/SrfSxMRg==","signatures":[{"sig":"MEYCIQCzftYI+e0fa/l1fusHPaw7t9NeV0vWAiK6LnpDA75iSQIhAKdGvOVeHdkDTRm8uKHfO6Y33Jz8fGz/VkCXhKpEp4jX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8915},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"a599e60e6b39dc036c950c38ce171d82fc11bdcb","scripts":{"build":"tsc"},"_npmUser":{"name":"murliprajapati","email":"murali.prajapati555@gmail.com"},"repository":{"url":"git+https://github.com/muraliprajapati/typeorm-pglite.git","type":"git"},"_npmVersion":"10.2.4","description":"PGlite support for TypeORM","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"pg":"^8.13.0","typeorm":"^0.3.20","typescript":"^5.6.3","@types/node":"^22.7.7","reflect-metadata":"^0.2.2"},"peerDependencies":{"@electric-sql/pglite":">= 0.2.12"},"_npmOperationalInternal":{"tmp":"tmp/typeorm-pglite_0.2.0_1729788000688_0.7677228028792074","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"typeorm-pglite","version":"0.3.0","keywords":["typeorm","pglite","postgres"],"author":{"name":"Murli Prajapati"},"license":"MIT","_id":"typeorm-pglite@0.3.0","maintainers":[{"name":"murliprajapati","email":"murali.prajapati555@gmail.com"}],"homepage":"https://github.com/muraliprajapati/typeorm-pglite","bugs":{"url":"https://github.com/muraliprajapati/typeorm-pglite/issues"},"dist":{"shasum":"d3d42b6849928d0814c984aff78ab98fc6690365","tarball":"https://registry.npmjs.org/typeorm-pglite/-/typeorm-pglite-0.3.0.tgz","fileCount":10,"integrity":"sha512-KGwDmJQe/kC7P+kuCzlobIXj2lL6LZPq2gS8psS0EfP9iO7FCI9dp2ngCmhutPu5+lrBFvzJp1EnJ/xzHutOzQ==","signatures":[{"sig":"MEUCIQC/884E0lH4DT2d3LxOUsZtxmjUWhVvPNLS3w+IPRJS0AIgInABK/haT3VUJlDsQR7dLR3fNZfQKRY8zKUIBf/LFLo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9076},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"78448f7cd1bf9afeb713127cd22b6aa3d7bff78a","scripts":{"build":"tsc"},"_npmUser":{"name":"murliprajapati","email":"murali.prajapati555@gmail.com"},"repository":{"url":"git+https://github.com/muraliprajapati/typeorm-pglite.git","type":"git"},"_npmVersion":"10.2.4","description":"PGlite support for TypeORM","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"pg":"^8.13.0","typeorm":"^0.3.20","typescript":"^5.6.3","@types/node":"^22.7.7","reflect-metadata":"^0.2.2"},"peerDependencies":{"@electric-sql/pglite":">= 0.2.12"},"_npmOperationalInternal":{"tmp":"tmp/typeorm-pglite_0.3.0_1729789360253_0.8217506942220087","host":"s3://npm-registry-packages"}},"0.3.1":{"name":"typeorm-pglite","version":"0.3.1","keywords":["typeorm","pglite","postgres"],"author":{"name":"Murli Prajapati"},"license":"MIT","_id":"typeorm-pglite@0.3.1","maintainers":[{"name":"murliprajapati","email":"murali.prajapati555@gmail.com"}],"homepage":"https://github.com/muraliprajapati/typeorm-pglite","bugs":{"url":"https://github.com/muraliprajapati/typeorm-pglite/issues"},"dist":{"shasum":"c2251ffaf7cb62029b68db6ddbf9dbd83ce70680","tarball":"https://registry.npmjs.org/typeorm-pglite/-/typeorm-pglite-0.3.1.tgz","fileCount":10,"integrity":"sha512-GDx5sz+aAnCRFkQauppuUGIWKCP9tQXqLDxT0xlOBT63TtF0dF6MI/yFTMDtgplkiIJsKWDofJloXPFzwEGs0w==","signatures":[{"sig":"MEUCIGXukIUe9T0sH5lGWUjsY/ChoYL1NAXbhy+yK8QEv1xBAiEAhkWZW6PQ5j8rnvTNqtIfliBbhMHePTdxeuTpek7NqGA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9122},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"7c70955bd150f23ee329e793a20235d7dff87e3a","scripts":{"test":"vitest","build":"tsc"},"_npmUser":{"name":"murliprajapati","email":"murali.prajapati555@gmail.com"},"repository":{"url":"git+https://github.com/muraliprajapati/typeorm-pglite.git","type":"git"},"_npmVersion":"10.2.4","description":"PGlite support for TypeORM","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"pg":"^8.13.0","vitest":"^2.1.3","typeorm":"^0.3.20","typescript":"^5.6.3","@types/node":"^22.7.7","reflect-metadata":"^0.2.2"},"peerDependencies":{"@electric-sql/pglite":">= 0.2.12"},"_npmOperationalInternal":{"tmp":"tmp/typeorm-pglite_0.3.1_1729841022887_0.5090658753231307","host":"s3://npm-registry-packages"}},"0.3.2":{"name":"typeorm-pglite","version":"0.3.2","keywords":["typeorm","pglite","postgres"],"author":{"name":"Murli Prajapati"},"license":"MIT","_id":"typeorm-pglite@0.3.2","maintainers":[{"name":"murliprajapati","email":"murali.prajapati555@gmail.com"}],"homepage":"https://github.com/muraliprajapati/typeorm-pglite","bugs":{"url":"https://github.com/muraliprajapati/typeorm-pglite/issues"},"dist":{"shasum":"f1ee70bc74fe0f47084ac5052844775da0e7256c","tarball":"https://registry.npmjs.org/typeorm-pglite/-/typeorm-pglite-0.3.2.tgz","fileCount":10,"integrity":"sha512-/URkIx3MXaRqLKXjGfFY1uq8Fp6qSYTP09NjK6MAbsZhNwe7qAqnaWdTGtJ4aMr2e2TDPXT1rCt+w7xszMUzOg==","signatures":[{"sig":"MEUCIQDyw9q7TFpDU1AiHGptMKOKtsBB0GWFsoVUuUZ8ArmbwAIgDNHF5fHaZjGAXxYlwrvVYCXenEkadz05k6R1Xw+O5uY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9162},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"e42f34f752a6d86f0d1956ddd6f503b6d02f9a2f","scripts":{"test":"vitest","build":"tsc"},"_npmUser":{"name":"murliprajapati","email":"murali.prajapati555@gmail.com"},"repository":{"url":"git+https://github.com/muraliprajapati/typeorm-pglite.git","type":"git"},"_npmVersion":"10.2.4","description":"PGlite support for TypeORM","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"pg":"^8.13.0","vitest":"^2.1.3","typeorm":"^0.3.20","typescript":"^5.6.3","@types/node":"^22.7.7","reflect-metadata":"^0.2.2"},"peerDependencies":{"@electric-sql/pglite":">= 0.2.12"},"_npmOperationalInternal":{"tmp":"tmp/typeorm-pglite_0.3.2_1729841740403_0.1098133844120519","host":"s3://npm-registry-packages"}},"0.3.4":{"name":"typeorm-pglite","version":"0.3.4","description":"PGlite support for TypeORM","main":"dist/index.js","scripts":{"build":"tsc","test":"vitest"},"keywords":["typeorm","pglite","postgres"],"author":{"name":"Murli Prajapati"},"license":"MIT","homepage":"https://github.com/muraliprajapati/typeorm-pglite","repository":{"type":"git","url":"git+https://github.com/muraliprajapati/typeorm-pglite.git"},"devDependencies":{"@types/node":"^22.7.7","pg":"^8.13.0","reflect-metadata":"^0.2.2","typeorm":"^0.3.28","typescript":"^5.9.3","vitest":"^4.0.18"},"peerDependencies":{"@electric-sql/pglite":">= 0.2.13"},"types":"dist/index.d.ts","_id":"typeorm-pglite@0.3.4","gitHead":"57df810e2a9626f20cbf23305823e0b9358d83d2","bugs":{"url":"https://github.com/muraliprajapati/typeorm-pglite/issues"},"_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-fiiCFVep7LZzIjAOw2WwepXPpgXXYCbq6cv+HffF02TPh72j1epJeaGbYjE3AMxkqcGl5SKdCwXHyw8juRJAZA==","shasum":"ce126f4162e4f02fd97026f85ac11bea147f57f9","tarball":"https://registry.npmjs.org/typeorm-pglite/-/typeorm-pglite-0.3.4.tgz","fileCount":10,"unpackedSize":11214,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIB3MKgrZXFiES+oim1L5CA5sPJ//9X6ZHMxffEylkYGTAiEA88wQSX3ZLvo+rDc+HOAyAM+8JCp7T7kFy/VC5IqP5BA="}]},"_npmUser":{"name":"murliprajapati","email":"murali.prajapati555@gmail.com"},"directories":{},"maintainers":[{"name":"murliprajapati","email":"murali.prajapati555@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/typeorm-pglite_0.3.4_1772259148093_0.18623459678418564"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-24T16:20:27.250Z","modified":"2026-02-28T06:12:28.364Z","0.1.0":"2024-10-24T16:20:27.435Z","0.2.0":"2024-10-24T16:40:00.889Z","0.3.0":"2024-10-24T17:02:40.446Z","0.3.1":"2024-10-25T07:23:43.087Z","0.3.2":"2024-10-25T07:35:40.615Z","0.3.4":"2026-02-28T06:12:28.239Z"},"bugs":{"url":"https://github.com/muraliprajapati/typeorm-pglite/issues"},"author":{"name":"Murli Prajapati"},"license":"MIT","homepage":"https://github.com/muraliprajapati/typeorm-pglite","keywords":["typeorm","pglite","postgres"],"repository":{"type":"git","url":"git+https://github.com/muraliprajapati/typeorm-pglite.git"},"description":"PGlite support for TypeORM","maintainers":[{"name":"murliprajapati","email":"murali.prajapati555@gmail.com"}],"readme":"# typeorm-pglite\n\n[PGlite](https://pglite.dev/) support for TypeORM.\n\n## Installation\n\nPGlite is a `peerDependency` of `typeorm-pglite` so ensure you have it installed in your project.\n\n```sh\nnpm install @electric-sql/pglite\nnpm install typeorm-pglite\n```\n\n## Usage\n\n`typeorm-pglite` works with TypeORM's existing `postgres` dialect. Just provide the `PGliteDriver` to the `driver` datasource options and it works!\n\n```javascript\nimport { PGliteDriver, getPGliteInstance } from \"typeorm-pglite\";\nimport { DataSource } from \"typeorm\";\n\nconst PGliteDataSource = new DataSource({\n  type: \"postgres\",\n  driver: new PGliteDriver().driver,\n});\n\n// You can access the internal PGlite instance using getPGliteInstance function\nconst pgliteDb = await getPGliteInstance();\n```\n\n## Example\n\n```javascript\nimport { PGliteDriver } from \"typeorm-pglite\";\nimport { Column, DataSource, Entity, PrimaryGeneratedColumn } from \"typeorm\";\n\n@Entity()\nexport class Photo {\n  @PrimaryGeneratedColumn()\n  id: number;\n\n  @Column({\n    length: 100,\n  })\n  name: string;\n}\n\nconst AppDataSource = new DataSource({\n  type: \"postgres\",\n  driver: new PGliteDriver().driver, // provide PGlite options in PGliteDriver constructor\n  synchronize: true,\n  logging: true,\n  entities: [Photo],\n  // remaining typeorm datasource options\n});\n\nasync function run() {\n  try {\n    const db = await AppDataSource.initialize();\n\n    const photo = new Photo();\n    photo.name = \"Example Photo\";\n    await db.manager.save(photo);\n\n    const allPhotos = await db.manager.find(Photo);\n    console.log({ allPhotos });\n  } catch (error) {\n    console.error(\"Error:\", error);\n  }\n}\n\nrun();\n```\n\n### Boolean parameters and serialization\n\nTo make the driver behave like PostgreSQL and avoid the error, a default boolean serializer is applied automatically when the driver is constructed. It converts any JS boolean (or common equivalents such as `1`/`0` or `\"true\"`/`\"false\"`) into the SQL literals `TRUE`/`FALSE`.\n\n**Override the serializer:** If you need the legacy `'t'`/`'f'` behaviour or want to have custom serializer, you can pass a custom `serializers` map to `PGliteDriver` – the default is merged with your options.\n\n```ts\nimport { PGliteDriver } from \"typeorm-pglite\";\nimport { types } from \"@electric-sql/pglite\";\n\nconst driver = new PGliteDriver({\n  serializers: {\n    [types.BOOL]: (val) => {\n      if (val === true) return \"t\";\n      if (val === false) return \"f\";\n      return val;\n    },\n    // \n    [types.NUMERIC]: (value) => value.toString(),\n  },\n}).driver;\n```","readmeFilename":"README.md"}