Skip to content

Commit

Permalink
Merge pull request #8615 from ever-co/refactor/chalk-imports
Browse files Browse the repository at this point in the history
Refactor: Simplify and Standardize Chalk Imports
  • Loading branch information
rahul-rocket authored Dec 24, 2024
2 parents dd35538 + ecfb870 commit c0187af
Show file tree
Hide file tree
Showing 52 changed files with 103 additions and 110 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import * as chalk from 'chalk';
import { RolePermissionUtils } from '../../role-permission/utils';
import { DatabaseTypeEnum } from '@gauzy/config';
import { RolePermissionUtils } from '../../role-permission/utils';

export class MigrateRolePermisisons1679765443208 implements MigrationInterface {
name = 'MigrateRolePermisisons1679765443208';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';
import { yellow } from 'chalk';

export class MysqlTablesMigration1705138670108 implements MigrationInterface {
name = 'MysqlTablesMigration1705138670108';
Expand All @@ -11,7 +11,7 @@ export class MysqlTablesMigration1705138670108 implements MigrationInterface {
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import { MigrationInterface, QueryRunner } from "typeorm";
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from "@gauzy/config";
import { yellow } from "chalk";

export class UpgradeEstimateEmailTableTokenColumnValue1706968055472 implements MigrationInterface {

Expand All @@ -13,7 +13,7 @@ export class UpgradeEstimateEmailTableTokenColumnValue1706968055472 implements M
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import { MigrationInterface, QueryRunner } from "typeorm";
import { DatabaseTypeEnum } from "@gauzy/config";
import { yellow } from "chalk";
import * as chalk from 'chalk';

export class AlterActivityEntityTable1708158787002 implements MigrationInterface {

Expand All @@ -13,7 +13,7 @@ export class AlterActivityEntityTable1708158787002 implements MigrationInterface
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import { MigrationInterface, QueryRunner } from "typeorm";
import { yellow } from "chalk";
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from "@gauzy/config";

export class AlterStorageProvider1711564805530 implements MigrationInterface {
Expand All @@ -13,7 +13,7 @@ export class AlterStorageProvider1711564805530 implements MigrationInterface {
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import { MigrationInterface, QueryRunner } from "typeorm";
import { yellow } from "chalk";
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from "@gauzy/config";

export class AlterEmployeeCustomEntityFields1713187612530 implements MigrationInterface {
Expand All @@ -13,7 +13,7 @@ export class AlterEmployeeCustomEntityFields1713187612530 implements MigrationIn
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import { MigrationInterface, QueryRunner } from "typeorm";
import { yellow } from "chalk";
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from "@gauzy/config";

export class AlterTagCustomEntityFields1713275626299 implements MigrationInterface {
Expand All @@ -13,7 +13,7 @@ export class AlterTagCustomEntityFields1713275626299 implements MigrationInterfa
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { yellow } from 'chalk';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';

export class CreateDailyPlanAndTasksTables1714185928435 implements MigrationInterface {
Expand All @@ -11,7 +11,7 @@ export class CreateDailyPlanAndTasksTables1714185928435 implements MigrationInte
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import { MigrationInterface, QueryRunner } from "typeorm";
import { yellow } from "chalk";
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from "@gauzy/config";

export class AlterCustomFieldsDefaultColumn1714319484155 implements MigrationInterface {
Expand All @@ -13,7 +13,7 @@ export class AlterCustomFieldsDefaultColumn1714319484155 implements MigrationInt
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { yellow } from 'chalk';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';

export class UpdateDailyPlanWorkTimeType1715002586455 implements MigrationInterface {
Expand All @@ -11,7 +11,7 @@ export class UpdateDailyPlanWorkTimeType1715002586455 implements MigrationInterf
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { yellow } from 'chalk';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';

export class AlterIssueTypeAddColumnIsDefault1715604925998 implements MigrationInterface {
Expand All @@ -11,7 +11,7 @@ export class AlterIssueTypeAddColumnIsDefault1715604925998 implements MigrationI
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { yellow } from 'chalk';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';

export class AlterOrganizationTeamAddShareProfileViewField1715680147522 implements MigrationInterface {
Expand All @@ -11,7 +11,7 @@ export class AlterOrganizationTeamAddShareProfileViewField1715680147522 implemen
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { yellow } from 'chalk';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';

export class AddTimeFormatToUserEntity1716206591055 implements MigrationInterface {
Expand All @@ -11,7 +11,7 @@ export class AddTimeFormatToUserEntity1716206591055 implements MigrationInterfac
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { yellow } from 'chalk';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';

export class CreateSocialAccountEntity1716839592949 implements MigrationInterface {
Expand All @@ -11,7 +11,7 @@ export class CreateSocialAccountEntity1716839592949 implements MigrationInterfac
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { yellow } from 'chalk';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';

export class AlterOrganizationTeamAddRequirePlanToTrackField1718386634024 implements MigrationInterface {
Expand All @@ -11,7 +11,7 @@ export class AlterOrganizationTeamAddRequirePlanToTrackField1718386634024 implem
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { yellow } from 'chalk';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';

export class AlterOrganizationGithubRepositoryEntityTable1719937371312 implements MigrationInterface {
Expand All @@ -11,7 +11,7 @@ export class AlterOrganizationGithubRepositoryEntityTable1719937371312 implement
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { yellow } from 'chalk';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';

export class AlterOrganizationGithubRepositoryIssueEntityTable1719994643595 implements MigrationInterface {
Expand All @@ -11,7 +11,7 @@ export class AlterOrganizationGithubRepositoryIssueEntityTable1719994643595 impl
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { yellow } from 'chalk';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';

export class AlterOrganizationProjectCustomEntityFields1720177290238 implements MigrationInterface {
Expand All @@ -11,7 +11,7 @@ export class AlterOrganizationProjectCustomEntityFields1720177290238 implements
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { yellow } from 'chalk';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';

export class CreateProductReviewTable1720852356593 implements MigrationInterface {
Expand All @@ -11,7 +11,7 @@ export class CreateProductReviewTable1720852356593 implements MigrationInterface
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { yellow } from 'chalk';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';

export class AlterTaskStatusesAddWorkFlowFields1723645947040 implements MigrationInterface {
Expand All @@ -11,7 +11,7 @@ export class AlterTaskStatusesAddWorkFlowFields1723645947040 implements Migratio
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { yellow } from 'chalk';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';

export class AlterDailyPlanAddTeamRelation1724062299873 implements MigrationInterface {
Expand All @@ -11,7 +11,7 @@ export class AlterDailyPlanAddTeamRelation1724062299873 implements MigrationInte
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { yellow } from 'chalk';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';

export class CreateProjectModuleTable1724929664505 implements MigrationInterface {
Expand All @@ -11,7 +11,7 @@ export class CreateProjectModuleTable1724929664505 implements MigrationInterface
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { yellow } from 'chalk';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';

export class AlterTaskEntityAddIsDraftField1725788544671 implements MigrationInterface {
Expand All @@ -11,7 +11,7 @@ export class AlterTaskEntityAddIsDraftField1725788544671 implements MigrationInt
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { yellow } from 'chalk';
import * as chalk from 'chalk';
import { DatabaseTypeEnum } from '@gauzy/config';

export class AlterTaskStatusEntityAddingDefaultField1725794120289 implements MigrationInterface {
Expand All @@ -11,7 +11,7 @@ export class AlterTaskStatusEntityAddingDefaultField1725794120289 implements Mig
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
console.log(chalk.yellow(this.name + ' start running!'));

switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Loading

0 comments on commit c0187af

Please sign in to comment.