{"_id":"@aws-blocks/bb-data","_rev":"15-eb3c3c42375dbb5f306536100c227c07","name":"@aws-blocks/bb-data","dist-tags":{"canary-ci-publish-canary-npm":"0.0.0-canary.ci-publish-canary-npm.f53dfdc.1790988617","canary-esql-canary":"0.0.0-canary.esql-canary.c93c81b.1791235863","latest":"0.5.0"},"versions":{"0.1.0":{"name":"@aws-blocks/bb-data","version":"0.1.0","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-data@0.1.0","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"bin":{"bb-data":"dist/cli.js"},"dist":{"shasum":"549cf77d1b5d6217ed9fa7528e4682ee5d1c829c","tarball":"https://registry.npmjs.org/@aws-blocks/bb-data/-/bb-data-0.1.0.tgz","fileCount":239,"integrity":"sha512-TI8U/0nffmC26VGVjV4063bA3X1BWrgh+NeFi1ts6LHb1TghS36o/9MBCA71FzTN10WqgpGV+HPtf1IwrJHamw==","signatures":[{"sig":"MEQCIEnerAIxI05YqeQmXbR1eS1aEtXof+RrW3SWFZ004mXFAiBgjM/R8uos4waO0AkrIzmN4CNtsOMGNbY7B4pEldbhRg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":903057},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"639f6fad510d473abd72286351b3294a646d9895","scripts":{"test":"node --test 'dist/**/*.test.js'","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs Database"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_npmVersion":"10.9.8","description":"Full PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-saf","directories":{},"_nodeVersion":"22.22.3","dependencies":{"pg":"^8.13.0","pluralize":"^8.0.0","@aws-blocks/core":"^0.1.0","@electric-sql/pglite":"^0.2.0","@aws-blocks/bb-logger":"^0.1.0","@aws-blocks/data-common":"^0.1.0","@aws-sdk/client-rds-data":"^3.700.0","@aws-blocks/bb-app-setting":"^0.1.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.3.0","@types/node":"^20.0.0","@types/pluralize":"^0.0.33","@types/aws-lambda":"^8.10.161"},"peerDependencies":{"kysely":">=0.28.12 <0.30.0","constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-data_0.1.0_1781566765382_0.5366335725238294","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@aws-blocks/bb-data","version":"0.1.1","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-data@0.1.1","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"bin":{"bb-data":"dist/cli.js"},"dist":{"shasum":"e11a7b83f32f595e5068d2aead9775c74801f8d4","tarball":"https://registry.npmjs.org/@aws-blocks/bb-data/-/bb-data-0.1.1.tgz","fileCount":239,"integrity":"sha512-7KMYdZzdfEn1UfvppzIZs4pkKm+GrHlmyjD6I9n3hTLS813Z/NRMZJSCjpZ5NL7xtNPj2w32EF524+wCfFsk1Q==","signatures":[{"sig":"MEQCIGJLqy8i/kIso5lauUUtH2PY1WXPyaGRClIjXG6gyU5CAiB5S/FaZ6yVJLhFKC2kCCpq/ReAO2PgcUubiEosKH3K5Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":903057},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"ed3e0ad5724d28c2a2fb0ea9207dfc9e941257f9","scripts":{"test":"node --test 'dist/**/*.test.js'","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs Database"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_npmVersion":"10.9.8","description":"Full PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-saf","directories":{},"_nodeVersion":"22.22.3","dependencies":{"pg":"^8.13.0","pluralize":"^8.0.0","@aws-blocks/core":"^0.1.1","@electric-sql/pglite":"^0.2.0","@aws-blocks/bb-logger":"^0.1.1","@aws-blocks/data-common":"^0.1.1","@aws-sdk/client-rds-data":"^3.700.0","@aws-blocks/bb-app-setting":"^0.1.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.3.0","@types/node":"^20.0.0","@types/pluralize":"^0.0.33","@types/aws-lambda":"^8.10.161"},"peerDependencies":{"kysely":">=0.28.12 <0.30.0","constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-data_0.1.1_1781633770713_0.6876201957009866","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@aws-blocks/bb-data","version":"0.1.2","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-data@0.1.2","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"bin":{"bb-data":"dist/cli.js"},"dist":{"shasum":"cb1908505c169ec49ab4d8243730b71b59e50326","tarball":"https://registry.npmjs.org/@aws-blocks/bb-data/-/bb-data-0.1.2.tgz","fileCount":240,"integrity":"sha512-LkmNOGIrg6atWZAHhUNnCzMSafA/Dz/4MQvdgfk8LoHnSypr5r3X+JEd/0lCWoWPdun45xH2skwvM4maGtlWqQ==","signatures":[{"sig":"MEYCIQDM/hjERtcLO5EhMaBzMxgdwmkS1nijPpZjqd4de4ZI8QIhAPv0n822qJlAKXZHm6Yf9UwsazDKkbuyxHKnvDqTJNaA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":911121},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"3328f36992d39dc20b0c0d760e4a38c866ddfbbd","scripts":{"test":"node --test 'dist/**/*.test.js'","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs Database"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_npmVersion":"10.9.8","description":"Full PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-saf","directories":{},"_nodeVersion":"22.22.3","dependencies":{"pg":"^8.13.0","pluralize":"^8.0.0","@aws-blocks/core":"^0.1.1","@electric-sql/pglite":"^0.2.0","@aws-blocks/bb-logger":"^0.1.2","@aws-blocks/data-common":"^0.1.1","@aws-sdk/client-rds-data":"^3.700.0","@aws-blocks/bb-app-setting":"^0.1.3"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.3.0","@types/node":"^20.0.0","@types/pluralize":"^0.0.33","@types/aws-lambda":"^8.10.161"},"peerDependencies":{"kysely":">=0.28.12 <0.30.0","constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-data_0.1.2_1782192243737_0.059909796965067486","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@aws-blocks/bb-data","version":"0.2.2","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-data@0.2.2","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"bin":{"bb-data":"dist/cli.js"},"dist":{"shasum":"09b03d6e166fd2d3b847ba0c3a085a70e4ab6112","tarball":"https://registry.npmjs.org/@aws-blocks/bb-data/-/bb-data-0.2.2.tgz","fileCount":256,"integrity":"sha512-qbUddaXynxnpc8+VRtve/1Rm9KgJEMlNbr2CRohUhRKezS7qiy76vk2+RmW+DCRt+3LlC+83gPLYs8Tsh4cD9w==","signatures":[{"sig":"MEUCIQDbdATxRuYHIO3j5eO00H85oONpqRv9f+jSz5mLWRmyJQIge/VjFz2jmPvz+Qbr1x/ytEppJMOp1fFvVKuoK5fxq1U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1039178},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"e8f38546b59a85fb707e0b751887f0cdeebf4fb0","scripts":{"test":"node --test 'dist/**/*.test.js'","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs Database"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_npmVersion":"10.9.8","description":"Full PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-saf","directories":{},"_nodeVersion":"22.23.1","dependencies":{"pg":"^8.13.0","pluralize":"^8.0.0","@aws-blocks/core":"^0.1.10","@electric-sql/pglite":"^0.2.0","@aws-blocks/bb-logger":"^0.1.2","@aws-blocks/data-common":"^0.1.1","@aws-sdk/client-rds-data":"^3.700.0","@aws-blocks/bb-app-setting":"^0.1.3"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.3.0","@types/node":"^20.0.0","@types/pluralize":"^0.0.33","@types/aws-lambda":"^8.10.161"},"peerDependencies":{"kysely":">=0.28.12 <0.30.0","constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-data_0.2.2_1783033089722_0.12672795451749108","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@aws-blocks/bb-data","version":"0.2.4","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-data@0.2.4","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-data#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"bin":{"bb-data":"dist/cli.js"},"dist":{"shasum":"38c765d25777114cf5fc8d89424501823c009ab2","tarball":"https://registry.npmjs.org/@aws-blocks/bb-data/-/bb-data-0.2.4.tgz","fileCount":256,"integrity":"sha512-eJcTm1d1HINKtPYsZrHOblOfFVUifa1JXVKDIjhPQ9yy23uLVIBDJ+fEz7DwA0XfkI9+vMu/7rMSmqbZmLQZqQ==","signatures":[{"sig":"MEUCIFgEFNfH9ZM5yuViB4HiOh2zT/is3oBr0aBgKeFXCKb8AiEApCIvcikNctuRvMXytivlVzMbCUb1nrWWENySC5rObq0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-data@0.2.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1049583},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"f6b9cad7b543663cc9ea73a4476ca5511255d779","scripts":{"test":"node --test 'dist/**/*.test.js'","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs Database"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-data"},"_npmVersion":"10.9.8","description":"Full PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-saf","directories":{},"_nodeVersion":"22.23.1","dependencies":{"pg":"^8.13.0","pluralize":"^8.0.0","@aws-blocks/core":"^0.1.17","@electric-sql/pglite":"^0.2.0","@aws-blocks/bb-logger":"^0.1.3","@aws-blocks/data-common":"^0.1.3","@aws-sdk/client-rds-data":"^3.700.0","@aws-blocks/bb-app-setting":"^0.1.3"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.3.0","@types/node":"^20.0.0","@types/pluralize":"^0.0.33","@types/aws-lambda":"^8.10.161"},"peerDependencies":{"kysely":">=0.28.12 <0.30.0","constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-data_0.2.4_1786135420030_0.09744292218255879","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@aws-blocks/bb-data","version":"0.2.5","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-data@0.2.5","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-data#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"bin":{"bb-data":"dist/cli.js"},"dist":{"shasum":"bee7c7f4881f61439812bbc7f2d510a3a0267314","tarball":"https://registry.npmjs.org/@aws-blocks/bb-data/-/bb-data-0.2.5.tgz","fileCount":256,"integrity":"sha512-lngyXIFHT9hCLQeYGnYezHhXb0mxwNGzO2nl9FH9t5lHKrcflwsmJSs9Gk8XbjmVRVkS/NdQwS5e3Ik+WO0J/Q==","signatures":[{"sig":"MEUCIGuBzE//7S8PuPqbijLWauiTPy+PewVHVuP+R2mRsf4QAiEA8rUVdtwOlwbeSvqAKvyff8GP7L3bcyuOwGoEPOpB4ks=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-data@0.2.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1068897},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"164b106810e2b4f7801426158feae82a4ccbe3d4","scripts":{"test":"node --test 'dist/**/*.test.js'","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs Database"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-data"},"_npmVersion":"10.9.8","description":"Full PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-saf","directories":{},"_nodeVersion":"22.23.2","dependencies":{"pg":"^8.13.0","pluralize":"^8.0.0","@aws-blocks/core":"^0.2.0","@electric-sql/pglite":"^0.2.0","@aws-blocks/bb-logger":"^0.1.4","@aws-blocks/data-common":"^0.1.4","@aws-sdk/client-rds-data":"^3.700.0","@aws-blocks/bb-app-setting":"^0.1.4"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.3.0","@types/node":"^20.0.0","@types/pluralize":"^0.0.33","@types/aws-lambda":"^8.10.161"},"peerDependencies":{"kysely":">=0.28.12 <0.30.0","constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-data_0.2.5_1787230469613_0.8111015327630098","host":"s3://npm-registry-packages-npm-production"}},"0.2.6":{"name":"@aws-blocks/bb-data","version":"0.2.6","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-data@0.2.6","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-data#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"bin":{"bb-data":"dist/cli.js"},"dist":{"shasum":"e76d67f7b3dd9629a08cb4416d0f295a377621cc","tarball":"https://registry.npmjs.org/@aws-blocks/bb-data/-/bb-data-0.2.6.tgz","fileCount":256,"integrity":"sha512-1JRaQS3RknRNoIG89sisbKI52vKEVhz+U9ZTfSCtht2pSgLybbgrzM7NBzDc40dTy1na9wUoAEV40xLD2xgqPg==","signatures":[{"sig":"MEQCIDR0/j8bHv6TBa7KahWJFjUVsZuCA63sjyZy440//8iwAiBkkpSmgleW2+URC9RP5WUYBQ0NDSjBeMApHEgMNECQ8g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-data@0.2.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1068935},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"04d4b21b1cae9600c44a2fc63c0020ca21894316","scripts":{"test":"node --test 'dist/**/*.test.js'","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs Database"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-data"},"_npmVersion":"10.9.8","description":"Full PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-saf","directories":{},"_nodeVersion":"22.23.2","dependencies":{"pg":"^8.13.0","pluralize":"^8.0.0","@aws-blocks/core":"^0.3.0","@electric-sql/pglite":"^0.2.0","@aws-blocks/bb-logger":"^0.1.5","@aws-blocks/data-common":"^0.1.4","@aws-sdk/client-rds-data":"^3.700.0","@aws-blocks/bb-app-setting":"^0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.3.0","@types/node":"^20.0.0","@types/pluralize":"^0.0.33","@types/aws-lambda":"^8.10.161"},"peerDependencies":{"kysely":">=0.28.12 <0.30.0","constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-data_0.2.6_1788264352445_0.7400828727472286","host":"s3://npm-registry-packages-npm-production"}},"0.2.7":{"name":"@aws-blocks/bb-data","version":"0.2.7","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-data@0.2.7","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-data#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"bin":{"bb-data":"dist/cli.js"},"dist":{"shasum":"fa2373ce7fcee7f027828d3b6bc91d8bbabefae6","tarball":"https://registry.npmjs.org/@aws-blocks/bb-data/-/bb-data-0.2.7.tgz","fileCount":256,"integrity":"sha512-kX3pTgrhqnBZ1ZWyhZtE/uBKY5zB+zIv4SnoPSDbqs090kVc11aWFY87oYzcG6ClMhcqtMrgRY6vUaJBc3RxfQ==","signatures":[{"sig":"MEUCIFFfEbfQGrYMIByJFa1eX+yM7VraFSJVVjMfXLfFtCC7AiEAtRTxjM5ZfGrhzXHZGdTJoptRoa9+zOBgotj9UZjJkaA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-data@0.2.7","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1090517},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"ce01923c591828486e07d3d3f2b6b9d585e39057","scripts":{"test":"node --test 'dist/**/*.test.js'","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs Database"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-data"},"_npmVersion":"10.9.8","description":"Full PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-saf","directories":{},"_nodeVersion":"22.23.2","dependencies":{"pg":"^8.13.0","pluralize":"^8.0.0","@aws-blocks/core":"^0.4.0","@electric-sql/pglite":"^0.2.0","@aws-blocks/bb-logger":"^0.1.6","@aws-blocks/data-common":"^0.1.4","@aws-sdk/client-rds-data":"^3.700.0","@aws-blocks/bb-app-setting":"^0.2.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.3.0","@types/node":"^20.0.0","@types/pluralize":"^0.0.33","@types/aws-lambda":"^8.10.161"},"peerDependencies":{"kysely":">=0.28.12 <0.30.0","constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-data_0.2.7_1788867502129_0.021493101608481835","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@aws-blocks/bb-data","version":"0.3.0","keywords":["aws-blocks","database","postgresql","aurora","sql"],"author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-data@0.3.0","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-data#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"bin":{"bb-data":"dist/cli.js"},"dist":{"shasum":"d12f963c7326813c1747a9e74290dc813be0c5b5","tarball":"https://registry.npmjs.org/@aws-blocks/bb-data/-/bb-data-0.3.0.tgz","fileCount":260,"integrity":"sha512-xnZeu5/sZK56Sc8gmTqLW7FPZWhqprCgVSkJ6UMrWO+HMjkVkTu1gzX8JwAJMuM6kLSV5Sgu8FNlDtsVh4gdBA==","signatures":[{"sig":"MEQCIErKlMOq67DCKBDK03CfPkYJxDuz8ZuuznTL95fNkcCfAiAp5kaj/33QkSdr1U2EfPXdITNUUh1oYsEOlHdIhWyJgg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQClr3SPSN/UZwshqgPa/r3bC7Tp9G16y1Gh3Hl6xz23ogIgStQj2BQCY8eg1KROKwUsqhbvFbcB1IW3FOwB6ChIHLI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-data@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1132353},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"51eeb265ab5efdbd853e989cf8bd6d30951c29c7","scripts":{"test":"node --test 'dist/**/*.test.js'","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs Database"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-data"},"_npmVersion":"10.9.8","description":"Full PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-saf","directories":{},"_nodeVersion":"22.23.2","dependencies":{"pg":"^8.13.0","pluralize":"^8.0.0","@aws-blocks/core":"^0.5.0","@electric-sql/pglite":"^0.2.0","@aws-blocks/bb-logger":"^0.2.0","@aws-blocks/data-common":"^0.1.5","@aws-sdk/client-rds-data":"^3.700.0","@aws-blocks/bb-app-setting":"^0.3.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.3.0","@types/node":"^20.0.0","@types/pluralize":"^0.0.33","@types/aws-lambda":"^8.10.161"},"peerDependencies":{"kysely":">=0.28.12 <0.30.0","constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-data_0.3.0_1789678790602_0.26920683005063384","host":"s3://npm-registry-packages-npm-production"}},"0.0.0-canary.ci-publish-canary-npm.f53dfdc.1790988617":{"name":"@aws-blocks/bb-data","version":"0.0.0-canary.ci-publish-canary-npm.f53dfdc.1790988617","keywords":["aws-blocks","database","postgresql","aurora","sql"],"author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-data@0.0.0-canary.ci-publish-canary-npm.f53dfdc.1790988617","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-data#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"bin":{"bb-data":"dist/cli.js"},"dist":{"shasum":"b13206fb557fb816b553644d165afdd8d75c6b7f","tarball":"https://registry.npmjs.org/@aws-blocks/bb-data/-/bb-data-0.0.0-canary.ci-publish-canary-npm.f53dfdc.1790988617.tgz","fileCount":260,"integrity":"sha512-Mds6NENHzsqh9zYp8g8MeHZvqbNXIyxo3RcUwmb1xvgv3j9pMl8RzA7qmXzgyity1+k/8twbKFP1vvDskwJpLw==","signatures":[{"sig":"MEUCIQDHLvOhKMZNXVxL5a6ZmjWcqNE3UGAGnL7/g3DrCqVsgAIgHdRu77cXCVyruDSedwD7EgvKyyjkS6GUhJBOHCG09Vc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIA8dB+3mVpYac75e1kuj+ayZg7iW6nQEQAgpeywZOIwFAiB1xM1fci1+aRfOmzqncOCG8n07n3GyGtwrAHsflaai3A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-data@0.0.0-canary.ci-publish-canary-npm.f53dfdc.1790988617","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1162157},"type":"module","_from":"file:aws-blocks-bb-data-0.0.0-canary.ci-publish-canary-npm.f53dfdc.1790988617.tgz","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"scripts":{"test":"node --test 'dist/**/*.test.js'","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs Database"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_resolved":"/home/runner/work/aws-blocks/aws-blocks/dist-npm/aws-blocks-bb-data-0.0.0-canary.ci-publish-canary-npm.f53dfdc.1790988617.tgz","_integrity":"sha512-Mds6NENHzsqh9zYp8g8MeHZvqbNXIyxo3RcUwmb1xvgv3j9pMl8RzA7qmXzgyity1+k/8twbKFP1vvDskwJpLw==","repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-data"},"_npmVersion":"10.9.9","description":"Full PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-saf","directories":{},"_nodeVersion":"22.23.3","dependencies":{"pg":"^8.13.0","pluralize":"^8.0.0","@aws-blocks/core":"0.0.0-canary.ci-publish-canary-npm.f53dfdc.1790988617","@electric-sql/pglite":"^0.5.8","@aws-blocks/bb-logger":"0.0.0-canary.ci-publish-canary-npm.f53dfdc.1790988617","@aws-blocks/data-common":"0.0.0-canary.ci-publish-canary-npm.f53dfdc.1790988617","@aws-sdk/client-rds-data":"^3.700.0","@aws-blocks/bb-app-setting":"0.0.0-canary.ci-publish-canary-npm.f53dfdc.1790988617"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.3.0","@types/node":"^20.0.0","@types/pluralize":"^0.0.33","@types/aws-lambda":"^8.10.161"},"peerDependencies":{"kysely":">=0.28.12 <0.30.0","constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-data_0.0.0-canary.ci-publish-canary-npm.f53dfdc.1790988617_1790988801031_0.7740037988631332","host":"s3://npm-registry-packages-npm-production"}},"0.0.0-canary.esql-canary.f7f39ac.1790989127":{"name":"@aws-blocks/bb-data","version":"0.0.0-canary.esql-canary.f7f39ac.1790989127","keywords":["aws-blocks","database","postgresql","aurora","sql"],"author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-data@0.0.0-canary.esql-canary.f7f39ac.1790989127","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-data#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"bin":{"bb-data":"dist/cli.js"},"dist":{"shasum":"322ba503d8fb7a8a93067d9ddd18b93d3ec35dd3","tarball":"https://registry.npmjs.org/@aws-blocks/bb-data/-/bb-data-0.0.0-canary.esql-canary.f7f39ac.1790989127.tgz","fileCount":316,"integrity":"sha512-yV4+SOgd+Mx7sXuno6zi4hQC2t/rWLIl8KNfpIHGo+SLqcGbHf7+rXA8KcwxL/Be6mOhx9uLL5osfudEUTnQCg==","signatures":[{"sig":"MEQCIB21BBC3XzgmapN9IvVLi3FOFRHgeuCmWB4lOodk3pUqAiB1p19Wp+PncPixd+AadwLwbQxlZd4t8Z/Fm4UH45PJ/A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQD9H+lJkU3zwJkddNpr3hI1K9ZCyPAF7WDTcE2iJgT//QIhAMyIQOBBV+wWx6/JQq8OtCWF6AU5AgtLv7m1h6NtknbA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-data@0.0.0-canary.esql-canary.f7f39ac.1790989127","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1421225},"type":"module","_from":"file:aws-blocks-bb-data-0.0.0-canary.esql-canary.f7f39ac.1790989127.tgz","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"},"./sync-client":{"types":"./dist/sync/client.d.ts","default":"./dist/sync/client.js"}},"scripts":{"test":"node --test 'dist/**/*.test.js'","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs Database"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_resolved":"/home/runner/work/aws-blocks/aws-blocks/dist-npm/aws-blocks-bb-data-0.0.0-canary.esql-canary.f7f39ac.1790989127.tgz","_integrity":"sha512-yV4+SOgd+Mx7sXuno6zi4hQC2t/rWLIl8KNfpIHGo+SLqcGbHf7+rXA8KcwxL/Be6mOhx9uLL5osfudEUTnQCg==","repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-data"},"_npmVersion":"10.9.9","description":"Full PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-saf","directories":{},"_nodeVersion":"22.23.3","dependencies":{"pg":"^8.13.0","pluralize":"^8.0.0","@aws-blocks/core":"0.0.0-canary.esql-canary.f7f39ac.1790989127","@electric-sql/client":"^1.5.28","@electric-sql/pglite":"^0.5.8","@smithy/signature-v4":"^5.7.3","@aws-blocks/bb-logger":"0.0.0-canary.esql-canary.f7f39ac.1790989127","@aws-crypto/sha256-js":"^5.2.0","@aws-blocks/data-common":"0.0.0-canary.esql-canary.f7f39ac.1790989127","@aws-sdk/client-rds-data":"^3.700.0","@aws-blocks/bb-app-setting":"0.0.0-canary.esql-canary.f7f39ac.1790989127","@aws-sdk/client-secrets-manager":"^3.700.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.3.0","@types/node":"^20.0.0","@types/pluralize":"^0.0.33","@types/aws-lambda":"^8.10.161"},"peerDependencies":{"kysely":">=0.28.12 <0.30.0","constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-data_0.0.0-canary.esql-canary.f7f39ac.1790989127_1790989333687_0.8386402532657653","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@aws-blocks/bb-data","version":"0.3.1","keywords":["aws-blocks","database","postgresql","aurora","sql"],"author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-data@0.3.1","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-data#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"bin":{"bb-data":"dist/cli.js"},"dist":{"shasum":"826a4f7c7af9a895e77978666b01b4002b146136","tarball":"https://registry.npmjs.org/@aws-blocks/bb-data/-/bb-data-0.3.1.tgz","fileCount":260,"integrity":"sha512-jYKiwgtJnJRP97ODVUQ5w6LPBMB6HWRiywfORVMzT7QAI+1t3LheWQco0o0BhveffbbObNoI4HyPBVHtbLg1yQ==","signatures":[{"sig":"MEUCIQCfyN28cO3Qe5LZwQaDyl/Q1hLplTYZT5hAjhPF5KjlRAIgbi8aKUV3XwzBl/Qw1+PhWpQUamfWs3svPSlbhgAQipc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIFAvYAfw0I5514iXwBdbpn8qd+Qko9H+0R6+WcB5wD0IAiEAwyqEGZ4fGCtynbQzMiWCvnmpwWBjfbjJb9R+1eE0pb8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-data@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1161921},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"7652433755bf9e2d9a88cef928e0c66dd95fed93","scripts":{"test":"node --test 'dist/**/*.test.js'","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs Database"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-data"},"_npmVersion":"10.9.9","description":"Full PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-saf","directories":{},"_nodeVersion":"22.23.3","dependencies":{"pg":"^8.13.0","pluralize":"^8.0.0","@aws-blocks/core":"^0.6.0","@electric-sql/pglite":"^0.5.8","@aws-blocks/bb-logger":"^0.2.1","@aws-blocks/data-common":"^0.1.5","@aws-sdk/client-rds-data":"^3.700.0","@aws-blocks/bb-app-setting":"^0.3.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.3.0","@types/node":"^20.0.0","@types/pluralize":"^0.0.33","@types/aws-lambda":"^8.10.161"},"peerDependencies":{"kysely":">=0.28.12 <0.30.0","constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-data_0.3.1_1791211371660_0.3460214334200131","host":"s3://npm-registry-packages-npm-production"}},"0.0.0-canary.esql-canary.c93c81b.1791235863":{"name":"@aws-blocks/bb-data","version":"0.0.0-canary.esql-canary.c93c81b.1791235863","keywords":["aws-blocks","database","postgresql","aurora","sql"],"author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-data@0.0.0-canary.esql-canary.c93c81b.1791235863","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-data#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"bin":{"bb-data":"dist/cli.js"},"dist":{"shasum":"cb3e06bfda572683f9d74bd1fe7b8b6dc2373105","tarball":"https://registry.npmjs.org/@aws-blocks/bb-data/-/bb-data-0.0.0-canary.esql-canary.c93c81b.1791235863.tgz","fileCount":316,"integrity":"sha512-1FT/biK9XBicg6Tf/D2VkBF7usmwfWUm3uaEOqNjYYQ6mwUQiVtFUaKj2g1MBJvCwxR6F+55MSTEtrIs0QtVHg==","signatures":[{"sig":"MEUCIQDRAmD2Aw29TNGmfL2FYJa9ZpkIhO1dJPr1G1pR3XtcygIgV9czrc+LihsYDJ7+iED+PpG5dFV7ER5te1DTrxP7Tow=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIEFnsSgAIEpCk2LBVylKFxZQPyYMceHFw6IlyCw5K8HHAiEApSlNVUcg8PEA8DAXcsBcmM0Wv0+2bB6e7gW0b1CqwmA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-data@0.0.0-canary.esql-canary.c93c81b.1791235863","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1427023},"type":"module","_from":"file:aws-blocks-bb-data-0.0.0-canary.esql-canary.c93c81b.1791235863.tgz","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"},"./sync-client":{"types":"./dist/sync/client.d.ts","default":"./dist/sync/client.js"}},"scripts":{"test":"node --test 'dist/**/*.test.js'","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs Database"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_resolved":"/home/runner/work/aws-blocks/aws-blocks/dist-npm/aws-blocks-bb-data-0.0.0-canary.esql-canary.c93c81b.1791235863.tgz","_integrity":"sha512-1FT/biK9XBicg6Tf/D2VkBF7usmwfWUm3uaEOqNjYYQ6mwUQiVtFUaKj2g1MBJvCwxR6F+55MSTEtrIs0QtVHg==","repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-data"},"_npmVersion":"10.9.9","description":"Full PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-saf","directories":{},"_nodeVersion":"22.23.3","dependencies":{"pg":"^8.13.0","pluralize":"^8.0.0","@aws-blocks/core":"0.0.0-canary.esql-canary.c93c81b.1791235863","@electric-sql/client":"^1.5.28","@electric-sql/pglite":"^0.5.8","@smithy/signature-v4":"^5.7.3","@aws-blocks/bb-logger":"0.0.0-canary.esql-canary.c93c81b.1791235863","@aws-crypto/sha256-js":"^5.2.0","@aws-blocks/data-common":"0.0.0-canary.esql-canary.c93c81b.1791235863","@aws-sdk/client-rds-data":"^3.700.0","@aws-blocks/bb-app-setting":"0.0.0-canary.esql-canary.c93c81b.1791235863","@aws-sdk/client-secrets-manager":"^3.700.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.3.0","@types/node":"^20.0.0","@types/pluralize":"^0.0.33","@types/aws-lambda":"^8.10.161"},"peerDependencies":{"kysely":">=0.28.12 <0.30.0","constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-data_0.0.0-canary.esql-canary.c93c81b.1791235863_1791237479915_0.7331024333562193","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@aws-blocks/bb-data","version":"0.4.0","keywords":["aws-blocks","database","postgresql","aurora","sql"],"author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-data@0.4.0","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-data#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"bin":{"bb-data":"dist/cli.js"},"dist":{"shasum":"c54ccfda0e490fa4649907e58e71520b97bce1a1","tarball":"https://registry.npmjs.org/@aws-blocks/bb-data/-/bb-data-0.4.0.tgz","fileCount":272,"integrity":"sha512-VaV+KMDrV3Gy0OWznrPgBCNkPUBrsrEdqLhCCtn+sqk6Uzpu6ummDG4sSfRzAiPOSfqsIVa1hoYlRV9QAAaauA==","signatures":[{"sig":"MEQCIFoHG3EE2GUT+FalKVFbHslvRGnDGMig+Z8V0oh83sXgAiAE9wv8uTbtUFAlkRSS1OiBp3h/kgwMCcWPjn8oPxCyKg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIBxqRfU/O3q44TyBrwiqWatjom2lmYDVqIE57ySfSpukAiAmHdXqmiAuchMGwGnStqTVjI+MzoRAbwh/QvqJ2C0STQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-data@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1290039},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"e130ead68d54c66da0f8c15db5537462abeaf986","scripts":{"test":"node --test 'dist/**/*.test.js'","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs Database"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-data"},"_npmVersion":"10.9.9","description":"Full PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-saf","directories":{},"_nodeVersion":"22.23.3","dependencies":{"pg":"^8.13.0","pluralize":"^8.0.0","@aws-blocks/core":"^0.7.0","@electric-sql/pglite":"^0.5.8","@aws-blocks/bb-logger":"^0.2.2","@aws-blocks/data-common":"^0.1.6","@aws-sdk/client-rds-data":"^3.700.0","@aws-blocks/bb-app-setting":"^0.3.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.0","typescript":"^5.3.0","@types/node":"^20.0.0","@types/pluralize":"^0.0.33","@types/aws-lambda":"^8.10.161"},"peerDependencies":{"kysely":">=0.28.12 <0.30.0","constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-data_0.4.0_1792153709260_0.9635753543391594","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"_id":"@aws-blocks/bb-data@0.5.0","bin":{"bb-data":"dist/cli.js"},"bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"dist":{"shasum":"77d7895cd13e29ae1667dbc10cb2b252cca9dfbb","tarball":"https://registry.npmjs.org/@aws-blocks/bb-data/-/bb-data-0.5.0.tgz","fileCount":284,"integrity":"sha512-f2wRN87PYjo+yKuD3UXKLjy8RV1RAk5z8WIV36dSN+MxXHBH7qJ5G9pwucRwRYAb/AXXTxQ9KUj95UCiUjQ74w==","signatures":[{"sig":"MEUCIQDAE6TxSqmiAH37rYv5MskDVd4DFgb4G2Ii95Oqs2k+0AIgVp1Unk3WOIGgKoXRjvEF2atN9nAkVlgDS05AYn3gdRc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCHT8evo3dbh9CMU8knV+je9PD+bguoPVdoB+Z0g8UKIwIhAI6aTl9jxXsXM6mHOrOyL2e1EQdH0t0ljw+dzMgj22ag"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-data@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1468073},"name":"@aws-blocks/bb-data","type":"module","author":{"name":"Amazon Web Services"},"exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"436d70352871aca49924260d5a76fe719c49878b","license":"Apache-2.0","scripts":{"test":"node --test 'dist/**/*.test.js'","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs Database"},"version":"0.5.0","_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-data#readme","keywords":["aws-blocks","database","postgresql","aurora","sql"],"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-data"},"_npmVersion":"10.9.9","description":"Full PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-saf","directories":{},"maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"_nodeVersion":"22.23.4","dependencies":{"pg":"^8.23.1","pluralize":"^8.0.0","@aws-blocks/core":"^0.8.0","@electric-sql/pglite":"^0.5.10","@aws-blocks/bb-logger":"^0.3.0","@aws-blocks/data-common":"^0.1.7","@aws-sdk/client-rds-data":"^3.1156.0","@aws-blocks/bb-app-setting":"^0.4.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.23.1","typescript":"^5.9.3","@types/node":"^20.19.43","@types/pluralize":"^0.0.33","@types/aws-lambda":"^8.10.164"},"peerDependencies":{"kysely":">=0.28.12 <0.30.0","constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bb-data_0.5.0_1793615105818_0.7833623349846481"}}},"time":{"created":"2026-06-15T23:39:25.245Z","modified":"2026-11-02T10:25:06.409Z","0.1.0":"2026-06-15T23:39:25.613Z","0.1.1":"2026-06-16T18:16:10.885Z","0.1.2":"2026-06-23T05:24:03.906Z","0.2.2":"2026-07-02T22:58:09.899Z","0.2.4":"2026-08-07T20:43:40.221Z","0.2.5":"2026-08-20T12:54:29.745Z","0.2.6":"2026-09-01T12:05:52.609Z","0.2.7":"2026-09-08T11:38:22.262Z","0.3.0":"2026-09-17T20:59:50.693Z","0.0.0-canary.ci-publish-canary-npm.f53dfdc.1790988617":"2026-10-03T00:53:21.131Z","0.0.0-canary.esql-canary.f7f39ac.1790989127":"2026-10-03T01:02:13.800Z","0.3.1":"2026-10-05T14:42:51.777Z","0.0.0-canary.esql-canary.c93c81b.1791235863":"2026-10-05T21:58:00.072Z","0.4.0":"2026-10-16T12:28:29.380Z","0.5.0":"2026-11-02T10:25:05.910Z"},"bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"author":{"name":"Amazon Web Services"},"license":"Apache-2.0","homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-data#readme","keywords":["aws-blocks","database","postgresql","aurora","sql"],"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-data"},"description":"Full PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-saf","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"readme":"# @aws-blocks/bb-data\n\nFull PostgreSQL database — provisions Aurora Serverless v2 by default, or connects to an existing PostgreSQL database (Supabase, Neon, etc.) via `fromExisting()`. Full relational modeling with foreign keys, transactions, Row Level Security, and a type-safe Kysely query builder.\n\n**When to use:** Complex multi-table JOINs, ACID transactions, foreign key constraints, aggregations, Row Level Security, or connecting to an existing PostgreSQL database. Use when you need the full power of PostgreSQL.\n\n**When NOT to use:** For simple key-value lookups, use `KVStore`. For NoSQL with secondary indexes, use `DistributedTable`. For serverless SQL without FK/RLS/triggers (multi-region, instant provisioning), use `DistributedDatabase`.\n\n> Design & mock parity details: [DESIGN.md](./DESIGN.md)\n\n## Quick Start\n\n```typescript\nimport { Database, sql } from '@aws-blocks/bb-data';\n\nconst db = new Database(scope, 'main', {\n  migrationsPath: './aws-blocks/migrations',\n});\n\n// Parameterized queries via sql tagged template (injection-safe)\nconst users = await db.query<{ id: string; name: string }>(\n  sql`SELECT * FROM users WHERE active = ${true}`\n);\n\nconst user = await db.queryOne<{ id: string; name: string }>(\n  sql`SELECT * FROM users WHERE id = ${userId}`\n);\n\nconst { rowCount } = await db.execute(\n  sql`INSERT INTO users (id, name, email) VALUES (${id}, ${name}, ${email})`\n);\n\n// Transactions\nawait db.transaction(async (tx) => {\n  await tx.execute(sql`UPDATE accounts SET balance = balance - ${100} WHERE id = ${fromId}`);\n  await tx.execute(sql`UPDATE accounts SET balance = balance + ${100} WHERE id = ${toId}`);\n});\n```\n\n## Migrations\n\nCreate numbered `.sql` files in a migrations directory:\n\n```\naws-blocks/migrations/\n  001_create_users.sql\n  002_create_posts.sql\n  003_seed_admin.sql\n```\n\n```sql\n-- 001_create_users.sql\nCREATE TABLE users (\n  id TEXT PRIMARY KEY,\n  email TEXT UNIQUE NOT NULL,\n  name TEXT NOT NULL,\n  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);\n```\n\nMigrations run automatically:\n- **Local dev:** On first query (PGlite, persists in `.bb-data/`)\n- **AWS deploy:** Via a CustomResource Lambda during `cdk deploy`\n\nApplied migrations are tracked in a `_migrations` table. Each file runs once.\n\n> **Set `migrationsPath` to a path relative to your project root** (as in the Quick Start — `'./aws-blocks/migrations'`); it's resolved at synth from the directory you run `cdk` / `npm run deploy` in. That's the simplest reliable pattern.\n>\n> You don't need `fileURLToPath(import.meta.url)` for this. Your backend module runs as ESM locally but is bundled to **CommonJS** in Lambda, where `import.meta` is empty. AWS Blocks shims `import.meta.url` / `import.meta.dirname` in the bundle so it won't crash at load — but at runtime those resolve to the **bundled output** location, not your source tree. So don't use `import.meta.url` to read a file relative to your source at request time; inline the data or ship it as a Lambda asset instead.\n\n## Kysely Query Builder\n\nFor type-safe queries without raw SQL:\n\n```typescript\nimport { createKyselyAdapter } from '@aws-blocks/bb-data';\n\ninterface Schema {\n  users: { id: string; email: string; name: string };\n  posts: { id: string; user_id: string; title: string };\n}\n\nconst kysely = createKyselyAdapter<Schema>(db);\n\n// Type-safe SELECT\nconst users = await kysely\n  .selectFrom('users')\n  .where('email', '=', 'user@example.com')\n  .selectAll()\n  .execute();\n\n// JOINs\nconst posts = await kysely\n  .selectFrom('posts')\n  .innerJoin('users', 'users.id', 'posts.user_id')\n  .select(['posts.title', 'users.name'])\n  .execute();\n\n// Transactions\nawait kysely.transaction().execute(async (trx) => {\n  await trx.insertInto('users').values({ id: '1', email: 'a@b.com', name: 'A' }).execute();\n  await trx.insertInto('posts').values({ id: '1', user_id: '1', title: 'Hello' }).execute();\n});\n```\n\nSee [Kysely documentation](https://kysely.dev) for the full query builder API.\n\n## Row Level Security (RLS)\n\nScope queries to a user context with Supabase-compatible session variables:\n\n```typescript\nconst scoped = db.withRLS({ userId: 'user-123', role: 'authenticated' });\n\n// All queries on `scoped` run inside a transaction with SET LOCAL ROLE\n// and request.jwt.claims set — PostgreSQL RLS policies are enforced.\nconst myPosts = await scoped.query<Post>(sql`SELECT * FROM posts`);\n```\n\n`request.jwt.claims` always carries `sub` = `userId` and `role` = the `role` you pass. Extra `claims` are merged in, but they can't override those two: a `sub` or `role` key in `claims` is ignored. Policies can therefore trust both, for example `USING (owner_id = current_setting('request.jwt.claims', true)::jsonb ->> 'sub')`. When you forward claims from an identity provider, put provider-specific values under their own keys (for example `claims: { idp_sub: token.sub }`).\n\n> **Prerequisite (local and AWS):** `withRLS` issues `SET LOCAL ROLE <role>` (default `authenticated`). The role must exist, and the database user must be a member of it. On PostgreSQL 16 and later, which Aurora runs, the user that creates a role gets only `ADMIN` on it, not `SET`, so grant the roles explicitly. Add to your migrations:\n>\n> ```sql\n> CREATE ROLE authenticated;\n> CREATE ROLE anon;\n> GRANT authenticated TO CURRENT_USER;\n> GRANT anon TO CURRENT_USER;\n> -- grant table privileges to these roles as needed, then define RLS policies\n> ```\n>\n> If the role switch is refused, every `withRLS()` call fails with a 500 `QueryFailed`, and the server log names the missing `GRANT`.\n\n## CRUD Handlers\n\nGenerate typed CRUD methods from a schema definition:\n\n```typescript\nconst crud = db.crud({\n  tables: ['users', 'posts'],\n  // `auth` takes no arguments — close over your request context to resolve the user.\n  auth: async () => {\n    const user = await auth.requireAuth(context);\n    return { userId: user.userId };\n  },\n});\n\n// Auto-generated flat method names per table:\n//   crud.listUsers(), crud.getUser(id), crud.createUser(data),\n//   crud.updateUser(id, data), crud.deleteUser(id)\n//   crud.listPosts(), crud.getPost(id), ...\n```\n\n## Connecting to an Existing Database\n\n```typescript\nimport { Database, fromExisting } from '@aws-blocks/bb-data';\n\n// Supabase, Neon, or any PostgreSQL-compatible database\nconst db = new Database(scope, 'external', {\n  connection: fromExisting({ connectionString: process.env.DATABASE_URL! }),\n});\n```\n\n### TLS certificate verification\n\nThe server's TLS certificate is **verified by default**. Managed providers\n(Supabase, Neon, RDS) present a certificate signed by a provider-specific CA\nthat is not in Node's built-in trust store, so verification requires pinning\nthat CA. `ssl.ca` takes the certificate **contents** (a PEM string), not a path —\nfor Supabase, download `prod-ca-2021.crt` from your project's **Database Settings\n→ SSL Configuration**:\n\n```typescript\nimport { readFileSync } from 'node:fs';\n\nconst db = new Database(scope, 'external', {\n  connection: fromExisting({\n    connectionString: process.env.DATABASE_URL!,\n    ssl: { ca: readFileSync('./supabase-ca.crt', 'utf8') },\n  }),\n});\n```\n\n`bb-data pull` wires this for you: it prompts for your CA certificate and commits\nit to `aws-blocks/database.ca.ts` (a public, non-secret cert that is bundled into\nyour deployed function), so the connection is **verified by default** — including\nin the deployed Lambda, with no runtime configuration. `DATABASE_CA_CERT` (inline\nPEM or a file path) overrides the committed cert. If neither is available, the\ngenerated wiring falls back to `ssl: { rejectUnauthorized: false }` (**encrypted but\nunauthenticated**) in local dev only; the **deployed function fails closed**\n(refuses to connect) rather than running unverified. Provide the CA for production.\n\n## Migrating from Supabase\n\nAlready have a Supabase app? `bb-data pull` connects to your existing Supabase database and generates a complete, type-safe backend — keeping your tables, data, and RLS policies exactly as they are.\n\n```sh\nnpx bb-data pull\n```\n\nWhat it does:\n- Introspects your public-schema tables (read-only — your database is not modified)\n- Generates typed definitions, CRUD operations, and a personalized migration guide\n- Stores your connection string locally as `SUPABASE_DB_URL` in `.env.local` (encrypted in SSM on deploy). Only that entry is added or updated — other settings, comments, and the file's permissions are kept; the `SUPABASE_DB_URL` line itself is rewritten whole, so a comment at the end of it is not kept. If `.env.local` can't be updated safely (for example, the change would alter how another entry is read), `db pull` stops before generating any files and asks you to set the entry by hand. Choosing \"production\" does the same for `.env.production`.\n\nWhat it does NOT migrate: Supabase Auth, Storage, Realtime, or Edge Functions. If you use a third-party OIDC provider (Auth0, Clerk, Google, Cognito), you can wire it into Blocks — see the generated `MIGRATION_GUIDE.md#auth`.\n\nAfter pulling, run `npm run dev` to start developing locally against your real database.\n\nOnce pulled, manage schema changes with version-controlled SQL migrations in `./migrations/` — applied automatically on `npm run dev` and `npm run deploy`. See the generated `MIGRATION_GUIDE.md#evolving-your-schema`.\n\n## Error Handling\n\n```typescript\nimport { DatabaseErrors } from '@aws-blocks/bb-data';\nimport { isBlocksError } from '@aws-blocks/core';\n\ntry {\n  await db.execute(sql`INSERT INTO users (id, email) VALUES (${id}, ${email})`);\n} catch (e: unknown) {\n  if (isBlocksError(e, DatabaseErrors.UniqueConstraintViolation)) {\n    // Duplicate key — email already exists. Serialized as HTTP 409 (Conflict),\n    // not retriable (a blind retry of the same insert fails identically).\n  }\n  if (isBlocksError(e, DatabaseErrors.PermissionDenied)) {\n    // Your statement was refused: a row-level-security policy rejected the row\n    // (for example a withRLS() user writing someone else's row), or the role has\n    // no grant on the table. Serialized as HTTP 403.\n  }\n  if (isBlocksError(e, DatabaseErrors.CheckViolation) || isBlocksError(e, DatabaseErrors.NotNullViolation)) {\n    // A value fails a CHECK constraint, or a required column is missing.\n    // Serialized as HTTP 400.\n  }\n  if (isBlocksError(e, DatabaseErrors.ForeignKeyViolation)) {\n    // The referenced row doesn't exist, or other rows still reference the one\n    // being deleted. Serialized as HTTP 409 (Conflict).\n  }\n  if (isBlocksError(e, DatabaseErrors.QueryFailed)) {\n    // General query failure (syntax error, missing table, etc.)\n  }\n  if (isBlocksError(e, DatabaseErrors.TransactionFailed)) {\n    // Transaction could not commit\n  }\n  if (isBlocksError(e, DatabaseErrors.SerializationFailure)) {\n    // Serializable-isolation conflict with a concurrent transaction — serialized\n    // as HTTP 409 (Conflict), retriable — safe to retry\n  }\n  if (isBlocksError(e, DatabaseErrors.ConnectionFailed)) {\n    // Cannot reach the database — includes a `minCapacity: 0` cluster resuming\n    // from auto-pause, which succeeds on retry a few seconds later\n  }\n}\n```\n\nThe client-visible message of each error is a fixed string; the driver's own\ntext, which names tables, columns and constraints, stays on the server as the\nerror's `cause`. Only `SerializationFailure` and `ConnectionFailed` are worth\nretrying: the request errors (`PermissionDenied`, `CheckViolation`,\n`NotNullViolation`, `ForeignKeyViolation`, `UniqueConstraintViolation`) fail the\nsame way every time.\n\nEach of these errors aborts the enclosing Postgres transaction. Inside a\n`db.transaction()` callback, a caught error leaves the transaction unusable: the\nnext statement fails as `QueryFailed`. Catch them outside `transaction()`, or\nwrap the statement in a savepoint (`SAVEPOINT s` … `ROLLBACK TO SAVEPOINT s`) if\nthe transaction should continue.\n\n## What It Provisions (AWS)\n\n- **Aurora Serverless v2** — PostgreSQL-compatible, scales 0.5-128 ACUs. Storage\n  encryption at rest is **opt-in via a context flag** so new projects are secure by\n  default without replacing an existing cluster. New `create-blocks-app` projects\n  set `\"@aws-blocks/bb-data:encryptStorageByDefault\": true` in `cdk.json`, which\n  turns on encryption with the account's AWS-managed `aws/rds` key. Passing a\n  `storageEncryptionKeyArn` (the ARN of a customer-managed KMS key) also turns\n  encryption on regardless of the flag and uses that key instead (it also encrypts\n  the generated credentials secret). When neither the flag nor a key is set, the\n  cluster is synthesized without the `StorageEncrypted` property (an existing,\n  unencrypted cluster is left untouched) and a synth warning explains how to opt\n  in. The key is **imported** (Blocks can't modify its policy), so its policy\n  must already grant the deploying principal `kms:CreateGrant` + `kms:DescribeKey`\n  (RDS uses a grant to encrypt the storage volume) and grant `kms:Decrypt` to the\n  principal that reads the credentials secret over the Data API. The key must be in\n  the **same account and region** as the cluster.\n- **Automated backups** — on by default, retained **15 days**, which is also the\n  point-in-time-recovery window. Controlled by the single `pointInTimeRecovery`\n  option (mirrors every other Blocks block): `true` enables the 15-day window,\n  `{ retentionDays: n }` pins a 1–35-day window, and `false` clamps to the 1-day\n  minimum (Aurora cannot turn automated backups off). When omitted it follows the\n  stack-wide `defaults.pointInTimeRecovery` (on under `production`, off under\n  `sandbox` — which lands on the 1-day minimum).\n- **CloudWatch log export** — the PostgreSQL engine log is exported to CloudWatch\n  Logs. Log-group retention follows the stack-wide `defaults.logRetention` when\n  set; otherwise it uses the account default.\n- **VPC** — Private subnets (isolated, no NAT)\n- **Secrets Manager** — Auto-generated credentials. Automatic rotation is not yet\n  wired up (a rotation Lambda in the cluster VPC is a planned follow-up); the\n  secret is encrypted with your `storageEncryptionKeyArn` when one is supplied.\n- **Migration Lambda** — Runs `.sql` files on deploy via CustomResource\n- **IAM** — `rds-data:*` and `secretsmanager:GetSecretValue` granted to the app Lambda\n\n> **Access model:** the database is reached exclusively over the RDS Data API\n> (HTTPS + Secrets Manager credentials), never a raw Postgres socket. Database-level\n> IAM authentication (`iamAuthentication`) is therefore intentionally left off — it\n> does not apply to the Data API access path.\n>\n> **Enabling encryption on an existing unencrypted cluster requires a\n> replacement — and a replacement is destructive.** RDS cannot encrypt an\n> already-provisioned unencrypted cluster in place, so turning storage encryption\n> on (or changing the KMS key) makes CloudFormation create a **new, empty**\n> encrypted cluster and repoint the stack at it. There is **no in-place path**.\n> What happens to the old cluster and its data depends on the removal policy:\n> - **Production (RETAIN):** the old cluster is left behind, orphaned and no\n>   longer referenced by the stack. The app comes back pointed at the new **empty**\n>   cluster. The migration CustomResource does **not** re-run on a cluster swap —\n>   its only CloudFormation properties are the service token and the migrations\n>   hash, and neither changes when the cluster is replaced, so CloudFormation never\n>   invokes it. The replacement cluster therefore comes up with **no schema**;\n>   migrations run only when a migration file changes (which changes the migrations\n>   hash). Your data still exists on the orphaned cluster but is not restored.\n> - **Sandbox (DESTROY):** the old cluster and all of its data are **deleted**.\n> - **Snapshot (`removalPolicy: 'snapshot'`):** the old cluster is snapshotted as\n>   it is replaced. Under production's `deletionProtection: true`, the follow-up\n>   delete of the old cluster may fail and leave it in place; this cleanup path is\n>   unverified on a real deploy.\n>\n> **The replacement is symmetric.** Turning encryption back **off** — removing the\n> flag (or `storageEncryptionKeyArn`) from a project that already deployed\n> encrypted, whether by deleting the `cdk.json` line or by a merge that drops it —\n> also changes the `StorageEncrypted` property, so it **likewise replaces the\n> cluster** (back to unencrypted) with the same new-empty-cluster / no-schema\n> outcome described above. Review the diff and snapshot before removing the flag\n> too, not only before adding it.\n>\n> The only safe route is to carry the data across yourself: **snapshot** the\n> existing cluster, **restore** that snapshot into a new cluster with encryption\n> enabled, then cut over to it. Review the CloudFormation diff and take a snapshot\n> before deploying this change to any cluster whose data you need. Adding or\n> changing the KMS key also replaces the cluster's generated credentials secret (a\n> new logical id, hence a new generated password), so record the existing\n> credentials — or reset the master password on the old cluster — if you still\n> need access to the orphaned cluster.\n\n## Local Development\n\n- **Engine:** PGlite (WASM PostgreSQL) — full Postgres compatibility\n- **Storage:** `.bb-data/{fullId}/` — persists across restarts, wipe with `rm -rf .bb-data`\n- **Migrations:** Run automatically on first query\n\n### Local vs. AWS: column types\n\nArray columns and `json` / `jsonb` columns return the same JavaScript values on\nboth engines. Array columns (`text[]`, `int[]`, ...) come back as JS arrays and\n`json` / `jsonb` columns come back as parsed objects, whether you run locally on\nPGlite or on AWS over the RDS Data API. Element representation still follows the\nscalar notes below — e.g. `numeric[]` elements come back as strings over the\nData API.\n\nSome scalar numeric types can still differ in representation between the two\nengines: `numeric` / `decimal` comes back as a string over the Data API, and\n`bigint` / `int8` comes back as a JS `number` over the Data API while the `pg` /\nPGlite driver returns it as a string by default. Cast or parse these explicitly\nif you need identical values across both engines.\n\nOne Postgres type the RDS Data API cannot return is `tsvector`: selecting a\n`tsvector` column directly (for example `select *` on a table with a generated\n`search tsvector` column) fails on AWS. Exclude it from the select list — a\n`tsvector` is normally only used in a `WHERE` / `ORDER BY` full-text predicate,\nnot read back as a value.\n\n## Configuration\n\n```typescript\ninterface DatabaseOptions {\n  /** Path to directory containing numbered .sql migration files. */\n  migrationsPath?: string;\n  /** Connect to an existing database instead of provisioning one. */\n  connection?: ExternalDatabaseRef;\n  /** Schema metadata for crud() support. */\n  schema?: TableSchema;\n  /** Aurora PostgreSQL engine version, e.g. '16.13'. Override the Aurora engine version. @default '16.13' */\n  postgresVersion?: string;\n  /**\n   * ARN of a customer-managed KMS key for the cluster's storage-at-rest encryption\n   * (also encrypts the auto-generated credentials secret). Supplying it turns\n   * storage encryption on regardless of the `@aws-blocks/bb-data:encryptStorageByDefault`\n   * context flag. When omitted, encryption follows that flag — on with the\n   * account's AWS-managed `aws/rds` key when set, otherwise left unset. The key is\n   * imported, so its policy must already grant the deploying principal\n   * `kms:CreateGrant` + `kms:DescribeKey` and grant `kms:Decrypt` to the principal\n   * reading the credentials secret; it must be in the same account + region.\n   */\n  storageEncryptionKeyArn?: string;\n  /**\n   * Automated-backup retention, which is also the point-in-time-recovery (PITR)\n   * window. `true` enables the 15-day window; `{ retentionDays: n }` pins a\n   * 1–35-day window; `false` clamps to the 1-day minimum (Aurora cannot disable\n   * automated backups). When omitted, follows `defaults.pointInTimeRecovery`.\n   */\n  pointInTimeRecovery?: boolean | { retentionDays: number };\n}\n```\n\n## Package Export Conditions\n\n```json\n{\n  \"exports\": {\n    \".\": {\n      \"cdk\": \"./dist/index.cdk.js\",\n      \"aws-runtime\": \"./dist/index.aws.js\",\n      \"default\": \"./dist/index.mock.js\"\n    }\n  }\n}\n```\n\n## Performance\n\n- **Query latency:** 10-50ms (warm), ~500ms cold start from 0 ACUs\n- **Throughput:** Requests go over the RDS Data API (HTTPS) rather than pooled database connections, so there is no connection-pool ceiling or RDS Proxy; concurrency is bounded by the Data API request limits and the cluster's ACU scaling.\n- **Storage:** Up to 128 TiB, auto-scales in 10 GiB increments\n- **Cost:** ~$0.12/ACU-hour + ~$0.10/GB-month storage\n- **Durability:** 6 copies across 3 AZs, 99.99% availability\n\n\n","readmeFilename":"README.md"}