zudoku 0.44.0 → 0.44.1

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.
Files changed (26) hide show
  1. package/dist/lib/plugins/openapi/Sidecar.js +32 -2
  2. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  3. package/dist/lib/plugins/openapi/playground/Headers.js +2 -2
  4. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  5. package/dist/lib/plugins/openapi/playground/QueryParams.js +2 -2
  6. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  7. package/lib/{OasProvider-DHPC9PnR.js → OasProvider-CsUksaAo.js} +2 -2
  8. package/lib/{OasProvider-DHPC9PnR.js.map → OasProvider-CsUksaAo.js.map} +1 -1
  9. package/lib/{OperationList-C6Ky0zQa.js → OperationList-BlUBNsw2.js} +510 -494
  10. package/lib/{OperationList-C6Ky0zQa.js.map → OperationList-BlUBNsw2.js.map} +1 -1
  11. package/lib/{SchemaList-Cu7rWQ_k.js → SchemaList-BQiBukIP.js} +3 -3
  12. package/lib/{SchemaList-Cu7rWQ_k.js.map → SchemaList-BQiBukIP.js.map} +1 -1
  13. package/lib/{SchemaView-Ci_CnNlv.js → SchemaView-Bt95NiyQ.js} +2 -2
  14. package/lib/{SchemaView-Ci_CnNlv.js.map → SchemaView-Bt95NiyQ.js.map} +1 -1
  15. package/lib/{circular-P9P1oxbQ.js → circular-tOWjsgLZ.js} +2 -2
  16. package/lib/{circular-P9P1oxbQ.js.map → circular-tOWjsgLZ.js.map} +1 -1
  17. package/lib/{createServer-Iclzdx0h.js → createServer-XtO-PVox.js} +3 -3
  18. package/lib/{createServer-Iclzdx0h.js.map → createServer-XtO-PVox.js.map} +1 -1
  19. package/lib/{index-C56xKbMM.js → index-CZnufgn5.js} +10 -10
  20. package/lib/index-CZnufgn5.js.map +1 -0
  21. package/lib/zudoku.plugin-openapi.js +1 -1
  22. package/package.json +1 -1
  23. package/src/lib/plugins/openapi/Sidecar.tsx +35 -2
  24. package/src/lib/plugins/openapi/playground/Headers.tsx +2 -2
  25. package/src/lib/plugins/openapi/playground/QueryParams.tsx +2 -2
  26. package/lib/index-C56xKbMM.js.map +0 -1
@@ -3,7 +3,7 @@ import "lucide-react";
3
3
  import "./chunk-BAXFHI7N-BLTsN6tl.js";
4
4
  import "./hook-8GM2HXNM.js";
5
5
  import "./ui/Button.js";
6
- import { z as a, U as s, A } from "./index-C56xKbMM.js";
6
+ import { z as a, U as s, A } from "./index-CZnufgn5.js";
7
7
  export {
8
8
  a as GetSidebarOperationsQuery,
9
9
  s as UNTAGGED_PATH,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.44.0",
3
+ "version": "0.44.1",
4
4
  "type": "module",
5
5
  "homepage": "https://zudoku.dev",
6
6
  "repository": {
@@ -168,8 +168,40 @@ export const Sidecar = ({
168
168
  mimeType: "application/json",
169
169
  }
170
170
  : ({} as any),
171
- headers: [{ name: "Content-Type", value: "application/json" }],
172
- queryString: [],
171
+ headers: [
172
+ { name: "Content-Type", value: "application/json" },
173
+ ...(operation.parameters
174
+ ?.filter((p) => p.in === "header" && p.required === true)
175
+ .map((p) => ({
176
+ name: p.name,
177
+ value:
178
+ p.examples?.find((x) => x.value)?.value ??
179
+ p.schema?.default ??
180
+ (p.schema?.type === "string"
181
+ ? "string"
182
+ : p.schema?.type === "number" || p.schema?.type === "integer"
183
+ ? "0"
184
+ : p.schema?.type === "boolean"
185
+ ? "true"
186
+ : ""),
187
+ })) ?? []),
188
+ ],
189
+ queryString:
190
+ operation.parameters
191
+ ?.filter((p) => p.in === "query" && p.required === true)
192
+ .map((p) => ({
193
+ name: p.name,
194
+ value:
195
+ p.examples?.find((x) => x.value)?.value ??
196
+ p.schema?.default ??
197
+ (p.schema?.type === "string"
198
+ ? "string"
199
+ : p.schema?.type === "number" || p.schema?.type === "integer"
200
+ ? "0"
201
+ : p.schema?.type === "boolean"
202
+ ? "true"
203
+ : ""),
204
+ })) ?? [],
173
205
  httpVersion: "",
174
206
  cookies: [],
175
207
  headersSize: 0,
@@ -184,6 +216,7 @@ export const Sidecar = ({
184
216
  operation.path,
185
217
  selectedServer,
186
218
  selectedLang,
219
+ operation.parameters,
187
220
  ]);
188
221
  const [ref, isOnScreen] = useOnScreen({ rootMargin: "200px 0px 200px 0px" });
189
222
 
@@ -113,7 +113,7 @@ export const Headers = ({
113
113
  <Autocomplete
114
114
  {...field}
115
115
  placeholder="Name"
116
- className="border-0 shadow-none bg-transparent text-xs font-mono"
116
+ className="border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
117
117
  options={[...missingHeaders, ...headerOptions]}
118
118
  onEnterPress={() => handleHeaderEnter(i)}
119
119
  onChange={(e) => {
@@ -166,7 +166,7 @@ export const Headers = ({
166
166
  field.onChange(e);
167
167
  setValue(`headers.${i}.active`, true);
168
168
  }}
169
- className="font-mono text-xs border-0"
169
+ className="border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
170
170
  />
171
171
  );
172
172
  }}
@@ -60,7 +60,7 @@ export const QueryParams = ({
60
60
  onChange={(e) => {
61
61
  field.onChange(e);
62
62
  }}
63
- className="border-0 font-mono text-xs bg-transparent hover:bg-transparent"
63
+ className="border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
64
64
  />
65
65
  ) : (
66
66
  <InlineInput asChild>
@@ -111,7 +111,7 @@ export const QueryParams = ({
111
111
  field.onChange(e);
112
112
  form.setValue(`queryParams.${i}.active`, true);
113
113
  }}
114
- className="font-mono text-xs border-0 shadow-none"
114
+ className="border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
115
115
  />
116
116
  );
117
117
  }}