@driveflux/fetch 8.0.0 → 8.0.2

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 (2) hide show
  1. package/dist/index.js +31 -13
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -41,6 +41,7 @@ function _define_property(obj, key, value) {
41
41
  return obj;
42
42
  }
43
43
  function _instanceof(left, right) {
44
+ "@swc/helpers - instanceof";
44
45
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
45
46
  return !!right[Symbol.hasInstance](left);
46
47
  } else {
@@ -88,12 +89,22 @@ function _object_spread_props(target, source) {
88
89
  }
89
90
  function _object_without_properties(source, excluded) {
90
91
  if (source == null) return {};
91
- var target = _object_without_properties_loose(source, excluded);
92
- var key, i;
92
+ var target = {}, sourceKeys, key, i;
93
+ if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
94
+ sourceKeys = Reflect.ownKeys(Object(source));
95
+ for(i = 0; i < sourceKeys.length; i++){
96
+ key = sourceKeys[i];
97
+ if (excluded.indexOf(key) >= 0) continue;
98
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
99
+ target[key] = source[key];
100
+ }
101
+ return target;
102
+ }
103
+ target = _object_without_properties_loose(source, excluded);
93
104
  if (Object.getOwnPropertySymbols) {
94
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
95
- for(i = 0; i < sourceSymbolKeys.length; i++){
96
- key = sourceSymbolKeys[i];
105
+ sourceKeys = Object.getOwnPropertySymbols(source);
106
+ for(i = 0; i < sourceKeys.length; i++){
107
+ key = sourceKeys[i];
97
108
  if (excluded.indexOf(key) >= 0) continue;
98
109
  if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
99
110
  target[key] = source[key];
@@ -103,12 +114,11 @@ function _object_without_properties(source, excluded) {
103
114
  }
104
115
  function _object_without_properties_loose(source, excluded) {
105
116
  if (source == null) return {};
106
- var target = {};
107
- var sourceKeys = Object.keys(source);
108
- var key, i;
117
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
109
118
  for(i = 0; i < sourceKeys.length; i++){
110
119
  key = sourceKeys[i];
111
120
  if (excluded.indexOf(key) >= 0) continue;
121
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
112
122
  target[key] = source[key];
113
123
  }
114
124
  return target;
@@ -122,9 +132,17 @@ function _ts_generator(thisArg, body) {
122
132
  },
123
133
  trys: [],
124
134
  ops: []
125
- }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
126
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
127
- return this;
135
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
136
+ return d(g, "next", {
137
+ value: verb(0)
138
+ }), d(g, "throw", {
139
+ value: verb(1)
140
+ }), d(g, "return", {
141
+ value: verb(2)
142
+ }), typeof Symbol === "function" && d(g, Symbol.iterator, {
143
+ value: function() {
144
+ return this;
145
+ }
128
146
  }), g;
129
147
  function verb(n) {
130
148
  return function(v) {
@@ -212,7 +230,7 @@ import { Err, Ok } from '@driveflux/result';
212
230
  * @param response A response from a network request
213
231
  *
214
232
  * @return Returns either the response, or throws an error
215
- */ var isSuccessful = function(response) {
233
+ */ var isSuccessful = function isSuccessful(response) {
216
234
  return response.status >= 200 && response.status < 300;
217
235
  };
218
236
  /**
@@ -222,7 +240,7 @@ import { Err, Ok } from '@driveflux/result';
222
240
  * @param [options] The options we want to pass to "fetch"
223
241
  *
224
242
  * @return The response data
225
- */ export var enhancedFetch = function(url, providedOptions) {
243
+ */ export var enhancedFetch = function enhancedFetch(url, providedOptions) {
226
244
  return _async_to_generator(function() {
227
245
  var _ref, body, rest, options, finalBody, response, e, metadata, responseBody, textBody, _e;
228
246
  return _ts_generator(this, function(_state) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@driveflux/fetch",
3
- "version": "8.0.0",
3
+ "version": "8.0.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./package.json": "./package.json",
@@ -13,15 +13,15 @@
13
13
  "dist"
14
14
  ],
15
15
  "dependencies": {
16
- "@driveflux/problem": "6.0.0",
17
- "@driveflux/result": "6.0.0"
16
+ "@driveflux/problem": "6.0.2",
17
+ "@driveflux/result": "6.0.2"
18
18
  },
19
19
  "devDependencies": {
20
- "@driveflux/fab": "4.0.0",
21
- "@driveflux/tsconfig": "3.0.0",
22
- "@types/node": "^24.9.1",
20
+ "@driveflux/fab": "4.0.1",
21
+ "@driveflux/tsconfig": "3.0.1",
22
+ "@types/node": "^25.7.0",
23
23
  "del-cli": "^7.0.0",
24
- "typescript": "^5.9.3"
24
+ "typescript": "^6.0.3"
25
25
  },
26
26
  "scripts": {
27
27
  "build": "fab",