sst 3.12.5 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/opencontrol.d.ts +2 -14
- package/dist/opencontrol.js +26 -18
- package/package.json +6 -6
package/dist/opencontrol.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ import { z } from "zod";
|
|
|
20
20
|
* });
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
export declare const tools:
|
|
23
|
+
export declare const tools: import("opencontrol/tool").Tool<z.ZodObject<{
|
|
24
24
|
service: z.ZodString;
|
|
25
25
|
method: z.ZodString;
|
|
26
26
|
params: z.ZodString;
|
|
@@ -32,16 +32,4 @@ export declare const tools: (import("opencontrol/tool").Tool<z.ZodObject<{
|
|
|
32
32
|
method: string;
|
|
33
33
|
params: string;
|
|
34
34
|
service: string;
|
|
35
|
-
}>>
|
|
36
|
-
client: z.ZodString;
|
|
37
|
-
command: z.ZodString;
|
|
38
|
-
args: z.ZodArray<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>, "many">;
|
|
39
|
-
}, "strip", z.ZodTypeAny, {
|
|
40
|
-
client: string;
|
|
41
|
-
command: string;
|
|
42
|
-
args: (Record<string, any> | undefined)[];
|
|
43
|
-
}, {
|
|
44
|
-
client: string;
|
|
45
|
-
command: string;
|
|
46
|
-
args: (Record<string, any> | undefined)[];
|
|
47
|
-
}>>)[];
|
|
35
|
+
}>>[];
|
package/dist/opencontrol.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { tool } from "opencontrol/tool";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import AWS from "aws-sdk";
|
|
4
3
|
/**
|
|
5
4
|
* A list of OpenControl tools provided by SST. Currently, it includes tools that
|
|
6
5
|
* can:
|
|
@@ -121,23 +120,32 @@ export const tools = [
|
|
|
121
120
|
return await instance[input.method](JSON.parse(input.params)).promise();
|
|
122
121
|
},
|
|
123
122
|
}),
|
|
123
|
+
/*
|
|
124
124
|
tool({
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
125
|
+
name: "aws_batch",
|
|
126
|
+
description:
|
|
127
|
+
"Make multiple calls to the AWS SDK for JavaScript v2 with the same command but different arguments. This tools takes an array of arguments, and will call the command with each argument in the array in parallel. Use this over the aws tool when you need to call the same command multiple times with different arguments.",
|
|
128
|
+
args: z.object({
|
|
129
|
+
client: z.string().describe("Class name of the client to use"),
|
|
130
|
+
command: z.string().describe("Command to call on the client"),
|
|
131
|
+
args: z
|
|
132
|
+
.array(
|
|
133
|
+
z
|
|
134
|
+
.record(z.string(), z.any())
|
|
135
|
+
.optional()
|
|
136
|
+
.describe("Arguments to pass to the command"),
|
|
137
|
+
)
|
|
138
|
+
.describe(
|
|
139
|
+
"An array of arguments. Each argument will be passed to the command in parallel.",
|
|
140
|
+
),
|
|
141
|
+
}),
|
|
142
|
+
async run(input) {
|
|
143
|
+
// @ts-ignore
|
|
144
|
+
const client = new AWS[input.client]();
|
|
145
|
+
return await Promise.all(
|
|
146
|
+
input.args.map((arg: any) => client[input.command](arg).promise()),
|
|
147
|
+
);
|
|
148
|
+
},
|
|
142
149
|
}),
|
|
150
|
+
*/
|
|
143
151
|
];
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "sst",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.13.0",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"sst": "./bin/sst.mjs"
|
|
42
42
|
},
|
|
43
43
|
"optionalDependencies": {
|
|
44
|
-
"sst-linux-x64": "3.
|
|
45
|
-
"sst-linux-x86": "3.
|
|
46
|
-
"sst-
|
|
47
|
-
"sst-
|
|
48
|
-
"sst-darwin-arm64": "3.
|
|
44
|
+
"sst-linux-x64": "3.13.0",
|
|
45
|
+
"sst-linux-x86": "3.13.0",
|
|
46
|
+
"sst-linux-arm64": "3.13.0",
|
|
47
|
+
"sst-darwin-x64": "3.13.0",
|
|
48
|
+
"sst-darwin-arm64": "3.13.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"aws-sdk": "2.1692.0",
|