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
|
@@ -23532,160 +23532,12 @@ var require_dist_cjs36 = __commonJS({
|
|
|
23532
23532
|
}
|
|
23533
23533
|
});
|
|
23534
23534
|
|
|
23535
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
23536
|
-
var require_promise = __commonJS({
|
|
23537
|
-
"../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/common/promise.js"(exports) {
|
|
23538
|
-
"use strict";
|
|
23539
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23540
|
-
exports.newLiftedPromise = exports.makeSelfCleaningPromise = void 0;
|
|
23541
|
-
function makeSelfCleaningPromise(promise, cleaner) {
|
|
23542
|
-
if (!cleaner) {
|
|
23543
|
-
return promise;
|
|
23544
|
-
}
|
|
23545
|
-
return promise.finally(() => {
|
|
23546
|
-
cleaner();
|
|
23547
|
-
});
|
|
23548
|
-
}
|
|
23549
|
-
__name(makeSelfCleaningPromise, "makeSelfCleaningPromise");
|
|
23550
|
-
exports.makeSelfCleaningPromise = makeSelfCleaningPromise;
|
|
23551
|
-
function newLiftedPromise(promiseBody) {
|
|
23552
|
-
let localResolve = void 0;
|
|
23553
|
-
let localReject = void 0;
|
|
23554
|
-
let promise = new Promise((resolve, reject) => {
|
|
23555
|
-
localResolve = resolve;
|
|
23556
|
-
localReject = reject;
|
|
23557
|
-
});
|
|
23558
|
-
if (!localResolve || !localReject) {
|
|
23559
|
-
throw new Error("Failed to bind resolve and reject when making lifted promise");
|
|
23560
|
-
}
|
|
23561
|
-
if (promiseBody) {
|
|
23562
|
-
promiseBody(localResolve, localReject);
|
|
23563
|
-
}
|
|
23564
|
-
return {
|
|
23565
|
-
promise,
|
|
23566
|
-
resolve: localResolve,
|
|
23567
|
-
reject: localReject
|
|
23568
|
-
};
|
|
23569
|
-
}
|
|
23570
|
-
__name(newLiftedPromise, "newLiftedPromise");
|
|
23571
|
-
exports.newLiftedPromise = newLiftedPromise;
|
|
23572
|
-
}
|
|
23573
|
-
});
|
|
23574
|
-
|
|
23575
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/common/cancel.js
|
|
23576
|
-
var require_cancel = __commonJS({
|
|
23577
|
-
"../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/common/cancel.js"(exports) {
|
|
23578
|
-
"use strict";
|
|
23579
|
-
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
23580
|
-
if (k2 === void 0)
|
|
23581
|
-
k2 = k;
|
|
23582
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23583
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
23584
|
-
desc = { enumerable: true, get: function() {
|
|
23585
|
-
return m[k];
|
|
23586
|
-
} };
|
|
23587
|
-
}
|
|
23588
|
-
Object.defineProperty(o, k2, desc);
|
|
23589
|
-
} : function(o, m, k, k2) {
|
|
23590
|
-
if (k2 === void 0)
|
|
23591
|
-
k2 = k;
|
|
23592
|
-
o[k2] = m[k];
|
|
23593
|
-
});
|
|
23594
|
-
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
23595
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
23596
|
-
} : function(o, v) {
|
|
23597
|
-
o["default"] = v;
|
|
23598
|
-
});
|
|
23599
|
-
var __importStar2 = exports && exports.__importStar || function(mod) {
|
|
23600
|
-
if (mod && mod.__esModule)
|
|
23601
|
-
return mod;
|
|
23602
|
-
var result = {};
|
|
23603
|
-
if (mod != null) {
|
|
23604
|
-
for (var k in mod)
|
|
23605
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
23606
|
-
__createBinding2(result, mod, k);
|
|
23607
|
-
}
|
|
23608
|
-
__setModuleDefault2(result, mod);
|
|
23609
|
-
return result;
|
|
23610
|
-
};
|
|
23611
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23612
|
-
exports.newCancellablePromiseFromNextEvent = exports.CancelController = exports.EVENT_NAME = void 0;
|
|
23613
|
-
var events_1 = __require("events");
|
|
23614
|
-
var promise = __importStar2(require_promise());
|
|
23615
|
-
exports.EVENT_NAME = "cancelled";
|
|
23616
|
-
var CancelController = class {
|
|
23617
|
-
constructor(options) {
|
|
23618
|
-
this.cancelled = false;
|
|
23619
|
-
if (options && options.emitterFactory) {
|
|
23620
|
-
this.emitter = options.emitterFactory();
|
|
23621
|
-
} else {
|
|
23622
|
-
this.emitter = new events_1.EventEmitter();
|
|
23623
|
-
}
|
|
23624
|
-
}
|
|
23625
|
-
cancel() {
|
|
23626
|
-
if (!this.cancelled) {
|
|
23627
|
-
this.cancelled = true;
|
|
23628
|
-
this.emitter.emit(exports.EVENT_NAME);
|
|
23629
|
-
this.emitter.removeAllListeners(exports.EVENT_NAME);
|
|
23630
|
-
}
|
|
23631
|
-
}
|
|
23632
|
-
hasBeenCancelled() {
|
|
23633
|
-
return this.cancelled;
|
|
23634
|
-
}
|
|
23635
|
-
addListener(listener) {
|
|
23636
|
-
if (this.cancelled) {
|
|
23637
|
-
listener();
|
|
23638
|
-
return void 0;
|
|
23639
|
-
}
|
|
23640
|
-
this.emitter.on(exports.EVENT_NAME, listener);
|
|
23641
|
-
return () => {
|
|
23642
|
-
this.emitter.removeListener(exports.EVENT_NAME, listener);
|
|
23643
|
-
};
|
|
23644
|
-
}
|
|
23645
|
-
};
|
|
23646
|
-
__name(CancelController, "CancelController");
|
|
23647
|
-
exports.CancelController = CancelController;
|
|
23648
|
-
function newCancellablePromiseFromNextEvent(config) {
|
|
23649
|
-
let onEvent = void 0;
|
|
23650
|
-
let cancelRemoveListener = void 0;
|
|
23651
|
-
let liftedPromise = promise.newLiftedPromise();
|
|
23652
|
-
onEvent = /* @__PURE__ */ __name((eventData) => {
|
|
23653
|
-
try {
|
|
23654
|
-
if (config.eventDataTransformer) {
|
|
23655
|
-
liftedPromise.resolve(config.eventDataTransformer(eventData));
|
|
23656
|
-
} else {
|
|
23657
|
-
liftedPromise.resolve(eventData);
|
|
23658
|
-
}
|
|
23659
|
-
} catch (err) {
|
|
23660
|
-
liftedPromise.reject(err);
|
|
23661
|
-
}
|
|
23662
|
-
}, "onEvent");
|
|
23663
|
-
config.emitter.addListener(config.eventName, onEvent);
|
|
23664
|
-
if (config.cancelController) {
|
|
23665
|
-
cancelRemoveListener = config.cancelController.addListener(() => {
|
|
23666
|
-
liftedPromise.reject(config.cancelMessage);
|
|
23667
|
-
});
|
|
23668
|
-
}
|
|
23669
|
-
return promise.makeSelfCleaningPromise(liftedPromise.promise, () => {
|
|
23670
|
-
if (onEvent) {
|
|
23671
|
-
config.emitter.removeListener(config.eventName, onEvent);
|
|
23672
|
-
}
|
|
23673
|
-
if (cancelRemoveListener) {
|
|
23674
|
-
cancelRemoveListener();
|
|
23675
|
-
}
|
|
23676
|
-
});
|
|
23677
|
-
}
|
|
23678
|
-
__name(newCancellablePromiseFromNextEvent, "newCancellablePromiseFromNextEvent");
|
|
23679
|
-
exports.newCancellablePromiseFromNextEvent = newCancellablePromiseFromNextEvent;
|
|
23680
|
-
}
|
|
23681
|
-
});
|
|
23682
|
-
|
|
23683
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/package.json
|
|
23535
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/package.json
|
|
23684
23536
|
var require_package4 = __commonJS({
|
|
23685
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
23537
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/package.json"(exports, module) {
|
|
23686
23538
|
module.exports = {
|
|
23687
23539
|
name: "aws-crt",
|
|
23688
|
-
version: "1.15.
|
|
23540
|
+
version: "1.15.9",
|
|
23689
23541
|
description: "NodeJS/browser bindings to the aws-c-* libraries",
|
|
23690
23542
|
homepage: "https://github.com/awslabs/aws-crt-nodejs",
|
|
23691
23543
|
repository: {
|
|
@@ -23715,42 +23567,40 @@ var require_package4 = __commonJS({
|
|
|
23715
23567
|
"@types/jest": "^27.0.1",
|
|
23716
23568
|
"@types/node": "^10.17.54",
|
|
23717
23569
|
"@types/prettier": "2.6.0",
|
|
23718
|
-
"@types/puppeteer": "^5.4.
|
|
23570
|
+
"@types/puppeteer": "^5.4.4",
|
|
23719
23571
|
"@types/uuid": "^3.4.8",
|
|
23720
23572
|
"@types/ws": "^7.4.7",
|
|
23721
23573
|
"aws-sdk": "^2.848.0",
|
|
23722
|
-
"cmake-js": "^6.3.2",
|
|
23723
23574
|
"https-proxy-agent": "^5.0.1",
|
|
23724
23575
|
jest: "^27.2.1",
|
|
23725
23576
|
"jest-puppeteer": "^5.0.4",
|
|
23726
23577
|
"jest-runtime": "^27.2.1",
|
|
23727
23578
|
puppeteer: "^3.3.0",
|
|
23728
|
-
tar: "^6.1.11",
|
|
23729
23579
|
"ts-jest": "^27.0.5",
|
|
23730
23580
|
typedoc: "^0.22.18",
|
|
23731
23581
|
"typedoc-plugin-merge-modules": "^3.1.0",
|
|
23732
23582
|
typescript: "^4.7.4",
|
|
23733
23583
|
uuid: "^8.3.2",
|
|
23734
|
-
yargs: "^17.2.1"
|
|
23584
|
+
yargs: "^17.2.1",
|
|
23585
|
+
"cmake-js": "^6.3.2",
|
|
23586
|
+
tar: "^6.1.11"
|
|
23735
23587
|
},
|
|
23736
23588
|
dependencies: {
|
|
23737
23589
|
"@aws-sdk/util-utf8-browser": "^3.109.0",
|
|
23738
23590
|
"@httptoolkit/websocket-stream": "^6.0.0",
|
|
23739
23591
|
axios: "^0.24.0",
|
|
23740
|
-
buffer: "^6.0.3",
|
|
23741
|
-
"cmake-js": "^6.3.2",
|
|
23742
23592
|
"crypto-js": "^4.0.0",
|
|
23743
23593
|
mqtt: "^4.3.7",
|
|
23744
|
-
|
|
23594
|
+
"cmake-js": "^6.3.2",
|
|
23745
23595
|
tar: "^6.1.11"
|
|
23746
23596
|
}
|
|
23747
23597
|
};
|
|
23748
23598
|
}
|
|
23749
23599
|
});
|
|
23750
23600
|
|
|
23751
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
23601
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/platform.js
|
|
23752
23602
|
var require_platform = __commonJS({
|
|
23753
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
23603
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/platform.js"(exports) {
|
|
23754
23604
|
"use strict";
|
|
23755
23605
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23756
23606
|
exports.crt_version = exports.package_info = exports.is_browser = exports.is_nodejs = void 0;
|
|
@@ -23786,9 +23636,9 @@ var require_platform = __commonJS({
|
|
|
23786
23636
|
}
|
|
23787
23637
|
});
|
|
23788
23638
|
|
|
23789
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
23639
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/resource_safety.js
|
|
23790
23640
|
var require_resource_safety = __commonJS({
|
|
23791
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
23641
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/resource_safety.js"(exports) {
|
|
23792
23642
|
"use strict";
|
|
23793
23643
|
var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
23794
23644
|
function adopt(value) {
|
|
@@ -23837,9 +23687,9 @@ var require_resource_safety = __commonJS({
|
|
|
23837
23687
|
}
|
|
23838
23688
|
});
|
|
23839
23689
|
|
|
23840
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
23690
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/binding.js
|
|
23841
23691
|
var require_binding = __commonJS({
|
|
23842
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
23692
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/binding.js"(exports) {
|
|
23843
23693
|
"use strict";
|
|
23844
23694
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
23845
23695
|
if (k2 === void 0)
|
|
@@ -23912,9 +23762,9 @@ var require_binding = __commonJS({
|
|
|
23912
23762
|
}
|
|
23913
23763
|
});
|
|
23914
23764
|
|
|
23915
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
23765
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/error.js
|
|
23916
23766
|
var require_error = __commonJS({
|
|
23917
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
23767
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/error.js"(exports) {
|
|
23918
23768
|
"use strict";
|
|
23919
23769
|
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
23920
23770
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -23962,9 +23812,9 @@ var require_error = __commonJS({
|
|
|
23962
23812
|
}
|
|
23963
23813
|
});
|
|
23964
23814
|
|
|
23965
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
23815
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/native_resource.js
|
|
23966
23816
|
var require_native_resource = __commonJS({
|
|
23967
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
23817
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/native_resource.js"(exports) {
|
|
23968
23818
|
"use strict";
|
|
23969
23819
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23970
23820
|
exports.NativeResourceMixin = exports.NativeResource = void 0;
|
|
@@ -23998,9 +23848,9 @@ var require_native_resource = __commonJS({
|
|
|
23998
23848
|
}
|
|
23999
23849
|
});
|
|
24000
23850
|
|
|
24001
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
23851
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/io.js
|
|
24002
23852
|
var require_io = __commonJS({
|
|
24003
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
23853
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/io.js"(exports) {
|
|
24004
23854
|
"use strict";
|
|
24005
23855
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24006
23856
|
exports.SocketDomain = exports.SocketType = exports.TlsVersion = void 0;
|
|
@@ -24027,9 +23877,9 @@ var require_io = __commonJS({
|
|
|
24027
23877
|
}
|
|
24028
23878
|
});
|
|
24029
23879
|
|
|
24030
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
23880
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/io.js
|
|
24031
23881
|
var require_io2 = __commonJS({
|
|
24032
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
23882
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/io.js"(exports) {
|
|
24033
23883
|
"use strict";
|
|
24034
23884
|
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
24035
23885
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -24049,7 +23899,6 @@ var require_io2 = __commonJS({
|
|
|
24049
23899
|
Object.defineProperty(exports, "SocketDomain", { enumerable: true, get: function() {
|
|
24050
23900
|
return io_2.SocketDomain;
|
|
24051
23901
|
} });
|
|
24052
|
-
var error_1 = require_error();
|
|
24053
23902
|
function error_code_to_string(error_code) {
|
|
24054
23903
|
return binding_1.default.error_code_to_string(error_code);
|
|
24055
23904
|
}
|
|
@@ -24085,7 +23934,7 @@ var require_io2 = __commonJS({
|
|
|
24085
23934
|
super(binding_1.default.io_input_stream_new(16 * 1024));
|
|
24086
23935
|
this.source = source;
|
|
24087
23936
|
this.source.on("data", (data) => {
|
|
24088
|
-
data = Buffer.isBuffer(data) ? data : Buffer
|
|
23937
|
+
data = Buffer.isBuffer(data) ? data : new Buffer(data.toString(), "utf8");
|
|
24089
23938
|
binding_1.default.io_input_stream_append(this.native_handle(), data);
|
|
24090
23939
|
});
|
|
24091
23940
|
this.source.on("end", () => {
|
|
@@ -24177,9 +24026,6 @@ var require_io2 = __commonJS({
|
|
|
24177
24026
|
exports.TlsContextOptions = TlsContextOptions;
|
|
24178
24027
|
var TlsContext = class extends native_resource_1.NativeResource {
|
|
24179
24028
|
constructor(ctx_opt) {
|
|
24180
|
-
if (ctx_opt == null || ctx_opt == void 0) {
|
|
24181
|
-
throw new error_1.CrtError("TlsContext constructor: ctx_opt not defined");
|
|
24182
|
-
}
|
|
24183
24029
|
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));
|
|
24184
24030
|
}
|
|
24185
24031
|
};
|
|
@@ -24209,9 +24055,6 @@ var require_io2 = __commonJS({
|
|
|
24209
24055
|
exports.ServerTlsContext = ServerTlsContext;
|
|
24210
24056
|
var TlsConnectionOptions = class extends native_resource_1.NativeResource {
|
|
24211
24057
|
constructor(tls_ctx, server_name, alpn_list = []) {
|
|
24212
|
-
if (tls_ctx == null || tls_ctx == void 0) {
|
|
24213
|
-
throw new error_1.CrtError("TlsConnectionOptions constructor: tls_ctx not defined");
|
|
24214
|
-
}
|
|
24215
24058
|
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));
|
|
24216
24059
|
this.tls_ctx = tls_ctx;
|
|
24217
24060
|
this.server_name = server_name;
|
|
@@ -24241,9 +24084,9 @@ var require_io2 = __commonJS({
|
|
|
24241
24084
|
}
|
|
24242
24085
|
});
|
|
24243
24086
|
|
|
24244
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
24087
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/auth.js
|
|
24245
24088
|
var require_auth = __commonJS({
|
|
24246
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
24089
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/auth.js"(exports) {
|
|
24247
24090
|
"use strict";
|
|
24248
24091
|
var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
24249
24092
|
function adopt(value) {
|
|
@@ -24292,17 +24135,8 @@ var require_auth = __commonJS({
|
|
|
24292
24135
|
return super.newStatic(access_key, secret_key, session_token);
|
|
24293
24136
|
}
|
|
24294
24137
|
static newCognito(config) {
|
|
24295
|
-
if (config == null || config == void 0) {
|
|
24296
|
-
throw new error_1.CrtError("AwsCredentialsProvider newCognito: Cognito config not defined");
|
|
24297
|
-
}
|
|
24298
24138
|
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);
|
|
24299
24139
|
}
|
|
24300
|
-
static newX509(config) {
|
|
24301
|
-
if (config == null || config == void 0) {
|
|
24302
|
-
throw new error_1.CrtError("AwsCredentialsProvider newX509: X509 config not defined");
|
|
24303
|
-
}
|
|
24304
|
-
return super.newX509(config, config.tlsContext.native_handle(), config.httpProxyOptions ? config.httpProxyOptions.create_native_handle() : null);
|
|
24305
|
-
}
|
|
24306
24140
|
};
|
|
24307
24141
|
__name(AwsCredentialsProvider, "AwsCredentialsProvider");
|
|
24308
24142
|
exports.AwsCredentialsProvider = AwsCredentialsProvider;
|
|
@@ -24357,9 +24191,9 @@ var require_auth = __commonJS({
|
|
|
24357
24191
|
}
|
|
24358
24192
|
});
|
|
24359
24193
|
|
|
24360
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
24194
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/checksums.js
|
|
24361
24195
|
var require_checksums = __commonJS({
|
|
24362
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
24196
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/checksums.js"(exports) {
|
|
24363
24197
|
"use strict";
|
|
24364
24198
|
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
24365
24199
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -24380,9 +24214,9 @@ var require_checksums = __commonJS({
|
|
|
24380
24214
|
}
|
|
24381
24215
|
});
|
|
24382
24216
|
|
|
24383
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
24217
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/crt.js
|
|
24384
24218
|
var require_crt = __commonJS({
|
|
24385
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
24219
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/crt.js"(exports) {
|
|
24386
24220
|
"use strict";
|
|
24387
24221
|
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
24388
24222
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -24403,9 +24237,9 @@ var require_crt = __commonJS({
|
|
|
24403
24237
|
}
|
|
24404
24238
|
});
|
|
24405
24239
|
|
|
24406
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
24240
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/crypto.js
|
|
24407
24241
|
var require_crypto = __commonJS({
|
|
24408
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
24242
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/crypto.js"(exports) {
|
|
24409
24243
|
"use strict";
|
|
24410
24244
|
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
24411
24245
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -24489,9 +24323,41 @@ var require_crypto = __commonJS({
|
|
|
24489
24323
|
}
|
|
24490
24324
|
});
|
|
24491
24325
|
|
|
24492
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
24326
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/http.js
|
|
24327
|
+
var require_http = __commonJS({
|
|
24328
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/http.js"(exports) {
|
|
24329
|
+
"use strict";
|
|
24330
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24331
|
+
exports.CommonHttpProxyOptions = exports.HttpProxyAuthenticationType = exports.HttpVersion = void 0;
|
|
24332
|
+
var HttpVersion;
|
|
24333
|
+
(function(HttpVersion2) {
|
|
24334
|
+
HttpVersion2[HttpVersion2["Unknown"] = 0] = "Unknown";
|
|
24335
|
+
HttpVersion2[HttpVersion2["Http1_0"] = 1] = "Http1_0";
|
|
24336
|
+
HttpVersion2[HttpVersion2["Http1_1"] = 2] = "Http1_1";
|
|
24337
|
+
HttpVersion2[HttpVersion2["Http2"] = 3] = "Http2";
|
|
24338
|
+
})(HttpVersion = exports.HttpVersion || (exports.HttpVersion = {}));
|
|
24339
|
+
var HttpProxyAuthenticationType;
|
|
24340
|
+
(function(HttpProxyAuthenticationType2) {
|
|
24341
|
+
HttpProxyAuthenticationType2[HttpProxyAuthenticationType2["None"] = 0] = "None";
|
|
24342
|
+
HttpProxyAuthenticationType2[HttpProxyAuthenticationType2["Basic"] = 1] = "Basic";
|
|
24343
|
+
})(HttpProxyAuthenticationType = exports.HttpProxyAuthenticationType || (exports.HttpProxyAuthenticationType = {}));
|
|
24344
|
+
var CommonHttpProxyOptions = class {
|
|
24345
|
+
constructor(host_name, port, auth_method = HttpProxyAuthenticationType.None, auth_username, auth_password) {
|
|
24346
|
+
this.host_name = host_name;
|
|
24347
|
+
this.port = port;
|
|
24348
|
+
this.auth_method = auth_method;
|
|
24349
|
+
this.auth_username = auth_username;
|
|
24350
|
+
this.auth_password = auth_password;
|
|
24351
|
+
}
|
|
24352
|
+
};
|
|
24353
|
+
__name(CommonHttpProxyOptions, "CommonHttpProxyOptions");
|
|
24354
|
+
exports.CommonHttpProxyOptions = CommonHttpProxyOptions;
|
|
24355
|
+
}
|
|
24356
|
+
});
|
|
24357
|
+
|
|
24358
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/event.js
|
|
24493
24359
|
var require_event = __commonJS({
|
|
24494
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
24360
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/event.js"(exports) {
|
|
24495
24361
|
"use strict";
|
|
24496
24362
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24497
24363
|
exports.BufferedEventEmitter = void 0;
|
|
@@ -24538,659 +24404,9 @@ var require_event = __commonJS({
|
|
|
24538
24404
|
}
|
|
24539
24405
|
});
|
|
24540
24406
|
|
|
24541
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
24542
|
-
var require_eventstream_utils = __commonJS({
|
|
24543
|
-
"../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/native/eventstream_utils.js"(exports) {
|
|
24544
|
-
"use strict";
|
|
24545
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24546
|
-
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;
|
|
24547
|
-
var error_1 = require_error();
|
|
24548
|
-
exports.MAX_INT8 = 127;
|
|
24549
|
-
exports.MIN_INT8 = -128;
|
|
24550
|
-
exports.MAX_INT16 = 32767;
|
|
24551
|
-
exports.MIN_INT16 = -32768;
|
|
24552
|
-
exports.MAX_INT32 = 2147483647;
|
|
24553
|
-
exports.MIN_INT32 = -2147483648;
|
|
24554
|
-
exports.MAX_INT64 = BigInt("9223372036854775807");
|
|
24555
|
-
exports.MIN_INT64 = BigInt("-9223372036854775808");
|
|
24556
|
-
var MAX_UINT8_AS_BIGINT = BigInt("256");
|
|
24557
|
-
function marshalInt64BigintAsBuffer(value) {
|
|
24558
|
-
if (value < exports.MIN_INT64 || value > exports.MAX_INT64) {
|
|
24559
|
-
throw new error_1.CrtError("marshalInt64BigintAsBuffer expects a value that can fit in 8 bytes");
|
|
24560
|
-
}
|
|
24561
|
-
let buffer = new Uint8Array(8);
|
|
24562
|
-
if (value < 0) {
|
|
24563
|
-
value = -value - BigInt(1);
|
|
24564
|
-
for (let i = 0; i < 8; ++i) {
|
|
24565
|
-
buffer[i] = 255 - Number(value % MAX_UINT8_AS_BIGINT);
|
|
24566
|
-
value /= MAX_UINT8_AS_BIGINT;
|
|
24567
|
-
}
|
|
24568
|
-
} else {
|
|
24569
|
-
for (let i = 0; i < 8; ++i) {
|
|
24570
|
-
buffer[i] = Number(value % MAX_UINT8_AS_BIGINT);
|
|
24571
|
-
value /= MAX_UINT8_AS_BIGINT;
|
|
24572
|
-
}
|
|
24573
|
-
}
|
|
24574
|
-
return buffer;
|
|
24575
|
-
}
|
|
24576
|
-
__name(marshalInt64BigintAsBuffer, "marshalInt64BigintAsBuffer");
|
|
24577
|
-
exports.marshalInt64BigintAsBuffer = marshalInt64BigintAsBuffer;
|
|
24578
|
-
function unmarshalInt64BigintFromBuffer(buffer) {
|
|
24579
|
-
let value = BigInt(0);
|
|
24580
|
-
let byteView = new Uint8Array(buffer);
|
|
24581
|
-
if (byteView.length != 8) {
|
|
24582
|
-
throw new error_1.CrtError("unmarshalInt64BigintFromBuffer expects a byte buffer of length 8");
|
|
24583
|
-
}
|
|
24584
|
-
let shift = BigInt(1);
|
|
24585
|
-
let isNegative = (byteView[7] & 128) != 0;
|
|
24586
|
-
if (isNegative) {
|
|
24587
|
-
for (let i = 0; i < byteView.length; ++i) {
|
|
24588
|
-
let byteValue = BigInt(255 - byteView[i]);
|
|
24589
|
-
value += byteValue * shift;
|
|
24590
|
-
shift *= MAX_UINT8_AS_BIGINT;
|
|
24591
|
-
}
|
|
24592
|
-
value += BigInt(1);
|
|
24593
|
-
value = -value;
|
|
24594
|
-
} else {
|
|
24595
|
-
for (let i = 0; i < byteView.length; ++i) {
|
|
24596
|
-
let byteValue = BigInt(byteView[i]);
|
|
24597
|
-
value += byteValue * shift;
|
|
24598
|
-
shift *= MAX_UINT8_AS_BIGINT;
|
|
24599
|
-
}
|
|
24600
|
-
}
|
|
24601
|
-
return value;
|
|
24602
|
-
}
|
|
24603
|
-
__name(unmarshalInt64BigintFromBuffer, "unmarshalInt64BigintFromBuffer");
|
|
24604
|
-
exports.unmarshalInt64BigintFromBuffer = unmarshalInt64BigintFromBuffer;
|
|
24605
|
-
}
|
|
24606
|
-
});
|
|
24607
|
-
|
|
24608
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/native/eventstream.js
|
|
24609
|
-
var require_eventstream = __commonJS({
|
|
24610
|
-
"../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/native/eventstream.js"(exports) {
|
|
24611
|
-
"use strict";
|
|
24612
|
-
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
24613
|
-
if (k2 === void 0)
|
|
24614
|
-
k2 = k;
|
|
24615
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
24616
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24617
|
-
desc = { enumerable: true, get: function() {
|
|
24618
|
-
return m[k];
|
|
24619
|
-
} };
|
|
24620
|
-
}
|
|
24621
|
-
Object.defineProperty(o, k2, desc);
|
|
24622
|
-
} : function(o, m, k, k2) {
|
|
24623
|
-
if (k2 === void 0)
|
|
24624
|
-
k2 = k;
|
|
24625
|
-
o[k2] = m[k];
|
|
24626
|
-
});
|
|
24627
|
-
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
24628
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
24629
|
-
} : function(o, v) {
|
|
24630
|
-
o["default"] = v;
|
|
24631
|
-
});
|
|
24632
|
-
var __importStar2 = exports && exports.__importStar || function(mod) {
|
|
24633
|
-
if (mod && mod.__esModule)
|
|
24634
|
-
return mod;
|
|
24635
|
-
var result = {};
|
|
24636
|
-
if (mod != null) {
|
|
24637
|
-
for (var k in mod)
|
|
24638
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
24639
|
-
__createBinding2(result, mod, k);
|
|
24640
|
-
}
|
|
24641
|
-
__setModuleDefault2(result, mod);
|
|
24642
|
-
return result;
|
|
24643
|
-
};
|
|
24644
|
-
var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
24645
|
-
function adopt(value) {
|
|
24646
|
-
return value instanceof P ? value : new P(function(resolve) {
|
|
24647
|
-
resolve(value);
|
|
24648
|
-
});
|
|
24649
|
-
}
|
|
24650
|
-
__name(adopt, "adopt");
|
|
24651
|
-
return new (P || (P = Promise))(function(resolve, reject) {
|
|
24652
|
-
function fulfilled(value) {
|
|
24653
|
-
try {
|
|
24654
|
-
step(generator.next(value));
|
|
24655
|
-
} catch (e) {
|
|
24656
|
-
reject(e);
|
|
24657
|
-
}
|
|
24658
|
-
}
|
|
24659
|
-
__name(fulfilled, "fulfilled");
|
|
24660
|
-
function rejected(value) {
|
|
24661
|
-
try {
|
|
24662
|
-
step(generator["throw"](value));
|
|
24663
|
-
} catch (e) {
|
|
24664
|
-
reject(e);
|
|
24665
|
-
}
|
|
24666
|
-
}
|
|
24667
|
-
__name(rejected, "rejected");
|
|
24668
|
-
function step(result) {
|
|
24669
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
24670
|
-
}
|
|
24671
|
-
__name(step, "step");
|
|
24672
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24673
|
-
});
|
|
24674
|
-
};
|
|
24675
|
-
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
24676
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
24677
|
-
};
|
|
24678
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24679
|
-
exports.ClientStream = exports.ClientConnection = exports.MessageType = exports.MessageFlags = exports.Header = exports.HeaderType = void 0;
|
|
24680
|
-
var native_resource_1 = require_native_resource();
|
|
24681
|
-
var event_1 = require_event();
|
|
24682
|
-
var error_1 = require_error();
|
|
24683
|
-
var io = __importStar2(require_io2());
|
|
24684
|
-
var eventstream_utils = __importStar2(require_eventstream_utils());
|
|
24685
|
-
var promise = __importStar2(require_promise());
|
|
24686
|
-
var binding_1 = __importDefault2(require_binding());
|
|
24687
|
-
var HeaderType;
|
|
24688
|
-
(function(HeaderType2) {
|
|
24689
|
-
HeaderType2[HeaderType2["BooleanTrue"] = 0] = "BooleanTrue";
|
|
24690
|
-
HeaderType2[HeaderType2["BooleanFalse"] = 1] = "BooleanFalse";
|
|
24691
|
-
HeaderType2[HeaderType2["Byte"] = 2] = "Byte";
|
|
24692
|
-
HeaderType2[HeaderType2["Int16"] = 3] = "Int16";
|
|
24693
|
-
HeaderType2[HeaderType2["Int32"] = 4] = "Int32";
|
|
24694
|
-
HeaderType2[HeaderType2["Int64"] = 5] = "Int64";
|
|
24695
|
-
HeaderType2[HeaderType2["ByteBuffer"] = 6] = "ByteBuffer";
|
|
24696
|
-
HeaderType2[HeaderType2["String"] = 7] = "String";
|
|
24697
|
-
HeaderType2[HeaderType2["Timestamp"] = 8] = "Timestamp";
|
|
24698
|
-
HeaderType2[HeaderType2["UUID"] = 9] = "UUID";
|
|
24699
|
-
})(HeaderType = exports.HeaderType || (exports.HeaderType = {}));
|
|
24700
|
-
var AWS_MAXIMUM_EVENT_STREAM_HEADER_NAME_LENGTH = 127;
|
|
24701
|
-
var Header = class {
|
|
24702
|
-
constructor(name, type, value) {
|
|
24703
|
-
this.name = name;
|
|
24704
|
-
this.type = type;
|
|
24705
|
-
this.value = value;
|
|
24706
|
-
}
|
|
24707
|
-
static validateHeaderName(name) {
|
|
24708
|
-
if (name.length == 0 || name.length > AWS_MAXIMUM_EVENT_STREAM_HEADER_NAME_LENGTH) {
|
|
24709
|
-
throw new error_1.CrtError(`Event stream header name (${name}) is not valid`);
|
|
24710
|
-
}
|
|
24711
|
-
}
|
|
24712
|
-
static newBoolean(name, value) {
|
|
24713
|
-
Header.validateHeaderName(name);
|
|
24714
|
-
if (value) {
|
|
24715
|
-
return new Header(name, HeaderType.BooleanTrue);
|
|
24716
|
-
} else {
|
|
24717
|
-
return new Header(name, HeaderType.BooleanFalse);
|
|
24718
|
-
}
|
|
24719
|
-
}
|
|
24720
|
-
static newByte(name, value) {
|
|
24721
|
-
Header.validateHeaderName(name);
|
|
24722
|
-
if (value >= eventstream_utils.MIN_INT8 && value <= eventstream_utils.MAX_INT8 && Number.isSafeInteger(value)) {
|
|
24723
|
-
return new Header(name, HeaderType.Byte, value);
|
|
24724
|
-
}
|
|
24725
|
-
throw new error_1.CrtError(`Illegal value for eventstream byte-valued header: ${value}`);
|
|
24726
|
-
}
|
|
24727
|
-
static newInt16(name, value) {
|
|
24728
|
-
Header.validateHeaderName(name);
|
|
24729
|
-
if (value >= eventstream_utils.MIN_INT16 && value <= eventstream_utils.MAX_INT16 && Number.isSafeInteger(value)) {
|
|
24730
|
-
return new Header(name, HeaderType.Int16, value);
|
|
24731
|
-
}
|
|
24732
|
-
throw new error_1.CrtError(`Illegal value for eventstream int16-valued header: ${value}`);
|
|
24733
|
-
}
|
|
24734
|
-
static newInt32(name, value) {
|
|
24735
|
-
Header.validateHeaderName(name);
|
|
24736
|
-
if (value >= eventstream_utils.MIN_INT32 && value <= eventstream_utils.MAX_INT32 && Number.isSafeInteger(value)) {
|
|
24737
|
-
return new Header(name, HeaderType.Int32, value);
|
|
24738
|
-
}
|
|
24739
|
-
throw new error_1.CrtError(`Illegal value for eventstream int32-valued header: ${value}`);
|
|
24740
|
-
}
|
|
24741
|
-
static newInt64FromNumber(name, value) {
|
|
24742
|
-
Header.validateHeaderName(name);
|
|
24743
|
-
if (Number.isSafeInteger(value)) {
|
|
24744
|
-
return new Header(name, HeaderType.Int64, eventstream_utils.marshalInt64BigintAsBuffer(BigInt(value)));
|
|
24745
|
-
}
|
|
24746
|
-
throw new error_1.CrtError(`Illegal value for eventstream int64-valued header: ${value}`);
|
|
24747
|
-
}
|
|
24748
|
-
static newInt64FromBigint(name, value) {
|
|
24749
|
-
Header.validateHeaderName(name);
|
|
24750
|
-
if (value >= eventstream_utils.MIN_INT64 && value <= eventstream_utils.MAX_INT64) {
|
|
24751
|
-
return new Header(name, HeaderType.Int64, eventstream_utils.marshalInt64BigintAsBuffer(value));
|
|
24752
|
-
}
|
|
24753
|
-
throw new error_1.CrtError(`Illegal value for eventstream int64-valued header: ${value}`);
|
|
24754
|
-
}
|
|
24755
|
-
static newByteBuffer(name, value) {
|
|
24756
|
-
Header.validateHeaderName(name);
|
|
24757
|
-
return new Header(name, HeaderType.ByteBuffer, value);
|
|
24758
|
-
}
|
|
24759
|
-
static newString(name, value) {
|
|
24760
|
-
Header.validateHeaderName(name);
|
|
24761
|
-
return new Header(name, HeaderType.String, value);
|
|
24762
|
-
}
|
|
24763
|
-
static newTimeStampFromSecondsSinceEpoch(name, secondsSinceEpoch) {
|
|
24764
|
-
Header.validateHeaderName(name);
|
|
24765
|
-
if (Number.isSafeInteger(secondsSinceEpoch) && secondsSinceEpoch >= 0) {
|
|
24766
|
-
return new Header(name, HeaderType.Timestamp, secondsSinceEpoch);
|
|
24767
|
-
}
|
|
24768
|
-
throw new error_1.CrtError(`Illegal value for eventstream timestamp-valued header: ${secondsSinceEpoch}`);
|
|
24769
|
-
}
|
|
24770
|
-
static newTimeStampFromDate(name, date) {
|
|
24771
|
-
Header.validateHeaderName(name);
|
|
24772
|
-
const secondsSinceEpoch = date.getTime();
|
|
24773
|
-
if (Number.isSafeInteger(secondsSinceEpoch)) {
|
|
24774
|
-
return new Header(name, HeaderType.Timestamp, secondsSinceEpoch);
|
|
24775
|
-
}
|
|
24776
|
-
throw new error_1.CrtError(`Illegal value for eventstream timestamp-valued header: ${date}`);
|
|
24777
|
-
}
|
|
24778
|
-
static newUUID(name, value) {
|
|
24779
|
-
Header.validateHeaderName(name);
|
|
24780
|
-
if (value.byteLength == 16) {
|
|
24781
|
-
return new Header(name, HeaderType.UUID, value);
|
|
24782
|
-
}
|
|
24783
|
-
throw new error_1.CrtError(`Illegal value for eventstream uuid-valued header: ${value}`);
|
|
24784
|
-
}
|
|
24785
|
-
toValue(type) {
|
|
24786
|
-
if (type != this.type) {
|
|
24787
|
-
throw new error_1.CrtError(`Header of type (${this.type}) cannot be converted to type (${type})`);
|
|
24788
|
-
}
|
|
24789
|
-
return this.value;
|
|
24790
|
-
}
|
|
24791
|
-
asBoolean() {
|
|
24792
|
-
switch (this.type) {
|
|
24793
|
-
case HeaderType.BooleanFalse:
|
|
24794
|
-
return false;
|
|
24795
|
-
case HeaderType.BooleanTrue:
|
|
24796
|
-
return true;
|
|
24797
|
-
default:
|
|
24798
|
-
throw new error_1.CrtError(`Header of type (${this.type}) cannot be converted to type (boolean)`);
|
|
24799
|
-
}
|
|
24800
|
-
}
|
|
24801
|
-
asByte() {
|
|
24802
|
-
return this.toValue(HeaderType.Byte);
|
|
24803
|
-
}
|
|
24804
|
-
asInt16() {
|
|
24805
|
-
return this.toValue(HeaderType.Int16);
|
|
24806
|
-
}
|
|
24807
|
-
asInt32() {
|
|
24808
|
-
return this.toValue(HeaderType.Int32);
|
|
24809
|
-
}
|
|
24810
|
-
asInt64() {
|
|
24811
|
-
return eventstream_utils.unmarshalInt64BigintFromBuffer(this.toValue(HeaderType.Int64));
|
|
24812
|
-
}
|
|
24813
|
-
asByteBuffer() {
|
|
24814
|
-
return this.toValue(HeaderType.ByteBuffer);
|
|
24815
|
-
}
|
|
24816
|
-
asString() {
|
|
24817
|
-
return this.toValue(HeaderType.String);
|
|
24818
|
-
}
|
|
24819
|
-
asTimestamp() {
|
|
24820
|
-
return this.toValue(HeaderType.Timestamp);
|
|
24821
|
-
}
|
|
24822
|
-
asUUID() {
|
|
24823
|
-
return this.toValue(HeaderType.UUID);
|
|
24824
|
-
}
|
|
24825
|
-
};
|
|
24826
|
-
__name(Header, "Header");
|
|
24827
|
-
exports.Header = Header;
|
|
24828
|
-
var MessageFlags;
|
|
24829
|
-
(function(MessageFlags2) {
|
|
24830
|
-
MessageFlags2[MessageFlags2["None"] = 0] = "None";
|
|
24831
|
-
MessageFlags2[MessageFlags2["ConnectionAccepted"] = 1] = "ConnectionAccepted";
|
|
24832
|
-
MessageFlags2[MessageFlags2["TerminateStream"] = 2] = "TerminateStream";
|
|
24833
|
-
})(MessageFlags = exports.MessageFlags || (exports.MessageFlags = {}));
|
|
24834
|
-
var MessageType;
|
|
24835
|
-
(function(MessageType2) {
|
|
24836
|
-
MessageType2[MessageType2["ApplicationMessage"] = 0] = "ApplicationMessage";
|
|
24837
|
-
MessageType2[MessageType2["ApplicationError"] = 1] = "ApplicationError";
|
|
24838
|
-
MessageType2[MessageType2["Ping"] = 2] = "Ping";
|
|
24839
|
-
MessageType2[MessageType2["PingResponse"] = 3] = "PingResponse";
|
|
24840
|
-
MessageType2[MessageType2["Connect"] = 4] = "Connect";
|
|
24841
|
-
MessageType2[MessageType2["ConnectAck"] = 5] = "ConnectAck";
|
|
24842
|
-
MessageType2[MessageType2["ProtocolError"] = 6] = "ProtocolError";
|
|
24843
|
-
MessageType2[MessageType2["InternalError"] = 7] = "InternalError";
|
|
24844
|
-
})(MessageType = exports.MessageType || (exports.MessageType = {}));
|
|
24845
|
-
function mapPodHeadersToJSHeaders(headers) {
|
|
24846
|
-
return Array.from(headers, (header) => {
|
|
24847
|
-
return new Header(header.name, header.type, header.value);
|
|
24848
|
-
});
|
|
24849
|
-
}
|
|
24850
|
-
__name(mapPodHeadersToJSHeaders, "mapPodHeadersToJSHeaders");
|
|
24851
|
-
function mapPodMessageToJSMessage(message) {
|
|
24852
|
-
let jsMessage = {
|
|
24853
|
-
type: message.type,
|
|
24854
|
-
flags: message.flags,
|
|
24855
|
-
payload: message.payload
|
|
24856
|
-
};
|
|
24857
|
-
if (message.headers) {
|
|
24858
|
-
jsMessage.headers = mapPodHeadersToJSHeaders(message.headers);
|
|
24859
|
-
}
|
|
24860
|
-
return jsMessage;
|
|
24861
|
-
}
|
|
24862
|
-
__name(mapPodMessageToJSMessage, "mapPodMessageToJSMessage");
|
|
24863
|
-
var ClientConnectionState;
|
|
24864
|
-
(function(ClientConnectionState2) {
|
|
24865
|
-
ClientConnectionState2[ClientConnectionState2["None"] = 0] = "None";
|
|
24866
|
-
ClientConnectionState2[ClientConnectionState2["Connecting"] = 1] = "Connecting";
|
|
24867
|
-
ClientConnectionState2[ClientConnectionState2["Connected"] = 2] = "Connected";
|
|
24868
|
-
ClientConnectionState2[ClientConnectionState2["Disconnected"] = 3] = "Disconnected";
|
|
24869
|
-
ClientConnectionState2[ClientConnectionState2["Closed"] = 4] = "Closed";
|
|
24870
|
-
})(ClientConnectionState || (ClientConnectionState = {}));
|
|
24871
|
-
var ClientConnection = class extends (0, native_resource_1.NativeResourceMixin)(event_1.BufferedEventEmitter) {
|
|
24872
|
-
constructor(config) {
|
|
24873
|
-
if (config === void 0) {
|
|
24874
|
-
throw new error_1.CrtError("Invalid configuration passed to eventstream ClientConnection constructor");
|
|
24875
|
-
}
|
|
24876
|
-
super();
|
|
24877
|
-
this.state = ClientConnectionState.None;
|
|
24878
|
-
this._super(binding_1.default.event_stream_client_connection_new(this, config, (connection, errorCode) => {
|
|
24879
|
-
ClientConnection._s_on_disconnect(connection, errorCode);
|
|
24880
|
-
}, (connection, message) => {
|
|
24881
|
-
ClientConnection._s_on_protocol_message(connection, message);
|
|
24882
|
-
}, config.socketOptions ? config.socketOptions.native_handle() : null, config.tlsCtx ? config.tlsCtx.native_handle() : null));
|
|
24883
|
-
}
|
|
24884
|
-
close() {
|
|
24885
|
-
if (this.state != ClientConnectionState.Closed) {
|
|
24886
|
-
this.state = ClientConnectionState.Closed;
|
|
24887
|
-
binding_1.default.event_stream_client_connection_close(this.native_handle());
|
|
24888
|
-
}
|
|
24889
|
-
}
|
|
24890
|
-
connect(options) {
|
|
24891
|
-
return __awaiter2(this, void 0, void 0, function* () {
|
|
24892
|
-
let cleanupCancelListener = void 0;
|
|
24893
|
-
let connectPromise = new Promise((resolve, reject) => {
|
|
24894
|
-
if (!options) {
|
|
24895
|
-
reject(new error_1.CrtError("Invalid options passed to event stream ClientConnection.connect"));
|
|
24896
|
-
return;
|
|
24897
|
-
}
|
|
24898
|
-
if (this.state != ClientConnectionState.None) {
|
|
24899
|
-
reject(new error_1.CrtError(`Event stream connection in a state (${this.state}) where connect() is not allowed.`));
|
|
24900
|
-
return;
|
|
24901
|
-
}
|
|
24902
|
-
this.state = ClientConnectionState.Connecting;
|
|
24903
|
-
if (options.cancelController) {
|
|
24904
|
-
let cancel = /* @__PURE__ */ __name(() => {
|
|
24905
|
-
reject(new error_1.CrtError(`Event stream connection connect() cancelled by external request.`));
|
|
24906
|
-
setImmediate(() => {
|
|
24907
|
-
this.close();
|
|
24908
|
-
});
|
|
24909
|
-
}, "cancel");
|
|
24910
|
-
cleanupCancelListener = options.cancelController.addListener(cancel);
|
|
24911
|
-
if (!cleanupCancelListener) {
|
|
24912
|
-
return;
|
|
24913
|
-
}
|
|
24914
|
-
}
|
|
24915
|
-
function curriedPromiseCallback(connection, errorCode) {
|
|
24916
|
-
return ClientConnection._s_on_connection_setup(resolve, reject, connection, errorCode);
|
|
24917
|
-
}
|
|
24918
|
-
__name(curriedPromiseCallback, "curriedPromiseCallback");
|
|
24919
|
-
try {
|
|
24920
|
-
binding_1.default.event_stream_client_connection_connect(this.native_handle(), curriedPromiseCallback);
|
|
24921
|
-
} catch (e) {
|
|
24922
|
-
this.state = ClientConnectionState.Disconnected;
|
|
24923
|
-
reject(e);
|
|
24924
|
-
}
|
|
24925
|
-
});
|
|
24926
|
-
return promise.makeSelfCleaningPromise(connectPromise, cleanupCancelListener);
|
|
24927
|
-
});
|
|
24928
|
-
}
|
|
24929
|
-
sendProtocolMessage(options) {
|
|
24930
|
-
return __awaiter2(this, void 0, void 0, function* () {
|
|
24931
|
-
let cleanupCancelListener = void 0;
|
|
24932
|
-
let sendProtocolMessagePromise = new Promise((resolve, reject) => {
|
|
24933
|
-
try {
|
|
24934
|
-
let curriedPromiseCallback = function(errorCode) {
|
|
24935
|
-
return ClientConnection._s_on_connection_send_protocol_message_completion(resolve, reject, errorCode);
|
|
24936
|
-
};
|
|
24937
|
-
__name(curriedPromiseCallback, "curriedPromiseCallback");
|
|
24938
|
-
if (!options) {
|
|
24939
|
-
reject(new error_1.CrtError("Invalid options passed to event stream ClientConnection.sendProtocolMessage"));
|
|
24940
|
-
return;
|
|
24941
|
-
}
|
|
24942
|
-
if (!this.isConnected()) {
|
|
24943
|
-
reject(new error_1.CrtError(`Event stream connection in a state (${this.state}) where sending protocol messages is not allowed.`));
|
|
24944
|
-
return;
|
|
24945
|
-
}
|
|
24946
|
-
if (options.cancelController) {
|
|
24947
|
-
let cancel = /* @__PURE__ */ __name(() => {
|
|
24948
|
-
reject(new error_1.CrtError(`Event stream connection sendProtocolMessage() cancelled by external request.`));
|
|
24949
|
-
setImmediate(() => {
|
|
24950
|
-
this.close();
|
|
24951
|
-
});
|
|
24952
|
-
}, "cancel");
|
|
24953
|
-
cleanupCancelListener = options.cancelController.addListener(cancel);
|
|
24954
|
-
if (!cleanupCancelListener) {
|
|
24955
|
-
return;
|
|
24956
|
-
}
|
|
24957
|
-
}
|
|
24958
|
-
binding_1.default.event_stream_client_connection_send_protocol_message(this.native_handle(), options, curriedPromiseCallback);
|
|
24959
|
-
} catch (e) {
|
|
24960
|
-
reject(e);
|
|
24961
|
-
}
|
|
24962
|
-
});
|
|
24963
|
-
return promise.makeSelfCleaningPromise(sendProtocolMessagePromise, cleanupCancelListener);
|
|
24964
|
-
});
|
|
24965
|
-
}
|
|
24966
|
-
isConnected() {
|
|
24967
|
-
return this.state == ClientConnectionState.Connected;
|
|
24968
|
-
}
|
|
24969
|
-
newStream() {
|
|
24970
|
-
if (!this.isConnected()) {
|
|
24971
|
-
throw new error_1.CrtError(`Event stream connection in a state (${this.state}) where creating new streams is forbidden.`);
|
|
24972
|
-
}
|
|
24973
|
-
return new ClientStream(this);
|
|
24974
|
-
}
|
|
24975
|
-
on(event, listener) {
|
|
24976
|
-
super.on(event, listener);
|
|
24977
|
-
return this;
|
|
24978
|
-
}
|
|
24979
|
-
static _s_on_connection_setup(resolve, reject, connection, errorCode) {
|
|
24980
|
-
if (errorCode == 0 && connection.state == ClientConnectionState.Connecting) {
|
|
24981
|
-
connection.state = ClientConnectionState.Connected;
|
|
24982
|
-
resolve();
|
|
24983
|
-
} else {
|
|
24984
|
-
if (connection.state != ClientConnectionState.Closed) {
|
|
24985
|
-
connection.state = ClientConnectionState.Disconnected;
|
|
24986
|
-
}
|
|
24987
|
-
reject(io.error_code_to_string(errorCode));
|
|
24988
|
-
}
|
|
24989
|
-
}
|
|
24990
|
-
static _s_on_disconnect(connection, errorCode) {
|
|
24991
|
-
if (connection.state != ClientConnectionState.Closed) {
|
|
24992
|
-
connection.state = ClientConnectionState.Disconnected;
|
|
24993
|
-
}
|
|
24994
|
-
process.nextTick(() => {
|
|
24995
|
-
connection.emit("disconnection", { errorCode });
|
|
24996
|
-
});
|
|
24997
|
-
}
|
|
24998
|
-
static _s_on_protocol_message(connection, message) {
|
|
24999
|
-
process.nextTick(() => {
|
|
25000
|
-
connection.emit("protocolMessage", { message: mapPodMessageToJSMessage(message) });
|
|
25001
|
-
});
|
|
25002
|
-
}
|
|
25003
|
-
static _s_on_connection_send_protocol_message_completion(resolve, reject, errorCode) {
|
|
25004
|
-
if (errorCode == 0) {
|
|
25005
|
-
resolve();
|
|
25006
|
-
} else {
|
|
25007
|
-
reject(io.error_code_to_string(errorCode));
|
|
25008
|
-
}
|
|
25009
|
-
}
|
|
25010
|
-
};
|
|
25011
|
-
__name(ClientConnection, "ClientConnection");
|
|
25012
|
-
exports.ClientConnection = ClientConnection;
|
|
25013
|
-
ClientConnection.DISCONNECTION = "disconnection";
|
|
25014
|
-
ClientConnection.PROTOCOL_MESSAGE = "protocolMessage";
|
|
25015
|
-
var ClientStreamState;
|
|
25016
|
-
(function(ClientStreamState2) {
|
|
25017
|
-
ClientStreamState2[ClientStreamState2["None"] = 0] = "None";
|
|
25018
|
-
ClientStreamState2[ClientStreamState2["Activating"] = 1] = "Activating";
|
|
25019
|
-
ClientStreamState2[ClientStreamState2["Activated"] = 2] = "Activated";
|
|
25020
|
-
ClientStreamState2[ClientStreamState2["Ended"] = 3] = "Ended";
|
|
25021
|
-
ClientStreamState2[ClientStreamState2["Closed"] = 4] = "Closed";
|
|
25022
|
-
})(ClientStreamState || (ClientStreamState = {}));
|
|
25023
|
-
var ClientStream = class extends (0, native_resource_1.NativeResourceMixin)(event_1.BufferedEventEmitter) {
|
|
25024
|
-
constructor(connection) {
|
|
25025
|
-
super();
|
|
25026
|
-
this._super(binding_1.default.event_stream_client_stream_new(this, connection.native_handle(), (stream) => {
|
|
25027
|
-
ClientStream._s_on_stream_ended(stream);
|
|
25028
|
-
}, (stream, message) => {
|
|
25029
|
-
ClientStream._s_on_stream_message(stream, message);
|
|
25030
|
-
}));
|
|
25031
|
-
this.state = ClientStreamState.None;
|
|
25032
|
-
}
|
|
25033
|
-
close() {
|
|
25034
|
-
if (this.state != ClientStreamState.Closed) {
|
|
25035
|
-
this.state = ClientStreamState.Closed;
|
|
25036
|
-
binding_1.default.event_stream_client_stream_close(this.native_handle());
|
|
25037
|
-
}
|
|
25038
|
-
}
|
|
25039
|
-
activate(options) {
|
|
25040
|
-
return __awaiter2(this, void 0, void 0, function* () {
|
|
25041
|
-
let cleanupCancelListener = void 0;
|
|
25042
|
-
let activatePromise = new Promise((resolve, reject) => {
|
|
25043
|
-
try {
|
|
25044
|
-
let curriedPromiseCallback = function(stream, errorCode) {
|
|
25045
|
-
return ClientStream._s_on_stream_activated(resolve, reject, stream, errorCode);
|
|
25046
|
-
};
|
|
25047
|
-
__name(curriedPromiseCallback, "curriedPromiseCallback");
|
|
25048
|
-
if (this.state != ClientStreamState.None) {
|
|
25049
|
-
reject(new error_1.CrtError(`Event stream in a state (${this.state}) where activation is not allowed.`));
|
|
25050
|
-
return;
|
|
25051
|
-
}
|
|
25052
|
-
if (options === void 0) {
|
|
25053
|
-
this.state = ClientStreamState.Ended;
|
|
25054
|
-
reject(new error_1.CrtError("Invalid options passed to ClientStream.activate"));
|
|
25055
|
-
return;
|
|
25056
|
-
}
|
|
25057
|
-
this.state = ClientStreamState.Activating;
|
|
25058
|
-
if (options.cancelController) {
|
|
25059
|
-
let cancel = /* @__PURE__ */ __name(() => {
|
|
25060
|
-
reject(new error_1.CrtError(`Event stream activate() cancelled by external request.`));
|
|
25061
|
-
setImmediate(() => {
|
|
25062
|
-
this.close();
|
|
25063
|
-
});
|
|
25064
|
-
}, "cancel");
|
|
25065
|
-
cleanupCancelListener = options.cancelController.addListener(cancel);
|
|
25066
|
-
if (!cleanupCancelListener) {
|
|
25067
|
-
return;
|
|
25068
|
-
}
|
|
25069
|
-
}
|
|
25070
|
-
binding_1.default.event_stream_client_stream_activate(this.native_handle(), options, curriedPromiseCallback);
|
|
25071
|
-
} catch (e) {
|
|
25072
|
-
this.state = ClientStreamState.Ended;
|
|
25073
|
-
reject(e);
|
|
25074
|
-
}
|
|
25075
|
-
});
|
|
25076
|
-
return promise.makeSelfCleaningPromise(activatePromise, cleanupCancelListener);
|
|
25077
|
-
});
|
|
25078
|
-
}
|
|
25079
|
-
sendMessage(options) {
|
|
25080
|
-
return __awaiter2(this, void 0, void 0, function* () {
|
|
25081
|
-
let cleanupCancelListener = void 0;
|
|
25082
|
-
let sendMessagePromise = new Promise((resolve, reject) => {
|
|
25083
|
-
try {
|
|
25084
|
-
let curriedPromiseCallback = function(errorCode) {
|
|
25085
|
-
return ClientStream._s_on_stream_send_message_completion(resolve, reject, errorCode);
|
|
25086
|
-
};
|
|
25087
|
-
__name(curriedPromiseCallback, "curriedPromiseCallback");
|
|
25088
|
-
if (!options) {
|
|
25089
|
-
reject(new error_1.CrtError("Invalid options passed to ClientStream.sendMessage"));
|
|
25090
|
-
return;
|
|
25091
|
-
}
|
|
25092
|
-
if (this.state != ClientStreamState.Activated) {
|
|
25093
|
-
reject(new error_1.CrtError(`Event stream in a state (${this.state}) where sending messages is not allowed.`));
|
|
25094
|
-
return;
|
|
25095
|
-
}
|
|
25096
|
-
if (options.cancelController) {
|
|
25097
|
-
let cancel = /* @__PURE__ */ __name(() => {
|
|
25098
|
-
reject(new error_1.CrtError(`Event stream sendMessage() cancelled by external request.`));
|
|
25099
|
-
setImmediate(() => {
|
|
25100
|
-
this.close();
|
|
25101
|
-
});
|
|
25102
|
-
}, "cancel");
|
|
25103
|
-
cleanupCancelListener = options.cancelController.addListener(cancel);
|
|
25104
|
-
if (!cleanupCancelListener) {
|
|
25105
|
-
return;
|
|
25106
|
-
}
|
|
25107
|
-
}
|
|
25108
|
-
binding_1.default.event_stream_client_stream_send_message(this.native_handle(), options, curriedPromiseCallback);
|
|
25109
|
-
} catch (e) {
|
|
25110
|
-
reject(e);
|
|
25111
|
-
}
|
|
25112
|
-
});
|
|
25113
|
-
return promise.makeSelfCleaningPromise(sendMessagePromise, cleanupCancelListener);
|
|
25114
|
-
});
|
|
25115
|
-
}
|
|
25116
|
-
isActive() {
|
|
25117
|
-
return this.state == ClientStreamState.Activated;
|
|
25118
|
-
}
|
|
25119
|
-
on(event, listener) {
|
|
25120
|
-
super.on(event, listener);
|
|
25121
|
-
return this;
|
|
25122
|
-
}
|
|
25123
|
-
static _s_on_stream_activated(resolve, reject, stream, errorCode) {
|
|
25124
|
-
if (errorCode == 0 && stream.state == ClientStreamState.Activating) {
|
|
25125
|
-
stream.state = ClientStreamState.Activated;
|
|
25126
|
-
resolve();
|
|
25127
|
-
} else {
|
|
25128
|
-
if (stream.state != ClientStreamState.Closed) {
|
|
25129
|
-
stream.state = ClientStreamState.Ended;
|
|
25130
|
-
}
|
|
25131
|
-
reject(io.error_code_to_string(errorCode));
|
|
25132
|
-
}
|
|
25133
|
-
}
|
|
25134
|
-
static _s_on_stream_send_message_completion(resolve, reject, errorCode) {
|
|
25135
|
-
if (errorCode == 0) {
|
|
25136
|
-
resolve();
|
|
25137
|
-
} else {
|
|
25138
|
-
reject(io.error_code_to_string(errorCode));
|
|
25139
|
-
}
|
|
25140
|
-
}
|
|
25141
|
-
static _s_on_stream_ended(stream) {
|
|
25142
|
-
process.nextTick(() => {
|
|
25143
|
-
stream.emit(ClientStream.ENDED, {});
|
|
25144
|
-
});
|
|
25145
|
-
}
|
|
25146
|
-
static _s_on_stream_message(stream, message) {
|
|
25147
|
-
process.nextTick(() => {
|
|
25148
|
-
stream.emit(ClientStream.MESSAGE, { message: mapPodMessageToJSMessage(message) });
|
|
25149
|
-
});
|
|
25150
|
-
}
|
|
25151
|
-
};
|
|
25152
|
-
__name(ClientStream, "ClientStream");
|
|
25153
|
-
exports.ClientStream = ClientStream;
|
|
25154
|
-
ClientStream.ENDED = "ended";
|
|
25155
|
-
ClientStream.MESSAGE = "message";
|
|
25156
|
-
}
|
|
25157
|
-
});
|
|
25158
|
-
|
|
25159
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/common/http.js
|
|
25160
|
-
var require_http = __commonJS({
|
|
25161
|
-
"../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/common/http.js"(exports) {
|
|
25162
|
-
"use strict";
|
|
25163
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25164
|
-
exports.CommonHttpProxyOptions = exports.HttpProxyAuthenticationType = exports.HttpVersion = void 0;
|
|
25165
|
-
var HttpVersion;
|
|
25166
|
-
(function(HttpVersion2) {
|
|
25167
|
-
HttpVersion2[HttpVersion2["Unknown"] = 0] = "Unknown";
|
|
25168
|
-
HttpVersion2[HttpVersion2["Http1_0"] = 1] = "Http1_0";
|
|
25169
|
-
HttpVersion2[HttpVersion2["Http1_1"] = 2] = "Http1_1";
|
|
25170
|
-
HttpVersion2[HttpVersion2["Http2"] = 3] = "Http2";
|
|
25171
|
-
})(HttpVersion = exports.HttpVersion || (exports.HttpVersion = {}));
|
|
25172
|
-
var HttpProxyAuthenticationType;
|
|
25173
|
-
(function(HttpProxyAuthenticationType2) {
|
|
25174
|
-
HttpProxyAuthenticationType2[HttpProxyAuthenticationType2["None"] = 0] = "None";
|
|
25175
|
-
HttpProxyAuthenticationType2[HttpProxyAuthenticationType2["Basic"] = 1] = "Basic";
|
|
25176
|
-
})(HttpProxyAuthenticationType = exports.HttpProxyAuthenticationType || (exports.HttpProxyAuthenticationType = {}));
|
|
25177
|
-
var CommonHttpProxyOptions = class {
|
|
25178
|
-
constructor(host_name, port, auth_method = HttpProxyAuthenticationType.None, auth_username, auth_password) {
|
|
25179
|
-
this.host_name = host_name;
|
|
25180
|
-
this.port = port;
|
|
25181
|
-
this.auth_method = auth_method;
|
|
25182
|
-
this.auth_username = auth_username;
|
|
25183
|
-
this.auth_password = auth_password;
|
|
25184
|
-
}
|
|
25185
|
-
};
|
|
25186
|
-
__name(CommonHttpProxyOptions, "CommonHttpProxyOptions");
|
|
25187
|
-
exports.CommonHttpProxyOptions = CommonHttpProxyOptions;
|
|
25188
|
-
}
|
|
25189
|
-
});
|
|
25190
|
-
|
|
25191
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.15/node_modules/aws-crt/dist/native/http.js
|
|
24407
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/http.js
|
|
25192
24408
|
var require_http2 = __commonJS({
|
|
25193
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
24409
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/http.js"(exports) {
|
|
25194
24410
|
"use strict";
|
|
25195
24411
|
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
25196
24412
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -25258,9 +24474,6 @@ var require_http2 = __commonJS({
|
|
|
25258
24474
|
exports.HttpProxyOptions = HttpProxyOptions;
|
|
25259
24475
|
var HttpClientConnection = class extends HttpConnection {
|
|
25260
24476
|
constructor(bootstrap, host_name, port, socket_options, tls_opts, proxy_options, handle) {
|
|
25261
|
-
if (socket_options == null || socket_options == void 0) {
|
|
25262
|
-
throw new error_1.CrtError("HttpClientConnection constructor: socket_options not defined");
|
|
25263
|
-
}
|
|
25264
24477
|
super(handle ? handle : binding_1.default.http_connection_new(bootstrap != null ? bootstrap.native_handle() : null, (handle2, error_code) => {
|
|
25265
24478
|
this._on_setup(handle2, error_code);
|
|
25266
24479
|
}, (handle2, error_code) => {
|
|
@@ -25363,9 +24576,6 @@ var require_http2 = __commonJS({
|
|
|
25363
24576
|
HttpClientStream.HEADERS = "headers";
|
|
25364
24577
|
var HttpClientConnectionManager = class extends native_resource_1.NativeResource {
|
|
25365
24578
|
constructor(bootstrap, host, port, max_connections, initial_window_size, socket_options, tls_opts, proxy_options) {
|
|
25366
|
-
if (socket_options == null || socket_options == void 0) {
|
|
25367
|
-
throw new error_1.CrtError("HttpClientConnectionManager constructor: socket_options not defined");
|
|
25368
|
-
}
|
|
25369
24579
|
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));
|
|
25370
24580
|
this.bootstrap = bootstrap;
|
|
25371
24581
|
this.host = host;
|
|
@@ -25398,9 +24608,6 @@ var require_http2 = __commonJS({
|
|
|
25398
24608
|
});
|
|
25399
24609
|
}
|
|
25400
24610
|
release(connection) {
|
|
25401
|
-
if (connection == null || connection == void 0) {
|
|
25402
|
-
throw new error_1.CrtError("HttpClientConnectionManager release: connection not defined");
|
|
25403
|
-
}
|
|
25404
24611
|
binding_1.default.http_connection_manager_release(this.native_handle(), connection.native_handle());
|
|
25405
24612
|
}
|
|
25406
24613
|
close() {
|
|
@@ -25412,9 +24619,9 @@ var require_http2 = __commonJS({
|
|
|
25412
24619
|
}
|
|
25413
24620
|
});
|
|
25414
24621
|
|
|
25415
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
24622
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/mqtt.js
|
|
25416
24623
|
var require_mqtt = __commonJS({
|
|
25417
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
24624
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/mqtt.js"(exports) {
|
|
25418
24625
|
"use strict";
|
|
25419
24626
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25420
24627
|
exports.DEFAULT_RECONNECT_MIN_SEC = exports.DEFAULT_RECONNECT_MAX_SEC = exports.MqttWill = exports.QoS = void 0;
|
|
@@ -25439,9 +24646,9 @@ var require_mqtt = __commonJS({
|
|
|
25439
24646
|
}
|
|
25440
24647
|
});
|
|
25441
24648
|
|
|
25442
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
24649
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/aws_iot_shared.js
|
|
25443
24650
|
var require_aws_iot_shared = __commonJS({
|
|
25444
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
24651
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/aws_iot_shared.js"(exports) {
|
|
25445
24652
|
"use strict";
|
|
25446
24653
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
25447
24654
|
if (k2 === void 0)
|
|
@@ -25575,9 +24782,9 @@ var require_aws_iot_shared = __commonJS({
|
|
|
25575
24782
|
}
|
|
25576
24783
|
});
|
|
25577
24784
|
|
|
25578
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
24785
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/aws_iot.js
|
|
25579
24786
|
var require_aws_iot = __commonJS({
|
|
25580
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
24787
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/aws_iot.js"(exports) {
|
|
25581
24788
|
"use strict";
|
|
25582
24789
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
25583
24790
|
if (k2 === void 0)
|
|
@@ -25713,9 +24920,6 @@ var require_aws_iot = __commonJS({
|
|
|
25713
24920
|
}
|
|
25714
24921
|
static configure_websocket_handshake(builder, options) {
|
|
25715
24922
|
if (options) {
|
|
25716
|
-
if (builder == null || builder == void 0) {
|
|
25717
|
-
throw new error_1.CrtError("AwsIotMqttConnectionConfigBuilder configure_websocket_handshake: builder not defined");
|
|
25718
|
-
}
|
|
25719
24923
|
builder.params.websocket_handshake_transform = (request, done) => __awaiter2(this, void 0, void 0, function* () {
|
|
25720
24924
|
var _a, _b, _c;
|
|
25721
24925
|
const signing_config = (_b = (_a = options.create_signing_config) === null || _a === void 0 ? void 0 : _a.call(options)) !== null && _b !== void 0 ? _b : {
|
|
@@ -25756,9 +24960,6 @@ var require_aws_iot = __commonJS({
|
|
|
25756
24960
|
this.configure_websocket_handshake(builder, options);
|
|
25757
24961
|
return builder;
|
|
25758
24962
|
}
|
|
25759
|
-
static new_builder_for_websocket() {
|
|
25760
|
-
return this.new_with_websockets();
|
|
25761
|
-
}
|
|
25762
24963
|
with_certificate_authority_from_path(ca_dirpath, ca_filepath) {
|
|
25763
24964
|
this.tls_ctx_options.override_default_trust_store_from_path(ca_dirpath, ca_filepath);
|
|
25764
24965
|
return this;
|
|
@@ -25883,9 +25084,9 @@ var require_aws_iot = __commonJS({
|
|
|
25883
25084
|
}
|
|
25884
25085
|
});
|
|
25885
25086
|
|
|
25886
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
25087
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/mqtt_shared.js
|
|
25887
25088
|
var require_mqtt_shared = __commonJS({
|
|
25888
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
25089
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/mqtt_shared.js"(exports) {
|
|
25889
25090
|
"use strict";
|
|
25890
25091
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25891
25092
|
exports.DEFAULT_KEEP_ALIVE = exports.normalize_payload = void 0;
|
|
@@ -25917,9 +25118,9 @@ var require_mqtt_shared = __commonJS({
|
|
|
25917
25118
|
}
|
|
25918
25119
|
});
|
|
25919
25120
|
|
|
25920
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
25121
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/mqtt5.js
|
|
25921
25122
|
var require_mqtt5 = __commonJS({
|
|
25922
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
25123
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/mqtt5.js"(exports) {
|
|
25923
25124
|
"use strict";
|
|
25924
25125
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25925
25126
|
exports.RetryJitterType = exports.ClientSessionBehavior = void 0;
|
|
@@ -25940,9 +25141,9 @@ var require_mqtt5 = __commonJS({
|
|
|
25940
25141
|
}
|
|
25941
25142
|
});
|
|
25942
25143
|
|
|
25943
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
25144
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/mqtt5_packet.js
|
|
25944
25145
|
var require_mqtt5_packet = __commonJS({
|
|
25945
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
25146
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/common/mqtt5_packet.js"(exports) {
|
|
25946
25147
|
"use strict";
|
|
25947
25148
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25948
25149
|
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;
|
|
@@ -26103,9 +25304,9 @@ var require_mqtt5_packet = __commonJS({
|
|
|
26103
25304
|
}
|
|
26104
25305
|
});
|
|
26105
25306
|
|
|
26106
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
25307
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/mqtt5.js
|
|
26107
25308
|
var require_mqtt52 = __commonJS({
|
|
26108
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
25309
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/mqtt5.js"(exports) {
|
|
26109
25310
|
"use strict";
|
|
26110
25311
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
26111
25312
|
if (k2 === void 0)
|
|
@@ -26370,9 +25571,9 @@ var require_mqtt52 = __commonJS({
|
|
|
26370
25571
|
}
|
|
26371
25572
|
});
|
|
26372
25573
|
|
|
26373
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
25574
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/aws_iot_mqtt5.js
|
|
26374
25575
|
var require_aws_iot_mqtt5 = __commonJS({
|
|
26375
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
25576
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/aws_iot_mqtt5.js"(exports) {
|
|
26376
25577
|
"use strict";
|
|
26377
25578
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
26378
25579
|
if (k2 === void 0)
|
|
@@ -26616,9 +25817,9 @@ var require_aws_iot_mqtt5 = __commonJS({
|
|
|
26616
25817
|
}
|
|
26617
25818
|
});
|
|
26618
25819
|
|
|
26619
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
25820
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/iot.js
|
|
26620
25821
|
var require_iot = __commonJS({
|
|
26621
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
25822
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/iot.js"(exports) {
|
|
26622
25823
|
"use strict";
|
|
26623
25824
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
26624
25825
|
if (k2 === void 0)
|
|
@@ -26646,9 +25847,9 @@ var require_iot = __commonJS({
|
|
|
26646
25847
|
}
|
|
26647
25848
|
});
|
|
26648
25849
|
|
|
26649
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
25850
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/mqtt.js
|
|
26650
25851
|
var require_mqtt2 = __commonJS({
|
|
26651
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
25852
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/native/mqtt.js"(exports) {
|
|
26652
25853
|
"use strict";
|
|
26653
25854
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
26654
25855
|
if (k2 === void 0)
|
|
@@ -26752,9 +25953,6 @@ var require_mqtt2 = __commonJS({
|
|
|
26752
25953
|
super();
|
|
26753
25954
|
this.client = client;
|
|
26754
25955
|
this.config = config;
|
|
26755
|
-
if (config == null || config == void 0) {
|
|
26756
|
-
throw new error_1.CrtError("MqttClientConnection constructor: config not defined");
|
|
26757
|
-
}
|
|
26758
25956
|
const will = config.will ? {
|
|
26759
25957
|
topic: config.will.topic,
|
|
26760
25958
|
qos: config.will.qos,
|
|
@@ -26771,12 +25969,6 @@ var require_mqtt2 = __commonJS({
|
|
|
26771
25969
|
max_sec = config.reconnect_max_sec;
|
|
26772
25970
|
min_sec = Math.min(min_sec, max_sec);
|
|
26773
25971
|
}
|
|
26774
|
-
if (client == void 0 || client == null) {
|
|
26775
|
-
throw new error_1.CrtError("MqttClientConnection constructor: client not defined");
|
|
26776
|
-
}
|
|
26777
|
-
if (config.socket_options == void 0 || config.socket_options == null) {
|
|
26778
|
-
throw new error_1.CrtError("MqttClientConnection constructor: socket_options in configuration not defined");
|
|
26779
|
-
}
|
|
26780
25972
|
this._super(binding_1.default.mqtt_client_connection_new(client.native_handle(), (error_code) => {
|
|
26781
25973
|
this._on_connection_interrupted(error_code);
|
|
26782
25974
|
}, (return_code, session_present) => {
|
|
@@ -26803,9 +25995,6 @@ var require_mqtt2 = __commonJS({
|
|
|
26803
25995
|
return __awaiter2(this, void 0, void 0, function* () {
|
|
26804
25996
|
return new Promise((resolve, reject) => {
|
|
26805
25997
|
reject = this._reject(reject);
|
|
26806
|
-
if (this.config.socket_options == null || this.config.socket_options == void 0) {
|
|
26807
|
-
throw new error_1.CrtError("MqttClientConnection connect: socket_options in configuration not defined");
|
|
26808
|
-
}
|
|
26809
25998
|
try {
|
|
26810
25999
|
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));
|
|
26811
26000
|
} catch (e) {
|
|
@@ -26942,9 +26131,9 @@ var require_mqtt2 = __commonJS({
|
|
|
26942
26131
|
}
|
|
26943
26132
|
});
|
|
26944
26133
|
|
|
26945
|
-
// ../../node_modules/.pnpm/aws-crt@1.15.
|
|
26134
|
+
// ../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/index.js
|
|
26946
26135
|
var require_dist = __commonJS({
|
|
26947
|
-
"../../node_modules/.pnpm/aws-crt@1.15.
|
|
26136
|
+
"../../node_modules/.pnpm/aws-crt@1.15.9/node_modules/aws-crt/dist/index.js"(exports) {
|
|
26948
26137
|
"use strict";
|
|
26949
26138
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
26950
26139
|
if (k2 === void 0)
|
|
@@ -26979,13 +26168,9 @@ var require_dist = __commonJS({
|
|
|
26979
26168
|
return result;
|
|
26980
26169
|
};
|
|
26981
26170
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26982
|
-
exports.CrtError = exports.resource_safety = exports.
|
|
26983
|
-
var cancel = __importStar2(require_cancel());
|
|
26984
|
-
exports.cancel = cancel;
|
|
26171
|
+
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;
|
|
26985
26172
|
var platform = __importStar2(require_platform());
|
|
26986
26173
|
exports.platform = platform;
|
|
26987
|
-
var promise = __importStar2(require_promise());
|
|
26988
|
-
exports.promise = promise;
|
|
26989
26174
|
var resource_safety = __importStar2(require_resource_safety());
|
|
26990
26175
|
exports.resource_safety = resource_safety;
|
|
26991
26176
|
var auth = __importStar2(require_auth());
|
|
@@ -26996,8 +26181,6 @@ var require_dist = __commonJS({
|
|
|
26996
26181
|
exports.crt = crt;
|
|
26997
26182
|
var crypto4 = __importStar2(require_crypto());
|
|
26998
26183
|
exports.crypto = crypto4;
|
|
26999
|
-
var eventstream = __importStar2(require_eventstream());
|
|
27000
|
-
exports.eventstream = eventstream;
|
|
27001
26184
|
var http = __importStar2(require_http2());
|
|
27002
26185
|
exports.http = http;
|
|
27003
26186
|
var io = __importStar2(require_io2());
|