@frogbotai/piece-math-helper 0.26.0 → 0.28.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/actions/addNumbers.d.ts +3 -14
- package/dist/actions/addNumbers.d.ts.map +1 -1
- package/dist/actions/addNumbers.js +3 -2
- package/dist/actions/addNumbers.js.map +1 -1
- package/dist/actions/divideNumbers.d.ts +3 -14
- package/dist/actions/divideNumbers.d.ts.map +1 -1
- package/dist/actions/divideNumbers.js +3 -2
- package/dist/actions/divideNumbers.js.map +1 -1
- package/dist/actions/generateRandomNumber.d.ts +3 -14
- package/dist/actions/generateRandomNumber.d.ts.map +1 -1
- package/dist/actions/generateRandomNumber.js +3 -2
- package/dist/actions/generateRandomNumber.js.map +1 -1
- package/dist/actions/getRemainder.d.ts +3 -14
- package/dist/actions/getRemainder.d.ts.map +1 -1
- package/dist/actions/getRemainder.js +3 -2
- package/dist/actions/getRemainder.js.map +1 -1
- package/dist/actions/multiplyNumbers.d.ts +3 -14
- package/dist/actions/multiplyNumbers.d.ts.map +1 -1
- package/dist/actions/multiplyNumbers.js +3 -2
- package/dist/actions/multiplyNumbers.js.map +1 -1
- package/dist/actions/subtractNumbers.d.ts +3 -14
- package/dist/actions/subtractNumbers.d.ts.map +1 -1
- package/dist/actions/subtractNumbers.js +3 -2
- package/dist/actions/subtractNumbers.js.map +1 -1
- package/dist/define.d.ts +6 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/define.js +3 -0
- package/dist/define.js.map +1 -0
- package/dist/index.d.ts +30 -78
- package/dist/index.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import { type PieceRunArgs } from 'frogbot/pieces';
|
|
2
1
|
import { z } from 'zod';
|
|
3
|
-
declare const
|
|
2
|
+
export declare const addNumbers: import("frogbot/pieces").PieceActionDefinition<z.ZodObject<{
|
|
4
3
|
firstNumber: z.ZodNumber;
|
|
5
4
|
secondNumber: z.ZodNumber;
|
|
6
|
-
}, z.core.$strip
|
|
7
|
-
|
|
8
|
-
slug: string;
|
|
9
|
-
label: string;
|
|
10
|
-
description: string;
|
|
11
|
-
input: z.ZodObject<{
|
|
12
|
-
firstNumber: z.ZodNumber;
|
|
13
|
-
secondNumber: z.ZodNumber;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
output: z.ZodNumber;
|
|
16
|
-
run({ input }: PieceRunArgs<z.output<typeof inputSchema>, object, undefined>): Promise<number>;
|
|
5
|
+
}, z.core.$strip>, z.ZodNumber, Record<string, never>, undefined, number> & {
|
|
6
|
+
slug: "addNumbers";
|
|
17
7
|
};
|
|
18
|
-
export {};
|
|
19
8
|
//# sourceMappingURL=addNumbers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addNumbers.d.ts","sourceRoot":"","sources":["../../src/actions/addNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"addNumbers.d.ts","sourceRoot":"","sources":["../../src/actions/addNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,UAAU;;;;;CASrB,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { defineAction } from '../define.js';
|
|
2
3
|
const inputSchema = z.object({
|
|
3
4
|
firstNumber: z.number().meta({ label: 'First Number' }),
|
|
4
5
|
secondNumber: z.number().meta({ label: 'Second Number' }),
|
|
5
6
|
});
|
|
6
7
|
const output = z.number();
|
|
7
|
-
export const addNumbers = {
|
|
8
|
+
export const addNumbers = defineAction({
|
|
8
9
|
slug: 'addNumbers',
|
|
9
10
|
label: 'Add Numbers',
|
|
10
11
|
description: 'Add the first number and the second number.',
|
|
@@ -13,5 +14,5 @@ export const addNumbers = {
|
|
|
13
14
|
async run({ input }) {
|
|
14
15
|
return input.firstNumber + input.secondNumber;
|
|
15
16
|
},
|
|
16
|
-
};
|
|
17
|
+
});
|
|
17
18
|
//# sourceMappingURL=addNumbers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addNumbers.js","sourceRoot":"","sources":["../../src/actions/addNumbers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"addNumbers.js","sourceRoot":"","sources":["../../src/actions/addNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IACvD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1D,CAAC,CAAC;AACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;IACrC,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,6CAA6C;IAC1D,KAAK,EAAE,WAAW;IAClB,MAAM;IACN,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE;QACjB,OAAO,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,YAAY,CAAC;IAChD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import { type PieceRunArgs } from 'frogbot/pieces';
|
|
2
1
|
import { z } from 'zod';
|
|
3
|
-
declare const
|
|
2
|
+
export declare const divideNumbers: import("frogbot/pieces").PieceActionDefinition<z.ZodObject<{
|
|
4
3
|
firstNumber: z.ZodNumber;
|
|
5
4
|
secondNumber: z.ZodNumber;
|
|
6
|
-
}, z.core.$strip
|
|
7
|
-
|
|
8
|
-
slug: string;
|
|
9
|
-
label: string;
|
|
10
|
-
description: string;
|
|
11
|
-
input: z.ZodObject<{
|
|
12
|
-
firstNumber: z.ZodNumber;
|
|
13
|
-
secondNumber: z.ZodNumber;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
output: z.ZodNumber;
|
|
16
|
-
run({ input }: PieceRunArgs<z.output<typeof inputSchema>, object, undefined>): Promise<number>;
|
|
5
|
+
}, z.core.$strip>, z.ZodNumber, Record<string, never>, undefined, number> & {
|
|
6
|
+
slug: "divideNumbers";
|
|
17
7
|
};
|
|
18
|
-
export {};
|
|
19
8
|
//# sourceMappingURL=divideNumbers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divideNumbers.d.ts","sourceRoot":"","sources":["../../src/actions/divideNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"divideNumbers.d.ts","sourceRoot":"","sources":["../../src/actions/divideNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,aAAa;;;;;CASxB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { defineAction } from '../define.js';
|
|
2
3
|
const inputSchema = z.object({
|
|
3
4
|
firstNumber: z.number().meta({ label: 'First Number' }),
|
|
4
5
|
secondNumber: z
|
|
@@ -7,7 +8,7 @@ const inputSchema = z.object({
|
|
|
7
8
|
.meta({ label: 'Second Number' }),
|
|
8
9
|
});
|
|
9
10
|
const output = z.number();
|
|
10
|
-
export const divideNumbers = {
|
|
11
|
+
export const divideNumbers = defineAction({
|
|
11
12
|
slug: 'divideNumbers',
|
|
12
13
|
label: 'Divide Numbers',
|
|
13
14
|
description: 'Divide the first number by the second number.',
|
|
@@ -16,5 +17,5 @@ export const divideNumbers = {
|
|
|
16
17
|
async run({ input }) {
|
|
17
18
|
return input.firstNumber / input.secondNumber;
|
|
18
19
|
},
|
|
19
|
-
};
|
|
20
|
+
});
|
|
20
21
|
//# sourceMappingURL=divideNumbers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divideNumbers.js","sourceRoot":"","sources":["../../src/actions/divideNumbers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"divideNumbers.js","sourceRoot":"","sources":["../../src/actions/divideNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IACvD,YAAY,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,EAAE,8BAA8B,CAAC;SAC9D,IAAI,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;CACpC,CAAC,CAAC;AACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AAE1B,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;IACxC,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,+CAA+C;IAC5D,KAAK,EAAE,WAAW;IAClB,MAAM;IACN,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE;QACjB,OAAO,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,YAAY,CAAC;IAChD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import { type PieceRunArgs } from 'frogbot/pieces';
|
|
2
1
|
import { z } from 'zod';
|
|
3
|
-
declare const
|
|
2
|
+
export declare const generateRandomNumber: import("frogbot/pieces").PieceActionDefinition<z.ZodObject<{
|
|
4
3
|
firstNumber: z.ZodNumber;
|
|
5
4
|
secondNumber: z.ZodNumber;
|
|
6
|
-
}, z.core.$strip
|
|
7
|
-
|
|
8
|
-
slug: string;
|
|
9
|
-
label: string;
|
|
10
|
-
description: string;
|
|
11
|
-
input: z.ZodObject<{
|
|
12
|
-
firstNumber: z.ZodNumber;
|
|
13
|
-
secondNumber: z.ZodNumber;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
output: z.ZodNumber;
|
|
16
|
-
run({ input }: PieceRunArgs<z.output<typeof inputSchema>, object, undefined>): Promise<number>;
|
|
5
|
+
}, z.core.$strip>, z.ZodNumber, Record<string, never>, undefined, number> & {
|
|
6
|
+
slug: "generateRandomNumber";
|
|
17
7
|
};
|
|
18
|
-
export {};
|
|
19
8
|
//# sourceMappingURL=generateRandomNumber.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateRandomNumber.d.ts","sourceRoot":"","sources":["../../src/actions/generateRandomNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"generateRandomNumber.d.ts","sourceRoot":"","sources":["../../src/actions/generateRandomNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,oBAAoB;;;;;CAW/B,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { defineAction } from '../define.js';
|
|
2
3
|
const inputSchema = z.object({
|
|
3
4
|
firstNumber: z.number().meta({ label: 'First Number' }),
|
|
4
5
|
secondNumber: z.number().meta({ label: 'Second Number' }),
|
|
5
6
|
});
|
|
6
7
|
const output = z.number();
|
|
7
|
-
export const generateRandomNumber = {
|
|
8
|
+
export const generateRandomNumber = defineAction({
|
|
8
9
|
slug: 'generateRandomNumber',
|
|
9
10
|
label: 'Generate Random Number',
|
|
10
11
|
description: 'Generate a random integer between two numbers, inclusive.',
|
|
@@ -13,5 +14,5 @@ export const generateRandomNumber = {
|
|
|
13
14
|
async run({ input }) {
|
|
14
15
|
return Math.floor(Math.random() * (input.secondNumber - input.firstNumber + 1) + input.firstNumber);
|
|
15
16
|
},
|
|
16
|
-
};
|
|
17
|
+
});
|
|
17
18
|
//# sourceMappingURL=generateRandomNumber.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateRandomNumber.js","sourceRoot":"","sources":["../../src/actions/generateRandomNumber.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generateRandomNumber.js","sourceRoot":"","sources":["../../src/actions/generateRandomNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IACvD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1D,CAAC,CAAC;AACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AAE1B,MAAM,CAAC,MAAM,oBAAoB,GAAG,YAAY,CAAC;IAC/C,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EAAE,2DAA2D;IACxE,KAAK,EAAE,WAAW;IAClB,MAAM;IACN,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE;QACjB,OAAO,IAAI,CAAC,KAAK,CACf,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,WAAW,CACjF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import { type PieceRunArgs } from 'frogbot/pieces';
|
|
2
1
|
import { z } from 'zod';
|
|
3
|
-
declare const
|
|
2
|
+
export declare const getRemainder: import("frogbot/pieces").PieceActionDefinition<z.ZodObject<{
|
|
4
3
|
firstNumber: z.ZodNumber;
|
|
5
4
|
secondNumber: z.ZodNumber;
|
|
6
|
-
}, z.core.$strip
|
|
7
|
-
|
|
8
|
-
slug: string;
|
|
9
|
-
label: string;
|
|
10
|
-
description: string;
|
|
11
|
-
input: z.ZodObject<{
|
|
12
|
-
firstNumber: z.ZodNumber;
|
|
13
|
-
secondNumber: z.ZodNumber;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
output: z.ZodNumber;
|
|
16
|
-
run({ input }: PieceRunArgs<z.output<typeof inputSchema>, object, undefined>): Promise<number>;
|
|
5
|
+
}, z.core.$strip>, z.ZodNumber, Record<string, never>, undefined, number> & {
|
|
6
|
+
slug: "getRemainder";
|
|
17
7
|
};
|
|
18
|
-
export {};
|
|
19
8
|
//# sourceMappingURL=getRemainder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRemainder.d.ts","sourceRoot":"","sources":["../../src/actions/getRemainder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"getRemainder.d.ts","sourceRoot":"","sources":["../../src/actions/getRemainder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,YAAY;;;;;CASvB,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { defineAction } from '../define.js';
|
|
2
3
|
const inputSchema = z.object({
|
|
3
4
|
firstNumber: z.number().meta({ label: 'First Number' }),
|
|
4
5
|
secondNumber: z.number().meta({ label: 'Second Number' }),
|
|
5
6
|
});
|
|
6
7
|
const output = z.number();
|
|
7
|
-
export const getRemainder = {
|
|
8
|
+
export const getRemainder = defineAction({
|
|
8
9
|
slug: 'getRemainder',
|
|
9
10
|
label: 'Get Remainder',
|
|
10
11
|
description: 'Get the remainder after dividing the first number by the second number.',
|
|
@@ -13,5 +14,5 @@ export const getRemainder = {
|
|
|
13
14
|
async run({ input }) {
|
|
14
15
|
return input.firstNumber % input.secondNumber;
|
|
15
16
|
},
|
|
16
|
-
};
|
|
17
|
+
});
|
|
17
18
|
//# sourceMappingURL=getRemainder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRemainder.js","sourceRoot":"","sources":["../../src/actions/getRemainder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getRemainder.js","sourceRoot":"","sources":["../../src/actions/getRemainder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IACvD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1D,CAAC,CAAC;AACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AAE1B,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;IACvC,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,yEAAyE;IACtF,KAAK,EAAE,WAAW;IAClB,MAAM;IACN,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE;QACjB,OAAO,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,YAAY,CAAC;IAChD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import { type PieceRunArgs } from 'frogbot/pieces';
|
|
2
1
|
import { z } from 'zod';
|
|
3
|
-
declare const
|
|
2
|
+
export declare const multiplyNumbers: import("frogbot/pieces").PieceActionDefinition<z.ZodObject<{
|
|
4
3
|
firstNumber: z.ZodNumber;
|
|
5
4
|
secondNumber: z.ZodNumber;
|
|
6
|
-
}, z.core.$strip
|
|
7
|
-
|
|
8
|
-
slug: string;
|
|
9
|
-
label: string;
|
|
10
|
-
description: string;
|
|
11
|
-
input: z.ZodObject<{
|
|
12
|
-
firstNumber: z.ZodNumber;
|
|
13
|
-
secondNumber: z.ZodNumber;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
output: z.ZodNumber;
|
|
16
|
-
run({ input }: PieceRunArgs<z.output<typeof inputSchema>, object, undefined>): Promise<number>;
|
|
5
|
+
}, z.core.$strip>, z.ZodNumber, Record<string, never>, undefined, number> & {
|
|
6
|
+
slug: "multiplyNumbers";
|
|
17
7
|
};
|
|
18
|
-
export {};
|
|
19
8
|
//# sourceMappingURL=multiplyNumbers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiplyNumbers.d.ts","sourceRoot":"","sources":["../../src/actions/multiplyNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"multiplyNumbers.d.ts","sourceRoot":"","sources":["../../src/actions/multiplyNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,eAAe;;;;;CAS1B,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { defineAction } from '../define.js';
|
|
2
3
|
const inputSchema = z.object({
|
|
3
4
|
firstNumber: z.number().meta({ label: 'First Number' }),
|
|
4
5
|
secondNumber: z.number().meta({ label: 'Second Number' }),
|
|
5
6
|
});
|
|
6
7
|
const output = z.number();
|
|
7
|
-
export const multiplyNumbers = {
|
|
8
|
+
export const multiplyNumbers = defineAction({
|
|
8
9
|
slug: 'multiplyNumbers',
|
|
9
10
|
label: 'Multiply Numbers',
|
|
10
11
|
description: 'Multiply the first number by the second number.',
|
|
@@ -13,5 +14,5 @@ export const multiplyNumbers = {
|
|
|
13
14
|
async run({ input }) {
|
|
14
15
|
return input.firstNumber * input.secondNumber;
|
|
15
16
|
},
|
|
16
|
-
};
|
|
17
|
+
});
|
|
17
18
|
//# sourceMappingURL=multiplyNumbers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiplyNumbers.js","sourceRoot":"","sources":["../../src/actions/multiplyNumbers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"multiplyNumbers.js","sourceRoot":"","sources":["../../src/actions/multiplyNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IACvD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1D,CAAC,CAAC;AACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AAE1B,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAC;IAC1C,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,iDAAiD;IAC9D,KAAK,EAAE,WAAW;IAClB,MAAM;IACN,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE;QACjB,OAAO,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,YAAY,CAAC;IAChD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import { type PieceRunArgs } from 'frogbot/pieces';
|
|
2
1
|
import { z } from 'zod';
|
|
3
|
-
declare const
|
|
2
|
+
export declare const subtractNumbers: import("frogbot/pieces").PieceActionDefinition<z.ZodObject<{
|
|
4
3
|
firstNumber: z.ZodNumber;
|
|
5
4
|
secondNumber: z.ZodNumber;
|
|
6
|
-
}, z.core.$strip
|
|
7
|
-
|
|
8
|
-
slug: string;
|
|
9
|
-
label: string;
|
|
10
|
-
description: string;
|
|
11
|
-
input: z.ZodObject<{
|
|
12
|
-
firstNumber: z.ZodNumber;
|
|
13
|
-
secondNumber: z.ZodNumber;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
output: z.ZodNumber;
|
|
16
|
-
run({ input }: PieceRunArgs<z.output<typeof inputSchema>, object, undefined>): Promise<number>;
|
|
5
|
+
}, z.core.$strip>, z.ZodNumber, Record<string, never>, undefined, number> & {
|
|
6
|
+
slug: "subtractNumbers";
|
|
17
7
|
};
|
|
18
|
-
export {};
|
|
19
8
|
//# sourceMappingURL=subtractNumbers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subtractNumbers.d.ts","sourceRoot":"","sources":["../../src/actions/subtractNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"subtractNumbers.d.ts","sourceRoot":"","sources":["../../src/actions/subtractNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,eAAe;;;;;CAS1B,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { defineAction } from '../define.js';
|
|
2
3
|
const inputSchema = z.object({
|
|
3
4
|
firstNumber: z.number().meta({ label: 'First Number' }),
|
|
4
5
|
secondNumber: z.number().meta({ label: 'Second Number' }),
|
|
5
6
|
});
|
|
6
7
|
const output = z.number();
|
|
7
|
-
export const subtractNumbers = {
|
|
8
|
+
export const subtractNumbers = defineAction({
|
|
8
9
|
slug: 'subtractNumbers',
|
|
9
10
|
label: 'Subtract Numbers',
|
|
10
11
|
description: 'Subtract the first number from the second number.',
|
|
@@ -13,5 +14,5 @@ export const subtractNumbers = {
|
|
|
13
14
|
async run({ input }) {
|
|
14
15
|
return input.secondNumber - input.firstNumber;
|
|
15
16
|
},
|
|
16
|
-
};
|
|
17
|
+
});
|
|
17
18
|
//# sourceMappingURL=subtractNumbers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subtractNumbers.js","sourceRoot":"","sources":["../../src/actions/subtractNumbers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subtractNumbers.js","sourceRoot":"","sources":["../../src/actions/subtractNumbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IACvD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1D,CAAC,CAAC;AACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AAE1B,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAC;IAC1C,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,mDAAmD;IAChE,KAAK,EAAE,WAAW;IAClB,MAAM;IACN,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE;QACjB,OAAO,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC;IAChD,CAAC;CACF,CAAC,CAAC"}
|
package/dist/define.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const defineAction: <const TSlug extends string, TInput extends import("zod").ZodType, TOutput extends import("zod").ZodType | undefined = undefined, TResult = unknown>(action: TOutput extends unknown ? import("frogbot/pieces").PieceActionDefinition<TInput, TOutput, Record<string, never>, undefined, TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : TResult> & {
|
|
2
|
+
slug: TSlug;
|
|
3
|
+
} : never) => import("frogbot/pieces").PieceActionDefinition<TInput, TOutput, Record<string, never>, undefined, TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : TResult> & {
|
|
4
|
+
slug: TSlug;
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=define.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAEA,eAAO,MAAQ,YAAY;;;;CAAyB,CAAC"}
|
package/dist/define.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,kBAAkB,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,84 +5,36 @@ export declare const createMathHelper: import("frogbot/pieces").PieceFactory<{
|
|
|
5
5
|
readonly description: "Perform mathematical operations";
|
|
6
6
|
readonly group: "Core";
|
|
7
7
|
};
|
|
8
|
-
readonly actions: readonly [{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, {
|
|
22
|
-
slug:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
input: import("zod").ZodObject<{
|
|
39
|
-
firstNumber: import("zod").ZodNumber;
|
|
40
|
-
secondNumber: import("zod").ZodNumber;
|
|
41
|
-
}, import("zod/v4/core").$strip>;
|
|
42
|
-
output: import("zod").ZodNumber;
|
|
43
|
-
run({ input }: import("frogbot/pieces").PieceRunArgs<import("zod").infer<import("zod").ZodObject<{
|
|
44
|
-
firstNumber: import("zod").ZodNumber;
|
|
45
|
-
secondNumber: import("zod").ZodNumber;
|
|
46
|
-
}, import("zod/v4/core").$strip>>, object, undefined>): Promise<number>;
|
|
47
|
-
}, {
|
|
48
|
-
slug: string;
|
|
49
|
-
label: string;
|
|
50
|
-
description: string;
|
|
51
|
-
input: import("zod").ZodObject<{
|
|
52
|
-
firstNumber: import("zod").ZodNumber;
|
|
53
|
-
secondNumber: import("zod").ZodNumber;
|
|
54
|
-
}, import("zod/v4/core").$strip>;
|
|
55
|
-
output: import("zod").ZodNumber;
|
|
56
|
-
run({ input }: import("frogbot/pieces").PieceRunArgs<import("zod").infer<import("zod").ZodObject<{
|
|
57
|
-
firstNumber: import("zod").ZodNumber;
|
|
58
|
-
secondNumber: import("zod").ZodNumber;
|
|
59
|
-
}, import("zod/v4/core").$strip>>, object, undefined>): Promise<number>;
|
|
60
|
-
}, {
|
|
61
|
-
slug: string;
|
|
62
|
-
label: string;
|
|
63
|
-
description: string;
|
|
64
|
-
input: import("zod").ZodObject<{
|
|
65
|
-
firstNumber: import("zod").ZodNumber;
|
|
66
|
-
secondNumber: import("zod").ZodNumber;
|
|
67
|
-
}, import("zod/v4/core").$strip>;
|
|
68
|
-
output: import("zod").ZodNumber;
|
|
69
|
-
run({ input }: import("frogbot/pieces").PieceRunArgs<import("zod").infer<import("zod").ZodObject<{
|
|
70
|
-
firstNumber: import("zod").ZodNumber;
|
|
71
|
-
secondNumber: import("zod").ZodNumber;
|
|
72
|
-
}, import("zod/v4/core").$strip>>, object, undefined>): Promise<number>;
|
|
73
|
-
}, {
|
|
74
|
-
slug: string;
|
|
75
|
-
label: string;
|
|
76
|
-
description: string;
|
|
77
|
-
input: import("zod").ZodObject<{
|
|
78
|
-
firstNumber: import("zod").ZodNumber;
|
|
79
|
-
secondNumber: import("zod").ZodNumber;
|
|
80
|
-
}, import("zod/v4/core").$strip>;
|
|
81
|
-
output: import("zod").ZodNumber;
|
|
82
|
-
run({ input }: import("frogbot/pieces").PieceRunArgs<import("zod").infer<import("zod").ZodObject<{
|
|
83
|
-
firstNumber: import("zod").ZodNumber;
|
|
84
|
-
secondNumber: import("zod").ZodNumber;
|
|
85
|
-
}, import("zod/v4/core").$strip>>, object, undefined>): Promise<number>;
|
|
8
|
+
readonly actions: readonly [import("frogbot/pieces").PieceActionDefinition<import("zod").ZodObject<{
|
|
9
|
+
firstNumber: import("zod").ZodNumber;
|
|
10
|
+
secondNumber: import("zod").ZodNumber;
|
|
11
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodNumber, Record<string, never>, undefined, number> & {
|
|
12
|
+
slug: "addNumbers";
|
|
13
|
+
}, import("frogbot/pieces").PieceActionDefinition<import("zod").ZodObject<{
|
|
14
|
+
firstNumber: import("zod").ZodNumber;
|
|
15
|
+
secondNumber: import("zod").ZodNumber;
|
|
16
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodNumber, Record<string, never>, undefined, number> & {
|
|
17
|
+
slug: "subtractNumbers";
|
|
18
|
+
}, import("frogbot/pieces").PieceActionDefinition<import("zod").ZodObject<{
|
|
19
|
+
firstNumber: import("zod").ZodNumber;
|
|
20
|
+
secondNumber: import("zod").ZodNumber;
|
|
21
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodNumber, Record<string, never>, undefined, number> & {
|
|
22
|
+
slug: "multiplyNumbers";
|
|
23
|
+
}, import("frogbot/pieces").PieceActionDefinition<import("zod").ZodObject<{
|
|
24
|
+
firstNumber: import("zod").ZodNumber;
|
|
25
|
+
secondNumber: import("zod").ZodNumber;
|
|
26
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodNumber, Record<string, never>, undefined, number> & {
|
|
27
|
+
slug: "divideNumbers";
|
|
28
|
+
}, import("frogbot/pieces").PieceActionDefinition<import("zod").ZodObject<{
|
|
29
|
+
firstNumber: import("zod").ZodNumber;
|
|
30
|
+
secondNumber: import("zod").ZodNumber;
|
|
31
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodNumber, Record<string, never>, undefined, number> & {
|
|
32
|
+
slug: "getRemainder";
|
|
33
|
+
}, import("frogbot/pieces").PieceActionDefinition<import("zod").ZodObject<{
|
|
34
|
+
firstNumber: import("zod").ZodNumber;
|
|
35
|
+
secondNumber: import("zod").ZodNumber;
|
|
36
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodNumber, Record<string, never>, undefined, number> & {
|
|
37
|
+
slug: "generateRandomNumber";
|
|
86
38
|
}];
|
|
87
39
|
}>;
|
|
88
40
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY3B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frogbotai/piece-math-helper",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "math-helper tools for FrogBot.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Colby Gilbert",
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
"zod": "^4.3.6"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"frogbot": "0.
|
|
25
|
+
"frogbot": "0.28.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"typescript": "5.6.2",
|
|
29
|
-
"frogbot": "0.
|
|
29
|
+
"frogbot": "0.28.0"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
|
-
"build": "tsc -p tsconfig.json",
|
|
35
|
+
"build": "rm -rf dist && tsc -p tsconfig.json",
|
|
36
36
|
"clean": "rm -rf dist",
|
|
37
37
|
"typecheck": "tsc --noEmit"
|
|
38
38
|
}
|