@powerlines/plugin-prisma 0.4.13 → 0.4.15
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 +1 -2
- package/dist/api/client/utils.gen.mjs +1 -2
- package/dist/api/client.gen.mjs +1 -2
- package/dist/api/core/auth.gen.mjs +1 -2
- package/dist/api/core/bodySerializer.gen.mjs +1 -2
- package/dist/api/core/params.gen.mjs +1 -2
- package/dist/api/core/pathSerializer.gen.mjs +1 -2
- package/dist/api/core/queryKeySerializer.gen.mjs +1 -2
- package/dist/api/core/serverSentEvents.gen.mjs +1 -2
- package/dist/api/core/utils.gen.mjs +1 -2
- package/dist/api/sdk.gen.mjs +1 -2
- package/dist/helpers/get-schema.mjs +1 -2
- package/dist/helpers/prisma-postgres.mjs +1 -2
- package/dist/helpers/schema-creator.mjs +1 -2
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +3 -4
- package/dist/node_modules/.pnpm/{@stryke_string-format@0.17.1 → @stryke_string-format@0.17.3}/node_modules/@stryke/string-format/dist/constant-case.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_string-format@0.17.1 → @stryke_string-format@0.17.3}/node_modules/@stryke/string-format/dist/constant-case.mjs +2 -3
- package/dist/node_modules/.pnpm/{@stryke_string-format@0.17.1 → @stryke_string-format@0.17.3}/node_modules/@stryke/string-format/dist/get-words.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_string-format@0.17.1 → @stryke_string-format@0.17.3}/node_modules/@stryke/string-format/dist/get-words.mjs +2 -3
- package/dist/node_modules/.pnpm/{@stryke_string-format@0.17.1 → @stryke_string-format@0.17.3}/node_modules/@stryke/string-format/dist/kebab-case.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_string-format@0.17.1 → @stryke_string-format@0.17.3}/node_modules/@stryke/string-format/dist/kebab-case.mjs +2 -3
- package/dist/node_modules/.pnpm/{@stryke_string-format@0.17.1 → @stryke_string-format@0.17.3}/node_modules/@stryke/string-format/dist/snake-case.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_string-format@0.17.1 → @stryke_string-format@0.17.3}/node_modules/@stryke/string-format/dist/snake-case.mjs +2 -3
- package/package.json +11 -11
- package/dist/api/client/client.gen.d.cts +0 -7
- package/dist/api/client/client.gen.d.cts.map +0 -1
- package/dist/api/client/client.gen.d.mts +0 -7
- package/dist/api/client/client.gen.d.mts.map +0 -1
- package/dist/api/client/client.gen.mjs.map +0 -1
- package/dist/api/client/index.d.cts +0 -8
- package/dist/api/client/index.d.mts +0 -8
- package/dist/api/client/types.gen.d.cts +0 -131
- package/dist/api/client/types.gen.d.cts.map +0 -1
- package/dist/api/client/types.gen.d.mts +0 -131
- package/dist/api/client/types.gen.d.mts.map +0 -1
- package/dist/api/client/utils.gen.d.cts +0 -44
- package/dist/api/client/utils.gen.d.cts.map +0 -1
- package/dist/api/client/utils.gen.d.mts +0 -44
- package/dist/api/client/utils.gen.d.mts.map +0 -1
- package/dist/api/client/utils.gen.mjs.map +0 -1
- package/dist/api/client.gen.d.cts +0 -19
- package/dist/api/client.gen.d.cts.map +0 -1
- package/dist/api/client.gen.d.mts +0 -19
- package/dist/api/client.gen.d.mts.map +0 -1
- package/dist/api/client.gen.mjs.map +0 -1
- package/dist/api/core/auth.gen.d.cts +0 -24
- package/dist/api/core/auth.gen.d.cts.map +0 -1
- package/dist/api/core/auth.gen.d.mts +0 -24
- package/dist/api/core/auth.gen.d.mts.map +0 -1
- package/dist/api/core/auth.gen.mjs.map +0 -1
- package/dist/api/core/bodySerializer.gen.d.cts +0 -32
- package/dist/api/core/bodySerializer.gen.d.cts.map +0 -1
- package/dist/api/core/bodySerializer.gen.d.mts +0 -32
- package/dist/api/core/bodySerializer.gen.d.mts.map +0 -1
- package/dist/api/core/bodySerializer.gen.mjs.map +0 -1
- package/dist/api/core/params.gen.d.cts +0 -49
- package/dist/api/core/params.gen.d.cts.map +0 -1
- package/dist/api/core/params.gen.d.mts +0 -49
- package/dist/api/core/params.gen.d.mts.map +0 -1
- package/dist/api/core/params.gen.mjs.map +0 -1
- package/dist/api/core/pathSerializer.gen.d.cts +0 -56
- package/dist/api/core/pathSerializer.gen.d.cts.map +0 -1
- package/dist/api/core/pathSerializer.gen.d.mts +0 -56
- package/dist/api/core/pathSerializer.gen.d.mts.map +0 -1
- package/dist/api/core/pathSerializer.gen.mjs.map +0 -1
- package/dist/api/core/queryKeySerializer.gen.d.cts +0 -23
- package/dist/api/core/queryKeySerializer.gen.d.cts.map +0 -1
- package/dist/api/core/queryKeySerializer.gen.d.mts +0 -23
- package/dist/api/core/queryKeySerializer.gen.d.mts.map +0 -1
- package/dist/api/core/queryKeySerializer.gen.mjs.map +0 -1
- package/dist/api/core/serverSentEvents.gen.d.cts +0 -91
- package/dist/api/core/serverSentEvents.gen.d.cts.map +0 -1
- package/dist/api/core/serverSentEvents.gen.d.mts +0 -91
- package/dist/api/core/serverSentEvents.gen.d.mts.map +0 -1
- package/dist/api/core/serverSentEvents.gen.mjs.map +0 -1
- package/dist/api/core/types.gen.d.cts +0 -80
- package/dist/api/core/types.gen.d.cts.map +0 -1
- package/dist/api/core/types.gen.d.mts +0 -80
- package/dist/api/core/types.gen.d.mts.map +0 -1
- package/dist/api/core/utils.gen.d.cts +0 -34
- package/dist/api/core/utils.gen.d.cts.map +0 -1
- package/dist/api/core/utils.gen.d.mts +0 -34
- package/dist/api/core/utils.gen.d.mts.map +0 -1
- package/dist/api/core/utils.gen.mjs.map +0 -1
- package/dist/api/sdk.gen.d.cts +0 -226
- package/dist/api/sdk.gen.d.cts.map +0 -1
- package/dist/api/sdk.gen.d.mts +0 -226
- package/dist/api/sdk.gen.d.mts.map +0 -1
- package/dist/api/sdk.gen.mjs.map +0 -1
- package/dist/api/types.gen.d.cts +0 -2369
- package/dist/api/types.gen.d.cts.map +0 -1
- package/dist/api/types.gen.d.mts +0 -2369
- package/dist/api/types.gen.d.mts.map +0 -1
- package/dist/helpers/get-schema.d.cts +0 -14
- package/dist/helpers/get-schema.d.cts.map +0 -1
- package/dist/helpers/get-schema.d.mts +0 -14
- package/dist/helpers/get-schema.d.mts.map +0 -1
- package/dist/helpers/get-schema.mjs.map +0 -1
- package/dist/helpers/index.d.cts +0 -4
- package/dist/helpers/index.d.mts +0 -4
- package/dist/helpers/prisma-postgres.d.cts +0 -15
- package/dist/helpers/prisma-postgres.d.cts.map +0 -1
- package/dist/helpers/prisma-postgres.d.mts +0 -15
- package/dist/helpers/prisma-postgres.d.mts.map +0 -1
- package/dist/helpers/prisma-postgres.mjs.map +0 -1
- package/dist/helpers/schema-creator.d.cts +0 -21
- package/dist/helpers/schema-creator.d.cts.map +0 -1
- package/dist/helpers/schema-creator.d.mts +0 -21
- package/dist/helpers/schema-creator.d.mts.map +0 -1
- package/dist/helpers/schema-creator.mjs.map +0 -1
- package/dist/index.d.cts +0 -21
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts +0 -21
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.1/node_modules/@stryke/string-format/dist/constant-case.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.1/node_modules/@stryke/string-format/dist/get-words.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.1/node_modules/@stryke/string-format/dist/kebab-case.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.1/node_modules/@stryke/string-format/dist/snake-case.mjs.map +0 -1
- package/dist/types/index.d.cts +0 -3
- package/dist/types/index.d.mts +0 -3
- package/dist/types/plugin.d.cts +0 -93
- package/dist/types/plugin.d.cts.map +0 -1
- package/dist/types/plugin.d.mts +0 -93
- package/dist/types/plugin.d.mts.map +0 -1
- package/dist/types/prisma.d.cts +0 -85
- package/dist/types/prisma.d.cts.map +0 -1
- package/dist/types/prisma.d.mts +0 -85
- package/dist/types/prisma.d.mts.map +0 -1
|
@@ -1 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;;;UAKE;;;;;;;;;;;;;;;;;;;KAoBF,sBAAA,GAAyB,8BAA8B;KAEvD,gBAAA;;;;;;;;KASA,kBAAA;;;;;;;;;;;;;;;;;;;;;;KAuBA,iBAAA,GAAoB,yBAAyB;KAE7C,qBAAA;;;;;;;;;;;;;;KAeA,oBAAA,GAAuB,4BAA4B"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { GetSchemaOptions, PrismaSchema } from "../types/prisma.cjs";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/get-schema.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Retrieves the Prisma schema using the provided options.
|
|
7
|
-
*
|
|
8
|
-
* @param options - The options to customize the schema retrieval.
|
|
9
|
-
* @returns The Prisma schema.
|
|
10
|
-
*/
|
|
11
|
-
declare function getSchema(options: GetSchemaOptions): Promise<PrismaSchema>;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { getSchema };
|
|
14
|
-
//# sourceMappingURL=get-schema.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-schema.d.cts","names":[],"sources":["../../src/helpers/get-schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAuEA;;;;AAEU,iBAFY,SAAA,CAEZ,OAAA,EADC,gBACD,CAAA,EAAP,OAAO,CAAC,YAAD,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { GetSchemaOptions, PrismaSchema } from "../types/prisma.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/get-schema.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Retrieves the Prisma schema using the provided options.
|
|
7
|
-
*
|
|
8
|
-
* @param options - The options to customize the schema retrieval.
|
|
9
|
-
* @returns The Prisma schema.
|
|
10
|
-
*/
|
|
11
|
-
declare function getSchema(options: GetSchemaOptions): Promise<PrismaSchema>;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { getSchema };
|
|
14
|
-
//# sourceMappingURL=get-schema.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-schema.d.mts","names":[],"sources":["../../src/helpers/get-schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAuEA;;;;AAEU,iBAFY,SAAA,CAEZ,OAAA,EADC,gBACD,CAAA,EAAP,OAAO,CAAC,YAAD,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-schema.mjs","names":[],"sources":["../../src/helpers/get-schema.ts"],"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 { getBinaryTargetForCurrentPlatform } from \"@prisma/get-platform\";\nimport prismaSchemaWasm from \"@prisma/prisma-schema-wasm\";\nimport * as E from \"fp-ts/Either\";\nimport { pipe } from \"fp-ts/lib/function\";\nimport { match } from \"ts-pattern\";\nimport {\n GeneratorConfig,\n GetSchemaOptions,\n GetSchemaResponse,\n PrismaSchema\n} from \"../types/prisma\";\n\nasync function resolveBinaryTargets(generator: GeneratorConfig) {\n for (const binaryTarget of generator.binaryTargets) {\n // load the binaryTargets from the env var\n if (binaryTarget.fromEnvVar && process.env[binaryTarget.fromEnvVar]) {\n const value = JSON.parse(process.env[binaryTarget.fromEnvVar]!);\n\n if (Array.isArray(value)) {\n generator.binaryTargets = value.map(v => ({\n fromEnvVar: null,\n value: v\n }));\n await resolveBinaryTargets(generator); // resolve again if we have native\n } else {\n binaryTarget.value = value;\n }\n }\n\n // resolve native to the current platform\n if (binaryTarget.value === \"native\") {\n binaryTarget.value = await getBinaryTargetForCurrentPlatform();\n binaryTarget.native = true;\n }\n }\n\n if (generator.binaryTargets.length === 0) {\n generator.binaryTargets = [\n {\n fromEnvVar: null,\n value: await getBinaryTargetForCurrentPlatform(),\n native: true\n }\n ];\n }\n}\n\n/**\n * Retrieves the Prisma schema using the provided options.\n *\n * @param options - The options to customize the schema retrieval.\n * @returns The Prisma schema.\n */\nexport async function getSchema(\n options: GetSchemaOptions\n): Promise<PrismaSchema> {\n const configEither = pipe(\n E.tryCatch(\n () => {\n if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {\n prismaSchemaWasm.debug_panic();\n }\n\n const params = JSON.stringify({\n prismaSchema: options.datamodel,\n datasourceOverrides: {},\n ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,\n env: process.env\n });\n\n const data = prismaSchemaWasm.get_config(params);\n\n return data;\n },\n e => ({\n type: \"wasm-error\" as const,\n reason: \"(get-config wasm)\",\n error: e as Error\n })\n ),\n E.map(result => ({ result })),\n E.chainW(({ result }) =>\n // NOTE: this should never fail, as we expect returned values to be valid JSON-serializable strings\n E.tryCatch(\n () => JSON.parse(result) as GetSchemaResponse,\n e => ({\n type: \"parse-json\" as const,\n reason: \"Unable to parse JSON\",\n error: e as Error\n })\n )\n ),\n E.chainW(response => {\n if (response.errors.length > 0) {\n return E.left({\n type: \"validation-error\" as const,\n reason: \"(get-config wasm)\",\n error: response.errors\n });\n }\n return E.right(response.config);\n })\n );\n\n if (E.isRight(configEither)) {\n const { right: data } = configEither;\n\n for (const generator of data.generators) {\n await resolveBinaryTargets(generator);\n }\n\n return Promise.resolve(data);\n }\n\n throw match(configEither.left)\n .with({ type: \"wasm-error\" }, e => {\n return new Error(\n `Prisma get-config Wasm runtime error: ${e.error.message}`\n );\n })\n .with({ type: \"validation-error\" }, e => {\n return new Error(\n `Prisma get-config validation error: ${e.error\n .map(err => err.message)\n .join(\", \")}`\n );\n })\n .otherwise(e => {\n return new Error(\n `Prisma get-config unknown error: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AO,EAAE,MAAM,SAAS,OAAO;GAC/B,CACH;AAED,KAAI,EAAE,QAAQ,aAAa,EAAE;EAC3B,MAAM,EAAE,OAAO,SAAS;AAExB,OAAK,MAAM,aAAa,KAAK,WAC3B,OAAM,qBAAqB,UAAU;AAGvC,SAAO,QAAQ,QAAQ,KAAK;;AAG9B,OAAM,MAAM,aAAa,KAAK,CAC3B,KAAK,EAAE,MAAM,cAAc,GAAE,MAAK;AACjC,yBAAO,IAAI,MACT,yCAAyC,EAAE,MAAM,UAClD;GACD,CACD,KAAK,EAAE,MAAM,oBAAoB,GAAE,MAAK;AACvC,yBAAO,IAAI,MACT,uCAAuC,EAAE,MACtC,KAAI,QAAO,IAAI,QAAQ,CACvB,KAAK,KAAK,GACd;GACD,CACD,WAAU,MAAK;AACd,yBAAO,IAAI,MACT,oCAAoC,EAAE,OAAO,KAAK,EAAE,MAAM,UAC3D;GACD"}
|
package/dist/helpers/index.d.cts
DELETED
package/dist/helpers/index.d.mts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PrismaPluginContext } from "../types/plugin.cjs";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/prisma-postgres.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Find a Postgres database by name.
|
|
7
|
-
*
|
|
8
|
-
* @param context - The Prisma plugin context.
|
|
9
|
-
* @param name - The name of the database to find.
|
|
10
|
-
* @returns The database object if found, otherwise undefined.
|
|
11
|
-
*/
|
|
12
|
-
declare function findDatabaseByName(context: PrismaPluginContext, name: string): Promise<any>;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { findDatabaseByName };
|
|
15
|
-
//# sourceMappingURL=prisma-postgres.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prisma-postgres.d.cts","names":[],"sources":["../../src/helpers/prisma-postgres.ts"],"sourcesContent":[],"mappings":";;;;;;AA2BA;;;;;iBAAsB,kBAAA,UACX,oCACG"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PrismaPluginContext } from "../types/plugin.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/prisma-postgres.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Find a Postgres database by name.
|
|
7
|
-
*
|
|
8
|
-
* @param context - The Prisma plugin context.
|
|
9
|
-
* @param name - The name of the database to find.
|
|
10
|
-
* @returns The database object if found, otherwise undefined.
|
|
11
|
-
*/
|
|
12
|
-
declare function findDatabaseByName(context: PrismaPluginContext, name: string): Promise<any>;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { findDatabaseByName };
|
|
15
|
-
//# sourceMappingURL=prisma-postgres.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prisma-postgres.d.mts","names":[],"sources":["../../src/helpers/prisma-postgres.ts"],"sourcesContent":[],"mappings":";;;;;;AA2BA;;;;;iBAAsB,kBAAA,UACX,oCACG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prisma-postgres.mjs","names":[],"sources":["../../src/helpers/prisma-postgres.ts"],"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 { PrismaPluginContext } from \"../types/plugin\";\n\n/**\n * Find a Postgres database by name.\n *\n * @param context - The Prisma plugin context.\n * @param name - The name of the database to find.\n * @returns The database object if found, otherwise undefined.\n */\nexport async function findDatabaseByName(\n context: PrismaPluginContext,\n name: string\n) {\n if (!context.config.prisma.prismaPostgres?.projectId) {\n throw new Error(\n `Prisma Postgres project ID is not configured. Please set \"prisma.prismaPostgres.projectId\" in your Powerlines configuration.`\n );\n }\n\n const databases = await context.prisma.api.listDatabases({\n path: {\n projectId: context.config.prisma.prismaPostgres.projectId\n }\n });\n\n return databases.data.data.find(db => db.name === name);\n}\n"],"mappings":";;;;;;;;AA2BA,eAAsB,mBACpB,SACA,MACA;AACA,KAAI,CAAC,QAAQ,OAAO,OAAO,gBAAgB,UACzC,OAAM,IAAI,MACR,+HACD;AASH,SANkB,MAAM,QAAQ,OAAO,IAAI,cAAc,EACvD,MAAM,EACJ,WAAW,QAAQ,OAAO,OAAO,eAAe,WACjD,EACF,CAAC,EAEe,KAAK,KAAK,MAAK,OAAM,GAAG,SAAS,KAAK"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { GeneratorConfig } from "../types/prisma.cjs";
|
|
2
|
-
import { PrismaPluginContext } from "../types/plugin.cjs";
|
|
3
|
-
import { SchemaCreator } from "prisma-util/schema-creator";
|
|
4
|
-
|
|
5
|
-
//#region src/helpers/schema-creator.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Prisma schema creator that allows building a schema via code.
|
|
9
|
-
*/
|
|
10
|
-
declare class PrismaSchemaCreator extends SchemaCreator {
|
|
11
|
-
#private;
|
|
12
|
-
private get generators();
|
|
13
|
-
private set generators(value);
|
|
14
|
-
constructor(context: PrismaPluginContext);
|
|
15
|
-
pushGenerator(generator: GeneratorConfig): this;
|
|
16
|
-
build(): string;
|
|
17
|
-
write(): Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
export { PrismaSchemaCreator };
|
|
21
|
-
//# sourceMappingURL=schema-creator.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema-creator.d.cts","names":[],"sources":["../../src/helpers/schema-creator.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAyBA;AAY8B,cAZjB,mBAAA,SAA4B,aAAA,CAYX;EAgBI,CAAA,OAAA;EAuEV,YAAA,UAAA,CAAA;EAnGiB,YAAA,UAAA,CAAA,KAAA;EAAa,WAAA,CAAA,OAAA,EAYxB,mBAZwB;2BA4BpB;;WAuEV"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { GeneratorConfig } from "../types/prisma.mjs";
|
|
2
|
-
import { PrismaPluginContext } from "../types/plugin.mjs";
|
|
3
|
-
import { SchemaCreator } from "prisma-util/schema-creator";
|
|
4
|
-
|
|
5
|
-
//#region src/helpers/schema-creator.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Prisma schema creator that allows building a schema via code.
|
|
9
|
-
*/
|
|
10
|
-
declare class PrismaSchemaCreator extends SchemaCreator {
|
|
11
|
-
#private;
|
|
12
|
-
private get generators();
|
|
13
|
-
private set generators(value);
|
|
14
|
-
constructor(context: PrismaPluginContext);
|
|
15
|
-
pushGenerator(generator: GeneratorConfig): this;
|
|
16
|
-
build(): string;
|
|
17
|
-
write(): Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
export { PrismaSchemaCreator };
|
|
21
|
-
//# sourceMappingURL=schema-creator.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema-creator.d.mts","names":[],"sources":["../../src/helpers/schema-creator.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAyBA;AAY8B,cAZjB,mBAAA,SAA4B,aAAA,CAYX;EAgBI,CAAA,OAAA;EAuEV,YAAA,UAAA,CAAA;EAnGiB,YAAA,UAAA,CAAA,KAAA;EAAa,WAAA,CAAA,OAAA,EAYxB,mBAZwB;2BA4BpB;;WAuEV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema-creator.mjs","names":["#context"],"sources":["../../src/helpers/schema-creator.ts"],"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 { SchemaCreator } from \"prisma-util/schema-creator\";\nimport { PrismaPluginContext } from \"../types/plugin\";\nimport { GeneratorConfig } from \"../types/prisma\";\n\n/**\n * Prisma schema creator that allows building a schema via code.\n */\nexport class PrismaSchemaCreator extends SchemaCreator {\n /** Prisma plugin context */\n #context: PrismaPluginContext;\n\n private get generators(): GeneratorConfig[] {\n return this.#context.prisma.schema.generators;\n }\n\n private set generators(value: GeneratorConfig[]) {\n this.#context.prisma.schema.generators = value;\n }\n\n public constructor(context: PrismaPluginContext) {\n super();\n\n this.#context = context;\n this.#context.prisma ??= {} as PrismaPluginContext[\"prisma\"];\n this.#context.prisma.schema ??= {\n generators: [],\n datasources: [],\n warnings: []\n };\n\n this.#context.prisma.schema.generators.forEach(generator => {\n this.pushGenerator(generator);\n });\n }\n\n public pushGenerator(generator: GeneratorConfig): this {\n if (this.generators.some(gen => gen.name === generator.name)) {\n this.generators = [\n ...this.generators.filter(gen => gen.name !== generator.name),\n generator\n ];\n } else {\n this.generators.push(generator);\n }\n\n return this;\n }\n\n public override build(): string {\n let schema = super.build();\n\n for (const generator of this.generators) {\n schema = `\ngenerator ${generator.name} {\n provider = \"${generator.provider.value}\"\n output = \"${generator.output?.value}\"${\n generator.previewFeatures && generator.previewFeatures.length > 0\n ? `\n previewFeatures = [${generator.previewFeatures\n .map(feature => `\"${feature}\"`)\n .join(\", \")}]`\n : \"\"\n }${\n generator.config && Object.keys(generator.config).length > 0\n ? Object.entries(generator.config)\n .map(([key, value]) => {\n if (Array.isArray(value)) {\n return `${key} = [${value.map(v => `\"${v}\"`).join(\", \")}]`;\n } else {\n return `${key} = \"${value}\"`;\n }\n })\n .join(\"\\n \")\n : \"\"\n }${\n generator.binaryTargets && generator.binaryTargets.length > 0\n ? `\n binaryTargets = [${generator.binaryTargets\n .map(bt => `\"${bt.value}\"`)\n .join(\", \")}]`\n : \"\"\n }${\n generator.envPaths?.rootEnvPath || generator.envPaths?.schemaEnvPath\n ? `\n env = {${\n generator.envPaths?.rootEnvPath\n ? `\n root = \"${generator.envPaths.rootEnvPath}\"`\n : \"\"\n }${\n generator.envPaths?.schemaEnvPath\n ? `\n schema = \"${generator.envPaths.schemaEnvPath}\"`\n : \"\"\n }\n }`\n : \"\"\n }\n}\n\n${schema}`;\n }\n\n return schema;\n }\n\n public async write(): Promise<void> {\n await this.#context.fs.write(\n this.#context.config.prisma.schema,\n this.build()\n );\n }\n}\n"],"mappings":";;;;;;AAyBA,IAAa,sBAAb,cAAyC,cAAc;;CAErD;CAEA,IAAY,aAAgC;AAC1C,SAAO,MAAKA,QAAS,OAAO,OAAO;;CAGrC,IAAY,WAAW,OAA0B;AAC/C,QAAKA,QAAS,OAAO,OAAO,aAAa;;CAG3C,AAAO,YAAY,SAA8B;AAC/C,SAAO;AAEP,QAAKA,UAAW;AAChB,QAAKA,QAAS,WAAW,EAAE;AAC3B,QAAKA,QAAS,OAAO,WAAW;GAC9B,YAAY,EAAE;GACd,aAAa,EAAE;GACf,UAAU,EAAE;GACb;AAED,QAAKA,QAAS,OAAO,OAAO,WAAW,SAAQ,cAAa;AAC1D,QAAK,cAAc,UAAU;IAC7B;;CAGJ,AAAO,cAAc,WAAkC;AACrD,MAAI,KAAK,WAAW,MAAK,QAAO,IAAI,SAAS,UAAU,KAAK,CAC1D,MAAK,aAAa,CAChB,GAAG,KAAK,WAAW,QAAO,QAAO,IAAI,SAAS,UAAU,KAAK,EAC7D,UACD;MAED,MAAK,WAAW,KAAK,UAAU;AAGjC,SAAO;;CAGT,AAAgB,QAAgB;EAC9B,IAAI,SAAS,MAAM,OAAO;AAE1B,OAAK,MAAM,aAAa,KAAK,WAC3B,UAAS;YACH,UAAU,KAAK;gBACX,UAAU,SAAS,MAAM;cAC3B,UAAU,QAAQ,MAAM,GAClC,UAAU,mBAAmB,UAAU,gBAAgB,SAAS,IAC5D;uBACe,UAAU,gBAC5B,KAAI,YAAW,IAAI,QAAQ,GAAG,CAC9B,KAAK,KAAK,CAAC,KACR,KAEJ,UAAU,UAAU,OAAO,KAAK,UAAU,OAAO,CAAC,SAAS,IACvD,OAAO,QAAQ,UAAU,OAAO,CAC7B,KAAK,CAAC,KAAK,WAAW;AACrB,OAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,GAAG,IAAI,MAAM,MAAM,KAAI,MAAK,IAAI,EAAE,GAAG,CAAC,KAAK,KAAK,CAAC;OAExD,QAAO,GAAG,IAAI,MAAM,MAAM;IAE5B,CACD,KAAK,OAAO,GACf,KAEJ,UAAU,iBAAiB,UAAU,cAAc,SAAS,IACxD;qBACa,UAAU,cAC1B,KAAI,OAAM,IAAI,GAAG,MAAM,GAAG,CAC1B,KAAK,KAAK,CAAC,KACR,KAEJ,UAAU,UAAU,eAAe,UAAU,UAAU,gBACnD;WAEJ,UAAU,UAAU,cAChB;cACM,UAAU,SAAS,YAAY,KACrC,KAEJ,UAAU,UAAU,gBAChB;gBACQ,UAAU,SAAS,cAAc,KACzC,GACL;OAEK,GACL;;;EAGD;AAGE,SAAO;;CAGT,MAAa,QAAuB;AAClC,QAAM,MAAKA,QAAS,GAAG,MACrB,MAAKA,QAAS,OAAO,OAAO,QAC5B,KAAK,OAAO,CACb"}
|
package/dist/index.d.cts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ActiveConnectorType, BinaryTargetsEnvValue, ConnectorType, DataSource, EnvPaths, EnvValue, GeneratorConfig, GetSchemaOptions, GetSchemaResponse, MultipleSchemas, PrismaSchema, SchemaFileInput, __ΩActiveConnectorType, __ΩBinaryTargetsEnvValue, __ΩConnectorType, __ΩDataSource, __ΩEnvPaths, __ΩEnvValue, __ΩGeneratorConfig, __ΩGetSchemaOptions, __ΩGetSchemaResponse, __ΩMultipleSchemas, __ΩPrismaSchema, __ΩSchemaFileInput } from "./types/prisma.cjs";
|
|
2
|
-
import { PrismaPluginContext, PrismaPluginOptions, PrismaPluginResolvedConfig, PrismaPluginUserConfig, PrismaPostgresPrismaPluginOptions, __ΩPrismaPluginContext, __ΩPrismaPluginOptions, __ΩPrismaPluginResolvedConfig, __ΩPrismaPluginUserConfig, __ΩPrismaPostgresPrismaPluginOptions } from "./types/plugin.cjs";
|
|
3
|
-
import "./types/index.cjs";
|
|
4
|
-
import { Plugin } from "powerlines";
|
|
5
|
-
|
|
6
|
-
//#region src/index.d.ts
|
|
7
|
-
declare module "powerlines" {
|
|
8
|
-
interface Config {
|
|
9
|
-
prisma?: PrismaPluginOptions;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* A Powerlines plugin to integrate Prisma for code generation.
|
|
14
|
-
*
|
|
15
|
-
* @param options - The plugin options.
|
|
16
|
-
* @returns A Powerlines plugin instance.
|
|
17
|
-
*/
|
|
18
|
-
declare const plugin: <TContext extends PrismaPluginContext = PrismaPluginContext>(options?: PrismaPluginOptions) => Plugin<TContext>;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { ActiveConnectorType, BinaryTargetsEnvValue, ConnectorType, DataSource, EnvPaths, EnvValue, GeneratorConfig, GetSchemaOptions, GetSchemaResponse, MultipleSchemas, PrismaPluginContext, PrismaPluginOptions, PrismaPluginResolvedConfig, PrismaPluginUserConfig, PrismaPostgresPrismaPluginOptions, PrismaSchema, SchemaFileInput, __ΩActiveConnectorType, __ΩBinaryTargetsEnvValue, __ΩConnectorType, __ΩDataSource, __ΩEnvPaths, __ΩEnvValue, __ΩGeneratorConfig, __ΩGetSchemaOptions, __ΩGetSchemaResponse, __ΩMultipleSchemas, __ΩPrismaPluginContext, __ΩPrismaPluginOptions, __ΩPrismaPluginResolvedConfig, __ΩPrismaPluginUserConfig, __ΩPrismaPostgresPrismaPluginOptions, __ΩPrismaSchema, __ΩSchemaFileInput, plugin as default, plugin };
|
|
21
|
-
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;aAuCa;EAJgB;;;;;AAc7B;;;AAGW,cAHE,MAGF,EAAA,CAAA,iBAFQ,mBAER,GAF8B,mBAE9B,CAAA,CAAA,OAAA,CAAA,EAAA,mBAAA,EAAA,GACR,MADQ,CACD,QADC,CAAA"}
|
package/dist/index.d.mts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ActiveConnectorType, BinaryTargetsEnvValue, ConnectorType, DataSource, EnvPaths, EnvValue, GeneratorConfig, GetSchemaOptions, GetSchemaResponse, MultipleSchemas, PrismaSchema, SchemaFileInput, __ΩActiveConnectorType, __ΩBinaryTargetsEnvValue, __ΩConnectorType, __ΩDataSource, __ΩEnvPaths, __ΩEnvValue, __ΩGeneratorConfig, __ΩGetSchemaOptions, __ΩGetSchemaResponse, __ΩMultipleSchemas, __ΩPrismaSchema, __ΩSchemaFileInput } from "./types/prisma.mjs";
|
|
2
|
-
import { PrismaPluginContext, PrismaPluginOptions, PrismaPluginResolvedConfig, PrismaPluginUserConfig, PrismaPostgresPrismaPluginOptions, __ΩPrismaPluginContext, __ΩPrismaPluginOptions, __ΩPrismaPluginResolvedConfig, __ΩPrismaPluginUserConfig, __ΩPrismaPostgresPrismaPluginOptions } from "./types/plugin.mjs";
|
|
3
|
-
import "./types/index.mjs";
|
|
4
|
-
import { Plugin } from "powerlines";
|
|
5
|
-
|
|
6
|
-
//#region src/index.d.ts
|
|
7
|
-
declare module "powerlines" {
|
|
8
|
-
interface Config {
|
|
9
|
-
prisma?: PrismaPluginOptions;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* A Powerlines plugin to integrate Prisma for code generation.
|
|
14
|
-
*
|
|
15
|
-
* @param options - The plugin options.
|
|
16
|
-
* @returns A Powerlines plugin instance.
|
|
17
|
-
*/
|
|
18
|
-
declare const plugin: <TContext extends PrismaPluginContext = PrismaPluginContext>(options?: PrismaPluginOptions) => Plugin<TContext>;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { ActiveConnectorType, BinaryTargetsEnvValue, ConnectorType, DataSource, EnvPaths, EnvValue, GeneratorConfig, GetSchemaOptions, GetSchemaResponse, MultipleSchemas, PrismaPluginContext, PrismaPluginOptions, PrismaPluginResolvedConfig, PrismaPluginUserConfig, PrismaPostgresPrismaPluginOptions, PrismaSchema, SchemaFileInput, __ΩActiveConnectorType, __ΩBinaryTargetsEnvValue, __ΩConnectorType, __ΩDataSource, __ΩEnvPaths, __ΩEnvValue, __ΩGeneratorConfig, __ΩGetSchemaOptions, __ΩGetSchemaResponse, __ΩMultipleSchemas, __ΩPrismaPluginContext, __ΩPrismaPluginOptions, __ΩPrismaPluginResolvedConfig, __ΩPrismaPluginUserConfig, __ΩPrismaPostgresPrismaPluginOptions, __ΩPrismaSchema, __ΩSchemaFileInput, plugin as default, plugin };
|
|
21
|
-
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;aAuCa;EAJgB;;;;;AAc7B;;;AAGW,cAHE,MAGF,EAAA,CAAA,iBAFQ,mBAER,GAF8B,mBAE9B,CAAA,CAAA,OAAA,CAAA,EAAA,mBAAA,EAAA,GACR,MADQ,CACD,QADC,CAAA"}
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"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 * as prismaPostgres from \"@pulumi/prisma-postgres\";\nimport { execute, executePackage } from \"@stryke/cli/execute\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { constantCase } from \"@stryke/string-format/constant-case\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { getConfigPath, replacePathTokens } from \"powerlines/plugin-utils\";\nimport { getSchema } from \"./helpers/get-schema\";\nimport { PrismaSchemaCreator } from \"./helpers/schema-creator\";\nimport {\n PrismaPluginContext,\n PrismaPluginOptions,\n PrismaPluginUserConfig\n} from \"./types/plugin\";\n\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n prisma?: PrismaPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to integrate Prisma for code generation.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends PrismaPluginContext = PrismaPluginContext\n>(\n options: PrismaPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"prisma\",\n config() {\n return {\n prisma: defu(options, {\n schema: joinPaths(this.config.root, \"prisma\", \"schema.prisma\"),\n configFile:\n options.configFile || getConfigPath(this, \"prisma.config\"),\n outputPath: joinPaths(\"{builtinPath}\", \"prisma\"),\n prismaPostgres: options?.prismaPostgres\n ? {\n projectId: this.config.name,\n region: \"us-east-1\"\n }\n : undefined\n })\n } as Partial<PrismaPluginUserConfig>;\n },\n async configResolved() {\n this.dependencies[\"@prisma/ppg\"] = \"latest\";\n\n this.config.prisma.configFile = replacePathTokens(\n this,\n this.config.prisma.configFile\n );\n\n if (!this.config.prisma.schema) {\n throw new Error(\n `Prisma schema path is not defined. Please specify a valid path in the plugin configuration.`\n );\n }\n\n this.config.prisma.schema = replacePathTokens(\n this,\n this.config.prisma.schema\n );\n\n if (!this.config.prisma.outputPath) {\n throw new Error(\n `Prisma generated path is not defined. Please specify a valid path in the plugin configuration.`\n );\n }\n\n this.config.prisma.outputPath = replacePathTokens(\n this,\n this.config.prisma.outputPath\n );\n\n this.prisma ??= {} as TContext[\"prisma\"];\n if (!existsSync(this.config.prisma.schema)) {\n this.prisma.schema ??= {\n generators: [],\n datasources: [],\n warnings: []\n };\n } else {\n this.prisma.schema = await getSchema({\n datamodel: this.config.prisma.schema\n });\n }\n\n const generator = this.prisma.schema.generators.find(\n gen => gen.provider.value === \"prisma-client\"\n );\n if (!generator) {\n this.prisma.schema.generators.push({\n name: \"prisma-client\",\n provider: {\n value: \"prisma-client\",\n fromEnvVar: null\n },\n output: {\n value: this.config.prisma.outputPath,\n fromEnvVar: null\n },\n config: {},\n binaryTargets: [],\n previewFeatures: [],\n sourceFilePath: this.config.prisma.schema\n });\n } else {\n generator.output ??= {\n value: this.config.prisma.outputPath,\n fromEnvVar: null\n };\n }\n\n this.prisma.builder = new PrismaSchemaCreator(this);\n },\n async prepare() {\n // Write the schema file before invoking Prisma - Generate\n await this.prisma.builder.write();\n\n const args = [\"generate\", \"--schema\", this.config.prisma.schema];\n if (!this.config.prisma.prismaPath) {\n args.unshift(this.config.root);\n\n const result = await executePackage(\n \"prisma\",\n args,\n joinPaths(this.workspaceConfig.workspaceRoot, this.config.root)\n );\n if (result.failed) {\n throw new Error(\n `Prisma process exited with code ${result.exitCode}.`\n );\n }\n } else {\n args.unshift(this.config.prisma.prismaPath);\n\n const result = await execute(args.join(\" \"), this.config.root);\n if (result.failed) {\n throw new Error(\n `Prisma process exited with code ${result.exitCode}.`\n );\n }\n }\n },\n async deployPulumi() {\n if (this.config.prisma.prismaPostgres) {\n let serviceToken = process.env.PRISMA_SERVICE_TOKEN;\n if (!serviceToken) {\n serviceToken = options.serviceToken;\n if (serviceToken) {\n this.warn(\n \"If possible, please use the `PRISMA_SERVICE_TOKEN` environment variable instead of using the `serviceToken` option directly. The `serviceToken` option will work; however, this is a less secure method of configuration.\"\n );\n } else {\n throw new Error(\n \"Unable to determine the Prisma service token. Please set the `PRISMA_SERVICE_TOKEN` environment variable.\"\n );\n }\n }\n\n await this.pulumi.workspace.installPlugin(\n \"registry.terraform.io/prisma/prisma-postgres\",\n \"v0.2.0\"\n );\n\n const project = new prismaPostgres.Project(\"project\", {\n name: `${\n this.config.prisma.prismaPostgres?.projectId || this.config.name\n }`\n });\n const database = new prismaPostgres.Database(\"database\", {\n projectId: project.id,\n name: `${\n this.config.prisma.prismaPostgres?.databaseName ||\n `${kebabCase(this.config.name)}.${\n this.config.mode\n }.${this.config.prisma.prismaPostgres?.region}`\n }`,\n region: `${this.config.prisma.prismaPostgres?.region}`\n });\n\n return {\n project,\n database,\n connection: new prismaPostgres.Connection(\"connection\", {\n databaseId: database.id,\n name: `${constantCase(this.config.name)}_API_KEY`\n })\n };\n }\n\n return null;\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiDA,MAAa,UAGX,UAA+B,EAAE,KACZ;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO,EACL,QAAQ,KAAK,SAAS;IACpB,QAAQ,UAAU,KAAK,OAAO,MAAM,UAAU,gBAAgB;IAC9D,YACE,QAAQ,cAAc,cAAc,MAAM,gBAAgB;IAC5D,YAAY,UAAU,iBAAiB,SAAS;IAChD,gBAAgB,SAAS,iBACrB;KACE,WAAW,KAAK,OAAO;KACvB,QAAQ;KACT,GACD;IACL,CAAC,EACH;;EAEH,MAAM,iBAAiB;AACrB,QAAK,aAAa,iBAAiB;AAEnC,QAAK,OAAO,OAAO,aAAa,kBAC9B,MACA,KAAK,OAAO,O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,KAAK,CAChE;AACD,QAAI,OAAO,OACT,OAAM,IAAI,MACR,mCAAmC,OAAO,SAAS,GACpD;UAEE;AACL,SAAK,QAAQ,KAAK,OAAO,OAAO,WAAW;IAE3C,MAAM,SAAS,MAAM,QAAQ,KAAK,KAAK,IAAI,EAAE,KAAK,OAAO,KAAK;AAC9D,QAAI,OAAO,OACT,OAAM,IAAI,MACR,mCAAmC,OAAO,SAAS,GACpD;;;EAIP,MAAM,eAAe;AACnB,OAAI,KAAK,OAAO,OAAO,gBAAgB;IACrC,IAAI,eAAe,QAAQ,IAAI;AAC/B,QAAI,CAAC,cAAc;AACjB,oBAAe,QAAQ;AACvB,SAAI,aACF,MAAK,KACH,4NACD;SAED,OAAM,IAAI,MACR,4GACD;;AAIL,UAAM,KAAK,OAAO,UAAU,cAC1B,gDACA,SACD;IAED,MAAM,UAAU,IAAI,eAAe,QAAQ,WAAW,EACpD,MAAM,GACJ,KAAK,OAAO,OAAO,gBAAgB,aAAa,KAAK,OAAO,QAE/D,CAAC;IACF,MAAM,WAAW,IAAI,eAAe,SAAS,YAAY;KACvD,WAAW,QAAQ;KACnB,MAAM,GACJ,KAAK,OAAO,OAAO,gBAAgB,gBACnC,GAAG,UAAU,KAAK,OAAO,KAAK,CAAC,GAC7B,KAAK,OAAO,KACb,GAAG,KAAK,OAAO,OAAO,gBAAgB;KAEzC,QAAQ,GAAG,KAAK,OAAO,OAAO,gBAAgB;KAC/C,CAAC;AAEF,WAAO;KACL;KACA;KACA,YAAY,IAAI,eAAe,WAAW,cAAc;MACtD,YAAY,SAAS;MACrB,MAAM,GAAG,aAAa,KAAK,OAAO,KAAK,CAAC;MACzC,CAAC;KACH;;AAGH,UAAO;;EAEV;;AAGH,kBAAe"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constant-case.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+string-format@0.17.1/node_modules/@stryke/string-format/dist/constant-case.mjs"],"sourcesContent":["import { getWords } from \"./get-words.mjs\";\nimport { isSnakeCase } from \"./snake-case.mjs\";\n\n//#region src/constant-case.ts\n/**\n* Check if the input string is in constant case.\n*\n* @remarks\n* Constant case is defined as all uppercase letters with underscores separating words - \"THIS_IS_AN_EXAMPLE\".\n*\n* @param input - The input string to check.\n* @returns True if the input is in constant case, false otherwise.\n*/\nfunction isConstantCase(input) {\n\treturn input ? /^[A-Z0-9_]+$/.test(input) : false;\n}\n/**\n* Convert the input string to constant case.\n*\n* @remarks\n* Constant case is defined as all uppercase letters with underscores separating words - \"THIS_IS_AN_EXAMPLE\".\n*\n* @param input - The input string.\n* @returns The constant-cased string.\n*/\nfunction constantCase(input) {\n\treturn isConstantCase(input) || input === void 0 ? input : isSnakeCase(input) ? input.toUpperCase() : getWords(input).join(\"_\").toUpperCase();\n}\n\n//#endregion\nexport { constantCase, isConstantCase };\n//# sourceMappingURL=constant-case.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;AAaA,SAAS,eAAe,OAAO;AAC9B,QAAO,QAAQ,eAAe,KAAK,MAAM,GAAG;;;;;;;;;;;AAW7C,SAAS,aAAa,OAAO;AAC5B,QAAO,eAAe,MAAM,IAAI,UAAU,KAAK,IAAI,QAAQ,YAAY,MAAM,GAAG,MAAM,aAAa,GAAG,SAAS,MAAM,CAAC,KAAK,IAAI,CAAC,aAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-words.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+string-format@0.17.1/node_modules/@stryke/string-format/dist/get-words.mjs"],"sourcesContent":["//#region src/get-words.ts\n/**\n* Regular expression pattern to split strings into words for various case conversions\n*\n* This pattern matches sequences of characters in a string, considering the following case:\n* - Sequences of two or more uppercase letters followed by an uppercase letter and lowercase letters or digits (for acronyms)\n* - Sequences of one uppercase letter optionally followed by lowercase letters and digits\n* - Single uppercase letters\n* - Sequences of digits\n*\n* The resulting match can be used to convert camelCase, snake_case, kebab-case, and other mixed formats into\n* a consistent format like snake case.\n*\n* @example\n* const matches = 'camelCaseHTTPRequest'.match(CASE_SPLIT_PATTERN);\n* // matches: ['camel', 'Case', 'HTTP', 'Request']\n*/\nconst CASE_SPLIT_PATTERN = /[A-Z]?[a-z]+|\\d+|[A-Z]+(?![a-z])/g;\nconst RELAXED_SPLIT_PATTERN = /[A-Z/.-]?[a-z/.-]+|\\d+|[A-Z/.-]+(?![a-z/.-])/g;\n/**\n* Splits a string into words using a regular expression pattern\n*\n* @example\n* const words = getWords('camelCaseHTTPRequest');\n* // words: ['camel', 'Case', 'HTTP', 'Request']\n*\n* @param str - The string to split into words\n* @param options - Options for splitting the string\n* @returns An array of words\n*/\nfunction getWords(str, options = {}) {\n\tif (str.length > 5e3) throw new Error(\"The regular expression parameter of `get-words` can't handle strings longer than 2000 characters\");\n\treturn [...str.match(options.split ?? (options.relaxed ? RELAXED_SPLIT_PATTERN : CASE_SPLIT_PATTERN)) ?? []];\n}\n\n//#endregion\nexport { CASE_SPLIT_PATTERN, RELAXED_SPLIT_PATTERN, getWords };\n//# sourceMappingURL=get-words.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;AAiBA,MAAM,qBAAqB;AAC3B,MAAM,wBAAwB;;;;;;;;;;;;AAY9B,SAAS,SAAS,KAAK,UAAU,EAAE,EAAE;AACpC,KAAI,IAAI,SAAS,IAAK,OAAM,IAAI,MAAM,mGAAmG;AACzI,QAAO,CAAC,GAAG,IAAI,MAAM,QAAQ,UAAU,QAAQ,UAAU,wBAAwB,oBAAoB,IAAI,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kebab-case.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+string-format@0.17.1/node_modules/@stryke/string-format/dist/kebab-case.mjs"],"sourcesContent":["import { getWords } from \"./get-words.mjs\";\n\n//#region src/kebab-case.ts\n/**\n* Check if the input string is in kebab case.\n*\n* @remarks\n* Kebab case is defined as all lowercase letters with hyphens separating words - \"this-is-an-example\".\n*\n* @param input - The input string to check.\n* @returns True if the input is in kebab case, false otherwise.\n*/\nfunction isKebabCase(input) {\n\treturn input ? /^[a-z]+(?:-[a-z0-9]+)*$/.test(input) : false;\n}\n/**\n* Convert the input string to kebab case.\n*\n* @remarks\n* Kebab case is defined as all lowercase letters with hyphens separating words - \"this-is-an-example\".\n*\n* @param input - The input string.\n* @returns The kebab-cased string.\n*/\nfunction kebabCase(input) {\n\tif (isKebabCase(input) || input === void 0) return input;\n\tconst parts = input ? getWords(input) : [];\n\tif (parts.length === 0) return \"\";\n\treturn parts.join(\"-\").toLowerCase();\n}\n\n//#endregion\nexport { isKebabCase, kebabCase };\n//# sourceMappingURL=kebab-case.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;AAYA,SAAS,YAAY,OAAO;AAC3B,QAAO,QAAQ,0BAA0B,KAAK,MAAM,GAAG;;;;;;;;;;;AAWxD,SAAS,UAAU,OAAO;AACzB,KAAI,YAAY,MAAM,IAAI,UAAU,KAAK,EAAG,QAAO;CACnD,MAAM,QAAQ,QAAQ,SAAS,MAAM,GAAG,EAAE;AAC1C,KAAI,MAAM,WAAW,EAAG,QAAO;AAC/B,QAAO,MAAM,KAAK,IAAI,CAAC,aAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snake-case.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+string-format@0.17.1/node_modules/@stryke/string-format/dist/snake-case.mjs"],"sourcesContent":["import { EMPTY_STRING } from \"./types/src/base.mjs\";\nimport { upperCaseFirst } from \"./upper-case-first.mjs\";\nimport { isConstantCase } from \"./constant-case.mjs\";\n\n//#region src/snake-case.ts\n/**\n* Check if the input string is in snake case.\n*\n* @remarks\n* Snake case is defined as all lowercase letters with underscores separating words - \"this_is_an_example\"\n*\n* @param input - The input string to check.\n* @returns True if the input is in snake case, false otherwise.\n*/\nfunction isSnakeCase(input) {\n\treturn input ? /^[a-z]+(?:_[a-z0-9]+)*$/.test(input) : false;\n}\n/**\n* Convert the input string to snake case.\n*\n* @remarks\n* Snake case is defined as all lowercase letters with underscores separating words - \"this_is_an_example\"\n*\n* @param input - The input string.\n* @param options - Options to control the behavior of the function.\n* @returns The snake-cased string.\n*/\nfunction snakeCase(input, options) {\n\tif (isSnakeCase(input) || input === void 0) return input;\n\tif (isConstantCase(input)) return input.toLowerCase();\n\tconst parts = input?.replace(/[A-Z]+/g, (input$1) => upperCaseFirst(input$1) ?? EMPTY_STRING).split(/(?=[A-Z])|[\\s._-]/).map((x) => x.toLowerCase()) ?? [];\n\tif (parts.length === 0) return \"\";\n\tif (parts.length === 1) return parts[0];\n\tconst result = parts.reduce((ret, part) => {\n\t\treturn `${ret}_${part.toLowerCase()}`;\n\t});\n\treturn options?.splitOnNumber === false ? result : result.replace(/[A-Z]\\d/i, (val) => `${val[0]}_${val[1]}`);\n}\n\n//#endregion\nexport { isSnakeCase, snakeCase };\n//# sourceMappingURL=snake-case.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;AAcA,SAAS,YAAY,OAAO;AAC3B,QAAO,QAAQ,0BAA0B,KAAK,MAAM,GAAG"}
|
package/dist/types/index.d.cts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ActiveConnectorType, BinaryTargetsEnvValue, ConnectorType, DataSource, EnvPaths, EnvValue, GeneratorConfig, GetSchemaOptions, GetSchemaResponse, MultipleSchemas, PrismaSchema, SchemaFileInput, __ΩActiveConnectorType, __ΩBinaryTargetsEnvValue, __ΩConnectorType, __ΩDataSource, __ΩEnvPaths, __ΩEnvValue, __ΩGeneratorConfig, __ΩGetSchemaOptions, __ΩGetSchemaResponse, __ΩMultipleSchemas, __ΩPrismaSchema, __ΩSchemaFileInput } from "./prisma.cjs";
|
|
2
|
-
import { PrismaPluginContext, PrismaPluginOptions, PrismaPluginResolvedConfig, PrismaPluginUserConfig, PrismaPostgresPrismaPluginOptions, __ΩPrismaPluginContext, __ΩPrismaPluginOptions, __ΩPrismaPluginResolvedConfig, __ΩPrismaPluginUserConfig, __ΩPrismaPostgresPrismaPluginOptions } from "./plugin.cjs";
|
|
3
|
-
export { ActiveConnectorType, BinaryTargetsEnvValue, ConnectorType, DataSource, EnvPaths, EnvValue, GeneratorConfig, GetSchemaOptions, GetSchemaResponse, MultipleSchemas, PrismaPluginContext, PrismaPluginOptions, PrismaPluginResolvedConfig, PrismaPluginUserConfig, PrismaPostgresPrismaPluginOptions, PrismaSchema, SchemaFileInput, __ΩActiveConnectorType, __ΩBinaryTargetsEnvValue, __ΩConnectorType, __ΩDataSource, __ΩEnvPaths, __ΩEnvValue, __ΩGeneratorConfig, __ΩGetSchemaOptions, __ΩGetSchemaResponse, __ΩMultipleSchemas, __ΩPrismaPluginContext, __ΩPrismaPluginOptions, __ΩPrismaPluginResolvedConfig, __ΩPrismaPluginUserConfig, __ΩPrismaPostgresPrismaPluginOptions, __ΩPrismaSchema, __ΩSchemaFileInput };
|
package/dist/types/index.d.mts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ActiveConnectorType, BinaryTargetsEnvValue, ConnectorType, DataSource, EnvPaths, EnvValue, GeneratorConfig, GetSchemaOptions, GetSchemaResponse, MultipleSchemas, PrismaSchema, SchemaFileInput, __ΩActiveConnectorType, __ΩBinaryTargetsEnvValue, __ΩConnectorType, __ΩDataSource, __ΩEnvPaths, __ΩEnvValue, __ΩGeneratorConfig, __ΩGetSchemaOptions, __ΩGetSchemaResponse, __ΩMultipleSchemas, __ΩPrismaSchema, __ΩSchemaFileInput } from "./prisma.mjs";
|
|
2
|
-
import { PrismaPluginContext, PrismaPluginOptions, PrismaPluginResolvedConfig, PrismaPluginUserConfig, PrismaPostgresPrismaPluginOptions, __ΩPrismaPluginContext, __ΩPrismaPluginOptions, __ΩPrismaPluginResolvedConfig, __ΩPrismaPluginUserConfig, __ΩPrismaPostgresPrismaPluginOptions } from "./plugin.mjs";
|
|
3
|
-
export { ActiveConnectorType, BinaryTargetsEnvValue, ConnectorType, DataSource, EnvPaths, EnvValue, GeneratorConfig, GetSchemaOptions, GetSchemaResponse, MultipleSchemas, PrismaPluginContext, PrismaPluginOptions, PrismaPluginResolvedConfig, PrismaPluginUserConfig, PrismaPostgresPrismaPluginOptions, PrismaSchema, SchemaFileInput, __ΩActiveConnectorType, __ΩBinaryTargetsEnvValue, __ΩConnectorType, __ΩDataSource, __ΩEnvPaths, __ΩEnvValue, __ΩGeneratorConfig, __ΩGetSchemaOptions, __ΩGetSchemaResponse, __ΩMultipleSchemas, __ΩPrismaPluginContext, __ΩPrismaPluginOptions, __ΩPrismaPluginResolvedConfig, __ΩPrismaPluginUserConfig, __ΩPrismaPostgresPrismaPluginOptions, __ΩPrismaSchema, __ΩSchemaFileInput };
|
package/dist/types/plugin.d.cts
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { PrismaSchema } from "./prisma.cjs";
|
|
2
|
-
import { PrismaSchemaCreator } from "../helpers/schema-creator.cjs";
|
|
3
|
-
import { PulumiPluginContext, PulumiPluginResolvedConfig, PulumiPluginUserConfig } from "@powerlines/plugin-pulumi";
|
|
4
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
5
|
-
|
|
6
|
-
//#region src/types/plugin.d.ts
|
|
7
|
-
interface PrismaPostgresPrismaPluginOptions {
|
|
8
|
-
/**
|
|
9
|
-
* The Prisma project name
|
|
10
|
-
*
|
|
11
|
-
* @defaultValue "\{name\}"
|
|
12
|
-
*/
|
|
13
|
-
projectId?: string;
|
|
14
|
-
/**
|
|
15
|
-
* The region to deploy the database to
|
|
16
|
-
*
|
|
17
|
-
* @defaultValue "us-east-1"
|
|
18
|
-
*/
|
|
19
|
-
region?: "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "af-south-1" | "ap-east-1" | "ap-south-1" | "ap-south-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-southeast-3" | "ap-southeast-4" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ca-central-1" | "ca-west-1" | "eu-central-1" | "eu-central-2" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "eu-south-1" | "eu-south-2" | "il-central-1" | "me-south-1" | "me-central-1" | "sa-east-1";
|
|
20
|
-
/**
|
|
21
|
-
* The database name
|
|
22
|
-
*
|
|
23
|
-
* @defaultValue "\{region\}.\{mode\}.\{name\}"
|
|
24
|
-
*/
|
|
25
|
-
databaseName?: string;
|
|
26
|
-
}
|
|
27
|
-
interface PrismaPluginOptions {
|
|
28
|
-
/**
|
|
29
|
-
* The path to the Prisma schema file (PSL).
|
|
30
|
-
*
|
|
31
|
-
* @defaultValue "\{projectRoot\}/prisma/schema.prisma"
|
|
32
|
-
*/
|
|
33
|
-
schema?: string;
|
|
34
|
-
/**
|
|
35
|
-
* The path to a custom Prisma configuration file.
|
|
36
|
-
*
|
|
37
|
-
* @remarks
|
|
38
|
-
* This field allows the use of the "\{projectRoot\}" token to refer to the project's root directory - the value will be replaced with the correct file path by the plugin.
|
|
39
|
-
*
|
|
40
|
-
* @defaultValue "\{projectRoot\}/prisma.config.ts"
|
|
41
|
-
*/
|
|
42
|
-
configFile?: string;
|
|
43
|
-
/**
|
|
44
|
-
* The path to the output file generated by the plugin.
|
|
45
|
-
*
|
|
46
|
-
* @remarks
|
|
47
|
-
* If using the default value, the file can be imported from "powerlines:prisma/module-name". This field allows the use of the "\{builtinPath\}" token to refer to the built-in Powerlines plugins directory - the value will be replaced with the correct file path by the plugin.
|
|
48
|
-
*
|
|
49
|
-
* @defaultValue "\{builtinPath\}/prisma"
|
|
50
|
-
*/
|
|
51
|
-
outputPath?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Additional parameters to pass to the Prisma CLI
|
|
54
|
-
*/
|
|
55
|
-
params?: string;
|
|
56
|
-
/**
|
|
57
|
-
* The path to the generated Prisma client. This is used by the plugin to import the client for type generation and other operations.
|
|
58
|
-
*
|
|
59
|
-
* @remarks
|
|
60
|
-
* If not specified, the plugin will attempt to resolve the Prisma client path based on the output path and the schema file name. This field allows you to explicitly specify the path to the generated Prisma client if it cannot be automatically resolved.
|
|
61
|
-
*/
|
|
62
|
-
prismaPath?: string;
|
|
63
|
-
/**
|
|
64
|
-
* The service token to use for the Prisma API
|
|
65
|
-
*/
|
|
66
|
-
serviceToken?: string;
|
|
67
|
-
/**
|
|
68
|
-
* Configuration parameters to manage a Prisma Postgres database
|
|
69
|
-
*/
|
|
70
|
-
prismaPostgres?: PrismaPostgresPrismaPluginOptions | true;
|
|
71
|
-
}
|
|
72
|
-
type PrismaPluginUserConfig = UserConfig & PulumiPluginUserConfig & {
|
|
73
|
-
prisma?: Omit<PrismaPluginOptions, "schema" | "outputPath" | "configFile"> & Required<Pick<PrismaPluginOptions, "schema" | "outputPath" | "configFile">>;
|
|
74
|
-
};
|
|
75
|
-
type PrismaPluginResolvedConfig = ResolvedConfig & PulumiPluginResolvedConfig & {
|
|
76
|
-
prisma: Omit<PrismaPluginOptions, "schema" | "outputPath" | "configFile" | "prismaPostgres"> & Required<Pick<PrismaPluginOptions, "schema" | "outputPath" | "configFile">> & {
|
|
77
|
-
prismaPostgres?: Required<PrismaPostgresPrismaPluginOptions>;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
type PrismaPluginContext<TResolvedConfig extends PrismaPluginResolvedConfig = PrismaPluginResolvedConfig> = PluginContext<TResolvedConfig> & PulumiPluginContext & {
|
|
81
|
-
prisma: {
|
|
82
|
-
schema: PrismaSchema;
|
|
83
|
-
builder: PrismaSchemaCreator;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
declare type __ΩPrismaPostgresPrismaPluginOptions = any[];
|
|
87
|
-
declare type __ΩPrismaPluginOptions = any[];
|
|
88
|
-
declare type __ΩPrismaPluginUserConfig = any[];
|
|
89
|
-
declare type __ΩPrismaPluginResolvedConfig = any[];
|
|
90
|
-
declare type __ΩPrismaPluginContext = any[];
|
|
91
|
-
//#endregion
|
|
92
|
-
export { PrismaPluginContext, PrismaPluginOptions, PrismaPluginResolvedConfig, PrismaPluginUserConfig, PrismaPostgresPrismaPluginOptions, __ΩPrismaPluginContext, __ΩPrismaPluginOptions, __ΩPrismaPluginResolvedConfig, __ΩPrismaPluginUserConfig, __ΩPrismaPostgresPrismaPluginOptions };
|
|
93
|
-
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;UA2BiB,iCAAA;;AAAjB;AAoDA;AAoDA;;EACE,SAAA,CAAA,EAAA,MAAA;EACgB;;;;;EACJ,MAAA,CAAA,EAAA,WAAA,GAAA,WAAA,GAAA,WAAA,GAAA,WAAA,GAAA,YAAA,GAAA,WAAA,GAAA,YAAA,GAAA,YAAA,GAAA,gBAAA,GAAA,gBAAA,GAAA,gBAAA,GAAA,gBAAA,GAAA,gBAAA,GAAA,gBAAA,GAAA,gBAAA,GAAA,cAAA,GAAA,WAAA,GAAA,cAAA,GAAA,cAAA,GAAA,WAAA,GAAA,WAAA,GAAA,WAAA,GAAA,YAAA,GAAA,YAAA,GAAA,YAAA,GAAA,cAAA,GAAA,YAAA,GAAA,cAAA,GAAA,WAAA;EAKF;;;;;EAOC,YAAA,CAAA,EAAA,MAAA;;AADP,UAlEW,mBAAA,CAkEX;EAG4B;;;AAIlC;;EAEI,MAAA,CAAA,EAAA,MAAA;EACc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA3BC;;KAGP,sBAAA,GAAyB,aACnC;WACW,KAAK,+DACZ,SACE,KAAK;;KAID,0BAAA,GAA6B,iBACvC;UACU,KACN,kFAGA,SACE,KAAK;qBAEY,SAAS;;;KAItB,4CACc,6BACtB,8BACA,cAAc,mBAChB;;YAEY;aACC"}
|
package/dist/types/plugin.d.mts
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { PrismaSchema } from "./prisma.mjs";
|
|
2
|
-
import { PrismaSchemaCreator } from "../helpers/schema-creator.mjs";
|
|
3
|
-
import { PulumiPluginContext, PulumiPluginResolvedConfig, PulumiPluginUserConfig } from "@powerlines/plugin-pulumi";
|
|
4
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
5
|
-
|
|
6
|
-
//#region src/types/plugin.d.ts
|
|
7
|
-
interface PrismaPostgresPrismaPluginOptions {
|
|
8
|
-
/**
|
|
9
|
-
* The Prisma project name
|
|
10
|
-
*
|
|
11
|
-
* @defaultValue "\{name\}"
|
|
12
|
-
*/
|
|
13
|
-
projectId?: string;
|
|
14
|
-
/**
|
|
15
|
-
* The region to deploy the database to
|
|
16
|
-
*
|
|
17
|
-
* @defaultValue "us-east-1"
|
|
18
|
-
*/
|
|
19
|
-
region?: "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "af-south-1" | "ap-east-1" | "ap-south-1" | "ap-south-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-southeast-3" | "ap-southeast-4" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ca-central-1" | "ca-west-1" | "eu-central-1" | "eu-central-2" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "eu-south-1" | "eu-south-2" | "il-central-1" | "me-south-1" | "me-central-1" | "sa-east-1";
|
|
20
|
-
/**
|
|
21
|
-
* The database name
|
|
22
|
-
*
|
|
23
|
-
* @defaultValue "\{region\}.\{mode\}.\{name\}"
|
|
24
|
-
*/
|
|
25
|
-
databaseName?: string;
|
|
26
|
-
}
|
|
27
|
-
interface PrismaPluginOptions {
|
|
28
|
-
/**
|
|
29
|
-
* The path to the Prisma schema file (PSL).
|
|
30
|
-
*
|
|
31
|
-
* @defaultValue "\{projectRoot\}/prisma/schema.prisma"
|
|
32
|
-
*/
|
|
33
|
-
schema?: string;
|
|
34
|
-
/**
|
|
35
|
-
* The path to a custom Prisma configuration file.
|
|
36
|
-
*
|
|
37
|
-
* @remarks
|
|
38
|
-
* This field allows the use of the "\{projectRoot\}" token to refer to the project's root directory - the value will be replaced with the correct file path by the plugin.
|
|
39
|
-
*
|
|
40
|
-
* @defaultValue "\{projectRoot\}/prisma.config.ts"
|
|
41
|
-
*/
|
|
42
|
-
configFile?: string;
|
|
43
|
-
/**
|
|
44
|
-
* The path to the output file generated by the plugin.
|
|
45
|
-
*
|
|
46
|
-
* @remarks
|
|
47
|
-
* If using the default value, the file can be imported from "powerlines:prisma/module-name". This field allows the use of the "\{builtinPath\}" token to refer to the built-in Powerlines plugins directory - the value will be replaced with the correct file path by the plugin.
|
|
48
|
-
*
|
|
49
|
-
* @defaultValue "\{builtinPath\}/prisma"
|
|
50
|
-
*/
|
|
51
|
-
outputPath?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Additional parameters to pass to the Prisma CLI
|
|
54
|
-
*/
|
|
55
|
-
params?: string;
|
|
56
|
-
/**
|
|
57
|
-
* The path to the generated Prisma client. This is used by the plugin to import the client for type generation and other operations.
|
|
58
|
-
*
|
|
59
|
-
* @remarks
|
|
60
|
-
* If not specified, the plugin will attempt to resolve the Prisma client path based on the output path and the schema file name. This field allows you to explicitly specify the path to the generated Prisma client if it cannot be automatically resolved.
|
|
61
|
-
*/
|
|
62
|
-
prismaPath?: string;
|
|
63
|
-
/**
|
|
64
|
-
* The service token to use for the Prisma API
|
|
65
|
-
*/
|
|
66
|
-
serviceToken?: string;
|
|
67
|
-
/**
|
|
68
|
-
* Configuration parameters to manage a Prisma Postgres database
|
|
69
|
-
*/
|
|
70
|
-
prismaPostgres?: PrismaPostgresPrismaPluginOptions | true;
|
|
71
|
-
}
|
|
72
|
-
type PrismaPluginUserConfig = UserConfig & PulumiPluginUserConfig & {
|
|
73
|
-
prisma?: Omit<PrismaPluginOptions, "schema" | "outputPath" | "configFile"> & Required<Pick<PrismaPluginOptions, "schema" | "outputPath" | "configFile">>;
|
|
74
|
-
};
|
|
75
|
-
type PrismaPluginResolvedConfig = ResolvedConfig & PulumiPluginResolvedConfig & {
|
|
76
|
-
prisma: Omit<PrismaPluginOptions, "schema" | "outputPath" | "configFile" | "prismaPostgres"> & Required<Pick<PrismaPluginOptions, "schema" | "outputPath" | "configFile">> & {
|
|
77
|
-
prismaPostgres?: Required<PrismaPostgresPrismaPluginOptions>;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
type PrismaPluginContext<TResolvedConfig extends PrismaPluginResolvedConfig = PrismaPluginResolvedConfig> = PluginContext<TResolvedConfig> & PulumiPluginContext & {
|
|
81
|
-
prisma: {
|
|
82
|
-
schema: PrismaSchema;
|
|
83
|
-
builder: PrismaSchemaCreator;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
declare type __ΩPrismaPostgresPrismaPluginOptions = any[];
|
|
87
|
-
declare type __ΩPrismaPluginOptions = any[];
|
|
88
|
-
declare type __ΩPrismaPluginUserConfig = any[];
|
|
89
|
-
declare type __ΩPrismaPluginResolvedConfig = any[];
|
|
90
|
-
declare type __ΩPrismaPluginContext = any[];
|
|
91
|
-
//#endregion
|
|
92
|
-
export { PrismaPluginContext, PrismaPluginOptions, PrismaPluginResolvedConfig, PrismaPluginUserConfig, PrismaPostgresPrismaPluginOptions, __ΩPrismaPluginContext, __ΩPrismaPluginOptions, __ΩPrismaPluginResolvedConfig, __ΩPrismaPluginUserConfig, __ΩPrismaPostgresPrismaPluginOptions };
|
|
93
|
-
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;UA2BiB,iCAAA;;AAAjB;AAoDA;AAoDA;;EACE,SAAA,CAAA,EAAA,MAAA;EACgB;;;;;EACJ,MAAA,CAAA,EAAA,WAAA,GAAA,WAAA,GAAA,WAAA,GAAA,WAAA,GAAA,YAAA,GAAA,WAAA,GAAA,YAAA,GAAA,YAAA,GAAA,gBAAA,GAAA,gBAAA,GAAA,gBAAA,GAAA,gBAAA,GAAA,gBAAA,GAAA,gBAAA,GAAA,gBAAA,GAAA,cAAA,GAAA,WAAA,GAAA,cAAA,GAAA,cAAA,GAAA,WAAA,GAAA,WAAA,GAAA,WAAA,GAAA,YAAA,GAAA,YAAA,GAAA,YAAA,GAAA,cAAA,GAAA,YAAA,GAAA,cAAA,GAAA,WAAA;EAKF;;;;;EAOC,YAAA,CAAA,EAAA,MAAA;;AADP,UAlEW,mBAAA,CAkEX;EAG4B;;;AAIlC;;EAEI,MAAA,CAAA,EAAA,MAAA;EACc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA3BC;;KAGP,sBAAA,GAAyB,aACnC;WACW,KAAK,+DACZ,SACE,KAAK;;KAID,0BAAA,GAA6B,iBACvC;UACU,KACN,kFAGA,SACE,KAAK;qBAEY,SAAS;;;KAItB,4CACc,6BACtB,8BACA,cAAc,mBAChB;;YAEY;aACC"}
|
package/dist/types/prisma.d.cts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
//#region src/types/prisma.d.ts
|
|
2
|
-
type MultipleSchemas = Array<[filename: string, content: string]>;
|
|
3
|
-
type SchemaFileInput = string | [filename: string, content: string];
|
|
4
|
-
type ConnectorType = "mysql" | "mongodb" | "sqlite" | "postgresql" | "postgres" | "prisma+postgres" | "sqlserver" | "cockroachdb";
|
|
5
|
-
type ActiveConnectorType = Exclude<ConnectorType, "postgres" | "prisma+postgres">;
|
|
6
|
-
interface EnvValue {
|
|
7
|
-
fromEnvVar: null | string;
|
|
8
|
-
value: null | string;
|
|
9
|
-
}
|
|
10
|
-
interface DataSource {
|
|
11
|
-
name: string;
|
|
12
|
-
provider: ConnectorType;
|
|
13
|
-
activeProvider: ActiveConnectorType;
|
|
14
|
-
url: EnvValue;
|
|
15
|
-
directUrl?: EnvValue;
|
|
16
|
-
schemas: string[] | [];
|
|
17
|
-
sourceFilePath: string;
|
|
18
|
-
}
|
|
19
|
-
interface GetSchemaResponse {
|
|
20
|
-
config: PrismaSchema;
|
|
21
|
-
errors: GetSchemaValidationError[];
|
|
22
|
-
}
|
|
23
|
-
interface EnvValue {
|
|
24
|
-
fromEnvVar: null | string;
|
|
25
|
-
value: null | string;
|
|
26
|
-
}
|
|
27
|
-
interface EnvPaths {
|
|
28
|
-
rootEnvPath: string | null;
|
|
29
|
-
schemaEnvPath: string | undefined;
|
|
30
|
-
}
|
|
31
|
-
interface BinaryTargetsEnvValue {
|
|
32
|
-
fromEnvVar: string | null;
|
|
33
|
-
value: string;
|
|
34
|
-
native?: boolean;
|
|
35
|
-
}
|
|
36
|
-
interface GeneratorConfig {
|
|
37
|
-
name: string;
|
|
38
|
-
output: EnvValue | null;
|
|
39
|
-
isCustomOutput?: boolean;
|
|
40
|
-
provider: EnvValue;
|
|
41
|
-
config: {
|
|
42
|
-
/** `output` is a reserved name and will only be available directly at `generator.output` */
|
|
43
|
-
output?: never;
|
|
44
|
-
/** `provider` is a reserved name and will only be available directly at `generator.provider` */
|
|
45
|
-
provider?: never;
|
|
46
|
-
/** `binaryTargets` is a reserved name and will only be available directly at `generator.binaryTargets` */
|
|
47
|
-
binaryTargets?: never;
|
|
48
|
-
/** `previewFeatures` is a reserved name and will only be available directly at `generator.previewFeatures` */
|
|
49
|
-
previewFeatures?: never;
|
|
50
|
-
} & {
|
|
51
|
-
[key: string]: string | string[] | undefined;
|
|
52
|
-
};
|
|
53
|
-
binaryTargets: BinaryTargetsEnvValue[];
|
|
54
|
-
previewFeatures: string[];
|
|
55
|
-
envPaths?: EnvPaths;
|
|
56
|
-
sourceFilePath: string;
|
|
57
|
-
}
|
|
58
|
-
interface PrismaSchema {
|
|
59
|
-
datasources: DataSource[];
|
|
60
|
-
generators: GeneratorConfig[];
|
|
61
|
-
warnings: string[];
|
|
62
|
-
}
|
|
63
|
-
interface GetSchemaValidationError {
|
|
64
|
-
fileName: string | null;
|
|
65
|
-
message: string;
|
|
66
|
-
}
|
|
67
|
-
interface GetSchemaOptions {
|
|
68
|
-
datamodel: SchemaFileInput;
|
|
69
|
-
ignoreEnvVarErrors?: boolean;
|
|
70
|
-
}
|
|
71
|
-
declare type __ΩMultipleSchemas = any[];
|
|
72
|
-
declare type __ΩSchemaFileInput = any[];
|
|
73
|
-
declare type __ΩConnectorType = any[];
|
|
74
|
-
declare type __ΩActiveConnectorType = any[];
|
|
75
|
-
declare type __ΩEnvValue = any[];
|
|
76
|
-
declare type __ΩDataSource = any[];
|
|
77
|
-
declare type __ΩGetSchemaResponse = any[];
|
|
78
|
-
declare type __ΩEnvPaths = any[];
|
|
79
|
-
declare type __ΩBinaryTargetsEnvValue = any[];
|
|
80
|
-
declare type __ΩGeneratorConfig = any[];
|
|
81
|
-
declare type __ΩPrismaSchema = any[];
|
|
82
|
-
declare type __ΩGetSchemaOptions = any[];
|
|
83
|
-
//#endregion
|
|
84
|
-
export { ActiveConnectorType, BinaryTargetsEnvValue, ConnectorType, DataSource, EnvPaths, EnvValue, GeneratorConfig, GetSchemaOptions, GetSchemaResponse, MultipleSchemas, PrismaSchema, SchemaFileInput, __ΩActiveConnectorType, __ΩBinaryTargetsEnvValue, __ΩConnectorType, __ΩDataSource, __ΩEnvPaths, __ΩEnvValue, __ΩGeneratorConfig, __ΩGetSchemaOptions, __ΩGetSchemaResponse, __ΩMultipleSchemas, __ΩPrismaSchema, __ΩSchemaFileInput };
|
|
85
|
-
//# sourceMappingURL=prisma.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prisma.d.cts","names":[],"sources":["../../src/types/prisma.ts"],"sourcesContent":[],"mappings":";KAkBY,eAAA,GAAkB;AAAlB,KACA,eAAA,GADe,MAAG,GAAA,CAAA,QAAK,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AACvB,KAEA,aAAA,GAFe,OAAA,GAAA,SAAA,GAAA,QAAA,GAAA,YAAA,GAAA,UAAA,GAAA,iBAAA,GAAA,WAAA,GAAA,aAAA;AAEf,KAUA,mBAAA,GAAsB,OAVT,CAWvB,aAXuB,EAAA,UAAA,GAAA,iBAAA,CAAA;AAUb,UAKK,QAAA,CALc;EAKd,UAAA,EAAQ,IAAA,GAAA,MAAA;EAKR,KAAA,EAAA,IAAA,GAAU,MAAA;;AAIT,UAJD,UAAA,CAIC;EACX,IAAA,EAAA,MAAA;EACO,QAAA,EAJF,aAIE;EAAQ,cAAA,EAFJ,mBAEI;EAKL,GAAA,EANV,QAMU;EAKA,SAAA,CAAA,EAVH,QAUW;EAKR,OAAA,EAAA,MAAQ,EAAA,GAAA,EAAA;EAKR,cAAA,EAAA,MAAA;AAMjB;AAEU,UAvBO,iBAAA,CAuBP;EAEE,MAAA,EAxBF,YAwBE;EAaK,MAAA,EApCP,wBAoCO,EAAA;;AAEI,UAnCJ,QAAA,CAmCI;EAIJ,UAAA,EAAA,IAAY,GAAA,MAAA;EAMnB,KAAA,EAAA,IAAA,GAAA,MAAA;AAKV;UA7CiB,QAAA;;;;UAKA,qBAAA;;;;;UAMA,eAAA;;UAEP;;YAEE;;;;;;;;;;;;;iBAaK;;aAEJ;;;UAII,YAAA;eACF;cACD;;;UAIJ,wBAAA;;;;UAKO,gBAAA;aACJ"}
|