@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.cjs CHANGED
@@ -1064,25 +1064,9 @@ var TsSchemaGenerator = class {
1064
1064
  const providerExpr = dataSource.fields.find((f) => f.name === "provider")?.value;
1065
1065
  (0, import_common_helpers2.invariant)((0, import_ast3.isLiteralExpr)(providerExpr), "Provider must be a literal");
1066
1066
  const type = providerExpr.value;
1067
- const urlExpr = dataSource.fields.find((f) => f.name === "url")?.value;
1068
- (0, import_common_helpers2.invariant)((0, import_ast3.isLiteralExpr)(urlExpr) || (0, import_ast3.isInvocationExpr)(urlExpr), "URL must be a literal or env function");
1069
- if ((0, import_ast3.isLiteralExpr)(urlExpr)) {
1070
- return {
1071
- type,
1072
- url: urlExpr.value,
1073
- env: void 0
1074
- };
1075
- } else if ((0, import_ast3.isInvocationExpr)(urlExpr)) {
1076
- (0, import_common_helpers2.invariant)(urlExpr.function.$refText === "env", 'only "env" function is supported');
1077
- (0, import_common_helpers2.invariant)(urlExpr.args.length === 1, "env function must have one argument");
1078
- return {
1079
- type,
1080
- env: urlExpr.args[0].value.value,
1081
- url: void 0
1082
- };
1083
- } else {
1084
- throw new Error("Unsupported URL type");
1085
- }
1067
+ return {
1068
+ type
1069
+ };
1086
1070
  }
1087
1071
  getFieldMappedDefault(field) {
1088
1072
  const defaultAttr = getAttribute(field, "@default");