zenstack icon indicating copy to clipboard operation
zenstack copied to clipboard

[Feature Request] export internal zenstack functions on production zenstack bundle like `setupInvalidation` (react-query-plugin)

Open Eliav2 opened this issue 1 year ago • 0 comments

we want to re-use setupInvalidation from https://github.com/zenstackhq/zenstack/blob/b06cee64cb1e9a1a9bf6ccbfd82fd5b57160dff0/packages/plugins/tanstack-query/src/runtime/common.ts#L246

While setupInvalidation is exported in the source code, it is not exported in the production build of ZenStack:

// node_modules/.pnpm/@[email protected]_@[email protected][email protected]_/node_modules/@zenstackhq/tanstack-query/runtime/react.mjs

function setupInvalidation(model, operation, modelMeta, options, invalidate, logging = false) {
...
}

We need to reuse this function in our custom React Query client. Unfortunately, many functions that are exported in the source are not available in the final build. It would be extremely helpful if you could ensure these functions are exported in the production build so we can utilize ZenStack code more effectively.

Eliav2 avatar Jul 04 '24 11:07 Eliav2