@@ -14,7 +14,9 @@ const {
14
14
} = require("./code-gen-dir");
15
15
const { prettifyCode } = require("./code-prettify");
16
16
const { eslintFixCode } = require("./code-eslint-fix");
17
+ const { buildSmithyTypeScript } = require("./build-smithy-typescript");
17
18
19
+ const SMITHY_TS_DIR = path.normalize(path.join(__dirname, "..", "..", "..", "smithy-typescript"));
18
20
const SDK_CLIENTS_DIR = path.normalize(path.join(__dirname, "..", "..", "clients"));
19
21
const PRIVATE_CLIENTS_DIR = path.normalize(path.join(__dirname, "..", "..", "private"));
20
22
@@ -26,6 +28,8 @@ const {
26
28
s: serverOnly,
27
29
batchSize,
28
30
keepFiles,
31
+ repo,
32
+ commit,
29
33
} = yargs(process.argv.slice(2))
30
34
.alias("m", "models")
31
35
.string("m")
@@ -51,11 +55,20 @@ const {
51
55
.number("b")
52
56
.alias("b", "batch-size")
53
57
.default("b", 50)
58
+ .describe("r", "The location where smithy-typescript is cloned.")
59
+ .string("r")
60
+ .alias("r", "repo")
61
+ .default("r", SMITHY_TS_DIR)
62
+ .describe("c", "The smithy-typescript commit to be used for codegen.")
63
+ .string("c")
64
+ .alias("c", "commit")
65
+ .default("c", "HEAD") // ToDo: Change to a specific commit once CI is updated.
54
66
.help().argv;
55
67
56
68
(async () => {
57
69
try {
58
- require('../runtime-dependency-version-check/runtime-dep-version-check');
70
+ require("../runtime-dependency-version-check/runtime-dep-version-check");
71
+ await buildSmithyTypeScript(repo, commit);
59
72
60
73
if (serverOnly === true) {
61
74
await generateProtocolTests();
0 commit comments