I'm looking at code which is generated with the AWS-SDK Javascript builder
I've generated a minimal set, which only includes AWS.Kinesis and AWS.KinesisAnalytics
I'm trying to make some sense of the code it generates, see snippet below:
_xamzrequire = function e(t, n, r) {
function s(o, u) {
if (!n[o]) {
if (!t[o]) {
var a = typeof _xamzrequire == "function" && _xamzrequire;
if (!u && a) return a(o, !0);
if (i) return i(o, !0);
var f = new Error("Cannot find module '" + o + "'");
throw f.code = "MODULE_NOT_FOUND", f;
}
var l = n[o] = {
exports: {}
};
t[o][0].call(l.exports, function(e) {
var n = t[o][1][e];
return s(n ? n : e);
}, l, l.exports, e, t, n, r);
}
return n[o].exports;
}
var i = typeof _xamzrequire == "function" && _xamzrequire;
for (var o = 0; o < r.length; o++) s(r[o]);
return s;
}({
98: [ function(require, module, exports) {
var AWS = {
util: require("./util")
};
var _hidden = {};
_hidden.toString();
module.exports = AWS;
AWS.util.update(AWS, {
VERSION: "2.6.3",
Signers: {},
Protocol: {
Json: require("./protocol/json"),
Query: require("./protocol/query"),
Rest: require("./protocol/rest"),
RestJson: require("./protocol/rest_json"),
RestXml: require("./protocol/rest_xml")
},
XML: {
Builder: require("./xml/builder"),
Parser: null
},
What I don't understand, where does this code find it's includeds, e.g:
Json: require("./protocol/json")
,
The AWS-SDK Javascript builder generates just one file, so how can it include for example ./protocol/json
, where / how can it find this file??