Skip to content

Commit

Permalink
feat(sdk)!: sunset ex.DynamodbTable (#6038)
Browse files Browse the repository at this point in the history
The Wing library ecosystem is steadily growing, and we now have a dedicated [winglib](https://github.com/winglang/winglibs) for DynamoDB, which you can use with:

```
bring dynamodb;
```

It supports both the `sim` and `tf-aws` targets, and includes newly added support for DynamoDB streams. To lighten our maintenance load (and build times), this PR removes the built-in `ex.DynamodbTable` class from the core Wing SDK.

If you have any troubles with the new dedicated winglib, please let us know by opening an issue or sending a message on the Wing slack - we're happy to help.

BREAKING CHANGE: `ex.DynamodbTable` and related types have been removed from the built-in SDK. We recommend using the dedicated [dynamodb winglib](https://www.npmjs.com/package/@winglibs/dynamodb) instead.

## Checklist

- [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted)
- [x] Description explains motivation and solution
- [x] Tests added (always)
- [x] Docs updated (only required for features)
- [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
  • Loading branch information
Chriscbr authored Mar 22, 2024
1 parent 55c0ea5 commit f113593
Show file tree
Hide file tree
Showing 72 changed files with 12 additions and 8,402 deletions.
36 changes: 0 additions & 36 deletions apps/wing-console/console/app/test/ex.dynamodb-table/index.test.ts

This file was deleted.

7 changes: 0 additions & 7 deletions apps/wing-console/console/app/test/ex.dynamodb-table/main.w

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import {
KeyIcon as SolidKeyIcon,
} from "@heroicons/react/24/solid";

import { DynamoDBIcon } from "../icons/dynamodb-icon.js";
import { ReactIcon } from "../icons/react-icon.js";
import { RedisIcon } from "../icons/redis-icon.js";

Expand Down Expand Up @@ -86,9 +85,6 @@ export const getResourceIconComponent = (
case "@winglang/sdk.cloud.Secret": {
return solid ? SolidKeyIcon : KeyIcon;
}
case "@winglang/sdk.ex.DynamodbTable": {
return DynamoDBIcon;
}
default: {
return CubeIcon;
}
Expand Down
117 changes: 0 additions & 117 deletions apps/wing-console/console/server/src/router/dynamodb-table.ts

This file was deleted.

2 changes: 0 additions & 2 deletions apps/wing-console/console/server/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { createAppRouter } from "./app.js";
import { createBucketRouter } from "./bucket.js";
import { createConfigRouter } from "./config.js";
import { createCounterRouter } from "./counter.js";
import { createDynamodbTableRouter } from "./dynamodb-table.js";
import { createEndpointRouter } from "./endpoint.js";
import { createFunctionRouter } from "./function.js";
import { createQueueRouter } from "./queue.js";
Expand Down Expand Up @@ -35,7 +34,6 @@ export const mergeAllRouters = () => {
createWebsiteRouter(),
createReactAppRouter(),
createConfigRouter(),
createDynamodbTableRouter(),
createEndpointRouter(),
);

Expand Down
7 changes: 1 addition & 6 deletions apps/wing-console/console/server/src/wingsdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,10 @@ export type {

export type { ITestRunnerClient } from "@winglang/sdk/lib/std/index.js";

export type {
IRedisClient,
ITableClient,
IDynamodbTableClient,
} from "@winglang/sdk/lib/ex/index.js";
export type { IRedisClient, ITableClient } from "@winglang/sdk/lib/ex/index.js";

export type {
ApiSchema,
DynamodbTableSchema,
TableSchema,
WebsiteSchema,
} from "@winglang/sdk/lib/target-sim/schema-resources.js";

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { memo, useCallback } from "react";
import { ApiInteractionView } from "./api-interaction-view.js";
import { BucketInteractionView } from "./bucket-interaction-view.js";
import { CounterInteractionView } from "./counter-interaction-view.js";
import { DynamodbTableInteractionView } from "./dynamodb-table-interaction-view.js";
import { EndpointInteractionView } from "./endpoint-interaction-view.js";
import { FunctionInteractionView } from "./function-interaction-view.js";
import { QueueInteractionView } from "./queue-interaction-view.js";
Expand Down Expand Up @@ -57,9 +56,6 @@ export const ResourceInteractionView = memo(
case "@winglang/sdk.cloud.Website": {
return <WebsiteInteractionView resourcePath={resourcePath} />;
}
case "@winglang/sdk.ex.DynamodbTable": {
return <DynamodbTableInteractionView resourcePath={resourcePath} />;
}
case "@winglang/sdk.cloud.Endpoint": {
return <EndpointInteractionView resourcePath={resourcePath} />;
}
Expand Down
Loading

0 comments on commit f113593

Please sign in to comment.