c8y-nitro 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/README.md +19 -43
  2. package/dist/_virtual/rolldown_runtime.mjs +32 -0
  3. package/dist/client.d.mts +122 -0
  4. package/dist/client.mjs +63 -0
  5. package/dist/index.mjs +5 -2
  6. package/dist/module/docker.mjs +1 -1
  7. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/index.mjs +63 -0
  8. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/Client.mjs +284 -0
  9. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/alarm/AlarmService.mjs +198 -0
  10. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/alarm/AlarmStatus.mjs +16 -0
  11. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/alarm/index.mjs +4 -0
  12. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/ApplicationAvailability.mjs +12 -0
  13. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/ApplicationBinaryService.mjs +166 -0
  14. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/ApplicationService.mjs +604 -0
  15. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/ApplicationType.mjs +11 -0
  16. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/BillingMode.mjs +9 -0
  17. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/IApplicationInstanceDetails.mjs +11 -0
  18. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/Isolation.mjs +9 -0
  19. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/index.mjs +9 -0
  20. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/audit/AuditRecordType.mjs +33 -0
  21. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/audit/AuditService.mjs +95 -0
  22. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/audit/ChangeType.mjs +15 -0
  23. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/audit/index.mjs +5 -0
  24. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/BasicAuth.mjs +69 -0
  25. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/BearerAuth.mjs +52 -0
  26. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/BearerAuthFromSessionStorage.mjs +43 -0
  27. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/CookieAuth.mjs +53 -0
  28. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/FetchClient.mjs +82 -0
  29. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/MicroserviceClientRequestAuth.mjs +50 -0
  30. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/NodeJSCookieAuth.mjs +19 -0
  31. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/Paging.mjs +68 -0
  32. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/QueriesUtil.mjs +225 -0
  33. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/Service.mjs +186 -0
  34. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/Severity.mjs +18 -0
  35. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/index.mjs +13 -0
  36. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/device-registration/DeviceRegistrationBulkService.mjs +67 -0
  37. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/device-registration/DeviceRegistrationSecurityMode.mjs +13 -0
  38. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/device-registration/DeviceRegistrationService.mjs +362 -0
  39. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/device-registration/DeviceRegistrationStatus.mjs +16 -0
  40. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/device-registration/index.mjs +6 -0
  41. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/event/EventBinaryService.mjs +102 -0
  42. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/event/EventService.mjs +147 -0
  43. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/event/index.mjs +4 -0
  44. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/feature/FeatureService.mjs +89 -0
  45. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/feature/index.mjs +3 -0
  46. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/gettext-typed.mjs +7 -0
  47. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/gettext.mjs +9 -0
  48. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/identity/IdentityService.mjs +181 -0
  49. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/inventory/InventoryBinaryService.mjs +149 -0
  50. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/inventory/InventoryService.mjs +842 -0
  51. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/inventory/index.mjs +4 -0
  52. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/inventory-role/InventoryRoleService.mjs +139 -0
  53. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/inventory-role/index.mjs +3 -0
  54. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/measurement/ISeriesFilter.mjs +10 -0
  55. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/measurement/MeasurementService.mjs +205 -0
  56. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/measurement/index.mjs +4 -0
  57. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/OperationBulkGeneralStatus.mjs +20 -0
  58. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/OperationBulkService.mjs +157 -0
  59. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/OperationBulkStatus.mjs +16 -0
  60. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/OperationService.mjs +133 -0
  61. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/OperationStatus.mjs +16 -0
  62. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/index.mjs +7 -0
  63. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/public_api.mjs +84 -0
  64. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/realtime/MetaChannel.mjs +11 -0
  65. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/realtime/Realtime.mjs +103 -0
  66. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/realtime/index.mjs +3 -0
  67. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/services.mjs +54 -0
  68. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/smart-groups/SmartGroupsService.mjs +158 -0
  69. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/smart-rules/SmartRulesService.mjs +158 -0
  70. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/smart-rules/index.mjs +3 -0
  71. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/system-options/SystemOptionsService.mjs +82 -0
  72. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/system-options/index.mjs +3 -0
  73. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant/TenantService.mjs +373 -0
  74. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant/TenantStatus.mjs +11 -0
  75. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant/TfaStrategy.mjs +14 -0
  76. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant/index.mjs +5 -0
  77. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-login-options/ITenantLoginOptions.mjs +29 -0
  78. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-login-options/TenantLoginOptionsService.mjs +217 -0
  79. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-login-options/index.mjs +4 -0
  80. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-options/TenantOptionsService.mjs +183 -0
  81. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-options/index.mjs +3 -0
  82. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-security-options/TenantSecurityOptionsService.mjs +52 -0
  83. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-security-options/index.mjs +3 -0
  84. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/trusted-certificates/CrlService.mjs +112 -0
  85. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/trusted-certificates/TrustedCertificateService.mjs +299 -0
  86. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/trusted-certificates/index.mjs +4 -0
  87. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user/PasswordStrength.mjs +10 -0
  88. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user/UserInventoryRoleService.mjs +133 -0
  89. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user/UserService.mjs +730 -0
  90. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user/index.mjs +5 -0
  91. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user-group/UserGroupService.mjs +306 -0
  92. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user-group/index.mjs +3 -0
  93. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user-role/UserRoleService.mjs +70 -0
  94. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user-role/index.mjs +3 -0
  95. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/Client.d.mts +218 -0
  96. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/alarm/AlarmService.d.mts +153 -0
  97. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/alarm/AlarmStatus.d.mts +15 -0
  98. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/alarm/IAlarm.d.mts +84 -0
  99. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/alarm/SeverityFilter.d.mts +6 -0
  100. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/ApplicationAvailability.d.mts +8 -0
  101. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/ApplicationBinaryService.d.mts +46 -0
  102. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/ApplicationService.d.mts +339 -0
  103. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/ApplicationType.d.mts +9 -0
  104. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/BillingMode.d.mts +7 -0
  105. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IApplication.d.mts +30 -0
  106. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IApplicationBinary.d.mts +12 -0
  107. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IApplicationInstanceDetails.d.mts +71 -0
  108. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IApplicationReference.d.mts +19 -0
  109. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IApplicationVersion.d.mts +17 -0
  110. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IDeviceRegistrationProvider.d.mts +9 -0
  111. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IManifest.d.mts +81 -0
  112. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IProvider.d.mts +8 -0
  113. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IUploadParamsOverride.d.mts +9 -0
  114. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/Isolation.d.mts +7 -0
  115. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/audit/AuditRecordType.d.mts +32 -0
  116. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/audit/AuditService.d.mts +77 -0
  117. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/audit/ChangeType.d.mts +11 -0
  118. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/audit/IAuditRecord.d.mts +39 -0
  119. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/audit/IChange.d.mts +31 -0
  120. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/BasicAuth.d.mts +35 -0
  121. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/BearerAuth.d.mts +21 -0
  122. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/BearerAuthFromSessionStorage.d.mts +24 -0
  123. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/CookieAuth.d.mts +26 -0
  124. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/FetchClient.d.mts +24 -0
  125. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IAuthentication.d.mts +27 -0
  126. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/ICustomProperties.d.mts +10 -0
  127. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/ICustomPropertiesMap.d.mts +8 -0
  128. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IFetchClient.d.mts +13 -0
  129. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IFetchOptions.d.mts +24 -0
  130. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IFetchResponse.d.mts +28 -0
  131. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IIdentified.d.mts +8 -0
  132. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IMicroserviceSubscriptions.d.mts +18 -0
  133. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/INamed.d.mts +8 -0
  134. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IResult.d.mts +29 -0
  135. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IResultBase.d.mts +9 -0
  136. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IResultList.d.mts +39 -0
  137. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/ISource.d.mts +20 -0
  138. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/MicroserviceClientRequestAuth.d.mts +36 -0
  139. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/NodeJSCookieAuth.d.mts +14 -0
  140. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/Paging.d.mts +70 -0
  141. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/QueriesUtil.d.mts +168 -0
  142. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/Service.d.mts +48 -0
  143. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/Severity.d.mts +17 -0
  144. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/device-registration/DeviceRegistrationBulkService.d.mts +43 -0
  145. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/device-registration/DeviceRegistrationSecurityMode.d.mts +11 -0
  146. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/device-registration/DeviceRegistrationService.d.mts +296 -0
  147. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/device-registration/DeviceRegistrationStatus.d.mts +12 -0
  148. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/device-registration/IDeviceCredentials.d.mts +25 -0
  149. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/device-registration/IDeviceRegistration.d.mts +79 -0
  150. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/device-registration/IDeviceRegistrationBulkResult.d.mts +29 -0
  151. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/event/EventBinaryService.d.mts +67 -0
  152. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/event/EventService.d.mts +120 -0
  153. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/event/IEvent.d.mts +42 -0
  154. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/event/IEventBinary.d.mts +28 -0
  155. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/feature/FeatureService.d.mts +59 -0
  156. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/feature/IFeatureToggle.d.mts +30 -0
  157. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/identity/IExternalIdentity.d.mts +27 -0
  158. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/identity/IdentityService.d.mts +107 -0
  159. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/inventory/IManagedObject.d.mts +95 -0
  160. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/inventory/InventoryBinaryService.d.mts +50 -0
  161. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/inventory/InventoryService.d.mts +594 -0
  162. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/inventory-role/InventoryRoleService.d.mts +111 -0
  163. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/measurement/IMeasurement.d.mts +61 -0
  164. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/measurement/IMeasurementFilter.d.mts +59 -0
  165. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/measurement/ISeries.d.mts +60 -0
  166. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/measurement/ISeriesFilter.d.mts +48 -0
  167. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/measurement/MeasurementService.d.mts +163 -0
  168. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/operation/IOperation.d.mts +27 -0
  169. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/operation/IOperationBulk.d.mts +58 -0
  170. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/operation/IOperationBulkProgress.d.mts +29 -0
  171. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/operation/OperationBulkGeneralStatus.d.mts +16 -0
  172. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/operation/OperationBulkService.d.mts +130 -0
  173. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/operation/OperationBulkStatus.d.mts +12 -0
  174. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/operation/OperationService.d.mts +111 -0
  175. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/operation/OperationStatus.d.mts +12 -0
  176. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/realtime/Realtime.d.mts +69 -0
  177. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/smart-groups/SmartGroupsService.d.mts +126 -0
  178. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/smart-rules/IRule.d.mts +22 -0
  179. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/smart-rules/SmartRulesService.d.mts +90 -0
  180. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/system-options/ISystemOption.d.mts +21 -0
  181. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/system-options/SystemOptionsService.d.mts +57 -0
  182. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant/ICurrentTenant.d.mts +25 -0
  183. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant/ISupportUser.d.mts +8 -0
  184. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant/ITenant.d.mts +28 -0
  185. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant/ITenantReference.d.mts +8 -0
  186. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant/ITfaSettings.d.mts +32 -0
  187. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant/TenantService.d.mts +264 -0
  188. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant/TenantStatus.d.mts +7 -0
  189. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant/TfaStrategy.d.mts +12 -0
  190. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant-login-options/ITenantLoginOptions.d.mts +159 -0
  191. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant-login-options/TenantLoginOptionsService.d.mts +176 -0
  192. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant-options/ITenantOption.d.mts +12 -0
  193. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant-options/ITenantOptionDetailParams.d.mts +13 -0
  194. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant-options/TenantOptionsService.d.mts +150 -0
  195. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant-policy/ITenantPolicy.d.mts +13 -0
  196. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant-security-options/ITenantSecurityOption.d.mts +10 -0
  197. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant-security-options/TenantSecurityOptionsService.d.mts +39 -0
  198. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/trusted-certificates/CrlService.d.mts +75 -0
  199. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/trusted-certificates/ICertificateRevocation.d.mts +14 -0
  200. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/trusted-certificates/ITrustedCertificate.d.mts +75 -0
  201. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/trusted-certificates/TrustedCertificateService.d.mts +181 -0
  202. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/ICurrentUser.d.mts +39 -0
  203. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/IResetPassword.d.mts +15 -0
  204. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/ITotp.d.mts +9 -0
  205. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/ITotpStatus.d.mts +7 -0
  206. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/IUser.d.mts +77 -0
  207. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/IUserInventoryRole.d.mts +16 -0
  208. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/PasswordStrength.d.mts +8 -0
  209. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/UserInventoryRoleService.d.mts +108 -0
  210. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/UserService.d.mts +400 -0
  211. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user-group/IDevicePermissions.d.mts +8 -0
  212. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user-group/IUserGroup.d.mts +44 -0
  213. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user-group/UserGroupService.d.mts +215 -0
  214. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user-role/IRole.d.mts +12 -0
  215. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user-role/IRoleReference.d.mts +19 -0
  216. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user-role/UserRoleService.d.mts +57 -0
  217. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/index.mjs +18 -0
  218. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/abort.mjs +29 -0
  219. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/async.mjs +32 -0
  220. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/defer.mjs +21 -0
  221. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/iterate.mjs +47 -0
  222. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/state.mjs +33 -0
  223. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/terminator.mjs +26 -0
  224. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/parallel.mjs +40 -0
  225. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/serial.mjs +24 -0
  226. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/serialOrdered.mjs +62 -0
  227. package/dist/node_modules/.pnpm/b2a@1.1.2/node_modules/b2a/lib/index.mjs +44 -0
  228. package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.mjs +20 -0
  229. package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.mjs +12 -0
  230. package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.mjs +12 -0
  231. package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.mjs +23 -0
  232. package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.mjs +12 -0
  233. package/dist/node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.mjs +158 -0
  234. package/dist/node_modules/.pnpm/cometd-nodejs-client@1.0.2/node_modules/cometd-nodejs-client/cometd-nodejs-client.mjs +120 -0
  235. package/dist/node_modules/.pnpm/cometd@4.0.8/node_modules/cometd/cometd.mjs +2658 -0
  236. package/dist/node_modules/.pnpm/cross-fetch@4.1.0_encoding@0.1.13/node_modules/cross-fetch/dist/node-ponyfill.mjs +24 -0
  237. package/dist/node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.mjs +84 -0
  238. package/dist/node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.mjs +27 -0
  239. package/dist/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/lib/encoding.mjs +60 -0
  240. package/dist/node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.mjs +18 -0
  241. package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.mjs +12 -0
  242. package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.mjs +12 -0
  243. package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.mjs +12 -0
  244. package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.mjs +12 -0
  245. package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.mjs +12 -0
  246. package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.mjs +12 -0
  247. package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.mjs +12 -0
  248. package/dist/node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.mjs +12 -0
  249. package/dist/node_modules/.pnpm/es-set-tostringtag@2.1.0/node_modules/es-set-tostringtag/index.mjs +32 -0
  250. package/dist/node_modules/.pnpm/form-data@4.0.4/node_modules/form-data/index.d.mts +50 -0
  251. package/dist/node_modules/.pnpm/form-data@4.0.4/node_modules/form-data/lib/form_data.mjs +247 -0
  252. package/dist/node_modules/.pnpm/form-data@4.0.4/node_modules/form-data/lib/populate.mjs +16 -0
  253. package/dist/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.mjs +58 -0
  254. package/dist/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.mjs +13 -0
  255. package/dist/node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.mjs +357 -0
  256. package/dist/node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.mjs +14 -0
  257. package/dist/node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.mjs +12 -0
  258. package/dist/node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.mjs +25 -0
  259. package/dist/node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.mjs +12 -0
  260. package/dist/node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.mjs +19 -0
  261. package/dist/node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.mjs +21 -0
  262. package/dist/node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.mjs +35 -0
  263. package/dist/node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.mjs +16 -0
  264. package/dist/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.mjs +16 -0
  265. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-codec.mjs +349 -0
  266. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-data.mjs +194 -0
  267. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/index.mjs +34 -0
  268. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/internal.mjs +141 -0
  269. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-codec.mjs +53 -0
  270. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data-generated.mjs +458 -0
  271. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data.mjs +154 -0
  272. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/big5-added.mjs +172 -0
  273. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp936.mjs +2587 -0
  274. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp949.mjs +2223 -0
  275. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp950.mjs +230 -0
  276. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/eucjp.mjs +428 -0
  277. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gb18030-ranges.mjs +430 -0
  278. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gbk-added.mjs +233 -0
  279. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/shiftjis.mjs +295 -0
  280. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf16.mjs +126 -0
  281. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf32.mjs +198 -0
  282. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf7.mjs +183 -0
  283. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/bom-handling.mjs +45 -0
  284. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/index.mjs +110 -0
  285. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/streams.mjs +93 -0
  286. package/dist/node_modules/.pnpm/isomorphic-cometd@1.1.0_cometd-nodejs-client@1.0.2_cometd@4.0.8/node_modules/isomorphic-cometd/node.mjs +18 -0
  287. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.mjs +12 -0
  288. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.mjs +12 -0
  289. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.mjs +14 -0
  290. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.mjs +12 -0
  291. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.mjs +12 -0
  292. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.mjs +12 -0
  293. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.mjs +12 -0
  294. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.mjs +17 -0
  295. package/dist/node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/db.mjs +7051 -0
  296. package/dist/node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/index.mjs +21 -0
  297. package/dist/node_modules/.pnpm/mime-types@2.1.35/node_modules/mime-types/index.mjs +123 -0
  298. package/dist/node_modules/.pnpm/node-fetch@2.7.0_encoding@0.1.13/node_modules/node-fetch/lib/index.mjs +1174 -0
  299. package/dist/node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/safer.mjs +48 -0
  300. package/dist/node_modules/.pnpm/tr46@0.0.3/node_modules/tr46/index.mjs +145 -0
  301. package/dist/node_modules/.pnpm/tr46@0.0.3/node_modules/tr46/lib/mappingTable.mjs +35563 -0
  302. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs +31 -0
  303. package/dist/node_modules/.pnpm/webidl-conversions@3.0.1/node_modules/webidl-conversions/lib/index.mjs +122 -0
  304. package/dist/node_modules/.pnpm/whatwg-url@5.0.0/node_modules/whatwg-url/lib/URL-impl.mjs +145 -0
  305. package/dist/node_modules/.pnpm/whatwg-url@5.0.0/node_modules/whatwg-url/lib/URL.mjs +174 -0
  306. package/dist/node_modules/.pnpm/whatwg-url@5.0.0/node_modules/whatwg-url/lib/public-api.mjs +21 -0
  307. package/dist/node_modules/.pnpm/whatwg-url@5.0.0/node_modules/whatwg-url/lib/url-state-machine.mjs +878 -0
  308. package/dist/node_modules/.pnpm/whatwg-url@5.0.0/node_modules/whatwg-url/lib/utils.mjs +22 -0
  309. package/dist/package.mjs +1 -1
  310. package/dist/utils/client.d.mts +1 -1
  311. package/dist/utils/client.mjs +4 -1
  312. package/dist/utils/credentials.d.mts +1 -1
  313. package/dist/utils/credentials.mjs +2 -1
  314. package/dist/utils/resources.d.mts +1 -1
  315. package/package.json +8 -4
