@zenstackhq/sdk 3.0.0-alpha.16 → 3.0.0-alpha.18

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/index.js CHANGED
@@ -1031,25 +1031,9 @@ var TsSchemaGenerator = class {
1031
1031
  const providerExpr = dataSource.fields.find((f) => f.name === "provider")?.value;
1032
1032
  invariant(isLiteralExpr3(providerExpr), "Provider must be a literal");
1033
1033
  const type = providerExpr.value;
1034
- const urlExpr = dataSource.fields.find((f) => f.name === "url")?.value;
1035
- invariant(isLiteralExpr3(urlExpr) || isInvocationExpr2(urlExpr), "URL must be a literal or env function");
1036
- if (isLiteralExpr3(urlExpr)) {
1037
- return {
1038
- type,
1039
- url: urlExpr.value,
1040
- env: void 0
1041
- };
1042
- } else if (isInvocationExpr2(urlExpr)) {
1043
- invariant(urlExpr.function.$refText === "env", 'only "env" function is supported');
1044
- invariant(urlExpr.args.length === 1, "env function must have one argument");
1045
- return {
1046
- type,
1047
- env: urlExpr.args[0].value.value,
1048
- url: void 0
1049
- };
1050
- } else {
1051
- throw new Error("Unsupported URL type");
1052
- }
1034
+ return {
1035
+ type
1036
+ };
1053
1037
  }
1054
1038
  getFieldMappedDefault(field) {
1055
1039
  const defaultAttr = getAttribute(field, "@default");