UNPKG

@stryke/prisma-trpc-generator

Version:

A fork of the prisma-trpc-generator code to work in ESM with Prisma v6.

1 lines 1.61 kB
{"version":3,"file":"get-jiti.mjs","names":[],"sources":["../../src/utils/get-jiti.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\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/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { getEnvPaths } from \"@stryke/env/get-env-paths\";\nimport { getWorkspaceRoot } from \"@stryke/fs/get-workspace-root\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport type { Jiti } from \"jiti\";\nimport { createJiti } from \"jiti\";\n\nlet jiti!: Jiti;\n\nexport function getJiti() {\n if (!jiti) {\n const envPaths = getEnvPaths();\n\n jiti = createJiti(getWorkspaceRoot(), {\n fsCache: joinPaths(envPaths.cache, \"jiti\"),\n interopDefault: true\n });\n }\n\n return jiti;\n}\n"],"mappings":";;;;;;AAwBA,IAAI;AAEJ,SAAgB,UAAU;AACxB,KAAI,CAAC,MAAM;EACT,MAAM,WAAW,aAAa;AAE9B,SAAO,WAAW,kBAAkB,EAAE;GACpC,SAAS,UAAU,SAAS,OAAO,OAAO;GAC1C,gBAAgB;GACjB,CAAC;;AAGJ,QAAO"}