prisma-sql 1.10.0 → 1.11.0

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.
@@ -56,7 +56,7 @@ var require_package = __commonJS({
56
56
  "package.json"(exports$1, module) {
57
57
  module.exports = {
58
58
  name: "prisma-sql",
59
- version: "1.10.0",
59
+ version: "1.11.0",
60
60
  description: "Convert Prisma queries to optimized SQL with type safety. 2-7x faster than Prisma Client.",
61
61
  main: "dist/index.cjs",
62
62
  module: "dist/index.js",
@@ -4628,23 +4628,24 @@ function getDialectFromProvider(provider) {
4628
4628
  }
4629
4629
  function getOutputDir(options) {
4630
4630
  var _a, _b;
4631
+ const schemaDir = path.dirname(options.schemaPath);
4631
4632
  if ((_a = options.generator.output) == null ? void 0 : _a.value) {
4632
- return options.generator.output.value;
4633
+ return path.resolve(schemaDir, options.generator.output.value);
4633
4634
  }
4634
4635
  const clientGenerator = options.otherGenerators.find(
4635
4636
  (g) => g.provider.value === "prisma-client-js"
4636
4637
  );
4637
4638
  if ((_b = clientGenerator == null ? void 0 : clientGenerator.output) == null ? void 0 : _b.value) {
4638
- const clientOutput = clientGenerator.output.value;
4639
+ const clientOutput = path.resolve(schemaDir, clientGenerator.output.value);
4639
4640
  return path.join(path.resolve(path.dirname(clientOutput), ".."), "sql");
4640
4641
  }
4641
- return "../node_modules/.prisma/sql";
4642
+ return path.resolve(schemaDir, "./generated/sql");
4642
4643
  }
4643
4644
  generatorHelper.generatorHandler({
4644
4645
  onManifest() {
4645
4646
  return {
4646
4647
  version,
4647
- defaultOutput: "../node_modules/.prisma/sql",
4648
+ defaultOutput: "./generated/sql",
4648
4649
  prettyName: "prisma-sql-generator",
4649
4650
  requiresGenerators: ["prisma-client-js"]
4650
4651
  };