Skip to content

Commit

Permalink
feat: some icons and colors (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
eladcon authored May 29, 2024
1 parent 58b6dea commit e6f4f52
Show file tree
Hide file tree
Showing 28 changed files with 67 additions and 28 deletions.
3 changes: 3 additions & 0 deletions budget/budget.w
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ pub class Alert {
} else {
throw "unknown platform";
}

nodeof(this).icon = "bell";
nodeof(this).color = "red";
}
}
4 changes: 2 additions & 2 deletions budget/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion budget/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@winglibs/budget",
"version": "0.1.2",
"version": "0.1.3",
"description": "AWS Budget",
"keywords": [
"AWS",
Expand Down
3 changes: 3 additions & 0 deletions checks/check.w
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ pub class Check impl ICheck {
}

this.invoker = new cloud.Function(wrapper) as "run";

nodeof(this).icon = "shield-check";
nodeof(this).color = "amber";
}

/**
Expand Down
4 changes: 2 additions & 2 deletions checks/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion checks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@winglibs/checks",
"version": "0.0.10",
"version": "0.0.11",
"description": "Cloud checks",
"publishConfig": {
"access": "public",
Expand Down
3 changes: 3 additions & 0 deletions cognito/lib.w
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ pub class Cognito impl types.ICognito {
} else {
throw "Unsupported target {target}";
}

nodeof(this).icon = "lock-closed";
nodeof(this).color = "emerald";
}

pub get(path: str) {
Expand Down
4 changes: 2 additions & 2 deletions cognito/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cognito/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@winglibs/cognito",
"version": "0.0.9",
"version": "0.0.10",
"description": "A wing library to work with AWS Cognito",
"author": {
"name": "Elad Cohen",
Expand Down
3 changes: 3 additions & 0 deletions dynamodb/dynamodb.w
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ pub class Table impl dynamodb_types.ITable {
return "{adminEndpoint}/tables/{this.tableName}";
}, link: true) as "Admin";
}

nodeof(this).icon = "table-cells";
nodeof(this).color = "sky";
}

pub setStreamConsumer(handler: inflight (dynamodb_types.StreamRecord): void, opts: dynamodb_types.StreamConsumerOptions?) {
Expand Down
4 changes: 2 additions & 2 deletions dynamodb/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dynamodb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@winglibs/dynamodb",
"version": "0.1.10",
"version": "0.1.11",
"description": "DynamoDB library for Wing",
"author": {
"name": "Cristian Pallarés",
Expand Down
3 changes: 3 additions & 0 deletions eventbridge/lib.w
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ pub class Bus impl types.IBus {
} else {
throw "Unsupported target {target}";
}

nodeof(this).icon = "signal";
nodeof(this).color = "red";
}

pub inflight putEvents(...events: Array<types.PublishEvent>): void {
Expand Down
4 changes: 2 additions & 2 deletions eventbridge/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion eventbridge/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@winglibs/eventbridge",
"description": "Amazon EventBridge library for Wing",
"version": "0.1.2",
"version": "0.1.3",
"repository": {
"type": "git",
"url": "https://github.com/winglang/winglibs.git",
Expand Down
3 changes: 3 additions & 0 deletions fifoqueue/fifo-queue.w
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ pub class FifoQueue impl api.IFifoQueue {
} else {
throw "Unsupported target {target}";
}

nodeof(this).icon = "queue-list";
nodeof(this).color = "violet";
}

pub setConsumer(fn: inflight (str): void, options: api.SetConsumerOptions?) {
Expand Down
4 changes: 2 additions & 2 deletions fifoqueue/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion fifoqueue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@winglibs/fifoqueue",
"version": "0.0.6",
"version": "0.0.7",
"description": "A wing library to work with FIFO (first-in first-out) Queues",
"author": {
"name": "Elad Cohen",
Expand Down
3 changes: 3 additions & 0 deletions lock/lib.w
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ pub class Lock {
counter: cloud.Counter;
new() {
this.counter = new cloud.Counter();

nodeof(this).icon = "lock-open";
nodeof(this).color = "orange";
}

/**
Expand Down
4 changes: 2 additions & 2 deletions lock/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lock/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@winglibs/lock",
"description": "A Wing library for cloud Lock",
"version": "0.0.3",
"version": "0.0.4",
"author": {
"name": "Eyal Keren",
"email": "[email protected]"
Expand Down
3 changes: 3 additions & 0 deletions postgres/lib.w
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ pub class Database {
} else {
throw "Unsupported target: " + target;
}

nodeof(this).icon = "table-cells";
nodeof(this).color = "purple";
}

pub inflight query(query: str): Array<Map<Json>> {
Expand Down
4 changes: 2 additions & 2 deletions postgres/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion postgres/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@winglibs/postgres",
"version": "0.1.6",
"version": "0.1.7",
"description": "Postgres support for Wing",
"repository": {
"type": "git",
Expand Down
15 changes: 15 additions & 0 deletions python/lib.w
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ pub class InflightFunction impl cloud.IFunctionHandler {
} else {
throw "Unsupported target ${target}";
}

nodeof(this).icon = "bolt";
nodeof(this).color = "lime";
}

pub inflight handle(event: str?): str? {
Expand Down Expand Up @@ -49,6 +52,9 @@ pub class InflightQueueConsumer impl cloud.IQueueSetConsumerHandler {
} else {
throw "Unsupported target ${target}";
}

nodeof(this).icon = "bolt";
nodeof(this).color = "lime";
}

pub inflight handle(message: str): void {
Expand Down Expand Up @@ -76,6 +82,9 @@ pub class InflightTopicOnMessage impl cloud.ITopicOnMessageHandler {
} else {
throw "Unsupported target ${target}";
}

nodeof(this).icon = "bolt";
nodeof(this).color = "lime";
}

pub inflight handle(message: str): void {
Expand Down Expand Up @@ -103,6 +112,9 @@ pub class InflightBucketEvent impl cloud.IBucketEventHandler {
} else {
throw "Unsupported target ${target}";
}

nodeof(this).icon = "bolt";
nodeof(this).color = "lime";
}

pub inflight handle(message: str, type: cloud.BucketEventType): void {
Expand Down Expand Up @@ -130,6 +142,9 @@ pub class InflightApiEndpointHandler impl cloud.IApiEndpointHandler {
} else {
throw "Unsupported target ${target}";
}

nodeof(this).icon = "bolt";
nodeof(this).color = "lime";
}

pub inflight handle(req: cloud.ApiRequest): cloud.ApiResponse? {
Expand Down
4 changes: 2 additions & 2 deletions python/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion python/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@winglibs/python",
"description": "python library for Wing",
"version": "0.0.4",
"version": "0.0.5",
"repository": {
"type": "git",
"url": "https://github.com/winglang/winglibs.git",
Expand Down
2 changes: 1 addition & 1 deletion python/util.extern.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class Node {
readonly setContext: (key: string, value?: any) => void;
/** Return a direct child by id, or undefined.
@returns the child if found, or undefined */
readonly tryFindChild: (id: string) => (IConstruct) | undefined;
readonly tryFindChild: (id: string) => IConstruct | void;
/** Retrieves a value from tree context.
Context is usually initialized at the root, but can be overridden at any point in the tree.
@returns The context value or `undefined` if there is no context value for this key. */
Expand Down

0 comments on commit e6f4f52

Please sign in to comment.