💾 Archived View for gmi.noulin.net › gitRepositories › git-off › file › src › node_modules › aws-sdk… captured on 2024-09-29 at 00:43:58. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
core.js (2534B)
1 /** 2 * The main AWS namespace 3 */ 4 var AWS = { util: require('./util') }; 5 6 /** 7 * @api private 8 * @!macro [new] nobrowser 9 * @note This feature is not supported in the browser environment of the SDK. 10 */ 11 var _hidden = {}; _hidden.toString(); // hack to parse macro 12 13 module.exports = AWS; 14 15 AWS.util.update(AWS, { 16 17 /** 18 * @constant 19 */ 20 VERSION: '2.7.7', 21 22 /** 23 * @api private 24 */ 25 Signers: {}, 26 27 /** 28 * @api private 29 */ 30 Protocol: { 31 Json: require('./protocol/json'), 32 Query: require('./protocol/query'), 33 Rest: require('./protocol/rest'), 34 RestJson: require('./protocol/rest_json'), 35 RestXml: require('./protocol/rest_xml') 36 }, 37 38 /** 39 * @api private 40 */ 41 XML: { 42 Builder: require('./xml/builder'), 43 Parser: null // conditionally set based on environment 44 }, 45 46 /** 47 * @api private 48 */ 49 JSON: { 50 Builder: require('./json/builder'), 51 Parser: require('./json/parser') 52 }, 53 54 /** 55 * @api private 56 */ 57 Model: { 58 Api: require('./model/api'), 59 Operation: require('./model/operation'), 60 Shape: require('./model/shape'), 61 Paginator: require('./model/paginator'), 62 ResourceWaiter: require('./model/resource_waiter') 63 }, 64 65 util: require('./util'), 66 67 /** 68 * @api private 69 */ 70 apiLoader: function() { throw new Error('No API loader set'); } 71 }); 72 73 require('./service'); 74 75 require('./credentials'); 76 require('./credentials/credential_provider_chain'); 77 require('./credentials/temporary_credentials'); 78 require('./credentials/web_identity_credentials'); 79 require('./credentials/cognito_identity_credentials'); 80 require('./credentials/saml_credentials'); 81 82 require('./config'); 83 require('./http'); 84 require('./sequential_executor'); 85 require('./event_listeners'); 86 require('./request'); 87 require('./response'); 88 require('./resource_waiter'); 89 require('./signers/request_signer'); 90 require('./param_validator'); 91 92 /** 93 * @readonly 94 * @return [AWS.SequentialExecutor] a collection of global event listeners that 95 * are attached to every sent request. 96 * @see AWS.Request AWS.Request for a list of events to listen for 97 * @example Logging the time taken to send a request 98 * AWS.events.on('send', function startSend(resp) { 99 * resp.startTime = new Date().getTime(); 100 * }).on('complete', function calculateTime(resp) { 101 * var time = (new Date().getTime() - resp.startTime) / 1000; 102 * console.log('Request took ' + time + ' seconds'); 103 * }); 104 * 105 * new AWS.S3().listBuckets(); // prints 'Request took 0.285 seconds' 106 */ 107 AWS.events = new AWS.SequentialExecutor();