forked from jchomaz/Vulture
Tracking de l'application VApp (IHM du jeu)
This commit is contained in:
2
VApp/node_modules/mqtt/build/bin/mqtt.d.ts
generated
vendored
Normal file
2
VApp/node_modules/mqtt/build/bin/mqtt.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
export {};
|
||||
30
VApp/node_modules/mqtt/build/bin/mqtt.js
generated
vendored
Normal file
30
VApp/node_modules/mqtt/build/bin/mqtt.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const commist_1 = __importDefault(require("commist"));
|
||||
const help_me_1 = __importDefault(require("help-me"));
|
||||
const pub_1 = __importDefault(require("./pub"));
|
||||
const sub_1 = __importDefault(require("./sub"));
|
||||
const version = require('../../package.json').version;
|
||||
const helpMe = (0, help_me_1.default)({
|
||||
dir: path_1.default.join(__dirname, '../../', 'help'),
|
||||
ext: '.txt',
|
||||
});
|
||||
const commist = (0, commist_1.default)();
|
||||
commist.register('publish', pub_1.default);
|
||||
commist.register('pub', pub_1.default);
|
||||
commist.register('subscribe', sub_1.default);
|
||||
commist.register('sub', sub_1.default);
|
||||
commist.register('version', () => {
|
||||
console.log('MQTT.js version:', version);
|
||||
});
|
||||
commist.register('help', helpMe.toStdout);
|
||||
if (commist.parse(process.argv.slice(2)) !== null) {
|
||||
console.log('No such command:', process.argv[2], '\n');
|
||||
helpMe.toStdout();
|
||||
}
|
||||
//# sourceMappingURL=mqtt.js.map
|
||||
1
VApp/node_modules/mqtt/build/bin/mqtt.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/bin/mqtt.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mqtt.js","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endored
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
export default function start(args: string[]): any;
|
||||
147
VApp/node_modules/mqtt/build/bin/pub.js
generated
vendored
Normal file
147
VApp/node_modules/mqtt/build/bin/pub.js
generated
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const readable_stream_1 = require("readable-stream");
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const fs_1 = __importDefault(require("fs"));
|
||||
const concat_stream_1 = __importDefault(require("concat-stream"));
|
||||
const help_me_1 = __importDefault(require("help-me"));
|
||||
const minimist_1 = __importDefault(require("minimist"));
|
||||
const split2_1 = __importDefault(require("split2"));
|
||||
const mqtt_1 = require("../mqtt");
|
||||
const stream_1 = require("stream");
|
||||
const helpMe = (0, help_me_1.default)({
|
||||
dir: path_1.default.join(__dirname, '../../', 'help'),
|
||||
});
|
||||
function send(args) {
|
||||
const client = (0, mqtt_1.connect)(args);
|
||||
client.on('connect', () => {
|
||||
client.publish(args.topic, args.message, args, (err) => {
|
||||
if (err) {
|
||||
console.warn(err);
|
||||
}
|
||||
client.end();
|
||||
});
|
||||
});
|
||||
client.on('error', (err) => {
|
||||
console.warn(err);
|
||||
client.end();
|
||||
});
|
||||
}
|
||||
function multisend(args) {
|
||||
const client = (0, mqtt_1.connect)(args);
|
||||
const sender = new readable_stream_1.Writable({
|
||||
objectMode: true,
|
||||
});
|
||||
sender._write = (line, enc, cb) => {
|
||||
client.publish(args.topic, line.trim(), args, cb);
|
||||
};
|
||||
client.on('connect', () => {
|
||||
(0, stream_1.pipeline)(process.stdin, (0, split2_1.default)(), sender, (err) => {
|
||||
client.end();
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
function start(args) {
|
||||
var _a, _b;
|
||||
const parsedArgs = (0, minimist_1.default)(args, {
|
||||
string: [
|
||||
'hostname',
|
||||
'username',
|
||||
'password',
|
||||
'key',
|
||||
'cert',
|
||||
'ca',
|
||||
'message',
|
||||
'clientId',
|
||||
'i',
|
||||
'id',
|
||||
],
|
||||
boolean: ['stdin', 'retain', 'help', 'insecure', 'multiline'],
|
||||
alias: {
|
||||
port: 'p',
|
||||
hostname: ['h', 'host'],
|
||||
topic: 't',
|
||||
message: 'm',
|
||||
qos: 'q',
|
||||
clientId: ['i', 'id'],
|
||||
retain: 'r',
|
||||
username: 'u',
|
||||
password: 'P',
|
||||
stdin: 's',
|
||||
multiline: 'M',
|
||||
protocol: ['C', 'l'],
|
||||
help: 'H',
|
||||
ca: 'cafile',
|
||||
},
|
||||
default: {
|
||||
host: 'localhost',
|
||||
qos: 0,
|
||||
retain: false,
|
||||
topic: '',
|
||||
message: '',
|
||||
},
|
||||
});
|
||||
if (parsedArgs.help) {
|
||||
return helpMe.toStdout('publish');
|
||||
}
|
||||
if (parsedArgs.key) {
|
||||
parsedArgs.key = fs_1.default.readFileSync(parsedArgs.key);
|
||||
}
|
||||
if (parsedArgs.cert) {
|
||||
parsedArgs.cert = fs_1.default.readFileSync(parsedArgs.cert);
|
||||
}
|
||||
if (parsedArgs.ca) {
|
||||
parsedArgs.ca = fs_1.default.readFileSync(parsedArgs.ca);
|
||||
}
|
||||
if (parsedArgs.key && parsedArgs.cert && !parsedArgs.protocol) {
|
||||
parsedArgs.protocol = 'mqtts';
|
||||
}
|
||||
if (parsedArgs.port) {
|
||||
if (typeof parsedArgs.port !== 'number') {
|
||||
console.warn("# Port: number expected, '%s' was given.", typeof parsedArgs.port);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (parsedArgs['will-topic']) {
|
||||
parsedArgs.will = {};
|
||||
parsedArgs.will.topic = parsedArgs['will-topic'];
|
||||
parsedArgs.will.payload = parsedArgs['will-message'];
|
||||
parsedArgs.will.qos = parsedArgs['will-qos'];
|
||||
parsedArgs.will.retain = parsedArgs['will-retain'];
|
||||
}
|
||||
if (parsedArgs.insecure) {
|
||||
parsedArgs.rejectUnauthorized = false;
|
||||
}
|
||||
parsedArgs.topic = (_a = (parsedArgs.topic || parsedArgs._.shift())) === null || _a === void 0 ? void 0 : _a.toString();
|
||||
parsedArgs.message = (_b = (parsedArgs.message || parsedArgs._.shift())) === null || _b === void 0 ? void 0 : _b.toString();
|
||||
if (!parsedArgs.topic) {
|
||||
console.error('missing topic\n');
|
||||
return helpMe.toStdout('publish');
|
||||
}
|
||||
if (parsedArgs.stdin) {
|
||||
if (parsedArgs.multiline) {
|
||||
multisend(parsedArgs);
|
||||
}
|
||||
else {
|
||||
process.stdin.pipe((0, concat_stream_1.default)((data) => {
|
||||
parsedArgs.message = data;
|
||||
send(parsedArgs);
|
||||
}));
|
||||
}
|
||||
}
|
||||
else {
|
||||
send(parsedArgs);
|
||||
}
|
||||
}
|
||||
exports.default = start;
|
||||
if (require.main === module) {
|
||||
start(process.argv.slice(2));
|
||||
}
|
||||
//# sourceMappingURL=pub.js.map
|
||||
1
VApp/node_modules/mqtt/build/bin/pub.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/bin/pub.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"pub.js","sourceRoot":"","sources":["../../src/bin/pub.ts"],"names":[],"mappings":";;;;;;AAEA,qDAA0C;AAC1C,gDAAuB;AACvB,4CAAmB;AACnB,kEAAkC;AAClC,sDAA0B;AAE1B,wDAA+C;AAC/C,oDAA2B;AAC3B,kCAAiC;AAEjC,mCAAiC;AAEjC,MAAM,MAAM,GAAG,IAAA,iBAAI,EAAC;IACnB,GAAG,EAAE,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC;CAC3C,CAAC,CAAA;AAEF,SAAS,IAAI,CAAC,IAAgB;IAC7B,MAAM,MAAM,GAAG,IAAA,cAAO,EAAC,I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AAE;QACtB,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;QAChC,OAAO,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;KACjC;IAED,IAAI,UAAU,CAAC,KAAK,EAAE;QACrB,IAAI,UAAU,CAAC,SAAS,EAAE;YACzB,SAAS,CAAC,UAAU,CAAC,CAAA;SACrB;aAAM;YACN,OAAO,CAAC,KAAK,CAAC,IAAI,CACjB,IAAA,uBAAM,EAAC,CAAC,IAAI,EAAE,EAAE;gBACf,UAAU,CAAC,OAAO,GAAG,IAAI,CAAA;gBACzB,IAAI,CAAC,UAAU,CAAC,CAAA;YACjB,CAAC,CAAC,CACF,CAAA;SACD;KACD;SAAM;QACN,IAAI,CAAC,UAAU,CAAC,CAAA;KAChB;AACF,CAAC;AA1GD,wBA0GC;AAED,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE;IAC5B,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;CAC5B"}
|
||||
2
VApp/node_modules/mqtt/build/bin/sub.d.ts
generated
vendored
Normal file
2
VApp/node_modules/mqtt/build/bin/sub.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
export default function start(args: string[]): any;
|
||||
121
VApp/node_modules/mqtt/build/bin/sub.js
generated
vendored
Normal file
121
VApp/node_modules/mqtt/build/bin/sub.js
generated
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const fs_1 = __importDefault(require("fs"));
|
||||
const minimist_1 = __importDefault(require("minimist"));
|
||||
const help_me_1 = __importDefault(require("help-me"));
|
||||
const mqtt_1 = require("../mqtt");
|
||||
const helpMe = (0, help_me_1.default)({
|
||||
dir: path_1.default.join(__dirname, '../../', 'help'),
|
||||
});
|
||||
function start(args) {
|
||||
const parsedArgs = (0, minimist_1.default)(args, {
|
||||
string: [
|
||||
'hostname',
|
||||
'username',
|
||||
'password',
|
||||
'key',
|
||||
'cert',
|
||||
'ca',
|
||||
'clientId',
|
||||
'i',
|
||||
'id',
|
||||
],
|
||||
boolean: ['stdin', 'help', 'clean', 'insecure'],
|
||||
alias: {
|
||||
port: 'p',
|
||||
hostname: ['h', 'host'],
|
||||
topic: 't',
|
||||
qos: 'q',
|
||||
clean: 'c',
|
||||
keepalive: 'k',
|
||||
clientId: ['i', 'id'],
|
||||
username: 'u',
|
||||
password: 'P',
|
||||
protocol: ['C', 'l'],
|
||||
verbose: 'v',
|
||||
help: '-H',
|
||||
ca: 'cafile',
|
||||
},
|
||||
default: {
|
||||
host: 'localhost',
|
||||
qos: 0,
|
||||
retain: false,
|
||||
clean: true,
|
||||
keepAlive: 30,
|
||||
},
|
||||
});
|
||||
if (parsedArgs.help) {
|
||||
return helpMe.toStdout('subscribe');
|
||||
}
|
||||
parsedArgs.topic = parsedArgs.topic || parsedArgs._.shift();
|
||||
if (!parsedArgs.topic) {
|
||||
console.error('missing topic\n');
|
||||
return helpMe.toStdout('subscribe');
|
||||
}
|
||||
if (parsedArgs.key) {
|
||||
parsedArgs.key = fs_1.default.readFileSync(parsedArgs.key);
|
||||
}
|
||||
if (parsedArgs.cert) {
|
||||
parsedArgs.cert = fs_1.default.readFileSync(parsedArgs.cert);
|
||||
}
|
||||
if (parsedArgs.ca) {
|
||||
parsedArgs.ca = fs_1.default.readFileSync(parsedArgs.ca);
|
||||
}
|
||||
if (parsedArgs.key && parsedArgs.cert && !parsedArgs.protocol) {
|
||||
parsedArgs.protocol = 'mqtts';
|
||||
}
|
||||
if (parsedArgs.insecure) {
|
||||
parsedArgs.rejectUnauthorized = false;
|
||||
}
|
||||
if (parsedArgs.port) {
|
||||
if (typeof parsedArgs.port !== 'number') {
|
||||
console.warn("# Port: number expected, '%s' was given.", typeof parsedArgs.port);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (parsedArgs['will-topic']) {
|
||||
parsedArgs.will = {};
|
||||
parsedArgs.will.topic = parsedArgs['will-topic'];
|
||||
parsedArgs.will.payload = parsedArgs['will-message'];
|
||||
parsedArgs.will.qos = parsedArgs['will-qos'];
|
||||
parsedArgs.will.retain = parsedArgs['will-retain'];
|
||||
}
|
||||
parsedArgs.keepAlive = parsedArgs['keep-alive'];
|
||||
const client = (0, mqtt_1.connect)(parsedArgs);
|
||||
client.on('connect', () => {
|
||||
client.subscribe(parsedArgs.topic, { qos: parsedArgs.qos }, (err, result) => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
result.forEach((sub) => {
|
||||
if (sub.qos > 2) {
|
||||
console.error('subscription negated to', sub.topic, 'with code', sub.qos);
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
client.on('message', (topic, payload) => {
|
||||
if (parsedArgs.verbose) {
|
||||
console.log(topic, payload.toString());
|
||||
}
|
||||
else {
|
||||
console.log(payload.toString());
|
||||
}
|
||||
});
|
||||
client.on('error', (err) => {
|
||||
console.warn(err);
|
||||
client.end();
|
||||
});
|
||||
}
|
||||
exports.default = start;
|
||||
if (require.main === module) {
|
||||
start(process.argv.slice(2));
|
||||
}
|
||||
//# sourceMappingURL=sub.js.map
|
||||
1
VApp/node_modules/mqtt/build/bin/sub.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/bin/sub.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"sub.js","sourceRoot":"","sources":["../../src/bin/sub.ts"],"names":[],"mappings":";;;;;;AAEA,gDAAuB;AACvB,4CAAmB;AACnB,wDAA+B;AAC/B,sDAA0B;AAC1B,kCAAiC;AAGjC,MAAM,MAAM,GAAG,IAAA,iBAAI,EAAC;IACnB,GA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AC,CAAA;AACH,CAAC;AAhID,wBAgIC;AAED,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE;IAC5B,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;CAC5B"}
|
||||
3
VApp/node_modules/mqtt/build/index.d.ts
generated
vendored
Normal file
3
VApp/node_modules/mqtt/build/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import * as mqtt from './mqtt';
|
||||
export default mqtt;
|
||||
export * from './mqtt';
|
||||
32
VApp/node_modules/mqtt/build/index.js
generated
vendored
Normal file
32
VApp/node_modules/mqtt/build/index.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const mqtt = __importStar(require("./mqtt"));
|
||||
exports.default = mqtt;
|
||||
__exportStar(require("./mqtt"), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
VApp/node_modules/mqtt/build/index.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAE9B,kBAAe,IAAI,CAAA;AACnB,yCAAsB"}
|
||||
19
VApp/node_modules/mqtt/build/lib/BufferedDuplex.d.ts
generated
vendored
Normal file
19
VApp/node_modules/mqtt/build/lib/BufferedDuplex.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Duplex, Transform } from 'readable-stream';
|
||||
import { IClientOptions } from './client';
|
||||
export declare function writev(chunks: {
|
||||
chunk: any;
|
||||
encoding: string;
|
||||
}[], cb: (err?: Error) => void): void;
|
||||
export declare class BufferedDuplex extends Duplex {
|
||||
socket: WebSocket;
|
||||
private proxy;
|
||||
private isSocketOpen;
|
||||
private writeQueue;
|
||||
constructor(opts: IClientOptions, proxy: Transform, socket: WebSocket);
|
||||
_read(size?: number): void;
|
||||
_write(chunk: any, encoding: string, cb: (err?: Error) => void): void;
|
||||
_final(callback: (error?: Error) => void): void;
|
||||
socketReady(): void;
|
||||
private writeToProxy;
|
||||
private processWriteQueue;
|
||||
}
|
||||
70
VApp/node_modules/mqtt/build/lib/BufferedDuplex.js
generated
vendored
Normal file
70
VApp/node_modules/mqtt/build/lib/BufferedDuplex.js
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.BufferedDuplex = exports.writev = void 0;
|
||||
const readable_stream_1 = require("readable-stream");
|
||||
function writev(chunks, cb) {
|
||||
const buffers = new Array(chunks.length);
|
||||
for (let i = 0; i < chunks.length; i++) {
|
||||
if (typeof chunks[i].chunk === 'string') {
|
||||
buffers[i] = Buffer.from(chunks[i].chunk, 'utf8');
|
||||
}
|
||||
else {
|
||||
buffers[i] = chunks[i].chunk;
|
||||
}
|
||||
}
|
||||
this._write(Buffer.concat(buffers), 'binary', cb);
|
||||
}
|
||||
exports.writev = writev;
|
||||
class BufferedDuplex extends readable_stream_1.Duplex {
|
||||
constructor(opts, proxy, socket) {
|
||||
super({
|
||||
objectMode: true,
|
||||
});
|
||||
this.proxy = proxy;
|
||||
this.socket = socket;
|
||||
this.writeQueue = [];
|
||||
if (!opts.objectMode) {
|
||||
this._writev = writev.bind(this);
|
||||
}
|
||||
this.isSocketOpen = false;
|
||||
this.proxy.on('data', (chunk) => {
|
||||
this.push(chunk);
|
||||
});
|
||||
}
|
||||
_read(size) {
|
||||
this.proxy.read(size);
|
||||
}
|
||||
_write(chunk, encoding, cb) {
|
||||
if (!this.isSocketOpen) {
|
||||
this.writeQueue.push({ chunk, encoding, cb });
|
||||
}
|
||||
else {
|
||||
this.writeToProxy(chunk, encoding, cb);
|
||||
}
|
||||
}
|
||||
_final(callback) {
|
||||
this.writeQueue = [];
|
||||
this.proxy.end(callback);
|
||||
}
|
||||
socketReady() {
|
||||
this.emit('connect');
|
||||
this.isSocketOpen = true;
|
||||
this.processWriteQueue();
|
||||
}
|
||||
writeToProxy(chunk, encoding, cb) {
|
||||
if (this.proxy.write(chunk, encoding) === false) {
|
||||
this.proxy.once('drain', cb);
|
||||
}
|
||||
else {
|
||||
cb();
|
||||
}
|
||||
}
|
||||
processWriteQueue() {
|
||||
while (this.writeQueue.length > 0) {
|
||||
const { chunk, encoding, cb } = this.writeQueue.shift();
|
||||
this.writeToProxy(chunk, encoding, cb);
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.BufferedDuplex = BufferedDuplex;
|
||||
//# sourceMappingURL=BufferedDuplex.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/BufferedDuplex.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/BufferedDuplex.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"BufferedDuplex.js","sourceRoot":"","sources":["../../src/lib/BufferedDuplex.ts"],"names":[],"mappings":";;;AAAA,qDAAmD;AAMnD,SAAgB,MAAM,CACrB,MAA0C,EAC1C,EAAyB;IAEzB,MAAM,OAAO,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACvC,IAAI,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,QAAQ,EAAE;YACxC,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;SACjD;aAAM;YACN,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;SAC5B;KACD;IAED,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAA;AAClD,CAAC;AAdD,wBAcC;AASD,MAAa,cAAe,SAAQ,wBAAM;IAazC,YAAY,IAAoB,EAAE,KAAgB,EAAE,MAAiB;QACpE,KAAK,CAAC;YACL,UAAU,EAAE,IAAI;SAChB,CAAC,CAAA;QACF,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAA;QAEpB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACrB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,I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AAG,CAAC,EAAE;YAClC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,EAAG,CAAA;YACxD,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAA;SACtC;IACF,CAAC;CACD;AA3ED,wCA2EC"}
|
||||
10
VApp/node_modules/mqtt/build/lib/PingTimer.d.ts
generated
vendored
Normal file
10
VApp/node_modules/mqtt/build/lib/PingTimer.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export default class PingTimer {
|
||||
private keepalive;
|
||||
private timer;
|
||||
private checkPing;
|
||||
private _setTimeout;
|
||||
private _clearTimeout;
|
||||
constructor(keepalive: number, checkPing: () => void);
|
||||
clear(): void;
|
||||
reschedule(): void;
|
||||
}
|
||||
55
VApp/node_modules/mqtt/build/lib/PingTimer.js
generated
vendored
Normal file
55
VApp/node_modules/mqtt/build/lib/PingTimer.js
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const worker_timers_1 = require("worker-timers");
|
||||
const is_browser_1 = __importStar(require("./is-browser"));
|
||||
class PingTimer {
|
||||
constructor(keepalive, checkPing) {
|
||||
this._setTimeout = is_browser_1.default && !is_browser_1.isWebWorker
|
||||
? worker_timers_1.setTimeout
|
||||
: (func, time) => setTimeout(func, time);
|
||||
this._clearTimeout = is_browser_1.default && !is_browser_1.isWebWorker ? worker_timers_1.clearTimeout : (timer) => clearTimeout(timer);
|
||||
this.keepalive = keepalive * 1000;
|
||||
this.checkPing = checkPing;
|
||||
this.reschedule();
|
||||
}
|
||||
clear() {
|
||||
if (this.timer) {
|
||||
this._clearTimeout(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
}
|
||||
reschedule() {
|
||||
this.clear();
|
||||
this.timer = this._setTimeout(() => {
|
||||
this.checkPing();
|
||||
if (this.timer) {
|
||||
this.reschedule();
|
||||
}
|
||||
}, this.keepalive);
|
||||
}
|
||||
}
|
||||
exports.default = PingTimer;
|
||||
//# sourceMappingURL=PingTimer.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/PingTimer.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/PingTimer.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"PingTimer.js","sourceRoot":"","sources":["../../src/lib/PingTimer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA0E;AAC1E,2DAAqD;AAErD,MAAqB,SAAS;IAiB7B,YAAY,SAAiB,EAAE,SAAqB;QAR5C,gBAAW,GAClB,oBAAS,IAAI,CAAC,wBAAW;YACxB,CAAC,CAAC,0BAAI;YACN,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QAElC,kBAAa,GACpB,oBAAS,IAAI,CAAC,wBAAW,CAAC,CAAC,CAAC,4BAAM,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;QAGnE,IAAI,CAAC,SAAS,GAAG,SAAS,GAAG,IAAI,CAAA;QACjC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,UAAU,EAAE,CAAA;IAClB,CAAC;IAED,KAAK;QACJ,IAAI,IAAI,CAAC,KAAK,EAAE;YACf,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;YAC9B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;SACjB;IACF,CAAC;IAED,UAAU;QACT,IAAI,CAAC,KAAK,EAAE,CAAA;QACZ,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE;YAClC,IAAI,CAAC,SAAS,EAAE,CAAA;YAGhB,IAAI,IAAI,CAAC,KAAK,EAAE;gBACf,IAAI,CAAC,UAAU,EAAE,CAAA;aACjB;QACF,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IACnB,CAAC;CACD;AAzCD,4BAyCC"}
|
||||
19
VApp/node_modules/mqtt/build/lib/TypedEmitter.d.ts
generated
vendored
Normal file
19
VApp/node_modules/mqtt/build/lib/TypedEmitter.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
export type EventHandler = ((arg1: any, arg2: any, arg3: any, arg4: any) => void) | ((arg1: any, arg2: any, arg3: any) => void) | ((arg1: any, arg2: any) => void) | ((arg1: any) => void) | ((...args: any[]) => void);
|
||||
export interface TypedEventEmitter<TEvents extends Record<keyof TEvents, EventHandler>> {
|
||||
on<TEvent extends keyof TEvents>(event: TEvent, callback: TEvents[TEvent]): this;
|
||||
once<TEvent extends keyof TEvents>(event: TEvent, callback: TEvents[TEvent]): this;
|
||||
prependListener<TEvent extends keyof TEvents>(event: TEvent, callback: TEvents[TEvent]): this;
|
||||
prependOnceListener<TEvent extends keyof TEvents>(event: TEvent, callback: TEvents[TEvent]): this;
|
||||
removeListener<TEvent extends keyof TEvents>(event: TEvent, callback: TEvents[TEvent]): this;
|
||||
off<TEvent extends keyof TEvents>(event: TEvent, callback: TEvents[TEvent]): this;
|
||||
removeAllListeners(event?: keyof TEvents): this;
|
||||
emit<TEvent extends keyof TEvents>(event: TEvent, ...args: Parameters<TEvents[TEvent]>): boolean;
|
||||
setMaxListeners(n: number): this;
|
||||
getMaxListeners(): number;
|
||||
listeners<TEvent extends keyof TEvents>(eventName: TEvent): TEvents[TEvent][];
|
||||
rawListeners<TEvent extends keyof TEvents>(eventName: TEvent): TEvents[TEvent][];
|
||||
listenerCount<TEvent extends keyof TEvents>(event: TEvent, listener?: TEvents[TEvent]): number;
|
||||
eventNames(): Array<keyof TEvents>;
|
||||
}
|
||||
export declare class TypedEventEmitter<TEvents extends Record<keyof TEvents, EventHandler>> {
|
||||
}
|
||||
13
VApp/node_modules/mqtt/build/lib/TypedEmitter.js
generated
vendored
Normal file
13
VApp/node_modules/mqtt/build/lib/TypedEmitter.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.TypedEventEmitter = void 0;
|
||||
const events_1 = __importDefault(require("events"));
|
||||
const shared_1 = require("./shared");
|
||||
class TypedEventEmitter {
|
||||
}
|
||||
exports.TypedEventEmitter = TypedEventEmitter;
|
||||
(0, shared_1.applyMixin)(TypedEventEmitter, events_1.default);
|
||||
//# sourceMappingURL=TypedEmitter.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/TypedEmitter.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/TypedEmitter.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"TypedEmitter.js","sourceRoot":"","sources":["../../src/lib/TypedEmitter.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAiC;AACjC,qCAAqC;AAgErC,MAAa,iBAAiB;CAE1B;AAFJ,8CAEI;AAGJ,IAAA,mBAAU,EAAC,iBAAiB,EAAE,gBAAY,CAAC,CAAA"}
|
||||
223
VApp/node_modules/mqtt/build/lib/client.d.ts
generated
vendored
Normal file
223
VApp/node_modules/mqtt/build/lib/client.d.ts
generated
vendored
Normal file
@@ -0,0 +1,223 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import { IAuthPacket, IConnackPacket, IDisconnectPacket, IPublishPacket, ISubscribePacket, Packet, QoS, IConnectPacket } from 'mqtt-packet';
|
||||
import { IMessageIdProvider } from './default-message-id-provider';
|
||||
import { DuplexOptions } from 'readable-stream';
|
||||
import Store, { IStore } from './store';
|
||||
import { ClientOptions } from 'ws';
|
||||
import { ClientRequestArgs } from 'http';
|
||||
import { DoneCallback, ErrorWithReasonCode, IStream, StreamBuilder, VoidCallback } from './shared';
|
||||
import { TypedEventEmitter } from './TypedEmitter';
|
||||
import PingTimer from './PingTimer';
|
||||
export type MqttProtocol = 'wss' | 'ws' | 'mqtt' | 'mqtts' | 'tcp' | 'ssl' | 'wx' | 'wxs' | 'ali' | 'alis';
|
||||
export type StorePutCallback = () => void;
|
||||
export interface ISecureClientOptions {
|
||||
key?: string | string[] | Buffer | Buffer[] | any[];
|
||||
keyPath?: string;
|
||||
cert?: string | string[] | Buffer | Buffer[];
|
||||
certPath?: string;
|
||||
ca?: string | string[] | Buffer | Buffer[];
|
||||
caPaths?: string | string[];
|
||||
rejectUnauthorized?: boolean;
|
||||
ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
|
||||
}
|
||||
export type AckHandler = (topic: string, message: Buffer, packet: any, cb: (error: Error | number, code?: number) => void) => void;
|
||||
export interface IClientOptions extends ISecureClientOptions {
|
||||
encoding?: BufferEncoding;
|
||||
browserBufferSize?: number;
|
||||
binary?: boolean;
|
||||
my?: any;
|
||||
manualConnect?: boolean;
|
||||
authPacket?: Partial<IAuthPacket>;
|
||||
writeCache?: boolean;
|
||||
servername?: string;
|
||||
defaultProtocol?: MqttProtocol;
|
||||
query?: Record<string, string>;
|
||||
auth?: string;
|
||||
customHandleAcks?: AckHandler;
|
||||
port?: number;
|
||||
host?: string;
|
||||
hostname?: string;
|
||||
path?: string;
|
||||
protocol?: MqttProtocol;
|
||||
wsOptions?: ClientOptions | ClientRequestArgs | DuplexOptions;
|
||||
reconnectPeriod?: number;
|
||||
connectTimeout?: number;
|
||||
incomingStore?: IStore;
|
||||
outgoingStore?: IStore;
|
||||
queueQoSZero?: boolean;
|
||||
log?: (...args: any[]) => void;
|
||||
autoUseTopicAlias?: boolean;
|
||||
autoAssignTopicAlias?: boolean;
|
||||
reschedulePings?: boolean;
|
||||
servers?: Array<{
|
||||
host: string;
|
||||
port: number;
|
||||
protocol?: 'wss' | 'ws' | 'mqtt' | 'mqtts' | 'tcp' | 'ssl' | 'wx' | 'wxs';
|
||||
}>;
|
||||
resubscribe?: boolean;
|
||||
transformWsUrl?: (url: string, options: IClientOptions, client: MqttClient) => string;
|
||||
createWebsocket?: (url: string, websocketSubProtocols: string[], options: IClientOptions) => any;
|
||||
messageIdProvider?: IMessageIdProvider;
|
||||
browserBufferTimeout?: number;
|
||||
objectMode?: boolean;
|
||||
clientId?: string;
|
||||
protocolVersion?: IConnectPacket['protocolVersion'];
|
||||
protocolId?: IConnectPacket['protocolId'];
|
||||
clean?: boolean;
|
||||
keepalive?: number;
|
||||
username?: string;
|
||||
password?: Buffer | string;
|
||||
will?: IConnectPacket['will'];
|
||||
properties?: IConnectPacket['properties'];
|
||||
}
|
||||
export interface IClientPublishOptions {
|
||||
qos?: QoS;
|
||||
retain?: boolean;
|
||||
dup?: boolean;
|
||||
properties?: IPublishPacket['properties'];
|
||||
cbStorePut?: StorePutCallback;
|
||||
}
|
||||
export interface IClientReconnectOptions {
|
||||
incomingStore?: Store;
|
||||
outgoingStore?: Store;
|
||||
}
|
||||
export interface IClientSubscribeProperties {
|
||||
properties?: ISubscribePacket['properties'];
|
||||
}
|
||||
export interface IClientSubscribeOptions extends IClientSubscribeProperties {
|
||||
qos: QoS;
|
||||
nl?: boolean;
|
||||
rap?: boolean;
|
||||
rh?: number;
|
||||
}
|
||||
export interface ISubscriptionRequest extends IClientSubscribeOptions {
|
||||
topic: string;
|
||||
}
|
||||
export interface ISubscriptionGrant extends Omit<ISubscriptionRequest, 'qos' | 'properties'> {
|
||||
qos: QoS | 128;
|
||||
}
|
||||
export type ISubscriptionMap = {
|
||||
[topic: string]: IClientSubscribeOptions;
|
||||
} & {
|
||||
resubscribe?: boolean;
|
||||
};
|
||||
export { IConnackPacket, IDisconnectPacket, IPublishPacket, Packet };
|
||||
export type OnConnectCallback = (packet: IConnackPacket) => void;
|
||||
export type OnDisconnectCallback = (packet: IDisconnectPacket) => void;
|
||||
export type ClientSubscribeCallback = (err: Error | null, granted?: ISubscriptionGrant[]) => void;
|
||||
export type OnMessageCallback = (topic: string, payload: Buffer, packet: IPublishPacket) => void;
|
||||
export type OnPacketCallback = (packet: Packet) => void;
|
||||
export type OnCloseCallback = () => void;
|
||||
export type OnErrorCallback = (error: Error | ErrorWithReasonCode) => void;
|
||||
export type PacketCallback = (error?: Error, packet?: Packet) => any;
|
||||
export type CloseCallback = (error?: Error) => void;
|
||||
export interface MqttClientEventCallbacks {
|
||||
connect: OnConnectCallback;
|
||||
message: OnMessageCallback;
|
||||
packetsend: OnPacketCallback;
|
||||
packetreceive: OnPacketCallback;
|
||||
disconnect: OnDisconnectCallback;
|
||||
error: OnErrorCallback;
|
||||
close: OnCloseCallback;
|
||||
end: VoidCallback;
|
||||
reconnect: VoidCallback;
|
||||
offline: VoidCallback;
|
||||
outgoingEmpty: VoidCallback;
|
||||
}
|
||||
export default class MqttClient extends TypedEventEmitter<MqttClientEventCallbacks> {
|
||||
connected: boolean;
|
||||
disconnecting: boolean;
|
||||
disconnected: boolean;
|
||||
reconnecting: boolean;
|
||||
incomingStore: IStore;
|
||||
outgoingStore: IStore;
|
||||
options: IClientOptions;
|
||||
queueQoSZero: boolean;
|
||||
_reconnectCount: number;
|
||||
log: (...args: any[]) => void;
|
||||
messageIdProvider: IMessageIdProvider;
|
||||
pingResp: boolean;
|
||||
outgoing: Record<number, {
|
||||
volatile: boolean;
|
||||
cb: (err: Error, packet?: Packet) => void;
|
||||
}>;
|
||||
messageIdToTopic: Record<number, string[]>;
|
||||
noop: (error?: any) => void;
|
||||
pingTimer: PingTimer;
|
||||
stream: IStream;
|
||||
queue: {
|
||||
packet: Packet;
|
||||
cb: PacketCallback;
|
||||
}[];
|
||||
private streamBuilder;
|
||||
private _resubscribeTopics;
|
||||
private connackTimer;
|
||||
private reconnectTimer;
|
||||
private _storeProcessing;
|
||||
private _packetIdsDuringStoreProcessing;
|
||||
private _storeProcessingQueue;
|
||||
private _firstConnection;
|
||||
private topicAliasRecv;
|
||||
private topicAliasSend;
|
||||
private _deferredReconnect;
|
||||
private connackPacket;
|
||||
static defaultId(): string;
|
||||
constructor(streamBuilder: StreamBuilder, options: IClientOptions);
|
||||
handleAuth(packet: IAuthPacket, callback: PacketCallback): void;
|
||||
handleMessage(packet: IPublishPacket, callback: DoneCallback): void;
|
||||
private _nextId;
|
||||
getLastMessageId(): number;
|
||||
connect(): this;
|
||||
publish(topic: string, message: string | Buffer): MqttClient;
|
||||
publish(topic: string, message: string | Buffer, callback?: PacketCallback): MqttClient;
|
||||
publish(topic: string, message: string | Buffer, opts?: IClientPublishOptions, callback?: PacketCallback): MqttClient;
|
||||
publishAsync(topic: string, message: string | Buffer): Promise<Packet | undefined>;
|
||||
publishAsync(topic: string, message: string | Buffer, opts?: IClientPublishOptions): Promise<Packet | undefined>;
|
||||
subscribe(topicObject: string | string[] | ISubscriptionMap): MqttClient;
|
||||
subscribe(topicObject: string | string[] | ISubscriptionMap, callback?: ClientSubscribeCallback): MqttClient;
|
||||
subscribe(topicObject: string | string[] | ISubscriptionMap, opts?: IClientSubscribeOptions | IClientSubscribeProperties): MqttClient;
|
||||
subscribe(topicObject: string | string[] | ISubscriptionMap, opts?: IClientSubscribeOptions | IClientSubscribeProperties, callback?: ClientSubscribeCallback): MqttClient;
|
||||
subscribeAsync(topicObject: string | string[] | ISubscriptionMap): Promise<ISubscriptionGrant[]>;
|
||||
subscribeAsync(topicObject: string | string[] | ISubscriptionMap, opts?: IClientSubscribeOptions | IClientSubscribeProperties): Promise<ISubscriptionGrant[]>;
|
||||
unsubscribe(topic: string | string[]): MqttClient;
|
||||
unsubscribe(topic: string | string[], opts?: IClientSubscribeOptions): MqttClient;
|
||||
unsubscribe(topic: string | string[], callback?: PacketCallback): MqttClient;
|
||||
unsubscribe(topic: string | string[], opts?: IClientSubscribeOptions, callback?: PacketCallback): MqttClient;
|
||||
unsubscribeAsync(topic: string | string[]): Promise<Packet | undefined>;
|
||||
unsubscribeAsync(topic: string | string[], opts?: IClientSubscribeOptions): Promise<Packet | undefined>;
|
||||
end(cb?: DoneCallback): MqttClient;
|
||||
end(force?: boolean): MqttClient;
|
||||
end(opts?: Partial<IDisconnectPacket>, cb?: DoneCallback): MqttClient;
|
||||
end(force?: boolean, cb?: DoneCallback): MqttClient;
|
||||
end(force?: boolean, opts?: Partial<IDisconnectPacket>, cb?: DoneCallback): MqttClient;
|
||||
endAsync(): Promise<void>;
|
||||
endAsync(force?: boolean): Promise<void>;
|
||||
endAsync(opts?: Partial<IDisconnectPacket>): Promise<void>;
|
||||
endAsync(force?: boolean, opts?: Partial<IDisconnectPacket>): Promise<void>;
|
||||
removeOutgoingMessage(messageId: number): MqttClient;
|
||||
reconnect(opts?: Pick<IClientOptions, 'incomingStore' | 'outgoingStore'>): MqttClient;
|
||||
private _flushVolatile;
|
||||
private _flush;
|
||||
private _removeTopicAliasAndRecoverTopicName;
|
||||
private _checkDisconnecting;
|
||||
private _reconnect;
|
||||
private _setupReconnect;
|
||||
private _clearReconnect;
|
||||
private _cleanUp;
|
||||
private _storeAndSend;
|
||||
private _applyTopicAlias;
|
||||
private _noop;
|
||||
private _writePacket;
|
||||
private _sendPacket;
|
||||
private _storePacket;
|
||||
private _setupPingTimer;
|
||||
private _shiftPingInterval;
|
||||
private _checkPing;
|
||||
private _resubscribe;
|
||||
private _onConnect;
|
||||
private _invokeStoreProcessingQueue;
|
||||
private _invokeAllStoreProcessingQueue;
|
||||
private _flushStoreProcessingQueue;
|
||||
private _removeOutgoingAndStoreMessage;
|
||||
}
|
||||
1194
VApp/node_modules/mqtt/build/lib/client.js
generated
vendored
Normal file
1194
VApp/node_modules/mqtt/build/lib/client.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
VApp/node_modules/mqtt/build/lib/client.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/client.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
VApp/node_modules/mqtt/build/lib/connect/ali.d.ts
generated
vendored
Normal file
3
VApp/node_modules/mqtt/build/lib/connect/ali.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { StreamBuilder } from '../shared';
|
||||
declare const buildStream: StreamBuilder;
|
||||
export default buildStream;
|
||||
108
VApp/node_modules/mqtt/build/lib/connect/ali.js
generated
vendored
Normal file
108
VApp/node_modules/mqtt/build/lib/connect/ali.js
generated
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const buffer_1 = require("buffer");
|
||||
const readable_stream_1 = require("readable-stream");
|
||||
const BufferedDuplex_1 = require("../BufferedDuplex");
|
||||
let my;
|
||||
let proxy;
|
||||
let stream;
|
||||
let isInitialized = false;
|
||||
function buildProxy() {
|
||||
const _proxy = new readable_stream_1.Transform();
|
||||
_proxy._write = (chunk, encoding, next) => {
|
||||
my.sendSocketMessage({
|
||||
data: chunk.buffer,
|
||||
success() {
|
||||
next();
|
||||
},
|
||||
fail() {
|
||||
next(new Error());
|
||||
},
|
||||
});
|
||||
};
|
||||
_proxy._flush = (done) => {
|
||||
my.closeSocket({
|
||||
success() {
|
||||
done();
|
||||
},
|
||||
});
|
||||
};
|
||||
return _proxy;
|
||||
}
|
||||
function setDefaultOpts(opts) {
|
||||
if (!opts.hostname) {
|
||||
opts.hostname = 'localhost';
|
||||
}
|
||||
if (!opts.path) {
|
||||
opts.path = '/';
|
||||
}
|
||||
if (!opts.wsOptions) {
|
||||
opts.wsOptions = {};
|
||||
}
|
||||
}
|
||||
function buildUrl(opts, client) {
|
||||
const protocol = opts.protocol === 'alis' ? 'wss' : 'ws';
|
||||
let url = `${protocol}://${opts.hostname}${opts.path}`;
|
||||
if (opts.port && opts.port !== 80 && opts.port !== 443) {
|
||||
url = `${protocol}://${opts.hostname}:${opts.port}${opts.path}`;
|
||||
}
|
||||
if (typeof opts.transformWsUrl === 'function') {
|
||||
url = opts.transformWsUrl(url, opts, client);
|
||||
}
|
||||
return url;
|
||||
}
|
||||
function bindEventHandler() {
|
||||
if (isInitialized)
|
||||
return;
|
||||
isInitialized = true;
|
||||
my.onSocketOpen(() => {
|
||||
stream.socketReady();
|
||||
});
|
||||
my.onSocketMessage((res) => {
|
||||
if (typeof res.data === 'string') {
|
||||
const buffer = buffer_1.Buffer.from(res.data, 'base64');
|
||||
proxy.push(buffer);
|
||||
}
|
||||
else {
|
||||
const reader = new FileReader();
|
||||
reader.addEventListener('load', () => {
|
||||
let data = reader.result;
|
||||
if (data instanceof ArrayBuffer)
|
||||
data = buffer_1.Buffer.from(data);
|
||||
else
|
||||
data = buffer_1.Buffer.from(data, 'utf8');
|
||||
proxy.push(data);
|
||||
});
|
||||
reader.readAsArrayBuffer(res.data);
|
||||
}
|
||||
});
|
||||
my.onSocketClose(() => {
|
||||
stream.end();
|
||||
stream.destroy();
|
||||
});
|
||||
my.onSocketError((err) => {
|
||||
stream.destroy(err);
|
||||
});
|
||||
}
|
||||
const buildStream = (client, opts) => {
|
||||
opts.hostname = opts.hostname || opts.host;
|
||||
if (!opts.hostname) {
|
||||
throw new Error('Could not determine host. Specify host manually.');
|
||||
}
|
||||
const websocketSubProtocol = opts.protocolId === 'MQIsdp' && opts.protocolVersion === 3
|
||||
? 'mqttv3.1'
|
||||
: 'mqtt';
|
||||
setDefaultOpts(opts);
|
||||
const url = buildUrl(opts, client);
|
||||
my = opts.my;
|
||||
my.connectSocket({
|
||||
url,
|
||||
protocols: websocketSubProtocol,
|
||||
});
|
||||
proxy = buildProxy();
|
||||
stream = new BufferedDuplex_1.BufferedDuplex(opts, proxy, my);
|
||||
bindEventHandler();
|
||||
return stream;
|
||||
};
|
||||
exports.default = buildStream;
|
||||
//# sourceMappingURL=ali.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/connect/ali.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/connect/ali.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ali.js","sourceRoot":"","sources":["../../../src/lib/connect/ali.ts"],"names":[],"mappings":";;AAAA,mCAA+B;AAC/B,qDAA2C;AAG3C,sDAAkD;AAElD,IAAI,EAAO,CAAA;AACX,IAAI,KAAgB,CAAA;AACpB,IAAI,MAAsB,CAAA;AAC1B,IAAI,aAAa,GAAG,KAAK,CAAA;AAEzB,SAAS,UAAU;IAClB,MAAM,MAAM,GAAG,IAAI,2BAAS,EAAE,CAAA;IAC9B,MAAM,CAAC,MAAM,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;QACzC,EAAE,CAAC,iBAAiB,CAAC;YACpB,IAAI,EAAE,KAAK,CAAC,MAAM;YAClB,OAAO;gBACN,IAAI,EAAE,CAAA;YACP,CAAC;YACD,IAAI;gBACH,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,CAAA;YAClB,CAAC;SACD,CAAC,CAAA;IACH,CAAC,CAAA;IACD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AAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAA;IAE1C,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;QACnB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;KACnE;IAED,MAAM,oBAAoB,GACzB,IAAI,CAAC,UAAU,KAAK,QAAQ,IAAI,IAAI,CAAC,eAAe,KAAK,CAAC;QACzD,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,MAAM,CAAA;IAEV,cAAc,CAAC,IAAI,CAAC,CAAA;IAEpB,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAClC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAA;IAEZ,EAAE,CAAC,aAAa,CAAC;QAChB,GAAG;QACH,SAAS,EAAE,oBAAoB;KAC/B,CAAC,CAAA;IAEF,KAAK,GAAG,UAAU,EAAE,CAAA;IACpB,MAAM,GAAG,IAAI,+BAAc,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAA;IAE5C,gBAAgB,EAAE,CAAA;IAElB,OAAO,MAAM,CAAA;AACd,CAAC,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
||||
9
VApp/node_modules/mqtt/build/lib/connect/index.d.ts
generated
vendored
Normal file
9
VApp/node_modules/mqtt/build/lib/connect/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import MqttClient, { IClientOptions } from '../client';
|
||||
declare function connect(brokerUrl: string): MqttClient;
|
||||
declare function connect(opts: IClientOptions): MqttClient;
|
||||
declare function connect(brokerUrl: string, opts?: IClientOptions): MqttClient;
|
||||
declare function connectAsync(brokerUrl: string): Promise<MqttClient>;
|
||||
declare function connectAsync(opts: IClientOptions): Promise<MqttClient>;
|
||||
declare function connectAsync(brokerUrl: string, opts?: IClientOptions): Promise<MqttClient>;
|
||||
export default connect;
|
||||
export { connectAsync };
|
||||
169
VApp/node_modules/mqtt/build/lib/connect/index.js
generated
vendored
Normal file
169
VApp/node_modules/mqtt/build/lib/connect/index.js
generated
vendored
Normal file
@@ -0,0 +1,169 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.connectAsync = void 0;
|
||||
const debug_1 = __importDefault(require("debug"));
|
||||
const url_1 = __importDefault(require("url"));
|
||||
const client_1 = __importDefault(require("../client"));
|
||||
const is_browser_1 = __importDefault(require("../is-browser"));
|
||||
const debug = (0, debug_1.default)('mqttjs');
|
||||
const protocols = {};
|
||||
if (!is_browser_1.default) {
|
||||
protocols.mqtt = require('./tcp').default;
|
||||
protocols.tcp = require('./tcp').default;
|
||||
protocols.ssl = require('./tls').default;
|
||||
protocols.tls = protocols.ssl;
|
||||
protocols.mqtts = require('./tls').default;
|
||||
}
|
||||
else {
|
||||
protocols.wx = require('./wx').default;
|
||||
protocols.wxs = require('./wx').default;
|
||||
protocols.ali = require('./ali').default;
|
||||
protocols.alis = require('./ali').default;
|
||||
}
|
||||
protocols.ws = require('./ws').default;
|
||||
protocols.wss = require('./ws').default;
|
||||
function parseAuthOptions(opts) {
|
||||
let matches;
|
||||
if (opts.auth) {
|
||||
matches = opts.auth.match(/^(.+):(.+)$/);
|
||||
if (matches) {
|
||||
opts.username = matches[1];
|
||||
opts.password = matches[2];
|
||||
}
|
||||
else {
|
||||
opts.username = opts.auth;
|
||||
}
|
||||
}
|
||||
}
|
||||
function connect(brokerUrl, opts) {
|
||||
debug('connecting to an MQTT broker...');
|
||||
if (typeof brokerUrl === 'object' && !opts) {
|
||||
opts = brokerUrl;
|
||||
brokerUrl = '';
|
||||
}
|
||||
opts = opts || {};
|
||||
if (brokerUrl && typeof brokerUrl === 'string') {
|
||||
const parsed = url_1.default.parse(brokerUrl, true);
|
||||
if (parsed.port != null) {
|
||||
parsed.port = Number(parsed.port);
|
||||
}
|
||||
opts = Object.assign(Object.assign({}, parsed), opts);
|
||||
if (opts.protocol === null) {
|
||||
throw new Error('Missing protocol');
|
||||
}
|
||||
opts.protocol = opts.protocol.replace(/:$/, '');
|
||||
}
|
||||
parseAuthOptions(opts);
|
||||
if (opts.query && typeof opts.query.clientId === 'string') {
|
||||
opts.clientId = opts.query.clientId;
|
||||
}
|
||||
if (opts.cert && opts.key) {
|
||||
if (opts.protocol) {
|
||||
if (['mqtts', 'wss', 'wxs', 'alis'].indexOf(opts.protocol) === -1) {
|
||||
switch (opts.protocol) {
|
||||
case 'mqtt':
|
||||
opts.protocol = 'mqtts';
|
||||
break;
|
||||
case 'ws':
|
||||
opts.protocol = 'wss';
|
||||
break;
|
||||
case 'wx':
|
||||
opts.protocol = 'wxs';
|
||||
break;
|
||||
case 'ali':
|
||||
opts.protocol = 'alis';
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unknown protocol for secure connection: "${opts.protocol}"!`);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw new Error('Missing secure protocol key');
|
||||
}
|
||||
}
|
||||
if (!protocols[opts.protocol]) {
|
||||
const isSecure = ['mqtts', 'wss'].indexOf(opts.protocol) !== -1;
|
||||
opts.protocol = [
|
||||
'mqtt',
|
||||
'mqtts',
|
||||
'ws',
|
||||
'wss',
|
||||
'wx',
|
||||
'wxs',
|
||||
'ali',
|
||||
'alis',
|
||||
].filter((key, index) => {
|
||||
if (isSecure && index % 2 === 0) {
|
||||
return false;
|
||||
}
|
||||
return typeof protocols[key] === 'function';
|
||||
})[0];
|
||||
}
|
||||
if (opts.clean === false && !opts.clientId) {
|
||||
throw new Error('Missing clientId for unclean clients');
|
||||
}
|
||||
if (opts.protocol) {
|
||||
opts.defaultProtocol = opts.protocol;
|
||||
}
|
||||
function wrapper(client) {
|
||||
if (opts.servers) {
|
||||
if (!client._reconnectCount ||
|
||||
client._reconnectCount === opts.servers.length) {
|
||||
client._reconnectCount = 0;
|
||||
}
|
||||
opts.host = opts.servers[client._reconnectCount].host;
|
||||
opts.port = opts.servers[client._reconnectCount].port;
|
||||
opts.protocol = !opts.servers[client._reconnectCount].protocol
|
||||
? opts.defaultProtocol
|
||||
: opts.servers[client._reconnectCount].protocol;
|
||||
opts.hostname = opts.host;
|
||||
client._reconnectCount++;
|
||||
}
|
||||
debug('calling streambuilder for', opts.protocol);
|
||||
return protocols[opts.protocol](client, opts);
|
||||
}
|
||||
const client = new client_1.default(wrapper, opts);
|
||||
client.on('error', () => {
|
||||
});
|
||||
return client;
|
||||
}
|
||||
function connectAsync(brokerUrl, opts, allowRetries = true) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const client = connect(brokerUrl, opts);
|
||||
const promiseResolutionListeners = {
|
||||
connect: (connack) => {
|
||||
removePromiseResolutionListeners();
|
||||
resolve(client);
|
||||
},
|
||||
end: () => {
|
||||
removePromiseResolutionListeners();
|
||||
resolve(client);
|
||||
},
|
||||
error: (err) => {
|
||||
removePromiseResolutionListeners();
|
||||
client.end();
|
||||
reject(err);
|
||||
},
|
||||
};
|
||||
if (allowRetries === false) {
|
||||
promiseResolutionListeners.close = () => {
|
||||
promiseResolutionListeners.error(new Error("Couldn't connect to server"));
|
||||
};
|
||||
}
|
||||
function removePromiseResolutionListeners() {
|
||||
Object.keys(promiseResolutionListeners).forEach((eventName) => {
|
||||
client.off(eventName, promiseResolutionListeners[eventName]);
|
||||
});
|
||||
}
|
||||
Object.keys(promiseResolutionListeners).forEach((eventName) => {
|
||||
client.on(eventName, promiseResolutionListeners[eventName]);
|
||||
});
|
||||
});
|
||||
}
|
||||
exports.connectAsync = connectAsync;
|
||||
exports.default = connect;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/connect/index.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/connect/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
VApp/node_modules/mqtt/build/lib/connect/tcp.d.ts
generated
vendored
Normal file
3
VApp/node_modules/mqtt/build/lib/connect/tcp.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { StreamBuilder } from '../shared';
|
||||
declare const buildStream: StreamBuilder;
|
||||
export default buildStream;
|
||||
18
VApp/node_modules/mqtt/build/lib/connect/tcp.js
generated
vendored
Normal file
18
VApp/node_modules/mqtt/build/lib/connect/tcp.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const net_1 = __importDefault(require("net"));
|
||||
const debug_1 = __importDefault(require("debug"));
|
||||
const debug = (0, debug_1.default)('mqttjs:tcp');
|
||||
const buildStream = (client, opts) => {
|
||||
opts.port = opts.port || 1883;
|
||||
opts.hostname = opts.hostname || opts.host || 'localhost';
|
||||
const { port } = opts;
|
||||
const host = opts.hostname;
|
||||
debug('port %d and host %s', port, host);
|
||||
return net_1.default.createConnection(port, host);
|
||||
};
|
||||
exports.default = buildStream;
|
||||
//# sourceMappingURL=tcp.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/connect/tcp.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/connect/tcp.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tcp.js","sourceRoot":"","sources":["../../../src/lib/connect/tcp.ts"],"names":[],"mappings":";;;;;AAEA,8CAAqB;AACrB,kDAA0B;AAG1B,MAAM,KAAK,GAAG,IAAA,eAAM,EAAC,YAAY,CAAC,CAAA;AAKlC,MAAM,WAAW,GAAkB,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;IACnD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAA;IAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,IAAI,WAAW,CAAA;IAEzD,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;IACrB,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAA;IAE1B,KAAK,CAAC,qBAAqB,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;IACxC,OAAO,aAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AACxC,CAAC,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
||||
3
VApp/node_modules/mqtt/build/lib/connect/tls.d.ts
generated
vendored
Normal file
3
VApp/node_modules/mqtt/build/lib/connect/tls.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { StreamBuilder } from '../shared';
|
||||
declare const buildStream: StreamBuilder;
|
||||
export default buildStream;
|
||||
38
VApp/node_modules/mqtt/build/lib/connect/tls.js
generated
vendored
Normal file
38
VApp/node_modules/mqtt/build/lib/connect/tls.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tls_1 = __importDefault(require("tls"));
|
||||
const net_1 = __importDefault(require("net"));
|
||||
const debug_1 = __importDefault(require("debug"));
|
||||
const debug = (0, debug_1.default)('mqttjs:tls');
|
||||
const buildStream = (client, opts) => {
|
||||
opts.port = opts.port || 8883;
|
||||
opts.host = opts.hostname || opts.host || 'localhost';
|
||||
if (net_1.default.isIP(opts.host) === 0) {
|
||||
opts.servername = opts.host;
|
||||
}
|
||||
opts.rejectUnauthorized = opts.rejectUnauthorized !== false;
|
||||
delete opts.path;
|
||||
debug('port %d host %s rejectUnauthorized %b', opts.port, opts.host, opts.rejectUnauthorized);
|
||||
const connection = tls_1.default.connect(opts);
|
||||
connection.on('secureConnect', () => {
|
||||
if (opts.rejectUnauthorized && !connection.authorized) {
|
||||
connection.emit('error', new Error('TLS not authorized'));
|
||||
}
|
||||
else {
|
||||
connection.removeListener('error', handleTLSerrors);
|
||||
}
|
||||
});
|
||||
function handleTLSerrors(err) {
|
||||
if (opts.rejectUnauthorized) {
|
||||
client.emit('error', err);
|
||||
}
|
||||
connection.end();
|
||||
}
|
||||
connection.on('error', handleTLSerrors);
|
||||
return connection;
|
||||
};
|
||||
exports.default = buildStream;
|
||||
//# sourceMappingURL=tls.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/connect/tls.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/connect/tls.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tls.js","sourceRoot":"","sources":["../../../src/lib/connect/tls.ts"],"names":[],"mappings":";;;;;AAAA,8CAAqB;AACrB,8CAAqB;AACrB,kDAA0B;AAG1B,MAAM,KAAK,GAAG,IAAA,eAAM,EAAC,YAAY,CAAC,CAAA;AAElC,MAAM,WAAW,GAAkB,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;IACnD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAA;IAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,IAAI,WAAW,CAAA;IAErD,IAAI,aAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;QAC9B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAA;KAC3B;IAED,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,KAAK,KAAK,CAAA;IAE3D,OAAO,IAAI,CAAC,IAAI,CAAA;IAEhB,KAAK,CACJ,uCAAuC,EACvC,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,kBAAkB,CACvB,CAAA;IAED,MAAM,UAAU,GAAG,aAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACpC,UAAU,CAAC,EAAE,CAAC,eAAe,EAAE,GAAG,EAAE;QACnC,IAAI,IAAI,CAAC,kBAAkB,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE;YACtD,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAA;SACzD;aAAM;YACN,UAAU,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,CAAC,CAAA;SACnD;IACF,CAAC,CAAC,CAAA;IAEF,SAAS,eAAe,CAAC,GAAU;QAElC,IAAI,IAAI,CAAC,kBAAkB,EAAE;YAC5B,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;SACzB;QAOD,UAAU,CAAC,GAAG,EAAE,CAAA;IACjB,CAAC;IAED,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC,CAAA;IACvC,OAAO,UAAU,CAAA;AAClB,CAAC,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
||||
3
VApp/node_modules/mqtt/build/lib/connect/ws.d.ts
generated
vendored
Normal file
3
VApp/node_modules/mqtt/build/lib/connect/ws.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { StreamBuilder } from '../shared';
|
||||
declare const _default: StreamBuilder;
|
||||
export default _default;
|
||||
215
VApp/node_modules/mqtt/build/lib/connect/ws.js
generated
vendored
Normal file
215
VApp/node_modules/mqtt/build/lib/connect/ws.js
generated
vendored
Normal file
@@ -0,0 +1,215 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const buffer_1 = require("buffer");
|
||||
const ws_1 = __importDefault(require("ws"));
|
||||
const debug_1 = __importDefault(require("debug"));
|
||||
const readable_stream_1 = require("readable-stream");
|
||||
const is_browser_1 = __importDefault(require("../is-browser"));
|
||||
const BufferedDuplex_1 = require("../BufferedDuplex");
|
||||
const debug = (0, debug_1.default)('mqttjs:ws');
|
||||
const WSS_OPTIONS = [
|
||||
'rejectUnauthorized',
|
||||
'ca',
|
||||
'cert',
|
||||
'key',
|
||||
'pfx',
|
||||
'passphrase',
|
||||
];
|
||||
function buildUrl(opts, client) {
|
||||
let url = `${opts.protocol}://${opts.hostname}:${opts.port}${opts.path}`;
|
||||
if (typeof opts.transformWsUrl === 'function') {
|
||||
url = opts.transformWsUrl(url, opts, client);
|
||||
}
|
||||
return url;
|
||||
}
|
||||
function setDefaultOpts(opts) {
|
||||
const options = opts;
|
||||
if (!opts.hostname) {
|
||||
options.hostname = 'localhost';
|
||||
}
|
||||
if (!opts.port) {
|
||||
if (opts.protocol === 'wss') {
|
||||
options.port = 443;
|
||||
}
|
||||
else {
|
||||
options.port = 80;
|
||||
}
|
||||
}
|
||||
if (!opts.path) {
|
||||
options.path = '/';
|
||||
}
|
||||
if (!opts.wsOptions) {
|
||||
options.wsOptions = {};
|
||||
}
|
||||
if (!is_browser_1.default && opts.protocol === 'wss') {
|
||||
WSS_OPTIONS.forEach((prop) => {
|
||||
if (Object.prototype.hasOwnProperty.call(opts, prop) &&
|
||||
!Object.prototype.hasOwnProperty.call(opts.wsOptions, prop)) {
|
||||
options.wsOptions[prop] = opts[prop];
|
||||
}
|
||||
});
|
||||
}
|
||||
return options;
|
||||
}
|
||||
function setDefaultBrowserOpts(opts) {
|
||||
const options = setDefaultOpts(opts);
|
||||
if (!options.hostname) {
|
||||
options.hostname = options.host;
|
||||
}
|
||||
if (!options.hostname) {
|
||||
if (typeof document === 'undefined') {
|
||||
throw new Error('Could not determine host. Specify host manually.');
|
||||
}
|
||||
const parsed = new URL(document.URL);
|
||||
options.hostname = parsed.hostname;
|
||||
if (!options.port) {
|
||||
options.port = Number(parsed.port);
|
||||
}
|
||||
}
|
||||
if (options.objectMode === undefined) {
|
||||
options.objectMode = !(options.binary === true || options.binary === undefined);
|
||||
}
|
||||
return options;
|
||||
}
|
||||
function createWebSocket(client, url, opts) {
|
||||
debug('createWebSocket');
|
||||
debug(`protocol: ${opts.protocolId} ${opts.protocolVersion}`);
|
||||
const websocketSubProtocol = opts.protocolId === 'MQIsdp' && opts.protocolVersion === 3
|
||||
? 'mqttv3.1'
|
||||
: 'mqtt';
|
||||
debug(`creating new Websocket for url: ${url} and protocol: ${websocketSubProtocol}`);
|
||||
let socket;
|
||||
if (opts.createWebsocket) {
|
||||
socket = opts.createWebsocket(url, [websocketSubProtocol], opts);
|
||||
}
|
||||
else {
|
||||
socket = new ws_1.default(url, [websocketSubProtocol], opts.wsOptions);
|
||||
}
|
||||
return socket;
|
||||
}
|
||||
function createBrowserWebSocket(client, opts) {
|
||||
const websocketSubProtocol = opts.protocolId === 'MQIsdp' && opts.protocolVersion === 3
|
||||
? 'mqttv3.1'
|
||||
: 'mqtt';
|
||||
const url = buildUrl(opts, client);
|
||||
let socket;
|
||||
if (opts.createWebsocket) {
|
||||
socket = opts.createWebsocket(url, [websocketSubProtocol], opts);
|
||||
}
|
||||
else {
|
||||
socket = new WebSocket(url, [websocketSubProtocol]);
|
||||
}
|
||||
socket.binaryType = 'arraybuffer';
|
||||
return socket;
|
||||
}
|
||||
const streamBuilder = (client, opts) => {
|
||||
debug('streamBuilder');
|
||||
const options = setDefaultOpts(opts);
|
||||
const url = buildUrl(options, client);
|
||||
const socket = createWebSocket(client, url, options);
|
||||
const webSocketStream = ws_1.default.createWebSocketStream(socket, options.wsOptions);
|
||||
webSocketStream['url'] = url;
|
||||
socket.on('close', () => {
|
||||
webSocketStream.destroy();
|
||||
});
|
||||
return webSocketStream;
|
||||
};
|
||||
const browserStreamBuilder = (client, opts) => {
|
||||
debug('browserStreamBuilder');
|
||||
let stream;
|
||||
const options = setDefaultBrowserOpts(opts);
|
||||
const bufferSize = options.browserBufferSize || 1024 * 512;
|
||||
const bufferTimeout = opts.browserBufferTimeout || 1000;
|
||||
const coerceToBuffer = !opts.objectMode;
|
||||
const socket = createBrowserWebSocket(client, opts);
|
||||
const proxy = buildProxy(opts, socketWriteBrowser, socketEndBrowser);
|
||||
if (!opts.objectMode) {
|
||||
proxy._writev = BufferedDuplex_1.writev.bind(proxy);
|
||||
}
|
||||
proxy.on('close', () => {
|
||||
socket.close();
|
||||
});
|
||||
const eventListenerSupport = typeof socket.addEventListener !== 'undefined';
|
||||
if (socket.readyState === socket.OPEN) {
|
||||
stream = proxy;
|
||||
stream.socket = socket;
|
||||
}
|
||||
else {
|
||||
stream = new BufferedDuplex_1.BufferedDuplex(opts, proxy, socket);
|
||||
if (eventListenerSupport) {
|
||||
socket.addEventListener('open', onOpen);
|
||||
}
|
||||
else {
|
||||
socket.onopen = onOpen;
|
||||
}
|
||||
}
|
||||
if (eventListenerSupport) {
|
||||
socket.addEventListener('close', onClose);
|
||||
socket.addEventListener('error', onError);
|
||||
socket.addEventListener('message', onMessage);
|
||||
}
|
||||
else {
|
||||
socket.onclose = onClose;
|
||||
socket.onerror = onError;
|
||||
socket.onmessage = onMessage;
|
||||
}
|
||||
function buildProxy(pOptions, socketWrite, socketEnd) {
|
||||
const _proxy = new readable_stream_1.Transform({
|
||||
objectMode: pOptions.objectMode,
|
||||
});
|
||||
_proxy._write = socketWrite;
|
||||
_proxy._flush = socketEnd;
|
||||
return _proxy;
|
||||
}
|
||||
function onOpen() {
|
||||
debug('WebSocket onOpen');
|
||||
if (stream instanceof BufferedDuplex_1.BufferedDuplex) {
|
||||
stream.socketReady();
|
||||
}
|
||||
}
|
||||
function onClose(event) {
|
||||
debug('WebSocket onClose', event);
|
||||
stream.end();
|
||||
stream.destroy();
|
||||
}
|
||||
function onError(err) {
|
||||
debug('WebSocket onError', err);
|
||||
const error = new Error('WebSocket error');
|
||||
error['event'] = err;
|
||||
stream.destroy(error);
|
||||
}
|
||||
function onMessage(event) {
|
||||
let { data } = event;
|
||||
if (data instanceof ArrayBuffer)
|
||||
data = buffer_1.Buffer.from(data);
|
||||
else
|
||||
data = buffer_1.Buffer.from(data, 'utf8');
|
||||
proxy.push(data);
|
||||
}
|
||||
function socketWriteBrowser(chunk, enc, next) {
|
||||
if (socket.bufferedAmount > bufferSize) {
|
||||
setTimeout(socketWriteBrowser, bufferTimeout, chunk, enc, next);
|
||||
return;
|
||||
}
|
||||
if (coerceToBuffer && typeof chunk === 'string') {
|
||||
chunk = buffer_1.Buffer.from(chunk, 'utf8');
|
||||
}
|
||||
try {
|
||||
socket.send(chunk);
|
||||
}
|
||||
catch (err) {
|
||||
return next(err);
|
||||
}
|
||||
next();
|
||||
}
|
||||
function socketEndBrowser(done) {
|
||||
socket.close();
|
||||
done();
|
||||
}
|
||||
return stream;
|
||||
};
|
||||
exports.default = is_browser_1.default ? browserStreamBuilder : streamBuilder;
|
||||
//# sourceMappingURL=ws.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/connect/ws.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/connect/ws.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
6
VApp/node_modules/mqtt/build/lib/connect/wx.d.ts
generated
vendored
Normal file
6
VApp/node_modules/mqtt/build/lib/connect/wx.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { StreamBuilder } from '../shared';
|
||||
declare global {
|
||||
const wx: any;
|
||||
}
|
||||
declare const buildStream: StreamBuilder;
|
||||
export default buildStream;
|
||||
115
VApp/node_modules/mqtt/build/lib/connect/wx.js
generated
vendored
Normal file
115
VApp/node_modules/mqtt/build/lib/connect/wx.js
generated
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const buffer_1 = require("buffer");
|
||||
const readable_stream_1 = require("readable-stream");
|
||||
const BufferedDuplex_1 = require("../BufferedDuplex");
|
||||
let socketTask;
|
||||
let proxy;
|
||||
let stream;
|
||||
function buildProxy() {
|
||||
const _proxy = new readable_stream_1.Transform();
|
||||
_proxy._write = (chunk, encoding, next) => {
|
||||
socketTask.send({
|
||||
data: chunk.buffer,
|
||||
success() {
|
||||
next();
|
||||
},
|
||||
fail(errMsg) {
|
||||
next(new Error(errMsg));
|
||||
},
|
||||
});
|
||||
};
|
||||
_proxy._flush = (done) => {
|
||||
socketTask.close({
|
||||
success() {
|
||||
done();
|
||||
},
|
||||
});
|
||||
};
|
||||
return _proxy;
|
||||
}
|
||||
function setDefaultOpts(opts) {
|
||||
if (!opts.hostname) {
|
||||
opts.hostname = 'localhost';
|
||||
}
|
||||
if (!opts.path) {
|
||||
opts.path = '/';
|
||||
}
|
||||
if (!opts.wsOptions) {
|
||||
opts.wsOptions = {};
|
||||
}
|
||||
}
|
||||
function buildUrl(opts, client) {
|
||||
const protocol = opts.protocol === 'wxs' ? 'wss' : 'ws';
|
||||
let url = `${protocol}://${opts.hostname}${opts.path}`;
|
||||
if (opts.port && opts.port !== 80 && opts.port !== 443) {
|
||||
url = `${protocol}://${opts.hostname}:${opts.port}${opts.path}`;
|
||||
}
|
||||
if (typeof opts.transformWsUrl === 'function') {
|
||||
url = opts.transformWsUrl(url, opts, client);
|
||||
}
|
||||
return url;
|
||||
}
|
||||
function bindEventHandler() {
|
||||
socketTask.onOpen(() => {
|
||||
stream.socketReady();
|
||||
});
|
||||
socketTask.onMessage((res) => {
|
||||
let { data } = res;
|
||||
if (data instanceof ArrayBuffer)
|
||||
data = buffer_1.Buffer.from(data);
|
||||
else
|
||||
data = buffer_1.Buffer.from(data, 'utf8');
|
||||
proxy.push(data);
|
||||
});
|
||||
socketTask.onClose(() => {
|
||||
stream.emit('close');
|
||||
stream.end();
|
||||
stream.destroy();
|
||||
});
|
||||
socketTask.onError((error) => {
|
||||
const err = new Error(error.errMsg);
|
||||
stream.destroy(err);
|
||||
});
|
||||
}
|
||||
const buildStream = (client, opts) => {
|
||||
opts.hostname = opts.hostname || opts.host;
|
||||
if (!opts.hostname) {
|
||||
throw new Error('Could not determine host. Specify host manually.');
|
||||
}
|
||||
const websocketSubProtocol = opts.protocolId === 'MQIsdp' && opts.protocolVersion === 3
|
||||
? 'mqttv3.1'
|
||||
: 'mqtt';
|
||||
setDefaultOpts(opts);
|
||||
const url = buildUrl(opts, client);
|
||||
socketTask = wx.connectSocket({
|
||||
url,
|
||||
protocols: [websocketSubProtocol],
|
||||
});
|
||||
proxy = buildProxy();
|
||||
stream = new BufferedDuplex_1.BufferedDuplex(opts, proxy, socketTask);
|
||||
stream._destroy = (err, cb) => {
|
||||
socketTask.close({
|
||||
success() {
|
||||
if (cb)
|
||||
cb(err);
|
||||
},
|
||||
});
|
||||
};
|
||||
const destroyRef = stream.destroy;
|
||||
stream.destroy = (err, cb) => {
|
||||
stream.destroy = destroyRef;
|
||||
setTimeout(() => {
|
||||
socketTask.close({
|
||||
fail() {
|
||||
stream._destroy(err, cb);
|
||||
},
|
||||
});
|
||||
}, 0);
|
||||
return stream;
|
||||
};
|
||||
bindEventHandler();
|
||||
return stream;
|
||||
};
|
||||
exports.default = buildStream;
|
||||
//# sourceMappingURL=wx.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/connect/wx.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/connect/wx.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"wx.js","sourceRoot":"","sources":["../../../src/lib/connect/wx.ts"],"names":[],"mappings":";;AAEA,mCAA+B;AAC/B,qDAA2C;AAE3C,sDAAkD;AAGlD,IAAI,UAAe,CAAA;AACnB,IAAI,KAAgB,CAAA;AACpB,IAAI,MAAsB,CAAA;AAM1B,SAAS,UAAU;IAClB,MAAM,MAAM,GAAG,IAAI,2BAAS,EAAE,CAAA;IAC9B,MAAM,CAAC,MAAM,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;QACzC,UAAU,CAAC,IAAI,CAAC;YACf,IAAI,EAAE,KAAK,CAAC,MAAM;YAClB,OAAO;gBACN,IAAI,EAAE,CAAA;YACP,CAAC;YACD,IAAI,CAAC,MAAM;gBACV,IAAI,CAAC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C,CAAC,UAAU;QACZ,CAAC,CAAC,MAAM,CAAA;IAEV,cAAc,CAAC,IAAI,CAAC,CAAA;IAEpB,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAElC,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC;QAC7B,GAAG;QACH,SAAS,EAAE,CAAC,oBAAoB,CAAC;KACjC,CAAC,CAAA;IAEF,KAAK,GAAG,UAAU,EAAE,CAAA;IACpB,MAAM,GAAG,IAAI,+BAAc,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,CAAC,CAAA;IACpD,MAAM,CAAC,QAAQ,GAAG,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE;QAC7B,UAAU,CAAC,KAAK,CAAC;YAChB,OAAO;gBACN,IAAI,EAAE;oBAAE,EAAE,CAAC,GAAG,CAAC,CAAA;YAChB,CAAC;SACD,CAAC,CAAA;IACH,CAAC,CAAA;IAED,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAA;IACjC,MAAM,CAAC,OAAO,GAAG,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE;QAC5B,MAAM,CAAC,OAAO,GAAG,UAAU,CAAA;QAE3B,UAAU,CAAC,GAAG,EAAE;YACf,UAAU,CAAC,KAAK,CAAC;gBAChB,IAAI;oBACH,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;gBACzB,CAAC;aACD,CAAC,CAAA;QACH,CAAC,EAAE,CAAC,CAAC,CAAA;QAEL,OAAO,MAAM,CAAA;IACd,CAAC,CAAA;IAED,gBAAgB,EAAE,CAAA;IAElB,OAAO,MAAM,CAAA;AACd,CAAC,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
||||
16
VApp/node_modules/mqtt/build/lib/default-message-id-provider.d.ts
generated
vendored
Normal file
16
VApp/node_modules/mqtt/build/lib/default-message-id-provider.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
export interface IMessageIdProvider {
|
||||
allocate(): number | null;
|
||||
getLastAllocated(): number | null;
|
||||
register(num: number): boolean;
|
||||
deallocate(num: number): void;
|
||||
clear(): void;
|
||||
}
|
||||
export default class DefaultMessageIdProvider implements IMessageIdProvider {
|
||||
private nextId;
|
||||
constructor();
|
||||
allocate(): number;
|
||||
getLastAllocated(): number;
|
||||
register(messageId: number): boolean;
|
||||
deallocate(messageId: number): void;
|
||||
clear(): void;
|
||||
}
|
||||
24
VApp/node_modules/mqtt/build/lib/default-message-id-provider.js
generated
vendored
Normal file
24
VApp/node_modules/mqtt/build/lib/default-message-id-provider.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
class DefaultMessageIdProvider {
|
||||
constructor() {
|
||||
this.nextId = Math.max(1, Math.floor(Math.random() * 65535));
|
||||
}
|
||||
allocate() {
|
||||
const id = this.nextId++;
|
||||
if (this.nextId === 65536) {
|
||||
this.nextId = 1;
|
||||
}
|
||||
return id;
|
||||
}
|
||||
getLastAllocated() {
|
||||
return this.nextId === 1 ? 65535 : this.nextId - 1;
|
||||
}
|
||||
register(messageId) {
|
||||
return true;
|
||||
}
|
||||
deallocate(messageId) { }
|
||||
clear() { }
|
||||
}
|
||||
exports.default = DefaultMessageIdProvider;
|
||||
//# sourceMappingURL=default-message-id-provider.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/default-message-id-provider.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/default-message-id-provider.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"default-message-id-provider.js","sourceRoot":"","sources":["../../src/lib/default-message-id-provider.ts"],"names":[],"mappings":";;AAwCA,MAAqB,wBAAwB;IAG5C;QAKC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAA;IAC7D,CAAC;IAQD,QAAQ;QAEP,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAA;QAExB,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,EAAE;YAC1B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;SACf;QACD,OAAO,EAAE,CAAA;IACV,CAAC;IAOD,gBAAgB;QACf,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;IACnD,CAAC;IAQD,QAAQ,CAAC,SAAiB;QACzB,OAAO,IAAI,CAAA;IACZ,CAAC;IAOD,UAAU,CAAC,SAAiB,IAAG,CAAC;IAMhC,KAAK,KAAI,CAAC;CACV;AA1DD,2CA0DC"}
|
||||
48
VApp/node_modules/mqtt/build/lib/handlers/ack.d.ts
generated
vendored
Normal file
48
VApp/node_modules/mqtt/build/lib/handlers/ack.d.ts
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
import { PacketHandler } from '../shared';
|
||||
export declare const ReasonCodes: {
|
||||
0: string;
|
||||
1: string;
|
||||
2: string;
|
||||
3: string;
|
||||
4: string;
|
||||
5: string;
|
||||
16: string;
|
||||
17: string;
|
||||
128: string;
|
||||
129: string;
|
||||
130: string;
|
||||
131: string;
|
||||
132: string;
|
||||
133: string;
|
||||
134: string;
|
||||
135: string;
|
||||
136: string;
|
||||
137: string;
|
||||
138: string;
|
||||
139: string;
|
||||
140: string;
|
||||
141: string;
|
||||
142: string;
|
||||
143: string;
|
||||
144: string;
|
||||
145: string;
|
||||
146: string;
|
||||
147: string;
|
||||
148: string;
|
||||
149: string;
|
||||
150: string;
|
||||
151: string;
|
||||
152: string;
|
||||
153: string;
|
||||
154: string;
|
||||
155: string;
|
||||
156: string;
|
||||
157: string;
|
||||
158: string;
|
||||
159: string;
|
||||
160: string;
|
||||
161: string;
|
||||
162: string;
|
||||
};
|
||||
declare const handleAck: PacketHandler;
|
||||
export default handleAck;
|
||||
129
VApp/node_modules/mqtt/build/lib/handlers/ack.js
generated
vendored
Normal file
129
VApp/node_modules/mqtt/build/lib/handlers/ack.js
generated
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ReasonCodes = void 0;
|
||||
exports.ReasonCodes = {
|
||||
0: '',
|
||||
1: 'Unacceptable protocol version',
|
||||
2: 'Identifier rejected',
|
||||
3: 'Server unavailable',
|
||||
4: 'Bad username or password',
|
||||
5: 'Not authorized',
|
||||
16: 'No matching subscribers',
|
||||
17: 'No subscription existed',
|
||||
128: 'Unspecified error',
|
||||
129: 'Malformed Packet',
|
||||
130: 'Protocol Error',
|
||||
131: 'Implementation specific error',
|
||||
132: 'Unsupported Protocol Version',
|
||||
133: 'Client Identifier not valid',
|
||||
134: 'Bad User Name or Password',
|
||||
135: 'Not authorized',
|
||||
136: 'Server unavailable',
|
||||
137: 'Server busy',
|
||||
138: 'Banned',
|
||||
139: 'Server shutting down',
|
||||
140: 'Bad authentication method',
|
||||
141: 'Keep Alive timeout',
|
||||
142: 'Session taken over',
|
||||
143: 'Topic Filter invalid',
|
||||
144: 'Topic Name invalid',
|
||||
145: 'Packet identifier in use',
|
||||
146: 'Packet Identifier not found',
|
||||
147: 'Receive Maximum exceeded',
|
||||
148: 'Topic Alias invalid',
|
||||
149: 'Packet too large',
|
||||
150: 'Message rate too high',
|
||||
151: 'Quota exceeded',
|
||||
152: 'Administrative action',
|
||||
153: 'Payload format invalid',
|
||||
154: 'Retain not supported',
|
||||
155: 'QoS not supported',
|
||||
156: 'Use another server',
|
||||
157: 'Server moved',
|
||||
158: 'Shared Subscriptions not supported',
|
||||
159: 'Connection rate exceeded',
|
||||
160: 'Maximum connect time',
|
||||
161: 'Subscription Identifiers not supported',
|
||||
162: 'Wildcard Subscriptions not supported',
|
||||
};
|
||||
const handleAck = (client, packet) => {
|
||||
const { messageId } = packet;
|
||||
const type = packet.cmd;
|
||||
let response = null;
|
||||
const cb = client.outgoing[messageId] ? client.outgoing[messageId].cb : null;
|
||||
let err;
|
||||
if (!cb) {
|
||||
client.log('_handleAck :: Server sent an ack in error. Ignoring.');
|
||||
return;
|
||||
}
|
||||
client.log('_handleAck :: packet type', type);
|
||||
switch (type) {
|
||||
case 'pubcomp':
|
||||
case 'puback': {
|
||||
const pubackRC = packet.reasonCode;
|
||||
if (pubackRC && pubackRC > 0 && pubackRC !== 16) {
|
||||
err = new Error(`Publish error: ${exports.ReasonCodes[pubackRC]}`);
|
||||
err.code = pubackRC;
|
||||
client['_removeOutgoingAndStoreMessage'](messageId, () => {
|
||||
cb(err, packet);
|
||||
});
|
||||
}
|
||||
else {
|
||||
client['_removeOutgoingAndStoreMessage'](messageId, cb);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'pubrec': {
|
||||
response = {
|
||||
cmd: 'pubrel',
|
||||
qos: 2,
|
||||
messageId,
|
||||
};
|
||||
const pubrecRC = packet.reasonCode;
|
||||
if (pubrecRC && pubrecRC > 0 && pubrecRC !== 16) {
|
||||
err = new Error(`Publish error: ${exports.ReasonCodes[pubrecRC]}`);
|
||||
err.code = pubrecRC;
|
||||
client['_removeOutgoingAndStoreMessage'](messageId, () => {
|
||||
cb(err, packet);
|
||||
});
|
||||
}
|
||||
else {
|
||||
client['_sendPacket'](response);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'suback': {
|
||||
delete client.outgoing[messageId];
|
||||
client.messageIdProvider.deallocate(messageId);
|
||||
const granted = packet.granted;
|
||||
for (let grantedI = 0; grantedI < granted.length; grantedI++) {
|
||||
if ((granted[grantedI] & 0x80) !== 0) {
|
||||
const topics = client.messageIdToTopic[messageId];
|
||||
if (topics) {
|
||||
topics.forEach((topic) => {
|
||||
delete client['_resubscribeTopics'][topic];
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
delete client.messageIdToTopic[messageId];
|
||||
client['_invokeStoreProcessingQueue']();
|
||||
cb(null, packet);
|
||||
break;
|
||||
}
|
||||
case 'unsuback': {
|
||||
delete client.outgoing[messageId];
|
||||
client.messageIdProvider.deallocate(messageId);
|
||||
client['_invokeStoreProcessingQueue']();
|
||||
cb(null);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
client.emit('error', new Error('unrecognized packet type'));
|
||||
}
|
||||
if (client.disconnecting && Object.keys(client.outgoing).length === 0) {
|
||||
client.emit('outgoingEmpty');
|
||||
}
|
||||
};
|
||||
exports.default = handleAck;
|
||||
//# sourceMappingURL=ack.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/handlers/ack.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/handlers/ack.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ack.js","sourceRoot":"","sources":["../../../src/lib/handlers/ack.ts"],"names":[],"mappings":";;;AAIa,QAAA,WAAW,GAAG;IAC1B,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,+BAA+B;IAClC,CAAC,EAAE,qBAAqB;IACxB,CAAC,EAAE,oBAAoB;IACvB,CAAC,EAAE,0BAA0B;IAC7B,CAAC,EAAE,gBAAgB;IACnB,EAAE,EAAE,yBAAyB;IAC7B,EAAE,EAAE,yBAAyB;IAC7B,GAAG,EAAE,mBAAmB;IACxB,GAAG,EAAE,kBAAkB;IACvB,GAAG,EAAE,gBAAgB;IACrB,GAAG,EAAE,+BAA+B;IACpC,GAAG,EAAE,8BAA8B;IACnC,GAAG,EAAE,6BAA6B;IAClC,GAAG,EAAE,2BAA2B;IAChC,GAAG,EAAE,gBAAgB;IACrB,GAAG,EAAE,oBAAoB;IACzB,GAAG,EAAE,aAAa;IAClB,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,sBAAsB;IAC3B,GAAG,EAAE,2BAA2B;IAChC,GAAG,EAAE,oBAAoB;IACzB,GAAG,EAAE,oBAAoB;IACzB,GAAG,EAAE,sBAAsB;IAC3B,GAA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.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { PacketHandler } from '../shared';
|
||||
declare const handleAuth: PacketHandler;
|
||||
export default handleAuth;
|
||||
30
VApp/node_modules/mqtt/build/lib/handlers/auth.js
generated
vendored
Normal file
30
VApp/node_modules/mqtt/build/lib/handlers/auth.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const shared_1 = require("../shared");
|
||||
const ack_1 = require("./ack");
|
||||
const handleAuth = (client, packet) => {
|
||||
const { options } = client;
|
||||
const version = options.protocolVersion;
|
||||
const rc = version === 5 ? packet.reasonCode : packet.returnCode;
|
||||
if (version !== 5) {
|
||||
const err = new shared_1.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${version}`, rc);
|
||||
client.emit('error', err);
|
||||
return;
|
||||
}
|
||||
client.handleAuth(packet, (err, packet2) => {
|
||||
if (err) {
|
||||
client.emit('error', err);
|
||||
return;
|
||||
}
|
||||
if (rc === 24) {
|
||||
client.reconnecting = false;
|
||||
client['_sendPacket'](packet2);
|
||||
}
|
||||
else {
|
||||
const error = new shared_1.ErrorWithReasonCode(`Connection refused: ${ack_1.ReasonCodes[rc]}`, rc);
|
||||
client.emit('error', error);
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.default = handleAuth;
|
||||
//# sourceMappingURL=auth.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/handlers/auth.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/handlers/auth.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/handlers/auth.ts"],"names":[],"mappings":";;AACA,sCAA8D;AAC9D,+BAAmC;AAEnC,MAAM,UAAU,GAAkB,CACjC,MAAM,EACN,MAA4C,EAC3C,EAAE;IACH,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAA;IAC1B,MAAM,OAAO,GAAG,OAAO,CAAC,eAAe,CAAA;IACvC,MAAM,EAAE,GAAG,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAA;IAEhE,IAAI,OAAO,KAAK,CAAC,EAAE;QAClB,MAAM,GAAG,GAAG,IAAI,4BAAmB,CAClC,2EAA2E,OAAO,EAAE,EACpF,EAAE,CACF,CAAA;QACD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;QACzB,OAAM;KACN;IAED,MAAM,CAAC,UAAU,CAChB,MAAM,EACN,CAAC,GAAwB,EAAE,OAAoB,EAAE,EAAE;QAClD,IAAI,GAAG,EAAE;YACR,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;YACzB,OAAM;SACN;QAED,IAAI,EAAE,KAAK,EAAE,EAAE;YACd,MAAM,CAAC,YAAY,GAAG,KAAK,CAAA;YAC3B,MAAM,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAA;SAC9B;aAAM;YACN,MAAM,KAAK,GAAG,IAAI,4BAAmB,CACpC,uBAAuB,iBAAW,CAAC,EAAE,CAAC,EAAE,EACxC,EAAE,CACF,CAAA;YACD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;SAC3B;IACF,CAAC,CACD,CAAA;AACF,CAAC,CAAA;AAED,kBAAe,UAAU,CAAA"}
|
||||
3
VApp/node_modules/mqtt/build/lib/handlers/connack.d.ts
generated
vendored
Normal file
3
VApp/node_modules/mqtt/build/lib/handlers/connack.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { PacketHandler } from '../shared';
|
||||
declare const handleConnack: PacketHandler;
|
||||
export default handleConnack;
|
||||
48
VApp/node_modules/mqtt/build/lib/handlers/connack.js
generated
vendored
Normal file
48
VApp/node_modules/mqtt/build/lib/handlers/connack.js
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const ack_1 = require("./ack");
|
||||
const topic_alias_send_1 = __importDefault(require("../topic-alias-send"));
|
||||
const shared_1 = require("../shared");
|
||||
const handleConnack = (client, packet) => {
|
||||
client.log('_handleConnack');
|
||||
const { options } = client;
|
||||
const version = options.protocolVersion;
|
||||
const rc = version === 5 ? packet.reasonCode : packet.returnCode;
|
||||
clearTimeout(client['connackTimer']);
|
||||
delete client['topicAliasSend'];
|
||||
if (packet.properties) {
|
||||
if (packet.properties.topicAliasMaximum) {
|
||||
if (packet.properties.topicAliasMaximum > 0xffff) {
|
||||
client.emit('error', new Error('topicAliasMaximum from broker is out of range'));
|
||||
return;
|
||||
}
|
||||
if (packet.properties.topicAliasMaximum > 0) {
|
||||
client['topicAliasSend'] = new topic_alias_send_1.default(packet.properties.topicAliasMaximum);
|
||||
}
|
||||
}
|
||||
if (packet.properties.serverKeepAlive && options.keepalive) {
|
||||
options.keepalive = packet.properties.serverKeepAlive;
|
||||
client['_shiftPingInterval']();
|
||||
}
|
||||
if (packet.properties.maximumPacketSize) {
|
||||
if (!options.properties) {
|
||||
options.properties = {};
|
||||
}
|
||||
options.properties.maximumPacketSize =
|
||||
packet.properties.maximumPacketSize;
|
||||
}
|
||||
}
|
||||
if (rc === 0) {
|
||||
client.reconnecting = false;
|
||||
client['_onConnect'](packet);
|
||||
}
|
||||
else if (rc > 0) {
|
||||
const err = new shared_1.ErrorWithReasonCode(`Connection refused: ${ack_1.ReasonCodes[rc]}`, rc);
|
||||
client.emit('error', err);
|
||||
}
|
||||
};
|
||||
exports.default = handleConnack;
|
||||
//# sourceMappingURL=connack.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/handlers/connack.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/handlers/connack.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"connack.js","sourceRoot":"","sources":["../../../src/lib/handlers/connack.ts"],"names":[],"mappings":";;;;;AAAA,+BAAmC;AACnC,2EAAgD;AAChD,sCAA8D;AAG9D,MAAM,aAAa,GAAkB,CAAC,MAAM,EAAE,MAAsB,EAAE,EAAE;IACvE,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;IAC5B,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAA;IAC1B,MAAM,OAAO,GAAG,OAAO,CAAC,eAAe,CAAA;IACvC,MAAM,EAAE,GAAG,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAA;IAEhE,YAAY,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAA;IACpC,OAAO,MAAM,CAAC,gBAAgB,CAAC,CAAA;IAE/B,IAAI,MAAM,CAAC,UAAU,EAAE;QACtB,IAAI,MAAM,CAAC,UAAU,CAAC,iBAAiB,EAAE;YACxC,IAAI,MAAM,CAAC,UAAU,CAAC,iBAAiB,GAAG,MAAM,EAAE;gBACjD,MAAM,CAAC,IAAI,CACV,OAAO,EACP,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAC1D,CAAA;gBACD,OAAM;aACN;YACD,IAAI,MAAM,CAAC,UAAU,CAAC,iBAAiB,GAAG,CAAC,EAAE;gBAC5C,MAAM,CAAC,gBAAgB,CAAC,GAAG,IAAI,0BAAc,CAC5C,MAAM,CAAC,UAAU,CAAC,iBAAiB,CACnC,CAAA;aACD;SACD;QACD,IAAI,MAAM,CAAC,UAAU,CAAC,eAAe,IAAI,OAAO,CAAC,SAAS,EAAE;YAC3D,OAAO,CAAC,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,eAAe,CAAA;YACrD,MAAM,CAAC,oBAAoB,CAAC,EAAE,CAAA;SAC9B;QACD,IAAI,MAAM,CAAC,UAAU,CAAC,iBAAiB,EAAE;YACxC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;gBACxB,OAAO,CAAC,UAAU,GAAG,EAAE,CAAA;aACvB;YACD,OAAO,CAAC,UAAU,CAAC,iBAAiB;gBACnC,MAAM,CAAC,UAAU,CAAC,iBAAiB,CAAA;SACpC;KACD;IAED,IAAI,EAAE,KAAK,CAAC,EAAE;QACb,MAAM,CAAC,YAAY,GAAG,KAAK,CAAA;QAC3B,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;KAC5B;SAAM,IAAI,EAAE,GAAG,CAAC,EAAE;QAClB,MAAM,GAAG,GAAG,IAAI,4BAAmB,CAClC,uBAAuB,iBAAW,CAAC,EAAE,CAAC,EAAE,EACxC,EAAE,CACF,CAAA;QACD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;KACzB;AACF,CAAC,CAAA;AAED,kBAAe,aAAa,CAAA"}
|
||||
3
VApp/node_modules/mqtt/build/lib/handlers/index.d.ts
generated
vendored
Normal file
3
VApp/node_modules/mqtt/build/lib/handlers/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { PacketHandler } from '../shared';
|
||||
declare const handle: PacketHandler;
|
||||
export default handle;
|
||||
64
VApp/node_modules/mqtt/build/lib/handlers/index.js
generated
vendored
Normal file
64
VApp/node_modules/mqtt/build/lib/handlers/index.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const publish_1 = __importDefault(require("./publish"));
|
||||
const auth_1 = __importDefault(require("./auth"));
|
||||
const connack_1 = __importDefault(require("./connack"));
|
||||
const ack_1 = __importDefault(require("./ack"));
|
||||
const pubrel_1 = __importDefault(require("./pubrel"));
|
||||
const handle = (client, packet, done) => {
|
||||
const { options } = client;
|
||||
if (options.protocolVersion === 5 &&
|
||||
options.properties &&
|
||||
options.properties.maximumPacketSize &&
|
||||
options.properties.maximumPacketSize < packet.length) {
|
||||
client.emit('error', new Error(`exceeding packets size ${packet.cmd}`));
|
||||
client.end({
|
||||
reasonCode: 149,
|
||||
properties: { reasonString: 'Maximum packet size was exceeded' },
|
||||
});
|
||||
return client;
|
||||
}
|
||||
client.log('_handlePacket :: emitting packetreceive');
|
||||
client.emit('packetreceive', packet);
|
||||
switch (packet.cmd) {
|
||||
case 'publish':
|
||||
(0, publish_1.default)(client, packet, done);
|
||||
break;
|
||||
case 'puback':
|
||||
case 'pubrec':
|
||||
case 'pubcomp':
|
||||
case 'suback':
|
||||
case 'unsuback':
|
||||
(0, ack_1.default)(client, packet);
|
||||
done();
|
||||
break;
|
||||
case 'pubrel':
|
||||
(0, pubrel_1.default)(client, packet, done);
|
||||
break;
|
||||
case 'connack':
|
||||
(0, connack_1.default)(client, packet);
|
||||
done();
|
||||
break;
|
||||
case 'auth':
|
||||
(0, auth_1.default)(client, packet);
|
||||
done();
|
||||
break;
|
||||
case 'pingresp':
|
||||
client.pingResp = true;
|
||||
done();
|
||||
break;
|
||||
case 'disconnect':
|
||||
client.emit('disconnect', packet);
|
||||
done();
|
||||
break;
|
||||
default:
|
||||
client.log('_handlePacket :: unknown command');
|
||||
done();
|
||||
break;
|
||||
}
|
||||
};
|
||||
exports.default = handle;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/handlers/index.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/handlers/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/handlers/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAqC;AACrC,kDAA+B;AAC/B,wDAAqC;AACrC,gDAA6B;AAC7B,sDAAmC;AAGnC,MAAM,MAAM,GAA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MAAM,CAAC,CAAA;YAC1B,IAAI,EAAE,CAAA;YACN,MAAK;QACN,KAAK,UAAU;YAEd,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAA;YACtB,IAAI,EAAE,CAAA;YACN,MAAK;QACN,KAAK,YAAY;YAChB,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;YACjC,IAAI,EAAE,CAAA;YACN,MAAK;QACN;YAEC,MAAM,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAA;YAC9C,IAAI,EAAE,CAAA;YACN,MAAK;KACN;AACF,CAAC,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
||||
3
VApp/node_modules/mqtt/build/lib/handlers/publish.d.ts
generated
vendored
Normal file
3
VApp/node_modules/mqtt/build/lib/handlers/publish.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { PacketHandler } from '../shared';
|
||||
declare const handlePublish: PacketHandler;
|
||||
export default handlePublish;
|
||||
106
VApp/node_modules/mqtt/build/lib/handlers/publish.js
generated
vendored
Normal file
106
VApp/node_modules/mqtt/build/lib/handlers/publish.js
generated
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const validReasonCodes = [0, 16, 128, 131, 135, 144, 145, 151, 153];
|
||||
const handlePublish = (client, packet, done) => {
|
||||
client.log('handlePublish: packet %o', packet);
|
||||
done = typeof done !== 'undefined' ? done : client.noop;
|
||||
let topic = packet.topic.toString();
|
||||
const message = packet.payload;
|
||||
const { qos } = packet;
|
||||
const { messageId } = packet;
|
||||
const { options } = client;
|
||||
if (client.options.protocolVersion === 5) {
|
||||
let alias;
|
||||
if (packet.properties) {
|
||||
alias = packet.properties.topicAlias;
|
||||
}
|
||||
if (typeof alias !== 'undefined') {
|
||||
if (topic.length === 0) {
|
||||
if (alias > 0 && alias <= 0xffff) {
|
||||
const gotTopic = client['topicAliasRecv'].getTopicByAlias(alias);
|
||||
if (gotTopic) {
|
||||
topic = gotTopic;
|
||||
client.log('handlePublish :: topic complemented by alias. topic: %s - alias: %d', topic, alias);
|
||||
}
|
||||
else {
|
||||
client.log('handlePublish :: unregistered topic alias. alias: %d', alias);
|
||||
client.emit('error', new Error('Received unregistered Topic Alias'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
client.log('handlePublish :: topic alias out of range. alias: %d', alias);
|
||||
client.emit('error', new Error('Received Topic Alias is out of range'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (client['topicAliasRecv'].put(topic, alias)) {
|
||||
client.log('handlePublish :: registered topic: %s - alias: %d', topic, alias);
|
||||
}
|
||||
else {
|
||||
client.log('handlePublish :: topic alias out of range. alias: %d', alias);
|
||||
client.emit('error', new Error('Received Topic Alias is out of range'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
client.log('handlePublish: qos %d', qos);
|
||||
switch (qos) {
|
||||
case 2: {
|
||||
options.customHandleAcks(topic, message, packet, (error, code) => {
|
||||
if (typeof error === 'number') {
|
||||
code = error;
|
||||
error = null;
|
||||
}
|
||||
if (error) {
|
||||
return client.emit('error', error);
|
||||
}
|
||||
if (validReasonCodes.indexOf(code) === -1) {
|
||||
return client.emit('error', new Error('Wrong reason code for pubrec'));
|
||||
}
|
||||
if (code) {
|
||||
client['_sendPacket']({ cmd: 'pubrec', messageId, reasonCode: code }, done);
|
||||
}
|
||||
else {
|
||||
client.incomingStore.put(packet, () => {
|
||||
client['_sendPacket']({ cmd: 'pubrec', messageId }, done);
|
||||
});
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
options.customHandleAcks(topic, message, packet, (error, code) => {
|
||||
if (typeof error === 'number') {
|
||||
code = error;
|
||||
error = null;
|
||||
}
|
||||
if (error) {
|
||||
return client.emit('error', error);
|
||||
}
|
||||
if (validReasonCodes.indexOf(code) === -1) {
|
||||
return client.emit('error', new Error('Wrong reason code for puback'));
|
||||
}
|
||||
if (!code) {
|
||||
client.emit('message', topic, message, packet);
|
||||
}
|
||||
client.handleMessage(packet, (err) => {
|
||||
if (err) {
|
||||
return done && done(err);
|
||||
}
|
||||
client['_sendPacket']({ cmd: 'puback', messageId, reasonCode: code }, done);
|
||||
});
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
client.emit('message', topic, message, packet);
|
||||
client.handleMessage(packet, done);
|
||||
break;
|
||||
default:
|
||||
client.log('handlePublish: unknown QoS. Doing nothing.');
|
||||
break;
|
||||
}
|
||||
};
|
||||
exports.default = handlePublish;
|
||||
//# sourceMappingURL=publish.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/handlers/publish.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/handlers/publish.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../src/lib/handlers/publish.ts"],"names":[],"mappings":";;AAGA,MAAM,gBAAgB,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AA0BnE,MAAM,aAAa,GAAkB,CAAC,MAAM,EAAE,MAAsB,EAAE,IAAI,EAAE,EAAE;IAC7E,MAAM,CAAC,GAAG,CAAC,0BAA0B,EAAE,MAAM,CAAC,CAAA;IAC9C,IAAI,GAAG,OAAO,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAA;IACvD,IAAI,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAA;IACnC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAA;IAC9B,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;IACtB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAA;IAC5B,MAAM,EAAE,OAAO,EAAE,GAAG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,GAAG,KAAK,CAAA;oBACZ,KAAK,GAAG,IAAI,CAAA;iBACZ;gBACD,IAAI,KAAK,EAAE;oBACV,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,KAAc,CAAC,CAAA;iBAC3C;gBACD,IAAI,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE;oBAC1C,OAAO,MAAM,CAAC,IAAI,CACjB,OAAO,EACP,IAAI,KAAK,CAAC,8BAA8B,CAAC,CACzC,CAAA;iBACD;gBACD,IAAI,CAAC,IAAI,EAAE;oBACV,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,OAAiB,EAAE,MAAM,CAAC,CAAA;iBACxD;gBACD,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE;oBACpC,IAAI,GAAG,EAAE;wBACR,OAAO,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;qBACxB;oBACD,MAAM,CAAC,aAAa,CAAC,CACpB,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,EAC9C,IAAI,CACJ,CAAA;gBACF,CAAC,CAAC,CAAA;YACH,CAAC,CACD,CAAA;YACD,MAAK;SACL;QACD,KAAK,CAAC;YAEL,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,OAAiB,EAAE,MAAM,CAAC,CAAA;YACxD,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YAClC,MAAK;QACN;YAEC,MAAM,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAA;YAExD,MAAK;KACN;AACF,CAAC,CAAA;AAED,kBAAe,aAAa,CAAA"}
|
||||
3
VApp/node_modules/mqtt/build/lib/handlers/pubrel.d.ts
generated
vendored
Normal file
3
VApp/node_modules/mqtt/build/lib/handlers/pubrel.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { PacketHandler } from '../shared';
|
||||
declare const handlePubrel: PacketHandler;
|
||||
export default handlePubrel;
|
||||
25
VApp/node_modules/mqtt/build/lib/handlers/pubrel.js
generated
vendored
Normal file
25
VApp/node_modules/mqtt/build/lib/handlers/pubrel.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const handlePubrel = (client, packet, done) => {
|
||||
client.log('handling pubrel packet');
|
||||
const callback = typeof done !== 'undefined' ? done : client.noop;
|
||||
const { messageId } = packet;
|
||||
const comp = { cmd: 'pubcomp', messageId };
|
||||
client.incomingStore.get(packet, (err, pub) => {
|
||||
if (!err) {
|
||||
client.emit('message', pub.topic, pub.payload, pub);
|
||||
client.handleMessage(pub, (err2) => {
|
||||
if (err2) {
|
||||
return callback(err2);
|
||||
}
|
||||
client.incomingStore.del(pub, client.noop);
|
||||
client['_sendPacket'](comp, callback);
|
||||
});
|
||||
}
|
||||
else {
|
||||
client['_sendPacket'](comp, callback);
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.default = handlePubrel;
|
||||
//# sourceMappingURL=pubrel.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/handlers/pubrel.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/handlers/pubrel.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"pubrel.js","sourceRoot":"","sources":["../../../src/lib/handlers/pubrel.ts"],"names":[],"mappings":";;AAGA,MAAM,YAAY,GAAkB,CAAC,MAAM,EAAE,MAAqB,EAAE,IAAI,EAAE,EAAE;IAC3E,MAAM,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAA;IACpC,MAAM,QAAQ,GAAG,OAAO,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAA;IACjE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAA;IAE5B,MAAM,IAAI,GAAmB,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,CAAA;IAE1D,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,GAAmB,EAAE,EAAE;QAC7D,IAAI,CAAC,GAAG,EAAE;YACT,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,OAAiB,EAAE,GAAG,CAAC,CAAA;YAC7D,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;gBAClC,IAAI,IAAI,EAAE;oBACT,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAA;iBACrB;gBACD,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;gBAC1C,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;YACtC,CAAC,CAAC,CAAA;SACF;aAAM;YACN,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;SACrC;IACF,CAAC,CAAC,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,YAAY,CAAA"}
|
||||
3
VApp/node_modules/mqtt/build/lib/is-browser.d.ts
generated
vendored
Normal file
3
VApp/node_modules/mqtt/build/lib/is-browser.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
declare const isBrowser: boolean;
|
||||
export declare const isWebWorker: boolean;
|
||||
export default isBrowser;
|
||||
14
VApp/node_modules/mqtt/build/lib/is-browser.js
generated
vendored
Normal file
14
VApp/node_modules/mqtt/build/lib/is-browser.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isWebWorker = void 0;
|
||||
const isStandardBrowserEnv = () => typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
||||
const isWebWorkerEnv = () => {
|
||||
var _a, _b;
|
||||
return Boolean(typeof self === 'object' &&
|
||||
((_b = (_a = self === null || self === void 0 ? void 0 : self.constructor) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.includes('WorkerGlobalScope')));
|
||||
};
|
||||
const isReactNativeEnv = () => typeof navigator !== 'undefined' && navigator.product === 'ReactNative';
|
||||
const isBrowser = isStandardBrowserEnv() || isWebWorkerEnv() || isReactNativeEnv();
|
||||
exports.isWebWorker = isWebWorkerEnv();
|
||||
exports.default = isBrowser;
|
||||
//# sourceMappingURL=is-browser.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/is-browser.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/is-browser.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"is-browser.js","sourceRoot":"","sources":["../../src/lib/is-browser.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB,GAAG,GAAG,EAAE,CACjC,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW,CAAA;AAExE,MAAM,cAAc,GAAG,GAAG,EAAE;;IAC3B,OAAA,OAAO,CAEN,OAAO,IAAI,KAAK,QAAQ;SAEvB,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,0CAAE,IAAI,0CAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAA,CACvD,CAAA;CAAA,CAAA;AAEF,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAC7B,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,CAAC,OAAO,KAAK,aAAa,CAAA;AAExE,MAAM,SAAS,GACd,oBAAoB,EAAE,IAAI,cAAc,EAAE,IAAI,gBAAgB,EAAE,CAAA;AAEpD,QAAA,WAAW,GAAG,cAAc,EAAE,CAAA;AAE3C,kBAAe,SAAS,CAAA"}
|
||||
21
VApp/node_modules/mqtt/build/lib/shared.d.ts
generated
vendored
Normal file
21
VApp/node_modules/mqtt/build/lib/shared.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/// <reference types="node" />
|
||||
import type { Packet } from 'mqtt-packet';
|
||||
import type { Duplex } from 'stream';
|
||||
import type MqttClient from './client';
|
||||
import type { IClientOptions } from './client';
|
||||
export type DoneCallback = (error?: Error) => void;
|
||||
export type GenericCallback<T> = (error?: Error, result?: T) => void;
|
||||
export type VoidCallback = () => void;
|
||||
export type IStream = Duplex & {
|
||||
socket?: any;
|
||||
};
|
||||
export type StreamBuilder = (client: MqttClient, opts?: IClientOptions) => IStream;
|
||||
export type Callback = () => void;
|
||||
export type PacketHandler = (client: MqttClient, packet: Packet, done?: DoneCallback) => void;
|
||||
export declare class ErrorWithReasonCode extends Error {
|
||||
code: number;
|
||||
constructor(message: string, code: number);
|
||||
}
|
||||
export type Constructor<T = {}> = new (...args: any[]) => T;
|
||||
export declare function applyMixin(target: Constructor, mixin: Constructor, includeConstructor?: boolean): void;
|
||||
export declare const nextTick: (callback: Function, ...args: any[]) => void;
|
||||
40
VApp/node_modules/mqtt/build/lib/shared.js
generated
vendored
Normal file
40
VApp/node_modules/mqtt/build/lib/shared.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.nextTick = exports.applyMixin = exports.ErrorWithReasonCode = void 0;
|
||||
class ErrorWithReasonCode extends Error {
|
||||
constructor(message, code) {
|
||||
super(message);
|
||||
this.code = code;
|
||||
Object.setPrototypeOf(this, ErrorWithReasonCode.prototype);
|
||||
Object.getPrototypeOf(this).name = 'ErrorWithReasonCode';
|
||||
}
|
||||
}
|
||||
exports.ErrorWithReasonCode = ErrorWithReasonCode;
|
||||
function applyMixin(target, mixin, includeConstructor = false) {
|
||||
var _a;
|
||||
const inheritanceChain = [mixin];
|
||||
while (true) {
|
||||
const current = inheritanceChain[0];
|
||||
const base = Object.getPrototypeOf(current);
|
||||
if (base === null || base === void 0 ? void 0 : base.prototype) {
|
||||
inheritanceChain.unshift(base);
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (const ctor of inheritanceChain) {
|
||||
for (const prop of Object.getOwnPropertyNames(ctor.prototype)) {
|
||||
if (includeConstructor || prop !== 'constructor') {
|
||||
Object.defineProperty(target.prototype, prop, (_a = Object.getOwnPropertyDescriptor(ctor.prototype, prop)) !== null && _a !== void 0 ? _a : Object.create(null));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.applyMixin = applyMixin;
|
||||
exports.nextTick = process
|
||||
? process.nextTick
|
||||
: (callback) => {
|
||||
setTimeout(callback, 0);
|
||||
};
|
||||
//# sourceMappingURL=shared.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/shared.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/shared.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/lib/shared.ts"],"names":[],"mappings":";;;AA6BA,MAAa,mBAAoB,SAAQ,KAAK;IAG7C,YAAmB,OAAe,EAAE,IAAY;QAC/C,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAGhB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAA;QAC1D,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,qBAAqB,CAAA;IACzD,CAAC;CACD;AAXD,kDAWC;AAKD,SAAgB,UAAU,CACzB,MAAmB,EACnB,KAAkB,EAClB,kBAAkB,GAAG,KAAK;;IAG1B,MAAM,gBAAgB,GAAkB,CAAC,KAAK,CAAC,CAAA;IAE/C,OAAO,IAAI,EAAE;QACZ,MAAM,OAAO,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAA;QACnC,MAAM,IAAI,GAAG,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;QAC3C,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,EAAE;YACpB,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;SAC9B;aAAM;YACN,MAAK;SACL;KACD;IACD,KAAK,MAAM,IAAI,IAAI,gBAAgB,EAAE;QACpC,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;YAE9D,IAAI,kBAAkB,IAAI,IAAI,KAAK,aAAa,EAAE;gBACjD,MAAM,CAAC,cAAc,CACpB,MAAM,CAAC,SAAS,EAChB,IAAI,EACJ,MAAA,MAAM,CAAC,wBAAwB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,mCACpD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CACpB,CAAA;aACD;SACD;KACD;AACF,CAAC;AA9BD,gCA8BC;AACY,QAAA,QAAQ,GAAG,OAAO;IAC9B,CAAC,CAAC,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,CAAC,QAAoB,EAAE,EAAE;QACzB,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAA;IACvB,CAAC,CAAA"}
|
||||
24
VApp/node_modules/mqtt/build/lib/store.d.ts
generated
vendored
Normal file
24
VApp/node_modules/mqtt/build/lib/store.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Readable } from 'readable-stream';
|
||||
import { Packet } from 'mqtt-packet';
|
||||
import { DoneCallback } from './shared';
|
||||
export interface IStoreOptions {
|
||||
clean?: boolean;
|
||||
}
|
||||
export type PacketCallback = (error?: Error, packet?: Packet) => void;
|
||||
export interface IStore {
|
||||
put(packet: Packet, cb: DoneCallback): IStore;
|
||||
createStream(): Readable;
|
||||
del(packet: Pick<Packet, 'messageId'>, cb: PacketCallback): IStore;
|
||||
get(packet: Pick<Packet, 'messageId'>, cb: PacketCallback): IStore;
|
||||
close(cb: DoneCallback): void;
|
||||
}
|
||||
export default class Store implements IStore {
|
||||
private options;
|
||||
private _inflights;
|
||||
constructor(options?: IStoreOptions);
|
||||
put(packet: Packet, cb: DoneCallback): this;
|
||||
createStream(): Readable;
|
||||
del(packet: Pick<Packet, 'messageId'>, cb: PacketCallback): this;
|
||||
get(packet: Pick<Packet, 'messageId'>, cb: PacketCallback): this;
|
||||
close(cb: DoneCallback): void;
|
||||
}
|
||||
80
VApp/node_modules/mqtt/build/lib/store.js
generated
vendored
Normal file
80
VApp/node_modules/mqtt/build/lib/store.js
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const readable_stream_1 = require("readable-stream");
|
||||
const streamsOpts = { objectMode: true };
|
||||
const defaultStoreOptions = {
|
||||
clean: true,
|
||||
};
|
||||
class Store {
|
||||
constructor(options) {
|
||||
this.options = options || {};
|
||||
this.options = Object.assign(Object.assign({}, defaultStoreOptions), options);
|
||||
this._inflights = new Map();
|
||||
}
|
||||
put(packet, cb) {
|
||||
this._inflights.set(packet.messageId, packet);
|
||||
if (cb) {
|
||||
cb();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
createStream() {
|
||||
const stream = new readable_stream_1.Readable(streamsOpts);
|
||||
const values = [];
|
||||
let destroyed = false;
|
||||
let i = 0;
|
||||
this._inflights.forEach((value, key) => {
|
||||
values.push(value);
|
||||
});
|
||||
stream._read = () => {
|
||||
if (!destroyed && i < values.length) {
|
||||
stream.push(values[i++]);
|
||||
}
|
||||
else {
|
||||
stream.push(null);
|
||||
}
|
||||
};
|
||||
stream.destroy = (err) => {
|
||||
if (destroyed) {
|
||||
return;
|
||||
}
|
||||
destroyed = true;
|
||||
setTimeout(() => {
|
||||
stream.emit('close');
|
||||
}, 0);
|
||||
return stream;
|
||||
};
|
||||
return stream;
|
||||
}
|
||||
del(packet, cb) {
|
||||
const toDelete = this._inflights.get(packet.messageId);
|
||||
if (toDelete) {
|
||||
this._inflights.delete(packet.messageId);
|
||||
cb(null, toDelete);
|
||||
}
|
||||
else if (cb) {
|
||||
cb(new Error('missing packet'));
|
||||
}
|
||||
return this;
|
||||
}
|
||||
get(packet, cb) {
|
||||
const storedPacket = this._inflights.get(packet.messageId);
|
||||
if (storedPacket) {
|
||||
cb(null, storedPacket);
|
||||
}
|
||||
else if (cb) {
|
||||
cb(new Error('missing packet'));
|
||||
}
|
||||
return this;
|
||||
}
|
||||
close(cb) {
|
||||
if (this.options.clean) {
|
||||
this._inflights = null;
|
||||
}
|
||||
if (cb) {
|
||||
cb();
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.default = Store;
|
||||
//# sourceMappingURL=store.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/store.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/store.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/lib/store.ts"],"names":[],"mappings":";;AAGA,qDAA0C;AAI1C,MAAM,WAAW,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,CAAA;AACxC,MAAM,mBAAmB,GAAG;IAC3B,KAAK,EAAE,IAAI;CACX,CAAA;AA+CD,MAAqB,KAAK;IAKzB,YAAY,OAAuB;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;QAG5B,IAAI,CAAC,OAAO,mCAAQ,mBAAmB,GAAK,OAAO,CAAE,CAAA;QAErD,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,EAAE,CAAA;IAC5B,CAAC;IAOD,GAAG,CAAC,MAAc,EAAE,EAAgB;QACnC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;QAE7C,IAAI,EAAE,EAAE;YACP,EAAE,EAAE,CAAA;SACJ;QAED,OAAO,IAAI,CAAA;IACZ,CAAC;IAMD,YAAY;QACX,MAAM,MAAM,GAAG,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AC,CAAA;SAC/B;QAED,OAAO,IAAI,CAAA;IACZ,CAAC;IAKD,GAAG,CAAC,MAAiC,EAAE,EAAkB;QACxD,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;QAC1D,IAAI,YAAY,EAAE;YACjB,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC,CAAA;SACtB;aAAM,IAAI,EAAE,EAAE;YACd,EAAE,CAAC,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAA;SAC/B;QAED,OAAO,IAAI,CAAA;IACZ,CAAC;IAKD,KAAK,CAAC,EAAgB;QACrB,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;YACvB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;SACtB;QACD,IAAI,EAAE,EAAE;YACP,EAAE,EAAE,CAAA;SACJ;IACF,CAAC;CACD;AA5GD,wBA4GC"}
|
||||
9
VApp/node_modules/mqtt/build/lib/topic-alias-recv.d.ts
generated
vendored
Normal file
9
VApp/node_modules/mqtt/build/lib/topic-alias-recv.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
export default class TopicAliasRecv {
|
||||
private aliasToTopic;
|
||||
max: number;
|
||||
length: number;
|
||||
constructor(max: number);
|
||||
put(topic: string, alias: number): boolean;
|
||||
getTopicByAlias(alias: number): string;
|
||||
clear(): void;
|
||||
}
|
||||
24
VApp/node_modules/mqtt/build/lib/topic-alias-recv.js
generated
vendored
Normal file
24
VApp/node_modules/mqtt/build/lib/topic-alias-recv.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
class TopicAliasRecv {
|
||||
constructor(max) {
|
||||
this.aliasToTopic = {};
|
||||
this.max = max;
|
||||
}
|
||||
put(topic, alias) {
|
||||
if (alias === 0 || alias > this.max) {
|
||||
return false;
|
||||
}
|
||||
this.aliasToTopic[alias] = topic;
|
||||
this.length = Object.keys(this.aliasToTopic).length;
|
||||
return true;
|
||||
}
|
||||
getTopicByAlias(alias) {
|
||||
return this.aliasToTopic[alias];
|
||||
}
|
||||
clear() {
|
||||
this.aliasToTopic = {};
|
||||
}
|
||||
}
|
||||
exports.default = TopicAliasRecv;
|
||||
//# sourceMappingURL=topic-alias-recv.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/topic-alias-recv.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/topic-alias-recv.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"topic-alias-recv.js","sourceRoot":"","sources":["../../src/lib/topic-alias-recv.ts"],"names":[],"mappings":";;AAKA,MAAqB,cAAc;IAOlC,YAAY,GAAW;QACtB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAA;QACtB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;IACf,CAAC;IAQD,GAAG,CAAC,KAAa,EAAE,KAAa;QAC/B,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE;YACpC,OAAO,KAAK,CAAA;SACZ;QACD,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,KAAK,CAAA;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,CAAA;QACnD,OAAO,IAAI,CAAA;IACZ,CAAC;IAOD,eAAe,CAAC,KAAa;QAC5B,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;IAChC,CAAC;IAKD,KAAK;QACJ,IAAI,CAAC,YAAY,GAAG,EAAE,CAAA;IACvB,CAAC;CACD;AA1CD,iCA0CC"}
|
||||
13
VApp/node_modules/mqtt/build/lib/topic-alias-send.d.ts
generated
vendored
Normal file
13
VApp/node_modules/mqtt/build/lib/topic-alias-send.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
export default class TopicAliasSend {
|
||||
private aliasToTopic;
|
||||
private topicToAlias;
|
||||
private max;
|
||||
private numberAllocator;
|
||||
length: number;
|
||||
constructor(max: number);
|
||||
put(topic: string, alias: number): boolean;
|
||||
getTopicByAlias(alias: number): string;
|
||||
getAliasByTopic(topic: string): number | undefined;
|
||||
clear(): void;
|
||||
getLruAlias(): number;
|
||||
}
|
||||
53
VApp/node_modules/mqtt/build/lib/topic-alias-send.js
generated
vendored
Normal file
53
VApp/node_modules/mqtt/build/lib/topic-alias-send.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const lru_cache_1 = require("lru-cache");
|
||||
const number_allocator_1 = require("number-allocator");
|
||||
class TopicAliasSend {
|
||||
constructor(max) {
|
||||
if (max > 0) {
|
||||
this.aliasToTopic = new lru_cache_1.LRUCache({ max });
|
||||
this.topicToAlias = {};
|
||||
this.numberAllocator = new number_allocator_1.NumberAllocator(1, max);
|
||||
this.max = max;
|
||||
this.length = 0;
|
||||
}
|
||||
}
|
||||
put(topic, alias) {
|
||||
if (alias === 0 || alias > this.max) {
|
||||
return false;
|
||||
}
|
||||
const entry = this.aliasToTopic.get(alias);
|
||||
if (entry) {
|
||||
delete this.topicToAlias[entry];
|
||||
}
|
||||
this.aliasToTopic.set(alias, topic);
|
||||
this.topicToAlias[topic] = alias;
|
||||
this.numberAllocator.use(alias);
|
||||
this.length = this.aliasToTopic.size;
|
||||
return true;
|
||||
}
|
||||
getTopicByAlias(alias) {
|
||||
return this.aliasToTopic.get(alias);
|
||||
}
|
||||
getAliasByTopic(topic) {
|
||||
const alias = this.topicToAlias[topic];
|
||||
if (typeof alias !== 'undefined') {
|
||||
this.aliasToTopic.get(alias);
|
||||
}
|
||||
return alias;
|
||||
}
|
||||
clear() {
|
||||
this.aliasToTopic.clear();
|
||||
this.topicToAlias = {};
|
||||
this.numberAllocator.clear();
|
||||
this.length = 0;
|
||||
}
|
||||
getLruAlias() {
|
||||
const alias = this.numberAllocator.firstVacant();
|
||||
if (alias)
|
||||
return alias;
|
||||
return [...this.aliasToTopic.keys()][this.aliasToTopic.size - 1];
|
||||
}
|
||||
}
|
||||
exports.default = TopicAliasSend;
|
||||
//# sourceMappingURL=topic-alias-send.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/topic-alias-send.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/topic-alias-send.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"topic-alias-send.js","sourceRoot":"","sources":["../../src/lib/topic-alias-send.ts"],"names":[],"mappings":";;AAGA,yCAAoC;AACpC,uDAAkD;AAOlD,MAAqB,cAAc;IAWlC,YAAY,GAAW;QACtB,IAAI,GAAG,GAAG,CAAC,EAAE;YACZ,IAAI,CAAC,YAAY,GAAG,IAAI,oBAAQ,CAAiB,EAAE,GAAG,EAAE,CAAC,CAAA;YACzD,IAAI,CAAC,YAAY,GAAG,EAAE,CAAA;YACtB,IAAI,CAAC,eAAe,GAAG,IAAI,kCAAe,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;YAClD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;YACd,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;SACf;IACF,CAAC;IAQD,GAAG,CAAC,KAAa,EAAE,KAAa;QAC/B,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE;YACpC,OAAO,KAAK,CAAA;SACZ;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAC1C,IAAI,KAAK,EAAE;YACV,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;SAC/B;QACD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;QACnC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,KAAK,CAAA;QAChC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAA;QACpC,OAAO,IAAI,CAAA;IACZ,CAAC;IAOD,eAAe,CAAC,KAAa;QAC5B,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IACpC,CAAC;IAOD,eAAe,CAAC,KAAa;QAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;QACtC,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;YACjC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;SAC5B;QACD,OAAO,KAAK,CAAA;IACb,CAAC;IAKD,KAAK;QACJ,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAA;QACzB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAA;QACtB,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;IAChB,CAAC;IAMD,WAAW;QACV,MAAM,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,CAAA;QAChD,IAAI,KAAK;YAAE,OAAO,KAAK,CAAA;QAEvB,OAAO,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC,CAAC,CAAA;IACjE,CAAC;CACD;AApFD,iCAoFC"}
|
||||
11
VApp/node_modules/mqtt/build/lib/unique-message-id-provider.d.ts
generated
vendored
Normal file
11
VApp/node_modules/mqtt/build/lib/unique-message-id-provider.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { IMessageIdProvider } from './default-message-id-provider';
|
||||
export default class UniqueMessageIdProvider implements IMessageIdProvider {
|
||||
private numberAllocator;
|
||||
private lastId;
|
||||
constructor();
|
||||
allocate(): number;
|
||||
getLastAllocated(): number;
|
||||
register(messageId: number): boolean;
|
||||
deallocate(messageId: number): void;
|
||||
clear(): void;
|
||||
}
|
||||
26
VApp/node_modules/mqtt/build/lib/unique-message-id-provider.js
generated
vendored
Normal file
26
VApp/node_modules/mqtt/build/lib/unique-message-id-provider.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const number_allocator_1 = require("number-allocator");
|
||||
class UniqueMessageIdProvider {
|
||||
constructor() {
|
||||
this.numberAllocator = new number_allocator_1.NumberAllocator(1, 65535);
|
||||
}
|
||||
allocate() {
|
||||
this.lastId = this.numberAllocator.alloc();
|
||||
return this.lastId;
|
||||
}
|
||||
getLastAllocated() {
|
||||
return this.lastId;
|
||||
}
|
||||
register(messageId) {
|
||||
return this.numberAllocator.use(messageId);
|
||||
}
|
||||
deallocate(messageId) {
|
||||
this.numberAllocator.free(messageId);
|
||||
}
|
||||
clear() {
|
||||
this.numberAllocator.clear();
|
||||
}
|
||||
}
|
||||
exports.default = UniqueMessageIdProvider;
|
||||
//# sourceMappingURL=unique-message-id-provider.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/unique-message-id-provider.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/unique-message-id-provider.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"unique-message-id-provider.js","sourceRoot":"","sources":["../../src/lib/unique-message-id-provider.ts"],"names":[],"mappings":";;AAAA,uDAAkD;AAOlD,MAAqB,uBAAuB;IAK3C;QACC,IAAI,CAAC,eAAe,GAAG,IAAI,kCAAe,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;IACrD,CAAC;IASD,QAAQ;QACP,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAA;QAC1C,OAAO,IAAI,CAAC,MAAM,CAAA;IACnB,CAAC;IAOD,gBAAgB;QACf,OAAO,IAAI,CAAC,MAAM,CAAA;IACnB,CAAC;IAQD,QAAQ,CAAC,SAAiB;QACzB,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,SAAS,CAAY,CAAA;IACtD,CAAC;IAOD,UAAU,CAAC,SAAiB;QAC3B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACrC,CAAC;IAMD,KAAK;QACJ,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAA;IAC7B,CAAC;CACD;AAxDD,0CAwDC"}
|
||||
2
VApp/node_modules/mqtt/build/lib/validations.d.ts
generated
vendored
Normal file
2
VApp/node_modules/mqtt/build/lib/validations.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare function validateTopic(topic: string): boolean;
|
||||
export declare function validateTopics(topics: string[]): string;
|
||||
32
VApp/node_modules/mqtt/build/lib/validations.js
generated
vendored
Normal file
32
VApp/node_modules/mqtt/build/lib/validations.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.validateTopics = exports.validateTopic = void 0;
|
||||
function validateTopic(topic) {
|
||||
const parts = topic.split('/');
|
||||
for (let i = 0; i < parts.length; i++) {
|
||||
if (parts[i] === '+') {
|
||||
continue;
|
||||
}
|
||||
if (parts[i] === '#') {
|
||||
return i === parts.length - 1;
|
||||
}
|
||||
if (parts[i].indexOf('+') !== -1 || parts[i].indexOf('#') !== -1) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
exports.validateTopic = validateTopic;
|
||||
function validateTopics(topics) {
|
||||
if (topics.length === 0) {
|
||||
return 'empty_topic_list';
|
||||
}
|
||||
for (let i = 0; i < topics.length; i++) {
|
||||
if (!validateTopic(topics[i])) {
|
||||
return topics[i];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
exports.validateTopics = validateTopics;
|
||||
//# sourceMappingURL=validations.js.map
|
||||
1
VApp/node_modules/mqtt/build/lib/validations.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/lib/validations.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"validations.js","sourceRoot":"","sources":["../../src/lib/validations.ts"],"names":[],"mappings":";;;AASA,SAAgB,aAAa,CAAC,KAAa;IAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAE9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;YACrB,SAAQ;SACR;QAED,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;YAErB,OAAO,CAAC,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,CAAA;SAC7B;QAED,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YACjE,OAAO,KAAK,CAAA;SACZ;KACD;IAED,OAAO,IAAI,CAAA;AACZ,CAAC;AAnBD,sCAmBC;AAOD,SAAgB,cAAc,CAAC,MAAgB;IAC9C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;QACxB,OAAO,kBAAkB,CAAA;KACzB;IACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACvC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;YAC9B,OAAO,MAAM,CAAC,CAAC,CAAC,CAAA;SAChB;KACD;IACD,OAAO,IAAI,CAAA;AACZ,CAAC;AAVD,wCAUC"}
|
||||
10
VApp/node_modules/mqtt/build/mqtt.d.ts
generated
vendored
Normal file
10
VApp/node_modules/mqtt/build/mqtt.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import MqttClient from './lib/client';
|
||||
import DefaultMessageIdProvider from './lib/default-message-id-provider';
|
||||
import UniqueMessageIdProvider from './lib/unique-message-id-provider';
|
||||
import Store, { IStore } from './lib/store';
|
||||
import connect, { connectAsync } from './lib/connect';
|
||||
export declare const Client: typeof MqttClient;
|
||||
export { connect, connectAsync, MqttClient, Store, DefaultMessageIdProvider, UniqueMessageIdProvider, IStore, };
|
||||
export * from './lib/client';
|
||||
export * from './lib/shared';
|
||||
export { ReasonCodes } from './lib/handlers/ack';
|
||||
49
VApp/node_modules/mqtt/build/mqtt.js
generated
vendored
Normal file
49
VApp/node_modules/mqtt/build/mqtt.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ReasonCodes = exports.UniqueMessageIdProvider = exports.DefaultMessageIdProvider = exports.Store = exports.MqttClient = exports.connectAsync = exports.connect = exports.Client = void 0;
|
||||
const client_1 = __importDefault(require("./lib/client"));
|
||||
exports.MqttClient = client_1.default;
|
||||
const default_message_id_provider_1 = __importDefault(require("./lib/default-message-id-provider"));
|
||||
exports.DefaultMessageIdProvider = default_message_id_provider_1.default;
|
||||
const unique_message_id_provider_1 = __importDefault(require("./lib/unique-message-id-provider"));
|
||||
exports.UniqueMessageIdProvider = unique_message_id_provider_1.default;
|
||||
const store_1 = __importDefault(require("./lib/store"));
|
||||
exports.Store = store_1.default;
|
||||
const connect_1 = __importStar(require("./lib/connect"));
|
||||
exports.connect = connect_1.default;
|
||||
Object.defineProperty(exports, "connectAsync", { enumerable: true, get: function () { return connect_1.connectAsync; } });
|
||||
exports.Client = client_1.default;
|
||||
__exportStar(require("./lib/client"), exports);
|
||||
__exportStar(require("./lib/shared"), exports);
|
||||
var ack_1 = require("./lib/handlers/ack");
|
||||
Object.defineProperty(exports, "ReasonCodes", { enumerable: true, get: function () { return ack_1.ReasonCodes; } });
|
||||
//# sourceMappingURL=mqtt.js.map
|
||||
1
VApp/node_modules/mqtt/build/mqtt.js.map
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/mqtt.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mqtt.js","sourceRoot":"","sources":["../src/mqtt.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,0DAAqC;AAUpC,qBAVM,gBAAU,CAUN;AATX,oGAAwE;AAWvE,mCAXM,qCAAwB,CAWN;AAVzB,kGAAsE;AAWrE,kCAXM,oCAAuB,CAWN;AAVxB,wDAA2C;AAQ1C,gBARM,eAAK,CAQN;AAPN,yDAAqD;AAIpD,kBAJM,iBAAO,CAIN;AACP,6FALiB,sBAAY,OAKjB;AAHA,QAAA,MAAM,GAAG,gBAAU,CAAA;AAUhC,+CAA4B;AAC5B,+CAA4B;AAC5B,0CAAgD;AAAvC,kGAAA,WAAW,OAAA"}
|
||||
1
VApp/node_modules/mqtt/build/tsconfig.build.tsbuildinfo
generated
vendored
Normal file
1
VApp/node_modules/mqtt/build/tsconfig.build.tsbuildinfo
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user