Skip to content

Commit dc62c96

Browse files
committed
chore: optimize plugin icon
1 parent 00c5d41 commit dc62c96

File tree

18 files changed

+313
-140
lines changed

18 files changed

+313
-140
lines changed

server/node-service/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"jest": "^29.3.1",
1818
"nock": "^13.3.0",
1919
"nodemon": "^2.0.20",
20+
"svgo": "^3.0.2",
2021
"ts-jest": "^29.0.3",
2122
"ts-node": "^10.9.1"
2223
},

server/node-service/src/controllers/plugins.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export async function listPlugins(req: Request, res: Response) {
1111
}
1212
const ctx = pluginServices.getPluginContext(req);
1313
const result = pluginServices.listPlugins(ctx, ids as string[]);
14-
console.info("plugins: ", result);
1514
return res.status(200).json(result);
1615
}
1716

server/node-service/src/plugins/googleCloudStorage/run.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ export default async function run(action: ActionDataType, dataSourceConfig: Data
6868
}
6969
files.push({
7070
name: i.name,
71-
size: i.metadata,
72-
lastModified: "",
71+
size: i.metadata.size,
72+
lastModified: i.metadata.updated,
7373
signedUrl,
7474
url: i.publicUrl(),
7575
});
@@ -80,10 +80,12 @@ export default async function run(action: ActionDataType, dataSourceConfig: Data
8080
// read
8181
if (action.actionName === "readFile") {
8282
const encoding = (action.encoding || "base64") as BufferEncoding;
83-
const [buffer] = await client.bucket(bucket).file(action.fileName).download();
83+
const [file] = await client.bucket(bucket).file(action.fileName).get();
84+
const [buffer] = await file.download();
8485
const data = buffer.toString(encoding);
8586
return {
8687
data,
88+
contentType: file.metadata.contentType,
8789
};
8890
}
8991

server/node-service/src/plugins/woocommerce/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const parseOptions: ParseOpenApiOptions = {
6262
const wooCommercePlugin: DataSourcePlugin<any, DataSourceConfigType> = {
6363
id: "woocommerce",
6464
name: "WooCommerce",
65-
icon: "woocommerce.png",
65+
icon: "woocommerce.svg",
6666
category: "api",
6767
dataSourceConfig,
6868
queryConfig: async () => {
Lines changed: 23 additions & 19 deletions
Loading
Lines changed: 3 additions & 1 deletion
Loading
Lines changed: 13 additions & 1 deletion
Loading
Lines changed: 6 additions & 1 deletion
Loading
Lines changed: 19 additions & 0 deletions
Loading
Lines changed: 16 additions & 47 deletions
Loading

0 commit comments

Comments
 (0)