@pavezzi/piece-hello-world 0.0.3 → 0.0.4
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/package.json +2 -2
- package/src/index.d.ts +1 -0
- package/src/index.js +14 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/greet.d.ts +4 -0
- package/src/lib/actions/greet.js +45 -0
- package/src/lib/actions/greet.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pavezzi/piece-hello-world",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "Hello World piece for Activepieces testing",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"files": [
|
|
9
|
-
"
|
|
9
|
+
"src"
|
|
10
10
|
],
|
|
11
11
|
"keywords": [
|
|
12
12
|
"activepieces",
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const helloWorld: import("@activepieces/pieces-framework").Piece<undefined>;
|
package/src/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.helloWorld = void 0;
|
|
4
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
|
+
exports.helloWorld = (0, pieces_framework_1.createPiece)({
|
|
6
|
+
displayName: "Hello-world",
|
|
7
|
+
auth: pieces_framework_1.PieceAuth.None(),
|
|
8
|
+
minimumSupportedRelease: '0.36.1',
|
|
9
|
+
logoUrl: "https://cdn.activepieces.com/pieces/hello-world.png",
|
|
10
|
+
authors: [],
|
|
11
|
+
actions: [],
|
|
12
|
+
triggers: [],
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/hello-world/src/index.ts"],"names":[],"mappings":";;;AACI,qEAAwE;AAE3D,QAAA,UAAU,GAAG,IAAA,8BAAW,EAAC;IACpC,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,4BAAS,CAAC,IAAI,EAAE;IACtB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,qDAAqD;IAC9D,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const greetAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").PieceAuthProperty, {
|
|
2
|
+
name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
language: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
4
|
+
}>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.greetAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
exports.greetAction = (0, pieces_framework_1.createAction)({
|
|
7
|
+
name: 'greet',
|
|
8
|
+
displayName: 'Saudar Pessoa',
|
|
9
|
+
description: 'Retorna uma saudação personalizada',
|
|
10
|
+
props: {
|
|
11
|
+
name: pieces_framework_1.Property.ShortText({
|
|
12
|
+
displayName: 'Nome',
|
|
13
|
+
description: 'Digite o nome da pessoa',
|
|
14
|
+
required: true,
|
|
15
|
+
}),
|
|
16
|
+
language: pieces_framework_1.Property.StaticDropdown({
|
|
17
|
+
displayName: 'Idioma',
|
|
18
|
+
description: 'Escolha o idioma da saudação',
|
|
19
|
+
required: true,
|
|
20
|
+
options: {
|
|
21
|
+
options: [
|
|
22
|
+
{ label: 'Português', value: 'pt' },
|
|
23
|
+
{ label: 'English', value: 'en' },
|
|
24
|
+
{ label: 'Español', value: 'es' },
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
}),
|
|
28
|
+
},
|
|
29
|
+
run(context) {
|
|
30
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const { name, language } = context.propsValue;
|
|
32
|
+
const greetings = {
|
|
33
|
+
pt: `Olá, ${name}! Bem-vindo ao Activepieces!`,
|
|
34
|
+
en: `Hello, ${name}! Welcome to Activepieces!`,
|
|
35
|
+
es: `¡Hola, ${name}! ¡Bienvenido a Activepieces!`,
|
|
36
|
+
};
|
|
37
|
+
return {
|
|
38
|
+
success: true,
|
|
39
|
+
greeting: greetings[language] || greetings['pt'],
|
|
40
|
+
timestamp: new Date().toISOString(),
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=greet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"greet.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/hello-world/src/lib/actions/greet.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AAE3D,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,oCAAoC;IAEjD,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,yBAAyB;YACtC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAChC,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,8BAA8B;YAC3C,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE;oBACnC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE;oBACjC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE;iBAClC;aACF;SACF,CAAC;KACH;IAEK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAE9C,MAAM,SAAS,GAA2B;gBACxC,EAAE,EAAE,QAAQ,IAAI,8BAA8B;gBAC9C,EAAE,EAAE,UAAU,IAAI,4BAA4B;gBAC9C,EAAE,EAAE,UAAU,IAAI,+BAA+B;aAClD,CAAC;YAEF,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC;gBAChD,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACpC,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|