@smartbills/sdk 0.0.2-alpha.21 → 0.0.2-alpha.22

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 (163) hide show
  1. package/dist/@types/services/oauth/OAuthService.d.ts +1 -1
  2. package/dist/@types/services/prices/PriceService.d.ts +2 -2
  3. package/dist/@types/services/product-images/ProductImageService.d.ts +1 -1
  4. package/dist/@types/services/product-variants/ProductVariantService.d.ts +1 -1
  5. package/dist/@types/services/receipts/ReceiptCreateRequest.d.ts +1 -1
  6. package/dist/@types/services/reviews/ReviewService.d.ts +1 -1
  7. package/dist/cjs/_virtual/__polyfill-node.util.cjs +11 -0
  8. package/dist/cjs/_virtual/__polyfill-node.util.cjs.map +1 -0
  9. package/dist/cjs/_virtual/_commonjsHelpers.cjs +37 -0
  10. package/dist/cjs/_virtual/_commonjsHelpers.cjs.map +1 -0
  11. package/dist/cjs/_virtual/_polyfill-node._inherits.cjs +31 -0
  12. package/dist/cjs/_virtual/_polyfill-node._inherits.cjs.map +1 -0
  13. package/dist/cjs/_virtual/_polyfill-node.buffer.cjs +1985 -0
  14. package/dist/cjs/_virtual/_polyfill-node.buffer.cjs.map +1 -0
  15. package/dist/cjs/_virtual/_polyfill-node.global.cjs +10 -0
  16. package/dist/cjs/_virtual/_polyfill-node.global.cjs.map +1 -0
  17. package/dist/cjs/_virtual/_polyfill-node.process.cjs +253 -0
  18. package/dist/cjs/_virtual/_polyfill-node.process.cjs.map +1 -0
  19. package/dist/cjs/_virtual/_polyfill-node.util.cjs +707 -0
  20. package/dist/cjs/_virtual/_polyfill-node.util.cjs.map +1 -0
  21. package/dist/cjs/_virtual/index.cjs +6 -0
  22. package/dist/cjs/_virtual/index.cjs.map +1 -0
  23. package/dist/cjs/node_modules/call-bind/callBound.cjs +18 -0
  24. package/dist/cjs/node_modules/call-bind/callBound.cjs.map +1 -0
  25. package/dist/cjs/node_modules/call-bind/index.cjs +42 -0
  26. package/dist/cjs/node_modules/call-bind/index.cjs.map +1 -0
  27. package/dist/cjs/node_modules/define-data-property/index.cjs +56 -0
  28. package/dist/cjs/node_modules/define-data-property/index.cjs.map +1 -0
  29. package/dist/cjs/node_modules/es-define-property/index.cjs +29 -0
  30. package/dist/cjs/node_modules/es-define-property/index.cjs.map +1 -0
  31. package/dist/cjs/node_modules/es-errors/eval.cjs +7 -0
  32. package/dist/cjs/node_modules/es-errors/eval.cjs.map +1 -0
  33. package/dist/cjs/node_modules/es-errors/index.cjs +7 -0
  34. package/dist/cjs/node_modules/es-errors/index.cjs.map +1 -0
  35. package/dist/cjs/node_modules/es-errors/range.cjs +7 -0
  36. package/dist/cjs/node_modules/es-errors/range.cjs.map +1 -0
  37. package/dist/cjs/node_modules/es-errors/ref.cjs +7 -0
  38. package/dist/cjs/node_modules/es-errors/ref.cjs.map +1 -0
  39. package/dist/cjs/node_modules/es-errors/syntax.cjs +7 -0
  40. package/dist/cjs/node_modules/es-errors/syntax.cjs.map +1 -0
  41. package/dist/cjs/node_modules/es-errors/type.cjs +7 -0
  42. package/dist/cjs/node_modules/es-errors/type.cjs.map +1 -0
  43. package/dist/cjs/node_modules/es-errors/uri.cjs +7 -0
  44. package/dist/cjs/node_modules/es-errors/uri.cjs.map +1 -0
  45. package/dist/cjs/node_modules/function-bind/implementation.cjs +69 -0
  46. package/dist/cjs/node_modules/function-bind/implementation.cjs.map +1 -0
  47. package/dist/cjs/node_modules/function-bind/index.cjs +9 -0
  48. package/dist/cjs/node_modules/function-bind/index.cjs.map +1 -0
  49. package/dist/cjs/node_modules/get-intrinsic/index.cjs +340 -0
  50. package/dist/cjs/node_modules/get-intrinsic/index.cjs.map +1 -0
  51. package/dist/cjs/node_modules/gopd/index.cjs +18 -0
  52. package/dist/cjs/node_modules/gopd/index.cjs.map +1 -0
  53. package/dist/cjs/node_modules/has-property-descriptors/index.cjs +26 -0
  54. package/dist/cjs/node_modules/has-property-descriptors/index.cjs.map +1 -0
  55. package/dist/cjs/node_modules/has-proto/index.cjs +18 -0
  56. package/dist/cjs/node_modules/has-proto/index.cjs.map +1 -0
  57. package/dist/cjs/node_modules/has-symbols/index.cjs +24 -0
  58. package/dist/cjs/node_modules/has-symbols/index.cjs.map +1 -0
  59. package/dist/cjs/node_modules/has-symbols/shams.cjs +60 -0
  60. package/dist/cjs/node_modules/has-symbols/shams.cjs.map +1 -0
  61. package/dist/cjs/node_modules/hasown/index.cjs +13 -0
  62. package/dist/cjs/node_modules/hasown/index.cjs.map +1 -0
  63. package/dist/cjs/node_modules/object-inspect/index.cjs +522 -0
  64. package/dist/cjs/node_modules/object-inspect/index.cjs.map +1 -0
  65. package/dist/cjs/node_modules/object-inspect/util.inspect.cjs +8 -0
  66. package/dist/cjs/node_modules/object-inspect/util.inspect.cjs.map +1 -0
  67. package/dist/cjs/node_modules/qs/lib/formats.cjs +24 -0
  68. package/dist/cjs/node_modules/qs/lib/formats.cjs.map +1 -0
  69. package/dist/cjs/node_modules/qs/lib/index.cjs +21 -0
  70. package/dist/cjs/node_modules/qs/lib/index.cjs.map +1 -0
  71. package/dist/cjs/node_modules/qs/lib/parse.cjs +258 -0
  72. package/dist/cjs/node_modules/qs/lib/parse.cjs.map +1 -0
  73. package/dist/cjs/node_modules/qs/lib/stringify.cjs +250 -0
  74. package/dist/cjs/node_modules/qs/lib/stringify.cjs.map +1 -0
  75. package/dist/cjs/node_modules/qs/lib/utils.cjs +229 -0
  76. package/dist/cjs/node_modules/qs/lib/utils.cjs.map +1 -0
  77. package/dist/cjs/node_modules/set-function-length/index.cjs +47 -0
  78. package/dist/cjs/node_modules/set-function-length/index.cjs.map +1 -0
  79. package/dist/cjs/node_modules/side-channel/index.cjs +145 -0
  80. package/dist/cjs/node_modules/side-channel/index.cjs.map +1 -0
  81. package/dist/cjs/packages/sdk/package.json.cjs +1 -1
  82. package/dist/cjs/services/oauth/OAuthService.cjs +20 -10
  83. package/dist/cjs/services/oauth/OAuthService.cjs.map +1 -1
  84. package/dist/esm/_virtual/__polyfill-node.util.mjs +7 -0
  85. package/dist/esm/_virtual/__polyfill-node.util.mjs.map +1 -0
  86. package/dist/esm/_virtual/_commonjsHelpers.mjs +33 -0
  87. package/dist/esm/_virtual/_commonjsHelpers.mjs.map +1 -0
  88. package/dist/esm/_virtual/_polyfill-node._inherits.mjs +27 -0
  89. package/dist/esm/_virtual/_polyfill-node._inherits.mjs.map +1 -0
  90. package/dist/esm/_virtual/_polyfill-node.buffer.mjs +1981 -0
  91. package/dist/esm/_virtual/_polyfill-node.buffer.mjs.map +1 -0
  92. package/dist/esm/_virtual/_polyfill-node.global.mjs +6 -0
  93. package/dist/esm/_virtual/_polyfill-node.global.mjs.map +1 -0
  94. package/dist/esm/_virtual/_polyfill-node.process.mjs +226 -0
  95. package/dist/esm/_virtual/_polyfill-node.process.mjs.map +1 -0
  96. package/dist/esm/_virtual/_polyfill-node.util.mjs +679 -0
  97. package/dist/esm/_virtual/_polyfill-node.util.mjs.map +1 -0
  98. package/dist/esm/_virtual/index.mjs +4 -0
  99. package/dist/esm/_virtual/index.mjs.map +1 -0
  100. package/dist/esm/node_modules/call-bind/callBound.mjs +16 -0
  101. package/dist/esm/node_modules/call-bind/callBound.mjs.map +1 -0
  102. package/dist/esm/node_modules/call-bind/index.mjs +40 -0
  103. package/dist/esm/node_modules/call-bind/index.mjs.map +1 -0
  104. package/dist/esm/node_modules/define-data-property/index.mjs +54 -0
  105. package/dist/esm/node_modules/define-data-property/index.mjs.map +1 -0
  106. package/dist/esm/node_modules/es-define-property/index.mjs +27 -0
  107. package/dist/esm/node_modules/es-define-property/index.mjs.map +1 -0
  108. package/dist/esm/node_modules/es-errors/eval.mjs +5 -0
  109. package/dist/esm/node_modules/es-errors/eval.mjs.map +1 -0
  110. package/dist/esm/node_modules/es-errors/index.mjs +5 -0
  111. package/dist/esm/node_modules/es-errors/index.mjs.map +1 -0
  112. package/dist/esm/node_modules/es-errors/range.mjs +5 -0
  113. package/dist/esm/node_modules/es-errors/range.mjs.map +1 -0
  114. package/dist/esm/node_modules/es-errors/ref.mjs +5 -0
  115. package/dist/esm/node_modules/es-errors/ref.mjs.map +1 -0
  116. package/dist/esm/node_modules/es-errors/syntax.mjs +5 -0
  117. package/dist/esm/node_modules/es-errors/syntax.mjs.map +1 -0
  118. package/dist/esm/node_modules/es-errors/type.mjs +5 -0
  119. package/dist/esm/node_modules/es-errors/type.mjs.map +1 -0
  120. package/dist/esm/node_modules/es-errors/uri.mjs +5 -0
  121. package/dist/esm/node_modules/es-errors/uri.mjs.map +1 -0
  122. package/dist/esm/node_modules/function-bind/implementation.mjs +67 -0
  123. package/dist/esm/node_modules/function-bind/implementation.mjs.map +1 -0
  124. package/dist/esm/node_modules/function-bind/index.mjs +7 -0
  125. package/dist/esm/node_modules/function-bind/index.mjs.map +1 -0
  126. package/dist/esm/node_modules/get-intrinsic/index.mjs +338 -0
  127. package/dist/esm/node_modules/get-intrinsic/index.mjs.map +1 -0
  128. package/dist/esm/node_modules/gopd/index.mjs +16 -0
  129. package/dist/esm/node_modules/gopd/index.mjs.map +1 -0
  130. package/dist/esm/node_modules/has-property-descriptors/index.mjs +24 -0
  131. package/dist/esm/node_modules/has-property-descriptors/index.mjs.map +1 -0
  132. package/dist/esm/node_modules/has-proto/index.mjs +16 -0
  133. package/dist/esm/node_modules/has-proto/index.mjs.map +1 -0
  134. package/dist/esm/node_modules/has-symbols/index.mjs +22 -0
  135. package/dist/esm/node_modules/has-symbols/index.mjs.map +1 -0
  136. package/dist/esm/node_modules/has-symbols/shams.mjs +58 -0
  137. package/dist/esm/node_modules/has-symbols/shams.mjs.map +1 -0
  138. package/dist/esm/node_modules/hasown/index.mjs +11 -0
  139. package/dist/esm/node_modules/hasown/index.mjs.map +1 -0
  140. package/dist/esm/node_modules/object-inspect/index.mjs +520 -0
  141. package/dist/esm/node_modules/object-inspect/index.mjs.map +1 -0
  142. package/dist/esm/node_modules/object-inspect/util.inspect.mjs +6 -0
  143. package/dist/esm/node_modules/object-inspect/util.inspect.mjs.map +1 -0
  144. package/dist/esm/node_modules/qs/lib/formats.mjs +22 -0
  145. package/dist/esm/node_modules/qs/lib/formats.mjs.map +1 -0
  146. package/dist/esm/node_modules/qs/lib/index.mjs +17 -0
  147. package/dist/esm/node_modules/qs/lib/index.mjs.map +1 -0
  148. package/dist/esm/node_modules/qs/lib/parse.mjs +256 -0
  149. package/dist/esm/node_modules/qs/lib/parse.mjs.map +1 -0
  150. package/dist/esm/node_modules/qs/lib/stringify.mjs +248 -0
  151. package/dist/esm/node_modules/qs/lib/stringify.mjs.map +1 -0
  152. package/dist/esm/node_modules/qs/lib/utils.mjs +227 -0
  153. package/dist/esm/node_modules/qs/lib/utils.mjs.map +1 -0
  154. package/dist/esm/node_modules/set-function-length/index.mjs +45 -0
  155. package/dist/esm/node_modules/set-function-length/index.mjs.map +1 -0
  156. package/dist/esm/node_modules/side-channel/index.mjs +143 -0
  157. package/dist/esm/node_modules/side-channel/index.mjs.map +1 -0
  158. package/dist/esm/packages/sdk/package.json.mjs +1 -1
  159. package/dist/esm/services/oauth/OAuthService.mjs +20 -10
  160. package/dist/esm/services/oauth/OAuthService.mjs.map +1 -1
  161. package/dist/umd/index.js +5072 -13
  162. package/dist/umd/index.js.map +1 -1
  163. package/package.json +2 -2
