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