1 | import {writeFileSync} from 'fs';
|
2 | import {resolve} from 'path';
|
3 |
|
4 | const clients = require('../clients/all');
|
5 | const metadata = require('../apis/metadata');
|
6 | const api_loader = require('../lib/api_loader');
|
7 |
|
8 | writeFileSync(
|
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>:
|
20 | Although all services are supported in the browser version of the SDK,
|
21 | not all of the services are available in the default hosted build (using the
|
22 | script tag provided above). Instructions on how to build a
|
23 | custom version of the SDK with individual services are provided
|
24 | in 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 |
|
27 | Service Name | Class Name | API Version | Allows CORS |
|
28 | ------------ | ---------- | ----------- | ----------- |
|
29 | `));
|