sst 2.7.1 → 2.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/ci-info.d.ts +4 -0
- package/cli/ci-info.js +8 -0
- package/cli/commands/deploy.js +2 -1
- package/cli/commands/dev.js +6 -2
- package/cli/commands/diff.js +20 -5
- package/cli/telemetry/environment.js +4 -4
- package/cli/ui/functions.js +3 -3
- package/constructs/AppSyncApi.d.ts +1 -2
- package/constructs/AppSyncApi.js +5 -15
- package/constructs/Function.d.ts +1 -1
- package/constructs/Function.js +7 -2
- package/constructs/deprecated/cross-region-helper.js +3 -3
- package/constructs/util/appSyncApiDomain.d.ts +14 -2
- package/constructs/util/appSyncApiDomain.js +56 -11
- package/package.json +1 -1
- package/runtime/handlers.js +7 -0
- package/runtime/workers.js +4 -0
- package/sst.mjs +66 -14
- package/support/base-site-archiver.mjs +12 -12
- package/support/bootstrap-metadata-function/index.mjs +1345 -1409
- package/support/bridge/bridge.mjs +46 -35
- package/support/custom-resources/index.mjs +6468 -6532
- package/support/job-invoker/index.mjs +90 -907
- package/support/rds-migrator/index.mjs +16 -16
- package/support/script-function/index.mjs +90 -907
- package/support/ssr-site-function-archiver.mjs +9 -9
|
@@ -11469,160 +11469,12 @@ var require_dist_cjs36 = __commonJS({
|
|
|
11469
11469
|
}
|
|
11470
11470
|
});
|
|
11471
11471
|
|
|
11472
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
11473
|
-
var require_promise = __commonJS({
|
|
11474
|
-
"../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/common/promise.js"(exports) {
|
|
11475
|
-
"use strict";
|
|
11476
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11477
|
-
exports.newLiftedPromise = exports.makeSelfCleaningPromise = void 0;
|
|
11478
|
-
function makeSelfCleaningPromise(promise, cleaner) {
|
|
11479
|
-
if (!cleaner) {
|
|
11480
|
-
return promise;
|
|
11481
|
-
}
|
|
11482
|
-
return promise.finally(() => {
|
|
11483
|
-
cleaner();
|
|
11484
|
-
});
|
|
11485
|
-
}
|
|
11486
|
-
__name(makeSelfCleaningPromise, "makeSelfCleaningPromise");
|
|
11487
|
-
exports.makeSelfCleaningPromise = makeSelfCleaningPromise;
|
|
11488
|
-
function newLiftedPromise(promiseBody) {
|
|
11489
|
-
let localResolve = void 0;
|
|
11490
|
-
let localReject = void 0;
|
|
11491
|
-
let promise = new Promise((resolve, reject) => {
|
|
11492
|
-
localResolve = resolve;
|
|
11493
|
-
localReject = reject;
|
|
11494
|
-
});
|
|
11495
|
-
if (!localResolve || !localReject) {
|
|
11496
|
-
throw new Error("Failed to bind resolve and reject when making lifted promise");
|
|
11497
|
-
}
|
|
11498
|
-
if (promiseBody) {
|
|
11499
|
-
promiseBody(localResolve, localReject);
|
|
11500
|
-
}
|
|
11501
|
-
return {
|
|
11502
|
-
promise,
|
|
11503
|
-
resolve: localResolve,
|
|
11504
|
-
reject: localReject
|
|
11505
|
-
};
|
|
11506
|
-
}
|
|
11507
|
-
__name(newLiftedPromise, "newLiftedPromise");
|
|
11508
|
-
exports.newLiftedPromise = newLiftedPromise;
|
|
11509
|
-
}
|
|
11510
|
-
});
|
|
11511
|
-
|
|
11512
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/common/cancel.js
|
|
11513
|
-
var require_cancel = __commonJS({
|
|
11514
|
-
"../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/common/cancel.js"(exports) {
|
|
11515
|
-
"use strict";
|
|
11516
|
-
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
11517
|
-
if (k2 === void 0)
|
|
11518
|
-
k2 = k;
|
|
11519
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11520
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11521
|
-
desc = { enumerable: true, get: function() {
|
|
11522
|
-
return m[k];
|
|
11523
|
-
} };
|
|
11524
|
-
}
|
|
11525
|
-
Object.defineProperty(o, k2, desc);
|
|
11526
|
-
} : function(o, m, k, k2) {
|
|
11527
|
-
if (k2 === void 0)
|
|
11528
|
-
k2 = k;
|
|
11529
|
-
o[k2] = m[k];
|
|
11530
|
-
});
|
|
11531
|
-
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
11532
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11533
|
-
} : function(o, v) {
|
|
11534
|
-
o["default"] = v;
|
|
11535
|
-
});
|
|
11536
|
-
var __importStar2 = exports && exports.__importStar || function(mod) {
|
|
11537
|
-
if (mod && mod.__esModule)
|
|
11538
|
-
return mod;
|
|
11539
|
-
var result = {};
|
|
11540
|
-
if (mod != null) {
|
|
11541
|
-
for (var k in mod)
|
|
11542
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
11543
|
-
__createBinding2(result, mod, k);
|
|
11544
|
-
}
|
|
11545
|
-
__setModuleDefault2(result, mod);
|
|
11546
|
-
return result;
|
|
11547
|
-
};
|
|
11548
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11549
|
-
exports.newCancellablePromiseFromNextEvent = exports.CancelController = exports.EVENT_NAME = void 0;
|
|
11550
|
-
var events_1 = __require("events");
|
|
11551
|
-
var promise = __importStar2(require_promise());
|
|
11552
|
-
exports.EVENT_NAME = "cancelled";
|
|
11553
|
-
var CancelController = class {
|
|
11554
|
-
constructor(options) {
|
|
11555
|
-
this.cancelled = false;
|
|
11556
|
-
if (options && options.emitterFactory) {
|
|
11557
|
-
this.emitter = options.emitterFactory();
|
|
11558
|
-
} else {
|
|
11559
|
-
this.emitter = new events_1.EventEmitter();
|
|
11560
|
-
}
|
|
11561
|
-
}
|
|
11562
|
-
cancel() {
|
|
11563
|
-
if (!this.cancelled) {
|
|
11564
|
-
this.cancelled = true;
|
|
11565
|
-
this.emitter.emit(exports.EVENT_NAME);
|
|
11566
|
-
this.emitter.removeAllListeners(exports.EVENT_NAME);
|
|
11567
|
-
}
|
|
11568
|
-
}
|
|
11569
|
-
hasBeenCancelled() {
|
|
11570
|
-
return this.cancelled;
|
|
11571
|
-
}
|
|
11572
|
-
addListener(listener) {
|
|
11573
|
-
if (this.cancelled) {
|
|
11574
|
-
listener();
|
|
11575
|
-
return void 0;
|
|
11576
|
-
}
|
|
11577
|
-
this.emitter.on(exports.EVENT_NAME, listener);
|
|
11578
|
-
return () => {
|
|
11579
|
-
this.emitter.removeListener(exports.EVENT_NAME, listener);
|
|
11580
|
-
};
|
|
11581
|
-
}
|
|
11582
|
-
};
|
|
11583
|
-
__name(CancelController, "CancelController");
|
|
11584
|
-
exports.CancelController = CancelController;
|
|
11585
|
-
function newCancellablePromiseFromNextEvent(config) {
|
|
11586
|
-
let onEvent = void 0;
|
|
11587
|
-
let cancelRemoveListener = void 0;
|
|
11588
|
-
let liftedPromise = promise.newLiftedPromise();
|
|
11589
|
-
onEvent = /* @__PURE__ */ __name((eventData) => {
|
|
11590
|
-
try {
|
|
11591
|
-
if (config.eventDataTransformer) {
|
|
11592
|
-
liftedPromise.resolve(config.eventDataTransformer(eventData));
|
|
11593
|
-
} else {
|
|
11594
|
-
liftedPromise.resolve(eventData);
|
|
11595
|
-
}
|
|
11596
|
-
} catch (err) {
|
|
11597
|
-
liftedPromise.reject(err);
|
|
11598
|
-
}
|
|
11599
|
-
}, "onEvent");
|
|
11600
|
-
config.emitter.addListener(config.eventName, onEvent);
|
|
11601
|
-
if (config.cancelController) {
|
|
11602
|
-
cancelRemoveListener = config.cancelController.addListener(() => {
|
|
11603
|
-
liftedPromise.reject(config.cancelMessage);
|
|
11604
|
-
});
|
|
11605
|
-
}
|
|
11606
|
-
return promise.makeSelfCleaningPromise(liftedPromise.promise, () => {
|
|
11607
|
-
if (onEvent) {
|
|
11608
|
-
config.emitter.removeListener(config.eventName, onEvent);
|
|
11609
|
-
}
|
|
11610
|
-
if (cancelRemoveListener) {
|
|
11611
|
-
cancelRemoveListener();
|
|
11612
|
-
}
|
|
11613
|
-
});
|
|
11614
|
-
}
|
|
11615
|
-
__name(newCancellablePromiseFromNextEvent, "newCancellablePromiseFromNextEvent");
|
|
11616
|
-
exports.newCancellablePromiseFromNextEvent = newCancellablePromiseFromNextEvent;
|
|
11617
|
-
}
|
|
11618
|
-
});
|
|
11619
|
-
|
|
11620
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/package.json
|
|
11472
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/package.json
|
|
11621
11473
|
var require_package4 = __commonJS({
|
|
11622
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
11474
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/package.json"(exports, module) {
|
|
11623
11475
|
module.exports = {
|
|
11624
11476
|
name: "aws-crt",
|
|
11625
|
-
version: "1.15.
|
|
11477
|
+
version: "1.15.9",
|
|
11626
11478
|
description: "NodeJS/browser bindings to the aws-c-* libraries",
|
|
11627
11479
|
homepage: "https://github.com/awslabs/aws-crt-nodejs",
|
|
11628
11480
|
repository: {
|
|
@@ -11652,42 +11504,40 @@ var require_package4 = __commonJS({
|
|
|
11652
11504
|
"@types/jest": "^27.0.1",
|
|
11653
11505
|
"@types/node": "^10.17.54",
|
|
11654
11506
|
"@types/prettier": "2.6.0",
|
|
11655
|
-
"@types/puppeteer": "^5.4.
|
|
11507
|
+
"@types/puppeteer": "^5.4.4",
|
|
11656
11508
|
"@types/uuid": "^3.4.8",
|
|
11657
11509
|
"@types/ws": "^7.4.7",
|
|
11658
11510
|
"aws-sdk": "^2.848.0",
|
|
11659
|
-
"cmake-js": "^6.3.2",
|
|
11660
11511
|
"https-proxy-agent": "^5.0.1",
|
|
11661
11512
|
jest: "^27.2.1",
|
|
11662
11513
|
"jest-puppeteer": "^5.0.4",
|
|
11663
11514
|
"jest-runtime": "^27.2.1",
|
|
11664
11515
|
puppeteer: "^3.3.0",
|
|
11665
|
-
tar: "^6.1.11",
|
|
11666
11516
|
"ts-jest": "^27.0.5",
|
|
11667
11517
|
typedoc: "^0.22.18",
|
|
11668
11518
|
"typedoc-plugin-merge-modules": "^3.1.0",
|
|
11669
11519
|
typescript: "^4.7.4",
|
|
11670
11520
|
uuid: "^8.3.2",
|
|
11671
|
-
yargs: "^17.2.1"
|
|
11521
|
+
yargs: "^17.2.1",
|
|
11522
|
+
"cmake-js": "^6.3.2",
|
|
11523
|
+
tar: "^6.1.11"
|
|
11672
11524
|
},
|
|
11673
11525
|
dependencies: {
|
|
11674
11526
|
"@aws-sdk/util-utf8-browser": "^3.109.0",
|
|
11675
11527
|
"@httptoolkit/websocket-stream": "^6.0.0",
|
|
11676
11528
|
axios: "^0.24.0",
|
|
11677
|
-
buffer: "^6.0.3",
|
|
11678
|
-
"cmake-js": "^6.3.2",
|
|
11679
11529
|
"crypto-js": "^4.0.0",
|
|
11680
11530
|
mqtt: "^4.3.7",
|
|
11681
|
-
|
|
11531
|
+
"cmake-js": "^6.3.2",
|
|
11682
11532
|
tar: "^6.1.11"
|
|
11683
11533
|
}
|
|
11684
11534
|
};
|
|
11685
11535
|
}
|
|
11686
11536
|
});
|
|
11687
11537
|
|
|
11688
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
11538
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/platform.js
|
|
11689
11539
|
var require_platform = __commonJS({
|
|
11690
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
11540
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/platform.js"(exports) {
|
|
11691
11541
|
"use strict";
|
|
11692
11542
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11693
11543
|
exports.crt_version = exports.package_info = exports.is_browser = exports.is_nodejs = void 0;
|
|
@@ -11723,9 +11573,9 @@ var require_platform = __commonJS({
|
|
|
11723
11573
|
}
|
|
11724
11574
|
});
|
|
11725
11575
|
|
|
11726
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
11576
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/resource_safety.js
|
|
11727
11577
|
var require_resource_safety = __commonJS({
|
|
11728
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
11578
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/resource_safety.js"(exports) {
|
|
11729
11579
|
"use strict";
|
|
11730
11580
|
var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
11731
11581
|
function adopt(value) {
|
|
@@ -11774,9 +11624,9 @@ var require_resource_safety = __commonJS({
|
|
|
11774
11624
|
}
|
|
11775
11625
|
});
|
|
11776
11626
|
|
|
11777
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
11627
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/binding.js
|
|
11778
11628
|
var require_binding = __commonJS({
|
|
11779
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
11629
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/binding.js"(exports) {
|
|
11780
11630
|
"use strict";
|
|
11781
11631
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
11782
11632
|
if (k2 === void 0)
|
|
@@ -11849,9 +11699,9 @@ var require_binding = __commonJS({
|
|
|
11849
11699
|
}
|
|
11850
11700
|
});
|
|
11851
11701
|
|
|
11852
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
11702
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/error.js
|
|
11853
11703
|
var require_error = __commonJS({
|
|
11854
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
11704
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/error.js"(exports) {
|
|
11855
11705
|
"use strict";
|
|
11856
11706
|
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
11857
11707
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -11899,9 +11749,9 @@ var require_error = __commonJS({
|
|
|
11899
11749
|
}
|
|
11900
11750
|
});
|
|
11901
11751
|
|
|
11902
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
11752
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/native_resource.js
|
|
11903
11753
|
var require_native_resource = __commonJS({
|
|
11904
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
11754
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/native_resource.js"(exports) {
|
|
11905
11755
|
"use strict";
|
|
11906
11756
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11907
11757
|
exports.NativeResourceMixin = exports.NativeResource = void 0;
|
|
@@ -11935,9 +11785,9 @@ var require_native_resource = __commonJS({
|
|
|
11935
11785
|
}
|
|
11936
11786
|
});
|
|
11937
11787
|
|
|
11938
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
11788
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/io.js
|
|
11939
11789
|
var require_io = __commonJS({
|
|
11940
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
11790
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/io.js"(exports) {
|
|
11941
11791
|
"use strict";
|
|
11942
11792
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11943
11793
|
exports.SocketDomain = exports.SocketType = exports.TlsVersion = void 0;
|
|
@@ -11964,9 +11814,9 @@ var require_io = __commonJS({
|
|
|
11964
11814
|
}
|
|
11965
11815
|
});
|
|
11966
11816
|
|
|
11967
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
11817
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/io.js
|
|
11968
11818
|
var require_io2 = __commonJS({
|
|
11969
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
11819
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/io.js"(exports) {
|
|
11970
11820
|
"use strict";
|
|
11971
11821
|
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
11972
11822
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -11986,7 +11836,6 @@ var require_io2 = __commonJS({
|
|
|
11986
11836
|
Object.defineProperty(exports, "SocketDomain", { enumerable: true, get: function() {
|
|
11987
11837
|
return io_2.SocketDomain;
|
|
11988
11838
|
} });
|
|
11989
|
-
var error_1 = require_error();
|
|
11990
11839
|
function error_code_to_string(error_code) {
|
|
11991
11840
|
return binding_1.default.error_code_to_string(error_code);
|
|
11992
11841
|
}
|
|
@@ -12022,7 +11871,7 @@ var require_io2 = __commonJS({
|
|
|
12022
11871
|
super(binding_1.default.io_input_stream_new(16 * 1024));
|
|
12023
11872
|
this.source = source;
|
|
12024
11873
|
this.source.on("data", (data) => {
|
|
12025
|
-
data = Buffer.isBuffer(data) ? data : Buffer
|
|
11874
|
+
data = Buffer.isBuffer(data) ? data : new Buffer(data.toString(), "utf8");
|
|
12026
11875
|
binding_1.default.io_input_stream_append(this.native_handle(), data);
|
|
12027
11876
|
});
|
|
12028
11877
|
this.source.on("end", () => {
|
|
@@ -12114,9 +11963,6 @@ var require_io2 = __commonJS({
|
|
|
12114
11963
|
exports.TlsContextOptions = TlsContextOptions;
|
|
12115
11964
|
var TlsContext = class extends native_resource_1.NativeResource {
|
|
12116
11965
|
constructor(ctx_opt) {
|
|
12117
|
-
if (ctx_opt == null || ctx_opt == void 0) {
|
|
12118
|
-
throw new error_1.CrtError("TlsContext constructor: ctx_opt not defined");
|
|
12119
|
-
}
|
|
12120
11966
|
super(binding_1.default.io_tls_ctx_new(ctx_opt.min_tls_version, ctx_opt.ca_filepath, ctx_opt.ca_dirpath, ctx_opt.certificate_authority, ctx_opt.alpn_list && ctx_opt.alpn_list.length > 0 ? ctx_opt.alpn_list.join(";") : void 0, ctx_opt.certificate_filepath, ctx_opt.certificate, ctx_opt.private_key_filepath, ctx_opt.private_key, ctx_opt.pkcs12_filepath, ctx_opt.pkcs12_password, ctx_opt.pkcs11_options, ctx_opt.windows_cert_store_path, ctx_opt.verify_peer));
|
|
12121
11967
|
}
|
|
12122
11968
|
};
|
|
@@ -12146,9 +11992,6 @@ var require_io2 = __commonJS({
|
|
|
12146
11992
|
exports.ServerTlsContext = ServerTlsContext;
|
|
12147
11993
|
var TlsConnectionOptions = class extends native_resource_1.NativeResource {
|
|
12148
11994
|
constructor(tls_ctx, server_name, alpn_list = []) {
|
|
12149
|
-
if (tls_ctx == null || tls_ctx == void 0) {
|
|
12150
|
-
throw new error_1.CrtError("TlsConnectionOptions constructor: tls_ctx not defined");
|
|
12151
|
-
}
|
|
12152
11995
|
super(binding_1.default.io_tls_connection_options_new(tls_ctx.native_handle(), server_name, alpn_list && alpn_list.length > 0 ? alpn_list.join(";") : void 0));
|
|
12153
11996
|
this.tls_ctx = tls_ctx;
|
|
12154
11997
|
this.server_name = server_name;
|
|
@@ -12178,9 +12021,9 @@ var require_io2 = __commonJS({
|
|
|
12178
12021
|
}
|
|
12179
12022
|
});
|
|
12180
12023
|
|
|
12181
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
12024
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/auth.js
|
|
12182
12025
|
var require_auth = __commonJS({
|
|
12183
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
12026
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/auth.js"(exports) {
|
|
12184
12027
|
"use strict";
|
|
12185
12028
|
var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
12186
12029
|
function adopt(value) {
|
|
@@ -12229,17 +12072,8 @@ var require_auth = __commonJS({
|
|
|
12229
12072
|
return super.newStatic(access_key, secret_key, session_token);
|
|
12230
12073
|
}
|
|
12231
12074
|
static newCognito(config) {
|
|
12232
|
-
if (config == null || config == void 0) {
|
|
12233
|
-
throw new error_1.CrtError("AwsCredentialsProvider newCognito: Cognito config not defined");
|
|
12234
|
-
}
|
|
12235
12075
|
return super.newCognito(config, config.tlsContext != null ? config.tlsContext.native_handle() : new io_1.ClientTlsContext().native_handle(), config.bootstrap != null ? config.bootstrap.native_handle() : null, config.httpProxyOptions ? config.httpProxyOptions.create_native_handle() : null);
|
|
12236
12076
|
}
|
|
12237
|
-
static newX509(config) {
|
|
12238
|
-
if (config == null || config == void 0) {
|
|
12239
|
-
throw new error_1.CrtError("AwsCredentialsProvider newX509: X509 config not defined");
|
|
12240
|
-
}
|
|
12241
|
-
return super.newX509(config, config.tlsContext.native_handle(), config.httpProxyOptions ? config.httpProxyOptions.create_native_handle() : null);
|
|
12242
|
-
}
|
|
12243
12077
|
};
|
|
12244
12078
|
__name(AwsCredentialsProvider, "AwsCredentialsProvider");
|
|
12245
12079
|
exports.AwsCredentialsProvider = AwsCredentialsProvider;
|
|
@@ -12294,9 +12128,9 @@ var require_auth = __commonJS({
|
|
|
12294
12128
|
}
|
|
12295
12129
|
});
|
|
12296
12130
|
|
|
12297
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
12131
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/checksums.js
|
|
12298
12132
|
var require_checksums = __commonJS({
|
|
12299
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
12133
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/checksums.js"(exports) {
|
|
12300
12134
|
"use strict";
|
|
12301
12135
|
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
12302
12136
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -12317,9 +12151,9 @@ var require_checksums = __commonJS({
|
|
|
12317
12151
|
}
|
|
12318
12152
|
});
|
|
12319
12153
|
|
|
12320
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
12154
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/crt.js
|
|
12321
12155
|
var require_crt = __commonJS({
|
|
12322
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
12156
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/crt.js"(exports) {
|
|
12323
12157
|
"use strict";
|
|
12324
12158
|
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
12325
12159
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -12340,9 +12174,9 @@ var require_crt = __commonJS({
|
|
|
12340
12174
|
}
|
|
12341
12175
|
});
|
|
12342
12176
|
|
|
12343
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
12177
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/crypto.js
|
|
12344
12178
|
var require_crypto = __commonJS({
|
|
12345
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
12179
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/crypto.js"(exports) {
|
|
12346
12180
|
"use strict";
|
|
12347
12181
|
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
12348
12182
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -12426,9 +12260,41 @@ var require_crypto = __commonJS({
|
|
|
12426
12260
|
}
|
|
12427
12261
|
});
|
|
12428
12262
|
|
|
12429
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
12263
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/http.js
|
|
12264
|
+
var require_http = __commonJS({
|
|
12265
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/http.js"(exports) {
|
|
12266
|
+
"use strict";
|
|
12267
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12268
|
+
exports.CommonHttpProxyOptions = exports.HttpProxyAuthenticationType = exports.HttpVersion = void 0;
|
|
12269
|
+
var HttpVersion;
|
|
12270
|
+
(function(HttpVersion2) {
|
|
12271
|
+
HttpVersion2[HttpVersion2["Unknown"] = 0] = "Unknown";
|
|
12272
|
+
HttpVersion2[HttpVersion2["Http1_0"] = 1] = "Http1_0";
|
|
12273
|
+
HttpVersion2[HttpVersion2["Http1_1"] = 2] = "Http1_1";
|
|
12274
|
+
HttpVersion2[HttpVersion2["Http2"] = 3] = "Http2";
|
|
12275
|
+
})(HttpVersion = exports.HttpVersion || (exports.HttpVersion = {}));
|
|
12276
|
+
var HttpProxyAuthenticationType;
|
|
12277
|
+
(function(HttpProxyAuthenticationType2) {
|
|
12278
|
+
HttpProxyAuthenticationType2[HttpProxyAuthenticationType2["None"] = 0] = "None";
|
|
12279
|
+
HttpProxyAuthenticationType2[HttpProxyAuthenticationType2["Basic"] = 1] = "Basic";
|
|
12280
|
+
})(HttpProxyAuthenticationType = exports.HttpProxyAuthenticationType || (exports.HttpProxyAuthenticationType = {}));
|
|
12281
|
+
var CommonHttpProxyOptions = class {
|
|
12282
|
+
constructor(host_name, port, auth_method = HttpProxyAuthenticationType.None, auth_username, auth_password) {
|
|
12283
|
+
this.host_name = host_name;
|
|
12284
|
+
this.port = port;
|
|
12285
|
+
this.auth_method = auth_method;
|
|
12286
|
+
this.auth_username = auth_username;
|
|
12287
|
+
this.auth_password = auth_password;
|
|
12288
|
+
}
|
|
12289
|
+
};
|
|
12290
|
+
__name(CommonHttpProxyOptions, "CommonHttpProxyOptions");
|
|
12291
|
+
exports.CommonHttpProxyOptions = CommonHttpProxyOptions;
|
|
12292
|
+
}
|
|
12293
|
+
});
|
|
12294
|
+
|
|
12295
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/event.js
|
|
12430
12296
|
var require_event = __commonJS({
|
|
12431
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
12297
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/event.js"(exports) {
|
|
12432
12298
|
"use strict";
|
|
12433
12299
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12434
12300
|
exports.BufferedEventEmitter = void 0;
|
|
@@ -12475,659 +12341,9 @@ var require_event = __commonJS({
|
|
|
12475
12341
|
}
|
|
12476
12342
|
});
|
|
12477
12343
|
|
|
12478
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
12479
|
-
var require_eventstream_utils = __commonJS({
|
|
12480
|
-
"../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/native/eventstream_utils.js"(exports) {
|
|
12481
|
-
"use strict";
|
|
12482
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12483
|
-
exports.unmarshalInt64BigintFromBuffer = exports.marshalInt64BigintAsBuffer = exports.MIN_INT64 = exports.MAX_INT64 = exports.MIN_INT32 = exports.MAX_INT32 = exports.MIN_INT16 = exports.MAX_INT16 = exports.MIN_INT8 = exports.MAX_INT8 = void 0;
|
|
12484
|
-
var error_1 = require_error();
|
|
12485
|
-
exports.MAX_INT8 = 127;
|
|
12486
|
-
exports.MIN_INT8 = -128;
|
|
12487
|
-
exports.MAX_INT16 = 32767;
|
|
12488
|
-
exports.MIN_INT16 = -32768;
|
|
12489
|
-
exports.MAX_INT32 = 2147483647;
|
|
12490
|
-
exports.MIN_INT32 = -2147483648;
|
|
12491
|
-
exports.MAX_INT64 = BigInt("9223372036854775807");
|
|
12492
|
-
exports.MIN_INT64 = BigInt("-9223372036854775808");
|
|
12493
|
-
var MAX_UINT8_AS_BIGINT = BigInt("256");
|
|
12494
|
-
function marshalInt64BigintAsBuffer(value) {
|
|
12495
|
-
if (value < exports.MIN_INT64 || value > exports.MAX_INT64) {
|
|
12496
|
-
throw new error_1.CrtError("marshalInt64BigintAsBuffer expects a value that can fit in 8 bytes");
|
|
12497
|
-
}
|
|
12498
|
-
let buffer = new Uint8Array(8);
|
|
12499
|
-
if (value < 0) {
|
|
12500
|
-
value = -value - BigInt(1);
|
|
12501
|
-
for (let i = 0; i < 8; ++i) {
|
|
12502
|
-
buffer[i] = 255 - Number(value % MAX_UINT8_AS_BIGINT);
|
|
12503
|
-
value /= MAX_UINT8_AS_BIGINT;
|
|
12504
|
-
}
|
|
12505
|
-
} else {
|
|
12506
|
-
for (let i = 0; i < 8; ++i) {
|
|
12507
|
-
buffer[i] = Number(value % MAX_UINT8_AS_BIGINT);
|
|
12508
|
-
value /= MAX_UINT8_AS_BIGINT;
|
|
12509
|
-
}
|
|
12510
|
-
}
|
|
12511
|
-
return buffer;
|
|
12512
|
-
}
|
|
12513
|
-
__name(marshalInt64BigintAsBuffer, "marshalInt64BigintAsBuffer");
|
|
12514
|
-
exports.marshalInt64BigintAsBuffer = marshalInt64BigintAsBuffer;
|
|
12515
|
-
function unmarshalInt64BigintFromBuffer(buffer) {
|
|
12516
|
-
let value = BigInt(0);
|
|
12517
|
-
let byteView = new Uint8Array(buffer);
|
|
12518
|
-
if (byteView.length != 8) {
|
|
12519
|
-
throw new error_1.CrtError("unmarshalInt64BigintFromBuffer expects a byte buffer of length 8");
|
|
12520
|
-
}
|
|
12521
|
-
let shift = BigInt(1);
|
|
12522
|
-
let isNegative = (byteView[7] & 128) != 0;
|
|
12523
|
-
if (isNegative) {
|
|
12524
|
-
for (let i = 0; i < byteView.length; ++i) {
|
|
12525
|
-
let byteValue = BigInt(255 - byteView[i]);
|
|
12526
|
-
value += byteValue * shift;
|
|
12527
|
-
shift *= MAX_UINT8_AS_BIGINT;
|
|
12528
|
-
}
|
|
12529
|
-
value += BigInt(1);
|
|
12530
|
-
value = -value;
|
|
12531
|
-
} else {
|
|
12532
|
-
for (let i = 0; i < byteView.length; ++i) {
|
|
12533
|
-
let byteValue = BigInt(byteView[i]);
|
|
12534
|
-
value += byteValue * shift;
|
|
12535
|
-
shift *= MAX_UINT8_AS_BIGINT;
|
|
12536
|
-
}
|
|
12537
|
-
}
|
|
12538
|
-
return value;
|
|
12539
|
-
}
|
|
12540
|
-
__name(unmarshalInt64BigintFromBuffer, "unmarshalInt64BigintFromBuffer");
|
|
12541
|
-
exports.unmarshalInt64BigintFromBuffer = unmarshalInt64BigintFromBuffer;
|
|
12542
|
-
}
|
|
12543
|
-
});
|
|
12544
|
-
|
|
12545
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/native/eventstream.js
|
|
12546
|
-
var require_eventstream = __commonJS({
|
|
12547
|
-
"../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/native/eventstream.js"(exports) {
|
|
12548
|
-
"use strict";
|
|
12549
|
-
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
12550
|
-
if (k2 === void 0)
|
|
12551
|
-
k2 = k;
|
|
12552
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12553
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12554
|
-
desc = { enumerable: true, get: function() {
|
|
12555
|
-
return m[k];
|
|
12556
|
-
} };
|
|
12557
|
-
}
|
|
12558
|
-
Object.defineProperty(o, k2, desc);
|
|
12559
|
-
} : function(o, m, k, k2) {
|
|
12560
|
-
if (k2 === void 0)
|
|
12561
|
-
k2 = k;
|
|
12562
|
-
o[k2] = m[k];
|
|
12563
|
-
});
|
|
12564
|
-
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
12565
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
12566
|
-
} : function(o, v) {
|
|
12567
|
-
o["default"] = v;
|
|
12568
|
-
});
|
|
12569
|
-
var __importStar2 = exports && exports.__importStar || function(mod) {
|
|
12570
|
-
if (mod && mod.__esModule)
|
|
12571
|
-
return mod;
|
|
12572
|
-
var result = {};
|
|
12573
|
-
if (mod != null) {
|
|
12574
|
-
for (var k in mod)
|
|
12575
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
12576
|
-
__createBinding2(result, mod, k);
|
|
12577
|
-
}
|
|
12578
|
-
__setModuleDefault2(result, mod);
|
|
12579
|
-
return result;
|
|
12580
|
-
};
|
|
12581
|
-
var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
12582
|
-
function adopt(value) {
|
|
12583
|
-
return value instanceof P ? value : new P(function(resolve) {
|
|
12584
|
-
resolve(value);
|
|
12585
|
-
});
|
|
12586
|
-
}
|
|
12587
|
-
__name(adopt, "adopt");
|
|
12588
|
-
return new (P || (P = Promise))(function(resolve, reject) {
|
|
12589
|
-
function fulfilled(value) {
|
|
12590
|
-
try {
|
|
12591
|
-
step(generator.next(value));
|
|
12592
|
-
} catch (e) {
|
|
12593
|
-
reject(e);
|
|
12594
|
-
}
|
|
12595
|
-
}
|
|
12596
|
-
__name(fulfilled, "fulfilled");
|
|
12597
|
-
function rejected(value) {
|
|
12598
|
-
try {
|
|
12599
|
-
step(generator["throw"](value));
|
|
12600
|
-
} catch (e) {
|
|
12601
|
-
reject(e);
|
|
12602
|
-
}
|
|
12603
|
-
}
|
|
12604
|
-
__name(rejected, "rejected");
|
|
12605
|
-
function step(result) {
|
|
12606
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
12607
|
-
}
|
|
12608
|
-
__name(step, "step");
|
|
12609
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12610
|
-
});
|
|
12611
|
-
};
|
|
12612
|
-
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
12613
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
12614
|
-
};
|
|
12615
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12616
|
-
exports.ClientStream = exports.ClientConnection = exports.MessageType = exports.MessageFlags = exports.Header = exports.HeaderType = void 0;
|
|
12617
|
-
var native_resource_1 = require_native_resource();
|
|
12618
|
-
var event_1 = require_event();
|
|
12619
|
-
var error_1 = require_error();
|
|
12620
|
-
var io = __importStar2(require_io2());
|
|
12621
|
-
var eventstream_utils = __importStar2(require_eventstream_utils());
|
|
12622
|
-
var promise = __importStar2(require_promise());
|
|
12623
|
-
var binding_1 = __importDefault2(require_binding());
|
|
12624
|
-
var HeaderType;
|
|
12625
|
-
(function(HeaderType2) {
|
|
12626
|
-
HeaderType2[HeaderType2["BooleanTrue"] = 0] = "BooleanTrue";
|
|
12627
|
-
HeaderType2[HeaderType2["BooleanFalse"] = 1] = "BooleanFalse";
|
|
12628
|
-
HeaderType2[HeaderType2["Byte"] = 2] = "Byte";
|
|
12629
|
-
HeaderType2[HeaderType2["Int16"] = 3] = "Int16";
|
|
12630
|
-
HeaderType2[HeaderType2["Int32"] = 4] = "Int32";
|
|
12631
|
-
HeaderType2[HeaderType2["Int64"] = 5] = "Int64";
|
|
12632
|
-
HeaderType2[HeaderType2["ByteBuffer"] = 6] = "ByteBuffer";
|
|
12633
|
-
HeaderType2[HeaderType2["String"] = 7] = "String";
|
|
12634
|
-
HeaderType2[HeaderType2["Timestamp"] = 8] = "Timestamp";
|
|
12635
|
-
HeaderType2[HeaderType2["UUID"] = 9] = "UUID";
|
|
12636
|
-
})(HeaderType = exports.HeaderType || (exports.HeaderType = {}));
|
|
12637
|
-
var AWS_MAXIMUM_EVENT_STREAM_HEADER_NAME_LENGTH = 127;
|
|
12638
|
-
var Header = class {
|
|
12639
|
-
constructor(name, type, value) {
|
|
12640
|
-
this.name = name;
|
|
12641
|
-
this.type = type;
|
|
12642
|
-
this.value = value;
|
|
12643
|
-
}
|
|
12644
|
-
static validateHeaderName(name) {
|
|
12645
|
-
if (name.length == 0 || name.length > AWS_MAXIMUM_EVENT_STREAM_HEADER_NAME_LENGTH) {
|
|
12646
|
-
throw new error_1.CrtError(`Event stream header name (${name}) is not valid`);
|
|
12647
|
-
}
|
|
12648
|
-
}
|
|
12649
|
-
static newBoolean(name, value) {
|
|
12650
|
-
Header.validateHeaderName(name);
|
|
12651
|
-
if (value) {
|
|
12652
|
-
return new Header(name, HeaderType.BooleanTrue);
|
|
12653
|
-
} else {
|
|
12654
|
-
return new Header(name, HeaderType.BooleanFalse);
|
|
12655
|
-
}
|
|
12656
|
-
}
|
|
12657
|
-
static newByte(name, value) {
|
|
12658
|
-
Header.validateHeaderName(name);
|
|
12659
|
-
if (value >= eventstream_utils.MIN_INT8 && value <= eventstream_utils.MAX_INT8 && Number.isSafeInteger(value)) {
|
|
12660
|
-
return new Header(name, HeaderType.Byte, value);
|
|
12661
|
-
}
|
|
12662
|
-
throw new error_1.CrtError(`Illegal value for eventstream byte-valued header: ${value}`);
|
|
12663
|
-
}
|
|
12664
|
-
static newInt16(name, value) {
|
|
12665
|
-
Header.validateHeaderName(name);
|
|
12666
|
-
if (value >= eventstream_utils.MIN_INT16 && value <= eventstream_utils.MAX_INT16 && Number.isSafeInteger(value)) {
|
|
12667
|
-
return new Header(name, HeaderType.Int16, value);
|
|
12668
|
-
}
|
|
12669
|
-
throw new error_1.CrtError(`Illegal value for eventstream int16-valued header: ${value}`);
|
|
12670
|
-
}
|
|
12671
|
-
static newInt32(name, value) {
|
|
12672
|
-
Header.validateHeaderName(name);
|
|
12673
|
-
if (value >= eventstream_utils.MIN_INT32 && value <= eventstream_utils.MAX_INT32 && Number.isSafeInteger(value)) {
|
|
12674
|
-
return new Header(name, HeaderType.Int32, value);
|
|
12675
|
-
}
|
|
12676
|
-
throw new error_1.CrtError(`Illegal value for eventstream int32-valued header: ${value}`);
|
|
12677
|
-
}
|
|
12678
|
-
static newInt64FromNumber(name, value) {
|
|
12679
|
-
Header.validateHeaderName(name);
|
|
12680
|
-
if (Number.isSafeInteger(value)) {
|
|
12681
|
-
return new Header(name, HeaderType.Int64, eventstream_utils.marshalInt64BigintAsBuffer(BigInt(value)));
|
|
12682
|
-
}
|
|
12683
|
-
throw new error_1.CrtError(`Illegal value for eventstream int64-valued header: ${value}`);
|
|
12684
|
-
}
|
|
12685
|
-
static newInt64FromBigint(name, value) {
|
|
12686
|
-
Header.validateHeaderName(name);
|
|
12687
|
-
if (value >= eventstream_utils.MIN_INT64 && value <= eventstream_utils.MAX_INT64) {
|
|
12688
|
-
return new Header(name, HeaderType.Int64, eventstream_utils.marshalInt64BigintAsBuffer(value));
|
|
12689
|
-
}
|
|
12690
|
-
throw new error_1.CrtError(`Illegal value for eventstream int64-valued header: ${value}`);
|
|
12691
|
-
}
|
|
12692
|
-
static newByteBuffer(name, value) {
|
|
12693
|
-
Header.validateHeaderName(name);
|
|
12694
|
-
return new Header(name, HeaderType.ByteBuffer, value);
|
|
12695
|
-
}
|
|
12696
|
-
static newString(name, value) {
|
|
12697
|
-
Header.validateHeaderName(name);
|
|
12698
|
-
return new Header(name, HeaderType.String, value);
|
|
12699
|
-
}
|
|
12700
|
-
static newTimeStampFromSecondsSinceEpoch(name, secondsSinceEpoch) {
|
|
12701
|
-
Header.validateHeaderName(name);
|
|
12702
|
-
if (Number.isSafeInteger(secondsSinceEpoch) && secondsSinceEpoch >= 0) {
|
|
12703
|
-
return new Header(name, HeaderType.Timestamp, secondsSinceEpoch);
|
|
12704
|
-
}
|
|
12705
|
-
throw new error_1.CrtError(`Illegal value for eventstream timestamp-valued header: ${secondsSinceEpoch}`);
|
|
12706
|
-
}
|
|
12707
|
-
static newTimeStampFromDate(name, date) {
|
|
12708
|
-
Header.validateHeaderName(name);
|
|
12709
|
-
const secondsSinceEpoch = date.getTime();
|
|
12710
|
-
if (Number.isSafeInteger(secondsSinceEpoch)) {
|
|
12711
|
-
return new Header(name, HeaderType.Timestamp, secondsSinceEpoch);
|
|
12712
|
-
}
|
|
12713
|
-
throw new error_1.CrtError(`Illegal value for eventstream timestamp-valued header: ${date}`);
|
|
12714
|
-
}
|
|
12715
|
-
static newUUID(name, value) {
|
|
12716
|
-
Header.validateHeaderName(name);
|
|
12717
|
-
if (value.byteLength == 16) {
|
|
12718
|
-
return new Header(name, HeaderType.UUID, value);
|
|
12719
|
-
}
|
|
12720
|
-
throw new error_1.CrtError(`Illegal value for eventstream uuid-valued header: ${value}`);
|
|
12721
|
-
}
|
|
12722
|
-
toValue(type) {
|
|
12723
|
-
if (type != this.type) {
|
|
12724
|
-
throw new error_1.CrtError(`Header of type (${this.type}) cannot be converted to type (${type})`);
|
|
12725
|
-
}
|
|
12726
|
-
return this.value;
|
|
12727
|
-
}
|
|
12728
|
-
asBoolean() {
|
|
12729
|
-
switch (this.type) {
|
|
12730
|
-
case HeaderType.BooleanFalse:
|
|
12731
|
-
return false;
|
|
12732
|
-
case HeaderType.BooleanTrue:
|
|
12733
|
-
return true;
|
|
12734
|
-
default:
|
|
12735
|
-
throw new error_1.CrtError(`Header of type (${this.type}) cannot be converted to type (boolean)`);
|
|
12736
|
-
}
|
|
12737
|
-
}
|
|
12738
|
-
asByte() {
|
|
12739
|
-
return this.toValue(HeaderType.Byte);
|
|
12740
|
-
}
|
|
12741
|
-
asInt16() {
|
|
12742
|
-
return this.toValue(HeaderType.Int16);
|
|
12743
|
-
}
|
|
12744
|
-
asInt32() {
|
|
12745
|
-
return this.toValue(HeaderType.Int32);
|
|
12746
|
-
}
|
|
12747
|
-
asInt64() {
|
|
12748
|
-
return eventstream_utils.unmarshalInt64BigintFromBuffer(this.toValue(HeaderType.Int64));
|
|
12749
|
-
}
|
|
12750
|
-
asByteBuffer() {
|
|
12751
|
-
return this.toValue(HeaderType.ByteBuffer);
|
|
12752
|
-
}
|
|
12753
|
-
asString() {
|
|
12754
|
-
return this.toValue(HeaderType.String);
|
|
12755
|
-
}
|
|
12756
|
-
asTimestamp() {
|
|
12757
|
-
return this.toValue(HeaderType.Timestamp);
|
|
12758
|
-
}
|
|
12759
|
-
asUUID() {
|
|
12760
|
-
return this.toValue(HeaderType.UUID);
|
|
12761
|
-
}
|
|
12762
|
-
};
|
|
12763
|
-
__name(Header, "Header");
|
|
12764
|
-
exports.Header = Header;
|
|
12765
|
-
var MessageFlags;
|
|
12766
|
-
(function(MessageFlags2) {
|
|
12767
|
-
MessageFlags2[MessageFlags2["None"] = 0] = "None";
|
|
12768
|
-
MessageFlags2[MessageFlags2["ConnectionAccepted"] = 1] = "ConnectionAccepted";
|
|
12769
|
-
MessageFlags2[MessageFlags2["TerminateStream"] = 2] = "TerminateStream";
|
|
12770
|
-
})(MessageFlags = exports.MessageFlags || (exports.MessageFlags = {}));
|
|
12771
|
-
var MessageType;
|
|
12772
|
-
(function(MessageType2) {
|
|
12773
|
-
MessageType2[MessageType2["ApplicationMessage"] = 0] = "ApplicationMessage";
|
|
12774
|
-
MessageType2[MessageType2["ApplicationError"] = 1] = "ApplicationError";
|
|
12775
|
-
MessageType2[MessageType2["Ping"] = 2] = "Ping";
|
|
12776
|
-
MessageType2[MessageType2["PingResponse"] = 3] = "PingResponse";
|
|
12777
|
-
MessageType2[MessageType2["Connect"] = 4] = "Connect";
|
|
12778
|
-
MessageType2[MessageType2["ConnectAck"] = 5] = "ConnectAck";
|
|
12779
|
-
MessageType2[MessageType2["ProtocolError"] = 6] = "ProtocolError";
|
|
12780
|
-
MessageType2[MessageType2["InternalError"] = 7] = "InternalError";
|
|
12781
|
-
})(MessageType = exports.MessageType || (exports.MessageType = {}));
|
|
12782
|
-
function mapPodHeadersToJSHeaders(headers) {
|
|
12783
|
-
return Array.from(headers, (header) => {
|
|
12784
|
-
return new Header(header.name, header.type, header.value);
|
|
12785
|
-
});
|
|
12786
|
-
}
|
|
12787
|
-
__name(mapPodHeadersToJSHeaders, "mapPodHeadersToJSHeaders");
|
|
12788
|
-
function mapPodMessageToJSMessage(message) {
|
|
12789
|
-
let jsMessage = {
|
|
12790
|
-
type: message.type,
|
|
12791
|
-
flags: message.flags,
|
|
12792
|
-
payload: message.payload
|
|
12793
|
-
};
|
|
12794
|
-
if (message.headers) {
|
|
12795
|
-
jsMessage.headers = mapPodHeadersToJSHeaders(message.headers);
|
|
12796
|
-
}
|
|
12797
|
-
return jsMessage;
|
|
12798
|
-
}
|
|
12799
|
-
__name(mapPodMessageToJSMessage, "mapPodMessageToJSMessage");
|
|
12800
|
-
var ClientConnectionState;
|
|
12801
|
-
(function(ClientConnectionState2) {
|
|
12802
|
-
ClientConnectionState2[ClientConnectionState2["None"] = 0] = "None";
|
|
12803
|
-
ClientConnectionState2[ClientConnectionState2["Connecting"] = 1] = "Connecting";
|
|
12804
|
-
ClientConnectionState2[ClientConnectionState2["Connected"] = 2] = "Connected";
|
|
12805
|
-
ClientConnectionState2[ClientConnectionState2["Disconnected"] = 3] = "Disconnected";
|
|
12806
|
-
ClientConnectionState2[ClientConnectionState2["Closed"] = 4] = "Closed";
|
|
12807
|
-
})(ClientConnectionState || (ClientConnectionState = {}));
|
|
12808
|
-
var ClientConnection = class extends (0, native_resource_1.NativeResourceMixin)(event_1.BufferedEventEmitter) {
|
|
12809
|
-
constructor(config) {
|
|
12810
|
-
if (config === void 0) {
|
|
12811
|
-
throw new error_1.CrtError("Invalid configuration passed to eventstream ClientConnection constructor");
|
|
12812
|
-
}
|
|
12813
|
-
super();
|
|
12814
|
-
this.state = ClientConnectionState.None;
|
|
12815
|
-
this._super(binding_1.default.event_stream_client_connection_new(this, config, (connection, errorCode) => {
|
|
12816
|
-
ClientConnection._s_on_disconnect(connection, errorCode);
|
|
12817
|
-
}, (connection, message) => {
|
|
12818
|
-
ClientConnection._s_on_protocol_message(connection, message);
|
|
12819
|
-
}, config.socketOptions ? config.socketOptions.native_handle() : null, config.tlsCtx ? config.tlsCtx.native_handle() : null));
|
|
12820
|
-
}
|
|
12821
|
-
close() {
|
|
12822
|
-
if (this.state != ClientConnectionState.Closed) {
|
|
12823
|
-
this.state = ClientConnectionState.Closed;
|
|
12824
|
-
binding_1.default.event_stream_client_connection_close(this.native_handle());
|
|
12825
|
-
}
|
|
12826
|
-
}
|
|
12827
|
-
connect(options) {
|
|
12828
|
-
return __awaiter2(this, void 0, void 0, function* () {
|
|
12829
|
-
let cleanupCancelListener = void 0;
|
|
12830
|
-
let connectPromise = new Promise((resolve, reject) => {
|
|
12831
|
-
if (!options) {
|
|
12832
|
-
reject(new error_1.CrtError("Invalid options passed to event stream ClientConnection.connect"));
|
|
12833
|
-
return;
|
|
12834
|
-
}
|
|
12835
|
-
if (this.state != ClientConnectionState.None) {
|
|
12836
|
-
reject(new error_1.CrtError(`Event stream connection in a state (${this.state}) where connect() is not allowed.`));
|
|
12837
|
-
return;
|
|
12838
|
-
}
|
|
12839
|
-
this.state = ClientConnectionState.Connecting;
|
|
12840
|
-
if (options.cancelController) {
|
|
12841
|
-
let cancel = /* @__PURE__ */ __name(() => {
|
|
12842
|
-
reject(new error_1.CrtError(`Event stream connection connect() cancelled by external request.`));
|
|
12843
|
-
setImmediate(() => {
|
|
12844
|
-
this.close();
|
|
12845
|
-
});
|
|
12846
|
-
}, "cancel");
|
|
12847
|
-
cleanupCancelListener = options.cancelController.addListener(cancel);
|
|
12848
|
-
if (!cleanupCancelListener) {
|
|
12849
|
-
return;
|
|
12850
|
-
}
|
|
12851
|
-
}
|
|
12852
|
-
function curriedPromiseCallback(connection, errorCode) {
|
|
12853
|
-
return ClientConnection._s_on_connection_setup(resolve, reject, connection, errorCode);
|
|
12854
|
-
}
|
|
12855
|
-
__name(curriedPromiseCallback, "curriedPromiseCallback");
|
|
12856
|
-
try {
|
|
12857
|
-
binding_1.default.event_stream_client_connection_connect(this.native_handle(), curriedPromiseCallback);
|
|
12858
|
-
} catch (e) {
|
|
12859
|
-
this.state = ClientConnectionState.Disconnected;
|
|
12860
|
-
reject(e);
|
|
12861
|
-
}
|
|
12862
|
-
});
|
|
12863
|
-
return promise.makeSelfCleaningPromise(connectPromise, cleanupCancelListener);
|
|
12864
|
-
});
|
|
12865
|
-
}
|
|
12866
|
-
sendProtocolMessage(options) {
|
|
12867
|
-
return __awaiter2(this, void 0, void 0, function* () {
|
|
12868
|
-
let cleanupCancelListener = void 0;
|
|
12869
|
-
let sendProtocolMessagePromise = new Promise((resolve, reject) => {
|
|
12870
|
-
try {
|
|
12871
|
-
let curriedPromiseCallback = function(errorCode) {
|
|
12872
|
-
return ClientConnection._s_on_connection_send_protocol_message_completion(resolve, reject, errorCode);
|
|
12873
|
-
};
|
|
12874
|
-
__name(curriedPromiseCallback, "curriedPromiseCallback");
|
|
12875
|
-
if (!options) {
|
|
12876
|
-
reject(new error_1.CrtError("Invalid options passed to event stream ClientConnection.sendProtocolMessage"));
|
|
12877
|
-
return;
|
|
12878
|
-
}
|
|
12879
|
-
if (!this.isConnected()) {
|
|
12880
|
-
reject(new error_1.CrtError(`Event stream connection in a state (${this.state}) where sending protocol messages is not allowed.`));
|
|
12881
|
-
return;
|
|
12882
|
-
}
|
|
12883
|
-
if (options.cancelController) {
|
|
12884
|
-
let cancel = /* @__PURE__ */ __name(() => {
|
|
12885
|
-
reject(new error_1.CrtError(`Event stream connection sendProtocolMessage() cancelled by external request.`));
|
|
12886
|
-
setImmediate(() => {
|
|
12887
|
-
this.close();
|
|
12888
|
-
});
|
|
12889
|
-
}, "cancel");
|
|
12890
|
-
cleanupCancelListener = options.cancelController.addListener(cancel);
|
|
12891
|
-
if (!cleanupCancelListener) {
|
|
12892
|
-
return;
|
|
12893
|
-
}
|
|
12894
|
-
}
|
|
12895
|
-
binding_1.default.event_stream_client_connection_send_protocol_message(this.native_handle(), options, curriedPromiseCallback);
|
|
12896
|
-
} catch (e) {
|
|
12897
|
-
reject(e);
|
|
12898
|
-
}
|
|
12899
|
-
});
|
|
12900
|
-
return promise.makeSelfCleaningPromise(sendProtocolMessagePromise, cleanupCancelListener);
|
|
12901
|
-
});
|
|
12902
|
-
}
|
|
12903
|
-
isConnected() {
|
|
12904
|
-
return this.state == ClientConnectionState.Connected;
|
|
12905
|
-
}
|
|
12906
|
-
newStream() {
|
|
12907
|
-
if (!this.isConnected()) {
|
|
12908
|
-
throw new error_1.CrtError(`Event stream connection in a state (${this.state}) where creating new streams is forbidden.`);
|
|
12909
|
-
}
|
|
12910
|
-
return new ClientStream(this);
|
|
12911
|
-
}
|
|
12912
|
-
on(event, listener) {
|
|
12913
|
-
super.on(event, listener);
|
|
12914
|
-
return this;
|
|
12915
|
-
}
|
|
12916
|
-
static _s_on_connection_setup(resolve, reject, connection, errorCode) {
|
|
12917
|
-
if (errorCode == 0 && connection.state == ClientConnectionState.Connecting) {
|
|
12918
|
-
connection.state = ClientConnectionState.Connected;
|
|
12919
|
-
resolve();
|
|
12920
|
-
} else {
|
|
12921
|
-
if (connection.state != ClientConnectionState.Closed) {
|
|
12922
|
-
connection.state = ClientConnectionState.Disconnected;
|
|
12923
|
-
}
|
|
12924
|
-
reject(io.error_code_to_string(errorCode));
|
|
12925
|
-
}
|
|
12926
|
-
}
|
|
12927
|
-
static _s_on_disconnect(connection, errorCode) {
|
|
12928
|
-
if (connection.state != ClientConnectionState.Closed) {
|
|
12929
|
-
connection.state = ClientConnectionState.Disconnected;
|
|
12930
|
-
}
|
|
12931
|
-
process.nextTick(() => {
|
|
12932
|
-
connection.emit("disconnection", { errorCode });
|
|
12933
|
-
});
|
|
12934
|
-
}
|
|
12935
|
-
static _s_on_protocol_message(connection, message) {
|
|
12936
|
-
process.nextTick(() => {
|
|
12937
|
-
connection.emit("protocolMessage", { message: mapPodMessageToJSMessage(message) });
|
|
12938
|
-
});
|
|
12939
|
-
}
|
|
12940
|
-
static _s_on_connection_send_protocol_message_completion(resolve, reject, errorCode) {
|
|
12941
|
-
if (errorCode == 0) {
|
|
12942
|
-
resolve();
|
|
12943
|
-
} else {
|
|
12944
|
-
reject(io.error_code_to_string(errorCode));
|
|
12945
|
-
}
|
|
12946
|
-
}
|
|
12947
|
-
};
|
|
12948
|
-
__name(ClientConnection, "ClientConnection");
|
|
12949
|
-
exports.ClientConnection = ClientConnection;
|
|
12950
|
-
ClientConnection.DISCONNECTION = "disconnection";
|
|
12951
|
-
ClientConnection.PROTOCOL_MESSAGE = "protocolMessage";
|
|
12952
|
-
var ClientStreamState;
|
|
12953
|
-
(function(ClientStreamState2) {
|
|
12954
|
-
ClientStreamState2[ClientStreamState2["None"] = 0] = "None";
|
|
12955
|
-
ClientStreamState2[ClientStreamState2["Activating"] = 1] = "Activating";
|
|
12956
|
-
ClientStreamState2[ClientStreamState2["Activated"] = 2] = "Activated";
|
|
12957
|
-
ClientStreamState2[ClientStreamState2["Ended"] = 3] = "Ended";
|
|
12958
|
-
ClientStreamState2[ClientStreamState2["Closed"] = 4] = "Closed";
|
|
12959
|
-
})(ClientStreamState || (ClientStreamState = {}));
|
|
12960
|
-
var ClientStream = class extends (0, native_resource_1.NativeResourceMixin)(event_1.BufferedEventEmitter) {
|
|
12961
|
-
constructor(connection) {
|
|
12962
|
-
super();
|
|
12963
|
-
this._super(binding_1.default.event_stream_client_stream_new(this, connection.native_handle(), (stream) => {
|
|
12964
|
-
ClientStream._s_on_stream_ended(stream);
|
|
12965
|
-
}, (stream, message) => {
|
|
12966
|
-
ClientStream._s_on_stream_message(stream, message);
|
|
12967
|
-
}));
|
|
12968
|
-
this.state = ClientStreamState.None;
|
|
12969
|
-
}
|
|
12970
|
-
close() {
|
|
12971
|
-
if (this.state != ClientStreamState.Closed) {
|
|
12972
|
-
this.state = ClientStreamState.Closed;
|
|
12973
|
-
binding_1.default.event_stream_client_stream_close(this.native_handle());
|
|
12974
|
-
}
|
|
12975
|
-
}
|
|
12976
|
-
activate(options) {
|
|
12977
|
-
return __awaiter2(this, void 0, void 0, function* () {
|
|
12978
|
-
let cleanupCancelListener = void 0;
|
|
12979
|
-
let activatePromise = new Promise((resolve, reject) => {
|
|
12980
|
-
try {
|
|
12981
|
-
let curriedPromiseCallback = function(stream, errorCode) {
|
|
12982
|
-
return ClientStream._s_on_stream_activated(resolve, reject, stream, errorCode);
|
|
12983
|
-
};
|
|
12984
|
-
__name(curriedPromiseCallback, "curriedPromiseCallback");
|
|
12985
|
-
if (this.state != ClientStreamState.None) {
|
|
12986
|
-
reject(new error_1.CrtError(`Event stream in a state (${this.state}) where activation is not allowed.`));
|
|
12987
|
-
return;
|
|
12988
|
-
}
|
|
12989
|
-
if (options === void 0) {
|
|
12990
|
-
this.state = ClientStreamState.Ended;
|
|
12991
|
-
reject(new error_1.CrtError("Invalid options passed to ClientStream.activate"));
|
|
12992
|
-
return;
|
|
12993
|
-
}
|
|
12994
|
-
this.state = ClientStreamState.Activating;
|
|
12995
|
-
if (options.cancelController) {
|
|
12996
|
-
let cancel = /* @__PURE__ */ __name(() => {
|
|
12997
|
-
reject(new error_1.CrtError(`Event stream activate() cancelled by external request.`));
|
|
12998
|
-
setImmediate(() => {
|
|
12999
|
-
this.close();
|
|
13000
|
-
});
|
|
13001
|
-
}, "cancel");
|
|
13002
|
-
cleanupCancelListener = options.cancelController.addListener(cancel);
|
|
13003
|
-
if (!cleanupCancelListener) {
|
|
13004
|
-
return;
|
|
13005
|
-
}
|
|
13006
|
-
}
|
|
13007
|
-
binding_1.default.event_stream_client_stream_activate(this.native_handle(), options, curriedPromiseCallback);
|
|
13008
|
-
} catch (e) {
|
|
13009
|
-
this.state = ClientStreamState.Ended;
|
|
13010
|
-
reject(e);
|
|
13011
|
-
}
|
|
13012
|
-
});
|
|
13013
|
-
return promise.makeSelfCleaningPromise(activatePromise, cleanupCancelListener);
|
|
13014
|
-
});
|
|
13015
|
-
}
|
|
13016
|
-
sendMessage(options) {
|
|
13017
|
-
return __awaiter2(this, void 0, void 0, function* () {
|
|
13018
|
-
let cleanupCancelListener = void 0;
|
|
13019
|
-
let sendMessagePromise = new Promise((resolve, reject) => {
|
|
13020
|
-
try {
|
|
13021
|
-
let curriedPromiseCallback = function(errorCode) {
|
|
13022
|
-
return ClientStream._s_on_stream_send_message_completion(resolve, reject, errorCode);
|
|
13023
|
-
};
|
|
13024
|
-
__name(curriedPromiseCallback, "curriedPromiseCallback");
|
|
13025
|
-
if (!options) {
|
|
13026
|
-
reject(new error_1.CrtError("Invalid options passed to ClientStream.sendMessage"));
|
|
13027
|
-
return;
|
|
13028
|
-
}
|
|
13029
|
-
if (this.state != ClientStreamState.Activated) {
|
|
13030
|
-
reject(new error_1.CrtError(`Event stream in a state (${this.state}) where sending messages is not allowed.`));
|
|
13031
|
-
return;
|
|
13032
|
-
}
|
|
13033
|
-
if (options.cancelController) {
|
|
13034
|
-
let cancel = /* @__PURE__ */ __name(() => {
|
|
13035
|
-
reject(new error_1.CrtError(`Event stream sendMessage() cancelled by external request.`));
|
|
13036
|
-
setImmediate(() => {
|
|
13037
|
-
this.close();
|
|
13038
|
-
});
|
|
13039
|
-
}, "cancel");
|
|
13040
|
-
cleanupCancelListener = options.cancelController.addListener(cancel);
|
|
13041
|
-
if (!cleanupCancelListener) {
|
|
13042
|
-
return;
|
|
13043
|
-
}
|
|
13044
|
-
}
|
|
13045
|
-
binding_1.default.event_stream_client_stream_send_message(this.native_handle(), options, curriedPromiseCallback);
|
|
13046
|
-
} catch (e) {
|
|
13047
|
-
reject(e);
|
|
13048
|
-
}
|
|
13049
|
-
});
|
|
13050
|
-
return promise.makeSelfCleaningPromise(sendMessagePromise, cleanupCancelListener);
|
|
13051
|
-
});
|
|
13052
|
-
}
|
|
13053
|
-
isActive() {
|
|
13054
|
-
return this.state == ClientStreamState.Activated;
|
|
13055
|
-
}
|
|
13056
|
-
on(event, listener) {
|
|
13057
|
-
super.on(event, listener);
|
|
13058
|
-
return this;
|
|
13059
|
-
}
|
|
13060
|
-
static _s_on_stream_activated(resolve, reject, stream, errorCode) {
|
|
13061
|
-
if (errorCode == 0 && stream.state == ClientStreamState.Activating) {
|
|
13062
|
-
stream.state = ClientStreamState.Activated;
|
|
13063
|
-
resolve();
|
|
13064
|
-
} else {
|
|
13065
|
-
if (stream.state != ClientStreamState.Closed) {
|
|
13066
|
-
stream.state = ClientStreamState.Ended;
|
|
13067
|
-
}
|
|
13068
|
-
reject(io.error_code_to_string(errorCode));
|
|
13069
|
-
}
|
|
13070
|
-
}
|
|
13071
|
-
static _s_on_stream_send_message_completion(resolve, reject, errorCode) {
|
|
13072
|
-
if (errorCode == 0) {
|
|
13073
|
-
resolve();
|
|
13074
|
-
} else {
|
|
13075
|
-
reject(io.error_code_to_string(errorCode));
|
|
13076
|
-
}
|
|
13077
|
-
}
|
|
13078
|
-
static _s_on_stream_ended(stream) {
|
|
13079
|
-
process.nextTick(() => {
|
|
13080
|
-
stream.emit(ClientStream.ENDED, {});
|
|
13081
|
-
});
|
|
13082
|
-
}
|
|
13083
|
-
static _s_on_stream_message(stream, message) {
|
|
13084
|
-
process.nextTick(() => {
|
|
13085
|
-
stream.emit(ClientStream.MESSAGE, { message: mapPodMessageToJSMessage(message) });
|
|
13086
|
-
});
|
|
13087
|
-
}
|
|
13088
|
-
};
|
|
13089
|
-
__name(ClientStream, "ClientStream");
|
|
13090
|
-
exports.ClientStream = ClientStream;
|
|
13091
|
-
ClientStream.ENDED = "ended";
|
|
13092
|
-
ClientStream.MESSAGE = "message";
|
|
13093
|
-
}
|
|
13094
|
-
});
|
|
13095
|
-
|
|
13096
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/common/http.js
|
|
13097
|
-
var require_http = __commonJS({
|
|
13098
|
-
"../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/common/http.js"(exports) {
|
|
13099
|
-
"use strict";
|
|
13100
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13101
|
-
exports.CommonHttpProxyOptions = exports.HttpProxyAuthenticationType = exports.HttpVersion = void 0;
|
|
13102
|
-
var HttpVersion;
|
|
13103
|
-
(function(HttpVersion2) {
|
|
13104
|
-
HttpVersion2[HttpVersion2["Unknown"] = 0] = "Unknown";
|
|
13105
|
-
HttpVersion2[HttpVersion2["Http1_0"] = 1] = "Http1_0";
|
|
13106
|
-
HttpVersion2[HttpVersion2["Http1_1"] = 2] = "Http1_1";
|
|
13107
|
-
HttpVersion2[HttpVersion2["Http2"] = 3] = "Http2";
|
|
13108
|
-
})(HttpVersion = exports.HttpVersion || (exports.HttpVersion = {}));
|
|
13109
|
-
var HttpProxyAuthenticationType;
|
|
13110
|
-
(function(HttpProxyAuthenticationType2) {
|
|
13111
|
-
HttpProxyAuthenticationType2[HttpProxyAuthenticationType2["None"] = 0] = "None";
|
|
13112
|
-
HttpProxyAuthenticationType2[HttpProxyAuthenticationType2["Basic"] = 1] = "Basic";
|
|
13113
|
-
})(HttpProxyAuthenticationType = exports.HttpProxyAuthenticationType || (exports.HttpProxyAuthenticationType = {}));
|
|
13114
|
-
var CommonHttpProxyOptions = class {
|
|
13115
|
-
constructor(host_name, port, auth_method = HttpProxyAuthenticationType.None, auth_username, auth_password) {
|
|
13116
|
-
this.host_name = host_name;
|
|
13117
|
-
this.port = port;
|
|
13118
|
-
this.auth_method = auth_method;
|
|
13119
|
-
this.auth_username = auth_username;
|
|
13120
|
-
this.auth_password = auth_password;
|
|
13121
|
-
}
|
|
13122
|
-
};
|
|
13123
|
-
__name(CommonHttpProxyOptions, "CommonHttpProxyOptions");
|
|
13124
|
-
exports.CommonHttpProxyOptions = CommonHttpProxyOptions;
|
|
13125
|
-
}
|
|
13126
|
-
});
|
|
13127
|
-
|
|
13128
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/native/http.js
|
|
12344
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/http.js
|
|
13129
12345
|
var require_http2 = __commonJS({
|
|
13130
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
12346
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/http.js"(exports) {
|
|
13131
12347
|
"use strict";
|
|
13132
12348
|
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
13133
12349
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -13195,9 +12411,6 @@ var require_http2 = __commonJS({
|
|
|
13195
12411
|
exports.HttpProxyOptions = HttpProxyOptions;
|
|
13196
12412
|
var HttpClientConnection = class extends HttpConnection {
|
|
13197
12413
|
constructor(bootstrap, host_name, port, socket_options, tls_opts, proxy_options, handle) {
|
|
13198
|
-
if (socket_options == null || socket_options == void 0) {
|
|
13199
|
-
throw new error_1.CrtError("HttpClientConnection constructor: socket_options not defined");
|
|
13200
|
-
}
|
|
13201
12414
|
super(handle ? handle : binding_1.default.http_connection_new(bootstrap != null ? bootstrap.native_handle() : null, (handle2, error_code) => {
|
|
13202
12415
|
this._on_setup(handle2, error_code);
|
|
13203
12416
|
}, (handle2, error_code) => {
|
|
@@ -13300,9 +12513,6 @@ var require_http2 = __commonJS({
|
|
|
13300
12513
|
HttpClientStream.HEADERS = "headers";
|
|
13301
12514
|
var HttpClientConnectionManager = class extends native_resource_1.NativeResource {
|
|
13302
12515
|
constructor(bootstrap, host, port, max_connections, initial_window_size, socket_options, tls_opts, proxy_options) {
|
|
13303
|
-
if (socket_options == null || socket_options == void 0) {
|
|
13304
|
-
throw new error_1.CrtError("HttpClientConnectionManager constructor: socket_options not defined");
|
|
13305
|
-
}
|
|
13306
12516
|
super(binding_1.default.http_connection_manager_new(bootstrap != null ? bootstrap.native_handle() : null, host, port, max_connections, initial_window_size, socket_options.native_handle(), tls_opts ? tls_opts.native_handle() : void 0, proxy_options ? proxy_options.create_native_handle() : void 0, void 0));
|
|
13307
12517
|
this.bootstrap = bootstrap;
|
|
13308
12518
|
this.host = host;
|
|
@@ -13335,9 +12545,6 @@ var require_http2 = __commonJS({
|
|
|
13335
12545
|
});
|
|
13336
12546
|
}
|
|
13337
12547
|
release(connection) {
|
|
13338
|
-
if (connection == null || connection == void 0) {
|
|
13339
|
-
throw new error_1.CrtError("HttpClientConnectionManager release: connection not defined");
|
|
13340
|
-
}
|
|
13341
12548
|
binding_1.default.http_connection_manager_release(this.native_handle(), connection.native_handle());
|
|
13342
12549
|
}
|
|
13343
12550
|
close() {
|
|
@@ -13349,9 +12556,9 @@ var require_http2 = __commonJS({
|
|
|
13349
12556
|
}
|
|
13350
12557
|
});
|
|
13351
12558
|
|
|
13352
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
12559
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/mqtt.js
|
|
13353
12560
|
var require_mqtt = __commonJS({
|
|
13354
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
12561
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/mqtt.js"(exports) {
|
|
13355
12562
|
"use strict";
|
|
13356
12563
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13357
12564
|
exports.DEFAULT_RECONNECT_MIN_SEC = exports.DEFAULT_RECONNECT_MAX_SEC = exports.MqttWill = exports.QoS = void 0;
|
|
@@ -13376,9 +12583,9 @@ var require_mqtt = __commonJS({
|
|
|
13376
12583
|
}
|
|
13377
12584
|
});
|
|
13378
12585
|
|
|
13379
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
12586
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/aws_iot_shared.js
|
|
13380
12587
|
var require_aws_iot_shared = __commonJS({
|
|
13381
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
12588
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/aws_iot_shared.js"(exports) {
|
|
13382
12589
|
"use strict";
|
|
13383
12590
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
13384
12591
|
if (k2 === void 0)
|
|
@@ -13512,9 +12719,9 @@ var require_aws_iot_shared = __commonJS({
|
|
|
13512
12719
|
}
|
|
13513
12720
|
});
|
|
13514
12721
|
|
|
13515
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
12722
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/aws_iot.js
|
|
13516
12723
|
var require_aws_iot = __commonJS({
|
|
13517
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
12724
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/aws_iot.js"(exports) {
|
|
13518
12725
|
"use strict";
|
|
13519
12726
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
13520
12727
|
if (k2 === void 0)
|
|
@@ -13650,9 +12857,6 @@ var require_aws_iot = __commonJS({
|
|
|
13650
12857
|
}
|
|
13651
12858
|
static configure_websocket_handshake(builder, options) {
|
|
13652
12859
|
if (options) {
|
|
13653
|
-
if (builder == null || builder == void 0) {
|
|
13654
|
-
throw new error_1.CrtError("AwsIotMqttConnectionConfigBuilder configure_websocket_handshake: builder not defined");
|
|
13655
|
-
}
|
|
13656
12860
|
builder.params.websocket_handshake_transform = (request, done) => __awaiter2(this, void 0, void 0, function* () {
|
|
13657
12861
|
var _a, _b, _c;
|
|
13658
12862
|
const signing_config = (_b = (_a = options.create_signing_config) === null || _a === void 0 ? void 0 : _a.call(options)) !== null && _b !== void 0 ? _b : {
|
|
@@ -13693,9 +12897,6 @@ var require_aws_iot = __commonJS({
|
|
|
13693
12897
|
this.configure_websocket_handshake(builder, options);
|
|
13694
12898
|
return builder;
|
|
13695
12899
|
}
|
|
13696
|
-
static new_builder_for_websocket() {
|
|
13697
|
-
return this.new_with_websockets();
|
|
13698
|
-
}
|
|
13699
12900
|
with_certificate_authority_from_path(ca_dirpath, ca_filepath) {
|
|
13700
12901
|
this.tls_ctx_options.override_default_trust_store_from_path(ca_dirpath, ca_filepath);
|
|
13701
12902
|
return this;
|
|
@@ -13820,9 +13021,9 @@ var require_aws_iot = __commonJS({
|
|
|
13820
13021
|
}
|
|
13821
13022
|
});
|
|
13822
13023
|
|
|
13823
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
13024
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/mqtt_shared.js
|
|
13824
13025
|
var require_mqtt_shared = __commonJS({
|
|
13825
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
13026
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/mqtt_shared.js"(exports) {
|
|
13826
13027
|
"use strict";
|
|
13827
13028
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13828
13029
|
exports.DEFAULT_KEEP_ALIVE = exports.normalize_payload = void 0;
|
|
@@ -13854,9 +13055,9 @@ var require_mqtt_shared = __commonJS({
|
|
|
13854
13055
|
}
|
|
13855
13056
|
});
|
|
13856
13057
|
|
|
13857
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
13058
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/mqtt5.js
|
|
13858
13059
|
var require_mqtt5 = __commonJS({
|
|
13859
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
13060
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/mqtt5.js"(exports) {
|
|
13860
13061
|
"use strict";
|
|
13861
13062
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13862
13063
|
exports.RetryJitterType = exports.ClientSessionBehavior = void 0;
|
|
@@ -13877,9 +13078,9 @@ var require_mqtt5 = __commonJS({
|
|
|
13877
13078
|
}
|
|
13878
13079
|
});
|
|
13879
13080
|
|
|
13880
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
13081
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/mqtt5_packet.js
|
|
13881
13082
|
var require_mqtt5_packet = __commonJS({
|
|
13882
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
13083
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/mqtt5_packet.js"(exports) {
|
|
13883
13084
|
"use strict";
|
|
13884
13085
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13885
13086
|
exports.PacketType = exports.RetainHandlingType = exports.QoS = exports.PayloadFormatIndicator = exports.isSuccessfulPubackReasonCode = exports.PubackReasonCode = exports.isSuccessfulUnsubackReasonCode = exports.UnsubackReasonCode = exports.isSuccessfulSubackReasonCode = exports.SubackReasonCode = exports.isSuccessfulDisconnectReasonCode = exports.DisconnectReasonCode = exports.isSuccessfulConnectReasonCode = exports.ConnectReasonCode = void 0;
|
|
@@ -14040,9 +13241,9 @@ var require_mqtt5_packet = __commonJS({
|
|
|
14040
13241
|
}
|
|
14041
13242
|
});
|
|
14042
13243
|
|
|
14043
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
13244
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/mqtt5.js
|
|
14044
13245
|
var require_mqtt52 = __commonJS({
|
|
14045
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
13246
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/mqtt5.js"(exports) {
|
|
14046
13247
|
"use strict";
|
|
14047
13248
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
14048
13249
|
if (k2 === void 0)
|
|
@@ -14307,9 +13508,9 @@ var require_mqtt52 = __commonJS({
|
|
|
14307
13508
|
}
|
|
14308
13509
|
});
|
|
14309
13510
|
|
|
14310
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
13511
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/aws_iot_mqtt5.js
|
|
14311
13512
|
var require_aws_iot_mqtt5 = __commonJS({
|
|
14312
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
13513
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/aws_iot_mqtt5.js"(exports) {
|
|
14313
13514
|
"use strict";
|
|
14314
13515
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
14315
13516
|
if (k2 === void 0)
|
|
@@ -14553,9 +13754,9 @@ var require_aws_iot_mqtt5 = __commonJS({
|
|
|
14553
13754
|
}
|
|
14554
13755
|
});
|
|
14555
13756
|
|
|
14556
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
13757
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/iot.js
|
|
14557
13758
|
var require_iot = __commonJS({
|
|
14558
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
13759
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/iot.js"(exports) {
|
|
14559
13760
|
"use strict";
|
|
14560
13761
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
14561
13762
|
if (k2 === void 0)
|
|
@@ -14583,9 +13784,9 @@ var require_iot = __commonJS({
|
|
|
14583
13784
|
}
|
|
14584
13785
|
});
|
|
14585
13786
|
|
|
14586
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
13787
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/mqtt.js
|
|
14587
13788
|
var require_mqtt2 = __commonJS({
|
|
14588
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
13789
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/mqtt.js"(exports) {
|
|
14589
13790
|
"use strict";
|
|
14590
13791
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
14591
13792
|
if (k2 === void 0)
|
|
@@ -14689,9 +13890,6 @@ var require_mqtt2 = __commonJS({
|
|
|
14689
13890
|
super();
|
|
14690
13891
|
this.client = client;
|
|
14691
13892
|
this.config = config;
|
|
14692
|
-
if (config == null || config == void 0) {
|
|
14693
|
-
throw new error_1.CrtError("MqttClientConnection constructor: config not defined");
|
|
14694
|
-
}
|
|
14695
13893
|
const will = config.will ? {
|
|
14696
13894
|
topic: config.will.topic,
|
|
14697
13895
|
qos: config.will.qos,
|
|
@@ -14708,12 +13906,6 @@ var require_mqtt2 = __commonJS({
|
|
|
14708
13906
|
max_sec = config.reconnect_max_sec;
|
|
14709
13907
|
min_sec = Math.min(min_sec, max_sec);
|
|
14710
13908
|
}
|
|
14711
|
-
if (client == void 0 || client == null) {
|
|
14712
|
-
throw new error_1.CrtError("MqttClientConnection constructor: client not defined");
|
|
14713
|
-
}
|
|
14714
|
-
if (config.socket_options == void 0 || config.socket_options == null) {
|
|
14715
|
-
throw new error_1.CrtError("MqttClientConnection constructor: socket_options in configuration not defined");
|
|
14716
|
-
}
|
|
14717
13909
|
this._super(binding_1.default.mqtt_client_connection_new(client.native_handle(), (error_code) => {
|
|
14718
13910
|
this._on_connection_interrupted(error_code);
|
|
14719
13911
|
}, (return_code, session_present) => {
|
|
@@ -14740,9 +13932,6 @@ var require_mqtt2 = __commonJS({
|
|
|
14740
13932
|
return __awaiter2(this, void 0, void 0, function* () {
|
|
14741
13933
|
return new Promise((resolve, reject) => {
|
|
14742
13934
|
reject = this._reject(reject);
|
|
14743
|
-
if (this.config.socket_options == null || this.config.socket_options == void 0) {
|
|
14744
|
-
throw new error_1.CrtError("MqttClientConnection connect: socket_options in configuration not defined");
|
|
14745
|
-
}
|
|
14746
13935
|
try {
|
|
14747
13936
|
binding_1.default.mqtt_client_connection_connect(this.native_handle(), this.config.client_id, this.config.host_name, this.config.port, this.config.socket_options.native_handle(), this.config.keep_alive, this.config.ping_timeout, this.config.protocol_operation_timeout, this.config.clean_session, this._on_connect_callback.bind(this, resolve, reject));
|
|
14748
13937
|
} catch (e) {
|
|
@@ -14879,9 +14068,9 @@ var require_mqtt2 = __commonJS({
|
|
|
14879
14068
|
}
|
|
14880
14069
|
});
|
|
14881
14070
|
|
|
14882
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
14071
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/index.js
|
|
14883
14072
|
var require_dist = __commonJS({
|
|
14884
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
14073
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/index.js"(exports) {
|
|
14885
14074
|
"use strict";
|
|
14886
14075
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
14887
14076
|
if (k2 === void 0)
|
|
@@ -14916,13 +14105,9 @@ var require_dist = __commonJS({
|
|
|
14916
14105
|
return result;
|
|
14917
14106
|
};
|
|
14918
14107
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14919
|
-
exports.CrtError = exports.resource_safety = exports.
|
|
14920
|
-
var cancel = __importStar2(require_cancel());
|
|
14921
|
-
exports.cancel = cancel;
|
|
14108
|
+
exports.CrtError = exports.resource_safety = exports.platform = exports.mqtt5 = exports.mqtt = exports.iot = exports.io = exports.http = exports.crt = exports.crypto = exports.checksums = exports.auth = void 0;
|
|
14922
14109
|
var platform = __importStar2(require_platform());
|
|
14923
14110
|
exports.platform = platform;
|
|
14924
|
-
var promise = __importStar2(require_promise());
|
|
14925
|
-
exports.promise = promise;
|
|
14926
14111
|
var resource_safety = __importStar2(require_resource_safety());
|
|
14927
14112
|
exports.resource_safety = resource_safety;
|
|
14928
14113
|
var auth = __importStar2(require_auth());
|
|
@@ -14933,8 +14118,6 @@ var require_dist = __commonJS({
|
|
|
14933
14118
|
exports.crt = crt;
|
|
14934
14119
|
var crypto4 = __importStar2(require_crypto());
|
|
14935
14120
|
exports.crypto = crypto4;
|
|
14936
|
-
var eventstream = __importStar2(require_eventstream());
|
|
14937
|
-
exports.eventstream = eventstream;
|
|
14938
14121
|
var http = __importStar2(require_http2());
|
|
14939
14122
|
exports.http = http;
|
|
14940
14123
|
var io = __importStar2(require_io2());
|