@@ -0,0 +1,1174 @@
1
+ import { __commonJSMin, __require } from "../../../../../../_virtual/rolldown_runtime.mjs";
2
+ import { require_public_api } from "../../../../whatwg-url@5.0.0/node_modules/whatwg-url/lib/public-api.mjs";
3
+ import { require_encoding } from "../../../../encoding@0.1.13/node_modules/encoding/lib/encoding.mjs";
4
+
5
+ //#region node_modules/.pnpm/node-fetch@2.7.0_encoding@0.1.13/node_modules/node-fetch/lib/index.js
6
+ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ function _interopDefault(ex) {
9
+ return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
10
+ }
11
+ var Stream = _interopDefault(__require("stream"));
12
+ var http = _interopDefault(__require("http"));
13
+ var Url = _interopDefault(__require("url"));
14
+ var whatwgUrl = _interopDefault(require_public_api());
15
+ var https = _interopDefault(__require("https"));
16
+ var zlib = _interopDefault(__require("zlib"));
17
+ const Readable = Stream.Readable;
18
+ const BUFFER = Symbol("buffer");
19
+ const TYPE = Symbol("type");
20
+ var Blob = class Blob {
21
+ constructor() {
22
+ this[TYPE] = "";
23
+ const blobParts = arguments[0];
24
+ const options = arguments[1];
25
+ const buffers = [];
26
+ let size = 0;
27
+ if (blobParts) {
28
+ const a = blobParts;
29
+ const length = Number(a.length);
30
+ for (let i = 0; i < length; i++) {
31
+ const element = a[i];
32
+ let buffer;
33
+ if (element instanceof Buffer) buffer = element;
34
+ else if (ArrayBuffer.isView(element)) buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
35
+ else if (element instanceof ArrayBuffer) buffer = Buffer.from(element);
36
+ else if (element instanceof Blob) buffer = element[BUFFER];
37
+ else buffer = Buffer.from(typeof element === "string" ? element : String(element));
38
+ size += buffer.length;
39
+ buffers.push(buffer);
40
+ }
41
+ }
42
+ this[BUFFER] = Buffer.concat(buffers);
43
+ let type = options && options.type !== void 0 && String(options.type).toLowerCase();
44
+ if (type && !/[^\u0020-\u007E]/.test(type)) this[TYPE] = type;
45
+ }
46
+ get size() {
47
+ return this[BUFFER].length;
48
+ }
49
+ get type() {
50
+ return this[TYPE];
51
+ }
52
+ text() {
53
+ return Promise.resolve(this[BUFFER].toString());
54
+ }
55
+ arrayBuffer() {
56
+ const buf = this[BUFFER];
57
+ const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
58
+ return Promise.resolve(ab);
59
+ }
60
+ stream() {
61
+ const readable = new Readable();
62
+ readable._read = function() {};
63
+ readable.push(this[BUFFER]);
64
+ readable.push(null);
65
+ return readable;
66
+ }
67
+ toString() {
68
+ return "[object Blob]";
69
+ }
70
+ slice() {
71
+ const size = this.size;
72
+ const start = arguments[0];
73
+ const end = arguments[1];
74
+ let relativeStart, relativeEnd;
75
+ if (start === void 0) relativeStart = 0;
76
+ else if (start < 0) relativeStart = Math.max(size + start, 0);
77
+ else relativeStart = Math.min(start, size);
78
+ if (end === void 0) relativeEnd = size;
79
+ else if (end < 0) relativeEnd = Math.max(size + end, 0);
80
+ else relativeEnd = Math.min(end, size);
81
+ const span = Math.max(relativeEnd - relativeStart, 0);
82
+ const slicedBuffer = this[BUFFER].slice(relativeStart, relativeStart + span);
83
+ const blob = new Blob([], { type: arguments[2] });
84
+ blob[BUFFER] = slicedBuffer;
85
+ return blob;
86
+ }
87
+ };
88
+ Object.defineProperties(Blob.prototype, {
89
+ size: { enumerable: true },
90
+ type: { enumerable: true },
91
+ slice: { enumerable: true }
92
+ });
93
+ Object.defineProperty(Blob.prototype, Symbol.toStringTag, {
94
+ value: "Blob",
95
+ writable: false,
96
+ enumerable: false,
97
+ configurable: true
98
+ });
99
+ /**
100
+ * fetch-error.js
101
+ *
102
+ * FetchError interface for operational errors
103
+ */
104
+ /**
105
+ * Create FetchError instance
106
+ *
107
+ * @param String message Error message for human
108
+ * @param String type Error type for machine
109
+ * @param String systemError For Node.js system error
110
+ * @return FetchError
111
+ */
112
+ function FetchError(message, type, systemError) {
113
+ Error.call(this, message);
114
+ this.message = message;
115
+ this.type = type;
116
+ if (systemError) this.code = this.errno = systemError.code;
117
+ Error.captureStackTrace(this, this.constructor);
118
+ }
119
+ FetchError.prototype = Object.create(Error.prototype);
120
+ FetchError.prototype.constructor = FetchError;
121
+ FetchError.prototype.name = "FetchError";
122
+ let convert;
123
+ try {
124
+ convert = require_encoding().convert;
125
+ } catch (e) {}
126
+ const INTERNALS = Symbol("Body internals");
127
+ const PassThrough = Stream.PassThrough;
128
+ /**
129
+ * Body mixin
130
+ *
131
+ * Ref: https://fetch.spec.whatwg.org/#body
132
+ *
133
+ * @param Stream body Readable stream
134
+ * @param Object opts Response options
135
+ * @return Void
136
+ */
137
+ function Body(body) {
138
+ var _this = this;
139
+ var _ref = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ref$size = _ref.size;
140
+ let size = _ref$size === void 0 ? 0 : _ref$size;
141
+ var _ref$timeout = _ref.timeout;
142
+ let timeout = _ref$timeout === void 0 ? 0 : _ref$timeout;
143
+ if (body == null) body = null;
144
+ else if (isURLSearchParams(body)) body = Buffer.from(body.toString());
145
+ else if (isBlob(body));
146
+ else if (Buffer.isBuffer(body));
147
+ else if (Object.prototype.toString.call(body) === "[object ArrayBuffer]") body = Buffer.from(body);
148
+ else if (ArrayBuffer.isView(body)) body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
149
+ else if (body instanceof Stream);
150
+ else body = Buffer.from(String(body));
151
+ this[INTERNALS] = {
152
+ body,
153
+ disturbed: false,
154
+ error: null
155
+ };
156
+ this.size = size;
157
+ this.timeout = timeout;
158
+ if (body instanceof Stream) body.on("error", function(err) {
159
+ const error = err.name === "AbortError" ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, "system", err);
160
+ _this[INTERNALS].error = error;
161
+ });
162
+ }
163
+ Body.prototype = {
164
+ get body() {
165
+ return this[INTERNALS].body;
166
+ },
167
+ get bodyUsed() {
168
+ return this[INTERNALS].disturbed;
169
+ },
170
+ arrayBuffer() {
171
+ return consumeBody.call(this).then(function(buf) {
172
+ return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
173
+ });
174
+ },
175
+ blob() {
176
+ let ct = this.headers && this.headers.get("content-type") || "";
177
+ return consumeBody.call(this).then(function(buf) {
178
+ return Object.assign(new Blob([], { type: ct.toLowerCase() }), { [BUFFER]: buf });
179
+ });
180
+ },
181
+ json() {
182
+ var _this2 = this;
183
+ return consumeBody.call(this).then(function(buffer) {
184
+ try {
185
+ return JSON.parse(buffer.toString());
186
+ } catch (err) {
187
+ return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, "invalid-json"));
188
+ }
189
+ });
190
+ },
191
+ text() {
192
+ return consumeBody.call(this).then(function(buffer) {
193
+ return buffer.toString();
194
+ });
195
+ },
196
+ buffer() {
197
+ return consumeBody.call(this);
198
+ },
199
+ textConverted() {
200
+ var _this3 = this;
201
+ return consumeBody.call(this).then(function(buffer) {
202
+ return convertBody(buffer, _this3.headers);
203
+ });
204
+ }
205
+ };
206
+ Object.defineProperties(Body.prototype, {
207
+ body: { enumerable: true },
208
+ bodyUsed: { enumerable: true },
209
+ arrayBuffer: { enumerable: true },
210
+ blob: { enumerable: true },
211
+ json: { enumerable: true },
212
+ text: { enumerable: true }
213
+ });
214
+ Body.mixIn = function(proto) {
215
+ for (const name of Object.getOwnPropertyNames(Body.prototype))
216
+ // istanbul ignore else: future proof
217
+ if (!(name in proto)) {
218
+ const desc = Object.getOwnPropertyDescriptor(Body.prototype, name);
219
+ Object.defineProperty(proto, name, desc);
220
+ }
221
+ };
222
+ /**
223
+ * Consume and convert an entire Body to a Buffer.
224
+ *
225
+ * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
226
+ *
227
+ * @return Promise
228
+ */
229
+ function consumeBody() {
230
+ var _this4 = this;
231
+ if (this[INTERNALS].disturbed) return Body.Promise.reject(/* @__PURE__ */ new TypeError(`body used already for: ${this.url}`));
232
+ this[INTERNALS].disturbed = true;
233
+ if (this[INTERNALS].error) return Body.Promise.reject(this[INTERNALS].error);
234
+ let body = this.body;
235
+ if (body === null) return Body.Promise.resolve(Buffer.alloc(0));
236
+ if (isBlob(body)) body = body.stream();
237
+ if (Buffer.isBuffer(body)) return Body.Promise.resolve(body);
238
+ // istanbul ignore if: should never happen
239
+ if (!(body instanceof Stream)) return Body.Promise.resolve(Buffer.alloc(0));
240
+ let accum = [];
241
+ let accumBytes = 0;
242
+ let abort = false;
243
+ return new Body.Promise(function(resolve, reject) {
244
+ let resTimeout;
245
+ if (_this4.timeout) resTimeout = setTimeout(function() {
246
+ abort = true;
247
+ reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, "body-timeout"));
248
+ }, _this4.timeout);
249
+ body.on("error", function(err) {
250
+ if (err.name === "AbortError") {
251
+ abort = true;
252
+ reject(err);
253
+ } else reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, "system", err));
254
+ });
255
+ body.on("data", function(chunk) {
256
+ if (abort || chunk === null) return;
257
+ if (_this4.size && accumBytes + chunk.length > _this4.size) {
258
+ abort = true;
259
+ reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, "max-size"));
260
+ return;
261
+ }
262
+ accumBytes += chunk.length;
263
+ accum.push(chunk);
264
+ });
265
+ body.on("end", function() {
266
+ if (abort) return;
267
+ clearTimeout(resTimeout);
268
+ try {
269
+ resolve(Buffer.concat(accum, accumBytes));
270
+ } catch (err) {
271
+ reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, "system", err));
272
+ }
273
+ });
274
+ });
275
+ }
276
+ /**
277
+ * Detect buffer encoding and convert to target encoding
278
+ * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
279
+ *
280
+ * @param Buffer buffer Incoming buffer
281
+ * @param String encoding Target encoding
282
+ * @return String
283
+ */
284
+ function convertBody(buffer, headers) {
285
+ if (typeof convert !== "function") throw new Error("The package `encoding` must be installed to use the textConverted() function");
286
+ const ct = headers.get("content-type");
287
+ let charset = "utf-8";
288
+ let res, str;
289
+ if (ct) res = /charset=([^;]*)/i.exec(ct);
290
+ str = buffer.slice(0, 1024).toString();
291
+ if (!res && str) res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str);
292
+ if (!res && str) {
293
+ res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str);
294
+ if (!res) {
295
+ res = /<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(str);
296
+ if (res) res.pop();
297
+ }
298
+ if (res) res = /charset=(.*)/i.exec(res.pop());
299
+ }
300
+ if (!res && str) res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str);
301
+ if (res) {
302
+ charset = res.pop();
303
+ if (charset === "gb2312" || charset === "gbk") charset = "gb18030";
304
+ }
305
+ return convert(buffer, "UTF-8", charset).toString();
306
+ }
307
+ /**
308
+ * Detect a URLSearchParams object
309
+ * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143
310
+ *
311
+ * @param Object obj Object to detect by type or brand
312
+ * @return String
313
+ */
314
+ function isURLSearchParams(obj) {
315
+ if (typeof obj !== "object" || typeof obj.append !== "function" || typeof obj.delete !== "function" || typeof obj.get !== "function" || typeof obj.getAll !== "function" || typeof obj.has !== "function" || typeof obj.set !== "function") return false;
316
+ return obj.constructor.name === "URLSearchParams" || Object.prototype.toString.call(obj) === "[object URLSearchParams]" || typeof obj.sort === "function";
317
+ }
318
+ /**
319
+ * Check if `obj` is a W3C `Blob` object (which `File` inherits from)
320
+ * @param {*} obj
321
+ * @return {boolean}
322
+ */
323
+ function isBlob(obj) {
324
+ return typeof obj === "object" && typeof obj.arrayBuffer === "function" && typeof obj.type === "string" && typeof obj.stream === "function" && typeof obj.constructor === "function" && typeof obj.constructor.name === "string" && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);
325
+ }
326
+ /**
327
+ * Clone body given Res/Req instance
328
+ *
329
+ * @param Mixed instance Response or Request instance
330
+ * @return Mixed
331
+ */
332
+ function clone(instance) {
333
+ let p1, p2;
334
+ let body = instance.body;
335
+ if (instance.bodyUsed) throw new Error("cannot clone body after it is used");
336
+ if (body instanceof Stream && typeof body.getBoundary !== "function") {
337
+ p1 = new PassThrough();
338
+ p2 = new PassThrough();
339
+ body.pipe(p1);
340
+ body.pipe(p2);
341
+ instance[INTERNALS].body = p1;
342
+ body = p2;
343
+ }
344
+ return body;
345
+ }
346
+ /**
347
+ * Performs the operation "extract a `Content-Type` value from |object|" as
348
+ * specified in the specification:
349
+ * https://fetch.spec.whatwg.org/#concept-bodyinit-extract
350
+ *
351
+ * This function assumes that instance.body is present.
352
+ *
353
+ * @param Mixed instance Any options.body input
354
+ */
355
+ function extractContentType(body) {
356
+ if (body === null) return null;
357
+ else if (typeof body === "string") return "text/plain;charset=UTF-8";
358
+ else if (isURLSearchParams(body)) return "application/x-www-form-urlencoded;charset=UTF-8";
359
+ else if (isBlob(body)) return body.type || null;
360
+ else if (Buffer.isBuffer(body)) return null;
361
+ else if (Object.prototype.toString.call(body) === "[object ArrayBuffer]") return null;
362
+ else if (ArrayBuffer.isView(body)) return null;
363
+ else if (typeof body.getBoundary === "function") return `multipart/form-data;boundary=${body.getBoundary()}`;
364
+ else if (body instanceof Stream) return null;
365
+ else return "text/plain;charset=UTF-8";
366
+ }
367
+ /**
368
+ * The Fetch Standard treats this as if "total bytes" is a property on the body.
369
+ * For us, we have to explicitly get it with a function.
370
+ *
371
+ * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes
372
+ *
373
+ * @param Body instance Instance of Body
374
+ * @return Number? Number of bytes, or null if not possible
375
+ */
376
+ function getTotalBytes(instance) {
377
+ const body = instance.body;
378
+ if (body === null) return 0;
379
+ else if (isBlob(body)) return body.size;
380
+ else if (Buffer.isBuffer(body)) return body.length;
381
+ else if (body && typeof body.getLengthSync === "function") {
382
+ if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || body.hasKnownLength && body.hasKnownLength()) return body.getLengthSync();
383
+ return null;
384
+ } else return null;
385
+ }
386
+ /**
387
+ * Write a Body to a Node.js WritableStream (e.g. http.Request) object.
388
+ *
389
+ * @param Body instance Instance of Body
390
+ * @return Void
391
+ */
392
+ function writeToStream(dest, instance) {
393
+ const body = instance.body;
394
+ if (body === null) dest.end();
395
+ else if (isBlob(body)) body.stream().pipe(dest);
396
+ else if (Buffer.isBuffer(body)) {
397
+ dest.write(body);
398
+ dest.end();
399
+ } else body.pipe(dest);
400
+ }
401
+ Body.Promise = global.Promise;
402
+ /**
403
+ * headers.js
404
+ *
405
+ * Headers class offers convenient helpers
406
+ */
407
+ const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/;
408
+ const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
409
+ function validateName(name) {
410
+ name = `${name}`;
411
+ if (invalidTokenRegex.test(name) || name === "") throw new TypeError(`${name} is not a legal HTTP header name`);
412
+ }
413
+ function validateValue(value) {
414
+ value = `${value}`;
415
+ if (invalidHeaderCharRegex.test(value)) throw new TypeError(`${value} is not a legal HTTP header value`);
416
+ }
417
+ /**
418
+ * Find the key in the map object given a header name.
419
+ *
420
+ * Returns undefined if not found.
421
+ *
422
+ * @param String name Header name
423
+ * @return String|Undefined
424
+ */
425
+ function find(map, name) {
426
+ name = name.toLowerCase();
427
+ for (const key in map) if (key.toLowerCase() === name) return key;
428
+ }
429
+ const MAP = Symbol("map");
430
+ var Headers = class Headers {
431
+ /**
432
+ * Headers class
433
+ *
434
+ * @param Object headers Response headers
435
+ * @return Void
436
+ */
437
+ constructor() {
438
+ let init = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : void 0;
439
+ this[MAP] = Object.create(null);
440
+ if (init instanceof Headers) {
441
+ const rawHeaders = init.raw();
442
+ const headerNames = Object.keys(rawHeaders);
443
+ for (const headerName of headerNames) for (const value of rawHeaders[headerName]) this.append(headerName, value);
444
+ return;
445
+ }
446
+ if (init == null);
447
+ else if (typeof init === "object") {
448
+ const method = init[Symbol.iterator];
449
+ if (method != null) {
450
+ if (typeof method !== "function") throw new TypeError("Header pairs must be iterable");
451
+ const pairs = [];
452
+ for (const pair of init) {
453
+ if (typeof pair !== "object" || typeof pair[Symbol.iterator] !== "function") throw new TypeError("Each header pair must be iterable");
454
+ pairs.push(Array.from(pair));
455
+ }
456
+ for (const pair of pairs) {
457
+ if (pair.length !== 2) throw new TypeError("Each header pair must be a name/value tuple");
458
+ this.append(pair[0], pair[1]);
459
+ }
460
+ } else for (const key of Object.keys(init)) {
461
+ const value = init[key];
462
+ this.append(key, value);
463
+ }
464
+ } else throw new TypeError("Provided initializer must be an object");
465
+ }
466
+ /**
467
+ * Return combined header value given name
468
+ *
469
+ * @param String name Header name
470
+ * @return Mixed
471
+ */
472
+ get(name) {
473
+ name = `${name}`;
474
+ validateName(name);
475
+ const key = find(this[MAP], name);
476
+ if (key === void 0) return null;
477
+ return this[MAP][key].join(", ");
478
+ }
479
+ /**
480
+ * Iterate over all headers
481
+ *
482
+ * @param Function callback Executed for each item with parameters (value, name, thisArg)
483
+ * @param Boolean thisArg `this` context for callback function
484
+ * @return Void
485
+ */
486
+ forEach(callback) {
487
+ let thisArg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : void 0;
488
+ let pairs = getHeaders(this);
489
+ let i = 0;
490
+ while (i < pairs.length) {
491
+ var _pairs$i = pairs[i];
492
+ const name = _pairs$i[0], value = _pairs$i[1];
493
+ callback.call(thisArg, value, name, this);
494
+ pairs = getHeaders(this);
495
+ i++;
496
+ }
497
+ }
498
+ /**
499
+ * Overwrite header values given name
500
+ *
501
+ * @param String name Header name
502
+ * @param String value Header value
503
+ * @return Void
504
+ */
505
+ set(name, value) {
506
+ name = `${name}`;
507
+ value = `${value}`;
508
+ validateName(name);
509
+ validateValue(value);
510
+ const key = find(this[MAP], name);
511
+ this[MAP][key !== void 0 ? key : name] = [value];
512
+ }
513
+ /**
514
+ * Append a value onto existing header
515
+ *
516
+ * @param String name Header name
517
+ * @param String value Header value
518
+ * @return Void
519
+ */
520
+ append(name, value) {
521
+ name = `${name}`;
522
+ value = `${value}`;
523
+ validateName(name);
524
+ validateValue(value);
525
+ const key = find(this[MAP], name);
526
+ if (key !== void 0) this[MAP][key].push(value);
527
+ else this[MAP][name] = [value];
528
+ }
529
+ /**
530
+ * Check for header name existence
531
+ *
532
+ * @param String name Header name
533
+ * @return Boolean
534
+ */
535
+ has(name) {
536
+ name = `${name}`;
537
+ validateName(name);
538
+ return find(this[MAP], name) !== void 0;
539
+ }
540
+ /**
541
+ * Delete all header values given name
542
+ *
543
+ * @param String name Header name
544
+ * @return Void
545
+ */
546
+ delete(name) {
547
+ name = `${name}`;
548
+ validateName(name);
549
+ const key = find(this[MAP], name);
550
+ if (key !== void 0) delete this[MAP][key];
551
+ }
552
+ /**
553
+ * Return raw headers (non-spec api)
554
+ *
555
+ * @return Object
556
+ */
557
+ raw() {
558
+ return this[MAP];
559
+ }
560
+ /**
561
+ * Get an iterator on keys.
562
+ *
563
+ * @return Iterator
564
+ */
565
+ keys() {
566
+ return createHeadersIterator(this, "key");
567
+ }
568
+ /**
569
+ * Get an iterator on values.
570
+ *
571
+ * @return Iterator
572
+ */
573
+ values() {
574
+ return createHeadersIterator(this, "value");
575
+ }
576
+ /**
577
+ * Get an iterator on entries.
578
+ *
579
+ * This is the default iterator of the Headers object.
580
+ *
581
+ * @return Iterator
582
+ */
583
+ [Symbol.iterator]() {
584
+ return createHeadersIterator(this, "key+value");
585
+ }
586
+ };
587
+ Headers.prototype.entries = Headers.prototype[Symbol.iterator];
588
+ Object.defineProperty(Headers.prototype, Symbol.toStringTag, {
589
+ value: "Headers",
590
+ writable: false,
591
+ enumerable: false,
592
+ configurable: true
593
+ });
594
+ Object.defineProperties(Headers.prototype, {
595
+ get: { enumerable: true },
596
+ forEach: { enumerable: true },
597
+ set: { enumerable: true },
598
+ append: { enumerable: true },
599
+ has: { enumerable: true },
600
+ delete: { enumerable: true },
601
+ keys: { enumerable: true },
602
+ values: { enumerable: true },
603
+ entries: { enumerable: true }
604
+ });
605
+ function getHeaders(headers) {
606
+ let kind = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "key+value";
607
+ return Object.keys(headers[MAP]).sort().map(kind === "key" ? function(k) {
608
+ return k.toLowerCase();
609
+ } : kind === "value" ? function(k) {
610
+ return headers[MAP][k].join(", ");
611
+ } : function(k) {
612
+ return [k.toLowerCase(), headers[MAP][k].join(", ")];
613
+ });
614
+ }
615
+ const INTERNAL = Symbol("internal");
616
+ function createHeadersIterator(target, kind) {
617
+ const iterator = Object.create(HeadersIteratorPrototype);
618
+ iterator[INTERNAL] = {
619
+ target,
620
+ kind,
621
+ index: 0
622
+ };
623
+ return iterator;
624
+ }
625
+ const HeadersIteratorPrototype = Object.setPrototypeOf({ next() {
626
+ // istanbul ignore if
627
+ if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) throw new TypeError("Value of `this` is not a HeadersIterator");
628
+ var _INTERNAL = this[INTERNAL];
629
+ const target = _INTERNAL.target, kind = _INTERNAL.kind, index = _INTERNAL.index;
630
+ const values = getHeaders(target, kind);
631
+ if (index >= values.length) return {
632
+ value: void 0,
633
+ done: true
634
+ };
635
+ this[INTERNAL].index = index + 1;
636
+ return {
637
+ value: values[index],
638
+ done: false
639
+ };
640
+ } }, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
641
+ Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
642
+ value: "HeadersIterator",
643
+ writable: false,
644
+ enumerable: false,
645
+ configurable: true
646
+ });
647
+ /**
648
+ * Export the Headers object in a form that Node.js can consume.
649
+ *
650
+ * @param Headers headers
651
+ * @return Object
652
+ */
653
+ function exportNodeCompatibleHeaders(headers) {
654
+ const obj = Object.assign({ __proto__: null }, headers[MAP]);
655
+ const hostHeaderKey = find(headers[MAP], "Host");
656
+ if (hostHeaderKey !== void 0) obj[hostHeaderKey] = obj[hostHeaderKey][0];
657
+ return obj;
658
+ }
659
+ /**
660
+ * Create a Headers object from an object of headers, ignoring those that do
661
+ * not conform to HTTP grammar productions.
662
+ *
663
+ * @param Object obj Object of headers
664
+ * @return Headers
665
+ */
666
+ function createHeadersLenient(obj) {
667
+ const headers = new Headers();
668
+ for (const name of Object.keys(obj)) {
669
+ if (invalidTokenRegex.test(name)) continue;
670
+ if (Array.isArray(obj[name])) for (const val of obj[name]) {
671
+ if (invalidHeaderCharRegex.test(val)) continue;
672
+ if (headers[MAP][name] === void 0) headers[MAP][name] = [val];
673
+ else headers[MAP][name].push(val);
674
+ }
675
+ else if (!invalidHeaderCharRegex.test(obj[name])) headers[MAP][name] = [obj[name]];
676
+ }
677
+ return headers;
678
+ }
679
+ const INTERNALS$1 = Symbol("Response internals");
680
+ const STATUS_CODES = http.STATUS_CODES;
681
+ /**
682
+ * Response class
683
+ *
684
+ * @param Stream body Readable stream
685
+ * @param Object opts Response options
686
+ * @return Void
687
+ */
688
+ var Response = class Response {
689
+ constructor() {
690
+ let body = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
691
+ let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
692
+ Body.call(this, body, opts);
693
+ const status = opts.status || 200;
694
+ const headers = new Headers(opts.headers);
695
+ if (body != null && !headers.has("Content-Type")) {
696
+ const contentType = extractContentType(body);
697
+ if (contentType) headers.append("Content-Type", contentType);
698
+ }
699
+ this[INTERNALS$1] = {
700
+ url: opts.url,
701
+ status,
702
+ statusText: opts.statusText || STATUS_CODES[status],
703
+ headers,
704
+ counter: opts.counter
705
+ };
706
+ }
707
+ get url() {
708
+ return this[INTERNALS$1].url || "";
709
+ }
710
+ get status() {
711
+ return this[INTERNALS$1].status;
712
+ }
713
+ /**
714
+ * Convenience property representing if the request ended normally
715
+ */
716
+ get ok() {
717
+ return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;
718
+ }
719
+ get redirected() {
720
+ return this[INTERNALS$1].counter > 0;
721
+ }
722
+ get statusText() {
723
+ return this[INTERNALS$1].statusText;
724
+ }
725
+ get headers() {
726
+ return this[INTERNALS$1].headers;
727
+ }
728
+ /**
729
+ * Clone this response
730
+ *
731
+ * @return Response
732
+ */
733
+ clone() {
734
+ return new Response(clone(this), {
735
+ url: this.url,
736
+ status: this.status,
737
+ statusText: this.statusText,
738
+ headers: this.headers,
739
+ ok: this.ok,
740
+ redirected: this.redirected
741
+ });
742
+ }
743
+ };
744
+ Body.mixIn(Response.prototype);
745
+ Object.defineProperties(Response.prototype, {
746
+ url: { enumerable: true },
747
+ status: { enumerable: true },
748
+ ok: { enumerable: true },
749
+ redirected: { enumerable: true },
750
+ statusText: { enumerable: true },
751
+ headers: { enumerable: true },
752
+ clone: { enumerable: true }
753
+ });
754
+ Object.defineProperty(Response.prototype, Symbol.toStringTag, {
755
+ value: "Response",
756
+ writable: false,
757
+ enumerable: false,
758
+ configurable: true
759
+ });
760
+ const INTERNALS$2 = Symbol("Request internals");
761
+ const URL = Url.URL || whatwgUrl.URL;
762
+ const parse_url = Url.parse;
763
+ const format_url = Url.format;
764
+ /**
765
+ * Wrapper around `new URL` to handle arbitrary URLs
766
+ *
767
+ * @param {string} urlStr
768
+ * @return {void}
769
+ */
770
+ function parseURL(urlStr) {
771
+ if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) urlStr = new URL(urlStr).toString();
772
+ return parse_url(urlStr);
773
+ }
774
+ const streamDestructionSupported = "destroy" in Stream.Readable.prototype;
775
+ /**
776
+ * Check if a value is an instance of Request.
777
+ *
778
+ * @param Mixed input
779
+ * @return Boolean
780
+ */
781
+ function isRequest(input) {
782
+ return typeof input === "object" && typeof input[INTERNALS$2] === "object";
783
+ }
784
+ function isAbortSignal(signal) {
785
+ const proto = signal && typeof signal === "object" && Object.getPrototypeOf(signal);
786
+ return !!(proto && proto.constructor.name === "AbortSignal");
787
+ }
788
+ /**
789
+ * Request class
790
+ *
791
+ * @param Mixed input Url or Request instance
792
+ * @param Object init Custom options
793
+ * @return Void
794
+ */
795
+ var Request = class Request {
796
+ constructor(input) {
797
+ let init = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
798
+ let parsedURL;
799
+ if (!isRequest(input)) {
800
+ if (input && input.href) parsedURL = parseURL(input.href);
801
+ else parsedURL = parseURL(`${input}`);
802
+ input = {};
803
+ } else parsedURL = parseURL(input.url);
804
+ let method = init.method || input.method || "GET";
805
+ method = method.toUpperCase();
806
+ if ((init.body != null || isRequest(input) && input.body !== null) && (method === "GET" || method === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body");
807
+ let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
808
+ Body.call(this, inputBody, {
809
+ timeout: init.timeout || input.timeout || 0,
810
+ size: init.size || input.size || 0
811
+ });
812
+ const headers = new Headers(init.headers || input.headers || {});
813
+ if (inputBody != null && !headers.has("Content-Type")) {
814
+ const contentType = extractContentType(inputBody);
815
+ if (contentType) headers.append("Content-Type", contentType);
816
+ }
817
+ let signal = isRequest(input) ? input.signal : null;
818
+ if ("signal" in init) signal = init.signal;
819
+ if (signal != null && !isAbortSignal(signal)) throw new TypeError("Expected signal to be an instanceof AbortSignal");
820
+ this[INTERNALS$2] = {
821
+ method,
822
+ redirect: init.redirect || input.redirect || "follow",
823
+ headers,
824
+ parsedURL,
825
+ signal
826
+ };
827
+ this.follow = init.follow !== void 0 ? init.follow : input.follow !== void 0 ? input.follow : 20;
828
+ this.compress = init.compress !== void 0 ? init.compress : input.compress !== void 0 ? input.compress : true;
829
+ this.counter = init.counter || input.counter || 0;
830
+ this.agent = init.agent || input.agent;
831
+ }
832
+ get method() {
833
+ return this[INTERNALS$2].method;
834
+ }
835
+ get url() {
836
+ return format_url(this[INTERNALS$2].parsedURL);
837
+ }
838
+ get headers() {
839
+ return this[INTERNALS$2].headers;
840
+ }
841
+ get redirect() {
842
+ return this[INTERNALS$2].redirect;
843
+ }
844
+ get signal() {
845
+ return this[INTERNALS$2].signal;
846
+ }
847
+ /**
848
+ * Clone this request
849
+ *
850
+ * @return Request
851
+ */
852
+ clone() {
853
+ return new Request(this);
854
+ }
855
+ };
856
+ Body.mixIn(Request.prototype);
857
+ Object.defineProperty(Request.prototype, Symbol.toStringTag, {
858
+ value: "Request",
859
+ writable: false,
860
+ enumerable: false,
861
+ configurable: true
862
+ });
863
+ Object.defineProperties(Request.prototype, {
864
+ method: { enumerable: true },
865
+ url: { enumerable: true },
866
+ headers: { enumerable: true },
867
+ redirect: { enumerable: true },
868
+ clone: { enumerable: true },
869
+ signal: { enumerable: true }
870
+ });
871
+ /**
872
+ * Convert a Request to Node.js http request options.
873
+ *
874
+ * @param Request A Request instance
875
+ * @return Object The options object to be passed to http.request
876
+ */
877
+ function getNodeRequestOptions(request) {
878
+ const parsedURL = request[INTERNALS$2].parsedURL;
879
+ const headers = new Headers(request[INTERNALS$2].headers);
880
+ if (!headers.has("Accept")) headers.set("Accept", "*/*");
881
+ if (!parsedURL.protocol || !parsedURL.hostname) throw new TypeError("Only absolute URLs are supported");
882
+ if (!/^https?:$/.test(parsedURL.protocol)) throw new TypeError("Only HTTP(S) protocols are supported");
883
+ if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");
884
+ let contentLengthValue = null;
885
+ if (request.body == null && /^(POST|PUT)$/i.test(request.method)) contentLengthValue = "0";
886
+ if (request.body != null) {
887
+ const totalBytes = getTotalBytes(request);
888
+ if (typeof totalBytes === "number") contentLengthValue = String(totalBytes);
889
+ }
890
+ if (contentLengthValue) headers.set("Content-Length", contentLengthValue);
891
+ if (!headers.has("User-Agent")) headers.set("User-Agent", "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)");
892
+ if (request.compress && !headers.has("Accept-Encoding")) headers.set("Accept-Encoding", "gzip,deflate");
893
+ let agent = request.agent;
894
+ if (typeof agent === "function") agent = agent(parsedURL);
895
+ return Object.assign({}, parsedURL, {
896
+ method: request.method,
897
+ headers: exportNodeCompatibleHeaders(headers),
898
+ agent
899
+ });
900
+ }
901
+ /**
902
+ * abort-error.js
903
+ *
904
+ * AbortError interface for cancelled requests
905
+ */
906
+ /**
907
+ * Create AbortError instance
908
+ *
909
+ * @param String message Error message for human
910
+ * @return AbortError
911
+ */
912
+ function AbortError(message) {
913
+ Error.call(this, message);
914
+ this.type = "aborted";
915
+ this.message = message;
916
+ Error.captureStackTrace(this, this.constructor);
917
+ }
918
+ AbortError.prototype = Object.create(Error.prototype);
919
+ AbortError.prototype.constructor = AbortError;
920
+ AbortError.prototype.name = "AbortError";
921
+ const URL$1 = Url.URL || whatwgUrl.URL;
922
+ const PassThrough$1 = Stream.PassThrough;
923
+ const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {
924
+ const orig = new URL$1(original).hostname;
925
+ const dest = new URL$1(destination).hostname;
926
+ return orig === dest || orig[orig.length - dest.length - 1] === "." && orig.endsWith(dest);
927
+ };
928
+ /**
929
+ * isSameProtocol reports whether the two provided URLs use the same protocol.
930
+ *
931
+ * Both domains must already be in canonical form.
932
+ * @param {string|URL} original
933
+ * @param {string|URL} destination
934
+ */
935
+ const isSameProtocol = function isSameProtocol(destination, original) {
936
+ return new URL$1(original).protocol === new URL$1(destination).protocol;
937
+ };
938
+ /**
939
+ * Fetch function
940
+ *
941
+ * @param Mixed url Absolute url or Request instance
942
+ * @param Object opts Fetch options
943
+ * @return Promise
944
+ */
945
+ function fetch(url, opts) {
946
+ if (!fetch.Promise) throw new Error("native promise missing, set fetch.Promise to your favorite alternative");
947
+ Body.Promise = fetch.Promise;
948
+ return new fetch.Promise(function(resolve, reject) {
949
+ const request = new Request(url, opts);
950
+ const options = getNodeRequestOptions(request);
951
+ const send = (options.protocol === "https:" ? https : http).request;
952
+ const signal = request.signal;
953
+ let response = null;
954
+ const abort = function abort() {
955
+ let error = new AbortError("The user aborted a request.");
956
+ reject(error);
957
+ if (request.body && request.body instanceof Stream.Readable) destroyStream(request.body, error);
958
+ if (!response || !response.body) return;
959
+ response.body.emit("error", error);
960
+ };
961
+ if (signal && signal.aborted) {
962
+ abort();
963
+ return;
964
+ }
965
+ const abortAndFinalize = function abortAndFinalize() {
966
+ abort();
967
+ finalize();
968
+ };
969
+ const req = send(options);
970
+ let reqTimeout;
971
+ if (signal) signal.addEventListener("abort", abortAndFinalize);
972
+ function finalize() {
973
+ req.abort();
974
+ if (signal) signal.removeEventListener("abort", abortAndFinalize);
975
+ clearTimeout(reqTimeout);
976
+ }
977
+ if (request.timeout) req.once("socket", function(socket) {
978
+ reqTimeout = setTimeout(function() {
979
+ reject(new FetchError(`network timeout at: ${request.url}`, "request-timeout"));
980
+ finalize();
981
+ }, request.timeout);
982
+ });
983
+ req.on("error", function(err) {
984
+ reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, "system", err));
985
+ if (response && response.body) destroyStream(response.body, err);
986
+ finalize();
987
+ });
988
+ fixResponseChunkedTransferBadEnding(req, function(err) {
989
+ if (signal && signal.aborted) return;
990
+ if (response && response.body) destroyStream(response.body, err);
991
+ });
992
+ /* c8 ignore next 18 */
993
+ if (parseInt(process.version.substring(1)) < 14) req.on("socket", function(s) {
994
+ s.addListener("close", function(hadError) {
995
+ const hasDataListener = s.listenerCount("data") > 0;
996
+ if (response && hasDataListener && !hadError && !(signal && signal.aborted)) {
997
+ const err = /* @__PURE__ */ new Error("Premature close");
998
+ err.code = "ERR_STREAM_PREMATURE_CLOSE";
999
+ response.body.emit("error", err);
1000
+ }
1001
+ });
1002
+ });
1003
+ req.on("response", function(res) {
1004
+ clearTimeout(reqTimeout);
1005
+ const headers = createHeadersLenient(res.headers);
1006
+ if (fetch.isRedirect(res.statusCode)) {
1007
+ const location = headers.get("Location");
1008
+ let locationURL = null;
1009
+ try {
1010
+ locationURL = location === null ? null : new URL$1(location, request.url).toString();
1011
+ } catch (err) {
1012
+ if (request.redirect !== "manual") {
1013
+ reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, "invalid-redirect"));
1014
+ finalize();
1015
+ return;
1016
+ }
1017
+ }
1018
+ switch (request.redirect) {
1019
+ case "error":
1020
+ reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, "no-redirect"));
1021
+ finalize();
1022
+ return;
1023
+ case "manual":
1024
+ if (locationURL !== null) try {
1025
+ headers.set("Location", locationURL);
1026
+ } catch (err) {
1027
+ // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request
1028
+ reject(err);
1029
+ }
1030
+ break;
1031
+ case "follow":
1032
+ if (locationURL === null) break;
1033
+ if (request.counter >= request.follow) {
1034
+ reject(new FetchError(`maximum redirect reached at: ${request.url}`, "max-redirect"));
1035
+ finalize();
1036
+ return;
1037
+ }
1038
+ const requestOpts = {
1039
+ headers: new Headers(request.headers),
1040
+ follow: request.follow,
1041
+ counter: request.counter + 1,
1042
+ agent: request.agent,
1043
+ compress: request.compress,
1044
+ method: request.method,
1045
+ body: request.body,
1046
+ signal: request.signal,
1047
+ timeout: request.timeout,
1048
+ size: request.size
1049
+ };
1050
+ if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) for (const name of [
1051
+ "authorization",
1052
+ "www-authenticate",
1053
+ "cookie",
1054
+ "cookie2"
1055
+ ]) requestOpts.headers.delete(name);
1056
+ if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
1057
+ reject(new FetchError("Cannot follow redirect with body being a readable stream", "unsupported-redirect"));
1058
+ finalize();
1059
+ return;
1060
+ }
1061
+ if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === "POST") {
1062
+ requestOpts.method = "GET";
1063
+ requestOpts.body = void 0;
1064
+ requestOpts.headers.delete("content-length");
1065
+ }
1066
+ resolve(fetch(new Request(locationURL, requestOpts)));
1067
+ finalize();
1068
+ return;
1069
+ }
1070
+ }
1071
+ res.once("end", function() {
1072
+ if (signal) signal.removeEventListener("abort", abortAndFinalize);
1073
+ });
1074
+ let body = res.pipe(new PassThrough$1());
1075
+ const response_options = {
1076
+ url: request.url,
1077
+ status: res.statusCode,
1078
+ statusText: res.statusMessage,
1079
+ headers,
1080
+ size: request.size,
1081
+ timeout: request.timeout,
1082
+ counter: request.counter
1083
+ };
1084
+ const codings = headers.get("Content-Encoding");
1085
+ if (!request.compress || request.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
1086
+ response = new Response(body, response_options);
1087
+ resolve(response);
1088
+ return;
1089
+ }
1090
+ const zlibOptions = {
1091
+ flush: zlib.Z_SYNC_FLUSH,
1092
+ finishFlush: zlib.Z_SYNC_FLUSH
1093
+ };
1094
+ if (codings == "gzip" || codings == "x-gzip") {
1095
+ body = body.pipe(zlib.createGunzip(zlibOptions));
1096
+ response = new Response(body, response_options);
1097
+ resolve(response);
1098
+ return;
1099
+ }
1100
+ if (codings == "deflate" || codings == "x-deflate") {
1101
+ const raw = res.pipe(new PassThrough$1());
1102
+ raw.once("data", function(chunk) {
1103
+ if ((chunk[0] & 15) === 8) body = body.pipe(zlib.createInflate());
1104
+ else body = body.pipe(zlib.createInflateRaw());
1105
+ response = new Response(body, response_options);
1106
+ resolve(response);
1107
+ });
1108
+ raw.on("end", function() {
1109
+ if (!response) {
1110
+ response = new Response(body, response_options);
1111
+ resolve(response);
1112
+ }
1113
+ });
1114
+ return;
1115
+ }
1116
+ if (codings == "br" && typeof zlib.createBrotliDecompress === "function") {
1117
+ body = body.pipe(zlib.createBrotliDecompress());
1118
+ response = new Response(body, response_options);
1119
+ resolve(response);
1120
+ return;
1121
+ }
1122
+ response = new Response(body, response_options);
1123
+ resolve(response);
1124
+ });
1125
+ writeToStream(req, request);
1126
+ });
1127
+ }
1128
+ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
1129
+ let socket;
1130
+ request.on("socket", function(s) {
1131
+ socket = s;
1132
+ });
1133
+ request.on("response", function(response) {
1134
+ const headers = response.headers;
1135
+ if (headers["transfer-encoding"] === "chunked" && !headers["content-length"]) response.once("close", function(hadError) {
1136
+ if (socket && socket.listenerCount("data") > 0 && !hadError) {
1137
+ const err = /* @__PURE__ */ new Error("Premature close");
1138
+ err.code = "ERR_STREAM_PREMATURE_CLOSE";
1139
+ errorCallback(err);
1140
+ }
1141
+ });
1142
+ });
1143
+ }
1144
+ function destroyStream(stream, err) {
1145
+ if (stream.destroy) stream.destroy(err);
1146
+ else {
1147
+ stream.emit("error", err);
1148
+ stream.end();
1149
+ }
1150
+ }
1151
+ /**
1152
+ * Redirect code matching
1153
+ *
1154
+ * @param Number code Status code
1155
+ * @return Boolean
1156
+ */
1157
+ fetch.isRedirect = function(code) {
1158
+ return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
1159
+ };
1160
+ fetch.Promise = global.Promise;
1161
+ module.exports = exports = fetch;
1162
+ Object.defineProperty(exports, "__esModule", { value: true });
1163
+ exports.default = exports;
1164
+ exports.Headers = Headers;
1165
+ exports.Request = Request;
1166
+ exports.Response = Response;
1167
+ exports.FetchError = FetchError;
1168
+ exports.AbortError = AbortError;
1169
+ }));
1170
+
1171
+ //#endregion
1172
+ export default require_lib();
1173
+
1174
+ export { require_lib };