@powerlines/plugin-prisma 0.1.46 → 0.2.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/get-schema-CDmjvXFp.mjs +1 -0
- package/dist/get-schema-Cl2ZL_13.cjs +1 -0
- package/dist/helpers/get-schema.cjs +1 -7
- package/dist/helpers/get-schema.mjs +1 -0
- package/dist/helpers/index.cjs +1 -1
- package/dist/helpers/index.mjs +1 -0
- package/dist/helpers/prisma-postgres.cjs +1 -0
- package/dist/helpers/prisma-postgres.mjs +1 -0
- package/dist/helpers/schema-creator.cjs +1 -20
- package/dist/helpers/schema-creator.mjs +1 -0
- package/dist/index.cjs +4 -6
- package/dist/index.mjs +5 -0
- package/dist/plugin-Gb47Xzf6.mjs +1 -0
- package/dist/prisma-DZZX76mL.mjs +1 -0
- package/dist/prisma-postgres-Bf58erSt.mjs +1 -0
- package/dist/prisma-postgres-a3HnYRL2.cjs +1 -0
- package/dist/schema-creator-CqrBtaPh.mjs +14 -0
- package/dist/schema-creator-D6UwvhxO.cjs +14 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.mjs +1 -0
- package/dist/types/plugin.cjs +1 -1
- package/dist/types/plugin.mjs +1 -0
- package/dist/types/prisma.cjs +1 -1
- package/dist/types/prisma.mjs +1 -0
- package/dist/types-CwXe_Ycf.mjs +1 -0
- package/dist/types-a8gm_IaQ.cjs +0 -0
- package/package.json +53 -34
- package/dist/chunk-FBBMZ4NC.cjs +0 -7
- package/dist/chunk-UCUR73HG.js +0 -7
- package/dist/helpers/get-schema.d.cts +0 -11
- package/dist/helpers/get-schema.d.ts +0 -11
- package/dist/helpers/get-schema.js +0 -7
- package/dist/helpers/index.d.cts +0 -22
- package/dist/helpers/index.d.ts +0 -22
- package/dist/helpers/index.js +0 -1
- package/dist/helpers/schema-creator.d.cts +0 -21
- package/dist/helpers/schema-creator.d.ts +0 -21
- package/dist/helpers/schema-creator.js +0 -20
- package/dist/index-B-z3Jwl2.d.cts +0 -1548
- package/dist/index-lx02iWd5.d.ts +0 -1548
- package/dist/index.d.cts +0 -32
- package/dist/index.d.ts +0 -32
- package/dist/index.js +0 -7
- package/dist/types/index.d.cts +0 -21
- package/dist/types/index.d.ts +0 -21
- package/dist/types/index.js +0 -1
- package/dist/types/plugin.d.cts +0 -21
- package/dist/types/plugin.d.ts +0 -21
- package/dist/types/prisma.d.cts +0 -84
- package/dist/types/prisma.d.ts +0 -84
- /package/dist/{types/plugin.js → plugin-pBKbb5K9.cjs} +0 -0
- /package/dist/{types/prisma.js → prisma-D3KrwikQ.cjs} +0 -0
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {a}from'../chunk-UCUR73HG.js';import {SchemaCreator}from'prisma-util/schema-creator';/*****************************************
|
|
2
|
-
*
|
|
3
|
-
* ⚡ Built by Storm Software
|
|
4
|
-
*
|
|
5
|
-
*****************************************/
|
|
6
|
-
|
|
7
|
-
class P extends SchemaCreator{static{a(this,"PrismaSchemaCreator");}#e;get generators(){return this.#e.prisma.schema.generators}set generators(r){this.#e.prisma.schema.generators=r;}constructor(r){super(),this.#e=r,this.#e.prisma??={},this.#e.prisma.schema??={generators:[],datasources:[],warnings:[]},this.#e.prisma.schema.generators.forEach(e=>{this.pushGenerator(e);});}pushGenerator(r){return this.generators.some(e=>e.name===r.name)?this.generators=[...this.generators.filter(e=>e.name!==r.name),r]:this.generators.push(r),this}build(){let r=super.build();for(const e of this.generators)r=`
|
|
8
|
-
generator ${e.name} {
|
|
9
|
-
provider = "${e.provider.value}"
|
|
10
|
-
output = "${e.output?.value}"${e.previewFeatures&&e.previewFeatures.length>0?`
|
|
11
|
-
previewFeatures = [${e.previewFeatures.map(t=>`"${t}"`).join(", ")}]`:""}${e.config&&Object.keys(e.config).length>0?Object.entries(e.config).map(([t,a])=>Array.isArray(a)?`${t} = [${a.map(i=>`"${i}"`).join(", ")}]`:`${t} = "${a}"`).join(`
|
|
12
|
-
`):""}${e.binaryTargets&&e.binaryTargets.length>0?`
|
|
13
|
-
binaryTargets = [${e.binaryTargets.map(t=>`"${t.value}"`).join(", ")}]`:""}${e.envPaths?.rootEnvPath||e.envPaths?.schemaEnvPath?`
|
|
14
|
-
env = {${e.envPaths?.rootEnvPath?`
|
|
15
|
-
root = "${e.envPaths.rootEnvPath}"`:""}${e.envPaths?.schemaEnvPath?`
|
|
16
|
-
schema = "${e.envPaths.schemaEnvPath}"`:""}
|
|
17
|
-
}`:""}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
${r}`;return r}async write(){await this.#e.fs.write(this.#e.config.prisma.schema,this.build());}}export{P as PrismaSchemaCreator};
|