@@ -0,0 +1,707 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _polyfillNode_global = require('./_polyfill-node.global.cjs');
6
+ var _polyfillNode_buffer = require('./_polyfill-node.buffer.cjs');
7
+ var _polyfillNode_process = require('./_polyfill-node.process.cjs');
8
+ var _polyfillNode__inherits = require('./_polyfill-node._inherits.cjs');
9
+
10
+ var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||
11
+ function getOwnPropertyDescriptors(obj) {
12
+ var keys = Object.keys(obj);
13
+ var descriptors = {};
14
+ for (var i = 0; i < keys.length; i++) {
15
+ descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
16
+ }
17
+ return descriptors;
18
+ };
19
+
20
+ var formatRegExp = /%[sdj%]/g;
21
+ function format(f) {
22
+ if (!isString(f)) {
23
+ var objects = [];
24
+ for (var i = 0; i < arguments.length; i++) {
25
+ objects.push(inspect(arguments[i]));
26
+ }
27
+ return objects.join(' ');
28
+ }
29
+
30
+ var i = 1;
31
+ var args = arguments;
32
+ var len = args.length;
33
+ var str = String(f).replace(formatRegExp, function(x) {
34
+ if (x === '%%') return '%';
35
+ if (i >= len) return x;
36
+ switch (x) {
37
+ case '%s': return String(args[i++]);
38
+ case '%d': return Number(args[i++]);
39
+ case '%j':
40
+ try {
41
+ return JSON.stringify(args[i++]);
42
+ } catch (_) {
43
+ return '[Circular]';
44
+ }
45
+ default:
46
+ return x;
47
+ }
48
+ });
49
+ for (var x = args[i]; i < len; x = args[++i]) {
50
+ if (isNull(x) || !isObject(x)) {
51
+ str += ' ' + x;
52
+ } else {
53
+ str += ' ' + inspect(x);
54
+ }
55
+ }
56
+ return str;
57
+ }
58
+
59
+ // Mark that a method should not be used.
60
+ // Returns a modified function which warns once by default.
61
+ // If --no-deprecation is set, then it is a no-op.
62
+ function deprecate(fn, msg) {
63
+ // Allow for deprecating things in the process of starting up.
64
+ if (isUndefined(_polyfillNode_global.default.process)) {
65
+ return function() {
66
+ return deprecate(fn, msg).apply(this, arguments);
67
+ };
68
+ }
69
+
70
+ if (_polyfillNode_process.default.noDeprecation === true) {
71
+ return fn;
72
+ }
73
+
74
+ var warned = false;
75
+ function deprecated() {
76
+ if (!warned) {
77
+ if (_polyfillNode_process.default.throwDeprecation) {
78
+ throw new Error(msg);
79
+ } else if (_polyfillNode_process.default.traceDeprecation) {
80
+ console.trace(msg);
81
+ } else {
82
+ console.error(msg);
83
+ }
84
+ warned = true;
85
+ }
86
+ return fn.apply(this, arguments);
87
+ }
88
+
89
+ return deprecated;
90
+ }
91
+
92
+ var debugs = {};
93
+ var debugEnviron;
94
+ function debuglog(set) {
95
+ if (isUndefined(debugEnviron))
96
+ debugEnviron = _polyfillNode_process.default.env.NODE_DEBUG || '';
97
+ set = set.toUpperCase();
98
+ if (!debugs[set]) {
99
+ if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
100
+ var pid = 0;
101
+ debugs[set] = function() {
102
+ var msg = format.apply(null, arguments);
103
+ console.error('%s %d: %s', set, pid, msg);
104
+ };
105
+ } else {
106
+ debugs[set] = function() {};
107
+ }
108
+ }
109
+ return debugs[set];
110
+ }
111
+
112
+ /**
113
+ * Echos the value of a value. Trys to print the value out
114
+ * in the best way possible given the different types.
115
+ *
116
+ * @param {Object} obj The object to print out.
117
+ * @param {Object} opts Optional options object that alters the output.
118
+ */
119
+ /* legacy: obj, showHidden, depth, colors*/
120
+ function inspect(obj, opts) {
121
+ // default options
122
+ var ctx = {
123
+ seen: [],
124
+ stylize: stylizeNoColor
125
+ };
126
+ // legacy...
127
+ if (arguments.length >= 3) ctx.depth = arguments[2];
128
+ if (arguments.length >= 4) ctx.colors = arguments[3];
129
+ if (isBoolean(opts)) {
130
+ // legacy...
131
+ ctx.showHidden = opts;
132
+ } else if (opts) {
133
+ // got an "options" object
134
+ _extend(ctx, opts);
135
+ }
136
+ // set default options
137
+ if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
138
+ if (isUndefined(ctx.depth)) ctx.depth = 2;
139
+ if (isUndefined(ctx.colors)) ctx.colors = false;
140
+ if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
141
+ if (ctx.colors) ctx.stylize = stylizeWithColor;
142
+ return formatValue(ctx, obj, ctx.depth);
143
+ }
144
+
145
+ // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
146
+ inspect.colors = {
147
+ 'bold' : [1, 22],
148
+ 'italic' : [3, 23],
149
+ 'underline' : [4, 24],
150
+ 'inverse' : [7, 27],
151
+ 'white' : [37, 39],
152
+ 'grey' : [90, 39],
153
+ 'black' : [30, 39],
154
+ 'blue' : [34, 39],
155
+ 'cyan' : [36, 39],
156
+ 'green' : [32, 39],
157
+ 'magenta' : [35, 39],
158
+ 'red' : [31, 39],
159
+ 'yellow' : [33, 39]
160
+ };
161
+
162
+ // Don't use 'blue' not visible on cmd.exe
163
+ inspect.styles = {
164
+ 'special': 'cyan',
165
+ 'number': 'yellow',
166
+ 'boolean': 'yellow',
167
+ 'undefined': 'grey',
168
+ 'null': 'bold',
169
+ 'string': 'green',
170
+ 'date': 'magenta',
171
+ // "name": intentionally not styling
172
+ 'regexp': 'red'
173
+ };
174
+
175
+
176
+ function stylizeWithColor(str, styleType) {
177
+ var style = inspect.styles[styleType];
178
+
179
+ if (style) {
180
+ return '\u001b[' + inspect.colors[style][0] + 'm' + str +
181
+ '\u001b[' + inspect.colors[style][1] + 'm';
182
+ } else {
183
+ return str;
184
+ }
185
+ }
186
+
187
+
188
+ function stylizeNoColor(str, styleType) {
189
+ return str;
190
+ }
191
+
192
+
193
+ function arrayToHash(array) {
194
+ var hash = {};
195
+
196
+ array.forEach(function(val, idx) {
197
+ hash[val] = true;
198
+ });
199
+
200
+ return hash;
201
+ }
202
+
203
+
204
+ function formatValue(ctx, value, recurseTimes) {
205
+ // Provide a hook for user-specified inspect functions.
206
+ // Check that value is an object with an inspect function on it
207
+ if (ctx.customInspect &&
208
+ value &&
209
+ isFunction(value.inspect) &&
210
+ // Filter out the util module, it's inspect function is special
211
+ value.inspect !== inspect &&
212
+ // Also filter out any prototype objects using the circular check.
213
+ !(value.constructor && value.constructor.prototype === value)) {
214
+ var ret = value.inspect(recurseTimes, ctx);
215
+ if (!isString(ret)) {
216
+ ret = formatValue(ctx, ret, recurseTimes);
217
+ }
218
+ return ret;
219
+ }
220
+
221
+ // Primitive types cannot have properties
222
+ var primitive = formatPrimitive(ctx, value);
223
+ if (primitive) {
224
+ return primitive;
225
+ }
226
+
227
+ // Look up the keys of the object.
228
+ var keys = Object.keys(value);
229
+ var visibleKeys = arrayToHash(keys);
230
+
231
+ if (ctx.showHidden) {
232
+ keys = Object.getOwnPropertyNames(value);
233
+ }
234
+
235
+ // IE doesn't make error fields non-enumerable
236
+ // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
237
+ if (isError(value)
238
+ && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
239
+ return formatError(value);
240
+ }
241
+
242
+ // Some type of object without properties can be shortcutted.
243
+ if (keys.length === 0) {
244
+ if (isFunction(value)) {
245
+ var name = value.name ? ': ' + value.name : '';
246
+ return ctx.stylize('[Function' + name + ']', 'special');
247
+ }
248
+ if (isRegExp(value)) {
249
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
250
+ }
251
+ if (isDate(value)) {
252
+ return ctx.stylize(Date.prototype.toString.call(value), 'date');
253
+ }
254
+ if (isError(value)) {
255
+ return formatError(value);
256
+ }
257
+ }
258
+
259
+ var base = '', array = false, braces = ['{', '}'];
260
+
261
+ // Make Array say that they are Array
262
+ if (isArray(value)) {
263
+ array = true;
264
+ braces = ['[', ']'];
265
+ }
266
+
267
+ // Make functions say that they are functions
268
+ if (isFunction(value)) {
269
+ var n = value.name ? ': ' + value.name : '';
270
+ base = ' [Function' + n + ']';
271
+ }
272
+
273
+ // Make RegExps say that they are RegExps
274
+ if (isRegExp(value)) {
275
+ base = ' ' + RegExp.prototype.toString.call(value);
276
+ }
277
+
278
+ // Make dates with properties first say the date
279
+ if (isDate(value)) {
280
+ base = ' ' + Date.prototype.toUTCString.call(value);
281
+ }
282
+
283
+ // Make error with message first say the error
284
+ if (isError(value)) {
285
+ base = ' ' + formatError(value);
286
+ }
287
+
288
+ if (keys.length === 0 && (!array || value.length == 0)) {
289
+ return braces[0] + base + braces[1];
290
+ }
291
+
292
+ if (recurseTimes < 0) {
293
+ if (isRegExp(value)) {
294
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
295
+ } else {
296
+ return ctx.stylize('[Object]', 'special');
297
+ }
298
+ }
299
+
300
+ ctx.seen.push(value);
301
+
302
+ var output;
303
+ if (array) {
304
+ output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
305
+ } else {
306
+ output = keys.map(function(key) {
307
+ return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
308
+ });
309
+ }
310
+
311
+ ctx.seen.pop();
312
+
313
+ return reduceToSingleString(output, base, braces);
314
+ }
315
+
316
+
317
+ function formatPrimitive(ctx, value) {
318
+ if (isUndefined(value))
319
+ return ctx.stylize('undefined', 'undefined');
320
+ if (isString(value)) {
321
+ var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
322
+ .replace(/'/g, "\\'")
323
+ .replace(/\\"/g, '"') + '\'';
324
+ return ctx.stylize(simple, 'string');
325
+ }
326
+ if (isNumber(value))
327
+ return ctx.stylize('' + value, 'number');
328
+ if (isBoolean(value))
329
+ return ctx.stylize('' + value, 'boolean');
330
+ // For some reason typeof null is "object", so special case here.
331
+ if (isNull(value))
332
+ return ctx.stylize('null', 'null');
333
+ }
334
+
335
+
336
+ function formatError(value) {
337
+ return '[' + Error.prototype.toString.call(value) + ']';
338
+ }
339
+
340
+
341
+ function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
342
+ var output = [];
343
+ for (var i = 0, l = value.length; i < l; ++i) {
344
+ if (hasOwnProperty(value, String(i))) {
345
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
346
+ String(i), true));
347
+ } else {
348
+ output.push('');
349
+ }
350
+ }
351
+ keys.forEach(function(key) {
352
+ if (!key.match(/^\d+$/)) {
353
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
354
+ key, true));
355
+ }
356
+ });
357
+ return output;
358
+ }
359
+
360
+
361
+ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
362
+ var name, str, desc;
363
+ desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
364
+ if (desc.get) {
365
+ if (desc.set) {
366
+ str = ctx.stylize('[Getter/Setter]', 'special');
367
+ } else {
368
+ str = ctx.stylize('[Getter]', 'special');
369
+ }
370
+ } else {
371
+ if (desc.set) {
372
+ str = ctx.stylize('[Setter]', 'special');
373
+ }
374
+ }
375
+ if (!hasOwnProperty(visibleKeys, key)) {
376
+ name = '[' + key + ']';
377
+ }
378
+ if (!str) {
379
+ if (ctx.seen.indexOf(desc.value) < 0) {
380
+ if (isNull(recurseTimes)) {
381
+ str = formatValue(ctx, desc.value, null);
382
+ } else {
383
+ str = formatValue(ctx, desc.value, recurseTimes - 1);
384
+ }
385
+ if (str.indexOf('\n') > -1) {
386
+ if (array) {
387
+ str = str.split('\n').map(function(line) {
388
+ return ' ' + line;
389
+ }).join('\n').substr(2);
390
+ } else {
391
+ str = '\n' + str.split('\n').map(function(line) {
392
+ return ' ' + line;
393
+ }).join('\n');
394
+ }
395
+ }
396
+ } else {
397
+ str = ctx.stylize('[Circular]', 'special');
398
+ }
399
+ }
400
+ if (isUndefined(name)) {
401
+ if (array && key.match(/^\d+$/)) {
402
+ return str;
403
+ }
404
+ name = JSON.stringify('' + key);
405
+ if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
406
+ name = name.substr(1, name.length - 2);
407
+ name = ctx.stylize(name, 'name');
408
+ } else {
409
+ name = name.replace(/'/g, "\\'")
410
+ .replace(/\\"/g, '"')
411
+ .replace(/(^"|"$)/g, "'");
412
+ name = ctx.stylize(name, 'string');
413
+ }
414
+ }
415
+
416
+ return name + ': ' + str;
417
+ }
418
+
419
+
420
+ function reduceToSingleString(output, base, braces) {
421
+ var length = output.reduce(function(prev, cur) {
422
+ if (cur.indexOf('\n') >= 0) ;
423
+ return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
424
+ }, 0);
425
+
426
+ if (length > 60) {
427
+ return braces[0] +
428
+ (base === '' ? '' : base + '\n ') +
429
+ ' ' +
430
+ output.join(',\n ') +
431
+ ' ' +
432
+ braces[1];
433
+ }
434
+
435
+ return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
436
+ }
437
+
438
+
439
+ // NOTE: These type checking functions intentionally don't use `instanceof`
440
+ // because it is fragile and can be easily faked with `Object.create()`.
441
+ function isArray(ar) {
442
+ return Array.isArray(ar);
443
+ }
444
+
445
+ function isBoolean(arg) {
446
+ return typeof arg === 'boolean';
447
+ }
448
+
449
+ function isNull(arg) {
450
+ return arg === null;
451
+ }
452
+
453
+ function isNullOrUndefined(arg) {
454
+ return arg == null;
455
+ }
456
+
457
+ function isNumber(arg) {
458
+ return typeof arg === 'number';
459
+ }
460
+
461
+ function isString(arg) {
462
+ return typeof arg === 'string';
463
+ }
464
+
465
+ function isSymbol(arg) {
466
+ return typeof arg === 'symbol';
467
+ }
468
+
469
+ function isUndefined(arg) {
470
+ return arg === void 0;
471
+ }
472
+
473
+ function isRegExp(re) {
474
+ return isObject(re) && objectToString(re) === '[object RegExp]';
475
+ }
476
+
477
+ function isObject(arg) {
478
+ return typeof arg === 'object' && arg !== null;
479
+ }
480
+
481
+ function isDate(d) {
482
+ return isObject(d) && objectToString(d) === '[object Date]';
483
+ }
484
+
485
+ function isError(e) {
486
+ return isObject(e) &&
487
+ (objectToString(e) === '[object Error]' || e instanceof Error);
488
+ }
489
+
490
+ function isFunction(arg) {
491
+ return typeof arg === 'function';
492
+ }
493
+
494
+ function isPrimitive(arg) {
495
+ return arg === null ||
496
+ typeof arg === 'boolean' ||
497
+ typeof arg === 'number' ||
498
+ typeof arg === 'string' ||
499
+ typeof arg === 'symbol' || // ES6 symbol
500
+ typeof arg === 'undefined';
501
+ }
502
+
503
+ function isBuffer(maybeBuf) {
504
+ return _polyfillNode_buffer.Buffer.isBuffer(maybeBuf);
505
+ }
506
+
507
+ function objectToString(o) {
508
+ return Object.prototype.toString.call(o);
509
+ }
510
+
511
+
512
+ function pad(n) {
513
+ return n < 10 ? '0' + n.toString(10) : n.toString(10);
514
+ }
515
+
516
+
517
+ var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
518
+ 'Oct', 'Nov', 'Dec'];
519
+
520
+ // 26 Feb 16:19:34
521
+ function timestamp() {
522
+ var d = new Date();
523
+ var time = [pad(d.getHours()),
524
+ pad(d.getMinutes()),
525
+ pad(d.getSeconds())].join(':');
526
+ return [d.getDate(), months[d.getMonth()], time].join(' ');
527
+ }
528
+
529
+
530
+ // log is just a thin wrapper to console.log that prepends a timestamp
531
+ function log() {
532
+ console.log('%s - %s', timestamp(), format.apply(null, arguments));
533
+ }
534
+
535
+ function _extend(origin, add) {
536
+ // Don't do anything if add isn't an object
537
+ if (!add || !isObject(add)) return origin;
538
+
539
+ var keys = Object.keys(add);
540
+ var i = keys.length;
541
+ while (i--) {
542
+ origin[keys[i]] = add[keys[i]];
543
+ }
544
+ return origin;
545
+ }
546
+ function hasOwnProperty(obj, prop) {
547
+ return Object.prototype.hasOwnProperty.call(obj, prop);
548
+ }
549
+
550
+ var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;
551
+
552
+ function promisify(original) {
553
+ if (typeof original !== 'function')
554
+ throw new TypeError('The "original" argument must be of type Function');
555
+
556
+ if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
557
+ var fn = original[kCustomPromisifiedSymbol];
558
+ if (typeof fn !== 'function') {
559
+ throw new TypeError('The "util.promisify.custom" argument must be of type Function');
560
+ }
561
+ Object.defineProperty(fn, kCustomPromisifiedSymbol, {
562
+ value: fn, enumerable: false, writable: false, configurable: true
563
+ });
564
+ return fn;
565
+ }
566
+
567
+ function fn() {
568
+ var promiseResolve, promiseReject;
569
+ var promise = new Promise(function (resolve, reject) {
570
+ promiseResolve = resolve;
571
+ promiseReject = reject;
572
+ });
573
+
574
+ var args = [];
575
+ for (var i = 0; i < arguments.length; i++) {
576
+ args.push(arguments[i]);
577
+ }
578
+ args.push(function (err, value) {
579
+ if (err) {
580
+ promiseReject(err);
581
+ } else {
582
+ promiseResolve(value);
583
+ }
584
+ });
585
+
586
+ try {
587
+ original.apply(this, args);
588
+ } catch (err) {
589
+ promiseReject(err);
590
+ }
591
+
592
+ return promise;
593
+ }
594
+
595
+ Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
596
+
597
+ if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {
598
+ value: fn, enumerable: false, writable: false, configurable: true
599
+ });
600
+ return Object.defineProperties(
601
+ fn,
602
+ getOwnPropertyDescriptors(original)
603
+ );
604
+ }
605
+
606
+ promisify.custom = kCustomPromisifiedSymbol;
607
+
608
+ function callbackifyOnRejected(reason, cb) {
609
+ // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).
610
+ // Because `null` is a special error value in callbacks which means "no error
611
+ // occurred", we error-wrap so the callback consumer can distinguish between
612
+ // "the promise rejected with null" or "the promise fulfilled with undefined".
613
+ if (!reason) {
614
+ var newReason = new Error('Promise was rejected with a falsy value');
615
+ newReason.reason = reason;
616
+ reason = newReason;
617
+ }
618
+ return cb(reason);
619
+ }
620
+
621
+ function callbackify(original) {
622
+ if (typeof original !== 'function') {
623
+ throw new TypeError('The "original" argument must be of type Function');
624
+ }
625
+
626
+ // We DO NOT return the promise as it gives the user a false sense that
627
+ // the promise is actually somehow related to the callback's execution
628
+ // and that the callback throwing will reject the promise.
629
+ function callbackified() {
630
+ var args = [];
631
+ for (var i = 0; i < arguments.length; i++) {
632
+ args.push(arguments[i]);
633
+ }
634
+
635
+ var maybeCb = args.pop();
636
+ if (typeof maybeCb !== 'function') {
637
+ throw new TypeError('The last argument must be of type Function');
638
+ }
639
+ var self = this;
640
+ var cb = function() {
641
+ return maybeCb.apply(self, arguments);
642
+ };
643
+ // In true node style we process the callback on `nextTick` with all the
644
+ // implications (stack, `uncaughtException`, `async_hooks`)
645
+ original.apply(this, args)
646
+ .then(function(ret) { _polyfillNode_process.default.nextTick(cb.bind(null, null, ret)); },
647
+ function(rej) { _polyfillNode_process.default.nextTick(callbackifyOnRejected.bind(null, rej, cb)); });
648
+ }
649
+
650
+ Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
651
+ Object.defineProperties(callbackified, getOwnPropertyDescriptors(original));
652
+ return callbackified;
653
+ }
654
+
655
+ var _polyfillNode_util = {
656
+ inherits: _polyfillNode__inherits.default,
657
+ _extend: _extend,
658
+ log: log,
659
+ isBuffer: isBuffer,
660
+ isPrimitive: isPrimitive,
661
+ isFunction: isFunction,
662
+ isError: isError,
663
+ isDate: isDate,
664
+ isObject: isObject,
665
+ isRegExp: isRegExp,
666
+ isUndefined: isUndefined,
667
+ isSymbol: isSymbol,
668
+ isString: isString,
669
+ isNumber: isNumber,
670
+ isNullOrUndefined: isNullOrUndefined,
671
+ isNull: isNull,
672
+ isBoolean: isBoolean,
673
+ isArray: isArray,
674
+ inspect: inspect,
675
+ deprecate: deprecate,
676
+ format: format,
677
+ debuglog: debuglog,
678
+ promisify: promisify,
679
+ callbackify: callbackify,
680
+ };
681
+
682
+ exports.inherits = _polyfillNode__inherits.default;
683
+ exports._extend = _extend;
684
+ exports.callbackify = callbackify;
685
+ exports.debuglog = debuglog;
686
+ exports.default = _polyfillNode_util;
687
+ exports.deprecate = deprecate;
688
+ exports.format = format;
689
+ exports.inspect = inspect;
690
+ exports.isArray = isArray;
691
+ exports.isBoolean = isBoolean;
692
+ exports.isBuffer = isBuffer;
693
+ exports.isDate = isDate;
694
+ exports.isError = isError;
695
+ exports.isFunction = isFunction;
696
+ exports.isNull = isNull;
697
+ exports.isNullOrUndefined = isNullOrUndefined;
698
+ exports.isNumber = isNumber;
699
+ exports.isObject = isObject;
700
+ exports.isPrimitive = isPrimitive;
701
+ exports.isRegExp = isRegExp;
702
+ exports.isString = isString;
703
+ exports.isSymbol = isSymbol;
704
+ exports.isUndefined = isUndefined;
705
+ exports.log = log;
706
+ exports.promisify = promisify;
707
+ //# sourceMappingURL=_polyfill-node.util.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_polyfill-node.util.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ var callBind = {exports: {}};
4
+
5
+ exports.__module = callBind;
6
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}