-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* New Feature: Custom Templates in the marketplace. * New Feature: Custom Templates in the marketplace. * Custom Template Delete and Shortcut in the dropdown menu * auto detect framework * minor ui fixes * adding custom template feature for tools * ui tool dialog save template --------- Co-authored-by: Henry <[email protected]>
- Loading branch information
1 parent
44b70ca
commit b02bdc7
Showing
23 changed files
with
1,213 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { ICustomTemplate } from '../../Interface' | ||
import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm' | ||
|
||
@Entity('custom_template') | ||
export class CustomTemplate implements ICustomTemplate { | ||
@PrimaryGeneratedColumn('uuid') | ||
id: string | ||
|
||
@Column() | ||
name: string | ||
|
||
@Column({ type: 'text' }) | ||
flowData: string | ||
|
||
@Column({ nullable: true, type: 'text' }) | ||
description?: string | ||
|
||
@Column({ nullable: true, type: 'text' }) | ||
badge?: string | ||
|
||
@Column({ nullable: true, type: 'text' }) | ||
framework?: string | ||
|
||
@Column({ nullable: true, type: 'text' }) | ||
usecases?: string | ||
|
||
@Column({ nullable: true, type: 'text' }) | ||
type?: string | ||
|
||
@Column({ type: 'timestamp' }) | ||
@CreateDateColumn() | ||
createdDate: Date | ||
|
||
@Column({ type: 'timestamp' }) | ||
@UpdateDateColumn() | ||
updatedDate: Date | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/server/src/database/migrations/mariadb/1725629836652-AddCustomTemplate.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm' | ||
|
||
export class AddCustomTemplate1725629836652 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`CREATE TABLE IF NOT EXISTS \`custom_template\` ( | ||
\`id\` varchar(36) NOT NULL, | ||
\`name\` varchar(255) NOT NULL, | ||
\`flowData\` text NOT NULL, | ||
\`description\` varchar(255) DEFAULT NULL, | ||
\`badge\` varchar(255) DEFAULT NULL, | ||
\`framework\` varchar(255) DEFAULT NULL, | ||
\`usecases\` varchar(255) DEFAULT NULL, | ||
\`type\` varchar(30) DEFAULT NULL, | ||
\`createdDate\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
\`updatedDate\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), | ||
PRIMARY KEY (\`id\`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;` | ||
) | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`DROP TABLE custom_template`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/server/src/database/migrations/mysql/1725629836652-AddCustomTemplate.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm' | ||
|
||
export class AddCustomTemplate1725629836652 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`CREATE TABLE IF NOT EXISTS \`custom_template\` ( | ||
\`id\` varchar(36) NOT NULL, | ||
\`name\` varchar(255) NOT NULL, | ||
\`flowData\` text NOT NULL, | ||
\`description\` varchar(255) DEFAULT NULL, | ||
\`badge\` varchar(255) DEFAULT NULL, | ||
\`framework\` varchar(255) DEFAULT NULL, | ||
\`usecases\` varchar(255) DEFAULT NULL, | ||
\`type\` varchar(30) DEFAULT NULL, | ||
\`createdDate\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), | ||
\`updatedDate\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), | ||
PRIMARY KEY (\`id\`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;` | ||
) | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`DROP TABLE custom_template`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/server/src/database/migrations/postgres/1725629836652-AddCustomTemplate.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm' | ||
|
||
export class AddCustomTemplate1725629836652 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`CREATE TABLE IF NOT EXISTS custom_template ( | ||
id uuid NOT NULL DEFAULT uuid_generate_v4(), | ||
"name" varchar NOT NULL, | ||
"flowData" text NOT NULL, | ||
"description" varchar NULL, | ||
"badge" varchar NULL, | ||
"framework" varchar NULL, | ||
"usecases" varchar NULL, | ||
"type" varchar NULL, | ||
"createdDate" timestamp NOT NULL DEFAULT now(), | ||
"updatedDate" timestamp NOT NULL DEFAULT now(), | ||
CONSTRAINT "PK_3c7cea7d087ac4b91764574cdbf" PRIMARY KEY (id) | ||
);` | ||
) | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`DROP TABLE custom_template`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
packages/server/src/database/migrations/sqlite/1725629836652-AddCustomTemplate.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm' | ||
|
||
export class AddCustomTemplate1725629836652 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`CREATE TABLE IF NOT EXISTS "custom_template" ( | ||
"id" varchar PRIMARY KEY NOT NULL, | ||
"name" varchar NOT NULL, | ||
"flowData" text NOT NULL, | ||
"description" varchar, | ||
"badge" varchar, | ||
"framework" varchar, | ||
"usecases" varchar, | ||
"type" varchar, | ||
"updatedDate" datetime NOT NULL DEFAULT (datetime('now')), | ||
"createdDate" datetime NOT NULL DEFAULT (datetime('now')));` | ||
) | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`DROP TABLE IF EXISTS "custom_template";`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.