@hiiretail/gcp-infra-generators 1.1.0 → 1.1.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 (39) hide show
  1. package/dist/node_modules/.package-lock.json +12 -13
  2. package/dist/node_modules/axios/CHANGELOG.md +35 -0
  3. package/dist/node_modules/axios/README.md +13 -10
  4. package/dist/node_modules/axios/dist/axios.js +358 -289
  5. package/dist/node_modules/axios/dist/axios.js.map +1 -1
  6. package/dist/node_modules/axios/dist/axios.min.js +2 -2
  7. package/dist/node_modules/axios/dist/axios.min.js.map +1 -1
  8. package/dist/node_modules/axios/dist/browser/axios.cjs +286 -211
  9. package/dist/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  10. package/dist/node_modules/axios/dist/esm/axios.js +286 -211
  11. package/dist/node_modules/axios/dist/esm/axios.js.map +1 -1
  12. package/dist/node_modules/axios/dist/esm/axios.min.js +2 -2
  13. package/dist/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  14. package/dist/node_modules/axios/dist/node/axios.cjs +377 -211
  15. package/dist/node_modules/axios/dist/node/axios.cjs.map +1 -1
  16. package/dist/node_modules/axios/index.d.cts +9 -5
  17. package/dist/node_modules/axios/index.d.ts +10 -4
  18. package/dist/node_modules/axios/lib/adapters/adapters.js +6 -4
  19. package/dist/node_modules/axios/lib/adapters/fetch.js +220 -163
  20. package/dist/node_modules/axios/lib/adapters/http.js +18 -0
  21. package/dist/node_modules/axios/lib/adapters/xhr.js +11 -8
  22. package/dist/node_modules/axios/lib/core/AxiosError.js +10 -3
  23. package/dist/node_modules/axios/lib/core/dispatchRequest.js +1 -1
  24. package/dist/node_modules/axios/lib/defaults/index.js +1 -1
  25. package/dist/node_modules/axios/lib/env/data.js +1 -1
  26. package/dist/node_modules/axios/lib/helpers/buildURL.js +1 -3
  27. package/dist/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +73 -0
  28. package/dist/node_modules/axios/lib/helpers/resolveConfig.js +13 -9
  29. package/dist/node_modules/axios/lib/utils.js +7 -3
  30. package/dist/node_modules/axios/package.json +12 -9
  31. package/dist/node_modules/js-yaml/README.md +9 -8
  32. package/dist/node_modules/js-yaml/dist/js-yaml.js +22 -16
  33. package/dist/node_modules/js-yaml/dist/js-yaml.min.js +2 -2
  34. package/dist/node_modules/js-yaml/dist/js-yaml.mjs +20 -15
  35. package/dist/node_modules/js-yaml/lib/loader.js +18 -12
  36. package/dist/node_modules/js-yaml/package.json +1 -1
  37. package/dist/package.json +3 -3
  38. package/package.json +3 -3
  39. package/dist/node_modules/js-yaml/CHANGELOG.md +0 -616
@@ -89,11 +89,18 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
89
89
  return prop !== 'isAxiosError';
90
90
  });
91
91
 
92
- AxiosError.call(axiosError, error.message, code, config, request, response);
92
+ const msg = error && error.message ? error.message : 'Error';
93
93
 
94
- axiosError.cause = error;
94
+ // Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
95
+ const errCode = code == null && error ? error.code : code;
96
+ AxiosError.call(axiosError, msg, errCode, config, request, response);
95
97
 
96
- axiosError.name = error.name;
98
+ // Chain the original error on the standard field; non-enumerable to avoid JSON noise
99
+ if (error && axiosError.cause == null) {
100
+ Object.defineProperty(axiosError, 'cause', { value: error, configurable: true });
101
+ }
102
+
103
+ axiosError.name = (error && error.name) || 'Error';
97
104
 
98
105
  customProps && Object.assign(axiosError, customProps);
99
106
 
@@ -46,7 +46,7 @@ export default function dispatchRequest(config) {
46
46
  config.headers.setContentType('application/x-www-form-urlencoded', false);
47
47
  }
48
48
 
49
- const adapter = adapters.getAdapter(config.adapter || defaults.adapter);
49
+ const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
50
50
 
