-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add Command ClassBuilder * fix: add dependency check script * add changeset * rename script file * fix yarn lock
- Loading branch information
Showing
9 changed files
with
340 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@smithy/smithy-client": minor | ||
--- | ||
|
||
add Command classBuilder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@smithy/experimental-identity-and-auth": patch | ||
"@smithy/smithy-client": patch | ||
--- | ||
|
||
add missing dependency declarations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { Command } from "./command"; | ||
|
||
describe(Command.name, () => { | ||
it("implements a classBuilder", async () => { | ||
class MyCommand extends Command.classBuilder<any, any, any, any, any>() | ||
.ep({ | ||
Endpoint: { type: "builtInParams", name: "Endpoint" }, | ||
}) | ||
.m(function () { | ||
return []; | ||
}) | ||
.s("SmithyMyClient", "SmithyMyOperation", {}) | ||
.n("MyClient", "MyCommand") | ||
.f() | ||
.ser(async (_) => _) | ||
.de(async (_) => _) | ||
.build() {} | ||
|
||
const myCommand = new MyCommand({ | ||
Prop: "prop1", | ||
}); | ||
|
||
expect(myCommand).toBeInstanceOf(Command); | ||
expect(myCommand).toBeInstanceOf(MyCommand); | ||
expect(MyCommand.getEndpointParameterInstructions()).toEqual({ | ||
Endpoint: { type: "builtInParams", name: "Endpoint" }, | ||
}); | ||
expect(myCommand.input).toEqual({ | ||
Prop: "prop1", | ||
}); | ||
|
||
// private method exists for compatibility | ||
expect((myCommand as any).serialize).toBeDefined(); | ||
|
||
// private method exists for compatibility | ||
expect((myCommand as any).deserialize).toBeDefined(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.