@jjrawlins/cdk-iam-policy-builder-helper 0.0.27 → 0.0.29

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.
@@ -12,9 +12,9 @@ const DEFAULT_CHUNK_SIZE = 64 * 1024;
12
12
 
13
13
  const {isFunction} = utils;
14
14
 
15
- const globalFetchAPI = (({fetch, Request, Response}) => ({
16
- fetch, Request, Response
17
- }))(utils.global);
15
+ const globalFetchAPI = (({Request, Response}) => ({
16
+ Request, Response
17
+ }))(utils.global);
18
18
 
19
19
  const {
20
20
  ReadableStream, TextEncoder
@@ -30,8 +30,12 @@ const test = (fn, ...args) => {
30
30
  }
31
31
 
32
32
  const factory = (env) => {
33
- const {fetch, Request, Response} = Object.assign({}, globalFetchAPI, env);
34
- const isFetchSupported = isFunction(fetch);
33
+ env = utils.merge.call({
34
+ skipUndefined: true
35
+ }, globalFetchAPI, env);
36
+
37
+ const {fetch: envFetch, Request, Response} = env;
38
+ const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
35
39
  const isRequestSupported = isFunction(Request);
36
40
  const isResponseSupported = isFunction(Response);
37
41
 
@@ -134,6 +138,8 @@ const factory = (env) => {
134
138
  fetchOptions
135
139
  } = resolveConfig(config);
136
140
 
141
+ let _fetch = envFetch || fetch;
142
+
137
143
  responseType = responseType ? (responseType + '').toLowerCase() : 'text';
138
144
 
139
145
  let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
@@ -193,7 +199,7 @@ const factory = (env) => {
193
199
 
194
200
  request = isRequestSupported && new Request(url, resolvedOptions);
195
201
 
196
- let response = await (isRequestSupported ? fetch(request, fetchOptions) : fetch(url, resolvedOptions));
202
+ let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
197
203
 
198
204
  const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
199
205
 
@@ -256,12 +262,8 @@ const factory = (env) => {
256
262
  const seedCache = new Map();
257
263
 
258
264
  export const getFetch = (config) => {
259
- let env = utils.merge.call({
260
- skipUndefined: true
261
- }, globalFetchAPI, config ? config.env : null);
262
-
265
+ let env = config ? config.env : {};
263
266
  const {fetch, Request, Response} = env;
264
-
265
267
  const seeds = [
266
268
  Request, Response, fetch
267
269
  ];
@@ -170,8 +170,6 @@ class Axios {
170
170
 
171
171
  let newConfig = config;
172
172
 
173
- i = 0;
174
-
175
173
  while (i < len) {
176
174
  const onFulfilled = requestInterceptorChain[i++];
177
175
  const onRejected = requestInterceptorChain[i++];
@@ -1 +1 @@
1
- export const VERSION = "1.12.1";
1
+ export const VERSION = "1.12.2";
@@ -351,10 +351,8 @@ function merge(/* obj1, obj2, obj3, ... */) {
351
351
  result[targetKey] = merge({}, val);
352
352
  } else if (isArray(val)) {
353
353
  result[targetKey] = val.slice();
354
- } else {
355
- if (!skipUndefined || !isUndefined(val)) {
356
- result[targetKey] = val;
357
- }
354
+ } else if (!skipUndefined || !isUndefined(val)) {
355
+ result[targetKey] = val;
358
356
  }
359
357
  }
360
358
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axios",
3
- "version": "1.12.1",
3
+ "version": "1.12.2",
4
4
  "description": "Promise based HTTP client for the browser and node.js",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -40,12 +40,15 @@
40
40
  "type": "module",
41
41
  "types": "index.d.ts",
42
42
  "scripts": {
43
- "test": "npm run test:eslint && npm run test:mocha && npm run test:karma && npm run test:dtslint && npm run test:exports",
43
+ "test": "npm run test:node && npm run test:browser && npm run test:package",
44
+ "test:node": "npm run test:mocha",
45
+ "test:browser": "npm run test:karma",
46
+ "test:package": "npm run test:eslint && npm run test:dtslint && npm run test:exports",
44
47
  "test:eslint": "node bin/ssl_hotfix.js eslint lib/**/*.js",
45
48
  "test:dtslint": "dtslint --localTs node_modules/typescript/lib",
46
49
  "test:mocha": "node bin/ssl_hotfix.js mocha test/unit/**/*.js --timeout 30000 --exit",
47
50
  "test:exports": "node bin/ssl_hotfix.js mocha test/module/test.js --timeout 30000 --exit",
48
- "test:karma": "node bin/ssl_hotfix.js cross-env LISTEN_ADDR=:: karma start karma.conf.cjs --single-run",
51
+ "test:karma": "node ./bin/run-karma-tests.js",
49
52
  "test:karma:firefox": "node bin/ssl_hotfix.js cross-env LISTEN_ADDR=:: Browsers=Firefox karma start karma.conf.cjs --single-run",
50
53
  "test:karma:server": "node bin/ssl_hotfix.js cross-env karma start karma.conf.cjs",
51
54
  "test:build:version": "node ./bin/check-build-version.js",
@@ -171,8 +174,8 @@
171
174
  ],
172
175
  "contributors": [
173
176
  "Matt Zabriskie (https://github.com/mzabriskie)",
174
- "Nick Uraltsev (https://github.com/nickuraltsev)",
175
177
  "Dmitriy Mozgovoy (https://github.com/DigitalBrainJS)",
178
+ "Nick Uraltsev (https://github.com/nickuraltsev)",
176
179
  "Jay (https://github.com/jasonsaayman)",
177
180
  "Emily Morehouse (https://github.com/emilyemorehouse)",
178
181
  "Rubén Norte (https://github.com/rubennorte)",
package/package.json CHANGED
@@ -95,7 +95,7 @@
95
95
  "publishConfig": {
96
96
  "access": "public"
97
97
  },
98
- "version": "0.0.27",
98
+ "version": "0.0.29",
99
99
  "jest": {
100
100
  "coverageProvider": "v8",
101
101
  "testMatch": [