Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/sites/node_modules/@aws-sdk/eventstream-serde-node/dist-es/ drwxr-xr-x | |
| Viewing file: Select action/file-type: import { __awaiter, __generator } from "tslib";
import { EventStreamMarshaller as EventMarshaller } from "@aws-sdk/eventstream-marshaller";
import { EventStreamMarshaller as UniversalEventStreamMarshaller } from "@aws-sdk/eventstream-serde-universal";
import { Readable } from "stream";
import { readabletoIterable } from "./utils";
var EventStreamMarshaller = (function () {
function EventStreamMarshaller(_a) {
var utf8Encoder = _a.utf8Encoder, utf8Decoder = _a.utf8Decoder;
this.eventMarshaller = new EventMarshaller(utf8Encoder, utf8Decoder);
this.universalMarshaller = new UniversalEventStreamMarshaller({
utf8Decoder: utf8Decoder,
utf8Encoder: utf8Encoder,
});
}
EventStreamMarshaller.prototype.deserialize = function (body, deserializer) {
var bodyIterable = typeof body[Symbol.asyncIterator] === "function" ? body : readabletoIterable(body);
return this.universalMarshaller.deserialize(bodyIterable, deserializer);
};
EventStreamMarshaller.prototype.serialize = function (input, serializer) {
var serializedIterable = this.universalMarshaller.serialize(input, serializer);
if (typeof Readable.from === "function") {
return Readable.from(serializedIterable);
}
else {
var iterator_1 = serializedIterable[Symbol.asyncIterator]();
var serializedStream_1 = new Readable({
autoDestroy: true,
objectMode: true,
read: function () {
return __awaiter(this, void 0, void 0, function () {
var _this = this;
return __generator(this, function (_a) {
iterator_1
.next()
.then(function (_a) {
var done = _a.done, value = _a.value;
if (done) {
_this.push(null);
}
else {
_this.push(value);
}
})
.catch(function (err) {
_this.destroy(err);
});
return [2];
});
});
},
});
serializedStream_1.on("error", function () {
serializedStream_1.destroy();
});
serializedStream_1.on("end", function () {
serializedStream_1.destroy();
});
return serializedStream_1;
}
};
return EventStreamMarshaller;
}());
export { EventStreamMarshaller };
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0062 ]-- |