@makehq/forman-schema 1.9.0 → 1.9.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.
package/dist/index.cjs CHANGED
@@ -585,7 +585,8 @@ function validateFormanField(field) {
585
585
  }
586
586
  function appendQueryString(path, domain, tail) {
587
587
  if (path.startsWith("api://")) return path;
588
- const queryString = tail.map((part) => `${encodeURIComponent(part)}={{${part}}}`).join("&");
588
+ const existingParams = new Set(new URL(path).searchParams.keys());
589
+ const queryString = tail.filter((part) => !existingParams.has(part)).map((part) => `${encodeURIComponent(part)}={{${part}}}`).join("&");
589
590
  if (!queryString) return path;
590
591
  const separator = path.includes("?") ? "&" : "?";
591
592
  return `${path}${separator}${queryString}`;
package/dist/index.js CHANGED
@@ -556,7 +556,8 @@ function validateFormanField(field) {
556
556
  }
557
557
  function appendQueryString(path, domain, tail) {
558
558
  if (path.startsWith("api://")) return path;
559
- const queryString = tail.map((part) => `${encodeURIComponent(part)}={{${part}}}`).join("&");
559
+ const existingParams = new Set(new URL(path).searchParams.keys());
560
+ const queryString = tail.filter((part) => !existingParams.has(part)).map((part) => `${encodeURIComponent(part)}={{${part}}}`).join("&");
560
561
  if (!queryString) return path;
561
562
  const separator = path.includes("?") ? "&" : "?";
562
563
  return `${path}${separator}${queryString}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makehq/forman-schema",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "Forman Schema Tools",
5
5
  "license": "MIT",
6
6
  "author": "Make",