@powerlines/plugin-prisma 0.3.1 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/client/client.gen.mjs.map +1 -1
- package/dist/api/client/utils.gen.mjs.map +1 -1
- package/dist/api/client.gen.cjs +0 -8
- package/dist/api/client.gen.mjs +0 -8
- package/dist/api/client.gen.mjs.map +1 -1
- package/dist/api/core/auth.gen.mjs.map +1 -1
- package/dist/api/core/bodySerializer.gen.mjs.map +1 -1
- package/dist/api/core/params.gen.mjs.map +1 -1
- package/dist/api/core/pathSerializer.gen.d.cts +2 -2
- package/dist/api/core/pathSerializer.gen.d.cts.map +1 -1
- package/dist/api/core/pathSerializer.gen.d.mts +2 -2
- package/dist/api/core/pathSerializer.gen.d.mts.map +1 -1
- package/dist/api/core/pathSerializer.gen.mjs.map +1 -1
- package/dist/api/core/queryKeySerializer.gen.cjs +0 -3
- package/dist/api/core/queryKeySerializer.gen.d.cts.map +1 -1
- package/dist/api/core/queryKeySerializer.gen.d.mts.map +1 -1
- package/dist/api/core/queryKeySerializer.gen.mjs +0 -3
- package/dist/api/core/queryKeySerializer.gen.mjs.map +1 -1
- package/dist/api/core/serverSentEvents.gen.mjs.map +1 -1
- package/dist/api/core/utils.gen.mjs.map +1 -1
- package/dist/api/sdk.gen.cjs +1 -0
- package/dist/api/sdk.gen.mjs +1 -0
- package/dist/api/sdk.gen.mjs.map +1 -1
- package/dist/helpers/get-schema.mjs.map +1 -1
- package/dist/helpers/index.cjs +1 -1
- package/dist/helpers/index.mjs +1 -1
- package/dist/helpers/prisma-postgres.d.cts +1 -51
- package/dist/helpers/prisma-postgres.d.mts +1 -51
- package/dist/helpers/prisma-postgres.mjs.map +1 -1
- package/dist/helpers/schema-creator.mjs.map +1 -1
- package/dist/index.cjs +24 -13
- package/dist/index.d.cts +3 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +23 -11
- package/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@stryke_string-format@0.16.0/node_modules/@stryke/string-format/dist/constant-case.cjs +31 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.16.0/node_modules/@stryke/string-format/dist/constant-case.mjs +32 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.16.0/node_modules/@stryke/string-format/dist/constant-case.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.16.0/node_modules/@stryke/string-format/dist/snake-case.cjs +17 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.16.0/node_modules/@stryke/string-format/dist/snake-case.mjs +17 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.16.0/node_modules/@stryke/string-format/dist/snake-case.mjs.map +1 -0
- package/dist/types/plugin.d.cts +8 -6
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +8 -6
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/prisma.d.cts.map +1 -1
- package/package.json +6 -36
- package/dist/components/index.cjs +0 -3
- package/dist/components/index.d.cts +0 -2
- package/dist/components/index.d.mts +0 -2
- package/dist/components/index.mjs +0 -3
- package/dist/components/infrastructure-file.cjs +0 -76
- package/dist/components/infrastructure-file.d.cts +0 -13
- package/dist/components/infrastructure-file.d.cts.map +0 -1
- package/dist/components/infrastructure-file.d.mts +0 -13
- package/dist/components/infrastructure-file.d.mts.map +0 -1
- package/dist/components/infrastructure-file.mjs +0 -75
- package/dist/components/infrastructure-file.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"infrastructure-file.mjs","names":["code","Show","splitProps","VarDeclaration","Spacing","usePowerlines","InfrastructureFile","kebabCase","defu","PrismaPostgresInfrastructureFile","props","children","imports","rest","context","_$createComponent","_$mergeProps","id","name","initializer","config","prisma","prismaPostgres","projectId","databaseName","mode","region","when","Boolean"],"sources":["../../src/components/infrastructure-file.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, Show, splitProps } from \"@alloy-js/core\";\nimport { VarDeclaration } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport {\n InfrastructureFile,\n InfrastructureFileProps\n} from \"@powerlines/plugin-alloy/typescript/components/infrastructure-file\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport defu from \"defu\";\nimport { PrismaPluginContext } from \"../types\";\n\nexport type PrismaPostgresInfrastructureFileProps = Omit<\n InfrastructureFileProps,\n \"id\"\n>;\n\n/**\n * Generates the Prisma Postgres infrastructure configuration module for the Powerlines project.\n */\nexport function PrismaPostgresInfrastructureFile(\n props: PrismaPostgresInfrastructureFileProps\n) {\n const [{ children, imports }, rest] = splitProps(props, [\n \"children\",\n \"imports\"\n ]);\n\n const context = usePowerlines<PrismaPluginContext>();\n\n return (\n <InfrastructureFile\n id=\"prisma-postgres\"\n {...rest}\n imports={defu(\n {\n \"@pulumi/pulumi\": \"pulumi\",\n \"@pulumi/prisma-postgres\": \"prismaPostgres\"\n },\n imports ?? {}\n )}>\n <VarDeclaration\n export\n const\n name=\"project\"\n initializer={code`new prismaPostgres.Project(\"project\", {\n name: \"${context.config.prisma.prismaPostgres?.projectId}\",\n }); `}\n />\n <Spacing />\n <VarDeclaration\n export\n const\n name=\"database\"\n initializer={code`prismaPostgres.Database(\"database\", {\n projectId: project.id,\n name: \"${\n context.config.prisma.prismaPostgres?.databaseName ||\n `${kebabCase(context.config.name)}.${\n context.config.mode\n }.${context.config.prisma.prismaPostgres?.region}`\n }\",\n region: \"${context.config.prisma.prismaPostgres?.region}\",\n }); `}\n />\n <Spacing />\n <VarDeclaration\n export\n const\n name=\"connection\"\n initializer={code`new prismaPostgres.Connection(\"connection\", {\n databaseId: database.id,\n name: \"${kebabCase(context.config.name)}-api-key\",\n }); `}\n />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </InfrastructureFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAsCA,SAAgBS,iCACdC,OACA;CACA,MAAM,CAAC,EAAEC,UAAUC,WAAWC,QAAQX,WAAWQ,OAAO,CACtD,YACA,UACD,CAAC;CAEF,MAAMI,UAAUT,eAAoC;AAEpD,QAAAU,gBACGT,oBAAkBU,WAAA,EACjBC,IAAE,mBAAA,EACEJ,MAAI;EAAA,IACRD,UAAO;AAAA,UAAEJ,KACP;IACE,kBAAkB;IAClB,2BAA2B;IAC5B,EACDI,WAAW,EACb,CAAC;;EAAA,IAAAD,WAAA;AAAA,UAAA;IAAAI,gBACAZ,gBAAc;KAAA,UAAA;KAAA,SAAA;KAGbe,MAAI;KAAA,IACJC,cAAW;AAAA,aAAEnB,IAAI;mBACNc,QAAQM,OAAOC,OAAOC,gBAAgBC,UAAS;;;KACrD,CAAA;IAAAR,gBAENX,SAAO,EAAA,CAAA;IAAAW,gBACPZ,gBAAc;KAAA,UAAA;KAAA,SAAA;KAGbe,MAAI;KAAA,IACJC,cAAW;AAAA,aAAEnB,IAAI;;mBAGbc,QAAQM,OAAOC,OAAOC,gBAAgBE,gBACtC,GAAGjB,UAAUO,QAAQM,OAAOF,KAAK,CAAA,GAC/BJ,QAAQM,OAAOK,KAAI,GACjBX,QAAQM,OAAOC,OAAOC,gBAAgBI,SAAQ;qBAEzCZ,QAAQM,OAAOC,OAAOC,gBAAgBI,OAAM;;;KACpD,CAAA;IAAAX,gBAENX,SAAO,EAAA,CAAA;IAAAW,gBACPZ,gBAAc;KAAA,UAAA;KAAA,SAAA;KAGbe,MAAI;KAAA,IACJC,cAAW;AAAA,aAAEnB,IAAI;;mBAENO,UAAUO,QAAQM,OAAOF,KAAK,CAAA;;;KACpC,CAAA;IAAAH,gBAENX,SAAO,EAAA,CAAA;IAAAW,gBACPd,MAAI;KAAA,IAAC0B,OAAI;AAAA,aAAEC,QAAQjB,SAAS;;KAAGA;KAAQ,CAAA;IAAA;;EAAA,CAAA,CAAA"}
|