Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into hubspot
Browse files Browse the repository at this point in the history
  • Loading branch information
kishanprmr committed Dec 27, 2024
2 parents 3c9be15 + d327587 commit 925560c
Show file tree
Hide file tree
Showing 109 changed files with 4,539 additions and 1,491 deletions.
5 changes: 1 addition & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint",
"Angular.ng-template",
"cipchk.cssrem",
"huizhou.githd",
"supermaven.supermaven"
"huizhou.githd"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.0'
services:
activepieces:
image: ghcr.io/activepieces/activepieces:0.38.1
image: ghcr.io/activepieces/activepieces:0.38.3
container_name: activepieces
restart: unless-stopped
## Enable the following line if you already use AP_EXECUTION_MODE with SANDBOXED or old activepieces, checking the breaking change documentation for more info.
Expand Down
2 changes: 1 addition & 1 deletion docs/handbook/hiring/hiring.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Engineers are the majority of the Activepieces team, and we are always looking f
We'll chat about your past experiences and how you design products. It's like having a friendly conversation where we reflect on what you've done before.
</Step>
<Step title="Work Trial">
You'll do paid task for a short time (1-2 days). These tasks help us understand how well we work together.
You'll do open source task for one day. This open source contribution task help us understand how well we work together.
</Step>
</Steps>

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "activepieces",
"version": "0.38.1",
"rcVersion": "0.38.0-rc.0",
"version": "0.38.3",
"rcVersion": "0.39.0-rc.0",
"scripts": {
"prepare": "husky install",
"serve:frontend": "nx serve react-ui",
Expand Down
2 changes: 2 additions & 0 deletions packages/ee/shared/src/lib/audit-events/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export const ListAuditEventsRequest = Type.Object({
action: Type.Optional(Type.String()),
projectId: Type.Optional(Type.Array(Type.String())),
userId: Type.Optional(Type.String()),
createdBefore: Type.Optional(Type.String()),
createdAfter: Type.Optional(Type.String()),
});

export type ListAuditEventsRequest = Static<typeof ListAuditEventsRequest>;
Expand Down
19 changes: 0 additions & 19 deletions packages/ee/shared/src/lib/git-repo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ export enum GitBranchType {
DEVELOPMENT = 'DEVELOPMENT',
}

export const GitProjectMappingState = Type.Object({
flows: Type.Record(Type.String(), Type.Object({
sourceId: Type.String(),
})),
})

export type GitProjectMappingState = Static<typeof GitProjectMappingState>

export const GitRepo = Type.Object({
...BaseModelSchema,
remoteUrl: Type.String(),
Expand All @@ -28,7 +20,6 @@ export const GitRepo = Type.Object({
projectId: Type.String(),
sshPrivateKey: Type.String(),
slug: Type.String(),
mapping: Type.Optional(GitProjectMappingState),
})

export type GitRepo = Static<typeof GitRepo>
Expand All @@ -51,16 +42,6 @@ export const PushGitRepoRequest = Type.Object({

export type PushGitRepoRequest = Static<typeof PushGitRepoRequest>

export const PullGitRepoFromProjectRequest = Type.Object({
projectId: Type.String(),
})
export type PullGitRepoFromProjectRequest = Static<typeof PullGitRepoFromProjectRequest>

export const PullGitRepoRequest = Type.Object({
dryRun: Type.Optional(Type.Boolean()),
})
export type PullGitRepoRequest = Static<typeof PullGitRepoRequest>

export const ConfigureRepoRequest = Type.Object({
projectId: Type.String({
minLength: 1,
Expand Down
1 change: 1 addition & 0 deletions packages/ee/shared/src/lib/project/project-requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { NotificationStatus, PiecesFilterType, SAFE_STRING_PATTERN } from "@acti

export const UpdateProjectPlatformRequest = Type.Object({
notifyStatus: Type.Optional(Type.Enum(NotificationStatus)),
releasesEnabled: Type.Optional(Type.Boolean()),
displayName: Type.Optional(Type.String({
pattern: SAFE_STRING_PATTERN,
})),
Expand Down
2 changes: 1 addition & 1 deletion packages/pieces/community/file-helper/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "@activepieces/piece-file-helper",
"version": "0.1.4"
"version": "0.1.5"
}
3 changes: 2 additions & 1 deletion packages/pieces/community/file-helper/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { PieceCategory } from '@activepieces/shared';
import { readFileAction } from './lib/actions/read-file';
import { createFile } from './lib/actions/create-file';
import { changeFileEncoding } from './lib/actions/change-file-encoding';
import { checkFileType} from './lib/actions/check-file-type';

export const filesHelper = createPiece({
displayName: 'Files Helper',
Expand All @@ -12,6 +13,6 @@ export const filesHelper = createPiece({
logoUrl: 'https://cdn.activepieces.com/pieces/file-piece.svg',
categories: [PieceCategory.CORE],
authors: ['kishanprmr', 'MoShizzle', 'abuaboud', 'Seb-C'],
actions: [readFileAction, createFile, changeFileEncoding],
actions: [readFileAction, createFile, changeFileEncoding, checkFileType],
triggers: [],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { predefinedMimeTypes } from '../common/mimeTypes';
import mime from 'mime-types';

export const checkFileType = createAction({
name: 'checkFileType',
displayName: 'Check file type',
description: 'Check MIME type of a file and filter based on selected types',
props: {
file: Property.File({
displayName: 'File to Check',
required: true,
}),
mimeTypes: Property.StaticDropdown({
displayName: 'Select MIME Types',
required: true,
options: {
options: predefinedMimeTypes,
},
description: 'Choose one or more MIME types to check against the file.',
}),
},
async run(context) {
const file = context.propsValue.file;

const selectedMimeTypes = context.propsValue.mimeTypes;

// Determine the MIME type of the file
const fileType = file.extension ? mime.lookup(file.extension) || 'application/octet-stream' : 'application/octet-stream';

// Check if the file's MIME type matches any of the selected MIME types.
const isMatch = fileType && selectedMimeTypes.includes(fileType);

return {
mimeType: fileType || 'unknown',
isMatch,
};
},
});
88 changes: 88 additions & 0 deletions packages/pieces/community/file-helper/src/lib/common/mimeTypes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
// Check out: https://developer.mozilla.org/en-US/docs/Web/HTTP/MIME_types
// Check out: https://developer.mozilla.org/en-US/docs/Web/HTTP/MIME_types/Common_types
export const predefinedMimeTypes = [
// important MIME types for Web developers
{ label: 'Octet-stream', value: 'application/octet-stream' },
// Textual Files
{ label: 'Plain Text', value: 'text/plain' },
{ label: 'CSS Stylesheet', value: 'text/css' },
{ label: 'HTML Document', value: 'text/html' },
{ label: 'JavaScript', value: 'text/javascript' },
{ label: 'CSV File', value: 'text/csv' },
{ label: 'iCalendar Format', value: 'text/calendar' },
// Image Types
{ label: 'APNG Image', value: 'image/apng' },
{ label: 'AVIF Image', value: 'image/avif' },
{ label: 'GIF Image', value: 'image/gif' },
{ label: 'JPEG Image', value: 'image/jpeg' },
{ label: 'PNG Image', value: 'image/png' },
{ label: 'SVG Image', value: 'image/svg+xml' },
{ label: 'WebP Image', value: 'image/webp' },
{ label: 'BMP Image', value: 'image/bmp' },
{ label: 'Icon Format', value: 'image/vnd.microsoft.icon' },
{ label: 'TIFF Image', value: 'image/tiff' },
// Audio Types
{ label: 'AAC Audio', value: 'audio/aac' },
{ label: 'MP3 Audio', value: 'audio/mpeg' },
{ label: 'OGG Audio', value: 'audio/ogg' },
{ label: 'WAV Audio', value: 'audio/wav' },
{ label: 'FLAC Audio', value: 'audio/flac' },
{ label: 'MIDI Audio', value: 'audio/midi' },
{ label: 'WEBM Audio', value: 'audio/webm' },
// Video Types
{ label: 'MP4 Video', value: 'video/mp4' },
{ label: 'WebM Video', value: 'video/webm' },
{ label: 'OGG Video', value: 'video/ogg' },
{ label: 'AVI Video', value: 'video/x-msvideo' },
{ label: 'MPEG Video', value: 'video/mpeg' },
{ label: '3GPP Video', value: 'video/3gpp' },
{ label: '3GPP2 Video', value: 'video/3gpp2' },
// Font Types
{ label: 'EOT Font', value: 'application/vnd.ms-fontobject' },
{ label: 'OpenType Font', value: 'font/otf' },
{ label: 'TrueType Font', value: 'font/ttf' },
{ label: 'WOFF Font', value: 'font/woff' },
{ label: 'WOFF2 Font', value: 'font/woff2' },
// Archive and Compressed Files
{ label: 'BZip Archive', value: 'application/x-bzip' },
{ label: 'BZip2 Archive', value: 'application/x-bzip2' },
{ label: 'GZip Archive', value: 'application/gzip' },
{ label: 'RAR Archive', value: 'application/vnd.rar' },
{ label: 'TAR Archive', value: 'application/x-tar' },
{ label: 'ZIP Archive', value: 'application/zip' },
{ label: '7-Zip Archive', value: 'application/x-7z-compressed' },
// Document Types
{ label: 'AbiWord Document', value: 'application/x-abiword' },
{ label: 'PDF', value: 'application/pdf' },
{ label: 'Microsoft Word', value: 'application/msword' },
{ label: 'Microsoft Word (OpenXML)', value: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' },
{ label: 'Microsoft Excel', value: 'application/vnd.ms-excel' },
{ label: 'Microsoft Excel (OpenXML)', value: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' },
{ label: 'Microsoft PowerPoint', value: 'application/vnd.ms-powerpoint' },
{ label: 'Microsoft PowerPoint (OpenXML)', value: 'application/vnd.openxmlformats-officedocument.presentationml.presentation' },
{ label: 'OpenDocument Presentation', value: 'application/vnd.oasis.opendocument.presentation' },
{ label: 'OpenDocument Spreadsheet', value: 'application/vnd.oasis.opendocument.spreadsheet' },
{ label: 'OpenDocument Text', value: 'application/vnd.oasis.opendocument.text' },
{ label: 'Rich Text Format', value: 'application/rtf' },
{ label: 'Electronic Publication (EPUB)', value: 'application/epub+zip' },
{ label: 'Amazon Kindle eBook', value: 'application/vnd.amazon.ebook' },
{ label: 'XUL', value: 'application/vnd.mozilla.xul+xml' },
{ label: 'PHP Script', value: 'application/x-httpd-php' },
{ label: 'Java Archive (JAR)', value: 'application/java-archive' },
{ label: 'Microsoft Visio', value: 'application/vnd.visio' },
{ label: 'Apple Installer Package', value: 'application/vnd.apple.installer+xml' },
// Multipart
{ label: 'Form Data (multipart/form-data)', value: 'multipart/form-data' },
{ label: 'Partial Content (multipart/byteranges)', value: 'multipart/byteranges' },
// Other Important MIME Types
{ label: 'JSON', value: 'application/json' },
{ label: 'JSON-LD', value: 'application/ld+json' },
{ label: 'XML', value: 'application/xml' },
{ label: 'XHTML', value: 'application/xhtml+xml' },
{ label: 'C-Shell Script', value: 'application/x-csh' },
{ label: 'Bourne Shell Script', value: 'application/x-sh' },
{ label: 'FreeARC Archive', value: 'application/x-freearc' },
{ label: 'CD Audio', value: 'application/x-cdf' },
{ label: 'MPEG Transport Stream', value: 'video/mp2t' },
{ label: 'Opus Audio in Ogg Container', value: 'audio/opus' },
]
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.11.10"
"version": "0.11.11"
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,14 @@ export const findRowsAction = createAction({
const startingRow = propsValue.startingRow ?? 1;
const numberOfRowsToReturn = propsValue.numberOfRows ?? 1;

let rows = await googleSheetsCommon.getGoogleSheetRows({
const rows = await googleSheetsCommon.getGoogleSheetRows({
spreadsheetId: spreadSheetId,
accessToken: auth.access_token,
sheetId: sheetId,
rowIndex_s: startingRow,
rowIndex_e: undefined,
});

// modify row number based on starting row number
rows = rows.map((row) => {
return {
row: row.row + startingRow - 1,
values: row.values,
};
});

const values = rows.map((row) => {
return row.values;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,9 @@ async function getGoogleSheetRows({
const headers = headerResponse.body.values[0]??[];
const headerCount = headers.length;

const labeledRowValues = transformWorkSheetValues(rowsResponse.body.values,0,headerCount);
const startingRow = rowIndex_s? rowIndex_s-1:0;

const labeledRowValues = transformWorkSheetValues(rowsResponse.body.values,startingRow,headerCount);

return labeledRowValues;
}
Expand Down
Loading

0 comments on commit 925560c

Please sign in to comment.