UNPKG

1.39 kBJavaScriptView Raw
1"use strict";
2var fs_1 = require("fs");
3var path_1 = require("path");
4var clients = require('../clients/all');
5var metadata = require('../apis/metadata');
6var api_loader = require('../lib/api_loader');
7fs_1.writeFileSync(path_1.resolve(__dirname, '..', 'SERVICES.md'), Object.keys(clients).reduce(function (serviceTable, clientId) {
8 var cid = clientId.toLowerCase();
9 return serviceTable + Object.keys(api_loader.services[cid]).reverse()
10 .map(function (version) {
11 var model = api_loader(cid, version);
12 return model.metadata.serviceFullName + " | AWS." + clientId + " | " + version + " | " + (metadata[cid].cors === true ? ':tada:' : '') + " |";
13 }).join("\n") + "\n";
14}, "The SDK currently supports the following services:\n\n<p class=\"note\"><strong>Note</strong>:\nAlthough all services are supported in the browser version of the SDK,\nnot all of the services are available in the default hosted build (using the\nscript tag provided above). Instructions on how to build a\ncustom version of the SDK with individual services are provided\nin the \"<a href=\"http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/building-sdk-for-browsers.html\">Building the SDK for Browsers</a>\" section of the SDK Developer Guide.\n</p>\n\nService Name | Class Name | API Version | Allows CORS |\n------------ | ---------- | ----------- | ----------- |\n"));