@activepieces/piece-github 0.2.0 → 0.2.2
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 +7 -6
- package/src/index.d.ts +1 -1
- package/src/index.js +2 -6
- package/src/index.js.map +1 -1
- package/src/lib/common/index.d.ts +3 -3
- package/src/lib/common/index.js +7 -6
- package/src/lib/common/index.js.map +1 -1
- package/src/lib/trigger/index.d.ts +1 -1
- package/src/lib/trigger/new-star.d.ts +1 -1
- package/src/lib/trigger/new-star.js +10 -10
- package/src/lib/trigger/new-star.js.map +1 -1
- package/src/lib/trigger/register-trigger.d.ts +1 -1
- package/src/lib/trigger/register-trigger.js +10 -10
- package/src/lib/trigger/register-trigger.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-github",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@sinclair/typebox": "0.
|
|
5
|
+
"@sinclair/typebox": "0.26.8",
|
|
6
6
|
"axios": "1.2.4",
|
|
7
|
-
"
|
|
7
|
+
"lodash": "4.17.21",
|
|
8
8
|
"nanoid": "3.3.4",
|
|
9
|
-
"@activepieces/framework": "0.
|
|
10
|
-
"@activepieces/shared": "0.
|
|
11
|
-
"
|
|
9
|
+
"@activepieces/pieces-framework": "0.3.27",
|
|
10
|
+
"@activepieces/shared": "0.3.44",
|
|
11
|
+
"@activepieces/pieces-common": "0.0.7",
|
|
12
|
+
"tslib": "2.5.3"
|
|
12
13
|
},
|
|
13
14
|
"main": "./src/index.js",
|
|
14
15
|
"types": "./src/index.d.ts"
|
package/src/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const github: import("@activepieces/framework").Piece;
|
|
1
|
+
export declare const github: import("@activepieces/pieces-framework").Piece;
|
package/src/index.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.github = void 0;
|
|
4
|
-
const
|
|
5
|
-
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
|
-
const framework_1 = require("@activepieces/framework");
|
|
4
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
5
|
const trigger_1 = require("./lib/trigger");
|
|
8
|
-
exports.github = (0,
|
|
9
|
-
name: 'github',
|
|
6
|
+
exports.github = (0, pieces_framework_1.createPiece)({
|
|
10
7
|
displayName: "Github",
|
|
11
8
|
logoUrl: 'https://cdn.activepieces.com/pieces/github.png',
|
|
12
|
-
version: package_json_1.default.version,
|
|
13
9
|
actions: [],
|
|
14
10
|
authors: ['kanarelo'],
|
|
15
11
|
triggers: trigger_1.githubTriggers,
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/pieces/github/src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/pieces/github/src/index.ts"],"names":[],"mappings":";;;AAAA,qEAA6D;AAC7D,2CAA+C;AAElC,QAAA,MAAM,GAAG,IAAA,8BAAW,EAAC;IAChC,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,gDAAgD;IACzD,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,QAAQ,EAAE,wBAAc;CACzB,CAAC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const githubCommon: {
|
|
2
2
|
baseUrl: string;
|
|
3
|
-
authentication: import("@activepieces/framework").OAuth2Property<true>;
|
|
4
|
-
repositoryDropdown: import("@activepieces/framework").DropdownProperty<{
|
|
3
|
+
authentication: import("@activepieces/pieces-framework").OAuth2Property<true, import("@activepieces/pieces-framework").OAuth2Props>;
|
|
4
|
+
repositoryDropdown: import("@activepieces/pieces-framework").DropdownProperty<{
|
|
5
5
|
repo: string;
|
|
6
6
|
owner: string;
|
|
7
|
-
}, false> | import("@activepieces/framework").DropdownProperty<{
|
|
7
|
+
}, false> | import("@activepieces/pieces-framework").DropdownProperty<{
|
|
8
8
|
repo: string;
|
|
9
9
|
owner: string;
|
|
10
10
|
}, true>;
|
package/src/lib/common/index.js
CHANGED
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.githubCommon = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
7
|
exports.githubCommon = {
|
|
7
8
|
baseUrl: "https://api.github.com",
|
|
8
|
-
authentication:
|
|
9
|
+
authentication: pieces_framework_1.Property.OAuth2({
|
|
9
10
|
displayName: "Authentication",
|
|
10
11
|
required: true,
|
|
11
12
|
authUrl: 'https://github.com/login/oauth/authorize',
|
|
12
13
|
tokenUrl: 'https://github.com/login/oauth/access_token',
|
|
13
14
|
scope: ['admin:repo_hook', 'admin:org', 'repo'],
|
|
14
15
|
}),
|
|
15
|
-
repositoryDropdown:
|
|
16
|
+
repositoryDropdown: pieces_framework_1.Property.Dropdown({
|
|
16
17
|
displayName: "Repository",
|
|
17
18
|
refreshers: ['authentication'],
|
|
18
19
|
required: true,
|
|
@@ -44,17 +45,17 @@ exports.githubCommon = {
|
|
|
44
45
|
function getUserRepo(authProp) {
|
|
45
46
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
46
47
|
const request = {
|
|
47
|
-
method:
|
|
48
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
48
49
|
url: `${exports.githubCommon.baseUrl}/user/repos`,
|
|
49
50
|
queryParams: {
|
|
50
51
|
per_page: '200'
|
|
51
52
|
},
|
|
52
53
|
authentication: {
|
|
53
|
-
type:
|
|
54
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
54
55
|
token: authProp.access_token
|
|
55
56
|
},
|
|
56
57
|
};
|
|
57
|
-
const response = yield
|
|
58
|
+
const response = yield pieces_common_1.httpClient.sendRequest(request);
|
|
58
59
|
return response.body;
|
|
59
60
|
});
|
|
60
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/github/src/lib/common/index.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/github/src/lib/common/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA+E;AAC/E,+DAAsG;AAEzF,QAAA,YAAY,GAAG;IACxB,OAAO,EAAE,wBAAwB;IACjC,cAAc,EAAE,2BAAQ,CAAC,MAAM,CAAC;QAC5B,WAAW,EAAE,gBAAgB;QAC7B,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,0CAA0C;QACnD,QAAQ,EAAE,6CAA6C;QACvD,KAAK,EAAE,CAAC,iBAAiB,EAAE,WAAW,EAAE,MAAM,CAAC;KAClD,CAAC;IACF,kBAAkB,EAAE,2BAAQ,CAAC,QAAQ,CAAkC;QACnE,WAAW,EAAE,YAAY;QACzB,UAAU,EAAE,CAAC,gBAAgB,CAAC;QAC9B,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,CAAO,UAAU,EAAE,EAAE;YAC1B,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE;gBAC/B,OAAO;oBACH,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,2BAA2B;iBAC3C,CAAA;aACJ;YACD,MAAM,QAAQ,GAAwB,UAAU,CAAC,gBAAgB,CAAwB,CAAC;YAC1F,MAAM,YAAY,GAAG,MAAM,WAAW,CAAC,QAAQ,CAAC,CAAC;YACjD,OAAO;gBACH,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;oBAC7B,OAAO;wBACH,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI;wBACzC,KAAK,EAAE;4BACH,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;4BACvB,IAAI,EAAE,IAAI,CAAC,IAAI;yBAClB;qBACJ,CAAA;gBACL,CAAC,CAAC;aACL,CAAC;QACN,CAAC,CAAA;KACJ,CAAC;CACL,CAAA;AAED,SAAe,WAAW,CAAC,QAA6B;;QACpD,MAAM,OAAO,GAAgB;YACzB,MAAM,EAAE,0BAAU,CAAC,GAAG;YACtB,GAAG,EAAE,GAAG,oBAAY,CAAC,OAAO,aAAa;YACzC,WAAW,EAAE;gBACT,QAAQ,EAAE,KAAK;aAClB;YACD,cAAc,EAAE;gBACZ,IAAI,EAAE,kCAAkB,CAAC,YAAY;gBACrC,KAAK,EAAE,QAAQ,CAAC,YAAY;aAC/B;SACJ,CAAC;QACF,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAqB,OAAO,CAAC,CAAC;QAC3E,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const githubNewRepoEvent: import("@activepieces/framework").Trigger;
|
|
1
|
+
export declare const githubNewRepoEvent: import("@activepieces/pieces-framework").Trigger;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.githubNewRepoEvent = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
7
|
const common_1 = require("../common");
|
|
8
|
-
exports.githubNewRepoEvent = (0,
|
|
8
|
+
exports.githubNewRepoEvent = (0, pieces_framework_1.createTrigger)({
|
|
9
9
|
name: 'new_star',
|
|
10
10
|
displayName: 'New Star',
|
|
11
11
|
description: 'Triggers when there is a new star on the repository',
|
|
@@ -48,12 +48,12 @@ exports.githubNewRepoEvent = (0, framework_1.createTrigger)({
|
|
|
48
48
|
"avatar_url": "https://avatars.githubusercontent.com/u/31868364?v=4",
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
type:
|
|
51
|
+
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
52
52
|
onEnable(context) {
|
|
53
53
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
54
54
|
const { repo, owner } = context.propsValue['repository'];
|
|
55
55
|
const request = {
|
|
56
|
-
method:
|
|
56
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
57
57
|
url: `${common_1.githubCommon.baseUrl}/repos/${owner}/${repo}/hooks`,
|
|
58
58
|
body: {
|
|
59
59
|
owner: owner,
|
|
@@ -67,12 +67,12 @@ exports.githubNewRepoEvent = (0, framework_1.createTrigger)({
|
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
69
|
authentication: {
|
|
70
|
-
type:
|
|
70
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
71
71
|
token: context.propsValue['authentication']['access_token'],
|
|
72
72
|
},
|
|
73
73
|
queryParams: {},
|
|
74
74
|
};
|
|
75
|
-
const { body: webhook } = yield
|
|
75
|
+
const { body: webhook } = yield pieces_common_1.httpClient.sendRequest(request);
|
|
76
76
|
yield context.store.put('_trigger', {
|
|
77
77
|
webhookId: webhook.id,
|
|
78
78
|
owner: owner,
|
|
@@ -85,14 +85,14 @@ exports.githubNewRepoEvent = (0, framework_1.createTrigger)({
|
|
|
85
85
|
const response = yield context.store.get('_trigger');
|
|
86
86
|
if (response !== null && response !== undefined) {
|
|
87
87
|
const request = {
|
|
88
|
-
method:
|
|
88
|
+
method: pieces_common_1.HttpMethod.DELETE,
|
|
89
89
|
url: `${common_1.githubCommon.baseUrl}/repos/${response.owner}/${response.repo}/hooks/${response.webhookId}`,
|
|
90
90
|
authentication: {
|
|
91
|
-
type:
|
|
91
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
92
92
|
token: context.propsValue['authentication']['access_token'],
|
|
93
93
|
},
|
|
94
94
|
};
|
|
95
|
-
yield
|
|
95
|
+
yield pieces_common_1.httpClient.sendRequest(request);
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
98
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new-star.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/github/src/lib/trigger/new-star.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"new-star.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/github/src/lib/trigger/new-star.ts"],"names":[],"mappings":";;;;AAAA,qEAGwC;AACxC,+DAKqC;AACrC,sCAAyC;AAE5B,QAAA,kBAAkB,GAAG,IAAA,gCAAa,EAAC;IAC9C,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,qDAAqD;IAClE,KAAK,EAAE;QACL,cAAc,EAAE,qBAAY,CAAC,cAAc;QAC3C,UAAU,EAAE,qBAAY,CAAC,kBAAkB;KAC5C;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,SAAS;QACnB,YAAY,EAAE,sBAAsB;QACpC,YAAY,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,cAAc;YACtB,WAAW,EAAE,2BAA2B;YACxC,OAAO,EAAE;gBACP,OAAO,EAAE,cAAc;gBACvB,IAAI,EAAE,QAAQ;aACf;YACD,QAAQ,EAAE;gBACR,YAAY;gBACZ,UAAU;gBACV,SAAS;gBACT,WAAW;gBACX,QAAQ;aACT;YACD,YAAY,EAAE,QAAQ;YACtB,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,EAAE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C,CAAC;QACL,CAAC;KAAA;IACK,SAAS,CAAC,OAAO;;YACrB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAqB,UAAU,CAAC,CAAC;YACzE,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,EAAE;gBAC/C,MAAM,OAAO,GAAgB;oBAC3B,MAAM,EAAE,0BAAU,CAAC,MAAM;oBACzB,GAAG,EAAE,GAAG,qBAAY,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,IAAI,QAAQ,CAAC,IAAI,UAAU,QAAQ,CAAC,SAAS,EAAE;oBACnG,cAAc,EAAE;wBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;wBACrC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAE,CAAC,cAAc,CAAC;qBAC7D;iBACF,CAAC;gBACF,MAAM,0BAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;aACvC;QACH,CAAC;KAAA;IACK,GAAG,CAAC,OAAO;;YACf,IAAI,iBAAiB,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBAC3C,OAAO,EAAE,CAAC;aACX;YACD,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;KAAA;CACF,CAAC,CAAC;AAEH,SAAS,iBAAiB,CAAC,OAA4B;IACrD,OAAO,OAAO,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC;AACtC,CAAC"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.githubRegisterTrigger = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
7
|
const common_1 = require("../common");
|
|
8
|
-
const githubRegisterTrigger = ({ name, displayName, description, sampleData }) => (0,
|
|
8
|
+
const githubRegisterTrigger = ({ name, displayName, description, sampleData }) => (0, pieces_framework_1.createTrigger)({
|
|
9
9
|
name: `trigger_${name}`,
|
|
10
10
|
displayName,
|
|
11
11
|
description,
|
|
@@ -14,12 +14,12 @@ const githubRegisterTrigger = ({ name, displayName, description, sampleData }) =
|
|
|
14
14
|
repository: common_1.githubCommon.repositoryDropdown
|
|
15
15
|
},
|
|
16
16
|
sampleData,
|
|
17
|
-
type:
|
|
17
|
+
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
18
18
|
onEnable(context) {
|
|
19
19
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
20
|
const { repo, owner } = context.propsValue['repository'];
|
|
21
21
|
const request = {
|
|
22
|
-
method:
|
|
22
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
23
23
|
url: `${common_1.githubCommon.baseUrl}/repos/${owner}/${repo}/hooks`,
|
|
24
24
|
body: {
|
|
25
25
|
owner: owner,
|
|
@@ -33,12 +33,12 @@ const githubRegisterTrigger = ({ name, displayName, description, sampleData }) =
|
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
35
|
authentication: {
|
|
36
|
-
type:
|
|
36
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
37
37
|
token: context.propsValue['authentication']['access_token'],
|
|
38
38
|
},
|
|
39
39
|
queryParams: {},
|
|
40
40
|
};
|
|
41
|
-
const { body: webhook } = yield
|
|
41
|
+
const { body: webhook } = yield pieces_common_1.httpClient.sendRequest(request);
|
|
42
42
|
yield context.store.put(`github_${name}_trigger`, {
|
|
43
43
|
webhookId: webhook.id,
|
|
44
44
|
owner: owner,
|
|
@@ -51,14 +51,14 @@ const githubRegisterTrigger = ({ name, displayName, description, sampleData }) =
|
|
|
51
51
|
const response = yield context.store.get(`github_${name}_trigger`);
|
|
52
52
|
if (response !== null && response !== undefined) {
|
|
53
53
|
const request = {
|
|
54
|
-
method:
|
|
54
|
+
method: pieces_common_1.HttpMethod.DELETE,
|
|
55
55
|
url: `${common_1.githubCommon.baseUrl}/repos/${response.owner}/${response.repo}/hooks/${response.webhookId}`,
|
|
56
56
|
authentication: {
|
|
57
|
-
type:
|
|
57
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
58
58
|
token: context.propsValue['authentication']['access_token'],
|
|
59
59
|
},
|
|
60
60
|
};
|
|
61
|
-
yield
|
|
61
|
+
yield pieces_common_1.httpClient.sendRequest(request);
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-trigger.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/github/src/lib/trigger/register-trigger.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"register-trigger.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/github/src/lib/trigger/register-trigger.ts"],"names":[],"mappings":";;;;AAAA,qEAGwC;AACxC,+DAKqC;AACrC,sCAAyC;AAElC,MAAM,qBAAqB,GAAG,CAAC,EACpC,IAAI,EACJ,WAAW,EACX,WAAW,EACX,UAAU,EAMX,EAAE,EAAE,CAAC,IAAA,gCAAa,EAAC;IAClB,IAAI,EAAE,WAAW,IAAI,EAAE;IACvB,WAAW;IACX,WAAW;IACX,KAAK,EAAE;QACL,cAAc,EAAE,qBAAY,CAAC,cAAc;QAC3C,UAAU,EAAE,qBAAY,CAAC,kBAAkB;KAC5C;IACD,UAAU;IACV,IAAI,EAAE,kCAAe,CAAC,OAAO;IACvB,QAAQ,CAAC,OAAO;;YACpB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAE,CAAC;YAC1D,MAAM,OAAO,GAAgB;gBAC3B,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,GAAG,qBAAY,CAAC,OAAO,UAAU,KAAK,IAA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