@exabugs/dynamodb-client 0.4.0 → 0.5.0

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 (97) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/client/Collection.d.ts +0 -5
  3. package/dist/client/Collection.d.ts.map +1 -1
  4. package/dist/client/Collection.js +7 -1
  5. package/dist/client/Collection.js.map +1 -1
  6. package/dist/client/DynamoClient.d.ts +1 -1
  7. package/dist/client/DynamoClient.d.ts.map +1 -1
  8. package/dist/client/FindCursor.d.ts.map +1 -1
  9. package/dist/client/FindCursor.js +2 -1
  10. package/dist/client/FindCursor.js.map +1 -1
  11. package/dist/scripts/operations/bulkRecordRepair.d.ts +17 -0
  12. package/dist/scripts/operations/bulkRecordRepair.d.ts.map +1 -0
  13. package/dist/scripts/operations/bulkRecordRepair.js +69 -0
  14. package/dist/scripts/operations/bulkRecordRepair.js.map +1 -0
  15. package/dist/scripts/operations/singleRecordRepair.d.ts +18 -0
  16. package/dist/scripts/operations/singleRecordRepair.d.ts.map +1 -0
  17. package/dist/scripts/operations/singleRecordRepair.js +46 -0
  18. package/dist/scripts/operations/singleRecordRepair.js.map +1 -0
  19. package/dist/scripts/repair-shadows.js +26 -160
  20. package/dist/scripts/repair-shadows.js.map +1 -1
  21. package/dist/scripts/utils/awsUtils.d.ts +15 -0
  22. package/dist/scripts/utils/awsUtils.d.ts.map +1 -0
  23. package/dist/scripts/utils/awsUtils.js +31 -0
  24. package/dist/scripts/utils/awsUtils.js.map +1 -0
  25. package/dist/scripts/utils/cliParser.d.ts +30 -0
  26. package/dist/scripts/utils/cliParser.d.ts.map +1 -0
  27. package/dist/scripts/utils/cliParser.js +44 -0
  28. package/dist/scripts/utils/cliParser.js.map +1 -0
  29. package/dist/scripts/utils/clientFactory.d.ts +22 -0
  30. package/dist/scripts/utils/clientFactory.d.ts.map +1 -0
  31. package/dist/scripts/utils/clientFactory.js +31 -0
  32. package/dist/scripts/utils/clientFactory.js.map +1 -0
  33. package/dist/scripts/utils/repairUtils.d.ts +58 -0
  34. package/dist/scripts/utils/repairUtils.d.ts.map +1 -0
  35. package/dist/scripts/utils/repairUtils.js +52 -0
  36. package/dist/scripts/utils/repairUtils.js.map +1 -0
  37. package/dist/server/handler.cjs +2093 -931
  38. package/dist/server/handler.cjs.map +4 -4
  39. package/dist/server/handler.d.ts +3 -3
  40. package/dist/server/handler.d.ts.map +1 -1
  41. package/dist/server/handler.js +16 -373
  42. package/dist/server/handler.js.map +1 -1
  43. package/dist/server/operations/find/shadowQuery.d.ts.map +1 -1
  44. package/dist/server/operations/find/shadowQuery.js +2 -1
  45. package/dist/server/operations/find/shadowQuery.js.map +1 -1
  46. package/dist/server/operations/find/utils.js.map +1 -1
  47. package/dist/server/operations/insertMany.js +2 -2
  48. package/dist/server/operations/insertMany.js.map +1 -1
  49. package/dist/server/operations/operationDispatcher.d.ts +10 -0
  50. package/dist/server/operations/operationDispatcher.d.ts.map +1 -0
  51. package/dist/server/operations/operationDispatcher.js +84 -0
  52. package/dist/server/operations/operationDispatcher.js.map +1 -0
  53. package/dist/server/operations/parameterConverter.d.ts +117 -0
  54. package/dist/server/operations/parameterConverter.d.ts.map +1 -0
  55. package/dist/server/operations/parameterConverter.js +155 -0
  56. package/dist/server/operations/parameterConverter.js.map +1 -0
  57. package/dist/server/operations/updateMany.js +2 -2
  58. package/dist/server/operations/updateMany.js.map +1 -1
  59. package/dist/server/utils/authHandler.d.ts +16 -0
  60. package/dist/server/utils/authHandler.d.ts.map +1 -0
  61. package/dist/server/utils/authHandler.js +85 -0
  62. package/dist/server/utils/authHandler.js.map +1 -0
  63. package/dist/server/utils/errorHandler.d.ts +15 -0
  64. package/dist/server/utils/errorHandler.d.ts.map +1 -0
  65. package/dist/server/utils/errorHandler.js +61 -0
  66. package/dist/server/utils/errorHandler.js.map +1 -0
  67. package/dist/server/utils/pagination.d.ts.map +1 -1
  68. package/dist/server/utils/pagination.js +2 -1
  69. package/dist/server/utils/pagination.js.map +1 -1
  70. package/dist/server/utils/requestParser.d.ts +10 -0
  71. package/dist/server/utils/requestParser.d.ts.map +1 -0
  72. package/dist/server/utils/requestParser.js +45 -0
  73. package/dist/server/utils/requestParser.js.map +1 -0
  74. package/dist/server/utils/responseBuilder.d.ts +33 -0
  75. package/dist/server/utils/responseBuilder.d.ts.map +1 -0
  76. package/dist/server/utils/responseBuilder.js +85 -0
  77. package/dist/server/utils/responseBuilder.js.map +1 -0
  78. package/dist/shadows/generator.d.ts.map +1 -1
  79. package/dist/shadows/generator.js +2 -1
  80. package/dist/shadows/generator.js.map +1 -1
  81. package/dist/shared/constants/formatting.d.ts +15 -0
  82. package/dist/shared/constants/formatting.d.ts.map +1 -0
  83. package/dist/shared/constants/formatting.js +15 -0
  84. package/dist/shared/constants/formatting.js.map +1 -0
  85. package/dist/shared/constants/http.d.ts +10 -24
  86. package/dist/shared/constants/http.d.ts.map +1 -1
  87. package/dist/shared/constants/http.js +10 -24
  88. package/dist/shared/constants/http.js.map +1 -1
  89. package/dist/shared/constants/validation.d.ts +22 -0
  90. package/dist/shared/constants/validation.d.ts.map +1 -0
  91. package/dist/shared/constants/validation.js +29 -0
  92. package/dist/shared/constants/validation.js.map +1 -0
  93. package/dist/shared/errors/index.d.ts +11 -1
  94. package/dist/shared/errors/index.d.ts.map +1 -1
  95. package/dist/shared/errors/index.js +10 -0
  96. package/dist/shared/errors/index.js.map +1 -1
  97. package/package.json +2 -5
@@ -1,5 +1,5 @@
1
- // @exabugs/dynamodb-client v0.4.0
2
- // Built: 2025-12-22T15:24:28.032Z
1
+ // @exabugs/dynamodb-client v0.5.0
2
+ // Built: 2025-12-23T05:07:58.552Z
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -1241,12 +1241,12 @@ var require_dist_cjs7 = __commonJS({
1241
1241
  var loggerMiddleware = /* @__PURE__ */ __name(() => (next, context) => async (args) => {
1242
1242
  try {
1243
1243
  const response = await next(args);
1244
- const { clientName, commandName, logger: logger21, dynamoDbDocumentClientOptions = {} } = context;
1244
+ const { clientName, commandName, logger: logger25, dynamoDbDocumentClientOptions = {} } = context;
1245
1245
  const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
1246
1246
  const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
1247
1247
  const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;
1248
1248
  const { $metadata, ...outputWithoutMetadata } = response.output;
1249
- logger21?.info?.({
1249
+ logger25?.info?.({
1250
1250
  clientName,
1251
1251
  commandName,
1252
1252
  input: inputFilterSensitiveLog(args.input),
@@ -1255,10 +1255,10 @@ var require_dist_cjs7 = __commonJS({
1255
1255
  });
1256
1256
  return response;
1257
1257
  } catch (error2) {
1258
- const { clientName, commandName, logger: logger21, dynamoDbDocumentClientOptions = {} } = context;
1258
+ const { clientName, commandName, logger: logger25, dynamoDbDocumentClientOptions = {} } = context;
1259
1259
  const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
1260
1260
  const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
1261
- logger21?.error?.({
1261
+ logger25?.error?.({
1262
1262
  clientName,
1263
1263
  commandName,
1264
1264
  input: inputFilterSensitiveLog(args.input),
@@ -1592,11 +1592,183 @@ var init_getHttpAuthSchemeEndpointRuleSetPlugin = __esm({
1592
1592
  }
1593
1593
  });
1594
1594
 
1595
- // node_modules/@smithy/middleware-serde/dist-cjs/index.js
1595
+ // node_modules/@smithy/middleware-serde/node_modules/@smithy/protocol-http/dist-cjs/index.js
1596
1596
  var require_dist_cjs9 = __commonJS({
1597
+ "node_modules/@smithy/middleware-serde/node_modules/@smithy/protocol-http/dist-cjs/index.js"(exports2) {
1598
+ "use strict";
1599
+ var types = require_dist_cjs();
1600
+ var getHttpHandlerExtensionConfiguration4 = /* @__PURE__ */ __name((runtimeConfig) => {
1601
+ return {
1602
+ setHttpHandler(handler2) {
1603
+ runtimeConfig.httpHandler = handler2;
1604
+ },
1605
+ httpHandler() {
1606
+ return runtimeConfig.httpHandler;
1607
+ },
1608
+ updateHttpClientConfig(key, value) {
1609
+ runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);
1610
+ },
1611
+ httpHandlerConfigs() {
1612
+ return runtimeConfig.httpHandler.httpHandlerConfigs();
1613
+ }
1614
+ };
1615
+ }, "getHttpHandlerExtensionConfiguration");
1616
+ var resolveHttpHandlerRuntimeConfig4 = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => {
1617
+ return {
1618
+ httpHandler: httpHandlerExtensionConfiguration.httpHandler()
1619
+ };
1620
+ }, "resolveHttpHandlerRuntimeConfig");
1621
+ var Field = class {
1622
+ static {
1623
+ __name(this, "Field");
1624
+ }
1625
+ name;
1626
+ kind;
1627
+ values;
1628
+ constructor({ name, kind = types.FieldPosition.HEADER, values = [] }) {
1629
+ this.name = name;
1630
+ this.kind = kind;
1631
+ this.values = values;
1632
+ }
1633
+ add(value) {
1634
+ this.values.push(value);
1635
+ }
1636
+ set(values) {
1637
+ this.values = values;
1638
+ }
1639
+ remove(value) {
1640
+ this.values = this.values.filter((v4) => v4 !== value);
1641
+ }
1642
+ toString() {
1643
+ return this.values.map((v4) => v4.includes(",") || v4.includes(" ") ? `"${v4}"` : v4).join(", ");
1644
+ }
1645
+ get() {
1646
+ return this.values;
1647
+ }
1648
+ };
1649
+ var Fields = class {
1650
+ static {
1651
+ __name(this, "Fields");
1652
+ }
1653
+ entries = {};
1654
+ encoding;
1655
+ constructor({ fields = [], encoding = "utf-8" }) {
1656
+ fields.forEach(this.setField.bind(this));
1657
+ this.encoding = encoding;
1658
+ }
1659
+ setField(field) {
1660
+ this.entries[field.name.toLowerCase()] = field;
1661
+ }
1662
+ getField(name) {
1663
+ return this.entries[name.toLowerCase()];
1664
+ }
1665
+ removeField(name) {
1666
+ delete this.entries[name.toLowerCase()];
1667
+ }
1668
+ getByType(kind) {
1669
+ return Object.values(this.entries).filter((field) => field.kind === kind);
1670
+ }
1671
+ };
1672
+ var HttpRequest10 = class _HttpRequest {
1673
+ static {
1674
+ __name(this, "HttpRequest");
1675
+ }
1676
+ method;
1677
+ protocol;
1678
+ hostname;
1679
+ port;
1680
+ path;
1681
+ query;
1682
+ headers;
1683
+ username;
1684
+ password;
1685
+ fragment;
1686
+ body;
1687
+ constructor(options) {
1688
+ this.method = options.method || "GET";
1689
+ this.hostname = options.hostname || "localhost";
1690
+ this.port = options.port;
1691
+ this.query = options.query || {};
1692
+ this.headers = options.headers || {};
1693
+ this.body = options.body;
1694
+ this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
1695
+ this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
1696
+ this.username = options.username;
1697
+ this.password = options.password;
1698
+ this.fragment = options.fragment;
1699
+ }
1700
+ static clone(request2) {
1701
+ const cloned = new _HttpRequest({
1702
+ ...request2,
1703
+ headers: { ...request2.headers }
1704
+ });
1705
+ if (cloned.query) {
1706
+ cloned.query = cloneQuery(cloned.query);
1707
+ }
1708
+ return cloned;
1709
+ }
1710
+ static isInstance(request2) {
1711
+ if (!request2) {
1712
+ return false;
1713
+ }
1714
+ const req = request2;
1715
+ return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
1716
+ }
1717
+ clone() {
1718
+ return _HttpRequest.clone(this);
1719
+ }
1720
+ };
1721
+ function cloneQuery(query) {
1722
+ return Object.keys(query).reduce((carry, paramName) => {
1723
+ const param = query[paramName];
1724
+ return {
1725
+ ...carry,
1726
+ [paramName]: Array.isArray(param) ? [...param] : param
1727
+ };
1728
+ }, {});
1729
+ }
1730
+ __name(cloneQuery, "cloneQuery");
1731
+ var HttpResponse4 = class {
1732
+ static {
1733
+ __name(this, "HttpResponse");
1734
+ }
1735
+ statusCode;
1736
+ reason;
1737
+ headers;
1738
+ body;
1739
+ constructor(options) {
1740
+ this.statusCode = options.statusCode;
1741
+ this.reason = options.reason;
1742
+ this.headers = options.headers || {};
1743
+ this.body = options.body;
1744
+ }
1745
+ static isInstance(response) {
1746
+ if (!response)
1747
+ return false;
1748
+ const resp = response;
1749
+ return typeof resp.statusCode === "number" && typeof resp.headers === "object";
1750
+ }
1751
+ };
1752
+ function isValidHostname(hostname) {
1753
+ const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;
1754
+ return hostPattern.test(hostname);
1755
+ }
1756
+ __name(isValidHostname, "isValidHostname");
1757
+ exports2.Field = Field;
1758
+ exports2.Fields = Fields;
1759
+ exports2.HttpRequest = HttpRequest10;
1760
+ exports2.HttpResponse = HttpResponse4;
1761
+ exports2.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration4;
1762
+ exports2.isValidHostname = isValidHostname;
1763
+ exports2.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig4;
1764
+ }
1765
+ });
1766
+
1767
+ // node_modules/@smithy/middleware-serde/dist-cjs/index.js
1768
+ var require_dist_cjs10 = __commonJS({
1597
1769
  "node_modules/@smithy/middleware-serde/dist-cjs/index.js"(exports2) {
1598
1770
  "use strict";
1599
- var protocolHttp = require_dist_cjs3();
1771
+ var protocolHttp = require_dist_cjs9();
1600
1772
  var deserializerMiddleware = /* @__PURE__ */ __name((options, deserializer) => (next, context) => async (args) => {
1601
1773
  const { response } = await next(args);
1602
1774
  try {
@@ -1656,72 +1828,244 @@ var require_dist_cjs9 = __commonJS({
1656
1828
  if (!endpoint) {
1657
1829
  throw new Error("No valid endpoint provider available.");
1658
1830
  }
1659
- const request2 = await serializer(args.input, { ...options, endpoint });
1660
- return next({
1661
- ...args,
1662
- request: request2
1663
- });
1664
- }, "serializerMiddleware");
1665
- var deserializerMiddlewareOption2 = {
1666
- name: "deserializerMiddleware",
1667
- step: "deserialize",
1668
- tags: ["DESERIALIZER"],
1669
- override: true
1670
- };
1671
- var serializerMiddlewareOption3 = {
1672
- name: "serializerMiddleware",
1673
- step: "serialize",
1674
- tags: ["SERIALIZER"],
1675
- override: true
1831
+ const request2 = await serializer(args.input, { ...options, endpoint });
1832
+ return next({
1833
+ ...args,
1834
+ request: request2
1835
+ });
1836
+ }, "serializerMiddleware");
1837
+ var deserializerMiddlewareOption2 = {
1838
+ name: "deserializerMiddleware",
1839
+ step: "deserialize",
1840
+ tags: ["DESERIALIZER"],
1841
+ override: true
1842
+ };
1843
+ var serializerMiddlewareOption3 = {
1844
+ name: "serializerMiddleware",
1845
+ step: "serialize",
1846
+ tags: ["SERIALIZER"],
1847
+ override: true
1848
+ };
1849
+ function getSerdePlugin(config, serializer, deserializer) {
1850
+ return {
1851
+ applyToStack: /* @__PURE__ */ __name((commandStack) => {
1852
+ commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption2);
1853
+ commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption3);
1854
+ }, "applyToStack")
1855
+ };
1856
+ }
1857
+ __name(getSerdePlugin, "getSerdePlugin");
1858
+ exports2.deserializerMiddleware = deserializerMiddleware;
1859
+ exports2.deserializerMiddlewareOption = deserializerMiddlewareOption2;
1860
+ exports2.getSerdePlugin = getSerdePlugin;
1861
+ exports2.serializerMiddleware = serializerMiddleware;
1862
+ exports2.serializerMiddlewareOption = serializerMiddlewareOption3;
1863
+ }
1864
+ });
1865
+
1866
+ // node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js
1867
+ var import_middleware_serde, httpAuthSchemeMiddlewareOptions, getHttpAuthSchemePlugin;
1868
+ var init_getHttpAuthSchemePlugin = __esm({
1869
+ "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js"() {
1870
+ import_middleware_serde = __toESM(require_dist_cjs10());
1871
+ init_httpAuthSchemeMiddleware();
1872
+ httpAuthSchemeMiddlewareOptions = {
1873
+ step: "serialize",
1874
+ tags: ["HTTP_AUTH_SCHEME"],
1875
+ name: "httpAuthSchemeMiddleware",
1876
+ override: true,
1877
+ relation: "before",
1878
+ toMiddleware: import_middleware_serde.serializerMiddlewareOption.name
1879
+ };
1880
+ getHttpAuthSchemePlugin = /* @__PURE__ */ __name((config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({
1881
+ applyToStack: /* @__PURE__ */ __name((clientStack) => {
1882
+ clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {
1883
+ httpAuthSchemeParametersProvider,
1884
+ identityProviderConfigProvider
1885
+ }), httpAuthSchemeMiddlewareOptions);
1886
+ }, "applyToStack")
1887
+ }), "getHttpAuthSchemePlugin");
1888
+ }
1889
+ });
1890
+
1891
+ // node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js
1892
+ var init_middleware_http_auth_scheme = __esm({
1893
+ "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js"() {
1894
+ init_httpAuthSchemeMiddleware();
1895
+ init_getHttpAuthSchemeEndpointRuleSetPlugin();
1896
+ init_getHttpAuthSchemePlugin();
1897
+ }
1898
+ });
1899
+
1900
+ // node_modules/@smithy/core/node_modules/@smithy/protocol-http/dist-cjs/index.js
1901
+ var require_dist_cjs11 = __commonJS({
1902
+ "node_modules/@smithy/core/node_modules/@smithy/protocol-http/dist-cjs/index.js"(exports2) {
1903
+ "use strict";
1904
+ var types = require_dist_cjs();
1905
+ var getHttpHandlerExtensionConfiguration4 = /* @__PURE__ */ __name((runtimeConfig) => {
1906
+ return {
1907
+ setHttpHandler(handler2) {
1908
+ runtimeConfig.httpHandler = handler2;
1909
+ },
1910
+ httpHandler() {
1911
+ return runtimeConfig.httpHandler;
1912
+ },
1913
+ updateHttpClientConfig(key, value) {
1914
+ runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);
1915
+ },
1916
+ httpHandlerConfigs() {
1917
+ return runtimeConfig.httpHandler.httpHandlerConfigs();
1918
+ }
1919
+ };
1920
+ }, "getHttpHandlerExtensionConfiguration");
1921
+ var resolveHttpHandlerRuntimeConfig4 = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => {
1922
+ return {
1923
+ httpHandler: httpHandlerExtensionConfiguration.httpHandler()
1924
+ };
1925
+ }, "resolveHttpHandlerRuntimeConfig");
1926
+ var Field = class {
1927
+ static {
1928
+ __name(this, "Field");
1929
+ }
1930
+ name;
1931
+ kind;
1932
+ values;
1933
+ constructor({ name, kind = types.FieldPosition.HEADER, values = [] }) {
1934
+ this.name = name;
1935
+ this.kind = kind;
1936
+ this.values = values;
1937
+ }
1938
+ add(value) {
1939
+ this.values.push(value);
1940
+ }
1941
+ set(values) {
1942
+ this.values = values;
1943
+ }
1944
+ remove(value) {
1945
+ this.values = this.values.filter((v4) => v4 !== value);
1946
+ }
1947
+ toString() {
1948
+ return this.values.map((v4) => v4.includes(",") || v4.includes(" ") ? `"${v4}"` : v4).join(", ");
1949
+ }
1950
+ get() {
1951
+ return this.values;
1952
+ }
1953
+ };
1954
+ var Fields = class {
1955
+ static {
1956
+ __name(this, "Fields");
1957
+ }
1958
+ entries = {};
1959
+ encoding;
1960
+ constructor({ fields = [], encoding = "utf-8" }) {
1961
+ fields.forEach(this.setField.bind(this));
1962
+ this.encoding = encoding;
1963
+ }
1964
+ setField(field) {
1965
+ this.entries[field.name.toLowerCase()] = field;
1966
+ }
1967
+ getField(name) {
1968
+ return this.entries[name.toLowerCase()];
1969
+ }
1970
+ removeField(name) {
1971
+ delete this.entries[name.toLowerCase()];
1972
+ }
1973
+ getByType(kind) {
1974
+ return Object.values(this.entries).filter((field) => field.kind === kind);
1975
+ }
1976
+ };
1977
+ var HttpRequest10 = class _HttpRequest {
1978
+ static {
1979
+ __name(this, "HttpRequest");
1980
+ }
1981
+ method;
1982
+ protocol;
1983
+ hostname;
1984
+ port;
1985
+ path;
1986
+ query;
1987
+ headers;
1988
+ username;
1989
+ password;
1990
+ fragment;
1991
+ body;
1992
+ constructor(options) {
1993
+ this.method = options.method || "GET";
1994
+ this.hostname = options.hostname || "localhost";
1995
+ this.port = options.port;
1996
+ this.query = options.query || {};
1997
+ this.headers = options.headers || {};
1998
+ this.body = options.body;
1999
+ this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
2000
+ this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
2001
+ this.username = options.username;
2002
+ this.password = options.password;
2003
+ this.fragment = options.fragment;
2004
+ }
2005
+ static clone(request2) {
2006
+ const cloned = new _HttpRequest({
2007
+ ...request2,
2008
+ headers: { ...request2.headers }
2009
+ });
2010
+ if (cloned.query) {
2011
+ cloned.query = cloneQuery(cloned.query);
2012
+ }
2013
+ return cloned;
2014
+ }
2015
+ static isInstance(request2) {
2016
+ if (!request2) {
2017
+ return false;
2018
+ }
2019
+ const req = request2;
2020
+ return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
2021
+ }
2022
+ clone() {
2023
+ return _HttpRequest.clone(this);
2024
+ }
2025
+ };
2026
+ function cloneQuery(query) {
2027
+ return Object.keys(query).reduce((carry, paramName) => {
2028
+ const param = query[paramName];
2029
+ return {
2030
+ ...carry,
2031
+ [paramName]: Array.isArray(param) ? [...param] : param
2032
+ };
2033
+ }, {});
2034
+ }
2035
+ __name(cloneQuery, "cloneQuery");
2036
+ var HttpResponse4 = class {
2037
+ static {
2038
+ __name(this, "HttpResponse");
2039
+ }
2040
+ statusCode;
2041
+ reason;
2042
+ headers;
2043
+ body;
2044
+ constructor(options) {
2045
+ this.statusCode = options.statusCode;
2046
+ this.reason = options.reason;
2047
+ this.headers = options.headers || {};
2048
+ this.body = options.body;
2049
+ }
2050
+ static isInstance(response) {
2051
+ if (!response)
2052
+ return false;
2053
+ const resp = response;
2054
+ return typeof resp.statusCode === "number" && typeof resp.headers === "object";
2055
+ }
1676
2056
  };
1677
- function getSerdePlugin(config, serializer, deserializer) {
1678
- return {
1679
- applyToStack: /* @__PURE__ */ __name((commandStack) => {
1680
- commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption2);
1681
- commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption3);
1682
- }, "applyToStack")
1683
- };
2057
+ function isValidHostname(hostname) {
2058
+ const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;
2059
+ return hostPattern.test(hostname);
1684
2060
  }
1685
- __name(getSerdePlugin, "getSerdePlugin");
1686
- exports2.deserializerMiddleware = deserializerMiddleware;
1687
- exports2.deserializerMiddlewareOption = deserializerMiddlewareOption2;
1688
- exports2.getSerdePlugin = getSerdePlugin;
1689
- exports2.serializerMiddleware = serializerMiddleware;
1690
- exports2.serializerMiddlewareOption = serializerMiddlewareOption3;
1691
- }
1692
- });
1693
-
1694
- // node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js
1695
- var import_middleware_serde, httpAuthSchemeMiddlewareOptions, getHttpAuthSchemePlugin;
1696
- var init_getHttpAuthSchemePlugin = __esm({
1697
- "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js"() {
1698
- import_middleware_serde = __toESM(require_dist_cjs9());
1699
- init_httpAuthSchemeMiddleware();
1700
- httpAuthSchemeMiddlewareOptions = {
1701
- step: "serialize",
1702
- tags: ["HTTP_AUTH_SCHEME"],
1703
- name: "httpAuthSchemeMiddleware",
1704
- override: true,
1705
- relation: "before",
1706
- toMiddleware: import_middleware_serde.serializerMiddlewareOption.name
1707
- };
1708
- getHttpAuthSchemePlugin = /* @__PURE__ */ __name((config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({
1709
- applyToStack: /* @__PURE__ */ __name((clientStack) => {
1710
- clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {
1711
- httpAuthSchemeParametersProvider,
1712
- identityProviderConfigProvider
1713
- }), httpAuthSchemeMiddlewareOptions);
1714
- }, "applyToStack")
1715
- }), "getHttpAuthSchemePlugin");
1716
- }
1717
- });
1718
-
1719
- // node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js
1720
- var init_middleware_http_auth_scheme = __esm({
1721
- "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js"() {
1722
- init_httpAuthSchemeMiddleware();
1723
- init_getHttpAuthSchemeEndpointRuleSetPlugin();
1724
- init_getHttpAuthSchemePlugin();
2061
+ __name(isValidHostname, "isValidHostname");
2062
+ exports2.Field = Field;
2063
+ exports2.Fields = Fields;
2064
+ exports2.HttpRequest = HttpRequest10;
2065
+ exports2.HttpResponse = HttpResponse4;
2066
+ exports2.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration4;
2067
+ exports2.isValidHostname = isValidHostname;
2068
+ exports2.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig4;
1725
2069
  }
1726
2070
  });
1727
2071
 
@@ -1729,7 +2073,7 @@ var init_middleware_http_auth_scheme = __esm({
1729
2073
  var import_protocol_http, import_util_middleware3, defaultErrorHandler, defaultSuccessHandler, httpSigningMiddleware;
1730
2074
  var init_httpSigningMiddleware = __esm({
1731
2075
  "node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js"() {
1732
- import_protocol_http = __toESM(require_dist_cjs3());
2076
+ import_protocol_http = __toESM(require_dist_cjs11());
1733
2077
  import_util_middleware3 = __toESM(require_dist_cjs2());
1734
2078
  defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error2) => {
1735
2079
  throw error2;
@@ -1848,7 +2192,7 @@ var init_createPaginator = __esm({
1848
2192
  });
1849
2193
 
1850
2194
  // node_modules/@smithy/is-array-buffer/dist-cjs/index.js
1851
- var require_dist_cjs10 = __commonJS({
2195
+ var require_dist_cjs12 = __commonJS({
1852
2196
  "node_modules/@smithy/is-array-buffer/dist-cjs/index.js"(exports2) {
1853
2197
  "use strict";
1854
2198
  var isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer");
@@ -1857,10 +2201,10 @@ var require_dist_cjs10 = __commonJS({
1857
2201
  });
1858
2202
 
1859
2203
  // node_modules/@smithy/util-buffer-from/dist-cjs/index.js
1860
- var require_dist_cjs11 = __commonJS({
2204
+ var require_dist_cjs13 = __commonJS({
1861
2205
  "node_modules/@smithy/util-buffer-from/dist-cjs/index.js"(exports2) {
1862
2206
  "use strict";
1863
- var isArrayBuffer = require_dist_cjs10();
2207
+ var isArrayBuffer = require_dist_cjs12();
1864
2208
  var buffer = require("buffer");
1865
2209
  var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => {
1866
2210
  if (!isArrayBuffer.isArrayBuffer(input)) {
@@ -1885,7 +2229,7 @@ var require_fromBase64 = __commonJS({
1885
2229
  "use strict";
1886
2230
  Object.defineProperty(exports2, "__esModule", { value: true });
1887
2231
  exports2.fromBase64 = void 0;
1888
- var util_buffer_from_1 = require_dist_cjs11();
2232
+ var util_buffer_from_1 = require_dist_cjs13();
1889
2233
  var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;
1890
2234
  var fromBase648 = /* @__PURE__ */ __name((input) => {
1891
2235
  if (input.length * 3 % 4 !== 0) {
@@ -1902,10 +2246,10 @@ var require_fromBase64 = __commonJS({
1902
2246
  });
1903
2247
 
1904
2248
  // node_modules/@smithy/util-utf8/dist-cjs/index.js
1905
- var require_dist_cjs12 = __commonJS({
2249
+ var require_dist_cjs14 = __commonJS({
1906
2250
  "node_modules/@smithy/util-utf8/dist-cjs/index.js"(exports2) {
1907
2251
  "use strict";
1908
- var utilBufferFrom = require_dist_cjs11();
2252
+ var utilBufferFrom = require_dist_cjs13();
1909
2253
  var fromUtf87 = /* @__PURE__ */ __name((input) => {
1910
2254
  const buf = utilBufferFrom.fromString(input, "utf8");
1911
2255
  return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
@@ -1940,8 +2284,8 @@ var require_toBase64 = __commonJS({
1940
2284
  "use strict";
1941
2285
  Object.defineProperty(exports2, "__esModule", { value: true });
1942
2286
  exports2.toBase64 = void 0;
1943
- var util_buffer_from_1 = require_dist_cjs11();
1944
- var util_utf8_1 = require_dist_cjs12();
2287
+ var util_buffer_from_1 = require_dist_cjs13();
2288
+ var util_utf8_1 = require_dist_cjs14();
1945
2289
  var toBase648 = /* @__PURE__ */ __name((_input) => {
1946
2290
  let input;
1947
2291
  if (typeof _input === "string") {
@@ -1959,7 +2303,7 @@ var require_toBase64 = __commonJS({
1959
2303
  });
1960
2304
 
1961
2305
  // node_modules/@smithy/util-base64/dist-cjs/index.js
1962
- var require_dist_cjs13 = __commonJS({
2306
+ var require_dist_cjs15 = __commonJS({
1963
2307
  "node_modules/@smithy/util-base64/dist-cjs/index.js"(exports2) {
1964
2308
  "use strict";
1965
2309
  var fromBase648 = require_fromBase64();
@@ -1989,7 +2333,7 @@ var require_ChecksumStream = __commonJS({
1989
2333
  "use strict";
1990
2334
  Object.defineProperty(exports2, "__esModule", { value: true });
1991
2335
  exports2.ChecksumStream = void 0;
1992
- var util_base64_1 = require_dist_cjs13();
2336
+ var util_base64_1 = require_dist_cjs15();
1993
2337
  var stream_1 = require("stream");
1994
2338
  var ChecksumStream = class extends stream_1.Duplex {
1995
2339
  static {
@@ -2080,7 +2424,7 @@ var require_createChecksumStream_browser = __commonJS({
2080
2424
  "use strict";
2081
2425
  Object.defineProperty(exports2, "__esModule", { value: true });
2082
2426
  exports2.createChecksumStream = void 0;
2083
- var util_base64_1 = require_dist_cjs13();
2427
+ var util_base64_1 = require_dist_cjs15();
2084
2428
  var stream_type_check_1 = require_stream_type_check();
2085
2429
  var ChecksumStream_browser_1 = require_ChecksumStream_browser();
2086
2430
  var createChecksumStream = /* @__PURE__ */ __name(({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => {
@@ -2194,7 +2538,7 @@ var require_createBufferedReadableStream = __commonJS({
2194
2538
  exports2.sizeOf = sizeOf;
2195
2539
  exports2.modeOf = modeOf;
2196
2540
  var ByteArrayCollector_1 = require_ByteArrayCollector();
2197
- function createBufferedReadableStream(upstream, size, logger21) {
2541
+ function createBufferedReadableStream(upstream, size, logger25) {
2198
2542
  const reader = upstream.getReader();
2199
2543
  let streamBufferingLoggedWarning = false;
2200
2544
  let bytesSeen = 0;
@@ -2232,7 +2576,7 @@ var require_createBufferedReadableStream = __commonJS({
2232
2576
  const newSize = merge(buffers, mode, chunk);
2233
2577
  if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {
2234
2578
  streamBufferingLoggedWarning = true;
2235
- logger21?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);
2579
+ logger25?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);
2236
2580
  }
2237
2581
  if (newSize >= size) {
2238
2582
  controller.enqueue(flush(buffers, mode));
@@ -2303,9 +2647,9 @@ var require_createBufferedReadable = __commonJS({
2303
2647
  var ByteArrayCollector_1 = require_ByteArrayCollector();
2304
2648
  var createBufferedReadableStream_1 = require_createBufferedReadableStream();
2305
2649
  var stream_type_check_1 = require_stream_type_check();
2306
- function createBufferedReadable(upstream, size, logger21) {
2650
+ function createBufferedReadable(upstream, size, logger25) {
2307
2651
  if ((0, stream_type_check_1.isReadableStream)(upstream)) {
2308
- return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger21);
2652
+ return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger25);
2309
2653
  }
2310
2654
  const downstream = new node_stream_1.Readable({ read() {
2311
2655
  } });
@@ -2338,7 +2682,7 @@ var require_createBufferedReadable = __commonJS({
2338
2682
  const newSize = (0, createBufferedReadableStream_1.merge)(buffers, mode, chunk);
2339
2683
  if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {
2340
2684
  streamBufferingLoggedWarning = true;
2341
- logger21?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);
2685
+ logger25?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);
2342
2686
  }
2343
2687
  if (newSize >= size) {
2344
2688
  downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode));
@@ -2418,79 +2762,251 @@ var require_headStream_browser = __commonJS({
2418
2762
  if (byteLengthCounter >= bytes) {
2419
2763
  break;
2420
2764
  }
2421
- isDone = done;
2765
+ isDone = done;
2766
+ }
2767
+ reader.releaseLock();
2768
+ const collected = new Uint8Array(Math.min(bytes, byteLengthCounter));
2769
+ let offset = 0;
2770
+ for (const chunk of chunks) {
2771
+ if (chunk.byteLength > collected.byteLength - offset) {
2772
+ collected.set(chunk.subarray(0, collected.byteLength - offset), offset);
2773
+ break;
2774
+ } else {
2775
+ collected.set(chunk, offset);
2776
+ }
2777
+ offset += chunk.length;
2778
+ }
2779
+ return collected;
2780
+ }
2781
+ __name(headStream, "headStream");
2782
+ }
2783
+ });
2784
+
2785
+ // node_modules/@smithy/util-stream/dist-cjs/headStream.js
2786
+ var require_headStream = __commonJS({
2787
+ "node_modules/@smithy/util-stream/dist-cjs/headStream.js"(exports2) {
2788
+ "use strict";
2789
+ Object.defineProperty(exports2, "__esModule", { value: true });
2790
+ exports2.headStream = void 0;
2791
+ var stream_1 = require("stream");
2792
+ var headStream_browser_1 = require_headStream_browser();
2793
+ var stream_type_check_1 = require_stream_type_check();
2794
+ var headStream = /* @__PURE__ */ __name((stream, bytes) => {
2795
+ if ((0, stream_type_check_1.isReadableStream)(stream)) {
2796
+ return (0, headStream_browser_1.headStream)(stream, bytes);
2797
+ }
2798
+ return new Promise((resolve, reject) => {
2799
+ const collector = new Collector();
2800
+ collector.limit = bytes;
2801
+ stream.pipe(collector);
2802
+ stream.on("error", (err2) => {
2803
+ collector.end();
2804
+ reject(err2);
2805
+ });
2806
+ collector.on("error", reject);
2807
+ collector.on("finish", function() {
2808
+ const bytes2 = new Uint8Array(Buffer.concat(this.buffers));
2809
+ resolve(bytes2);
2810
+ });
2811
+ });
2812
+ }, "headStream");
2813
+ exports2.headStream = headStream;
2814
+ var Collector = class extends stream_1.Writable {
2815
+ static {
2816
+ __name(this, "Collector");
2817
+ }
2818
+ buffers = [];
2819
+ limit = Infinity;
2820
+ bytesBuffered = 0;
2821
+ _write(chunk, encoding, callback) {
2822
+ this.buffers.push(chunk);
2823
+ this.bytesBuffered += chunk.byteLength ?? 0;
2824
+ if (this.bytesBuffered >= this.limit) {
2825
+ const excess = this.bytesBuffered - this.limit;
2826
+ const tailBuffer = this.buffers[this.buffers.length - 1];
2827
+ this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess);
2828
+ this.emit("finish");
2829
+ }
2830
+ callback();
2831
+ }
2832
+ };
2833
+ }
2834
+ });
2835
+
2836
+ // node_modules/@smithy/node-http-handler/node_modules/@smithy/protocol-http/dist-cjs/index.js
2837
+ var require_dist_cjs16 = __commonJS({
2838
+ "node_modules/@smithy/node-http-handler/node_modules/@smithy/protocol-http/dist-cjs/index.js"(exports2) {
2839
+ "use strict";
2840
+ var types = require_dist_cjs();
2841
+ var getHttpHandlerExtensionConfiguration4 = /* @__PURE__ */ __name((runtimeConfig) => {
2842
+ return {
2843
+ setHttpHandler(handler2) {
2844
+ runtimeConfig.httpHandler = handler2;
2845
+ },
2846
+ httpHandler() {
2847
+ return runtimeConfig.httpHandler;
2848
+ },
2849
+ updateHttpClientConfig(key, value) {
2850
+ runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);
2851
+ },
2852
+ httpHandlerConfigs() {
2853
+ return runtimeConfig.httpHandler.httpHandlerConfigs();
2854
+ }
2855
+ };
2856
+ }, "getHttpHandlerExtensionConfiguration");
2857
+ var resolveHttpHandlerRuntimeConfig4 = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => {
2858
+ return {
2859
+ httpHandler: httpHandlerExtensionConfiguration.httpHandler()
2860
+ };
2861
+ }, "resolveHttpHandlerRuntimeConfig");
2862
+ var Field = class {
2863
+ static {
2864
+ __name(this, "Field");
2865
+ }
2866
+ name;
2867
+ kind;
2868
+ values;
2869
+ constructor({ name, kind = types.FieldPosition.HEADER, values = [] }) {
2870
+ this.name = name;
2871
+ this.kind = kind;
2872
+ this.values = values;
2873
+ }
2874
+ add(value) {
2875
+ this.values.push(value);
2876
+ }
2877
+ set(values) {
2878
+ this.values = values;
2879
+ }
2880
+ remove(value) {
2881
+ this.values = this.values.filter((v4) => v4 !== value);
2882
+ }
2883
+ toString() {
2884
+ return this.values.map((v4) => v4.includes(",") || v4.includes(" ") ? `"${v4}"` : v4).join(", ");
2885
+ }
2886
+ get() {
2887
+ return this.values;
2888
+ }
2889
+ };
2890
+ var Fields = class {
2891
+ static {
2892
+ __name(this, "Fields");
2893
+ }
2894
+ entries = {};
2895
+ encoding;
2896
+ constructor({ fields = [], encoding = "utf-8" }) {
2897
+ fields.forEach(this.setField.bind(this));
2898
+ this.encoding = encoding;
2899
+ }
2900
+ setField(field) {
2901
+ this.entries[field.name.toLowerCase()] = field;
2902
+ }
2903
+ getField(name) {
2904
+ return this.entries[name.toLowerCase()];
2905
+ }
2906
+ removeField(name) {
2907
+ delete this.entries[name.toLowerCase()];
2908
+ }
2909
+ getByType(kind) {
2910
+ return Object.values(this.entries).filter((field) => field.kind === kind);
2911
+ }
2912
+ };
2913
+ var HttpRequest10 = class _HttpRequest {
2914
+ static {
2915
+ __name(this, "HttpRequest");
2916
+ }
2917
+ method;
2918
+ protocol;
2919
+ hostname;
2920
+ port;
2921
+ path;
2922
+ query;
2923
+ headers;
2924
+ username;
2925
+ password;
2926
+ fragment;
2927
+ body;
2928
+ constructor(options) {
2929
+ this.method = options.method || "GET";
2930
+ this.hostname = options.hostname || "localhost";
2931
+ this.port = options.port;
2932
+ this.query = options.query || {};
2933
+ this.headers = options.headers || {};
2934
+ this.body = options.body;
2935
+ this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
2936
+ this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
2937
+ this.username = options.username;
2938
+ this.password = options.password;
2939
+ this.fragment = options.fragment;
2940
+ }
2941
+ static clone(request2) {
2942
+ const cloned = new _HttpRequest({
2943
+ ...request2,
2944
+ headers: { ...request2.headers }
2945
+ });
2946
+ if (cloned.query) {
2947
+ cloned.query = cloneQuery(cloned.query);
2948
+ }
2949
+ return cloned;
2422
2950
  }
2423
- reader.releaseLock();
2424
- const collected = new Uint8Array(Math.min(bytes, byteLengthCounter));
2425
- let offset = 0;
2426
- for (const chunk of chunks) {
2427
- if (chunk.byteLength > collected.byteLength - offset) {
2428
- collected.set(chunk.subarray(0, collected.byteLength - offset), offset);
2429
- break;
2430
- } else {
2431
- collected.set(chunk, offset);
2951
+ static isInstance(request2) {
2952
+ if (!request2) {
2953
+ return false;
2432
2954
  }
2433
- offset += chunk.length;
2955
+ const req = request2;
2956
+ return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
2434
2957
  }
2435
- return collected;
2436
- }
2437
- __name(headStream, "headStream");
2438
- }
2439
- });
2440
-
2441
- // node_modules/@smithy/util-stream/dist-cjs/headStream.js
2442
- var require_headStream = __commonJS({
2443
- "node_modules/@smithy/util-stream/dist-cjs/headStream.js"(exports2) {
2444
- "use strict";
2445
- Object.defineProperty(exports2, "__esModule", { value: true });
2446
- exports2.headStream = void 0;
2447
- var stream_1 = require("stream");
2448
- var headStream_browser_1 = require_headStream_browser();
2449
- var stream_type_check_1 = require_stream_type_check();
2450
- var headStream = /* @__PURE__ */ __name((stream, bytes) => {
2451
- if ((0, stream_type_check_1.isReadableStream)(stream)) {
2452
- return (0, headStream_browser_1.headStream)(stream, bytes);
2958
+ clone() {
2959
+ return _HttpRequest.clone(this);
2453
2960
  }
2454
- return new Promise((resolve, reject) => {
2455
- const collector = new Collector();
2456
- collector.limit = bytes;
2457
- stream.pipe(collector);
2458
- stream.on("error", (err2) => {
2459
- collector.end();
2460
- reject(err2);
2461
- });
2462
- collector.on("error", reject);
2463
- collector.on("finish", function() {
2464
- const bytes2 = new Uint8Array(Buffer.concat(this.buffers));
2465
- resolve(bytes2);
2466
- });
2467
- });
2468
- }, "headStream");
2469
- exports2.headStream = headStream;
2470
- var Collector = class extends stream_1.Writable {
2961
+ };
2962
+ function cloneQuery(query) {
2963
+ return Object.keys(query).reduce((carry, paramName) => {
2964
+ const param = query[paramName];
2965
+ return {
2966
+ ...carry,
2967
+ [paramName]: Array.isArray(param) ? [...param] : param
2968
+ };
2969
+ }, {});
2970
+ }
2971
+ __name(cloneQuery, "cloneQuery");
2972
+ var HttpResponse4 = class {
2471
2973
  static {
2472
- __name(this, "Collector");
2974
+ __name(this, "HttpResponse");
2473
2975
  }
2474
- buffers = [];
2475
- limit = Infinity;
2476
- bytesBuffered = 0;
2477
- _write(chunk, encoding, callback) {
2478
- this.buffers.push(chunk);
2479
- this.bytesBuffered += chunk.byteLength ?? 0;
2480
- if (this.bytesBuffered >= this.limit) {
2481
- const excess = this.bytesBuffered - this.limit;
2482
- const tailBuffer = this.buffers[this.buffers.length - 1];
2483
- this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess);
2484
- this.emit("finish");
2485
- }
2486
- callback();
2976
+ statusCode;
2977
+ reason;
2978
+ headers;
2979
+ body;
2980
+ constructor(options) {
2981
+ this.statusCode = options.statusCode;
2982
+ this.reason = options.reason;
2983
+ this.headers = options.headers || {};
2984
+ this.body = options.body;
2985
+ }
2986
+ static isInstance(response) {
2987
+ if (!response)
2988
+ return false;
2989
+ const resp = response;
2990
+ return typeof resp.statusCode === "number" && typeof resp.headers === "object";
2487
2991
  }
2488
2992
  };
2993
+ function isValidHostname(hostname) {
2994
+ const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;
2995
+ return hostPattern.test(hostname);
2996
+ }
2997
+ __name(isValidHostname, "isValidHostname");
2998
+ exports2.Field = Field;
2999
+ exports2.Fields = Fields;
3000
+ exports2.HttpRequest = HttpRequest10;
3001
+ exports2.HttpResponse = HttpResponse4;
3002
+ exports2.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration4;
3003
+ exports2.isValidHostname = isValidHostname;
3004
+ exports2.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig4;
2489
3005
  }
2490
3006
  });
2491
3007
 
2492
3008
  // node_modules/@smithy/util-uri-escape/dist-cjs/index.js
2493
- var require_dist_cjs14 = __commonJS({
3009
+ var require_dist_cjs17 = __commonJS({
2494
3010
  "node_modules/@smithy/util-uri-escape/dist-cjs/index.js"(exports2) {
2495
3011
  "use strict";
2496
3012
  var escapeUri = /* @__PURE__ */ __name((uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode), "escapeUri");
@@ -2502,10 +3018,10 @@ var require_dist_cjs14 = __commonJS({
2502
3018
  });
2503
3019
 
2504
3020
  // node_modules/@smithy/querystring-builder/dist-cjs/index.js
2505
- var require_dist_cjs15 = __commonJS({
3021
+ var require_dist_cjs18 = __commonJS({
2506
3022
  "node_modules/@smithy/querystring-builder/dist-cjs/index.js"(exports2) {
2507
3023
  "use strict";
2508
- var utilUriEscape = require_dist_cjs14();
3024
+ var utilUriEscape = require_dist_cjs17();
2509
3025
  function buildQueryString(query) {
2510
3026
  const parts = [];
2511
3027
  for (let key of Object.keys(query).sort()) {
@@ -2531,11 +3047,11 @@ var require_dist_cjs15 = __commonJS({
2531
3047
  });
2532
3048
 
2533
3049
  // node_modules/@smithy/node-http-handler/dist-cjs/index.js
2534
- var require_dist_cjs16 = __commonJS({
3050
+ var require_dist_cjs19 = __commonJS({
2535
3051
  "node_modules/@smithy/node-http-handler/dist-cjs/index.js"(exports2) {
2536
3052
  "use strict";
2537
- var protocolHttp = require_dist_cjs3();
2538
- var querystringBuilder = require_dist_cjs15();
3053
+ var protocolHttp = require_dist_cjs16();
3054
+ var querystringBuilder = require_dist_cjs18();
2539
3055
  var http = require("http");
2540
3056
  var https = require("https");
2541
3057
  var stream = require("stream");
@@ -2586,7 +3102,7 @@ var require_dist_cjs16 = __commonJS({
2586
3102
  }
2587
3103
  return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2);
2588
3104
  }, "setConnectionTimeout");
2589
- var setRequestTimeout = /* @__PURE__ */ __name((req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger21) => {
3105
+ var setRequestTimeout = /* @__PURE__ */ __name((req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger25) => {
2590
3106
  if (timeoutInMs) {
2591
3107
  return timing.setTimeout(() => {
2592
3108
  let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`;
@@ -2599,7 +3115,7 @@ var require_dist_cjs16 = __commonJS({
2599
3115
  reject(error2);
2600
3116
  } else {
2601
3117
  msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`;
2602
- logger21?.warn?.(msg);
3118
+ logger25?.warn?.(msg);
2603
3119
  }
2604
3120
  }, timeoutInMs);
2605
3121
  }
@@ -2715,7 +3231,7 @@ var require_dist_cjs16 = __commonJS({
2715
3231
  }
2716
3232
  return new _NodeHttpHandler(instanceOrOptions);
2717
3233
  }
2718
- static checkSocketUsage(agent, socketWarningTimestamp, logger21 = console) {
3234
+ static checkSocketUsage(agent, socketWarningTimestamp, logger25 = console) {
2719
3235
  const { sockets, requests, maxSockets } = agent;
2720
3236
  if (typeof maxSockets !== "number" || maxSockets === Infinity) {
2721
3237
  return socketWarningTimestamp;
@@ -2729,7 +3245,7 @@ var require_dist_cjs16 = __commonJS({
2729
3245
  const socketsInUse = sockets[origin]?.length ?? 0;
2730
3246
  const requestsEnqueued = requests[origin]?.length ?? 0;
2731
3247
  if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
2732
- logger21?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.
3248
+ logger25?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.
2733
3249
  See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
2734
3250
  or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);
2735
3251
  return Date.now();
@@ -3231,31 +3747,203 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
3231
3747
  chunks.push(value);
3232
3748
  length += value.length;
3233
3749
  }
3234
- isDone = done;
3750
+ isDone = done;
3751
+ }
3752
+ const collected = new Uint8Array(length);
3753
+ let offset = 0;
3754
+ for (const chunk of chunks) {
3755
+ collected.set(chunk, offset);
3756
+ offset += chunk.length;
3757
+ }
3758
+ return collected;
3759
+ }
3760
+ __name(collectReadableStream, "collectReadableStream");
3761
+ exports2.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT;
3762
+ exports2.NodeHttp2Handler = NodeHttp2Handler;
3763
+ exports2.NodeHttpHandler = NodeHttpHandler;
3764
+ exports2.streamCollector = streamCollector4;
3765
+ }
3766
+ });
3767
+
3768
+ // node_modules/@smithy/fetch-http-handler/node_modules/@smithy/protocol-http/dist-cjs/index.js
3769
+ var require_dist_cjs20 = __commonJS({
3770
+ "node_modules/@smithy/fetch-http-handler/node_modules/@smithy/protocol-http/dist-cjs/index.js"(exports2) {
3771
+ "use strict";
3772
+ var types = require_dist_cjs();
3773
+ var getHttpHandlerExtensionConfiguration4 = /* @__PURE__ */ __name((runtimeConfig) => {
3774
+ return {
3775
+ setHttpHandler(handler2) {
3776
+ runtimeConfig.httpHandler = handler2;
3777
+ },
3778
+ httpHandler() {
3779
+ return runtimeConfig.httpHandler;
3780
+ },
3781
+ updateHttpClientConfig(key, value) {
3782
+ runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);
3783
+ },
3784
+ httpHandlerConfigs() {
3785
+ return runtimeConfig.httpHandler.httpHandlerConfigs();
3786
+ }
3787
+ };
3788
+ }, "getHttpHandlerExtensionConfiguration");
3789
+ var resolveHttpHandlerRuntimeConfig4 = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => {
3790
+ return {
3791
+ httpHandler: httpHandlerExtensionConfiguration.httpHandler()
3792
+ };
3793
+ }, "resolveHttpHandlerRuntimeConfig");
3794
+ var Field = class {
3795
+ static {
3796
+ __name(this, "Field");
3797
+ }
3798
+ name;
3799
+ kind;
3800
+ values;
3801
+ constructor({ name, kind = types.FieldPosition.HEADER, values = [] }) {
3802
+ this.name = name;
3803
+ this.kind = kind;
3804
+ this.values = values;
3805
+ }
3806
+ add(value) {
3807
+ this.values.push(value);
3808
+ }
3809
+ set(values) {
3810
+ this.values = values;
3811
+ }
3812
+ remove(value) {
3813
+ this.values = this.values.filter((v4) => v4 !== value);
3814
+ }
3815
+ toString() {
3816
+ return this.values.map((v4) => v4.includes(",") || v4.includes(" ") ? `"${v4}"` : v4).join(", ");
3817
+ }
3818
+ get() {
3819
+ return this.values;
3820
+ }
3821
+ };
3822
+ var Fields = class {
3823
+ static {
3824
+ __name(this, "Fields");
3825
+ }
3826
+ entries = {};
3827
+ encoding;
3828
+ constructor({ fields = [], encoding = "utf-8" }) {
3829
+ fields.forEach(this.setField.bind(this));
3830
+ this.encoding = encoding;
3831
+ }
3832
+ setField(field) {
3833
+ this.entries[field.name.toLowerCase()] = field;
3834
+ }
3835
+ getField(name) {
3836
+ return this.entries[name.toLowerCase()];
3837
+ }
3838
+ removeField(name) {
3839
+ delete this.entries[name.toLowerCase()];
3840
+ }
3841
+ getByType(kind) {
3842
+ return Object.values(this.entries).filter((field) => field.kind === kind);
3843
+ }
3844
+ };
3845
+ var HttpRequest10 = class _HttpRequest {
3846
+ static {
3847
+ __name(this, "HttpRequest");
3848
+ }
3849
+ method;
3850
+ protocol;
3851
+ hostname;
3852
+ port;
3853
+ path;
3854
+ query;
3855
+ headers;
3856
+ username;
3857
+ password;
3858
+ fragment;
3859
+ body;
3860
+ constructor(options) {
3861
+ this.method = options.method || "GET";
3862
+ this.hostname = options.hostname || "localhost";
3863
+ this.port = options.port;
3864
+ this.query = options.query || {};
3865
+ this.headers = options.headers || {};
3866
+ this.body = options.body;
3867
+ this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
3868
+ this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
3869
+ this.username = options.username;
3870
+ this.password = options.password;
3871
+ this.fragment = options.fragment;
3872
+ }
3873
+ static clone(request2) {
3874
+ const cloned = new _HttpRequest({
3875
+ ...request2,
3876
+ headers: { ...request2.headers }
3877
+ });
3878
+ if (cloned.query) {
3879
+ cloned.query = cloneQuery(cloned.query);
3880
+ }
3881
+ return cloned;
3882
+ }
3883
+ static isInstance(request2) {
3884
+ if (!request2) {
3885
+ return false;
3886
+ }
3887
+ const req = request2;
3888
+ return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
3235
3889
  }
3236
- const collected = new Uint8Array(length);
3237
- let offset = 0;
3238
- for (const chunk of chunks) {
3239
- collected.set(chunk, offset);
3240
- offset += chunk.length;
3890
+ clone() {
3891
+ return _HttpRequest.clone(this);
3241
3892
  }
3242
- return collected;
3893
+ };
3894
+ function cloneQuery(query) {
3895
+ return Object.keys(query).reduce((carry, paramName) => {
3896
+ const param = query[paramName];
3897
+ return {
3898
+ ...carry,
3899
+ [paramName]: Array.isArray(param) ? [...param] : param
3900
+ };
3901
+ }, {});
3243
3902
  }
3244
- __name(collectReadableStream, "collectReadableStream");
3245
- exports2.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT;
3246
- exports2.NodeHttp2Handler = NodeHttp2Handler;
3247
- exports2.NodeHttpHandler = NodeHttpHandler;
3248
- exports2.streamCollector = streamCollector4;
3903
+ __name(cloneQuery, "cloneQuery");
3904
+ var HttpResponse4 = class {
3905
+ static {
3906
+ __name(this, "HttpResponse");
3907
+ }
3908
+ statusCode;
3909
+ reason;
3910
+ headers;
3911
+ body;
3912
+ constructor(options) {
3913
+ this.statusCode = options.statusCode;
3914
+ this.reason = options.reason;
3915
+ this.headers = options.headers || {};
3916
+ this.body = options.body;
3917
+ }
3918
+ static isInstance(response) {
3919
+ if (!response)
3920
+ return false;
3921
+ const resp = response;
3922
+ return typeof resp.statusCode === "number" && typeof resp.headers === "object";
3923
+ }
3924
+ };
3925
+ function isValidHostname(hostname) {
3926
+ const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;
3927
+ return hostPattern.test(hostname);
3928
+ }
3929
+ __name(isValidHostname, "isValidHostname");
3930
+ exports2.Field = Field;
3931
+ exports2.Fields = Fields;
3932
+ exports2.HttpRequest = HttpRequest10;
3933
+ exports2.HttpResponse = HttpResponse4;
3934
+ exports2.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration4;
3935
+ exports2.isValidHostname = isValidHostname;
3936
+ exports2.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig4;
3249
3937
  }
3250
3938
  });
3251
3939
 
3252
3940
  // node_modules/@smithy/fetch-http-handler/dist-cjs/index.js
3253
- var require_dist_cjs17 = __commonJS({
3941
+ var require_dist_cjs21 = __commonJS({
3254
3942
  "node_modules/@smithy/fetch-http-handler/dist-cjs/index.js"(exports2) {
3255
3943
  "use strict";
3256
- var protocolHttp = require_dist_cjs3();
3257
- var querystringBuilder = require_dist_cjs15();
3258
- var utilBase64 = require_dist_cjs13();
3944
+ var protocolHttp = require_dist_cjs20();
3945
+ var querystringBuilder = require_dist_cjs18();
3946
+ var utilBase64 = require_dist_cjs15();
3259
3947
  function createRequest(url, requestOptions) {
3260
3948
  return new Request(url, requestOptions);
3261
3949
  }
@@ -3473,7 +4161,7 @@ var require_dist_cjs17 = __commonJS({
3473
4161
  });
3474
4162
 
3475
4163
  // node_modules/@smithy/util-hex-encoding/dist-cjs/index.js
3476
- var require_dist_cjs18 = __commonJS({
4164
+ var require_dist_cjs22 = __commonJS({
3477
4165
  "node_modules/@smithy/util-hex-encoding/dist-cjs/index.js"(exports2) {
3478
4166
  "use strict";
3479
4167
  var SHORT_TO_HEX = {};
@@ -3521,10 +4209,10 @@ var require_sdk_stream_mixin_browser = __commonJS({
3521
4209
  "use strict";
3522
4210
  Object.defineProperty(exports2, "__esModule", { value: true });
3523
4211
  exports2.sdkStreamMixin = void 0;
3524
- var fetch_http_handler_1 = require_dist_cjs17();
3525
- var util_base64_1 = require_dist_cjs13();
3526
- var util_hex_encoding_1 = require_dist_cjs18();
3527
- var util_utf8_1 = require_dist_cjs12();
4212
+ var fetch_http_handler_1 = require_dist_cjs21();
4213
+ var util_base64_1 = require_dist_cjs15();
4214
+ var util_hex_encoding_1 = require_dist_cjs22();
4215
+ var util_utf8_1 = require_dist_cjs14();
3528
4216
  var stream_type_check_1 = require_stream_type_check();
3529
4217
  var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
3530
4218
  var sdkStreamMixin2 = /* @__PURE__ */ __name((stream) => {
@@ -3588,8 +4276,8 @@ var require_sdk_stream_mixin = __commonJS({
3588
4276
  "use strict";
3589
4277
  Object.defineProperty(exports2, "__esModule", { value: true });
3590
4278
  exports2.sdkStreamMixin = void 0;
3591
- var node_http_handler_1 = require_dist_cjs16();
3592
- var util_buffer_from_1 = require_dist_cjs11();
4279
+ var node_http_handler_1 = require_dist_cjs19();
4280
+ var util_buffer_from_1 = require_dist_cjs13();
3593
4281
  var stream_1 = require("stream");
3594
4282
  var sdk_stream_mixin_browser_1 = require_sdk_stream_mixin_browser();
3595
4283
  var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
@@ -3681,11 +4369,11 @@ var require_splitStream = __commonJS({
3681
4369
  });
3682
4370
 
3683
4371
  // node_modules/@smithy/util-stream/dist-cjs/index.js
3684
- var require_dist_cjs19 = __commonJS({
4372
+ var require_dist_cjs23 = __commonJS({
3685
4373
  "node_modules/@smithy/util-stream/dist-cjs/index.js"(exports2) {
3686
4374
  "use strict";
3687
- var utilBase64 = require_dist_cjs13();
3688
- var utilUtf8 = require_dist_cjs12();
4375
+ var utilBase64 = require_dist_cjs15();
4376
+ var utilUtf8 = require_dist_cjs14();
3689
4377
  var ChecksumStream = require_ChecksumStream();
3690
4378
  var createChecksumStream = require_createChecksumStream();
3691
4379
  var createBufferedReadable = require_createBufferedReadable();
@@ -3790,7 +4478,7 @@ var require_dist_cjs19 = __commonJS({
3790
4478
  var import_util_stream, collectBody;
3791
4479
  var init_collect_stream_body = __esm({
3792
4480
  "node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js"() {
3793
- import_util_stream = __toESM(require_dist_cjs19());
4481
+ import_util_stream = __toESM(require_dist_cjs23());
3794
4482
  collectBody = /* @__PURE__ */ __name(async (streamBody = new Uint8Array(), context) => {
3795
4483
  if (streamBody instanceof Uint8Array) {
3796
4484
  return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody);
@@ -3847,7 +4535,7 @@ var init_operation = __esm({
3847
4535
  var import_protocol_http2, import_util_middleware4, schemaDeserializationMiddleware, findHeader;
3848
4536
  var init_schemaDeserializationMiddleware = __esm({
3849
4537
  "node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js"() {
3850
- import_protocol_http2 = __toESM(require_dist_cjs3());
4538
+ import_protocol_http2 = __toESM(require_dist_cjs11());
3851
4539
  import_util_middleware4 = __toESM(require_dist_cjs2());
3852
4540
  init_operation();
3853
4541
  schemaDeserializationMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => {
@@ -4274,7 +4962,12 @@ var init_NormalizedSchema = __esm({
4274
4962
  }
4275
4963
  isStructSchema() {
4276
4964
  const sc = this.getSchema();
4277
- return sc[0] === 3 || sc[0] === -3;
4965
+ const id = sc[0];
4966
+ return id === 3 || id === -3 || id === 4;
4967
+ }
4968
+ isUnionSchema() {
4969
+ const sc = this.getSchema();
4970
+ return sc[0] === 4;
4278
4971
  }
4279
4972
  isBlobSchema() {
4280
4973
  const sc = this.getSchema();
@@ -5590,7 +6283,7 @@ var require_randomUUID = __commonJS({
5590
6283
  });
5591
6284
 
5592
6285
  // node_modules/@smithy/uuid/dist-cjs/index.js
5593
- var require_dist_cjs20 = __commonJS({
6286
+ var require_dist_cjs24 = __commonJS({
5594
6287
  "node_modules/@smithy/uuid/dist-cjs/index.js"(exports2) {
5595
6288
  "use strict";
5596
6289
  var randomUUID = require_randomUUID();
@@ -5613,7 +6306,7 @@ var require_dist_cjs20 = __commonJS({
5613
6306
  var import_uuid;
5614
6307
  var init_generateIdempotencyToken = __esm({
5615
6308
  "node_modules/@smithy/core/dist-es/submodules/serde/generateIdempotencyToken.js"() {
5616
- import_uuid = __toESM(require_dist_cjs20());
6309
+ import_uuid = __toESM(require_dist_cjs24());
5617
6310
  }
5618
6311
  });
5619
6312
 
@@ -5959,7 +6652,7 @@ var init_SerdeContext = __esm({
5959
6652
  var import_util_utf8, EventStreamSerde;
5960
6653
  var init_EventStreamSerde = __esm({
5961
6654
  "node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js"() {
5962
- import_util_utf8 = __toESM(require_dist_cjs12());
6655
+ import_util_utf8 = __toESM(require_dist_cjs14());
5963
6656
  EventStreamSerde = class {
5964
6657
  static {
5965
6658
  __name(this, "EventStreamSerde");
@@ -6209,7 +6902,7 @@ var import_protocol_http3, HttpProtocol;
6209
6902
  var init_HttpProtocol = __esm({
6210
6903
  "node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js"() {
6211
6904
  init_schema();
6212
- import_protocol_http3 = __toESM(require_dist_cjs3());
6905
+ import_protocol_http3 = __toESM(require_dist_cjs11());
6213
6906
  init_SerdeContext();
6214
6907
  HttpProtocol = class extends SerdeContext {
6215
6908
  static {
@@ -6341,8 +7034,8 @@ var init_HttpBindingProtocol = __esm({
6341
7034
  "node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js"() {
6342
7035
  init_schema();
6343
7036
  init_serde();
6344
- import_protocol_http4 = __toESM(require_dist_cjs3());
6345
- import_util_stream2 = __toESM(require_dist_cjs19());
7037
+ import_protocol_http4 = __toESM(require_dist_cjs11());
7038
+ import_util_stream2 = __toESM(require_dist_cjs23());
6346
7039
  init_collect_stream_body();
6347
7040
  init_extended_encode_uri_component();
6348
7041
  init_HttpProtocol();
@@ -6595,7 +7288,7 @@ var import_protocol_http5, RpcProtocol;
6595
7288
  var init_RpcProtocol = __esm({
6596
7289
  "node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js"() {
6597
7290
  init_schema();
6598
- import_protocol_http5 = __toESM(require_dist_cjs3());
7291
+ import_protocol_http5 = __toESM(require_dist_cjs11());
6599
7292
  init_collect_stream_body();
6600
7293
  init_HttpProtocol();
6601
7294
  RpcProtocol = class extends HttpProtocol {
@@ -6719,7 +7412,7 @@ function requestBuilder(input, context) {
6719
7412
  var import_protocol_http6, RequestBuilder;
6720
7413
  var init_requestBuilder = __esm({
6721
7414
  "node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js"() {
6722
- import_protocol_http6 = __toESM(require_dist_cjs3());
7415
+ import_protocol_http6 = __toESM(require_dist_cjs11());
6723
7416
  init_resolve_path();
6724
7417
  __name(requestBuilder, "requestBuilder");
6725
7418
  RequestBuilder = class {
@@ -6815,8 +7508,8 @@ var init_FromStringShapeDeserializer = __esm({
6815
7508
  "node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js"() {
6816
7509
  init_schema();
6817
7510
  init_serde();
6818
- import_util_base64 = __toESM(require_dist_cjs13());
6819
- import_util_utf82 = __toESM(require_dist_cjs12());
7511
+ import_util_base64 = __toESM(require_dist_cjs15());
7512
+ import_util_utf82 = __toESM(require_dist_cjs14());
6820
7513
  init_SerdeContext();
6821
7514
  init_determineTimestampFormat();
6822
7515
  FromStringShapeDeserializer = class extends SerdeContext {
@@ -6890,7 +7583,7 @@ var import_util_utf83, HttpInterceptingShapeDeserializer;
6890
7583
  var init_HttpInterceptingShapeDeserializer = __esm({
6891
7584
  "node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js"() {
6892
7585
  init_schema();
6893
- import_util_utf83 = __toESM(require_dist_cjs12());
7586
+ import_util_utf83 = __toESM(require_dist_cjs14());
6894
7587
  init_SerdeContext();
6895
7588
  init_FromStringShapeDeserializer();
6896
7589
  HttpInterceptingShapeDeserializer = class extends SerdeContext {
@@ -6942,7 +7635,7 @@ var init_ToStringShapeSerializer = __esm({
6942
7635
  "node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js"() {
6943
7636
  init_schema();
6944
7637
  init_serde();
6945
- import_util_base642 = __toESM(require_dist_cjs13());
7638
+ import_util_base642 = __toESM(require_dist_cjs15());
6946
7639
  init_SerdeContext();
6947
7640
  init_determineTimestampFormat();
6948
7641
  ToStringShapeSerializer = class extends SerdeContext {
@@ -7166,7 +7859,7 @@ var init_DefaultIdentityProviderConfig = __esm({
7166
7859
  var import_protocol_http7, import_types2, HttpApiKeyAuthSigner;
7167
7860
  var init_httpApiKeyAuth = __esm({
7168
7861
  "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() {
7169
- import_protocol_http7 = __toESM(require_dist_cjs3());
7862
+ import_protocol_http7 = __toESM(require_dist_cjs11());
7170
7863
  import_types2 = __toESM(require_dist_cjs());
7171
7864
  HttpApiKeyAuthSigner = class {
7172
7865
  static {
@@ -7203,7 +7896,7 @@ var init_httpApiKeyAuth = __esm({
7203
7896
  var import_protocol_http8, HttpBearerAuthSigner;
7204
7897
  var init_httpBearerAuth = __esm({
7205
7898
  "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js"() {
7206
- import_protocol_http8 = __toESM(require_dist_cjs3());
7899
+ import_protocol_http8 = __toESM(require_dist_cjs11());
7207
7900
  HttpBearerAuthSigner = class {
7208
7901
  static {
7209
7902
  __name(this, "HttpBearerAuthSigner");
@@ -7354,7 +8047,7 @@ var init_dist_es = __esm({
7354
8047
  });
7355
8048
 
7356
8049
  // node_modules/@smithy/util-endpoints/dist-cjs/index.js
7357
- var require_dist_cjs21 = __commonJS({
8050
+ var require_dist_cjs25 = __commonJS({
7358
8051
  "node_modules/@smithy/util-endpoints/dist-cjs/index.js"(exports2) {
7359
8052
  "use strict";
7360
8053
  var types = require_dist_cjs();
@@ -7762,7 +8455,7 @@ var require_dist_cjs21 = __commonJS({
7762
8455
  evaluateTreeRule
7763
8456
  };
7764
8457
  var resolveEndpoint4 = /* @__PURE__ */ __name((ruleSetObject, options) => {
7765
- const { endpointParams, logger: logger21 } = options;
8458
+ const { endpointParams, logger: logger25 } = options;
7766
8459
  const { parameters, rules } = ruleSetObject;
7767
8460
  options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);
7768
8461
  const paramsWithDefault = Object.entries(parameters).filter(([, v4]) => v4.default != null).map(([k4, v4]) => [k4, v4.default]);
@@ -7777,7 +8470,7 @@ var require_dist_cjs21 = __commonJS({
7777
8470
  throw new EndpointError(`Missing required parameter: '${requiredParam}'`);
7778
8471
  }
7779
8472
  }
7780
- const endpoint = evaluateRules(rules, { endpointParams, logger: logger21, referenceRecord: {} });
8473
+ const endpoint = evaluateRules(rules, { endpointParams, logger: logger25, referenceRecord: {} });
7781
8474
  options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`);
7782
8475
  return endpoint;
7783
8476
  }, "resolveEndpoint");
@@ -7791,7 +8484,7 @@ var require_dist_cjs21 = __commonJS({
7791
8484
  });
7792
8485
 
7793
8486
  // node_modules/@smithy/querystring-parser/dist-cjs/index.js
7794
- var require_dist_cjs22 = __commonJS({
8487
+ var require_dist_cjs26 = __commonJS({
7795
8488
  "node_modules/@smithy/querystring-parser/dist-cjs/index.js"(exports2) {
7796
8489
  "use strict";
7797
8490
  function parseQueryString(querystring) {
@@ -7821,10 +8514,10 @@ var require_dist_cjs22 = __commonJS({
7821
8514
  });
7822
8515
 
7823
8516
  // node_modules/@smithy/url-parser/dist-cjs/index.js
7824
- var require_dist_cjs23 = __commonJS({
8517
+ var require_dist_cjs27 = __commonJS({
7825
8518
  "node_modules/@smithy/url-parser/dist-cjs/index.js"(exports2) {
7826
8519
  "use strict";
7827
- var querystringParser = require_dist_cjs22();
8520
+ var querystringParser = require_dist_cjs26();
7828
8521
  var parseUrl4 = /* @__PURE__ */ __name((url) => {
7829
8522
  if (typeof url === "string") {
7830
8523
  return parseUrl4(new URL(url));
@@ -7847,11 +8540,11 @@ var require_dist_cjs23 = __commonJS({
7847
8540
  });
7848
8541
 
7849
8542
  // node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js
7850
- var require_dist_cjs24 = __commonJS({
8543
+ var require_dist_cjs28 = __commonJS({
7851
8544
  "node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js"(exports2) {
7852
8545
  "use strict";
7853
- var utilEndpoints = require_dist_cjs21();
7854
- var urlParser = require_dist_cjs23();
8546
+ var utilEndpoints = require_dist_cjs25();
8547
+ var urlParser = require_dist_cjs27();
7855
8548
  var isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => {
7856
8549
  if (allowSubDomains) {
7857
8550
  for (const label of value.split(".")) {
@@ -8554,7 +9247,7 @@ var init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = __esm({
8554
9247
  });
8555
9248
 
8556
9249
  // node_modules/@smithy/property-provider/dist-cjs/index.js
8557
- var require_dist_cjs25 = __commonJS({
9250
+ var require_dist_cjs29 = __commonJS({
8558
9251
  "node_modules/@smithy/property-provider/dist-cjs/index.js"(exports2) {
8559
9252
  "use strict";
8560
9253
  var ProviderError2 = class _ProviderError extends Error {
@@ -8564,19 +9257,19 @@ var require_dist_cjs25 = __commonJS({
8564
9257
  name = "ProviderError";
8565
9258
  tryNextLink;
8566
9259
  constructor(message, options = true) {
8567
- let logger21;
9260
+ let logger25;
8568
9261
  let tryNextLink = true;
8569
9262
  if (typeof options === "boolean") {
8570
- logger21 = void 0;
9263
+ logger25 = void 0;
8571
9264
  tryNextLink = options;
8572
9265
  } else if (options != null && typeof options === "object") {
8573
- logger21 = options.logger;
9266
+ logger25 = options.logger;
8574
9267
  tryNextLink = options.tryNextLink ?? true;
8575
9268
  }
8576
9269
  super(message);
8577
9270
  this.tryNextLink = tryNextLink;
8578
9271
  Object.setPrototypeOf(this, _ProviderError.prototype);
8579
- logger21?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`);
9272
+ logger25?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`);
8580
9273
  }
8581
9274
  static from(error2, options = true) {
8582
9275
  return Object.assign(new this(error2.message, options), error2);
@@ -8680,7 +9373,7 @@ var import_property_provider, resolveAwsSdkSigV4AConfig, NODE_SIGV4A_CONFIG_OPTI
8680
9373
  var init_resolveAwsSdkSigV4AConfig = __esm({
8681
9374
  "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js"() {
8682
9375
  init_dist_es();
8683
- import_property_provider = __toESM(require_dist_cjs25());
9376
+ import_property_provider = __toESM(require_dist_cjs29());
8684
9377
  resolveAwsSdkSigV4AConfig = /* @__PURE__ */ __name((config) => {
8685
9378
  config.sigv4aSigningRegionSet = normalizeProvider2(config.sigv4aSigningRegionSet);
8686
9379
  return config;
@@ -8708,15 +9401,15 @@ var init_resolveAwsSdkSigV4AConfig = __esm({
8708
9401
  });
8709
9402
 
8710
9403
  // node_modules/@smithy/signature-v4/dist-cjs/index.js
8711
- var require_dist_cjs26 = __commonJS({
9404
+ var require_dist_cjs30 = __commonJS({
8712
9405
  "node_modules/@smithy/signature-v4/dist-cjs/index.js"(exports2) {
8713
9406
  "use strict";
8714
- var utilHexEncoding = require_dist_cjs18();
8715
- var utilUtf8 = require_dist_cjs12();
8716
- var isArrayBuffer = require_dist_cjs10();
9407
+ var utilHexEncoding = require_dist_cjs22();
9408
+ var utilUtf8 = require_dist_cjs14();
9409
+ var isArrayBuffer = require_dist_cjs12();
8717
9410
  var protocolHttp = require_dist_cjs3();
8718
9411
  var utilMiddleware = require_dist_cjs2();
8719
- var utilUriEscape = require_dist_cjs14();
9412
+ var utilUriEscape = require_dist_cjs17();
8720
9413
  var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm";
8721
9414
  var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential";
8722
9415
  var AMZ_DATE_QUERY_PARAM = "X-Amz-Date";
@@ -9278,7 +9971,7 @@ var init_resolveAwsSdkSigV4Config = __esm({
9278
9971
  "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js"() {
9279
9972
  init_client();
9280
9973
  init_dist_es();
9281
- import_signature_v4 = __toESM(require_dist_cjs26());
9974
+ import_signature_v4 = __toESM(require_dist_cjs30());
9282
9975
  resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config) => {
9283
9976
  let inputCredentials = config.credentials;
9284
9977
  let isUserSupplied = !!config.credentials;
@@ -9833,7 +10526,7 @@ var import_util_utf84, USE_TEXT_DECODER, USE_BUFFER, payload, dataView, textDeco
9833
10526
  var init_cbor_decode = __esm({
9834
10527
  "node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js"() {
9835
10528
  init_serde();
9836
- import_util_utf84 = __toESM(require_dist_cjs12());
10529
+ import_util_utf84 = __toESM(require_dist_cjs14());
9837
10530
  init_cbor_types();
9838
10531
  USE_TEXT_DECODER = typeof TextDecoder !== "undefined";
9839
10532
  USE_BUFFER = typeof Buffer !== "undefined";
@@ -10058,7 +10751,7 @@ var import_util_utf85, USE_BUFFER2, initialSize, data, dataView2, cursor;
10058
10751
  var init_cbor_encode = __esm({
10059
10752
  "node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js"() {
10060
10753
  init_serde();
10061
- import_util_utf85 = __toESM(require_dist_cjs12());
10754
+ import_util_utf85 = __toESM(require_dist_cjs14());
10062
10755
  init_cbor_types();
10063
10756
  USE_BUFFER2 = typeof Buffer !== "undefined";
10064
10757
  initialSize = 2048;
@@ -10146,7 +10839,7 @@ var init_CborCodec = __esm({
10146
10839
  init_protocols();
10147
10840
  init_schema();
10148
10841
  init_serde();
10149
- import_util_base643 = __toESM(require_dist_cjs13());
10842
+ import_util_base643 = __toESM(require_dist_cjs15());
10150
10843
  init_cbor();
10151
10844
  init_parseCborBody();
10152
10845
  CborCodec = class extends SerdeContext {
@@ -10225,6 +10918,11 @@ var init_CborCodec = __esm({
10225
10918
  newObject[key] = value;
10226
10919
  }
10227
10920
  }
10921
+ const isUnion = ns.isUnionSchema();
10922
+ if (isUnion && Array.isArray(sourceObject.$unknown)) {
10923
+ const [k4, v4] = sourceObject.$unknown;
10924
+ newObject[k4] = v4;
10925
+ }
10228
10926
  } else if (ns.isDocumentSchema()) {
10229
10927
  for (const key of Object.keys(sourceObject)) {
10230
10928
  newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]);
@@ -10304,11 +11002,22 @@ var init_CborCodec = __esm({
10304
11002
  }
10305
11003
  }
10306
11004
  } else if (ns.isStructSchema()) {
11005
+ const isUnion = ns.isUnionSchema();
11006
+ let keys;
11007
+ if (isUnion) {
11008
+ keys = new Set(Object.keys(value).filter((k4) => k4 !== "__type"));
11009
+ }
10307
11010
  for (const [key, memberSchema] of ns.structIterator()) {
10308
- const v4 = this.readValue(memberSchema, value[key]);
10309
- if (v4 != null) {
10310
- newObject[key] = v4;
11011
+ if (isUnion) {
11012
+ keys.delete(key);
10311
11013
  }
11014
+ if (value[key] != null) {
11015
+ newObject[key] = this.readValue(memberSchema, value[key]);
11016
+ }
11017
+ }
11018
+ if (isUnion && keys?.size === 1 && Object.keys(newObject).length === 0) {
11019
+ const k4 = keys.values().next().value;
11020
+ newObject.$unknown = [k4, value[k4]];
10312
11021
  }
10313
11022
  }
10314
11023
  return newObject;
@@ -10433,7 +11142,7 @@ var init_cbor2 = __esm({
10433
11142
  });
10434
11143
 
10435
11144
  // node_modules/@smithy/middleware-stack/dist-cjs/index.js
10436
- var require_dist_cjs27 = __commonJS({
11145
+ var require_dist_cjs31 = __commonJS({
10437
11146
  "node_modules/@smithy/middleware-stack/dist-cjs/index.js"(exports2) {
10438
11147
  "use strict";
10439
11148
  var getAllAliases = /* @__PURE__ */ __name((name, aliases) => {
@@ -10704,10 +11413,10 @@ var require_dist_cjs27 = __commonJS({
10704
11413
  });
10705
11414
 
10706
11415
  // node_modules/@smithy/smithy-client/dist-cjs/index.js
10707
- var require_dist_cjs28 = __commonJS({
11416
+ var require_dist_cjs32 = __commonJS({
10708
11417
  "node_modules/@smithy/smithy-client/dist-cjs/index.js"(exports2) {
10709
11418
  "use strict";
10710
- var middlewareStack = require_dist_cjs27();
11419
+ var middlewareStack = require_dist_cjs31();
10711
11420
  var protocols = (init_protocols(), __toCommonJS(protocols_exports));
10712
11421
  var types = require_dist_cjs();
10713
11422
  var schema = (init_schema(), __toCommonJS(schema_exports));
@@ -10722,6 +11431,12 @@ var require_dist_cjs28 = __commonJS({
10722
11431
  handlers;
10723
11432
  constructor(config) {
10724
11433
  this.config = config;
11434
+ const { protocol, protocolSettings } = config;
11435
+ if (protocolSettings) {
11436
+ if (typeof protocol === "function") {
11437
+ config.protocol = new protocol(protocolSettings);
11438
+ }
11439
+ }
10725
11440
  }
10726
11441
  send(command, optionsOrCb, cb) {
10727
11442
  const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0;
@@ -10801,9 +11516,9 @@ var require_dist_cjs28 = __commonJS({
10801
11516
  this.middlewareStack.use(mw);
10802
11517
  }
10803
11518
  const stack = clientStack.concat(this.middlewareStack);
10804
- const { logger: logger21 } = configuration;
11519
+ const { logger: logger25 } = configuration;
10805
11520
  const handlerExecutionContext = {
10806
- logger: logger21,
11521
+ logger: logger25,
10807
11522
  clientName,
10808
11523
  commandName,
10809
11524
  inputFilterSensitiveLog,
@@ -11296,7 +12011,7 @@ var import_smithy_client, ProtocolLib;
11296
12011
  var init_ProtocolLib = __esm({
11297
12012
  "node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js"() {
11298
12013
  init_schema();
11299
- import_smithy_client = __toESM(require_dist_cjs28());
12014
+ import_smithy_client = __toESM(require_dist_cjs32());
11300
12015
  ProtocolLib = class {
11301
12016
  static {
11302
12017
  __name(this, "ProtocolLib");
@@ -11628,8 +12343,8 @@ var init_jsonReviver = __esm({
11628
12343
  var import_smithy_client2, import_util_utf86, collectBodyString;
11629
12344
  var init_common = __esm({
11630
12345
  "node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js"() {
11631
- import_smithy_client2 = __toESM(require_dist_cjs28());
11632
- import_util_utf86 = __toESM(require_dist_cjs12());
12346
+ import_smithy_client2 = __toESM(require_dist_cjs32());
12347
+ import_util_utf86 = __toESM(require_dist_cjs14());
11633
12348
  collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client2.collectBody)(streamBody, context).then((body) => (context?.utf8Encoder ?? import_util_utf86.toUtf8)(body)), "collectBodyString");
11634
12349
  }
11635
12350
  });
@@ -11701,7 +12416,7 @@ var init_JsonShapeDeserializer = __esm({
11701
12416
  init_protocols();
11702
12417
  init_schema();
11703
12418
  init_serde();
11704
- import_util_base644 = __toESM(require_dist_cjs13());
12419
+ import_util_base644 = __toESM(require_dist_cjs15());
11705
12420
  init_ConfigurableSerdeContext();
11706
12421
  init_structIterator();
11707
12422
  init_jsonReviver();
@@ -11892,7 +12607,7 @@ var init_JsonShapeSerializer = __esm({
11892
12607
  init_protocols();
11893
12608
  init_schema();
11894
12609
  init_serde();
11895
- import_util_base645 = __toESM(require_dist_cjs13());
12610
+ import_util_base645 = __toESM(require_dist_cjs15());
11896
12611
  init_ConfigurableSerdeContext();
11897
12612
  init_structIterator();
11898
12613
  init_jsonReplacer();
@@ -12316,7 +13031,7 @@ var init_AwsRestJsonProtocol = __esm({
12316
13031
  var import_smithy_client3, awsExpectUnion;
12317
13032
  var init_awsExpectUnion = __esm({
12318
13033
  "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js"() {
12319
- import_smithy_client3 = __toESM(require_dist_cjs28());
13034
+ import_smithy_client3 = __toESM(require_dist_cjs32());
12320
13035
  awsExpectUnion = /* @__PURE__ */ __name((value) => {
12321
13036
  if (value == null) {
12322
13037
  return void 0;
@@ -13201,7 +13916,7 @@ var require_xml_parser = __commonJS({
13201
13916
  });
13202
13917
 
13203
13918
  // node_modules/@aws-sdk/xml-builder/dist-cjs/index.js
13204
- var require_dist_cjs29 = __commonJS({
13919
+ var require_dist_cjs33 = __commonJS({
13205
13920
  "node_modules/@aws-sdk/xml-builder/dist-cjs/index.js"(exports2) {
13206
13921
  "use strict";
13207
13922
  var xmlParser = require_xml_parser();
@@ -13329,11 +14044,11 @@ var require_dist_cjs29 = __commonJS({
13329
14044
  var import_xml_builder, import_smithy_client4, import_util_utf87, XmlShapeDeserializer;
13330
14045
  var init_XmlShapeDeserializer = __esm({
13331
14046
  "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js"() {
13332
- import_xml_builder = __toESM(require_dist_cjs29());
14047
+ import_xml_builder = __toESM(require_dist_cjs33());
13333
14048
  init_protocols();
13334
14049
  init_schema();
13335
- import_smithy_client4 = __toESM(require_dist_cjs28());
13336
- import_util_utf87 = __toESM(require_dist_cjs12());
14050
+ import_smithy_client4 = __toESM(require_dist_cjs32());
14051
+ import_util_utf87 = __toESM(require_dist_cjs14());
13337
14052
  init_ConfigurableSerdeContext();
13338
14053
  XmlShapeDeserializer = class extends SerdeContextConfig {
13339
14054
  static {
@@ -13478,8 +14193,8 @@ var init_QueryShapeSerializer = __esm({
13478
14193
  init_protocols();
13479
14194
  init_schema();
13480
14195
  init_serde();
13481
- import_smithy_client5 = __toESM(require_dist_cjs28());
13482
- import_util_base646 = __toESM(require_dist_cjs13());
14196
+ import_smithy_client5 = __toESM(require_dist_cjs32());
14197
+ import_util_base646 = __toESM(require_dist_cjs15());
13483
14198
  init_ConfigurableSerdeContext();
13484
14199
  init_structIterator();
13485
14200
  QueryShapeSerializer = class extends SerdeContextConfig {
@@ -13803,8 +14518,8 @@ var init_AwsEc2QueryProtocol = __esm({
13803
14518
  var import_xml_builder2, import_smithy_client6, parseXmlBody, parseXmlErrorBody, loadRestXmlErrorCode;
13804
14519
  var init_parseXmlBody = __esm({
13805
14520
  "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js"() {
13806
- import_xml_builder2 = __toESM(require_dist_cjs29());
13807
- import_smithy_client6 = __toESM(require_dist_cjs28());
14521
+ import_xml_builder2 = __toESM(require_dist_cjs33());
14522
+ import_smithy_client6 = __toESM(require_dist_cjs32());
13808
14523
  init_common();
13809
14524
  parseXmlBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
13810
14525
  if (encoded.length) {
@@ -13855,12 +14570,12 @@ var init_parseXmlBody = __esm({
13855
14570
  var import_xml_builder3, import_smithy_client7, import_util_base647, XmlShapeSerializer;
13856
14571
  var init_XmlShapeSerializer = __esm({
13857
14572
  "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js"() {
13858
- import_xml_builder3 = __toESM(require_dist_cjs29());
14573
+ import_xml_builder3 = __toESM(require_dist_cjs33());
13859
14574
  init_protocols();
13860
14575
  init_schema();
13861
14576
  init_serde();
13862
- import_smithy_client7 = __toESM(require_dist_cjs28());
13863
- import_util_base647 = __toESM(require_dist_cjs13());
14577
+ import_smithy_client7 = __toESM(require_dist_cjs32());
14578
+ import_util_base647 = __toESM(require_dist_cjs15());
13864
14579
  init_ConfigurableSerdeContext();
13865
14580
  init_structIterator();
13866
14581
  XmlShapeSerializer = class extends SerdeContextConfig {
@@ -14336,11 +15051,11 @@ var init_dist_es2 = __esm({
14336
15051
  });
14337
15052
 
14338
15053
  // node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js
14339
- var require_dist_cjs30 = __commonJS({
15054
+ var require_dist_cjs34 = __commonJS({
14340
15055
  "node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js"(exports2) {
14341
15056
  "use strict";
14342
15057
  var core = (init_dist_es(), __toCommonJS(dist_es_exports));
14343
- var utilEndpoints = require_dist_cjs24();
15058
+ var utilEndpoints = require_dist_cjs28();
14344
15059
  var protocolHttp = require_dist_cjs3();
14345
15060
  var core$1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
14346
15061
  var DEFAULT_UA_APP_ID = void 0;
@@ -14359,11 +15074,11 @@ var require_dist_cjs30 = __commonJS({
14359
15074
  userAgentAppId: /* @__PURE__ */ __name(async () => {
14360
15075
  const appId = await normalizedAppIdProvider();
14361
15076
  if (!isValidUserAgentAppId(appId)) {
14362
- const logger21 = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger;
15077
+ const logger25 = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger;
14363
15078
  if (typeof appId !== "string") {
14364
- logger21?.warn("userAgentAppId must be a string or undefined.");
15079
+ logger25?.warn("userAgentAppId must be a string or undefined.");
14365
15080
  } else if (appId.length > 50) {
14366
- logger21?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.");
15081
+ logger25?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.");
14367
15082
  }
14368
15083
  }
14369
15084
  return appId;
@@ -14519,7 +15234,7 @@ var require_dist_cjs30 = __commonJS({
14519
15234
  });
14520
15235
 
14521
15236
  // node_modules/@smithy/util-config-provider/dist-cjs/index.js
14522
- var require_dist_cjs31 = __commonJS({
15237
+ var require_dist_cjs35 = __commonJS({
14523
15238
  "node_modules/@smithy/util-config-provider/dist-cjs/index.js"(exports2) {
14524
15239
  "use strict";
14525
15240
  var booleanSelector = /* @__PURE__ */ __name((obj, key, type) => {
@@ -14551,12 +15266,12 @@ var require_dist_cjs31 = __commonJS({
14551
15266
  });
14552
15267
 
14553
15268
  // node_modules/@smithy/config-resolver/dist-cjs/index.js
14554
- var require_dist_cjs32 = __commonJS({
15269
+ var require_dist_cjs36 = __commonJS({
14555
15270
  "node_modules/@smithy/config-resolver/dist-cjs/index.js"(exports2) {
14556
15271
  "use strict";
14557
- var utilConfigProvider = require_dist_cjs31();
15272
+ var utilConfigProvider = require_dist_cjs35();
14558
15273
  var utilMiddleware = require_dist_cjs2();
14559
- var utilEndpoints = require_dist_cjs21();
15274
+ var utilEndpoints = require_dist_cjs25();
14560
15275
  var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT";
14561
15276
  var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
14562
15277
  var DEFAULT_USE_DUALSTACK_ENDPOINT = false;
@@ -14667,56 +15382,228 @@ var require_dist_cjs32 = __commonJS({
14667
15382
  return regionRegexmatchArray[0].slice(1, -1);
14668
15383
  }
14669
15384
  }
14670
- }, "getResolvedSigningRegion");
14671
- var getRegionInfo = /* @__PURE__ */ __name((region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash }) => {
14672
- const partition = getResolvedPartition(region, { partitionHash });
14673
- const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region;
14674
- const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };
14675
- const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions);
14676
- const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions);
14677
- const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });
14678
- if (hostname === void 0) {
14679
- throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);
14680
- }
14681
- const signingRegion = getResolvedSigningRegion(hostname, {
14682
- signingRegion: regionHash[resolvedRegion]?.signingRegion,
14683
- regionRegex: partitionHash[partition].regionRegex,
14684
- useFipsEndpoint
14685
- });
14686
- return {
14687
- partition,
14688
- signingService,
14689
- hostname,
14690
- ...signingRegion && { signingRegion },
14691
- ...regionHash[resolvedRegion]?.signingService && {
14692
- signingService: regionHash[resolvedRegion].signingService
15385
+ }, "getResolvedSigningRegion");
15386
+ var getRegionInfo = /* @__PURE__ */ __name((region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash }) => {
15387
+ const partition = getResolvedPartition(region, { partitionHash });
15388
+ const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region;
15389
+ const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };
15390
+ const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions);
15391
+ const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions);
15392
+ const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });
15393
+ if (hostname === void 0) {
15394
+ throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);
15395
+ }
15396
+ const signingRegion = getResolvedSigningRegion(hostname, {
15397
+ signingRegion: regionHash[resolvedRegion]?.signingRegion,
15398
+ regionRegex: partitionHash[partition].regionRegex,
15399
+ useFipsEndpoint
15400
+ });
15401
+ return {
15402
+ partition,
15403
+ signingService,
15404
+ hostname,
15405
+ ...signingRegion && { signingRegion },
15406
+ ...regionHash[resolvedRegion]?.signingService && {
15407
+ signingService: regionHash[resolvedRegion].signingService
15408
+ }
15409
+ };
15410
+ }, "getRegionInfo");
15411
+ exports2.CONFIG_USE_DUALSTACK_ENDPOINT = CONFIG_USE_DUALSTACK_ENDPOINT;
15412
+ exports2.CONFIG_USE_FIPS_ENDPOINT = CONFIG_USE_FIPS_ENDPOINT;
15413
+ exports2.DEFAULT_USE_DUALSTACK_ENDPOINT = DEFAULT_USE_DUALSTACK_ENDPOINT;
15414
+ exports2.DEFAULT_USE_FIPS_ENDPOINT = DEFAULT_USE_FIPS_ENDPOINT;
15415
+ exports2.ENV_USE_DUALSTACK_ENDPOINT = ENV_USE_DUALSTACK_ENDPOINT;
15416
+ exports2.ENV_USE_FIPS_ENDPOINT = ENV_USE_FIPS_ENDPOINT;
15417
+ exports2.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS4;
15418
+ exports2.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS4;
15419
+ exports2.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS4;
15420
+ exports2.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS4;
15421
+ exports2.REGION_ENV_NAME = REGION_ENV_NAME;
15422
+ exports2.REGION_INI_NAME = REGION_INI_NAME;
15423
+ exports2.getRegionInfo = getRegionInfo;
15424
+ exports2.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig;
15425
+ exports2.resolveEndpointsConfig = resolveEndpointsConfig;
15426
+ exports2.resolveRegionConfig = resolveRegionConfig4;
15427
+ }
15428
+ });
15429
+
15430
+ // node_modules/@smithy/middleware-content-length/node_modules/@smithy/protocol-http/dist-cjs/index.js
15431
+ var require_dist_cjs37 = __commonJS({
15432
+ "node_modules/@smithy/middleware-content-length/node_modules/@smithy/protocol-http/dist-cjs/index.js"(exports2) {
15433
+ "use strict";
15434
+ var types = require_dist_cjs();
15435
+ var getHttpHandlerExtensionConfiguration4 = /* @__PURE__ */ __name((runtimeConfig) => {
15436
+ return {
15437
+ setHttpHandler(handler2) {
15438
+ runtimeConfig.httpHandler = handler2;
15439
+ },
15440
+ httpHandler() {
15441
+ return runtimeConfig.httpHandler;
15442
+ },
15443
+ updateHttpClientConfig(key, value) {
15444
+ runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);
15445
+ },
15446
+ httpHandlerConfigs() {
15447
+ return runtimeConfig.httpHandler.httpHandlerConfigs();
15448
+ }
15449
+ };
15450
+ }, "getHttpHandlerExtensionConfiguration");
15451
+ var resolveHttpHandlerRuntimeConfig4 = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => {
15452
+ return {
15453
+ httpHandler: httpHandlerExtensionConfiguration.httpHandler()
15454
+ };
15455
+ }, "resolveHttpHandlerRuntimeConfig");
15456
+ var Field = class {
15457
+ static {
15458
+ __name(this, "Field");
15459
+ }
15460
+ name;
15461
+ kind;
15462
+ values;
15463
+ constructor({ name, kind = types.FieldPosition.HEADER, values = [] }) {
15464
+ this.name = name;
15465
+ this.kind = kind;
15466
+ this.values = values;
15467
+ }
15468
+ add(value) {
15469
+ this.values.push(value);
15470
+ }
15471
+ set(values) {
15472
+ this.values = values;
15473
+ }
15474
+ remove(value) {
15475
+ this.values = this.values.filter((v4) => v4 !== value);
15476
+ }
15477
+ toString() {
15478
+ return this.values.map((v4) => v4.includes(",") || v4.includes(" ") ? `"${v4}"` : v4).join(", ");
15479
+ }
15480
+ get() {
15481
+ return this.values;
15482
+ }
15483
+ };
15484
+ var Fields = class {
15485
+ static {
15486
+ __name(this, "Fields");
15487
+ }
15488
+ entries = {};
15489
+ encoding;
15490
+ constructor({ fields = [], encoding = "utf-8" }) {
15491
+ fields.forEach(this.setField.bind(this));
15492
+ this.encoding = encoding;
15493
+ }
15494
+ setField(field) {
15495
+ this.entries[field.name.toLowerCase()] = field;
15496
+ }
15497
+ getField(name) {
15498
+ return this.entries[name.toLowerCase()];
15499
+ }
15500
+ removeField(name) {
15501
+ delete this.entries[name.toLowerCase()];
15502
+ }
15503
+ getByType(kind) {
15504
+ return Object.values(this.entries).filter((field) => field.kind === kind);
15505
+ }
15506
+ };
15507
+ var HttpRequest10 = class _HttpRequest {
15508
+ static {
15509
+ __name(this, "HttpRequest");
15510
+ }
15511
+ method;
15512
+ protocol;
15513
+ hostname;
15514
+ port;
15515
+ path;
15516
+ query;
15517
+ headers;
15518
+ username;
15519
+ password;
15520
+ fragment;
15521
+ body;
15522
+ constructor(options) {
15523
+ this.method = options.method || "GET";
15524
+ this.hostname = options.hostname || "localhost";
15525
+ this.port = options.port;
15526
+ this.query = options.query || {};
15527
+ this.headers = options.headers || {};
15528
+ this.body = options.body;
15529
+ this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
15530
+ this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
15531
+ this.username = options.username;
15532
+ this.password = options.password;
15533
+ this.fragment = options.fragment;
15534
+ }
15535
+ static clone(request2) {
15536
+ const cloned = new _HttpRequest({
15537
+ ...request2,
15538
+ headers: { ...request2.headers }
15539
+ });
15540
+ if (cloned.query) {
15541
+ cloned.query = cloneQuery(cloned.query);
15542
+ }
15543
+ return cloned;
15544
+ }
15545
+ static isInstance(request2) {
15546
+ if (!request2) {
15547
+ return false;
14693
15548
  }
14694
- };
14695
- }, "getRegionInfo");
14696
- exports2.CONFIG_USE_DUALSTACK_ENDPOINT = CONFIG_USE_DUALSTACK_ENDPOINT;
14697
- exports2.CONFIG_USE_FIPS_ENDPOINT = CONFIG_USE_FIPS_ENDPOINT;
14698
- exports2.DEFAULT_USE_DUALSTACK_ENDPOINT = DEFAULT_USE_DUALSTACK_ENDPOINT;
14699
- exports2.DEFAULT_USE_FIPS_ENDPOINT = DEFAULT_USE_FIPS_ENDPOINT;
14700
- exports2.ENV_USE_DUALSTACK_ENDPOINT = ENV_USE_DUALSTACK_ENDPOINT;
14701
- exports2.ENV_USE_FIPS_ENDPOINT = ENV_USE_FIPS_ENDPOINT;
14702
- exports2.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS4;
14703
- exports2.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS4;
14704
- exports2.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS4;
14705
- exports2.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS4;
14706
- exports2.REGION_ENV_NAME = REGION_ENV_NAME;
14707
- exports2.REGION_INI_NAME = REGION_INI_NAME;
14708
- exports2.getRegionInfo = getRegionInfo;
14709
- exports2.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig;
14710
- exports2.resolveEndpointsConfig = resolveEndpointsConfig;
14711
- exports2.resolveRegionConfig = resolveRegionConfig4;
15549
+ const req = request2;
15550
+ return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
15551
+ }
15552
+ clone() {
15553
+ return _HttpRequest.clone(this);
15554
+ }
15555
+ };
15556
+ function cloneQuery(query) {
15557
+ return Object.keys(query).reduce((carry, paramName) => {
15558
+ const param = query[paramName];
15559
+ return {
15560
+ ...carry,
15561
+ [paramName]: Array.isArray(param) ? [...param] : param
15562
+ };
15563
+ }, {});
15564
+ }
15565
+ __name(cloneQuery, "cloneQuery");
15566
+ var HttpResponse4 = class {
15567
+ static {
15568
+ __name(this, "HttpResponse");
15569
+ }
15570
+ statusCode;
15571
+ reason;
15572
+ headers;
15573
+ body;
15574
+ constructor(options) {
15575
+ this.statusCode = options.statusCode;
15576
+ this.reason = options.reason;
15577
+ this.headers = options.headers || {};
15578
+ this.body = options.body;
15579
+ }
15580
+ static isInstance(response) {
15581
+ if (!response)
15582
+ return false;
15583
+ const resp = response;
15584
+ return typeof resp.statusCode === "number" && typeof resp.headers === "object";
15585
+ }
15586
+ };
15587
+ function isValidHostname(hostname) {
15588
+ const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;
15589
+ return hostPattern.test(hostname);
15590
+ }
15591
+ __name(isValidHostname, "isValidHostname");
15592
+ exports2.Field = Field;
15593
+ exports2.Fields = Fields;
15594
+ exports2.HttpRequest = HttpRequest10;
15595
+ exports2.HttpResponse = HttpResponse4;
15596
+ exports2.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration4;
15597
+ exports2.isValidHostname = isValidHostname;
15598
+ exports2.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig4;
14712
15599
  }
14713
15600
  });
14714
15601
 
14715
15602
  // node_modules/@smithy/middleware-content-length/dist-cjs/index.js
14716
- var require_dist_cjs33 = __commonJS({
15603
+ var require_dist_cjs38 = __commonJS({
14717
15604
  "node_modules/@smithy/middleware-content-length/dist-cjs/index.js"(exports2) {
14718
15605
  "use strict";
14719
- var protocolHttp = require_dist_cjs3();
15606
+ var protocolHttp = require_dist_cjs37();
14720
15607
  var CONTENT_LENGTH_HEADER = "content-length";
14721
15608
  function contentLengthMiddleware(bodyLengthChecker) {
14722
15609
  return (next) => async (args) => {
@@ -14852,7 +15739,7 @@ var require_readFile = __commonJS({
14852
15739
  });
14853
15740
 
14854
15741
  // node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js
14855
- var require_dist_cjs34 = __commonJS({
15742
+ var require_dist_cjs39 = __commonJS({
14856
15743
  "node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js"(exports2) {
14857
15744
  "use strict";
14858
15745
  var getHomeDir = require_getHomeDir();
@@ -15030,11 +15917,11 @@ var require_dist_cjs34 = __commonJS({
15030
15917
  });
15031
15918
 
15032
15919
  // node_modules/@smithy/node-config-provider/dist-cjs/index.js
15033
- var require_dist_cjs35 = __commonJS({
15920
+ var require_dist_cjs40 = __commonJS({
15034
15921
  "node_modules/@smithy/node-config-provider/dist-cjs/index.js"(exports2) {
15035
15922
  "use strict";
15036
- var propertyProvider = require_dist_cjs25();
15037
- var sharedIniFileLoader = require_dist_cjs34();
15923
+ var propertyProvider = require_dist_cjs29();
15924
+ var sharedIniFileLoader = require_dist_cjs39();
15038
15925
  function getSelectorName(functionString) {
15039
15926
  try {
15040
15927
  const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));
@@ -15078,8 +15965,8 @@ var require_dist_cjs35 = __commonJS({
15078
15965
  var isFunction = /* @__PURE__ */ __name((func) => typeof func === "function", "isFunction");
15079
15966
  var fromStatic = /* @__PURE__ */ __name((defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : propertyProvider.fromStatic(defaultValue), "fromStatic");
15080
15967
  var loadConfig = /* @__PURE__ */ __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => {
15081
- const { signingName, logger: logger21 } = configuration;
15082
- const envOptions = { signingName, logger: logger21 };
15968
+ const { signingName, logger: logger25 } = configuration;
15969
+ const envOptions = { signingName, logger: logger25 };
15083
15970
  return propertyProvider.memoize(propertyProvider.chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue)));
15084
15971
  }, "loadConfig");
15085
15972
  exports2.loadConfig = loadConfig;
@@ -15092,7 +15979,7 @@ var require_getEndpointUrlConfig = __commonJS({
15092
15979
  "use strict";
15093
15980
  Object.defineProperty(exports2, "__esModule", { value: true });
15094
15981
  exports2.getEndpointUrlConfig = void 0;
15095
- var shared_ini_file_loader_1 = require_dist_cjs34();
15982
+ var shared_ini_file_loader_1 = require_dist_cjs39();
15096
15983
  var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL";
15097
15984
  var CONFIG_ENDPOINT_URL = "endpoint_url";
15098
15985
  var getEndpointUrlConfig = /* @__PURE__ */ __name((serviceId) => ({
@@ -15133,7 +16020,7 @@ var require_getEndpointFromConfig = __commonJS({
15133
16020
  "use strict";
15134
16021
  Object.defineProperty(exports2, "__esModule", { value: true });
15135
16022
  exports2.getEndpointFromConfig = void 0;
15136
- var node_config_provider_1 = require_dist_cjs35();
16023
+ var node_config_provider_1 = require_dist_cjs40();
15137
16024
  var getEndpointUrlConfig_1 = require_getEndpointUrlConfig();
15138
16025
  var getEndpointFromConfig = /* @__PURE__ */ __name(async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId ?? ""))(), "getEndpointFromConfig");
15139
16026
  exports2.getEndpointFromConfig = getEndpointFromConfig;
@@ -15141,14 +16028,14 @@ var require_getEndpointFromConfig = __commonJS({
15141
16028
  });
15142
16029
 
15143
16030
  // node_modules/@smithy/middleware-endpoint/dist-cjs/index.js
15144
- var require_dist_cjs36 = __commonJS({
16031
+ var require_dist_cjs41 = __commonJS({
15145
16032
  "node_modules/@smithy/middleware-endpoint/dist-cjs/index.js"(exports2) {
15146
16033
  "use strict";
15147
16034
  var getEndpointFromConfig = require_getEndpointFromConfig();
15148
- var urlParser = require_dist_cjs23();
16035
+ var urlParser = require_dist_cjs27();
15149
16036
  var core = (init_dist_es(), __toCommonJS(dist_es_exports));
15150
16037
  var utilMiddleware = require_dist_cjs2();
15151
- var middlewareSerde = require_dist_cjs9();
16038
+ var middlewareSerde = require_dist_cjs10();
15152
16039
  var resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => {
15153
16040
  const bucket = endpointParams?.Bucket || "";
15154
16041
  if (typeof endpointParams.Bucket === "string") {
@@ -15180,9 +16067,16 @@ var require_dist_cjs36 = __commonJS({
15180
16067
  }
15181
16068
  return isValidArn;
15182
16069
  }, "isArnBucketName");
15183
- var createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config) => {
16070
+ var createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => {
15184
16071
  const configProvider = /* @__PURE__ */ __name(async () => {
15185
- const configValue = config[configKey] ?? config[canonicalEndpointParamKey];
16072
+ let configValue;
16073
+ if (isClientContextParam) {
16074
+ const clientContextParams = config.clientContextParams;
16075
+ const nestedValue = clientContextParams?.[configKey];
16076
+ configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey];
16077
+ } else {
16078
+ configValue = config[configKey] ?? config[canonicalEndpointParamKey];
16079
+ }
15186
16080
  if (typeof configValue === "function") {
15187
16081
  return configValue();
15188
16082
  }
@@ -15264,7 +16158,7 @@ var require_dist_cjs36 = __commonJS({
15264
16158
  break;
15265
16159
  case "clientContextParams":
15266
16160
  case "builtInParams":
15267
- endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)();
16161
+ endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")();
15268
16162
  break;
15269
16163
  case "operationContextParams":
15270
16164
  endpointParams[name] = instruction.get(commandInput);
@@ -15372,7 +16266,7 @@ var require_dist_cjs36 = __commonJS({
15372
16266
  });
15373
16267
 
15374
16268
  // node_modules/@smithy/service-error-classification/dist-cjs/index.js
15375
- var require_dist_cjs37 = __commonJS({
16269
+ var require_dist_cjs42 = __commonJS({
15376
16270
  "node_modules/@smithy/service-error-classification/dist-cjs/index.js"(exports2) {
15377
16271
  "use strict";
15378
16272
  var CLOCK_SKEW_ERROR_CODES = [
@@ -15443,10 +16337,10 @@ var require_dist_cjs37 = __commonJS({
15443
16337
  });
15444
16338
 
15445
16339
  // node_modules/@smithy/util-retry/dist-cjs/index.js
15446
- var require_dist_cjs38 = __commonJS({
16340
+ var require_dist_cjs43 = __commonJS({
15447
16341
  "node_modules/@smithy/util-retry/dist-cjs/index.js"(exports2) {
15448
16342
  "use strict";
15449
- var serviceErrorClassification = require_dist_cjs37();
16343
+ var serviceErrorClassification = require_dist_cjs42();
15450
16344
  exports2.RETRY_MODES = void 0;
15451
16345
  (function(RETRY_MODES) {
15452
16346
  RETRY_MODES["STANDARD"] = "standard";
@@ -15635,89 +16529,261 @@ var require_dist_cjs38 = __commonJS({
15635
16529
  recordSuccess(token) {
15636
16530
  this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT));
15637
16531
  }
15638
- getCapacity() {
15639
- return this.capacity;
16532
+ getCapacity() {
16533
+ return this.capacity;
16534
+ }
16535
+ async getMaxAttempts() {
16536
+ try {
16537
+ return await this.maxAttemptsProvider();
16538
+ } catch (error2) {
16539
+ console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);
16540
+ return DEFAULT_MAX_ATTEMPTS;
16541
+ }
16542
+ }
16543
+ shouldRetry(tokenToRenew, errorInfo, maxAttempts) {
16544
+ const attempts = tokenToRenew.getRetryCount() + 1;
16545
+ return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType);
16546
+ }
16547
+ getCapacityCost(errorType) {
16548
+ return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST;
16549
+ }
16550
+ isRetryableError(errorType) {
16551
+ return errorType === "THROTTLING" || errorType === "TRANSIENT";
16552
+ }
16553
+ };
16554
+ var AdaptiveRetryStrategy = class {
16555
+ static {
16556
+ __name(this, "AdaptiveRetryStrategy");
16557
+ }
16558
+ maxAttemptsProvider;
16559
+ rateLimiter;
16560
+ standardRetryStrategy;
16561
+ mode = exports2.RETRY_MODES.ADAPTIVE;
16562
+ constructor(maxAttemptsProvider, options) {
16563
+ this.maxAttemptsProvider = maxAttemptsProvider;
16564
+ const { rateLimiter } = options ?? {};
16565
+ this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();
16566
+ this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider);
16567
+ }
16568
+ async acquireInitialRetryToken(retryTokenScope) {
16569
+ await this.rateLimiter.getSendToken();
16570
+ return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);
16571
+ }
16572
+ async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {
16573
+ this.rateLimiter.updateClientSendingRate(errorInfo);
16574
+ return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);
16575
+ }
16576
+ recordSuccess(token) {
16577
+ this.rateLimiter.updateClientSendingRate({});
16578
+ this.standardRetryStrategy.recordSuccess(token);
16579
+ }
16580
+ };
16581
+ var ConfiguredRetryStrategy = class extends StandardRetryStrategy {
16582
+ static {
16583
+ __name(this, "ConfiguredRetryStrategy");
16584
+ }
16585
+ computeNextBackoffDelay;
16586
+ constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) {
16587
+ super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts);
16588
+ if (typeof computeNextBackoffDelay === "number") {
16589
+ this.computeNextBackoffDelay = () => computeNextBackoffDelay;
16590
+ } else {
16591
+ this.computeNextBackoffDelay = computeNextBackoffDelay;
16592
+ }
16593
+ }
16594
+ async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {
16595
+ const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo);
16596
+ token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount());
16597
+ return token;
16598
+ }
16599
+ };
16600
+ exports2.AdaptiveRetryStrategy = AdaptiveRetryStrategy;
16601
+ exports2.ConfiguredRetryStrategy = ConfiguredRetryStrategy;
16602
+ exports2.DEFAULT_MAX_ATTEMPTS = DEFAULT_MAX_ATTEMPTS;
16603
+ exports2.DEFAULT_RETRY_DELAY_BASE = DEFAULT_RETRY_DELAY_BASE;
16604
+ exports2.DEFAULT_RETRY_MODE = DEFAULT_RETRY_MODE4;
16605
+ exports2.DefaultRateLimiter = DefaultRateLimiter;
16606
+ exports2.INITIAL_RETRY_TOKENS = INITIAL_RETRY_TOKENS;
16607
+ exports2.INVOCATION_ID_HEADER = INVOCATION_ID_HEADER;
16608
+ exports2.MAXIMUM_RETRY_DELAY = MAXIMUM_RETRY_DELAY;
16609
+ exports2.NO_RETRY_INCREMENT = NO_RETRY_INCREMENT;
16610
+ exports2.REQUEST_HEADER = REQUEST_HEADER;
16611
+ exports2.RETRY_COST = RETRY_COST;
16612
+ exports2.StandardRetryStrategy = StandardRetryStrategy;
16613
+ exports2.THROTTLING_RETRY_DELAY_BASE = THROTTLING_RETRY_DELAY_BASE;
16614
+ exports2.TIMEOUT_RETRY_COST = TIMEOUT_RETRY_COST;
16615
+ }
16616
+ });
16617
+
16618
+ // node_modules/@smithy/middleware-retry/node_modules/@smithy/protocol-http/dist-cjs/index.js
16619
+ var require_dist_cjs44 = __commonJS({
16620
+ "node_modules/@smithy/middleware-retry/node_modules/@smithy/protocol-http/dist-cjs/index.js"(exports2) {
16621
+ "use strict";
16622
+ var types = require_dist_cjs();
16623
+ var getHttpHandlerExtensionConfiguration4 = /* @__PURE__ */ __name((runtimeConfig) => {
16624
+ return {
16625
+ setHttpHandler(handler2) {
16626
+ runtimeConfig.httpHandler = handler2;
16627
+ },
16628
+ httpHandler() {
16629
+ return runtimeConfig.httpHandler;
16630
+ },
16631
+ updateHttpClientConfig(key, value) {
16632
+ runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);
16633
+ },
16634
+ httpHandlerConfigs() {
16635
+ return runtimeConfig.httpHandler.httpHandlerConfigs();
16636
+ }
16637
+ };
16638
+ }, "getHttpHandlerExtensionConfiguration");
16639
+ var resolveHttpHandlerRuntimeConfig4 = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => {
16640
+ return {
16641
+ httpHandler: httpHandlerExtensionConfiguration.httpHandler()
16642
+ };
16643
+ }, "resolveHttpHandlerRuntimeConfig");
16644
+ var Field = class {
16645
+ static {
16646
+ __name(this, "Field");
16647
+ }
16648
+ name;
16649
+ kind;
16650
+ values;
16651
+ constructor({ name, kind = types.FieldPosition.HEADER, values = [] }) {
16652
+ this.name = name;
16653
+ this.kind = kind;
16654
+ this.values = values;
16655
+ }
16656
+ add(value) {
16657
+ this.values.push(value);
16658
+ }
16659
+ set(values) {
16660
+ this.values = values;
16661
+ }
16662
+ remove(value) {
16663
+ this.values = this.values.filter((v4) => v4 !== value);
16664
+ }
16665
+ toString() {
16666
+ return this.values.map((v4) => v4.includes(",") || v4.includes(" ") ? `"${v4}"` : v4).join(", ");
16667
+ }
16668
+ get() {
16669
+ return this.values;
16670
+ }
16671
+ };
16672
+ var Fields = class {
16673
+ static {
16674
+ __name(this, "Fields");
16675
+ }
16676
+ entries = {};
16677
+ encoding;
16678
+ constructor({ fields = [], encoding = "utf-8" }) {
16679
+ fields.forEach(this.setField.bind(this));
16680
+ this.encoding = encoding;
15640
16681
  }
15641
- async getMaxAttempts() {
15642
- try {
15643
- return await this.maxAttemptsProvider();
15644
- } catch (error2) {
15645
- console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);
15646
- return DEFAULT_MAX_ATTEMPTS;
15647
- }
16682
+ setField(field) {
16683
+ this.entries[field.name.toLowerCase()] = field;
15648
16684
  }
15649
- shouldRetry(tokenToRenew, errorInfo, maxAttempts) {
15650
- const attempts = tokenToRenew.getRetryCount() + 1;
15651
- return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType);
16685
+ getField(name) {
16686
+ return this.entries[name.toLowerCase()];
15652
16687
  }
15653
- getCapacityCost(errorType) {
15654
- return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST;
16688
+ removeField(name) {
16689
+ delete this.entries[name.toLowerCase()];
15655
16690
  }
15656
- isRetryableError(errorType) {
15657
- return errorType === "THROTTLING" || errorType === "TRANSIENT";
16691
+ getByType(kind) {
16692
+ return Object.values(this.entries).filter((field) => field.kind === kind);
15658
16693
  }
15659
16694
  };
15660
- var AdaptiveRetryStrategy = class {
16695
+ var HttpRequest10 = class _HttpRequest {
15661
16696
  static {
15662
- __name(this, "AdaptiveRetryStrategy");
16697
+ __name(this, "HttpRequest");
15663
16698
  }
15664
- maxAttemptsProvider;
15665
- rateLimiter;
15666
- standardRetryStrategy;
15667
- mode = exports2.RETRY_MODES.ADAPTIVE;
15668
- constructor(maxAttemptsProvider, options) {
15669
- this.maxAttemptsProvider = maxAttemptsProvider;
15670
- const { rateLimiter } = options ?? {};
15671
- this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();
15672
- this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider);
16699
+ method;
16700
+ protocol;
16701
+ hostname;
16702
+ port;
16703
+ path;
16704
+ query;
16705
+ headers;
16706
+ username;
16707
+ password;
16708
+ fragment;
16709
+ body;
16710
+ constructor(options) {
16711
+ this.method = options.method || "GET";
16712
+ this.hostname = options.hostname || "localhost";
16713
+ this.port = options.port;
16714
+ this.query = options.query || {};
16715
+ this.headers = options.headers || {};
16716
+ this.body = options.body;
16717
+ this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
16718
+ this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
16719
+ this.username = options.username;
16720
+ this.password = options.password;
16721
+ this.fragment = options.fragment;
15673
16722
  }
15674
- async acquireInitialRetryToken(retryTokenScope) {
15675
- await this.rateLimiter.getSendToken();
15676
- return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);
16723
+ static clone(request2) {
16724
+ const cloned = new _HttpRequest({
16725
+ ...request2,
16726
+ headers: { ...request2.headers }
16727
+ });
16728
+ if (cloned.query) {
16729
+ cloned.query = cloneQuery(cloned.query);
16730
+ }
16731
+ return cloned;
15677
16732
  }
15678
- async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {
15679
- this.rateLimiter.updateClientSendingRate(errorInfo);
15680
- return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);
16733
+ static isInstance(request2) {
16734
+ if (!request2) {
16735
+ return false;
16736
+ }
16737
+ const req = request2;
16738
+ return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
15681
16739
  }
15682
- recordSuccess(token) {
15683
- this.rateLimiter.updateClientSendingRate({});
15684
- this.standardRetryStrategy.recordSuccess(token);
16740
+ clone() {
16741
+ return _HttpRequest.clone(this);
15685
16742
  }
15686
16743
  };
15687
- var ConfiguredRetryStrategy = class extends StandardRetryStrategy {
16744
+ function cloneQuery(query) {
16745
+ return Object.keys(query).reduce((carry, paramName) => {
16746
+ const param = query[paramName];
16747
+ return {
16748
+ ...carry,
16749
+ [paramName]: Array.isArray(param) ? [...param] : param
16750
+ };
16751
+ }, {});
16752
+ }
16753
+ __name(cloneQuery, "cloneQuery");
16754
+ var HttpResponse4 = class {
15688
16755
  static {
15689
- __name(this, "ConfiguredRetryStrategy");
16756
+ __name(this, "HttpResponse");
15690
16757
  }
15691
- computeNextBackoffDelay;
15692
- constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) {
15693
- super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts);
15694
- if (typeof computeNextBackoffDelay === "number") {
15695
- this.computeNextBackoffDelay = () => computeNextBackoffDelay;
15696
- } else {
15697
- this.computeNextBackoffDelay = computeNextBackoffDelay;
15698
- }
16758
+ statusCode;
16759
+ reason;
16760
+ headers;
16761
+ body;
16762
+ constructor(options) {
16763
+ this.statusCode = options.statusCode;
16764
+ this.reason = options.reason;
16765
+ this.headers = options.headers || {};
16766
+ this.body = options.body;
15699
16767
  }
15700
- async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {
15701
- const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo);
15702
- token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount());
15703
- return token;
16768
+ static isInstance(response) {
16769
+ if (!response)
16770
+ return false;
16771
+ const resp = response;
16772
+ return typeof resp.statusCode === "number" && typeof resp.headers === "object";
15704
16773
  }
15705
16774
  };
15706
- exports2.AdaptiveRetryStrategy = AdaptiveRetryStrategy;
15707
- exports2.ConfiguredRetryStrategy = ConfiguredRetryStrategy;
15708
- exports2.DEFAULT_MAX_ATTEMPTS = DEFAULT_MAX_ATTEMPTS;
15709
- exports2.DEFAULT_RETRY_DELAY_BASE = DEFAULT_RETRY_DELAY_BASE;
15710
- exports2.DEFAULT_RETRY_MODE = DEFAULT_RETRY_MODE4;
15711
- exports2.DefaultRateLimiter = DefaultRateLimiter;
15712
- exports2.INITIAL_RETRY_TOKENS = INITIAL_RETRY_TOKENS;
15713
- exports2.INVOCATION_ID_HEADER = INVOCATION_ID_HEADER;
15714
- exports2.MAXIMUM_RETRY_DELAY = MAXIMUM_RETRY_DELAY;
15715
- exports2.NO_RETRY_INCREMENT = NO_RETRY_INCREMENT;
15716
- exports2.REQUEST_HEADER = REQUEST_HEADER;
15717
- exports2.RETRY_COST = RETRY_COST;
15718
- exports2.StandardRetryStrategy = StandardRetryStrategy;
15719
- exports2.THROTTLING_RETRY_DELAY_BASE = THROTTLING_RETRY_DELAY_BASE;
15720
- exports2.TIMEOUT_RETRY_COST = TIMEOUT_RETRY_COST;
16775
+ function isValidHostname(hostname) {
16776
+ const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;
16777
+ return hostPattern.test(hostname);
16778
+ }
16779
+ __name(isValidHostname, "isValidHostname");
16780
+ exports2.Field = Field;
16781
+ exports2.Fields = Fields;
16782
+ exports2.HttpRequest = HttpRequest10;
16783
+ exports2.HttpResponse = HttpResponse4;
16784
+ exports2.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration4;
16785
+ exports2.isValidHostname = isValidHostname;
16786
+ exports2.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig4;
15721
16787
  }
15722
16788
  });
15723
16789
 
@@ -15734,15 +16800,15 @@ var require_isStreamingPayload = __commonJS({
15734
16800
  });
15735
16801
 
15736
16802
  // node_modules/@smithy/middleware-retry/dist-cjs/index.js
15737
- var require_dist_cjs39 = __commonJS({
16803
+ var require_dist_cjs45 = __commonJS({
15738
16804
  "node_modules/@smithy/middleware-retry/dist-cjs/index.js"(exports2) {
15739
16805
  "use strict";
15740
- var utilRetry = require_dist_cjs38();
15741
- var protocolHttp = require_dist_cjs3();
15742
- var serviceErrorClassification = require_dist_cjs37();
15743
- var uuid = require_dist_cjs20();
16806
+ var utilRetry = require_dist_cjs43();
16807
+ var protocolHttp = require_dist_cjs44();
16808
+ var serviceErrorClassification = require_dist_cjs42();
16809
+ var uuid = require_dist_cjs24();
15744
16810
  var utilMiddleware = require_dist_cjs2();
15745
- var smithyClient = require_dist_cjs28();
16811
+ var smithyClient = require_dist_cjs32();
15746
16812
  var isStreamingPayload = require_isStreamingPayload();
15747
16813
  var getDefaultRetryQuota = /* @__PURE__ */ __name((initialRetryTokens, options) => {
15748
16814
  const MAX_CAPACITY = initialRetryTokens;
@@ -16250,11 +17316,11 @@ var require_package = __commonJS({
16250
17316
  });
16251
17317
 
16252
17318
  // node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js
16253
- var require_dist_cjs40 = __commonJS({
17319
+ var require_dist_cjs46 = __commonJS({
16254
17320
  "node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js"(exports2) {
16255
17321
  "use strict";
16256
17322
  var client = (init_client(), __toCommonJS(client_exports));
16257
- var propertyProvider = require_dist_cjs25();
17323
+ var propertyProvider = require_dist_cjs29();
16258
17324
  var ENV_KEY = "AWS_ACCESS_KEY_ID";
16259
17325
  var ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
16260
17326
  var ENV_SESSION = "AWS_SESSION_TOKEN";
@@ -16294,15 +17360,15 @@ var require_dist_cjs40 = __commonJS({
16294
17360
  });
16295
17361
 
16296
17362
  // node_modules/@smithy/credential-provider-imds/dist-cjs/index.js
16297
- var require_dist_cjs41 = __commonJS({
17363
+ var require_dist_cjs47 = __commonJS({
16298
17364
  "node_modules/@smithy/credential-provider-imds/dist-cjs/index.js"(exports2) {
16299
17365
  "use strict";
16300
- var propertyProvider = require_dist_cjs25();
17366
+ var propertyProvider = require_dist_cjs29();
16301
17367
  var url = require("url");
16302
17368
  var buffer = require("buffer");
16303
17369
  var http = require("http");
16304
- var nodeConfigProvider = require_dist_cjs35();
16305
- var urlParser = require_dist_cjs23();
17370
+ var nodeConfigProvider = require_dist_cjs40();
17371
+ var urlParser = require_dist_cjs27();
16306
17372
  function httpRequest(options) {
16307
17373
  return new Promise((resolve, reject) => {
16308
17374
  const req = http.request({
@@ -16393,7 +17459,7 @@ var require_dist_cjs41 = __commonJS({
16393
17459
  "http:": true,
16394
17460
  "https:": true
16395
17461
  };
16396
- var getCmdsUri = /* @__PURE__ */ __name(async ({ logger: logger21 }) => {
17462
+ var getCmdsUri = /* @__PURE__ */ __name(async ({ logger: logger25 }) => {
16397
17463
  if (process.env[ENV_CMDS_RELATIVE_URI]) {
16398
17464
  return {
16399
17465
  hostname: CMDS_IP,
@@ -16405,13 +17471,13 @@ var require_dist_cjs41 = __commonJS({
16405
17471
  if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) {
16406
17472
  throw new propertyProvider.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {
16407
17473
  tryNextLink: false,
16408
- logger: logger21
17474
+ logger: logger25
16409
17475
  });
16410
17476
  }
16411
17477
  if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) {
16412
17478
  throw new propertyProvider.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {
16413
17479
  tryNextLink: false,
16414
- logger: logger21
17480
+ logger: logger25
16415
17481
  });
16416
17482
  }
16417
17483
  return {
@@ -16421,7 +17487,7 @@ var require_dist_cjs41 = __commonJS({
16421
17487
  }
16422
17488
  throw new propertyProvider.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`, {
16423
17489
  tryNextLink: false,
16424
- logger: logger21
17490
+ logger: logger25
16425
17491
  });
16426
17492
  }, "getCmdsUri");
16427
17493
  var InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError extends propertyProvider.CredentialsProviderError {
@@ -16476,10 +17542,10 @@ var require_dist_cjs41 = __commonJS({
16476
17542
  var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60;
16477
17543
  var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;
16478
17544
  var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html";
16479
- var getExtendedInstanceMetadataCredentials = /* @__PURE__ */ __name((credentials, logger21) => {
17545
+ var getExtendedInstanceMetadataCredentials = /* @__PURE__ */ __name((credentials, logger25) => {
16480
17546
  const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);
16481
17547
  const newExpiration = new Date(Date.now() + refreshInterval * 1e3);
16482
- logger21.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}.
17548
+ logger25.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}.
16483
17549
  For more information, please visit: ` + STATIC_STABILITY_DOC_URL);
16484
17550
  const originalExpiration = credentials.originalExpiration ?? credentials.expiration;
16485
17551
  return {
@@ -16489,19 +17555,19 @@ For more information, please visit: ` + STATIC_STABILITY_DOC_URL);
16489
17555
  };
16490
17556
  }, "getExtendedInstanceMetadataCredentials");
16491
17557
  var staticStabilityProvider = /* @__PURE__ */ __name((provider, options = {}) => {
16492
- const logger21 = options?.logger || console;
17558
+ const logger25 = options?.logger || console;
16493
17559
  let pastCredentials;
16494
17560
  return async () => {
16495
17561
  let credentials;
16496
17562
  try {
16497
17563
  credentials = await provider();
16498
17564
  if (credentials.expiration && credentials.expiration.getTime() < Date.now()) {
16499
- credentials = getExtendedInstanceMetadataCredentials(credentials, logger21);
17565
+ credentials = getExtendedInstanceMetadataCredentials(credentials, logger25);
16500
17566
  }
16501
17567
  } catch (e4) {
16502
17568
  if (pastCredentials) {
16503
- logger21.warn("Credential renew failed: ", e4);
16504
- credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger21);
17569
+ logger25.warn("Credential renew failed: ", e4);
17570
+ credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger25);
16505
17571
  } else {
16506
17572
  throw e4;
16507
17573
  }
@@ -16518,7 +17584,7 @@ For more information, please visit: ` + STATIC_STABILITY_DOC_URL);
16518
17584
  var fromInstanceMetadata = /* @__PURE__ */ __name((init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }), "fromInstanceMetadata");
16519
17585
  var getInstanceMetadataProvider = /* @__PURE__ */ __name((init = {}) => {
16520
17586
  let disableFetchToken = false;
16521
- const { logger: logger21, profile } = init;
17587
+ const { logger: logger25, profile } = init;
16522
17588
  const { timeout, maxRetries } = providerConfigFromInit(init);
16523
17589
  const getCredentials = /* @__PURE__ */ __name(async (maxRetries2, options) => {
16524
17590
  const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null;
@@ -16582,7 +17648,7 @@ For more information, please visit: ` + STATIC_STABILITY_DOC_URL);
16582
17648
  return async () => {
16583
17649
  const endpoint = await getInstanceMetadataEndpoint();
16584
17650
  if (disableFetchToken) {
16585
- logger21?.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)");
17651
+ logger25?.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)");
16586
17652
  return getCredentials(maxRetries, { ...endpoint, timeout });
16587
17653
  } else {
16588
17654
  let token;
@@ -16596,7 +17662,7 @@ For more information, please visit: ` + STATIC_STABILITY_DOC_URL);
16596
17662
  } else if (error2.message === "TimeoutError" || [403, 404, 405].includes(error2.statusCode)) {
16597
17663
  disableFetchToken = true;
16598
17664
  }
16599
- logger21?.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)");
17665
+ logger25?.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)");
16600
17666
  return getCredentials(maxRetries, { ...endpoint, timeout });
16601
17667
  }
16602
17668
  return getCredentials(maxRetries, {
@@ -16649,11 +17715,11 @@ var require_checkUrl = __commonJS({
16649
17715
  "use strict";
16650
17716
  Object.defineProperty(exports2, "__esModule", { value: true });
16651
17717
  exports2.checkUrl = void 0;
16652
- var property_provider_1 = require_dist_cjs25();
17718
+ var property_provider_1 = require_dist_cjs29();
16653
17719
  var ECS_CONTAINER_HOST = "169.254.170.2";
16654
17720
  var EKS_CONTAINER_HOST_IPv4 = "169.254.170.23";
16655
17721
  var EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]";
16656
- var checkUrl = /* @__PURE__ */ __name((url, logger21) => {
17722
+ var checkUrl = /* @__PURE__ */ __name((url, logger25) => {
16657
17723
  if (url.protocol === "https:") {
16658
17724
  return;
16659
17725
  }
@@ -16680,7 +17746,7 @@ var require_checkUrl = __commonJS({
16680
17746
  throw new property_provider_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
16681
17747
  - loopback CIDR 127.0.0.0/8 or [::1/128]
16682
17748
  - ECS container host 169.254.170.2
16683
- - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger: logger21 });
17749
+ - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger: logger25 });
16684
17750
  }, "checkUrl");
16685
17751
  exports2.checkUrl = checkUrl;
16686
17752
  }
@@ -16693,10 +17759,10 @@ var require_requestHelpers = __commonJS({
16693
17759
  Object.defineProperty(exports2, "__esModule", { value: true });
16694
17760
  exports2.createGetRequest = createGetRequest;
16695
17761
  exports2.getCredentials = getCredentials;
16696
- var property_provider_1 = require_dist_cjs25();
17762
+ var property_provider_1 = require_dist_cjs29();
16697
17763
  var protocol_http_1 = require_dist_cjs3();
16698
- var smithy_client_1 = require_dist_cjs28();
16699
- var util_stream_1 = require_dist_cjs19();
17764
+ var smithy_client_1 = require_dist_cjs32();
17765
+ var util_stream_1 = require_dist_cjs23();
16700
17766
  function createGetRequest(url) {
16701
17767
  return new protocol_http_1.HttpRequest({
16702
17768
  protocol: url.protocol,
@@ -16711,13 +17777,13 @@ var require_requestHelpers = __commonJS({
16711
17777
  });
16712
17778
  }
16713
17779
  __name(createGetRequest, "createGetRequest");
16714
- async function getCredentials(response, logger21) {
17780
+ async function getCredentials(response, logger25) {
16715
17781
  const stream = (0, util_stream_1.sdkStreamMixin)(response.body);
16716
17782
  const str = await stream.transformToString();
16717
17783
  if (response.statusCode === 200) {
16718
17784
  const parsed = JSON.parse(str);
16719
17785
  if (typeof parsed.AccessKeyId !== "string" || typeof parsed.SecretAccessKey !== "string" || typeof parsed.Token !== "string" || typeof parsed.Expiration !== "string") {
16720
- throw new property_provider_1.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger: logger21 });
17786
+ throw new property_provider_1.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger: logger25 });
16721
17787
  }
16722
17788
  return {
16723
17789
  accessKeyId: parsed.AccessKeyId,
@@ -16732,12 +17798,12 @@ var require_requestHelpers = __commonJS({
16732
17798
  parsedBody = JSON.parse(str);
16733
17799
  } catch (e4) {
16734
17800
  }
16735
- throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger: logger21 }), {
17801
+ throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger: logger25 }), {
16736
17802
  Code: parsedBody.Code,
16737
17803
  Message: parsedBody.Message
16738
17804
  });
16739
17805
  }
16740
- throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger: logger21 });
17806
+ throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger: logger25 });
16741
17807
  }
16742
17808
  __name(getCredentials, "getCredentials");
16743
17809
  }
@@ -16773,8 +17839,8 @@ var require_fromHttp = __commonJS({
16773
17839
  exports2.fromHttp = void 0;
16774
17840
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
16775
17841
  var client_1 = (init_client(), __toCommonJS(client_exports));
16776
- var node_http_handler_1 = require_dist_cjs16();
16777
- var property_provider_1 = require_dist_cjs25();
17842
+ var node_http_handler_1 = require_dist_cjs19();
17843
+ var property_provider_1 = require_dist_cjs29();
16778
17844
  var promises_1 = tslib_1.__importDefault(require("fs/promises"));
16779
17845
  var checkUrl_1 = require_checkUrl();
16780
17846
  var requestHelpers_1 = require_requestHelpers();
@@ -16834,7 +17900,7 @@ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
16834
17900
  });
16835
17901
 
16836
17902
  // node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js
16837
- var require_dist_cjs42 = __commonJS({
17903
+ var require_dist_cjs48 = __commonJS({
16838
17904
  "node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js"(exports2) {
16839
17905
  "use strict";
16840
17906
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -17059,12 +18125,12 @@ var init_package = __esm({
17059
18125
  });
17060
18126
 
17061
18127
  // node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js
17062
- var require_dist_cjs43 = __commonJS({
18128
+ var require_dist_cjs49 = __commonJS({
17063
18129
  "node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js"(exports2) {
17064
18130
  "use strict";
17065
18131
  var os = require("os");
17066
18132
  var process2 = require("process");
17067
- var middlewareUserAgent = require_dist_cjs30();
18133
+ var middlewareUserAgent = require_dist_cjs34();
17068
18134
  var crtAvailability = {
17069
18135
  isCrtAvailable: false
17070
18136
  };
@@ -17117,11 +18183,11 @@ var require_dist_cjs43 = __commonJS({
17117
18183
  });
17118
18184
 
17119
18185
  // node_modules/@smithy/hash-node/dist-cjs/index.js
17120
- var require_dist_cjs44 = __commonJS({
18186
+ var require_dist_cjs50 = __commonJS({
17121
18187
  "node_modules/@smithy/hash-node/dist-cjs/index.js"(exports2) {
17122
18188
  "use strict";
17123
- var utilBufferFrom = require_dist_cjs11();
17124
- var utilUtf8 = require_dist_cjs12();
18189
+ var utilBufferFrom = require_dist_cjs13();
18190
+ var utilUtf8 = require_dist_cjs14();
17125
18191
  var buffer = require("buffer");
17126
18192
  var crypto3 = require("crypto");
17127
18193
  var Hash4 = class {
@@ -17164,7 +18230,7 @@ var require_dist_cjs44 = __commonJS({
17164
18230
  });
17165
18231
 
17166
18232
  // node_modules/@smithy/util-body-length-node/dist-cjs/index.js
17167
- var require_dist_cjs45 = __commonJS({
18233
+ var require_dist_cjs51 = __commonJS({
17168
18234
  "node_modules/@smithy/util-body-length-node/dist-cjs/index.js"(exports2) {
17169
18235
  "use strict";
17170
18236
  var node_fs = require("node:fs");
@@ -17194,12 +18260,12 @@ var require_dist_cjs45 = __commonJS({
17194
18260
  });
17195
18261
 
17196
18262
  // node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js
17197
- var require_dist_cjs46 = __commonJS({
18263
+ var require_dist_cjs52 = __commonJS({
17198
18264
  "node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js"(exports2) {
17199
18265
  "use strict";
17200
- var configResolver = require_dist_cjs32();
17201
- var nodeConfigProvider = require_dist_cjs35();
17202
- var propertyProvider = require_dist_cjs25();
18266
+ var configResolver = require_dist_cjs36();
18267
+ var nodeConfigProvider = require_dist_cjs40();
18268
+ var propertyProvider = require_dist_cjs29();
17203
18269
  var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV";
17204
18270
  var AWS_REGION_ENV = "AWS_REGION";
17205
18271
  var AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION";
@@ -17255,7 +18321,7 @@ var require_dist_cjs46 = __commonJS({
17255
18321
  }
17256
18322
  if (!process.env[ENV_IMDS_DISABLED]) {
17257
18323
  try {
17258
- const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM(require_dist_cjs41()));
18324
+ const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM(require_dist_cjs47()));
17259
18325
  const endpoint = await getInstanceMetadataEndpoint();
17260
18326
  return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString();
17261
18327
  } catch (e4) {
@@ -17303,8 +18369,8 @@ var init_ruleset = __esm({
17303
18369
  var import_util_endpoints, import_util_endpoints2, cache, defaultEndpointResolver;
17304
18370
  var init_endpointResolver = __esm({
17305
18371
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js"() {
17306
- import_util_endpoints = __toESM(require_dist_cjs24());
17307
- import_util_endpoints2 = __toESM(require_dist_cjs21());
18372
+ import_util_endpoints = __toESM(require_dist_cjs28());
18373
+ import_util_endpoints2 = __toESM(require_dist_cjs25());
17308
18374
  init_ruleset();
17309
18375
  cache = new import_util_endpoints2.EndpointCache({
17310
18376
  size: 50,
@@ -17327,10 +18393,10 @@ var init_runtimeConfig_shared = __esm({
17327
18393
  init_dist_es2();
17328
18394
  init_protocols2();
17329
18395
  init_dist_es();
17330
- import_smithy_client8 = __toESM(require_dist_cjs28());
17331
- import_url_parser = __toESM(require_dist_cjs23());
17332
- import_util_base648 = __toESM(require_dist_cjs13());
17333
- import_util_utf88 = __toESM(require_dist_cjs12());
18396
+ import_smithy_client8 = __toESM(require_dist_cjs32());
18397
+ import_url_parser = __toESM(require_dist_cjs27());
18398
+ import_util_base648 = __toESM(require_dist_cjs15());
18399
+ import_util_utf88 = __toESM(require_dist_cjs14());
17334
18400
  init_httpAuthSchemeProvider();
17335
18401
  init_endpointResolver();
17336
18402
  getRuntimeConfig = /* @__PURE__ */ __name((config) => {
@@ -17371,16 +18437,16 @@ var init_runtimeConfig = __esm({
17371
18437
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js"() {
17372
18438
  init_package();
17373
18439
  init_dist_es2();
17374
- import_util_user_agent_node = __toESM(require_dist_cjs43());
17375
- import_config_resolver = __toESM(require_dist_cjs32());
17376
- import_hash_node = __toESM(require_dist_cjs44());
17377
- import_middleware_retry = __toESM(require_dist_cjs39());
17378
- import_node_config_provider = __toESM(require_dist_cjs35());
17379
- import_node_http_handler = __toESM(require_dist_cjs16());
17380
- import_smithy_client9 = __toESM(require_dist_cjs28());
17381
- import_util_body_length_node = __toESM(require_dist_cjs45());
17382
- import_util_defaults_mode_node = __toESM(require_dist_cjs46());
17383
- import_util_retry = __toESM(require_dist_cjs38());
18440
+ import_util_user_agent_node = __toESM(require_dist_cjs49());
18441
+ import_config_resolver = __toESM(require_dist_cjs36());
18442
+ import_hash_node = __toESM(require_dist_cjs50());
18443
+ import_middleware_retry = __toESM(require_dist_cjs45());
18444
+ import_node_config_provider = __toESM(require_dist_cjs40());
18445
+ import_node_http_handler = __toESM(require_dist_cjs19());
18446
+ import_smithy_client9 = __toESM(require_dist_cjs32());
18447
+ import_util_body_length_node = __toESM(require_dist_cjs51());
18448
+ import_util_defaults_mode_node = __toESM(require_dist_cjs52());
18449
+ import_util_retry = __toESM(require_dist_cjs43());
17384
18450
  init_runtimeConfig_shared();
17385
18451
  getRuntimeConfig2 = /* @__PURE__ */ __name((config) => {
17386
18452
  (0, import_smithy_client9.emitWarningIfUnsupportedVersion)(process.version);
@@ -17424,8 +18490,8 @@ var require_stsRegionDefaultResolver = __commonJS({
17424
18490
  Object.defineProperty(exports2, "__esModule", { value: true });
17425
18491
  exports2.warning = void 0;
17426
18492
  exports2.stsRegionDefaultResolver = stsRegionDefaultResolver2;
17427
- var config_resolver_1 = require_dist_cjs32();
17428
- var node_config_provider_1 = require_dist_cjs35();
18493
+ var config_resolver_1 = require_dist_cjs36();
18494
+ var node_config_provider_1 = require_dist_cjs40();
17429
18495
  function stsRegionDefaultResolver2(loaderConfig = {}) {
17430
18496
  return (0, node_config_provider_1.loadConfig)({
17431
18497
  ...config_resolver_1.NODE_REGION_CONFIG_OPTIONS,
@@ -17445,10 +18511,10 @@ var require_stsRegionDefaultResolver = __commonJS({
17445
18511
  });
17446
18512
 
17447
18513
  // node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js
17448
- var require_dist_cjs47 = __commonJS({
18514
+ var require_dist_cjs53 = __commonJS({
17449
18515
  "node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js"(exports2) {
17450
18516
  "use strict";
17451
- var configResolver = require_dist_cjs32();
18517
+ var configResolver = require_dist_cjs36();
17452
18518
  var stsRegionDefaultResolver2 = require_stsRegionDefaultResolver();
17453
18519
  var getAwsRegionExtensionConfiguration4 = /* @__PURE__ */ __name((runtimeConfig) => {
17454
18520
  return {
@@ -17556,9 +18622,9 @@ var init_httpAuthExtensionConfiguration = __esm({
17556
18622
  var import_region_config_resolver, import_protocol_http12, import_smithy_client10, resolveRuntimeExtensions;
17557
18623
  var init_runtimeExtensions = __esm({
17558
18624
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeExtensions.js"() {
17559
- import_region_config_resolver = __toESM(require_dist_cjs47());
18625
+ import_region_config_resolver = __toESM(require_dist_cjs53());
17560
18626
  import_protocol_http12 = __toESM(require_dist_cjs3());
17561
- import_smithy_client10 = __toESM(require_dist_cjs28());
18627
+ import_smithy_client10 = __toESM(require_dist_cjs32());
17562
18628
  init_httpAuthExtensionConfiguration();
17563
18629
  resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
17564
18630
  const extensionConfiguration = Object.assign((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client10.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http12.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
@@ -17575,14 +18641,14 @@ var init_SSOOIDCClient = __esm({
17575
18641
  import_middleware_host_header = __toESM(require_dist_cjs6());
17576
18642
  import_middleware_logger = __toESM(require_dist_cjs7());
17577
18643
  import_middleware_recursion_detection = __toESM(require_dist_cjs8());
17578
- import_middleware_user_agent = __toESM(require_dist_cjs30());
17579
- import_config_resolver2 = __toESM(require_dist_cjs32());
18644
+ import_middleware_user_agent = __toESM(require_dist_cjs34());
18645
+ import_config_resolver2 = __toESM(require_dist_cjs36());
17580
18646
  init_dist_es();
17581
18647
  init_schema();
17582
- import_middleware_content_length = __toESM(require_dist_cjs33());
17583
- import_middleware_endpoint = __toESM(require_dist_cjs36());
17584
- import_middleware_retry2 = __toESM(require_dist_cjs39());
17585
- import_smithy_client11 = __toESM(require_dist_cjs28());
18648
+ import_middleware_content_length = __toESM(require_dist_cjs38());
18649
+ import_middleware_endpoint = __toESM(require_dist_cjs41());
18650
+ import_middleware_retry2 = __toESM(require_dist_cjs45());
18651
+ import_smithy_client11 = __toESM(require_dist_cjs32());
17586
18652
  init_httpAuthSchemeProvider();
17587
18653
  init_EndpointParameters();
17588
18654
  init_runtimeConfig();
@@ -17631,7 +18697,7 @@ var init_SSOOIDCClient = __esm({
17631
18697
  var import_smithy_client12, SSOOIDCServiceException;
17632
18698
  var init_SSOOIDCServiceException = __esm({
17633
18699
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js"() {
17634
- import_smithy_client12 = __toESM(require_dist_cjs28());
18700
+ import_smithy_client12 = __toESM(require_dist_cjs32());
17635
18701
  SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client12.ServiceException {
17636
18702
  static {
17637
18703
  __name(this, "SSOOIDCServiceException");
@@ -18002,8 +19068,8 @@ var init_schemas_0 = __esm({
18002
19068
  var import_middleware_endpoint2, import_smithy_client13, CreateTokenCommand;
18003
19069
  var init_CreateTokenCommand = __esm({
18004
19070
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js"() {
18005
- import_middleware_endpoint2 = __toESM(require_dist_cjs36());
18006
- import_smithy_client13 = __toESM(require_dist_cjs28());
19071
+ import_middleware_endpoint2 = __toESM(require_dist_cjs41());
19072
+ import_smithy_client13 = __toESM(require_dist_cjs32());
18007
19073
  init_EndpointParameters();
18008
19074
  init_schemas_0();
18009
19075
  CreateTokenCommand = class extends import_smithy_client13.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o4) {
@@ -18020,7 +19086,7 @@ var init_CreateTokenCommand = __esm({
18020
19086
  var import_smithy_client14, commands, SSOOIDC;
18021
19087
  var init_SSOOIDC = __esm({
18022
19088
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDC.js"() {
18023
- import_smithy_client14 = __toESM(require_dist_cjs28());
19089
+ import_smithy_client14 = __toESM(require_dist_cjs32());
18024
19090
  init_CreateTokenCommand();
18025
19091
  init_SSOOIDCClient();
18026
19092
  commands = {
@@ -18093,22 +19159,22 @@ var init_sso_oidc = __esm({
18093
19159
  });
18094
19160
 
18095
19161
  // node_modules/@aws-sdk/token-providers/dist-cjs/index.js
18096
- var require_dist_cjs48 = __commonJS({
19162
+ var require_dist_cjs54 = __commonJS({
18097
19163
  "node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2) {
18098
19164
  "use strict";
18099
19165
  var client = (init_client(), __toCommonJS(client_exports));
18100
19166
  var httpAuthSchemes = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports));
18101
- var propertyProvider = require_dist_cjs25();
18102
- var sharedIniFileLoader = require_dist_cjs34();
19167
+ var propertyProvider = require_dist_cjs29();
19168
+ var sharedIniFileLoader = require_dist_cjs39();
18103
19169
  var fs = require("fs");
18104
- var fromEnvSigningName = /* @__PURE__ */ __name(({ logger: logger21, signingName } = {}) => async () => {
18105
- logger21?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
19170
+ var fromEnvSigningName = /* @__PURE__ */ __name(({ logger: logger25, signingName } = {}) => async () => {
19171
+ logger25?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
18106
19172
  if (!signingName) {
18107
- throw new propertyProvider.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger: logger21 });
19173
+ throw new propertyProvider.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger: logger25 });
18108
19174
  }
18109
19175
  const bearerTokenKey = httpAuthSchemes.getBearerTokenEnvKey(signingName);
18110
19176
  if (!(bearerTokenKey in process.env)) {
18111
- throw new propertyProvider.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger: logger21 });
19177
+ throw new propertyProvider.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger: logger25 });
18112
19178
  }
18113
19179
  const token = { token: process.env[bearerTokenKey] };
18114
19180
  client.setTokenFeature(token, "BEARER_SERVICE_ENV_VARS", "3");
@@ -18229,8 +19295,8 @@ var require_dist_cjs48 = __commonJS({
18229
19295
  return existingToken;
18230
19296
  }
18231
19297
  }, "fromSso");
18232
- var fromStatic = /* @__PURE__ */ __name(({ token, logger: logger21 }) => async () => {
18233
- logger21?.debug("@aws-sdk/token-providers - fromStatic");
19298
+ var fromStatic = /* @__PURE__ */ __name(({ token, logger: logger25 }) => async () => {
19299
+ logger25?.debug("@aws-sdk/token-providers - fromStatic");
18234
19300
  if (!token || !token.token) {
18235
19301
  throw new propertyProvider.TokenProviderError(`Please pass a valid token to fromStatic`, false);
18236
19302
  }
@@ -18467,8 +19533,8 @@ var require_endpointResolver = __commonJS({
18467
19533
  "use strict";
18468
19534
  Object.defineProperty(exports2, "__esModule", { value: true });
18469
19535
  exports2.defaultEndpointResolver = void 0;
18470
- var util_endpoints_1 = require_dist_cjs24();
18471
- var util_endpoints_2 = require_dist_cjs21();
19536
+ var util_endpoints_1 = require_dist_cjs28();
19537
+ var util_endpoints_2 = require_dist_cjs25();
18472
19538
  var ruleset_1 = require_ruleset();
18473
19539
  var cache4 = new util_endpoints_2.EndpointCache({
18474
19540
  size: 50,
@@ -18494,10 +19560,10 @@ var require_runtimeConfig_shared = __commonJS({
18494
19560
  var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
18495
19561
  var protocols_1 = (init_protocols2(), __toCommonJS(protocols_exports2));
18496
19562
  var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports));
18497
- var smithy_client_1 = require_dist_cjs28();
18498
- var url_parser_1 = require_dist_cjs23();
18499
- var util_base64_1 = require_dist_cjs13();
18500
- var util_utf8_1 = require_dist_cjs12();
19563
+ var smithy_client_1 = require_dist_cjs32();
19564
+ var url_parser_1 = require_dist_cjs27();
19565
+ var util_base64_1 = require_dist_cjs15();
19566
+ var util_utf8_1 = require_dist_cjs14();
18501
19567
  var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider2();
18502
19568
  var endpointResolver_1 = require_endpointResolver();
18503
19569
  var getRuntimeConfig7 = /* @__PURE__ */ __name((config) => {
@@ -18542,16 +19608,16 @@ var require_runtimeConfig = __commonJS({
18542
19608
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
18543
19609
  var package_json_1 = tslib_1.__importDefault(require_package2());
18544
19610
  var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
18545
- var util_user_agent_node_1 = require_dist_cjs43();
18546
- var config_resolver_1 = require_dist_cjs32();
18547
- var hash_node_1 = require_dist_cjs44();
18548
- var middleware_retry_1 = require_dist_cjs39();
18549
- var node_config_provider_1 = require_dist_cjs35();
18550
- var node_http_handler_1 = require_dist_cjs16();
18551
- var smithy_client_1 = require_dist_cjs28();
18552
- var util_body_length_node_1 = require_dist_cjs45();
18553
- var util_defaults_mode_node_1 = require_dist_cjs46();
18554
- var util_retry_1 = require_dist_cjs38();
19611
+ var util_user_agent_node_1 = require_dist_cjs49();
19612
+ var config_resolver_1 = require_dist_cjs36();
19613
+ var hash_node_1 = require_dist_cjs50();
19614
+ var middleware_retry_1 = require_dist_cjs45();
19615
+ var node_config_provider_1 = require_dist_cjs40();
19616
+ var node_http_handler_1 = require_dist_cjs19();
19617
+ var smithy_client_1 = require_dist_cjs32();
19618
+ var util_body_length_node_1 = require_dist_cjs51();
19619
+ var util_defaults_mode_node_1 = require_dist_cjs52();
19620
+ var util_retry_1 = require_dist_cjs43();
18555
19621
  var runtimeConfig_shared_1 = require_runtimeConfig_shared();
18556
19622
  var getRuntimeConfig7 = /* @__PURE__ */ __name((config) => {
18557
19623
  (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
@@ -18590,23 +19656,23 @@ var require_runtimeConfig = __commonJS({
18590
19656
  });
18591
19657
 
18592
19658
  // node_modules/@aws-sdk/client-sso/dist-cjs/index.js
18593
- var require_dist_cjs49 = __commonJS({
19659
+ var require_dist_cjs55 = __commonJS({
18594
19660
  "node_modules/@aws-sdk/client-sso/dist-cjs/index.js"(exports2) {
18595
19661
  "use strict";
18596
19662
  var middlewareHostHeader = require_dist_cjs6();
18597
19663
  var middlewareLogger = require_dist_cjs7();
18598
19664
  var middlewareRecursionDetection = require_dist_cjs8();
18599
- var middlewareUserAgent = require_dist_cjs30();
18600
- var configResolver = require_dist_cjs32();
19665
+ var middlewareUserAgent = require_dist_cjs34();
19666
+ var configResolver = require_dist_cjs36();
18601
19667
  var core = (init_dist_es(), __toCommonJS(dist_es_exports));
18602
19668
  var schema = (init_schema(), __toCommonJS(schema_exports));
18603
- var middlewareContentLength = require_dist_cjs33();
18604
- var middlewareEndpoint = require_dist_cjs36();
18605
- var middlewareRetry = require_dist_cjs39();
18606
- var smithyClient = require_dist_cjs28();
19669
+ var middlewareContentLength = require_dist_cjs38();
19670
+ var middlewareEndpoint = require_dist_cjs41();
19671
+ var middlewareRetry = require_dist_cjs45();
19672
+ var smithyClient = require_dist_cjs32();
18607
19673
  var httpAuthSchemeProvider = require_httpAuthSchemeProvider2();
18608
19674
  var runtimeConfig = require_runtimeConfig();
18609
- var regionConfigResolver = require_dist_cjs47();
19675
+ var regionConfigResolver = require_dist_cjs53();
18610
19676
  var protocolHttp = require_dist_cjs3();
18611
19677
  var resolveClientEndpointParameters4 = /* @__PURE__ */ __name((options) => {
18612
19678
  return Object.assign(options, {
@@ -18993,7 +20059,7 @@ var require_dist_cjs49 = __commonJS({
18993
20059
  var require_loadSso_CVy8iqsZ = __commonJS({
18994
20060
  "node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-CVy8iqsZ.js"(exports2) {
18995
20061
  "use strict";
18996
- var clientSso = require_dist_cjs49();
20062
+ var clientSso = require_dist_cjs55();
18997
20063
  Object.defineProperty(exports2, "GetRoleCredentialsCommand", {
18998
20064
  enumerable: true,
18999
20065
  get: /* @__PURE__ */ __name(function() {
@@ -19010,16 +20076,16 @@ var require_loadSso_CVy8iqsZ = __commonJS({
19010
20076
  });
19011
20077
 
19012
20078
  // node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js
19013
- var require_dist_cjs50 = __commonJS({
20079
+ var require_dist_cjs56 = __commonJS({
19014
20080
  "node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js"(exports2) {
19015
20081
  "use strict";
19016
- var propertyProvider = require_dist_cjs25();
19017
- var sharedIniFileLoader = require_dist_cjs34();
20082
+ var propertyProvider = require_dist_cjs29();
20083
+ var sharedIniFileLoader = require_dist_cjs39();
19018
20084
  var client = (init_client(), __toCommonJS(client_exports));
19019
- var tokenProviders = require_dist_cjs48();
20085
+ var tokenProviders = require_dist_cjs54();
19020
20086
  var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile");
19021
20087
  var SHOULD_FAIL_CREDENTIAL_CHAIN = false;
19022
- var resolveSSOCredentials = /* @__PURE__ */ __name(async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, profile, filepath, configFilepath, ignoreCache, logger: logger21 }) => {
20088
+ var resolveSSOCredentials = /* @__PURE__ */ __name(async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, profile, filepath, configFilepath, ignoreCache, logger: logger25 }) => {
19023
20089
  let token;
19024
20090
  const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
19025
20091
  if (ssoSession) {
@@ -19037,7 +20103,7 @@ var require_dist_cjs50 = __commonJS({
19037
20103
  } catch (e4) {
19038
20104
  throw new propertyProvider.CredentialsProviderError(e4.message, {
19039
20105
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
19040
- logger: logger21
20106
+ logger: logger25
19041
20107
  });
19042
20108
  }
19043
20109
  } else {
@@ -19046,14 +20112,14 @@ var require_dist_cjs50 = __commonJS({
19046
20112
  } catch (e4) {
19047
20113
  throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
19048
20114
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
19049
- logger: logger21
20115
+ logger: logger25
19050
20116
  });
19051
20117
  }
19052
20118
  }
19053
20119
  if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
19054
20120
  throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
19055
20121
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
19056
- logger: logger21
20122
+ logger: logger25
19057
20123
  });
19058
20124
  }
19059
20125
  const { accessToken } = token;
@@ -19075,14 +20141,14 @@ var require_dist_cjs50 = __commonJS({
19075
20141
  } catch (e4) {
19076
20142
  throw new propertyProvider.CredentialsProviderError(e4, {
19077
20143
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
19078
- logger: logger21
20144
+ logger: logger25
19079
20145
  });
19080
20146
  }
19081
20147
  const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {} } = ssoResp;
19082
20148
  if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
19083
20149
  throw new propertyProvider.CredentialsProviderError("SSO returns an invalid temporary credential.", {
19084
20150
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
19085
- logger: logger21
20151
+ logger: logger25
19086
20152
  });
19087
20153
  }
19088
20154
  const credentials = {
@@ -19100,11 +20166,11 @@ var require_dist_cjs50 = __commonJS({
19100
20166
  }
19101
20167
  return credentials;
19102
20168
  }, "resolveSSOCredentials");
19103
- var validateSsoProfile = /* @__PURE__ */ __name((profile, logger21) => {
20169
+ var validateSsoProfile = /* @__PURE__ */ __name((profile, logger25) => {
19104
20170
  const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
19105
20171
  if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
19106
20172
  throw new propertyProvider.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}
19107
- Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger: logger21 });
20173
+ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger: logger25 });
19108
20174
  }
19109
20175
  return profile;
19110
20176
  }, "validateSsoProfile");
@@ -19302,8 +20368,8 @@ var init_ruleset2 = __esm({
19302
20368
  var import_util_endpoints3, import_util_endpoints4, cache2, defaultEndpointResolver2;
19303
20369
  var init_endpointResolver2 = __esm({
19304
20370
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js"() {
19305
- import_util_endpoints3 = __toESM(require_dist_cjs24());
19306
- import_util_endpoints4 = __toESM(require_dist_cjs21());
20371
+ import_util_endpoints3 = __toESM(require_dist_cjs28());
20372
+ import_util_endpoints4 = __toESM(require_dist_cjs25());
19307
20373
  init_ruleset2();
19308
20374
  cache2 = new import_util_endpoints4.EndpointCache({
19309
20375
  size: 50,
@@ -19326,10 +20392,10 @@ var init_runtimeConfig_shared2 = __esm({
19326
20392
  init_dist_es2();
19327
20393
  init_protocols2();
19328
20394
  init_dist_es();
19329
- import_smithy_client15 = __toESM(require_dist_cjs28());
19330
- import_url_parser2 = __toESM(require_dist_cjs23());
19331
- import_util_base649 = __toESM(require_dist_cjs13());
19332
- import_util_utf89 = __toESM(require_dist_cjs12());
20395
+ import_smithy_client15 = __toESM(require_dist_cjs32());
20396
+ import_url_parser2 = __toESM(require_dist_cjs27());
20397
+ import_util_base649 = __toESM(require_dist_cjs15());
20398
+ import_util_utf89 = __toESM(require_dist_cjs14());
19333
20399
  init_httpAuthSchemeProvider2();
19334
20400
  init_endpointResolver2();
19335
20401
  getRuntimeConfig3 = /* @__PURE__ */ __name((config) => {
@@ -19370,16 +20436,16 @@ var init_runtimeConfig2 = __esm({
19370
20436
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js"() {
19371
20437
  init_package();
19372
20438
  init_dist_es2();
19373
- import_util_user_agent_node2 = __toESM(require_dist_cjs43());
19374
- import_config_resolver3 = __toESM(require_dist_cjs32());
19375
- import_hash_node2 = __toESM(require_dist_cjs44());
19376
- import_middleware_retry3 = __toESM(require_dist_cjs39());
19377
- import_node_config_provider2 = __toESM(require_dist_cjs35());
19378
- import_node_http_handler2 = __toESM(require_dist_cjs16());
19379
- import_smithy_client16 = __toESM(require_dist_cjs28());
19380
- import_util_body_length_node2 = __toESM(require_dist_cjs45());
19381
- import_util_defaults_mode_node2 = __toESM(require_dist_cjs46());
19382
- import_util_retry2 = __toESM(require_dist_cjs38());
20439
+ import_util_user_agent_node2 = __toESM(require_dist_cjs49());
20440
+ import_config_resolver3 = __toESM(require_dist_cjs36());
20441
+ import_hash_node2 = __toESM(require_dist_cjs50());
20442
+ import_middleware_retry3 = __toESM(require_dist_cjs45());
20443
+ import_node_config_provider2 = __toESM(require_dist_cjs40());
20444
+ import_node_http_handler2 = __toESM(require_dist_cjs19());
20445
+ import_smithy_client16 = __toESM(require_dist_cjs32());
20446
+ import_util_body_length_node2 = __toESM(require_dist_cjs51());
20447
+ import_util_defaults_mode_node2 = __toESM(require_dist_cjs52());
20448
+ import_util_retry2 = __toESM(require_dist_cjs43());
19383
20449
  init_runtimeConfig_shared2();
19384
20450
  getRuntimeConfig4 = /* @__PURE__ */ __name((config) => {
19385
20451
  (0, import_smithy_client16.emitWarningIfUnsupportedVersion)(process.version);
@@ -19464,9 +20530,9 @@ var init_httpAuthExtensionConfiguration2 = __esm({
19464
20530
  var import_region_config_resolver2, import_protocol_http13, import_smithy_client17, resolveRuntimeExtensions2;
19465
20531
  var init_runtimeExtensions2 = __esm({
19466
20532
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeExtensions.js"() {
19467
- import_region_config_resolver2 = __toESM(require_dist_cjs47());
20533
+ import_region_config_resolver2 = __toESM(require_dist_cjs53());
19468
20534
  import_protocol_http13 = __toESM(require_dist_cjs3());
19469
- import_smithy_client17 = __toESM(require_dist_cjs28());
20535
+ import_smithy_client17 = __toESM(require_dist_cjs32());
19470
20536
  init_httpAuthExtensionConfiguration2();
19471
20537
  resolveRuntimeExtensions2 = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
19472
20538
  const extensionConfiguration = Object.assign((0, import_region_config_resolver2.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client17.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http13.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration2(runtimeConfig));
@@ -19483,14 +20549,14 @@ var init_SigninClient = __esm({
19483
20549
  import_middleware_host_header2 = __toESM(require_dist_cjs6());
19484
20550
  import_middleware_logger2 = __toESM(require_dist_cjs7());
19485
20551
  import_middleware_recursion_detection2 = __toESM(require_dist_cjs8());
19486
- import_middleware_user_agent2 = __toESM(require_dist_cjs30());
19487
- import_config_resolver4 = __toESM(require_dist_cjs32());
20552
+ import_middleware_user_agent2 = __toESM(require_dist_cjs34());
20553
+ import_config_resolver4 = __toESM(require_dist_cjs36());
19488
20554
  init_dist_es();
19489
20555
  init_schema();
19490
- import_middleware_content_length2 = __toESM(require_dist_cjs33());
19491
- import_middleware_endpoint3 = __toESM(require_dist_cjs36());
19492
- import_middleware_retry4 = __toESM(require_dist_cjs39());
19493
- import_smithy_client18 = __toESM(require_dist_cjs28());
20556
+ import_middleware_content_length2 = __toESM(require_dist_cjs38());
20557
+ import_middleware_endpoint3 = __toESM(require_dist_cjs41());
20558
+ import_middleware_retry4 = __toESM(require_dist_cjs45());
20559
+ import_smithy_client18 = __toESM(require_dist_cjs32());
19494
20560
  init_httpAuthSchemeProvider2();
19495
20561
  init_EndpointParameters2();
19496
20562
  init_runtimeConfig2();
@@ -19539,7 +20605,7 @@ var init_SigninClient = __esm({
19539
20605
  var import_smithy_client19, SigninServiceException;
19540
20606
  var init_SigninServiceException = __esm({
19541
20607
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/SigninServiceException.js"() {
19542
- import_smithy_client19 = __toESM(require_dist_cjs28());
20608
+ import_smithy_client19 = __toESM(require_dist_cjs32());
19543
20609
  SigninServiceException = class _SigninServiceException extends import_smithy_client19.ServiceException {
19544
20610
  static {
19545
20611
  __name(this, "SigninServiceException");
@@ -19753,8 +20819,8 @@ var init_schemas_02 = __esm({
19753
20819
  var import_middleware_endpoint4, import_smithy_client20, CreateOAuth2TokenCommand;
19754
20820
  var init_CreateOAuth2TokenCommand = __esm({
19755
20821
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js"() {
19756
- import_middleware_endpoint4 = __toESM(require_dist_cjs36());
19757
- import_smithy_client20 = __toESM(require_dist_cjs28());
20822
+ import_middleware_endpoint4 = __toESM(require_dist_cjs41());
20823
+ import_smithy_client20 = __toESM(require_dist_cjs32());
19758
20824
  init_EndpointParameters2();
19759
20825
  init_schemas_02();
19760
20826
  CreateOAuth2TokenCommand = class extends import_smithy_client20.Command.classBuilder().ep(commonParams2).m(function(Command, cs, config, o4) {
@@ -19771,7 +20837,7 @@ var init_CreateOAuth2TokenCommand = __esm({
19771
20837
  var import_smithy_client21, commands2, Signin;
19772
20838
  var init_Signin = __esm({
19773
20839
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/Signin.js"() {
19774
- import_smithy_client21 = __toESM(require_dist_cjs28());
20840
+ import_smithy_client21 = __toESM(require_dist_cjs32());
19775
20841
  init_CreateOAuth2TokenCommand();
19776
20842
  init_SigninClient();
19777
20843
  commands2 = {
@@ -19835,12 +20901,12 @@ var init_signin = __esm({
19835
20901
  });
19836
20902
 
19837
20903
  // node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js
19838
- var require_dist_cjs51 = __commonJS({
20904
+ var require_dist_cjs57 = __commonJS({
19839
20905
  "node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js"(exports2) {
19840
20906
  "use strict";
19841
20907
  var client = (init_client(), __toCommonJS(client_exports));
19842
- var propertyProvider = require_dist_cjs25();
19843
- var sharedIniFileLoader = require_dist_cjs34();
20908
+ var propertyProvider = require_dist_cjs29();
20909
+ var sharedIniFileLoader = require_dist_cjs39();
19844
20910
  var protocolHttp = require_dist_cjs3();
19845
20911
  var node_crypto = require("node:crypto");
19846
20912
  var node_fs = require("node:fs");
@@ -19887,7 +20953,7 @@ var require_dist_cjs51 = __commonJS({
19887
20953
  }
19888
20954
  async refresh(token) {
19889
20955
  const { SigninClient: SigninClient2, CreateOAuth2TokenCommand: CreateOAuth2TokenCommand2 } = await Promise.resolve().then(() => (init_signin(), signin_exports));
19890
- const { logger: logger21, userAgentAppId } = this.callerClientConfig ?? {};
20956
+ const { logger: logger25, userAgentAppId } = this.callerClientConfig ?? {};
19891
20957
  const isH22 = /* @__PURE__ */ __name((requestHandler2) => {
19892
20958
  return requestHandler2?.metadata?.handlerProtocol === "h2";
19893
20959
  }, "isH2");
@@ -19900,7 +20966,7 @@ var require_dist_cjs51 = __commonJS({
19900
20966
  },
19901
20967
  region,
19902
20968
  requestHandler,
19903
- logger: logger21,
20969
+ logger: logger25,
19904
20970
  userAgentAppId,
19905
20971
  ...this.init?.clientConfig
19906
20972
  });
@@ -20250,8 +21316,8 @@ var init_ruleset3 = __esm({
20250
21316
  var import_util_endpoints5, import_util_endpoints6, cache3, defaultEndpointResolver3;
20251
21317
  var init_endpointResolver3 = __esm({
20252
21318
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js"() {
20253
- import_util_endpoints5 = __toESM(require_dist_cjs24());
20254
- import_util_endpoints6 = __toESM(require_dist_cjs21());
21319
+ import_util_endpoints5 = __toESM(require_dist_cjs28());
21320
+ import_util_endpoints6 = __toESM(require_dist_cjs25());
20255
21321
  init_ruleset3();
20256
21322
  cache3 = new import_util_endpoints6.EndpointCache({
20257
21323
  size: 50,
@@ -20274,10 +21340,10 @@ var init_runtimeConfig_shared3 = __esm({
20274
21340
  init_dist_es2();
20275
21341
  init_protocols2();
20276
21342
  init_dist_es();
20277
- import_smithy_client22 = __toESM(require_dist_cjs28());
20278
- import_url_parser3 = __toESM(require_dist_cjs23());
20279
- import_util_base6410 = __toESM(require_dist_cjs13());
20280
- import_util_utf810 = __toESM(require_dist_cjs12());
21343
+ import_smithy_client22 = __toESM(require_dist_cjs32());
21344
+ import_url_parser3 = __toESM(require_dist_cjs27());
21345
+ import_util_base6410 = __toESM(require_dist_cjs15());
21346
+ import_util_utf810 = __toESM(require_dist_cjs14());
20281
21347
  init_httpAuthSchemeProvider3();
20282
21348
  init_endpointResolver3();
20283
21349
  getRuntimeConfig5 = /* @__PURE__ */ __name((config) => {
@@ -20322,17 +21388,17 @@ var init_runtimeConfig3 = __esm({
20322
21388
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js"() {
20323
21389
  init_package();
20324
21390
  init_dist_es2();
20325
- import_util_user_agent_node3 = __toESM(require_dist_cjs43());
20326
- import_config_resolver5 = __toESM(require_dist_cjs32());
21391
+ import_util_user_agent_node3 = __toESM(require_dist_cjs49());
21392
+ import_config_resolver5 = __toESM(require_dist_cjs36());
20327
21393
  init_dist_es();
20328
- import_hash_node3 = __toESM(require_dist_cjs44());
20329
- import_middleware_retry5 = __toESM(require_dist_cjs39());
20330
- import_node_config_provider3 = __toESM(require_dist_cjs35());
20331
- import_node_http_handler3 = __toESM(require_dist_cjs16());
20332
- import_smithy_client23 = __toESM(require_dist_cjs28());
20333
- import_util_body_length_node3 = __toESM(require_dist_cjs45());
20334
- import_util_defaults_mode_node3 = __toESM(require_dist_cjs46());
20335
- import_util_retry3 = __toESM(require_dist_cjs38());
21394
+ import_hash_node3 = __toESM(require_dist_cjs50());
21395
+ import_middleware_retry5 = __toESM(require_dist_cjs45());
21396
+ import_node_config_provider3 = __toESM(require_dist_cjs40());
21397
+ import_node_http_handler3 = __toESM(require_dist_cjs19());
21398
+ import_smithy_client23 = __toESM(require_dist_cjs32());
21399
+ import_util_body_length_node3 = __toESM(require_dist_cjs51());
21400
+ import_util_defaults_mode_node3 = __toESM(require_dist_cjs52());
21401
+ import_util_retry3 = __toESM(require_dist_cjs43());
20336
21402
  init_runtimeConfig_shared3();
20337
21403
  getRuntimeConfig6 = /* @__PURE__ */ __name((config) => {
20338
21404
  (0, import_smithy_client23.emitWarningIfUnsupportedVersion)(process.version);
@@ -20429,9 +21495,9 @@ var init_httpAuthExtensionConfiguration3 = __esm({
20429
21495
  var import_region_config_resolver3, import_protocol_http14, import_smithy_client24, resolveRuntimeExtensions3;
20430
21496
  var init_runtimeExtensions3 = __esm({
20431
21497
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js"() {
20432
- import_region_config_resolver3 = __toESM(require_dist_cjs47());
21498
+ import_region_config_resolver3 = __toESM(require_dist_cjs53());
20433
21499
  import_protocol_http14 = __toESM(require_dist_cjs3());
20434
- import_smithy_client24 = __toESM(require_dist_cjs28());
21500
+ import_smithy_client24 = __toESM(require_dist_cjs32());
20435
21501
  init_httpAuthExtensionConfiguration3();
20436
21502
  resolveRuntimeExtensions3 = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
20437
21503
  const extensionConfiguration = Object.assign((0, import_region_config_resolver3.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client24.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http14.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration3(runtimeConfig));
@@ -20448,14 +21514,14 @@ var init_STSClient = __esm({
20448
21514
  import_middleware_host_header3 = __toESM(require_dist_cjs6());
20449
21515
  import_middleware_logger3 = __toESM(require_dist_cjs7());
20450
21516
  import_middleware_recursion_detection3 = __toESM(require_dist_cjs8());
20451
- import_middleware_user_agent3 = __toESM(require_dist_cjs30());
20452
- import_config_resolver6 = __toESM(require_dist_cjs32());
21517
+ import_middleware_user_agent3 = __toESM(require_dist_cjs34());
21518
+ import_config_resolver6 = __toESM(require_dist_cjs36());
20453
21519
  init_dist_es();
20454
21520
  init_schema();
20455
- import_middleware_content_length3 = __toESM(require_dist_cjs33());
20456
- import_middleware_endpoint5 = __toESM(require_dist_cjs36());
20457
- import_middleware_retry6 = __toESM(require_dist_cjs39());
20458
- import_smithy_client25 = __toESM(require_dist_cjs28());
21521
+ import_middleware_content_length3 = __toESM(require_dist_cjs38());
21522
+ import_middleware_endpoint5 = __toESM(require_dist_cjs41());
21523
+ import_middleware_retry6 = __toESM(require_dist_cjs45());
21524
+ import_smithy_client25 = __toESM(require_dist_cjs32());
20459
21525
  init_httpAuthSchemeProvider3();
20460
21526
  init_EndpointParameters3();
20461
21527
  init_runtimeConfig3();
@@ -20504,7 +21570,7 @@ var init_STSClient = __esm({
20504
21570
  var import_smithy_client26, STSServiceException;
20505
21571
  var init_STSServiceException = __esm({
20506
21572
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js"() {
20507
- import_smithy_client26 = __toESM(require_dist_cjs28());
21573
+ import_smithy_client26 = __toESM(require_dist_cjs32());
20508
21574
  STSServiceException = class _STSServiceException extends import_smithy_client26.ServiceException {
20509
21575
  static {
20510
21576
  __name(this, "STSServiceException");
@@ -20827,8 +21893,8 @@ var init_schemas_03 = __esm({
20827
21893
  var import_middleware_endpoint6, import_smithy_client27, AssumeRoleCommand;
20828
21894
  var init_AssumeRoleCommand = __esm({
20829
21895
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js"() {
20830
- import_middleware_endpoint6 = __toESM(require_dist_cjs36());
20831
- import_smithy_client27 = __toESM(require_dist_cjs28());
21896
+ import_middleware_endpoint6 = __toESM(require_dist_cjs41());
21897
+ import_smithy_client27 = __toESM(require_dist_cjs32());
20832
21898
  init_EndpointParameters3();
20833
21899
  init_schemas_03();
20834
21900
  AssumeRoleCommand = class extends import_smithy_client27.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config, o4) {
@@ -20845,8 +21911,8 @@ var init_AssumeRoleCommand = __esm({
20845
21911
  var import_middleware_endpoint7, import_smithy_client28, AssumeRoleWithWebIdentityCommand;
20846
21912
  var init_AssumeRoleWithWebIdentityCommand = __esm({
20847
21913
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js"() {
20848
- import_middleware_endpoint7 = __toESM(require_dist_cjs36());
20849
- import_smithy_client28 = __toESM(require_dist_cjs28());
21914
+ import_middleware_endpoint7 = __toESM(require_dist_cjs41());
21915
+ import_smithy_client28 = __toESM(require_dist_cjs32());
20850
21916
  init_EndpointParameters3();
20851
21917
  init_schemas_03();
20852
21918
  AssumeRoleWithWebIdentityCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config, o4) {
@@ -20863,7 +21929,7 @@ var init_AssumeRoleWithWebIdentityCommand = __esm({
20863
21929
  var import_smithy_client29, commands3, STS;
20864
21930
  var init_STS = __esm({
20865
21931
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js"() {
20866
- import_smithy_client29 = __toESM(require_dist_cjs28());
21932
+ import_smithy_client29 = __toESM(require_dist_cjs32());
20867
21933
  init_AssumeRoleCommand();
20868
21934
  init_AssumeRoleWithWebIdentityCommand();
20869
21935
  init_STSClient();
@@ -20893,7 +21959,7 @@ var import_region_config_resolver4, getAccountIdFromAssumedRoleUser, resolveRegi
20893
21959
  var init_defaultStsRoleAssumers = __esm({
20894
21960
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js"() {
20895
21961
  init_client();
20896
- import_region_config_resolver4 = __toESM(require_dist_cjs47());
21962
+ import_region_config_resolver4 = __toESM(require_dist_cjs53());
20897
21963
  init_AssumeRoleCommand();
20898
21964
  init_AssumeRoleWithWebIdentityCommand();
20899
21965
  getAccountIdFromAssumedRoleUser = /* @__PURE__ */ __name((assumedRoleUser) => {
@@ -20918,9 +21984,9 @@ var init_defaultStsRoleAssumers = __esm({
20918
21984
  return async (sourceCreds, params) => {
20919
21985
  closureSourceCreds = sourceCreds;
20920
21986
  if (!stsClient) {
20921
- const { logger: logger21 = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
21987
+ const { logger: logger25 = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
20922
21988
  const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
20923
- logger: logger21,
21989
+ logger: logger25,
20924
21990
  profile
20925
21991
  });
20926
21992
  const isCompatibleRequestHandler = !isH2(requestHandler);
@@ -20931,7 +21997,7 @@ var init_defaultStsRoleAssumers = __esm({
20931
21997
  credentialDefaultProvider: /* @__PURE__ */ __name(() => async () => closureSourceCreds, "credentialDefaultProvider"),
20932
21998
  region: resolvedRegion,
20933
21999
  requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
20934
- logger: logger21
22000
+ logger: logger25
20935
22001
  });
20936
22002
  }
20937
22003
  const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleCommand(params));
@@ -20955,9 +22021,9 @@ var init_defaultStsRoleAssumers = __esm({
20955
22021
  let stsClient;
20956
22022
  return async (params) => {
20957
22023
  if (!stsClient) {
20958
- const { logger: logger21 = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
22024
+ const { logger: logger25 = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
20959
22025
  const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
20960
- logger: logger21,
22026
+ logger: logger25,
20961
22027
  profile
20962
22028
  });
20963
22029
  const isCompatibleRequestHandler = !isH2(requestHandler);
@@ -20967,7 +22033,7 @@ var init_defaultStsRoleAssumers = __esm({
20967
22033
  profile,
20968
22034
  region: resolvedRegion,
20969
22035
  requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
20970
- logger: logger21
22036
+ logger: logger25
20971
22037
  });
20972
22038
  }
20973
22039
  const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
@@ -21060,11 +22126,11 @@ var init_sts = __esm({
21060
22126
  });
21061
22127
 
21062
22128
  // node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js
21063
- var require_dist_cjs52 = __commonJS({
22129
+ var require_dist_cjs58 = __commonJS({
21064
22130
  "node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js"(exports2) {
21065
22131
  "use strict";
21066
- var sharedIniFileLoader = require_dist_cjs34();
21067
- var propertyProvider = require_dist_cjs25();
22132
+ var sharedIniFileLoader = require_dist_cjs39();
22133
+ var propertyProvider = require_dist_cjs29();
21068
22134
  var child_process = require("child_process");
21069
22135
  var util = require("util");
21070
22136
  var client = (init_client(), __toCommonJS(client_exports));
@@ -21097,7 +22163,7 @@ var require_dist_cjs52 = __commonJS({
21097
22163
  client.setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w");
21098
22164
  return credentials;
21099
22165
  }, "getValidatedProcessCredentials");
21100
- var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles, logger21) => {
22166
+ var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles, logger25) => {
21101
22167
  const profile = profiles[profileName];
21102
22168
  if (profiles[profileName]) {
21103
22169
  const credentialProcess = profile["credential_process"];
@@ -21113,14 +22179,14 @@ var require_dist_cjs52 = __commonJS({
21113
22179
  }
21114
22180
  return getValidatedProcessCredentials(profileName, data2, profiles);
21115
22181
  } catch (error2) {
21116
- throw new propertyProvider.CredentialsProviderError(error2.message, { logger: logger21 });
22182
+ throw new propertyProvider.CredentialsProviderError(error2.message, { logger: logger25 });
21117
22183
  }
21118
22184
  } else {
21119
- throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger: logger21 });
22185
+ throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger: logger25 });
21120
22186
  }
21121
22187
  } else {
21122
22188
  throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
21123
- logger: logger21
22189
+ logger: logger25
21124
22190
  });
21125
22191
  }
21126
22192
  }, "resolveProcessCredentials");
@@ -21214,8 +22280,8 @@ var require_fromTokenFile = __commonJS({
21214
22280
  Object.defineProperty(exports2, "__esModule", { value: true });
21215
22281
  exports2.fromTokenFile = void 0;
21216
22282
  var client_1 = (init_client(), __toCommonJS(client_exports));
21217
- var property_provider_1 = require_dist_cjs25();
21218
- var shared_ini_file_loader_1 = require_dist_cjs34();
22283
+ var property_provider_1 = require_dist_cjs29();
22284
+ var shared_ini_file_loader_1 = require_dist_cjs39();
21219
22285
  var fs_1 = require("fs");
21220
22286
  var fromWebToken_1 = require_fromWebToken();
21221
22287
  var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
@@ -21247,7 +22313,7 @@ var require_fromTokenFile = __commonJS({
21247
22313
  });
21248
22314
 
21249
22315
  // node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js
21250
- var require_dist_cjs53 = __commonJS({
22316
+ var require_dist_cjs59 = __commonJS({
21251
22317
  "node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"(exports2) {
21252
22318
  "use strict";
21253
22319
  var fromTokenFile = require_fromTokenFile();
@@ -21272,53 +22338,53 @@ var require_dist_cjs53 = __commonJS({
21272
22338
  });
21273
22339
 
21274
22340
  // node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js
21275
- var require_dist_cjs54 = __commonJS({
22341
+ var require_dist_cjs60 = __commonJS({
21276
22342
  "node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js"(exports2) {
21277
22343
  "use strict";
21278
- var sharedIniFileLoader = require_dist_cjs34();
21279
- var propertyProvider = require_dist_cjs25();
22344
+ var sharedIniFileLoader = require_dist_cjs39();
22345
+ var propertyProvider = require_dist_cjs29();
21280
22346
  var client = (init_client(), __toCommonJS(client_exports));
21281
- var credentialProviderLogin = require_dist_cjs51();
21282
- var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName, logger21) => {
22347
+ var credentialProviderLogin = require_dist_cjs57();
22348
+ var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName, logger25) => {
21283
22349
  const sourceProvidersMap = {
21284
22350
  EcsContainer: /* @__PURE__ */ __name(async (options) => {
21285
- const { fromHttp } = await Promise.resolve().then(() => __toESM(require_dist_cjs42()));
21286
- const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs41()));
21287
- logger21?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
22351
+ const { fromHttp } = await Promise.resolve().then(() => __toESM(require_dist_cjs48()));
22352
+ const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs47()));
22353
+ logger25?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
21288
22354
  return async () => propertyProvider.chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
21289
22355
  }, "EcsContainer"),
21290
22356
  Ec2InstanceMetadata: /* @__PURE__ */ __name(async (options) => {
21291
- logger21?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
21292
- const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs41()));
22357
+ logger25?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
22358
+ const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs47()));
21293
22359
  return async () => fromInstanceMetadata(options)().then(setNamedProvider);
21294
22360
  }, "Ec2InstanceMetadata"),
21295
22361
  Environment: /* @__PURE__ */ __name(async (options) => {
21296
- logger21?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
21297
- const { fromEnv } = await Promise.resolve().then(() => __toESM(require_dist_cjs40()));
22362
+ logger25?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
22363
+ const { fromEnv } = await Promise.resolve().then(() => __toESM(require_dist_cjs46()));
21298
22364
  return async () => fromEnv(options)().then(setNamedProvider);
21299
22365
  }, "Environment")
21300
22366
  };
21301
22367
  if (credentialSource in sourceProvidersMap) {
21302
22368
  return sourceProvidersMap[credentialSource];
21303
22369
  } else {
21304
- throw new propertyProvider.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger: logger21 });
22370
+ throw new propertyProvider.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger: logger25 });
21305
22371
  }
21306
22372
  }, "resolveCredentialSource");
21307
22373
  var setNamedProvider = /* @__PURE__ */ __name((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p"), "setNamedProvider");
21308
- var isAssumeRoleProfile = /* @__PURE__ */ __name((arg, { profile = "default", logger: logger21 } = {}) => {
21309
- return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger: logger21 }) || isCredentialSourceProfile(arg, { profile, logger: logger21 }));
22374
+ var isAssumeRoleProfile = /* @__PURE__ */ __name((arg, { profile = "default", logger: logger25 } = {}) => {
22375
+ return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger: logger25 }) || isCredentialSourceProfile(arg, { profile, logger: logger25 }));
21310
22376
  }, "isAssumeRoleProfile");
21311
- var isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger: logger21 }) => {
22377
+ var isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger: logger25 }) => {
21312
22378
  const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined";
21313
22379
  if (withSourceProfile) {
21314
- logger21?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);
22380
+ logger25?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);
21315
22381
  }
21316
22382
  return withSourceProfile;
21317
22383
  }, "isAssumeRoleWithSourceProfile");
21318
- var isCredentialSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger: logger21 }) => {
22384
+ var isCredentialSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger: logger25 }) => {
21319
22385
  const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined";
21320
22386
  if (withProviderProfile) {
21321
- logger21?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);
22387
+ logger25?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);
21322
22388
  }
21323
22389
  return withProviderProfile;
21324
22390
  }, "isCredentialSourceProfile");
@@ -21380,12 +22446,12 @@ var require_dist_cjs54 = __commonJS({
21380
22446
  return client.setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC");
21381
22447
  }, "resolveLoginCredentials");
21382
22448
  var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile");
21383
- var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM(require_dist_cjs52())).then(({ fromProcess }) => fromProcess({
22449
+ var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM(require_dist_cjs58())).then(({ fromProcess }) => fromProcess({
21384
22450
  ...options,
21385
22451
  profile
21386
22452
  })().then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v"))), "resolveProcessCredentials");
21387
22453
  var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, profileData, options = {}) => {
21388
- const { fromSSO } = await Promise.resolve().then(() => __toESM(require_dist_cjs50()));
22454
+ const { fromSSO } = await Promise.resolve().then(() => __toESM(require_dist_cjs56()));
21389
22455
  return fromSSO({
21390
22456
  profile,
21391
22457
  logger: options.logger,
@@ -21413,7 +22479,7 @@ var require_dist_cjs54 = __commonJS({
21413
22479
  return client.setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n");
21414
22480
  }, "resolveStaticCredentials");
21415
22481
  var isWebIdentityProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, "isWebIdentityProfile");
21416
- var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM(require_dist_cjs53())).then(({ fromTokenFile }) => fromTokenFile({
22482
+ var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM(require_dist_cjs59())).then(({ fromTokenFile }) => fromTokenFile({
21417
22483
  webIdentityTokenFile: profile.web_identity_token_file,
21418
22484
  roleArn: profile.role_arn,
21419
22485
  roleSessionName: profile.role_session_name,
@@ -21465,18 +22531,18 @@ var require_dist_cjs54 = __commonJS({
21465
22531
  });
21466
22532
 
21467
22533
  // node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js
21468
- var require_dist_cjs55 = __commonJS({
22534
+ var require_dist_cjs61 = __commonJS({
21469
22535
  "node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js"(exports2) {
21470
22536
  "use strict";
21471
- var credentialProviderEnv = require_dist_cjs40();
21472
- var propertyProvider = require_dist_cjs25();
21473
- var sharedIniFileLoader = require_dist_cjs34();
22537
+ var credentialProviderEnv = require_dist_cjs46();
22538
+ var propertyProvider = require_dist_cjs29();
22539
+ var sharedIniFileLoader = require_dist_cjs39();
21474
22540
  var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
21475
22541
  var remoteProvider = /* @__PURE__ */ __name(async (init) => {
21476
- const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs41()));
22542
+ const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs47()));
21477
22543
  if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
21478
22544
  init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");
21479
- const { fromHttp } = await Promise.resolve().then(() => __toESM(require_dist_cjs42()));
22545
+ const { fromHttp } = await Promise.resolve().then(() => __toESM(require_dist_cjs48()));
21480
22546
  return propertyProvider.chain(fromHttp(init), fromContainerMetadata(init));
21481
22547
  }
21482
22548
  if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") {
@@ -21574,22 +22640,22 @@ var require_dist_cjs55 = __commonJS({
21574
22640
  if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
21575
22641
  throw new propertyProvider.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger });
21576
22642
  }
21577
- const { fromSSO } = await Promise.resolve().then(() => __toESM(require_dist_cjs50()));
22643
+ const { fromSSO } = await Promise.resolve().then(() => __toESM(require_dist_cjs56()));
21578
22644
  return fromSSO(init)(awsIdentityProperties);
21579
22645
  },
21580
22646
  async (awsIdentityProperties) => {
21581
22647
  init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");
21582
- const { fromIni } = await Promise.resolve().then(() => __toESM(require_dist_cjs54()));
22648
+ const { fromIni } = await Promise.resolve().then(() => __toESM(require_dist_cjs60()));
21583
22649
  return fromIni(init)(awsIdentityProperties);
21584
22650
  },
21585
22651
  async (awsIdentityProperties) => {
21586
22652
  init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");
21587
- const { fromProcess } = await Promise.resolve().then(() => __toESM(require_dist_cjs52()));
22653
+ const { fromProcess } = await Promise.resolve().then(() => __toESM(require_dist_cjs58()));
21588
22654
  return fromProcess(init)(awsIdentityProperties);
21589
22655
  },
21590
22656
  async (awsIdentityProperties) => {
21591
22657
  init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");
21592
- const { fromTokenFile } = await Promise.resolve().then(() => __toESM(require_dist_cjs53()));
22658
+ const { fromTokenFile } = await Promise.resolve().then(() => __toESM(require_dist_cjs59()));
21593
22659
  return fromTokenFile(init)(awsIdentityProperties);
21594
22660
  },
21595
22661
  async () => {
@@ -21612,13 +22678,13 @@ var require_dist_cjs55 = __commonJS({
21612
22678
  });
21613
22679
 
21614
22680
  // node_modules/@aws-sdk/dynamodb-codec/dist-cjs/index.js
21615
- var require_dist_cjs56 = __commonJS({
22681
+ var require_dist_cjs62 = __commonJS({
21616
22682
  "node_modules/@aws-sdk/dynamodb-codec/dist-cjs/index.js"(exports2) {
21617
22683
  "use strict";
21618
22684
  var protocols = (init_protocols2(), __toCommonJS(protocols_exports2));
21619
22685
  var schema = (init_schema(), __toCommonJS(schema_exports));
21620
- var smithyClient = require_dist_cjs28();
21621
- var utilBase64 = require_dist_cjs13();
22686
+ var smithyClient = require_dist_cjs32();
22687
+ var utilBase64 = require_dist_cjs15();
21622
22688
  var DynamoDBJsonCodec = class extends protocols.JsonCodec {
21623
22689
  static {
21624
22690
  __name(this, "DynamoDBJsonCodec");
@@ -21779,8 +22845,8 @@ var require_endpointResolver2 = __commonJS({
21779
22845
  "use strict";
21780
22846
  Object.defineProperty(exports2, "__esModule", { value: true });
21781
22847
  exports2.defaultEndpointResolver = void 0;
21782
- var util_endpoints_1 = require_dist_cjs24();
21783
- var util_endpoints_2 = require_dist_cjs21();
22848
+ var util_endpoints_1 = require_dist_cjs28();
22849
+ var util_endpoints_2 = require_dist_cjs25();
21784
22850
  var ruleset_1 = require_ruleset2();
21785
22851
  var cache4 = new util_endpoints_2.EndpointCache({
21786
22852
  size: 50,
@@ -21814,11 +22880,11 @@ var require_runtimeConfig_shared2 = __commonJS({
21814
22880
  exports2.getRuntimeConfig = void 0;
21815
22881
  var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
21816
22882
  var protocols_1 = (init_protocols2(), __toCommonJS(protocols_exports2));
21817
- var dynamodb_codec_1 = require_dist_cjs56();
21818
- var smithy_client_1 = require_dist_cjs28();
21819
- var url_parser_1 = require_dist_cjs23();
21820
- var util_base64_1 = require_dist_cjs13();
21821
- var util_utf8_1 = require_dist_cjs12();
22883
+ var dynamodb_codec_1 = require_dist_cjs62();
22884
+ var smithy_client_1 = require_dist_cjs32();
22885
+ var url_parser_1 = require_dist_cjs27();
22886
+ var util_base64_1 = require_dist_cjs15();
22887
+ var util_utf8_1 = require_dist_cjs14();
21822
22888
  var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider();
21823
22889
  var endpointResolver_1 = require_endpointResolver2();
21824
22890
  var getRuntimeConfig7 = /* @__PURE__ */ __name((config) => {
@@ -21864,18 +22930,18 @@ var require_runtimeConfig2 = __commonJS({
21864
22930
  var package_json_1 = tslib_1.__importDefault(require_package());
21865
22931
  var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
21866
22932
  var account_id_endpoint_1 = (init_account_id_endpoint(), __toCommonJS(account_id_endpoint_exports));
21867
- var credential_provider_node_1 = require_dist_cjs55();
22933
+ var credential_provider_node_1 = require_dist_cjs61();
21868
22934
  var middleware_endpoint_discovery_1 = require_dist_cjs5();
21869
- var util_user_agent_node_1 = require_dist_cjs43();
21870
- var config_resolver_1 = require_dist_cjs32();
21871
- var hash_node_1 = require_dist_cjs44();
21872
- var middleware_retry_1 = require_dist_cjs39();
21873
- var node_config_provider_1 = require_dist_cjs35();
21874
- var node_http_handler_1 = require_dist_cjs16();
21875
- var smithy_client_1 = require_dist_cjs28();
21876
- var util_body_length_node_1 = require_dist_cjs45();
21877
- var util_defaults_mode_node_1 = require_dist_cjs46();
21878
- var util_retry_1 = require_dist_cjs38();
22935
+ var util_user_agent_node_1 = require_dist_cjs49();
22936
+ var config_resolver_1 = require_dist_cjs36();
22937
+ var hash_node_1 = require_dist_cjs50();
22938
+ var middleware_retry_1 = require_dist_cjs45();
22939
+ var node_config_provider_1 = require_dist_cjs40();
22940
+ var node_http_handler_1 = require_dist_cjs19();
22941
+ var smithy_client_1 = require_dist_cjs32();
22942
+ var util_body_length_node_1 = require_dist_cjs51();
22943
+ var util_defaults_mode_node_1 = require_dist_cjs52();
22944
+ var util_retry_1 = require_dist_cjs43();
21879
22945
  var runtimeConfig_shared_1 = require_runtimeConfig_shared2();
21880
22946
  var getRuntimeConfig7 = /* @__PURE__ */ __name((config) => {
21881
22947
  (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
@@ -21917,7 +22983,7 @@ var require_runtimeConfig2 = __commonJS({
21917
22983
  });
21918
22984
 
21919
22985
  // node_modules/@smithy/util-waiter/dist-cjs/index.js
21920
- var require_dist_cjs57 = __commonJS({
22986
+ var require_dist_cjs63 = __commonJS({
21921
22987
  "node_modules/@smithy/util-waiter/dist-cjs/index.js"(exports2) {
21922
22988
  "use strict";
21923
22989
  var getCircularReplacer = /* @__PURE__ */ __name(() => {
@@ -22088,7 +23154,7 @@ var require_dist_cjs57 = __commonJS({
22088
23154
  });
22089
23155
 
22090
23156
  // node_modules/@aws-sdk/client-dynamodb/dist-cjs/index.js
22091
- var require_dist_cjs58 = __commonJS({
23157
+ var require_dist_cjs64 = __commonJS({
22092
23158
  "node_modules/@aws-sdk/client-dynamodb/dist-cjs/index.js"(exports2) {
22093
23159
  "use strict";
22094
23160
  var accountIdEndpoint = (init_account_id_endpoint(), __toCommonJS(account_id_endpoint_exports));
@@ -22096,19 +23162,19 @@ var require_dist_cjs58 = __commonJS({
22096
23162
  var middlewareHostHeader = require_dist_cjs6();
22097
23163
  var middlewareLogger = require_dist_cjs7();
22098
23164
  var middlewareRecursionDetection = require_dist_cjs8();
22099
- var middlewareUserAgent = require_dist_cjs30();
22100
- var configResolver = require_dist_cjs32();
23165
+ var middlewareUserAgent = require_dist_cjs34();
23166
+ var configResolver = require_dist_cjs36();
22101
23167
  var core = (init_dist_es(), __toCommonJS(dist_es_exports));
22102
23168
  var schema = (init_schema(), __toCommonJS(schema_exports));
22103
- var middlewareContentLength = require_dist_cjs33();
22104
- var middlewareEndpoint = require_dist_cjs36();
22105
- var middlewareRetry = require_dist_cjs39();
22106
- var smithyClient = require_dist_cjs28();
23169
+ var middlewareContentLength = require_dist_cjs38();
23170
+ var middlewareEndpoint = require_dist_cjs41();
23171
+ var middlewareRetry = require_dist_cjs45();
23172
+ var smithyClient = require_dist_cjs32();
22107
23173
  var httpAuthSchemeProvider = require_httpAuthSchemeProvider();
22108
23174
  var runtimeConfig = require_runtimeConfig2();
22109
- var regionConfigResolver = require_dist_cjs47();
23175
+ var regionConfigResolver = require_dist_cjs53();
22110
23176
  var protocolHttp = require_dist_cjs3();
22111
- var utilWaiter = require_dist_cjs57();
23177
+ var utilWaiter = require_dist_cjs63();
22112
23178
  var resolveClientEndpointParameters4 = /* @__PURE__ */ __name((options) => {
22113
23179
  return Object.assign(options, {
22114
23180
  useDualstackEndpoint: options.useDualstackEndpoint ?? false,
@@ -26413,7 +27479,7 @@ var require_dist_cjs58 = __commonJS({
26413
27479
  });
26414
27480
 
26415
27481
  // node_modules/@aws-sdk/util-dynamodb/dist-cjs/index.js
26416
- var require_dist_cjs59 = __commonJS({
27482
+ var require_dist_cjs65 = __commonJS({
26417
27483
  "node_modules/@aws-sdk/util-dynamodb/dist-cjs/index.js"(exports2) {
26418
27484
  "use strict";
26419
27485
  var NumberValue = class _NumberValue {
@@ -26687,13 +27753,13 @@ var require_dist_cjs59 = __commonJS({
26687
27753
  });
26688
27754
 
26689
27755
  // node_modules/@aws-sdk/lib-dynamodb/dist-cjs/index.js
26690
- var require_dist_cjs60 = __commonJS({
27756
+ var require_dist_cjs66 = __commonJS({
26691
27757
  "node_modules/@aws-sdk/lib-dynamodb/dist-cjs/index.js"(exports2) {
26692
27758
  "use strict";
26693
- var clientDynamodb = require_dist_cjs58();
26694
- var smithyClient = require_dist_cjs28();
27759
+ var clientDynamodb = require_dist_cjs64();
27760
+ var smithyClient = require_dist_cjs32();
26695
27761
  var core = (init_dist_es2(), __toCommonJS(dist_es_exports2));
26696
- var utilDynamodb = require_dist_cjs59();
27762
+ var utilDynamodb = require_dist_cjs65();
26697
27763
  var core$1 = (init_dist_es(), __toCommonJS(dist_es_exports));
26698
27764
  var SELF = null;
26699
27765
  var ALL_VALUES = {};
@@ -27777,8 +28843,8 @@ function ulid2() {
27777
28843
  __name(ulid2, "ulid");
27778
28844
 
27779
28845
  // src/shared/utils/dynamodb.ts
27780
- var import_client_dynamodb = __toESM(require_dist_cjs58(), 1);
27781
- var import_lib_dynamodb = __toESM(require_dist_cjs60(), 1);
28846
+ var import_client_dynamodb = __toESM(require_dist_cjs64(), 1);
28847
+ var import_lib_dynamodb = __toESM(require_dist_cjs66(), 1);
27782
28848
  function createDynamoDBClient(config = {}) {
27783
28849
  const { region = process.env.AWS_REGION || "us-east-1", endpoint } = config;
27784
28850
  const client = new import_client_dynamodb.DynamoDBClient({
@@ -27798,6 +28864,18 @@ function createDynamoDBClient(config = {}) {
27798
28864
  }
27799
28865
  __name(createDynamoDBClient, "createDynamoDBClient");
27800
28866
 
28867
+ // src/shared/constants/http.ts
28868
+ var HTTP_STATUS = {
28869
+ OK: 200,
28870
+ BAD_REQUEST: 400,
28871
+ UNAUTHORIZED: 401,
28872
+ FORBIDDEN: 403,
28873
+ NOT_FOUND: 404,
28874
+ METHOD_NOT_ALLOWED: 405,
28875
+ INTERNAL_SERVER_ERROR: 500,
28876
+ NOT_IMPLEMENTED: 501
28877
+ };
28878
+
27801
28879
  // src/shared/constants/dynamodb.ts
27802
28880
  var DYNAMODB_TRANSACT_WRITE_MAX_ITEMS = 100;
27803
28881
  var DYNAMODB_QUERY_MAX_SIZE_BYTES = 1024 * 1024;
@@ -27813,7 +28891,7 @@ var LAMBDA_MAX_RESPONSE_SIZE = 6 * 1024 * 1024;
27813
28891
  var LAMBDA_MAX_ENV_VARS_SIZE = 4 * 1024;
27814
28892
 
27815
28893
  // src/server/operations/deleteMany.ts
27816
- var import_lib_dynamodb2 = __toESM(require_dist_cjs60(), 1);
28894
+ var import_lib_dynamodb2 = __toESM(require_dist_cjs66(), 1);
27817
28895
 
27818
28896
  // src/server/shadow/typeInference.ts
27819
28897
  function inferFieldType(value) {
@@ -27842,6 +28920,14 @@ function inferFieldType(value) {
27842
28920
  }
27843
28921
  __name(inferFieldType, "inferFieldType");
27844
28922
 
28923
+ // src/shared/constants/formatting.ts
28924
+ var NUMBER_FORMAT = {
28925
+ /** シャドウSKで使用する数値の桁数(20桁ゼロ埋め) */
28926
+ SHADOW_SK_DIGITS: 20,
28927
+ /** ゼロ埋め文字 */
28928
+ ZERO_PAD_CHAR: "0"
28929
+ };
28930
+
27845
28931
  // src/shadows/generator.ts
27846
28932
  function escapeString(value) {
27847
28933
  return value.replace(/#/g, "##").replace(/ /g, "#");
@@ -28502,7 +29588,7 @@ async function handleDeleteMany(resource, params, requestId) {
28502
29588
  __name(handleDeleteMany, "handleDeleteMany");
28503
29589
 
28504
29590
  // src/server/operations/deleteOne.ts
28505
- var import_lib_dynamodb3 = __toESM(require_dist_cjs60(), 1);
29591
+ var import_lib_dynamodb3 = __toESM(require_dist_cjs66(), 1);
28506
29592
  var logger6 = createLogger({ service: "records-lambda" });
28507
29593
  async function handleDeleteOne(resource, params, requestId) {
28508
29594
  const { id } = params;
@@ -28710,7 +29796,25 @@ function matchesAllFilters(record, parsedFilters) {
28710
29796
  __name(matchesAllFilters, "matchesAllFilters");
28711
29797
 
28712
29798
  // src/server/operations/find/idQuery.ts
28713
- var import_lib_dynamodb4 = __toESM(require_dist_cjs60(), 1);
29799
+ var import_lib_dynamodb4 = __toESM(require_dist_cjs66(), 1);
29800
+
29801
+ // src/shared/constants/validation.ts
29802
+ var VALIDATION_ERROR_MESSAGES = {
29803
+ REQUEST_BODY_REQUIRED: "Request body is required",
29804
+ INVALID_JSON: "Invalid JSON in request body",
29805
+ MISSING_OPERATION: "Missing required field: operation",
29806
+ MISSING_COLLECTION: "Missing required field: collection",
29807
+ MISSING_PARAMS: "Missing required field: params",
29808
+ MISSING_TOKEN_FIELDS: "Missing required fields in token payload"
29809
+ };
29810
+ var VALIDATION_ERROR_PATTERNS = [
29811
+ "Missing required field",
29812
+ "Invalid JSON",
29813
+ "Request body is required",
29814
+ "requires filter.id",
29815
+ "requires document",
29816
+ "requires documents"
29817
+ ];
28714
29818
 
28715
29819
  // src/server/utils/pagination.ts
28716
29820
  function encodeNextToken(pk, sk) {
@@ -28730,7 +29834,7 @@ function decodeNextToken(token) {
28730
29834
  const json = Buffer.from(base64, "base64").toString("utf-8");
28731
29835
  const payload2 = JSON.parse(json);
28732
29836
  if (!payload2.PK || !payload2.SK) {
28733
- throw new Error("Missing required fields in token payload");
29837
+ throw new Error(VALIDATION_ERROR_MESSAGES.MISSING_TOKEN_FIELDS);
28734
29838
  }
28735
29839
  return payload2;
28736
29840
  } catch (error2) {
@@ -28869,7 +29973,7 @@ async function executeAllRecordsQuery(resource, sort, perPage, nextToken, parsed
28869
29973
  __name(executeAllRecordsQuery, "executeAllRecordsQuery");
28870
29974
 
28871
29975
  // src/server/operations/find/shadowQuery.ts
28872
- var import_lib_dynamodb5 = __toESM(require_dist_cjs60(), 1);
29976
+ var import_lib_dynamodb5 = __toESM(require_dist_cjs66(), 1);
28873
29977
  var logger9 = createLogger({
28874
29978
  service: "shadow-query",
28875
29979
  level: process.env.LOG_LEVEL || "info"
@@ -29048,7 +30152,7 @@ function buildKeyCondition(resource, sortField, optimizableFilter) {
29048
30152
  __name(buildKeyCondition, "buildKeyCondition");
29049
30153
  function encodeValueForShadowSK(value, type) {
29050
30154
  if (type === "number") {
29051
- return String(value).padStart(20, "0");
30155
+ return String(value).padStart(NUMBER_FORMAT.SHADOW_SK_DIGITS, NUMBER_FORMAT.ZERO_PAD_CHAR);
29052
30156
  } else if (type === "date") {
29053
30157
  return new Date(String(value)).toISOString();
29054
30158
  } else if (type === "boolean") {
@@ -29126,7 +30230,7 @@ async function handleFind(resource, params, requestId) {
29126
30230
  __name(handleFind, "handleFind");
29127
30231
 
29128
30232
  // src/server/operations/findMany.ts
29129
- var import_lib_dynamodb6 = __toESM(require_dist_cjs60(), 1);
30233
+ var import_lib_dynamodb6 = __toESM(require_dist_cjs66(), 1);
29130
30234
  var logger11 = createLogger({ service: "records-lambda" });
29131
30235
  async function handleFindMany(resource, params, requestId) {
29132
30236
  const { ids } = params;
@@ -29170,7 +30274,7 @@ async function handleFindMany(resource, params, requestId) {
29170
30274
  __name(handleFindMany, "handleFindMany");
29171
30275
 
29172
30276
  // src/server/operations/findManyReference.ts
29173
- var import_lib_dynamodb7 = __toESM(require_dist_cjs60(), 1);
30277
+ var import_lib_dynamodb7 = __toESM(require_dist_cjs66(), 1);
29174
30278
  var logger12 = createLogger({ service: "records-lambda" });
29175
30279
  async function handleFindManyReference(resource, params, requestId) {
29176
30280
  const { target, id, filter, sort: sortParam, pagination } = params;
@@ -29284,7 +30388,7 @@ async function handleFindManyReference(resource, params, requestId) {
29284
30388
  __name(handleFindManyReference, "handleFindManyReference");
29285
30389
 
29286
30390
  // src/server/operations/findOne.ts
29287
- var import_lib_dynamodb8 = __toESM(require_dist_cjs60(), 1);
30391
+ var import_lib_dynamodb8 = __toESM(require_dist_cjs66(), 1);
29288
30392
  var logger13 = createLogger({ service: "records-lambda" });
29289
30393
  async function handleFindOne(resource, params, requestId) {
29290
30394
  const { id } = params;
@@ -29323,7 +30427,7 @@ async function handleFindOne(resource, params, requestId) {
29323
30427
  __name(handleFindOne, "handleFindOne");
29324
30428
 
29325
30429
  // src/server/operations/insertMany.ts
29326
- var import_lib_dynamodb9 = __toESM(require_dist_cjs60(), 1);
30430
+ var import_lib_dynamodb9 = __toESM(require_dist_cjs66(), 1);
29327
30431
 
29328
30432
  // src/server/utils/timestamps.ts
29329
30433
  function getTimestampFields() {
@@ -29605,12 +30709,12 @@ function getPreparationErrorCode(error2) {
29605
30709
  return error2.name;
29606
30710
  }
29607
30711
  }
29608
- return "VALIDATION_ERROR";
30712
+ return "VALIDATION_ERROR" /* VALIDATION_ERROR */;
29609
30713
  }
29610
30714
  __name(getPreparationErrorCode, "getPreparationErrorCode");
29611
30715
 
29612
30716
  // src/server/operations/insertOne.ts
29613
- var import_lib_dynamodb10 = __toESM(require_dist_cjs60(), 1);
30717
+ var import_lib_dynamodb10 = __toESM(require_dist_cjs66(), 1);
29614
30718
  var logger16 = createLogger({ service: "records-lambda" });
29615
30719
  async function handleInsertOne(resource, params, requestId) {
29616
30720
  logger16.debug("Executing insertOne", {
@@ -29663,7 +30767,7 @@ async function handleInsertOne(resource, params, requestId) {
29663
30767
  __name(handleInsertOne, "handleInsertOne");
29664
30768
 
29665
30769
  // src/server/operations/updateMany.ts
29666
- var import_lib_dynamodb11 = __toESM(require_dist_cjs60(), 1);
30770
+ var import_lib_dynamodb11 = __toESM(require_dist_cjs66(), 1);
29667
30771
  var logger17 = createLogger({ service: "records-lambda" });
29668
30772
  function applyJsonMergePatch(target, patch) {
29669
30773
  const result = { ...target };
@@ -29934,12 +31038,12 @@ function getPreparationErrorCode2(error2) {
29934
31038
  return error2.name;
29935
31039
  }
29936
31040
  }
29937
- return "VALIDATION_ERROR";
31041
+ return "VALIDATION_ERROR" /* VALIDATION_ERROR */;
29938
31042
  }
29939
31043
  __name(getPreparationErrorCode2, "getPreparationErrorCode");
29940
31044
 
29941
31045
  // src/server/operations/updateOne.ts
29942
- var import_lib_dynamodb12 = __toESM(require_dist_cjs60(), 1);
31046
+ var import_lib_dynamodb12 = __toESM(require_dist_cjs66(), 1);
29943
31047
  var logger18 = createLogger({ service: "records-lambda" });
29944
31048
  function applyJsonMergePatch2(target, patch) {
29945
31049
  const result = { ...target };
@@ -30021,35 +31125,187 @@ async function handleUpdateOne(resource, params, requestId) {
30021
31125
  }
30022
31126
  });
30023
31127
  }
30024
- for (const shadowRecord of newShadowRecords) {
30025
- if (shadowDiff.toAdd.includes(shadowRecord.SK)) {
30026
- transactItems.push({
30027
- Put: {
30028
- TableName: tableName,
30029
- Item: shadowRecord
30030
- }
30031
- });
30032
- }
31128
+ for (const shadowRecord of newShadowRecords) {
31129
+ if (shadowDiff.toAdd.includes(shadowRecord.SK)) {
31130
+ transactItems.push({
31131
+ Put: {
31132
+ TableName: tableName,
31133
+ Item: shadowRecord
31134
+ }
31135
+ });
31136
+ }
31137
+ }
31138
+ await executeDynamoDBOperation(
31139
+ () => dbClient2.send(
31140
+ new import_lib_dynamodb12.TransactWriteCommand({
31141
+ TransactItems: transactItems
31142
+ })
31143
+ ),
31144
+ "TransactWriteItems"
31145
+ );
31146
+ logger18.info("updateOne succeeded", {
31147
+ requestId,
31148
+ resource,
31149
+ id,
31150
+ shadowDiffEmpty: isDiffEmpty(shadowDiff),
31151
+ shadowsDeleted: shadowDiff.toDelete.length,
31152
+ shadowsAdded: shadowDiff.toAdd.length
31153
+ });
31154
+ return removeShadowKeys(updatedData);
31155
+ }
31156
+ __name(handleUpdateOne, "handleUpdateOne");
31157
+
31158
+ // src/server/operations/parameterConverter.ts
31159
+ function convertFindParams(mongoParams) {
31160
+ const { filter = {}, options = {} } = mongoParams;
31161
+ const { sort, limit, nextToken } = options;
31162
+ const internalParams = {
31163
+ filter,
31164
+ ...sort && Object.keys(sort).length > 0 && {
31165
+ sort: {
31166
+ field: Object.keys(sort)[0],
31167
+ order: Object.values(sort)[0] === "desc" ? "DESC" : "ASC"
31168
+ }
31169
+ },
31170
+ ...(limit || nextToken) && {
31171
+ pagination: {
31172
+ ...limit && { perPage: limit },
31173
+ ...nextToken && { nextToken }
31174
+ }
31175
+ }
31176
+ };
31177
+ return internalParams;
31178
+ }
31179
+ __name(convertFindParams, "convertFindParams");
31180
+ function convertFindOneParams(mongoParams) {
31181
+ const id = typeof mongoParams.filter?.id === "string" ? mongoParams.filter.id : void 0;
31182
+ if (!id) {
31183
+ throw new Error("findOne requires filter.id");
31184
+ }
31185
+ return { id };
31186
+ }
31187
+ __name(convertFindOneParams, "convertFindOneParams");
31188
+ function convertFindManyParams(mongoParams) {
31189
+ const idFilter = mongoParams.filter?.id;
31190
+ const ids = typeof idFilter === "object" && idFilter !== null && "in" in idFilter ? idFilter.in || [] : [];
31191
+ return { ids };
31192
+ }
31193
+ __name(convertFindManyParams, "convertFindManyParams");
31194
+ function convertInsertOneParams(mongoParams) {
31195
+ if (!mongoParams.document) {
31196
+ throw new Error("insertOne requires document");
31197
+ }
31198
+ return {
31199
+ data: mongoParams.document
31200
+ };
31201
+ }
31202
+ __name(convertInsertOneParams, "convertInsertOneParams");
31203
+ function convertUpdateOneParams(mongoParams) {
31204
+ const id = typeof mongoParams.filter?.id === "string" ? mongoParams.filter.id : void 0;
31205
+ if (!id) {
31206
+ throw new Error("updateOne requires filter.id");
31207
+ }
31208
+ const updateData = mongoParams.update && typeof mongoParams.update === "object" ? "set" in mongoParams.update ? mongoParams.update.set || {} : mongoParams.update : {};
31209
+ return {
31210
+ id,
31211
+ data: updateData
31212
+ };
31213
+ }
31214
+ __name(convertUpdateOneParams, "convertUpdateOneParams");
31215
+ function convertUpdateManyParams(mongoParams) {
31216
+ const idFilter = mongoParams.filter?.id;
31217
+ const ids = typeof idFilter === "object" && idFilter !== null && "in" in idFilter ? idFilter.in || [] : [];
31218
+ const updateData = mongoParams.update && typeof mongoParams.update === "object" ? "set" in mongoParams.update ? mongoParams.update.set || {} : mongoParams.update : {};
31219
+ return {
31220
+ ids,
31221
+ data: updateData
31222
+ };
31223
+ }
31224
+ __name(convertUpdateManyParams, "convertUpdateManyParams");
31225
+ function convertDeleteOneParams(mongoParams) {
31226
+ const id = typeof mongoParams.filter?.id === "string" ? mongoParams.filter.id : void 0;
31227
+ if (!id) {
31228
+ throw new Error("deleteOne requires filter.id");
31229
+ }
31230
+ return { id };
31231
+ }
31232
+ __name(convertDeleteOneParams, "convertDeleteOneParams");
31233
+ function convertDeleteManyParams(mongoParams) {
31234
+ const idFilter = mongoParams.filter?.id;
31235
+ const ids = typeof idFilter === "object" && idFilter !== null && "in" in idFilter ? idFilter.in || [] : [];
31236
+ return { ids };
31237
+ }
31238
+ __name(convertDeleteManyParams, "convertDeleteManyParams");
31239
+ function convertInsertManyParams(mongoParams) {
31240
+ if (!mongoParams.documents) {
31241
+ throw new Error("insertMany requires documents");
30033
31242
  }
30034
- await executeDynamoDBOperation(
30035
- () => dbClient2.send(
30036
- new import_lib_dynamodb12.TransactWriteCommand({
30037
- TransactItems: transactItems
30038
- })
30039
- ),
30040
- "TransactWriteItems"
30041
- );
30042
- logger18.info("updateOne succeeded", {
31243
+ return {
31244
+ data: mongoParams.documents
31245
+ };
31246
+ }
31247
+ __name(convertInsertManyParams, "convertInsertManyParams");
31248
+
31249
+ // src/server/operations/operationDispatcher.ts
31250
+ var logger19 = createLogger({
31251
+ service: "operation-dispatcher",
31252
+ level: process.env.LOG_LEVEL || "info"
31253
+ });
31254
+ async function executeOperation(request2, requestId) {
31255
+ const { op: op2, resource } = request2;
31256
+ logger19.debug("Executing operation", {
30043
31257
  requestId,
30044
- resource,
30045
- id,
30046
- shadowDiffEmpty: isDiffEmpty(shadowDiff),
30047
- shadowsDeleted: shadowDiff.toDelete.length,
30048
- shadowsAdded: shadowDiff.toAdd.length
31258
+ operation: op2,
31259
+ resource
30049
31260
  });
30050
- return removeShadowKeys(updatedData);
31261
+ switch (op2) {
31262
+ case "find": {
31263
+ const internalParams = convertFindParams(request2.params);
31264
+ return await handleFind(resource, internalParams, requestId);
31265
+ }
31266
+ case "findOne": {
31267
+ const internalParams = convertFindOneParams(request2.params);
31268
+ return await handleFindOne(resource, internalParams, requestId);
31269
+ }
31270
+ case "findMany": {
31271
+ const internalParams = convertFindManyParams(request2.params);
31272
+ return await handleFindMany(resource, internalParams, requestId);
31273
+ }
31274
+ case "findManyReference":
31275
+ return await handleFindManyReference(
31276
+ resource,
31277
+ request2.params,
31278
+ requestId
31279
+ );
31280
+ case "insertOne": {
31281
+ const internalParams = convertInsertOneParams(request2.params);
31282
+ return await handleInsertOne(resource, internalParams, requestId);
31283
+ }
31284
+ case "updateOne": {
31285
+ const internalParams = convertUpdateOneParams(request2.params);
31286
+ return await handleUpdateOne(resource, internalParams, requestId);
31287
+ }
31288
+ case "updateMany": {
31289
+ const internalParams = convertUpdateManyParams(request2.params);
31290
+ return await handleUpdateMany(resource, internalParams, requestId);
31291
+ }
31292
+ case "deleteOne": {
31293
+ const internalParams = convertDeleteOneParams(request2.params);
31294
+ return await handleDeleteOne(resource, internalParams, requestId);
31295
+ }
31296
+ case "deleteMany": {
31297
+ const internalParams = convertDeleteManyParams(request2.params);
31298
+ return await handleDeleteMany(resource, internalParams, requestId);
31299
+ }
31300
+ case "insertMany": {
31301
+ const internalParams = convertInsertManyParams(request2.params);
31302
+ return await handleInsertMany(resource, internalParams, requestId);
31303
+ }
31304
+ default:
31305
+ throw new Error(`Unknown operation: ${op2}`);
31306
+ }
30051
31307
  }
30052
- __name(handleUpdateOne, "handleUpdateOne");
31308
+ __name(executeOperation, "executeOperation");
30053
31309
 
30054
31310
  // node_modules/aws-jwt-verify/dist/esm/error.js
30055
31311
  var JwtBaseError = class extends Error {
@@ -31216,11 +32472,11 @@ var CognitoJwtVerifier = class _CognitoJwtVerifier extends JwtVerifierBase {
31216
32472
  CognitoJwtVerifier.USER_POOL_ID_REGEX = /^(?<region>[a-z]{2}-(gov-)?[a-z]+-\d)_[a-zA-Z0-9]+$/;
31217
32473
 
31218
32474
  // src/server/utils/auth.ts
31219
- var logger19 = createLogger({ service: "records-lambda" });
32475
+ var logger20 = createLogger({ service: "records-lambda" });
31220
32476
  var verifierInstance = null;
31221
32477
  function getVerifier(userPoolId, clientId) {
31222
32478
  if (!verifierInstance) {
31223
- logger19.debug("Creating JWT verifier instance", { userPoolId, clientId });
32479
+ logger20.debug("Creating JWT verifier instance", { userPoolId, clientId });
31224
32480
  verifierInstance = CognitoJwtVerifier.create({
31225
32481
  userPoolId,
31226
32482
  tokenUse: "id",
@@ -31233,18 +32489,18 @@ function getVerifier(userPoolId, clientId) {
31233
32489
  }
31234
32490
  __name(getVerifier, "getVerifier");
31235
32491
  async function verifyJwt(token, userPoolId, clientId) {
31236
- logger19.debug("Verifying JWT token with signature validation");
32492
+ logger20.debug("Verifying JWT token with signature validation");
31237
32493
  try {
31238
32494
  const verifier = getVerifier(userPoolId, clientId);
31239
32495
  const payload2 = await verifier.verify(token);
31240
- logger19.debug("JWT token verified successfully", {
32496
+ logger20.debug("JWT token verified successfully", {
31241
32497
  sub: payload2.sub,
31242
32498
  email: payload2.email,
31243
32499
  tokenUse: payload2.token_use
31244
32500
  });
31245
32501
  return payload2;
31246
32502
  } catch (error2) {
31247
- logger19.error("JWT verification failed", {
32503
+ logger20.error("JWT verification failed", {
31248
32504
  error: error2 instanceof Error ? error2.message : String(error2)
31249
32505
  });
31250
32506
  let message = "JWT verification failed";
@@ -31284,238 +32540,68 @@ async function verifyAuthHeader(authHeader, userPoolId, clientId) {
31284
32540
  }
31285
32541
  __name(verifyAuthHeader, "verifyAuthHeader");
31286
32542
 
31287
- // src/server/handler.ts
31288
- var logger20 = createLogger({
31289
- service: "records-lambda",
32543
+ // src/server/utils/authHandler.ts
32544
+ var logger21 = createLogger({
32545
+ service: "auth-handler",
31290
32546
  level: process.env.LOG_LEVEL || "info"
31291
32547
  });
31292
- logger20.info("Records Lambda started with automatic shadow field detection");
31293
- var CORS_HEADERS = {};
31294
- async function handler(event) {
31295
- const requestId = event.requestContext.requestId;
31296
- logger20.info("Received request", {
32548
+ async function handleAuthentication(event, requestId) {
32549
+ const authHeader = event.headers.authorization || event.headers.Authorization;
32550
+ const hasAmzDate = event.headers["x-amz-date"] || event.headers["X-Amz-Date"];
32551
+ const hasAmzContentSha = event.headers["x-amz-content-sha256"] || event.headers["X-Amz-Content-Sha256"];
32552
+ const hasAwsSigV4Auth = authHeader?.startsWith("AWS4-HMAC-SHA256");
32553
+ logger21.debug("Authentication check", {
31297
32554
  requestId,
31298
- method: event.requestContext.http.method,
31299
- path: event.requestContext.http.path
32555
+ hasAuthHeader: !!authHeader,
32556
+ hasAmzDate: !!hasAmzDate,
32557
+ hasAmzContentSha: !!hasAmzContentSha,
32558
+ hasAwsSigV4Auth: !!hasAwsSigV4Auth,
32559
+ authHeaderPrefix: authHeader?.substring(0, 20)
31300
32560
  });
31301
- try {
31302
- if (event.requestContext.http.method === "OPTIONS") {
31303
- return createCorsResponse(200);
31304
- }
31305
- if (event.requestContext.http.method !== "POST") {
31306
- return createErrorResponse(
31307
- "METHOD_NOT_ALLOWED",
31308
- "Only POST method is allowed",
31309
- 405,
31310
- requestId
31311
- );
31312
- }
31313
- const authHeader = event.headers.authorization || event.headers.Authorization;
31314
- const hasAmzDate = event.headers["x-amz-date"] || event.headers["X-Amz-Date"];
31315
- const hasAmzContentSha = event.headers["x-amz-content-sha256"] || event.headers["X-Amz-Content-Sha256"];
31316
- const hasAwsSigV4Auth = authHeader?.startsWith("AWS4-HMAC-SHA256");
31317
- logger20.debug("Authentication check", {
31318
- requestId,
31319
- hasAuthHeader: !!authHeader,
31320
- hasAmzDate: !!hasAmzDate,
31321
- hasAmzContentSha: !!hasAmzContentSha,
31322
- hasAwsSigV4Auth: !!hasAwsSigV4Auth,
31323
- authHeaderPrefix: authHeader?.substring(0, 20)
31324
- });
31325
- const isIAMAuth = hasAwsSigV4Auth || !!(hasAmzDate && hasAmzContentSha);
31326
- if (isIAMAuth) {
31327
- logger20.info("IAM authenticated request", {
31328
- requestId,
31329
- sourceIp: event.requestContext.http.sourceIp
31330
- });
31331
- } else {
31332
- const userPoolId = process.env.COGNITO_USER_POOL_ID;
31333
- const clientId = process.env.COGNITO_CLIENT_ID;
31334
- if (!userPoolId) {
31335
- throw new Error("COGNITO_USER_POOL_ID environment variable is required");
31336
- }
31337
- const jwtPayload = await verifyAuthHeader(authHeader, userPoolId, clientId);
31338
- logger20.debug("Cognito JWT verified", {
31339
- requestId,
31340
- sub: jwtPayload.sub,
31341
- email: jwtPayload.email
31342
- });
31343
- }
31344
- const request2 = parseRequestBody(event.body);
31345
- logger20.info("Parsed request", {
31346
- requestId,
31347
- operation: request2.op,
31348
- resource: request2.resource
31349
- });
31350
- const result = await executeOperation(request2, requestId);
31351
- return createSuccessResponse(result, requestId);
31352
- } catch (error2) {
31353
- return handleError(error2, requestId);
32561
+ const isIAMAuth = hasAwsSigV4Auth || !!(hasAmzDate && hasAmzContentSha);
32562
+ if (isIAMAuth) {
32563
+ await handleIAMAuthentication(event, requestId);
32564
+ } else {
32565
+ await handleCognitoAuthentication(authHeader, requestId);
31354
32566
  }
31355
32567
  }
31356
- __name(handler, "handler");
31357
- function parseRequestBody(body) {
31358
- if (!body) {
31359
- throw new Error("Request body is required");
31360
- }
31361
- try {
31362
- const parsed = JSON.parse(body);
31363
- if (!parsed.operation) {
31364
- throw new Error("Missing required field: operation");
31365
- }
31366
- if (!parsed.collection) {
31367
- throw new Error("Missing required field: collection");
31368
- }
31369
- if (parsed.params === void 0) {
31370
- throw new Error("Missing required field: params");
31371
- }
31372
- const op2 = parsed.operation;
31373
- return {
31374
- op: op2,
31375
- resource: parsed.collection,
31376
- params: parsed.params
31377
- };
31378
- } catch (error2) {
31379
- if (error2 instanceof SyntaxError) {
31380
- throw new Error("Invalid JSON in request body");
31381
- }
31382
- throw error2;
31383
- }
32568
+ __name(handleAuthentication, "handleAuthentication");
32569
+ async function handleIAMAuthentication(event, requestId) {
32570
+ logger21.info("IAM authenticated request", {
32571
+ requestId,
32572
+ sourceIp: event.requestContext.http.sourceIp
32573
+ });
31384
32574
  }
31385
- __name(parseRequestBody, "parseRequestBody");
31386
- async function executeOperation(request2, requestId) {
31387
- const { op: op2, resource } = request2;
31388
- logger20.debug("Executing operation", {
32575
+ __name(handleIAMAuthentication, "handleIAMAuthentication");
32576
+ async function handleCognitoAuthentication(authHeader, requestId) {
32577
+ const userPoolId = process.env.COGNITO_USER_POOL_ID;
32578
+ const clientId = process.env.COGNITO_CLIENT_ID;
32579
+ if (!userPoolId) {
32580
+ throw new Error("COGNITO_USER_POOL_ID environment variable is required");
32581
+ }
32582
+ const jwtPayload = await verifyAuthHeader(authHeader, userPoolId, clientId);
32583
+ logger21.debug("Cognito JWT verified", {
31389
32584
  requestId,
31390
- operation: op2,
31391
- resource
32585
+ sub: jwtPayload.sub,
32586
+ email: jwtPayload.email
31392
32587
  });
31393
- switch (op2) {
31394
- case "find": {
31395
- const mongoParams = request2.params;
31396
- const { filter = {}, options = {} } = mongoParams;
31397
- const { sort, limit, nextToken } = options;
31398
- logger20.debug("Processing find operation", {
31399
- requestId,
31400
- hasSort: !!sort,
31401
- sortType: typeof sort,
31402
- sortKeys: sort ? Object.keys(sort) : [],
31403
- sortValues: sort ? Object.values(sort) : [],
31404
- sort,
31405
- hasNextToken: !!nextToken
31406
- });
31407
- const internalParams = {
31408
- filter,
31409
- ...sort && Object.keys(sort).length > 0 && {
31410
- sort: {
31411
- field: Object.keys(sort)[0],
31412
- order: Object.values(sort)[0] === "desc" ? "DESC" : "ASC"
31413
- }
31414
- },
31415
- ...(limit || nextToken) && {
31416
- pagination: {
31417
- ...limit && { perPage: limit },
31418
- ...nextToken && { nextToken }
31419
- }
31420
- }
31421
- };
31422
- return await handleFind(resource, internalParams, requestId);
31423
- }
31424
- case "findOne": {
31425
- const mongoParams = request2.params;
31426
- const id = typeof mongoParams.filter?.id === "string" ? mongoParams.filter.id : void 0;
31427
- if (!id) {
31428
- throw new Error("findOne requires filter.id");
31429
- }
31430
- const internalParams = { id };
31431
- return await handleFindOne(resource, internalParams, requestId);
31432
- }
31433
- case "findMany": {
31434
- const mongoParams = request2.params;
31435
- const idFilter = mongoParams.filter?.id;
31436
- const ids = typeof idFilter === "object" && idFilter !== null && "in" in idFilter ? idFilter.in || [] : [];
31437
- const internalParams = { ids };
31438
- return await handleFindMany(resource, internalParams, requestId);
31439
- }
31440
- case "findManyReference":
31441
- return await handleFindManyReference(
31442
- resource,
31443
- request2.params,
31444
- requestId
31445
- );
31446
- case "insertOne": {
31447
- const mongoParams = request2.params;
31448
- if (!mongoParams.document) {
31449
- throw new Error("insertOne requires document");
31450
- }
31451
- const internalParams = {
31452
- data: mongoParams.document
31453
- };
31454
- return await handleInsertOne(resource, internalParams, requestId);
31455
- }
31456
- case "updateOne": {
31457
- const mongoParams = request2.params;
31458
- const id = typeof mongoParams.filter?.id === "string" ? mongoParams.filter.id : void 0;
31459
- if (!id) {
31460
- throw new Error("updateOne requires filter.id");
31461
- }
31462
- const updateData = mongoParams.update && typeof mongoParams.update === "object" ? "set" in mongoParams.update ? mongoParams.update.set || {} : mongoParams.update : {};
31463
- const internalParams = {
31464
- id,
31465
- data: updateData
31466
- };
31467
- return await handleUpdateOne(resource, internalParams, requestId);
31468
- }
31469
- case "updateMany": {
31470
- const mongoParams = request2.params;
31471
- const idFilter = mongoParams.filter?.id;
31472
- const ids = typeof idFilter === "object" && idFilter !== null && "in" in idFilter ? idFilter.in || [] : [];
31473
- const updateData = mongoParams.update && typeof mongoParams.update === "object" ? "set" in mongoParams.update ? mongoParams.update.set || {} : mongoParams.update : {};
31474
- const internalParams = {
31475
- ids,
31476
- data: updateData
31477
- };
31478
- return await handleUpdateMany(resource, internalParams, requestId);
31479
- }
31480
- case "deleteOne": {
31481
- const mongoParams = request2.params;
31482
- const id = typeof mongoParams.filter?.id === "string" ? mongoParams.filter.id : void 0;
31483
- if (!id) {
31484
- throw new Error("deleteOne requires filter.id");
31485
- }
31486
- const internalParams = { id };
31487
- return await handleDeleteOne(resource, internalParams, requestId);
31488
- }
31489
- case "deleteMany": {
31490
- const mongoParams = request2.params;
31491
- const idFilter = mongoParams.filter?.id;
31492
- const ids = typeof idFilter === "object" && idFilter !== null && "in" in idFilter ? idFilter.in || [] : [];
31493
- const internalParams = { ids };
31494
- return await handleDeleteMany(resource, internalParams, requestId);
31495
- }
31496
- case "insertMany": {
31497
- const mongoParams = request2.params;
31498
- if (!mongoParams.documents) {
31499
- throw new Error("insertMany requires documents");
31500
- }
31501
- const internalParams = {
31502
- data: mongoParams.documents
31503
- };
31504
- return await handleInsertMany(resource, internalParams, requestId);
31505
- }
31506
- default:
31507
- throw new Error(`Unknown operation: ${op2}`);
31508
- }
31509
32588
  }
31510
- __name(executeOperation, "executeOperation");
32589
+ __name(handleCognitoAuthentication, "handleCognitoAuthentication");
32590
+
32591
+ // src/server/utils/responseBuilder.ts
32592
+ var logger22 = createLogger({
32593
+ service: "response-builder",
32594
+ level: process.env.LOG_LEVEL || "info"
32595
+ });
32596
+ var CORS_HEADERS = {};
31511
32597
  function createSuccessResponse(data2, requestId) {
31512
32598
  const response = {
31513
32599
  success: true,
31514
32600
  data: data2
31515
32601
  };
31516
- logger20.info("Request succeeded", { requestId });
32602
+ logger22.info("Request succeeded", { requestId });
31517
32603
  return {
31518
- statusCode: 200,
32604
+ statusCode: HTTP_STATUS.OK,
31519
32605
  headers: {
31520
32606
  "Content-Type": "application/json",
31521
32607
  ...CORS_HEADERS
@@ -31534,7 +32620,7 @@ function createErrorResponse(code, message, statusCode, requestId, details) {
31534
32620
  details
31535
32621
  }
31536
32622
  };
31537
- logger20.error("Request failed", {
32623
+ logger22.error("Request failed", {
31538
32624
  requestId,
31539
32625
  code,
31540
32626
  message,
@@ -31558,6 +32644,12 @@ function createCorsResponse(statusCode) {
31558
32644
  };
31559
32645
  }
31560
32646
  __name(createCorsResponse, "createCorsResponse");
32647
+
32648
+ // src/server/utils/errorHandler.ts
32649
+ var logger23 = createLogger({
32650
+ service: "error-handler",
32651
+ level: process.env.LOG_LEVEL || "info"
32652
+ });
31561
32653
  function handleError(error2, requestId) {
31562
32654
  if (isAppError(error2)) {
31563
32655
  return createErrorResponse(
@@ -31569,27 +32661,97 @@ function handleError(error2, requestId) {
31569
32661
  );
31570
32662
  }
31571
32663
  if (error2 instanceof Error) {
31572
- logger20.error("Error stack trace", {
32664
+ logger23.error("Error stack trace", {
31573
32665
  requestId,
31574
32666
  stack: error2.stack,
31575
32667
  message: error2.message
31576
32668
  });
31577
- if (error2.message.includes("Missing required field") || error2.message.includes("Invalid JSON") || error2.message.includes("Request body is required")) {
31578
- return createErrorResponse("VALIDATION_ERROR", error2.message, 400, requestId);
32669
+ if (isValidationError(error2.message)) {
32670
+ return createErrorResponse("VALIDATION_ERROR" /* VALIDATION_ERROR */, error2.message, HTTP_STATUS.BAD_REQUEST, requestId);
31579
32671
  }
31580
32672
  if (error2.message.includes("not yet implemented")) {
31581
- return createErrorResponse("NOT_IMPLEMENTED", error2.message, 501, requestId);
32673
+ return createErrorResponse("NOT_IMPLEMENTED" /* NOT_IMPLEMENTED */, error2.message, HTTP_STATUS.NOT_IMPLEMENTED, requestId);
31582
32674
  }
31583
32675
  if (error2.message.includes("Unknown operation")) {
31584
- return createErrorResponse("INVALID_OPERATION", error2.message, 400, requestId);
32676
+ return createErrorResponse("INVALID_OPERATION" /* INVALID_OPERATION */, error2.message, HTTP_STATUS.BAD_REQUEST, requestId);
31585
32677
  }
31586
- return createErrorResponse("INTERNAL_ERROR", error2.message, 500, requestId);
32678
+ return createErrorResponse("INTERNAL_ERROR" /* INTERNAL_ERROR */, error2.message, HTTP_STATUS.INTERNAL_SERVER_ERROR, requestId);
31587
32679
  }
31588
- return createErrorResponse("UNKNOWN_ERROR", "An unexpected error occurred", 500, requestId, {
32680
+ return createErrorResponse("UNKNOWN_ERROR" /* UNKNOWN_ERROR */, "An unexpected error occurred", HTTP_STATUS.INTERNAL_SERVER_ERROR, requestId, {
31589
32681
  error: String(error2)
31590
32682
  });
31591
32683
  }
31592
32684
  __name(handleError, "handleError");
32685
+ function isValidationError(message) {
32686
+ return VALIDATION_ERROR_PATTERNS.some((pattern) => message.includes(pattern));
32687
+ }
32688
+ __name(isValidationError, "isValidationError");
32689
+
32690
+ // src/server/utils/requestParser.ts
32691
+ function parseRequestBody(body) {
32692
+ if (!body) {
32693
+ throw new Error(VALIDATION_ERROR_MESSAGES.REQUEST_BODY_REQUIRED);
32694
+ }
32695
+ try {
32696
+ const parsed = JSON.parse(body);
32697
+ if (!parsed.operation) {
32698
+ throw new Error(VALIDATION_ERROR_MESSAGES.MISSING_OPERATION);
32699
+ }
32700
+ if (!parsed.collection) {
32701
+ throw new Error(VALIDATION_ERROR_MESSAGES.MISSING_COLLECTION);
32702
+ }
32703
+ if (parsed.params === void 0) {
32704
+ throw new Error(VALIDATION_ERROR_MESSAGES.MISSING_PARAMS);
32705
+ }
32706
+ const op2 = parsed.operation;
32707
+ return {
32708
+ op: op2,
32709
+ resource: parsed.collection,
32710
+ params: parsed.params
32711
+ };
32712
+ } catch (error2) {
32713
+ if (error2 instanceof SyntaxError) {
32714
+ throw new Error(VALIDATION_ERROR_MESSAGES.INVALID_JSON);
32715
+ }
32716
+ throw error2;
32717
+ }
32718
+ }
32719
+ __name(parseRequestBody, "parseRequestBody");
32720
+
32721
+ // src/server/handler.ts
32722
+ var logger24 = createLogger({
32723
+ service: "records-lambda",
32724
+ level: process.env.LOG_LEVEL || "info"
32725
+ });
32726
+ logger24.info("Records Lambda started with automatic shadow field detection");
32727
+ async function handler(event) {
32728
+ const requestId = event.requestContext.requestId;
32729
+ logger24.info("Received request", {
32730
+ requestId,
32731
+ method: event.requestContext.http.method,
32732
+ path: event.requestContext.http.path
32733
+ });
32734
+ try {
32735
+ if (event.requestContext.http.method === "OPTIONS") {
32736
+ return createCorsResponse(HTTP_STATUS.OK);
32737
+ }
32738
+ if (event.requestContext.http.method !== "POST") {
32739
+ throw new Error("Only POST method is allowed");
32740
+ }
32741
+ await handleAuthentication(event, requestId);
32742
+ const request2 = parseRequestBody(event.body);
32743
+ logger24.info("Parsed request", {
32744
+ requestId,
32745
+ operation: request2.op,
32746
+ resource: request2.resource
32747
+ });
32748
+ const result = await executeOperation(request2, requestId);
32749
+ return createSuccessResponse(result, requestId);
32750
+ } catch (error2) {
32751
+ return handleError(error2, requestId);
32752
+ }
32753
+ }
32754
+ __name(handler, "handler");
31593
32755
  // Annotate the CommonJS export names for ESM import in node:
31594
32756
  0 && (module.exports = {
31595
32757
  handler