UNPKG

1.41 kBPlain TextView Raw
1import {writeFileSync} from 'fs';
2import {resolve} from 'path';
3
4const clients = require('../clients/all');
5const metadata = require('../apis/metadata');
6const api_loader = require('../lib/api_loader');
7
8writeFileSync(
9 resolve(__dirname, '..', 'SERVICES.md'),
10 Object.keys(clients).reduce((serviceTable, clientId): string => {
11 const cid = clientId.toLowerCase();
12 return serviceTable + Object.keys(api_loader.services[cid]).reverse()
13 .map((version: string): string => {
14 const model = api_loader(cid, version);
15 return `${model.metadata.serviceFullName} | AWS.${clientId} | ${version} | ${metadata[cid].cors === true ? ':tada:' : ''} |`;
16 }).join("\n") + "\n";
17 }, `The SDK currently supports the following services:
18
19<p class="note"><strong>Note</strong>:
20Although all services are supported in the browser version of the SDK,
21not all of the services are available in the default hosted build (using the
22script tag provided above). Instructions on how to build a
23custom version of the SDK with individual services are provided
24in 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.
25</p>
26
27Service Name | Class Name | API Version | Allows CORS |
28------------ | ---------- | ----------- | ----------- |
29`));