51
51
  return adapter(config).then(function onAdapterResolution(response) {
52
52
  throwIfCancellationRequested(config);
@@ -111,7 +111,7 @@ const defaults = {
111
111
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
112
112
 
113
113
  try {
114
- return JSON.parse(data);
114
+ return JSON.parse(data, this.parseReviver);
115
115
  } catch (e) {
116
116
  if (strictJSONParsing) {
117
117
  if (e.name === 'SyntaxError') {
@@ -1 +1 @@
1
- export const VERSION = "1.11.0";
1
+ export const VERSION = "1.12.0";
@@ -16,9 +16,7 @@ function encode(val) {
16
16
  replace(/%3A/gi, ':').
17
17
  replace(/%24/g, '$').
18
18
  replace(/%2C/gi, ',').
19
- replace(/%20/g, '+').
20
- replace(/%5B/gi, '[').
21
- replace(/%5D/gi, ']');
19
+ replace(/%20/g, '+');
22
20
  }
23
21
 
24
22
  /**
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Estimate decoded byte length of a data:// URL *without* allocating large buffers.
3
+ * - For base64: compute exact decoded size using length and padding;
4
+ * handle %XX at the character-count level (no string allocation).
5
+ * - For non-base64: use UTF-8 byteLength of the encoded body as a safe upper bound.
6
+ *
7
+ * @param {string} url
8
+ * @returns {number}
9
+ */
10
+ export default function estimateDataURLDecodedBytes(url) {
11
+ if (!url || typeof url !== 'string') return 0;
12
+ if (!url.startsWith('data:')) return 0;
13
+
14
+ const comma = url.indexOf(',');
15
+ if (comma < 0) return 0;
16
+
17
+ const meta = url.slice(5, comma);
18
+ const body = url.slice(comma + 1);
19
+ const isBase64 = /;base64/i.test(meta);
20
+
21
+ if (isBase64) {
22
+ let effectiveLen = body.length;
23
+ const len = body.length; // cache length
24
+
25
+ for (let i = 0; i < len; i++) {
26
+ if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {
27
+ const a = body.charCodeAt(i + 1);
28
+ const b = body.charCodeAt(i + 2);
29
+ const isHex =
30
+ ((a >= 48 && a <= 57) || (a >= 65 && a <= 70) || (a >= 97 && a <= 102)) &&
31
+ ((b >= 48 && b <= 57) || (b >= 65 && b <= 70) || (b >= 97 && b <= 102));
32
+
33
+ if (isHex) {
34
+ effectiveLen -= 2;
35
+ i += 2;
36
+ }
37
+ }
38
+ }
39
+
40
+ let pad = 0;
41
+ let idx = len - 1;
42
+
43
+ const tailIsPct3D = (j) =>
44
+ j >= 2 &&
45
+ body.charCodeAt(j - 2) === 37 && // '%'
46
+ body.charCodeAt(j - 1) === 51 && // '3'
47
+ (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); // 'D' or 'd'
48
+
49
+ if (idx >= 0) {
50
+ if (body.charCodeAt(idx) === 61 /* '=' */) {
51
+ pad++;
52
+ idx--;
53
+ } else if (tailIsPct3D(idx)) {
54
+ pad++;
55
+ idx -= 3;
56
+ }
57
+ }
58
+
59
+ if (pad === 1 && idx >= 0) {
60
+ if (body.charCodeAt(idx) === 61 /* '=' */) {
61
+ pad++;
62
+ } else if (tailIsPct3D(idx)) {
63
+ pad++;
64
+ }
65
+ }
66
+
67
+ const groups = Math.floor(effectiveLen / 4);
68
+ const bytes = groups * 3 - (pad || 0);
69
+ return bytes > 0 ? bytes : 0;
70
+ }
71
+
72
+ return Buffer.byteLength(body, 'utf8');
73
+ }
@@ -10,7 +10,7 @@ import buildURL from "./buildURL.js";
10
10
  export default (config) => {
11
11
  const newConfig = mergeConfig({}, config);
12
12
 
13
- let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
13
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
14
14
 
15
15
  newConfig.headers = headers = AxiosHeaders.from(headers);
16
16
 
@@ -23,17 +23,21 @@ export default (config) => {
23
23
  );
24
24
  }
25
25
 
26
- let contentType;
27
-
28
26
  if (utils.isFormData(data)) {
29
27
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
30
- headers.setContentType(undefined); // Let the browser set it
31
- } else if ((contentType = headers.getContentType()) !== false) {
32
- // fix semicolon duplication issue for ReactNative FormData implementation
33
- const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
34
- headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
28
+ headers.setContentType(undefined); // browser handles it
29
+ } else if (utils.isFunction(data.getHeaders)) {
30
+ // Node.js FormData (like form-data package)
31
+ const formHeaders = data.getHeaders();
32
+ // Only set safe headers to avoid overwriting security headers
33
+ const allowedHeaders = ['content-type', 'content-length'];
34
+ Object.entries(formHeaders).forEach(([key, val]) => {
35
+ if (allowedHeaders.includes(key.toLowerCase())) {
36
+ headers.set(key, val);
37
+ }
38
+ });
35
39
  }
36
- }
40
+ }
37
41
 
38
42
  // Add xsrf header
39
43
  // This is only done if running in a standard browser environment.
@@ -148,7 +148,7 @@ const isEmptyObject = (val) => {
148
148
  if (!isObject(val) || isBuffer(val)) {
149
149
  return false;
150
150
  }
151
-
151
+
152
152
  try {
153
153
  return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
154
154
  } catch (e) {
@@ -341,7 +341,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
341
341
  * @returns {Object} Result of all merge properties
342
342
  */
343
343
  function merge(/* obj1, obj2, obj3, ... */) {
344
- const {caseless} = isContextDefined(this) && this || {};
344
+ const {caseless, skipUndefined} = isContextDefined(this) && this || {};
345
345
  const result = {};
346
346
  const assignValue = (val, key) => {
347
347
  const targetKey = caseless && findKey(result, key) || key;
@@ -352,7 +352,9 @@ function merge(/* obj1, obj2, obj3, ... */) {
352
352
  } else if (isArray(val)) {
353
353
  result[targetKey] = val.slice();
354
354
  } else {
355
- result[targetKey] = val;
355
+ if (!skipUndefined || !isUndefined(val)) {
356
+ result[targetKey] = val;
357
+ }
356
358
  }
357
359
  }
358
360
 
@@ -633,6 +635,8 @@ const toFiniteNumber = (value, defaultValue) => {
633
635
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
634
636
  }
635
637
 
638
+
639
+
636
640
  /**
637
641
  * If the thing is a FormData object, return true, otherwise return false.
638
642
  *
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axios",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "description": "Promise based HTTP client for the browser and node.js",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -33,7 +33,9 @@
33
33
  "./unsafe/adapters/http.js": "./lib/adapters/http.js",
34
34
  "./unsafe/adapters/xhr.js": "./lib/adapters/xhr.js",
35
35
  "./unsafe/utils.js": "./lib/utils.js",
36
- "./package.json": "./package.json"
36
+ "./package.json": "./package.json",
37
+ "./dist/browser/axios.cjs": "./dist/browser/axios.cjs",
38
+ "./dist/node/axios.cjs": "./dist/node/axios.cjs"
37
39
  },
38
40
  "type": "module",
39
41
  "types": "index.d.ts",
@@ -49,7 +51,7 @@
49
51
  "test:build:version": "node ./bin/check-build-version.js",
50
52
  "start": "node ./sandbox/server.js",
51
53
  "preversion": "gulp version",
52
- "version": "npm run build && git add dist && git add package.json",
54
+ "version": "npm run build && git add package.json",
53
55
  "prepublishOnly": "npm run test:build:version",
54
56
  "postpublish": "git push && git push --tags",
55
57
  "build": "gulp clear && cross-env NODE_ENV=production rollup -c -m",
@@ -89,6 +91,7 @@
89
91
  "@commitlint/cli": "^17.8.1",
90
92
  "@commitlint/config-conventional": "^17.8.1",
91
93
  "@release-it/conventional-changelog": "^5.1.1",
94
+ "@rollup/plugin-alias": "^5.1.0",
92
95
  "@rollup/plugin-babel": "^5.3.1",
93
96
  "@rollup/plugin-commonjs": "^15.1.0",
94
97
  "@rollup/plugin-json": "^4.1.0",
@@ -110,7 +113,6 @@
110
113
  "fs-extra": "^10.1.0",
111
114
  "get-stream": "^3.0.0",
112
115
  "gulp": "^4.0.2",
113
- "gzip-size": "^7.0.0",
114
116
  "handlebars": "^4.7.8",
115
117
  "husky": "^8.0.3",
116
118
  "istanbul-instrumenter-loader": "^3.0.1",
@@ -129,6 +131,7 @@
129
131
  "minimist": "^1.2.8",
130
132
  "mocha": "^10.3.0",
131
133
  "multer": "^1.4.4",
134
+ "pacote": "^20.0.0",
132
135
  "pretty-bytes": "^6.1.1",
133
136
  "release-it": "^15.11.0",
134
137
  "rollup": "^2.79.1",
@@ -138,9 +141,9 @@
138
141
  "sinon": "^4.5.0",
139
142
  "stream-throttle": "^0.1.3",
140
143
  "string-replace-async": "^3.0.2",
144
+ "tar-stream": "^3.1.7",
141
145
  "terser-webpack-plugin": "^4.2.3",
142
- "typescript": "^4.9.5",
143
- "@rollup/plugin-alias": "^5.1.0"
146
+ "typescript": "^4.9.5"
144
147
  },
145
148
  "browser": {
146
149
  "./lib/adapters/http.js": "./lib/helpers/null.js",
@@ -178,7 +181,7 @@
178
181
  "Xianming Zhong (https://github.com/chinesedfan)",
179
182
  "Remco Haszing (https://github.com/remcohaszing)",
180
183
  "Rikki Gibson (https://github.com/RikkiGibson)",
181
- "Ben Carp (https://github.com/carpben)",
184
+ "Willian Agostini (https://github.com/WillianAgostini)",
182
185
  "Yasu Flores (https://github.com/yasuf)"
183
186
  ],
184
187
  "sideEffects": false,
@@ -208,8 +211,8 @@
208
211
  },
209
212
  "hooks": {
210
213
  "before:init": "npm test",
211
- "after:bump": "gulp version --bump ${version} && npm run build && npm run test:build:version && git add ./dist && git add ./package-lock.json",
212
- "before:release": "npm run release:changelog:fix",
214
+ "after:bump": "gulp version --bump ${version} && npm run build && npm run test:build:version",
215
+ "before:release": "npm run release:changelog:fix && git add ./package-lock.json",
213
216
  "after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
214
217
  }
215
218
  },
@@ -4,11 +4,11 @@ JS-YAML - YAML 1.2 parser / writer for JavaScript
4
4
  [![CI](https://github.com/nodeca/js-yaml/workflows/CI/badge.svg?branch=master)](https://github.com/nodeca/js-yaml/actions)
5
5
  [![NPM version](https://img.shields.io/npm/v/js-yaml.svg)](https://www.npmjs.org/package/js-yaml)
6
6
 
7
- __[Online Demo](http://nodeca.github.com/js-yaml/)__
7
+ __[Online Demo](https://nodeca.github.io/js-yaml/)__
8
8
 
9
9
 
10
- This is an implementation of [YAML](http://yaml.org/), a human-friendly data
11
- serialization language. Started as [PyYAML](http://pyyaml.org/) port, it was
10
+ This is an implementation of [YAML](https://yaml.org/), a human-friendly data
11
+ serialization language. Started as [PyYAML](https://pyyaml.org/) port, it was
12
12
  completely rewritten from scratch. Now it's very fast, and supports 1.2 spec.
13
13
 
14
14
 
@@ -81,11 +81,11 @@ options:
81
81
  Loader will call this function with an instance of `YAMLException` for each warning.
82
82
  - `schema` _(default: `DEFAULT_SCHEMA`)_ - specifies a schema to use.
83
83
  - `FAILSAFE_SCHEMA` - only strings, arrays and plain objects:
84
- http://www.yaml.org/spec/1.2/spec.html#id2802346
84
+ https://www.yaml.org/spec/1.2/spec.html#id2802346
85
85
  - `JSON_SCHEMA` - all JSON-supported types:
86
- http://www.yaml.org/spec/1.2/spec.html#id2803231
86
+ https://www.yaml.org/spec/1.2/spec.html#id2803231
87
87
  - `CORE_SCHEMA` - same as `JSON_SCHEMA`:
88
- http://www.yaml.org/spec/1.2/spec.html#id2804923
88
+ https://www.yaml.org/spec/1.2/spec.html#id2804923
89
89
  - `DEFAULT_SCHEMA` - all supported YAML types.
90
90
  - `json` _(default: false)_ - compatibility with JSON.parse behaviour. If true, then duplicate keys in a mapping will override values rather than throwing an error.
91
91
 
@@ -149,6 +149,7 @@ output is shown on the right side after `=>` (default setting) or `->`:
149
149
  "lowercase" => "null"
150
150
  "uppercase" -> "NULL"
151
151
  "camelcase" -> "Null"
152
+ "empty" -> ""
152
153
 
153
154
  !!int
154
155
  "binary" -> "0b1", "0b101010", "0b1110001111010"
@@ -182,8 +183,8 @@ Supported YAML types
182
183
  --------------------
183
184
 
184
185
  The list of standard YAML tags and corresponding JavaScript types. See also
185
- [YAML tag discussion](http://pyyaml.org/wiki/YAMLTagDiscussion) and
186
- [YAML types repository](http://yaml.org/type/).
186
+ [YAML tag discussion](https://pyyaml.org/wiki/YAMLTagDiscussion) and
187
+ [YAML types repository](https://yaml.org/type/).
187
188
 
188
189
  ```
189
190
  !!null '' # null
@@ -1,10 +1,10 @@
1
1
 
2
- /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
2
+ /*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
5
5
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
6
6
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jsyaml = {}));
7
- }(this, (function (exports) { 'use strict';
7
+ })(this, (function (exports) { 'use strict';
8
8
 
9
9
  function isNothing(subject) {
10
10
  return (typeof subject === 'undefined') || (subject === null);
@@ -1216,6 +1216,22 @@
1216
1216
  );
1217
1217
  }
1218
1218
 
1219
+ // set a property of a literal object, while protecting against prototype pollution,
1220
+ // see https://github.com/nodeca/js-yaml/issues/164 for more details
1221
+ function setProperty(object, key, value) {
1222
+ // used for this specific key only because Object.defineProperty is slow
1223
+ if (key === '__proto__') {
1224
+ Object.defineProperty(object, key, {
1225
+ configurable: true,
1226
+ enumerable: true,
1227
+ writable: true,
1228
+ value: value
1229
+ });
1230
+ } else {
1231
+ object[key] = value;
1232
+ }
1233
+ }
1234
+
1219
1235
  var simpleEscapeCheck = new Array(256); // integer, for fast access
1220
1236
  var simpleEscapeMap = new Array(256);
1221
1237
  for (var i = 0; i < 256; i++) {
@@ -1394,7 +1410,7 @@
1394
1410
  key = sourceKeys[index];
1395
1411
 
1396
1412
  if (!_hasOwnProperty$1.call(destination, key)) {
1397
- destination[key] = source[key];
1413
+ setProperty(destination, key, source[key]);
1398
1414
  overridableKeys[key] = true;
1399
1415
  }
1400
1416
  }
@@ -1454,17 +1470,7 @@
1454
1470
  throwError(state, 'duplicated mapping key');
1455
1471
  }
1456
1472
 
1457
- // used for this specific key only because Object.defineProperty is slow
1458
- if (keyNode === '__proto__') {
1459
- Object.defineProperty(_result, keyNode, {
1460
- configurable: true,
1461
- enumerable: true,
1462
- writable: true,
1463
- value: valueNode
1464
- });
1465
- } else {
1466
- _result[keyNode] = valueNode;
1467
- }
1473
+ setProperty(_result, keyNode, valueNode);
1468
1474
  delete overridableKeys[keyNode];
1469
1475
  }
1470
1476
 
@@ -3860,7 +3866,7 @@
3860
3866
  exports.Schema = Schema;
3861
3867
  exports.Type = Type;
3862
3868
  exports.YAMLException = YAMLException;
3863
- exports.default = jsYaml;
3869
+ exports["default"] = jsYaml;
3864
3870
  exports.dump = dump;
3865
3871
  exports.load = load;
3866
3872
  exports.loadAll = loadAll;
@@ -3871,4 +3877,4 @@
3871
3877
 
3872
3878
  Object.defineProperty(exports, '__esModule', { value: true });
3873
3879
 
3874
- })));
3880
+ }));