@adaptic/utils 0.0.993 → 0.0.995
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.
- package/dist/index.cjs +79 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +79 -76
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/massive-indices.d.ts.map +1 -1
- package/package.json +5 -2
package/dist/index.mjs
CHANGED
|
@@ -9318,8 +9318,11 @@ const fetchTrades = async (symbol, options) => {
|
|
|
9318
9318
|
*
|
|
9319
9319
|
* This module provides functions to interact with the Massive.com Indices API.
|
|
9320
9320
|
*/
|
|
9321
|
-
// Constants from environment variables
|
|
9322
|
-
|
|
9321
|
+
// Constants from environment variables.
|
|
9322
|
+
// Backward-compat: ALPACA_INDICES_API_KEY is the pre-2026-Q2 name (vendor was
|
|
9323
|
+
// renamed Alpaca → Massive); MASSIVE_INDICES_API_KEY is preferred. The fallback
|
|
9324
|
+
// stays so consumers that haven't migrated env vars don't break.
|
|
9325
|
+
const { MASSIVE_INDICES_API_KEY, ALPACA_INDICES_API_KEY } = process.env;
|
|
9323
9326
|
// Define concurrency limits for API
|
|
9324
9327
|
const MASSIVE_INDICES_CONCURRENCY_LIMIT = 5;
|
|
9325
9328
|
const massiveIndicesLimit = pLimit(MASSIVE_INDICES_CONCURRENCY_LIMIT);
|
|
@@ -9331,7 +9334,7 @@ const MASSIVE_API_BASE_URL = "https://api.massive.com";
|
|
|
9331
9334
|
* @throws {Error} If no API key is available
|
|
9332
9335
|
*/
|
|
9333
9336
|
const validateApiKey = (apiKey) => {
|
|
9334
|
-
const key = apiKey || ALPACA_INDICES_API_KEY;
|
|
9337
|
+
const key = apiKey || MASSIVE_INDICES_API_KEY || ALPACA_INDICES_API_KEY;
|
|
9335
9338
|
if (!key) {
|
|
9336
9339
|
throw new Error("Massive Indices API key is missing");
|
|
9337
9340
|
}
|
|
@@ -13838,17 +13841,17 @@ var hasRequiredBrowser;
|
|
|
13838
13841
|
function requireBrowser () {
|
|
13839
13842
|
if (hasRequiredBrowser) return browser.exports;
|
|
13840
13843
|
hasRequiredBrowser = 1;
|
|
13841
|
-
(function (module, exports
|
|
13844
|
+
(function (module, exports) {
|
|
13842
13845
|
/**
|
|
13843
13846
|
* This is the web browser implementation of `debug()`.
|
|
13844
13847
|
*/
|
|
13845
13848
|
|
|
13846
|
-
exports
|
|
13847
|
-
exports
|
|
13848
|
-
exports
|
|
13849
|
-
exports
|
|
13850
|
-
exports
|
|
13851
|
-
exports
|
|
13849
|
+
exports.formatArgs = formatArgs;
|
|
13850
|
+
exports.save = save;
|
|
13851
|
+
exports.load = load;
|
|
13852
|
+
exports.useColors = useColors;
|
|
13853
|
+
exports.storage = localstorage();
|
|
13854
|
+
exports.destroy = (() => {
|
|
13852
13855
|
let warned = false;
|
|
13853
13856
|
|
|
13854
13857
|
return () => {
|
|
@@ -13863,7 +13866,7 @@ function requireBrowser () {
|
|
|
13863
13866
|
* Colors.
|
|
13864
13867
|
*/
|
|
13865
13868
|
|
|
13866
|
-
exports
|
|
13869
|
+
exports.colors = [
|
|
13867
13870
|
'#0000CC',
|
|
13868
13871
|
'#0000FF',
|
|
13869
13872
|
'#0033CC',
|
|
@@ -14028,7 +14031,7 @@ function requireBrowser () {
|
|
|
14028
14031
|
*
|
|
14029
14032
|
* @api public
|
|
14030
14033
|
*/
|
|
14031
|
-
exports
|
|
14034
|
+
exports.log = console.debug || console.log || (() => {});
|
|
14032
14035
|
|
|
14033
14036
|
/**
|
|
14034
14037
|
* Save `namespaces`.
|
|
@@ -14039,9 +14042,9 @@ function requireBrowser () {
|
|
|
14039
14042
|
function save(namespaces) {
|
|
14040
14043
|
try {
|
|
14041
14044
|
if (namespaces) {
|
|
14042
|
-
exports
|
|
14045
|
+
exports.storage.setItem('debug', namespaces);
|
|
14043
14046
|
} else {
|
|
14044
|
-
exports
|
|
14047
|
+
exports.storage.removeItem('debug');
|
|
14045
14048
|
}
|
|
14046
14049
|
} catch (error) {
|
|
14047
14050
|
// Swallow
|
|
@@ -14058,7 +14061,7 @@ function requireBrowser () {
|
|
|
14058
14061
|
function load() {
|
|
14059
14062
|
let r;
|
|
14060
14063
|
try {
|
|
14061
|
-
r = exports
|
|
14064
|
+
r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;
|
|
14062
14065
|
} catch (error) {
|
|
14063
14066
|
// Swallow
|
|
14064
14067
|
// XXX (@Qix-) should we be logging these?
|
|
@@ -14094,7 +14097,7 @@ function requireBrowser () {
|
|
|
14094
14097
|
}
|
|
14095
14098
|
}
|
|
14096
14099
|
|
|
14097
|
-
module.exports = requireCommon()(exports
|
|
14100
|
+
module.exports = requireCommon()(exports);
|
|
14098
14101
|
|
|
14099
14102
|
const {formatters} = module.exports;
|
|
14100
14103
|
|
|
@@ -14283,7 +14286,7 @@ var hasRequiredNode$1;
|
|
|
14283
14286
|
function requireNode$1 () {
|
|
14284
14287
|
if (hasRequiredNode$1) return node$1.exports;
|
|
14285
14288
|
hasRequiredNode$1 = 1;
|
|
14286
|
-
(function (module, exports
|
|
14289
|
+
(function (module, exports) {
|
|
14287
14290
|
const tty = require$$1$1;
|
|
14288
14291
|
const util = require$$1$2;
|
|
14289
14292
|
|
|
@@ -14291,13 +14294,13 @@ function requireNode$1 () {
|
|
|
14291
14294
|
* This is the Node.js implementation of `debug()`.
|
|
14292
14295
|
*/
|
|
14293
14296
|
|
|
14294
|
-
exports
|
|
14295
|
-
exports
|
|
14296
|
-
exports
|
|
14297
|
-
exports
|
|
14298
|
-
exports
|
|
14299
|
-
exports
|
|
14300
|
-
exports
|
|
14297
|
+
exports.init = init;
|
|
14298
|
+
exports.log = log;
|
|
14299
|
+
exports.formatArgs = formatArgs;
|
|
14300
|
+
exports.save = save;
|
|
14301
|
+
exports.load = load;
|
|
14302
|
+
exports.useColors = useColors;
|
|
14303
|
+
exports.destroy = util.deprecate(
|
|
14301
14304
|
() => {},
|
|
14302
14305
|
'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
|
|
14303
14306
|
);
|
|
@@ -14306,7 +14309,7 @@ function requireNode$1 () {
|
|
|
14306
14309
|
* Colors.
|
|
14307
14310
|
*/
|
|
14308
14311
|
|
|
14309
|
-
exports
|
|
14312
|
+
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
14310
14313
|
|
|
14311
14314
|
try {
|
|
14312
14315
|
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
|
|
@@ -14314,7 +14317,7 @@ function requireNode$1 () {
|
|
|
14314
14317
|
const supportsColor = requireSupportsColor();
|
|
14315
14318
|
|
|
14316
14319
|
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
14317
|
-
exports
|
|
14320
|
+
exports.colors = [
|
|
14318
14321
|
20,
|
|
14319
14322
|
21,
|
|
14320
14323
|
26,
|
|
@@ -14403,7 +14406,7 @@ function requireNode$1 () {
|
|
|
14403
14406
|
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
|
14404
14407
|
*/
|
|
14405
14408
|
|
|
14406
|
-
exports
|
|
14409
|
+
exports.inspectOpts = Object.keys(process.env).filter(key => {
|
|
14407
14410
|
return /^debug_/i.test(key);
|
|
14408
14411
|
}).reduce((obj, key) => {
|
|
14409
14412
|
// Camel-case
|
|
@@ -14435,8 +14438,8 @@ function requireNode$1 () {
|
|
|
14435
14438
|
*/
|
|
14436
14439
|
|
|
14437
14440
|
function useColors() {
|
|
14438
|
-
return 'colors' in exports
|
|
14439
|
-
Boolean(exports
|
|
14441
|
+
return 'colors' in exports.inspectOpts ?
|
|
14442
|
+
Boolean(exports.inspectOpts.colors) :
|
|
14440
14443
|
tty.isatty(process.stderr.fd);
|
|
14441
14444
|
}
|
|
14442
14445
|
|
|
@@ -14462,7 +14465,7 @@ function requireNode$1 () {
|
|
|
14462
14465
|
}
|
|
14463
14466
|
|
|
14464
14467
|
function getDate() {
|
|
14465
|
-
if (exports
|
|
14468
|
+
if (exports.inspectOpts.hideDate) {
|
|
14466
14469
|
return '';
|
|
14467
14470
|
}
|
|
14468
14471
|
return new Date().toISOString() + ' ';
|
|
@@ -14473,7 +14476,7 @@ function requireNode$1 () {
|
|
|
14473
14476
|
*/
|
|
14474
14477
|
|
|
14475
14478
|
function log(...args) {
|
|
14476
|
-
return process.stderr.write(util.formatWithOptions(exports
|
|
14479
|
+
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
|
|
14477
14480
|
}
|
|
14478
14481
|
|
|
14479
14482
|
/**
|
|
@@ -14513,13 +14516,13 @@ function requireNode$1 () {
|
|
|
14513
14516
|
function init(debug) {
|
|
14514
14517
|
debug.inspectOpts = {};
|
|
14515
14518
|
|
|
14516
|
-
const keys = Object.keys(exports
|
|
14519
|
+
const keys = Object.keys(exports.inspectOpts);
|
|
14517
14520
|
for (let i = 0; i < keys.length; i++) {
|
|
14518
|
-
debug.inspectOpts[keys[i]] = exports
|
|
14521
|
+
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
14519
14522
|
}
|
|
14520
14523
|
}
|
|
14521
14524
|
|
|
14522
|
-
module.exports = requireCommon()(exports
|
|
14525
|
+
module.exports = requireCommon()(exports);
|
|
14523
14526
|
|
|
14524
14527
|
const {formatters} = module.exports;
|
|
14525
14528
|
|
|
@@ -15093,7 +15096,7 @@ function requireFollowRedirects () {
|
|
|
15093
15096
|
// Wraps the key/value object of protocols with redirect functionality
|
|
15094
15097
|
function wrap(protocols) {
|
|
15095
15098
|
// Default settings
|
|
15096
|
-
var exports
|
|
15099
|
+
var exports = {
|
|
15097
15100
|
maxRedirects: 21,
|
|
15098
15101
|
maxBodyLength: 10 * 1024 * 1024,
|
|
15099
15102
|
};
|
|
@@ -15103,7 +15106,7 @@ function requireFollowRedirects () {
|
|
|
15103
15106
|
Object.keys(protocols).forEach(function (scheme) {
|
|
15104
15107
|
var protocol = scheme + ":";
|
|
15105
15108
|
var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
|
|
15106
|
-
var wrappedProtocol = exports
|
|
15109
|
+
var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);
|
|
15107
15110
|
|
|
15108
15111
|
// Executes a request, following redirects
|
|
15109
15112
|
function request(input, options, callback) {
|
|
@@ -15126,8 +15129,8 @@ function requireFollowRedirects () {
|
|
|
15126
15129
|
|
|
15127
15130
|
// Set defaults
|
|
15128
15131
|
options = Object.assign({
|
|
15129
|
-
maxRedirects: exports
|
|
15130
|
-
maxBodyLength: exports
|
|
15132
|
+
maxRedirects: exports.maxRedirects,
|
|
15133
|
+
maxBodyLength: exports.maxBodyLength,
|
|
15131
15134
|
}, input, options);
|
|
15132
15135
|
options.nativeProtocols = nativeProtocols;
|
|
15133
15136
|
if (!isString(options.host) && !isString(options.hostname)) {
|
|
@@ -15152,7 +15155,7 @@ function requireFollowRedirects () {
|
|
|
15152
15155
|
get: { value: get, configurable: true, enumerable: true, writable: true },
|
|
15153
15156
|
});
|
|
15154
15157
|
});
|
|
15155
|
-
return exports
|
|
15158
|
+
return exports;
|
|
15156
15159
|
}
|
|
15157
15160
|
|
|
15158
15161
|
function noop() { /* empty */ }
|
|
@@ -16758,7 +16761,7 @@ var hasRequiredLodash;
|
|
|
16758
16761
|
function requireLodash () {
|
|
16759
16762
|
if (hasRequiredLodash) return lodash$1.exports;
|
|
16760
16763
|
hasRequiredLodash = 1;
|
|
16761
|
-
(function (module, exports
|
|
16764
|
+
(function (module, exports) {
|
|
16762
16765
|
(function() {
|
|
16763
16766
|
|
|
16764
16767
|
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
|
@@ -17189,7 +17192,7 @@ function requireLodash () {
|
|
|
17189
17192
|
var root = freeGlobal || freeSelf || Function('return this')();
|
|
17190
17193
|
|
|
17191
17194
|
/** Detect free variable `exports`. */
|
|
17192
|
-
var freeExports = exports
|
|
17195
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
17193
17196
|
|
|
17194
17197
|
/** Detect free variable `module`. */
|
|
17195
17198
|
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
@@ -35019,12 +35022,12 @@ var hasRequiredIsBuffer;
|
|
|
35019
35022
|
function requireIsBuffer () {
|
|
35020
35023
|
if (hasRequiredIsBuffer) return isBuffer.exports;
|
|
35021
35024
|
hasRequiredIsBuffer = 1;
|
|
35022
|
-
(function (module, exports
|
|
35025
|
+
(function (module, exports) {
|
|
35023
35026
|
var root = require_root(),
|
|
35024
35027
|
stubFalse = requireStubFalse();
|
|
35025
35028
|
|
|
35026
35029
|
/** Detect free variable `exports`. */
|
|
35027
|
-
var freeExports = exports
|
|
35030
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
35028
35031
|
|
|
35029
35032
|
/** Detect free variable `module`. */
|
|
35030
35033
|
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
@@ -35244,11 +35247,11 @@ var hasRequired_nodeUtil;
|
|
|
35244
35247
|
function require_nodeUtil () {
|
|
35245
35248
|
if (hasRequired_nodeUtil) return _nodeUtil.exports;
|
|
35246
35249
|
hasRequired_nodeUtil = 1;
|
|
35247
|
-
(function (module, exports
|
|
35250
|
+
(function (module, exports) {
|
|
35248
35251
|
var freeGlobal = require_freeGlobal();
|
|
35249
35252
|
|
|
35250
35253
|
/** Detect free variable `exports`. */
|
|
35251
|
-
var freeExports = exports
|
|
35254
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
35252
35255
|
|
|
35253
35256
|
/** Detect free variable `module`. */
|
|
35254
35257
|
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
@@ -44170,7 +44173,7 @@ var hasRequiredSafeBuffer;
|
|
|
44170
44173
|
function requireSafeBuffer () {
|
|
44171
44174
|
if (hasRequiredSafeBuffer) return safeBuffer.exports;
|
|
44172
44175
|
hasRequiredSafeBuffer = 1;
|
|
44173
|
-
(function (module, exports
|
|
44176
|
+
(function (module, exports) {
|
|
44174
44177
|
/* eslint-disable node/no-deprecated-api */
|
|
44175
44178
|
var buffer = require$$0$5;
|
|
44176
44179
|
var Buffer = buffer.Buffer;
|
|
@@ -44185,8 +44188,8 @@ function requireSafeBuffer () {
|
|
|
44185
44188
|
module.exports = buffer;
|
|
44186
44189
|
} else {
|
|
44187
44190
|
// Copy properties from require('buffer')
|
|
44188
|
-
copyProps(buffer, exports
|
|
44189
|
-
exports
|
|
44191
|
+
copyProps(buffer, exports);
|
|
44192
|
+
exports.Buffer = SafeBuffer;
|
|
44190
44193
|
}
|
|
44191
44194
|
|
|
44192
44195
|
function SafeBuffer (arg, encodingOrOffset, length) {
|
|
@@ -47384,22 +47387,22 @@ var hasRequiredReadable;
|
|
|
47384
47387
|
function requireReadable () {
|
|
47385
47388
|
if (hasRequiredReadable) return readable.exports;
|
|
47386
47389
|
hasRequiredReadable = 1;
|
|
47387
|
-
(function (module, exports
|
|
47390
|
+
(function (module, exports) {
|
|
47388
47391
|
var Stream = require$$0$3;
|
|
47389
47392
|
if (process.env.READABLE_STREAM === 'disable' && Stream) {
|
|
47390
47393
|
module.exports = Stream.Readable;
|
|
47391
47394
|
Object.assign(module.exports, Stream);
|
|
47392
47395
|
module.exports.Stream = Stream;
|
|
47393
47396
|
} else {
|
|
47394
|
-
exports
|
|
47395
|
-
exports
|
|
47396
|
-
exports
|
|
47397
|
-
exports
|
|
47398
|
-
exports
|
|
47399
|
-
exports
|
|
47400
|
-
exports
|
|
47401
|
-
exports
|
|
47402
|
-
exports
|
|
47397
|
+
exports = module.exports = require_stream_readable();
|
|
47398
|
+
exports.Stream = Stream || exports;
|
|
47399
|
+
exports.Readable = exports;
|
|
47400
|
+
exports.Writable = require_stream_writable();
|
|
47401
|
+
exports.Duplex = require_stream_duplex();
|
|
47402
|
+
exports.Transform = require_stream_transform();
|
|
47403
|
+
exports.PassThrough = require_stream_passthrough();
|
|
47404
|
+
exports.finished = requireEndOfStream();
|
|
47405
|
+
exports.pipeline = requirePipeline();
|
|
47403
47406
|
}
|
|
47404
47407
|
} (readable, readable.exports));
|
|
47405
47408
|
return readable.exports;
|
|
@@ -48834,12 +48837,12 @@ var hasRequiredWebsocket;
|
|
|
48834
48837
|
function requireWebsocket () {
|
|
48835
48838
|
if (hasRequiredWebsocket) return websocket$1;
|
|
48836
48839
|
hasRequiredWebsocket = 1;
|
|
48837
|
-
(function (exports
|
|
48840
|
+
(function (exports) {
|
|
48838
48841
|
var __importDefault = (websocket$1 && websocket$1.__importDefault) || function (mod) {
|
|
48839
48842
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
48840
48843
|
};
|
|
48841
|
-
Object.defineProperty(exports
|
|
48842
|
-
exports
|
|
48844
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48845
|
+
exports.AlpacaWebsocket = exports.ERROR = exports.CONN_ERROR = exports.EVENT = exports.STATE = void 0;
|
|
48843
48846
|
const events_1 = __importDefault(require$$0$4);
|
|
48844
48847
|
const ws_1 = __importDefault(requireWs());
|
|
48845
48848
|
const msgpack5_1 = __importDefault(requireMsgpack5());
|
|
@@ -48853,7 +48856,7 @@ function requireWebsocket () {
|
|
|
48853
48856
|
STATE["DISCONNECTED"] = "disconnected";
|
|
48854
48857
|
STATE["WAITING_TO_CONNECT"] = "waiting to connect";
|
|
48855
48858
|
STATE["WAITING_TO_RECONNECT"] = "waiting to reconnect";
|
|
48856
|
-
})(STATE || (exports
|
|
48859
|
+
})(STATE || (exports.STATE = STATE = {}));
|
|
48857
48860
|
// Client events
|
|
48858
48861
|
var EVENT;
|
|
48859
48862
|
(function (EVENT) {
|
|
@@ -48872,9 +48875,9 @@ function requireWebsocket () {
|
|
|
48872
48875
|
EVENT["CORRECTIONS"] = "corrections";
|
|
48873
48876
|
EVENT["ORDERBOOKS"] = "orderbooks";
|
|
48874
48877
|
EVENT["NEWS"] = "news";
|
|
48875
|
-
})(EVENT || (exports
|
|
48878
|
+
})(EVENT || (exports.EVENT = EVENT = {}));
|
|
48876
48879
|
// Connection errors by code
|
|
48877
|
-
exports
|
|
48880
|
+
exports.CONN_ERROR = new Map([
|
|
48878
48881
|
[400, "invalid syntax"],
|
|
48879
48882
|
[401, "not authenticated"],
|
|
48880
48883
|
[402, "auth failed"],
|
|
@@ -48893,7 +48896,7 @@ function requireWebsocket () {
|
|
|
48893
48896
|
ERROR["MISSING_SECERT_KEY"] = "missing secret key";
|
|
48894
48897
|
ERROR["MISSING_API_KEY"] = "missing api key";
|
|
48895
48898
|
ERROR["UNEXPECTED_MESSAGE"] = "unexpected message";
|
|
48896
|
-
})(ERROR || (exports
|
|
48899
|
+
})(ERROR || (exports.ERROR = ERROR = {}));
|
|
48897
48900
|
class AlpacaWebsocket extends events_1.default.EventEmitter {
|
|
48898
48901
|
constructor(options) {
|
|
48899
48902
|
super();
|
|
@@ -49050,7 +49053,7 @@ function requireWebsocket () {
|
|
|
49050
49053
|
this.updateSubscriptions(data[0]);
|
|
49051
49054
|
break;
|
|
49052
49055
|
case "error":
|
|
49053
|
-
this.emit(EVENT.CLIENT_ERROR, exports
|
|
49056
|
+
this.emit(EVENT.CLIENT_ERROR, exports.CONN_ERROR.get(data[0].code));
|
|
49054
49057
|
break;
|
|
49055
49058
|
default:
|
|
49056
49059
|
this.dataHandler(data);
|
|
@@ -49079,7 +49082,7 @@ function requireWebsocket () {
|
|
|
49079
49082
|
}
|
|
49080
49083
|
}
|
|
49081
49084
|
}
|
|
49082
|
-
exports
|
|
49085
|
+
exports.AlpacaWebsocket = AlpacaWebsocket;
|
|
49083
49086
|
} (websocket$1));
|
|
49084
49087
|
return websocket$1;
|
|
49085
49088
|
}
|
|
@@ -49713,8 +49716,8 @@ var hasRequiredWebsockets;
|
|
|
49713
49716
|
function requireWebsockets () {
|
|
49714
49717
|
if (hasRequiredWebsockets) return websockets;
|
|
49715
49718
|
hasRequiredWebsockets = 1;
|
|
49716
|
-
(function (exports
|
|
49717
|
-
Object.defineProperty(exports
|
|
49719
|
+
(function (exports) {
|
|
49720
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49718
49721
|
const events = require$$0$4;
|
|
49719
49722
|
const WebSocket = requireWs();
|
|
49720
49723
|
const entity = requireEntity();
|
|
@@ -49729,7 +49732,7 @@ function requireWebsockets () {
|
|
|
49729
49732
|
STATE.DISCONNECTED = "disconnected";
|
|
49730
49733
|
STATE.WAITING_TO_CONNECT = "waiting to connect";
|
|
49731
49734
|
STATE.WAITING_TO_RECONNECT = "waiting to reconnect";
|
|
49732
|
-
})((STATE = exports
|
|
49735
|
+
})((STATE = exports.STATE || (exports.STATE = {})));
|
|
49733
49736
|
// Client events
|
|
49734
49737
|
var EVENT;
|
|
49735
49738
|
(function (EVENT) {
|
|
@@ -49743,7 +49746,7 @@ function requireWebsockets () {
|
|
|
49743
49746
|
EVENT.STOCK_QUOTES = "stock_quotes";
|
|
49744
49747
|
EVENT.STOCK_AGG_SEC = "stock_agg_sec";
|
|
49745
49748
|
EVENT.STOCK_AGG_MIN = "stock_agg_min";
|
|
49746
|
-
})((EVENT = exports
|
|
49749
|
+
})((EVENT = exports.EVENT || (exports.EVENT = {})));
|
|
49747
49750
|
// Connection errors Each of these will also emit EVENT.ERROR
|
|
49748
49751
|
var ERROR;
|
|
49749
49752
|
(function (ERROR) {
|
|
@@ -49752,7 +49755,7 @@ function requireWebsockets () {
|
|
|
49752
49755
|
ERROR.MISSING_API_KEY = "missing api key";
|
|
49753
49756
|
ERROR.MISSING_SECRET_KEY = "missing secret key";
|
|
49754
49757
|
ERROR.UNKNOWN = "unknown error";
|
|
49755
|
-
})((ERROR = exports
|
|
49758
|
+
})((ERROR = exports.ERROR || (exports.ERROR = {})));
|
|
49756
49759
|
/**
|
|
49757
49760
|
* AlpacaStreamClient manages a connection to Alpaca's websocket api
|
|
49758
49761
|
*/
|
|
@@ -50065,7 +50068,7 @@ function requireWebsockets () {
|
|
|
50065
50068
|
}
|
|
50066
50069
|
}
|
|
50067
50070
|
}
|
|
50068
|
-
exports
|
|
50071
|
+
exports.AlpacaStreamClient = AlpacaStreamClient;
|
|
50069
50072
|
} (websockets));
|
|
50070
50073
|
return websockets;
|
|
50071
50074
|
}
|
|
@@ -50317,13 +50320,13 @@ var hasRequiredDist;
|
|
|
50317
50320
|
function requireDist () {
|
|
50318
50321
|
if (hasRequiredDist) return dist$1.exports;
|
|
50319
50322
|
hasRequiredDist = 1;
|
|
50320
|
-
(function (module, exports
|
|
50323
|
+
(function (module, exports) {
|
|
50321
50324
|
var __importDefault = (dist && dist.__importDefault) || function (mod) {
|
|
50322
50325
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
50323
50326
|
};
|
|
50324
|
-
Object.defineProperty(exports
|
|
50327
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50325
50328
|
const alpaca_trade_api_1 = __importDefault(requireAlpacaTradeApi());
|
|
50326
|
-
exports
|
|
50329
|
+
exports.default = alpaca_trade_api_1.default;
|
|
50327
50330
|
module.exports = alpaca_trade_api_1.default;
|
|
50328
50331
|
} (dist$1, dist$1.exports));
|
|
50329
50332
|
return dist$1.exports;
|