@activepieces/piece-connections 0.3.3 → 0.4.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/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-connections",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@sinclair/typebox": "0.26.8",
|
|
6
|
-
"axios": "
|
|
6
|
+
"axios": "1.6.7",
|
|
7
7
|
"dayjs": "1.11.9",
|
|
8
8
|
"is-base64": "1.1.0",
|
|
9
9
|
"lodash": "4.17.21",
|
|
10
10
|
"nanoid": "3.3.6",
|
|
11
11
|
"semver": "7.6.0",
|
|
12
|
-
"@activepieces/pieces-framework": "0.7.
|
|
13
|
-
"@activepieces/shared": "0.10.
|
|
14
|
-
"tslib": "
|
|
12
|
+
"@activepieces/pieces-framework": "0.7.30",
|
|
13
|
+
"@activepieces/shared": "0.10.105",
|
|
14
|
+
"tslib": "1.14.1"
|
|
15
15
|
},
|
|
16
16
|
"main": "./src/index.js",
|
|
17
17
|
"type": "commonjs"
|
package/src/index.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.connections = (0, pieces_framework_1.createPiece)({
|
|
|
11
11
|
logoUrl: 'https://cdn.activepieces.com/pieces/connections.png',
|
|
12
12
|
categories: [shared_1.PieceCategory.CORE],
|
|
13
13
|
auth: pieces_framework_1.PieceAuth.None(),
|
|
14
|
-
authors: [
|
|
14
|
+
authors: ["kishanprmr", "AbdulTheActivePiecer", "khaledmashaly", "abuaboud"],
|
|
15
15
|
actions: [read_connection_1.readConnection],
|
|
16
16
|
triggers: [],
|
|
17
17
|
});
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/connections/src/index.ts"],"names":[],"mappings":";;;AAAA,qEAAwE;AACxE,iDAAqD;AACrD,mEAA+D;AAElD,QAAA,WAAW,GAAG,IAAA,8BAAW,EAAC;IACrC,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,8BAA8B;IAC3C,uBAAuB,EAAE,OAAO;IAChC,OAAO,EAAE,qDAAqD;IAC9D,UAAU,EAAE,CAAC,sBAAa,CAAC,IAAI,CAAC;IAChC,IAAI,EAAE,4BAAS,CAAC,IAAI,EAAE;IACtB,OAAO,EAAE,CAAC,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/connections/src/index.ts"],"names":[],"mappings":";;;AAAA,qEAAwE;AACxE,iDAAqD;AACrD,mEAA+D;AAElD,QAAA,WAAW,GAAG,IAAA,8BAAW,EAAC;IACrC,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,8BAA8B;IAC3C,uBAAuB,EAAE,OAAO;IAChC,OAAO,EAAE,qDAAqD;IAC9D,UAAU,EAAE,CAAC,sBAAa,CAAC,IAAI,CAAC;IAChC,IAAI,EAAE,4BAAS,CAAC,IAAI,EAAE;IACtB,OAAO,EAAE,CAAC,YAAY,EAAC,sBAAsB,EAAC,eAAe,EAAC,UAAU,CAAC;IACzE,OAAO,EAAE,CAAC,gCAAc,CAAC;IACzB,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -3,12 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.readConnection = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const lodash_1 = require("lodash");
|
|
6
7
|
const markdown = `
|
|
7
8
|
**Advanced Piece**
|
|
8
9
|
<br>
|
|
9
|
-
Use this
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
Use this piece If you are unsure which connection to use beforehand, such as when the connection name is sent through a webhook message.
|
|
11
|
+
|
|
12
|
+
**Notes:**
|
|
13
|
+
- Use this action to retrieve connection values by their names from this project.
|
|
14
|
+
- After testing the step, you can use the dynamic value in the piece by clicking (X) and referring to this step.
|
|
12
15
|
`;
|
|
13
16
|
exports.readConnection = (0, pieces_framework_1.createAction)({
|
|
14
17
|
name: 'read_connection',
|
|
@@ -26,7 +29,14 @@ exports.readConnection = (0, pieces_framework_1.createAction)({
|
|
|
26
29
|
},
|
|
27
30
|
run(ctx) {
|
|
28
31
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
|
|
32
|
+
const connection = yield ctx.connections.get(ctx.propsValue.connection_name);
|
|
33
|
+
if ((0, lodash_1.isNil)(connection)) {
|
|
34
|
+
throw new Error(JSON.stringify({
|
|
35
|
+
message: 'Connection not found',
|
|
36
|
+
connectionName: ctx.propsValue.connection_name,
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
return connection;
|
|
30
40
|
});
|
|
31
41
|
},
|
|
32
42
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-connection.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/connections/src/lib/actions/read-connection.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;
|
|
1
|
+
{"version":3,"file":"read-connection.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/connections/src/lib/actions/read-connection.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,mCAA+B;AAE/B,MAAM,QAAQ,GAAG;;;;;;;;CAQhB,CAAC;AAEW,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,0BAA0B;IACvC,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,KAAK,EAAE,QAAQ;SAChB,CAAC;QACF,eAAe,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAClC,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,SAAS;YACtB,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,GAAG;;YACX,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;YAC7E,IAAI,IAAA,cAAK,EAAC,UAAU,CAAC,EAAE,CAAC;gBACtB,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;oBAC7B,OAAO,EAAE,sBAAsB;oBAC/B,cAAc,EAAE,GAAG,CAAC,UAAU,CAAC,eAAe;iBAC/C,CAAC,CAAC,CAAC;YACN,CAAC;YACD,OAAO,UAAU,CAAC;QACpB,CAAC;KAAA;CACF,CAAC,CAAC"}
|