Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Support Prisma client generation #101

Closed
ehmicky opened this issue Apr 27, 2020 · 5 comments · Fixed by #103
Closed

Support Prisma client generation #101

ehmicky opened this issue Apr 27, 2020 · 5 comments · Fixed by #103
Assignees
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@ehmicky
Copy link
Contributor

ehmicky commented Apr 27, 2020

Prisma generates its client logic during postinstall and outputs it to node_modules/.prisma (using ${__dirname}/../../.prisma).

This does not work with zip-it-and-ship-it due to the reason outlined here.

We should add some logic to support Prisma's use case.

@ehmicky ehmicky added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Apr 27, 2020
@ehmicky ehmicky self-assigned this Apr 27, 2020
@ehmicky
Copy link
Contributor Author

ehmicky commented Apr 28, 2020

A workaround could be the following: when we retrieve the list of published files (files field from package.json of a Node module), we could add the following logic: if module is @prisma/client, then add ${__dirname}/../../.prisma/** to the list of published files, providing that directory exists.

Note that .prisma does not have any dependencies itself, apart from requiring @prisma/client. And all files inside .prisma/** should be published.

@timsuchanek, could you confirm this would work as intended?

@timsuchanek
Copy link
Contributor

Thanks @ehmicky, that's exactly what we need!

@ehmicky
Copy link
Contributor Author

ehmicky commented May 1, 2020

Done in #103.
Could you please check the PR and make sure this is doing what you would like? Thanks!

@ehmicky
Copy link
Contributor Author

ehmicky commented May 4, 2020

This has been released in @netlify/zip-it-and-ship-it@0.4.0-16. Could you please confirm this is fixing your problem? When you do, I will release this to production.

@timsuchanek
Copy link
Contributor

Thanks a lot @ehmicky for looking into this. I can confirm that this is indeed working now!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants