Skip to content

Commit

Permalink
Merge branch 'activepieces:main' into youtube-custom-api
Browse files Browse the repository at this point in the history
  • Loading branch information
kishanprmr committed May 8, 2024
2 parents 6c3a85a + fc9226d commit e1c21b9
Show file tree
Hide file tree
Showing 96 changed files with 2,386 additions and 1,056 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,15 @@
"contributions": [
"plugin"
]
},
{
"login": "thirstycode",
"name": "Pratik Kinage",
"avatar_url": "https://avatars.githubusercontent.com/u/37847256?v=4",
"profile": "https://www.gamespecifications.com/",
"contributions": [
"plugin"
]
}
],
"commitType": "docs"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ Not into coding but still interested in contributing? Come join our [Discord](ht
<td align="center" valign="top" width="14.28%"><a href="http://javix64.com"><img src="https://avatars.githubusercontent.com/u/58471170?v=4?s=100" width="100px;" alt="Javier HM"/><br /><sub><b>Javier HM</b></sub></a><br /><a href="#plugin-javix64" title="Plugin/utility libraries">🔌</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://farag.tech"><img src="https://avatars.githubusercontent.com/u/50884619?v=4?s=100" width="100px;" alt="Mohamed Hassan"/><br /><sub><b>Mohamed Hassan</b></sub></a><br /><a href="https://github.com/activepieces/activepieces/issues?q=author%3AMohamedHassan499" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.coasy.com/"><img src="https://avatars.githubusercontent.com/u/17610709?v=4?s=100" width="100px;" alt="Christian Schab"/><br /><sub><b>Christian Schab</b></sub></a><br /><a href="#plugin-christian-schab" title="Plugin/utility libraries">🔌</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.gamespecifications.com/"><img src="https://avatars.githubusercontent.com/u/37847256?v=4?s=100" width="100px;" alt="Pratik Kinage"/><br /><sub><b>Pratik Kinage</b></sub></a><br /><a href="#plugin-thirstycode" title="Plugin/utility libraries">🔌</a></td>
</tr>
</tbody>
</table>
Expand Down
9 changes: 7 additions & 2 deletions docs/operations/git-sync.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@ This example explains a simple setup for creating development and production env

#### 1. Push Flow to the repository

After making changes in the flow, You click on arrow near the flow name and select "Push to Git", Add commit and puysh.
After making changes in the flow, You click on arrow near the flow name and select "Push to Git", Add commit and push.

### 2. Pull from the Repository
#### 2. Deleting a Flow from the Repository

When you delete a flow from a project that has the project configured on the development branch, it will also automatically delete the flows from Git.


#### 3. Pull from the Repository

<Note>
Please note that the credentials will not be synced automatically. You should manually create identical credentials with the same names in both environments.
Expand Down
72 changes: 69 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "activepieces",
"version": "0.25.1",
"rcVersion": "0.26.0-rc.2",
"rcVersion": "0.26.0-rc.3",
"scripts": {
"prepare": "husky install",
"serve:frontend": "nx serve ui-core",
Expand Down Expand Up @@ -68,6 +68,7 @@
"@sendgrid/mail": "8.0.0",
"@sentry/node": "7.64.0",
"@sinclair/typebox": "0.26.8",
"@slack/web-api": "7.0.4",
"@supabase/supabase-js": "2.33.1",
"@types/imapflow": "1.0.18",
"@types/showdown": "2.0.6",
Expand Down
5 changes: 5 additions & 0 deletions packages/ee/shared/src/lib/git-repo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,13 @@ export type GitRepo = Static<typeof GitRepo>
export const GitRepoWithoutSensitiveData = Type.Omit(GitRepo, ['sshPrivateKey'])
export type GitRepoWithoutSensitiveData = Static<typeof GitRepoWithoutSensitiveData>

export enum GitPushOperationType {
PUSH_FLOW = 'PUSH_FLOW',
DELETE_FLOW = 'DELETE_FLOW',
}

export const PushGitRepoRequest = Type.Object({
type: Type.Enum(GitPushOperationType),
commitMessage: Type.String(),
flowId: Type.String()
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<div class="ap-w-full ap-pt-2">
@if(featureLocked) {
<ap-upgrade-note [insideTab]="true" class="ap-mb-2" [featureNoteTitle]="upgradeNoteTitle" [featureNote]="upgradeNote"
docsLink="https://www.activepieces.com/docs/operations/audit-logs"></ap-upgrade-note>
featureKey="AUDIT_LOGS"
></ap-upgrade-note>
} @else {

<table mat-table [dataSource]="dataSource" class="ap-w-[100%]" i18n-aria-label aria-label="Audit Events">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@if(isFeatureLocked) {
<div class="ap-mb-4">
<ap-upgrade-note
featureKey="PROJECTS"
[featureNoteTitle]="upgradeNoteTitle"
[featureNote]="upgradeNote"
></ap-upgrade-note>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ActionType, assertEqual, FlowError, FlowRunResponse, FlowRunStatus, isNil, LoopStepOutput, PauseMetadata, spreadIfDefined, StepOutput, StepOutputStatus, StopResponse } from '@activepieces/shared'
import { ActionType, assertEqual, FlowError, FlowRunResponse, FlowRunStatus, GenericStepOutput, isNil, LoopStepOutput, LoopStepResult, PauseMetadata, spreadIfDefined, StepOutput, StepOutputStatus, StopResponse } from '@activepieces/shared'
import { nanoid } from 'nanoid'
import { loggingUtils } from '../../helper/logging-utils'
import { StepExecutionPath } from './step-execution-path'
Expand Down Expand Up @@ -67,7 +67,8 @@ export class FlowExecutorContext {
return undefined
}
assertEqual(stepOutput.type, ActionType.LOOP_ON_ITEMS, 'stepOutput.type', 'LOOP_ON_ITEMS')
return stepOutput as LoopStepOutput
// The new LoopStepOutput is needed as casting directly to LoopClassOutput will just cast the data but the class methods will not be available
return new LoopStepOutput(stepOutput as GenericStepOutput<ActionType.LOOP_ON_ITEMS, LoopStepResult>)
}

public isCompleted({ stepName }: { stepName: string }): boolean {
Expand Down
2 changes: 1 addition & 1 deletion packages/pieces/community/apollo/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "@activepieces/piece-apollo",
"version": "0.0.2"
"version": "0.0.3"
}
21 changes: 16 additions & 5 deletions packages/pieces/community/apollo/src/lib/actions/enrich-company.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { apolloAuth } from '../../';
import { Property, createAction } from '@activepieces/pieces-framework';
import { Property, StoreScope, createAction } from '@activepieces/pieces-framework';
import {
HttpMethod,
httpClient,
Expand All @@ -15,12 +15,20 @@ export const enrichCompany = createAction({
description: '',
required: true,
}),
cacheResponse: Property.Checkbox({
displayName: 'Cache Response',
description: 'Store the response in the project store for future use.',
required: false,
defaultValue: true,
}),
},
auth: apolloAuth,
async run({ propsValue, auth, store }) {
const cachedResult = await store.get(`_apollo_org_${propsValue.domain}`)
if (cachedResult) {
return cachedResult;
if (propsValue.cacheResponse) {
const cachedResult = await store.get(`_apollo_org_${propsValue.domain}`, StoreScope.PROJECT);
if (cachedResult) {
return cachedResult;
}
}
const result = await httpClient.sendRequest<{ organization: Record<string, unknown> }>({
method: HttpMethod.GET,
Expand All @@ -30,7 +38,10 @@ export const enrichCompany = createAction({
},
});
const resultOrg = result.body.organization || {};
await store.put(`_apollo_org_${propsValue.domain}`, resultOrg);
if (propsValue.cacheResponse) {
await store.put(`_apollo_org_${propsValue.domain}`, resultOrg, StoreScope.PROJECT);

}
return resultOrg;
},
});
22 changes: 16 additions & 6 deletions packages/pieces/community/apollo/src/lib/actions/match-person.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { apolloAuth } from '../../';
import { HttpMethod, httpClient } from '@activepieces/pieces-common';
import { Property, createAction } from '@activepieces/pieces-framework';
import { Property, StoreScope, createAction } from '@activepieces/pieces-framework';

export const matchPerson = createAction({
name: 'matchPerson',
Expand All @@ -11,13 +11,21 @@ export const matchPerson = createAction({
displayName: 'Email',
description: '',
required: true,
})
}),
cacheResponse: Property.Checkbox({
displayName: 'Cache Response',
description: 'Store the response in the project store for future use.',
required: false,
defaultValue: true,
}),
},
auth: apolloAuth,
async run({ propsValue, auth, store }) {
const cachedResult = await store.get(`_apollo_person_${propsValue.email}`)
if (cachedResult) {
return cachedResult;
if (propsValue.cacheResponse) {
const cachedResult = await store.get(`_apollo_person_${propsValue.email}`, StoreScope.PROJECT);
if (cachedResult) {
return cachedResult;
}
}
const result = await httpClient.sendRequest<{ person: Record<string, unknown> }>({
method: HttpMethod.POST,
Expand All @@ -31,7 +39,9 @@ export const matchPerson = createAction({
}
});
const personResult = result.body.person || {};
await store.put(`_apollo_person_${propsValue.email}`, personResult);
if (propsValue.cacheResponse) {
await store.put(`_apollo_person_${propsValue.email}`, personResult, StoreScope.PROJECT);
}
return personResult;
},
});
2 changes: 1 addition & 1 deletion packages/pieces/community/google-sheets/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "@activepieces/piece-google-sheets",
"version": "0.10.1"
"version": "0.10.3"
}

0 comments on commit e1c21b9

Please sign in to comment.