Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Simplify and Standardize Chalk Imports #8615

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading