Skip to content

Commit

Permalink
Merge pull request #1054 from contentstack/refactor/CS-41427
Browse files Browse the repository at this point in the history
Removed resolve from import plugin
  • Loading branch information
shafeeqd959 authored Sep 25, 2023
2 parents 69946a0 + 2d4e8d2 commit 6063b47
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import isEmpty from 'lodash/isEmpty';
import values from 'lodash/values';
import { join, resolve } from 'node:path';
import { join } from 'node:path';

import { log, formatError, fsUtil, fileHelper } from '../../utils';
import BaseClass, { ApiOptions } from './base-class';
Expand Down Expand Up @@ -118,7 +118,7 @@ export default class ImportCustomRoles extends BaseClass {
async importCustomRoles() {
if (this.customRoles === undefined || isEmpty(this.customRoles)) {
log(this.importConfig, 'No custom-roles found', 'info');
return resolve();
return;
}

const apiContent = values(this.customRoles);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import isEmpty from 'lodash/isEmpty';
import values from 'lodash/values';
import { join, resolve } from 'node:path';
import { join } from 'node:path';

import { log, formatError, fsUtil, fileHelper } from '../../utils';
import BaseClass, { ApiOptions } from './base-class';
Expand Down Expand Up @@ -67,7 +67,7 @@ export default class ImportEnvironments extends BaseClass {
async importEnvironments() {
if (this.environments === undefined || isEmpty(this.environments)) {
log(this.importConfig, 'No Environment Found', 'info');
return resolve();
return;
}

const apiContent = values(this.environments);
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-import/src/import/modules/extensions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import isEmpty from 'lodash/isEmpty';
import values from 'lodash/values';
import { join, resolve } from 'node:path';
import { join } from 'node:path';

import { log, formatError, fsUtil, fileHelper } from '../../utils';
import BaseClass, { ApiOptions } from './base-class';
Expand Down Expand Up @@ -67,7 +67,7 @@ export default class ImportExtensions extends BaseClass {
async importExtensions(): Promise<any> {
if (this.extensions === undefined || isEmpty(this.extensions)) {
log(this.importConfig, 'No Extensions Found', 'info');
return resolve();
return;
}

const apiContent = values(this.extensions);
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-import/src/import/modules/labels.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import isEmpty from 'lodash/isEmpty';
import values from 'lodash/values';
import omit from 'lodash/omit';
import { join, resolve } from 'node:path';
import { join } from 'node:path';

import { log, formatError, fsUtil, fileHelper } from '../../utils';
import BaseClass, { ApiOptions } from './base-class';
Expand Down Expand Up @@ -72,7 +72,7 @@ export default class Importlabels extends BaseClass {
async importlabels() {
if (this.labels === undefined || isEmpty(this.labels)) {
log(this.importConfig, 'No Label Found', 'info');
return resolve();
return;
}

const apiContent = values(this.labels);
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-import/src/import/modules/webhooks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import isEmpty from 'lodash/isEmpty';
import values from 'lodash/values';
import { join, resolve } from 'node:path';
import { join } from 'node:path';

import { log, formatError, fsUtil, fileHelper } from '../../utils';
import BaseClass, { ApiOptions } from './base-class';
Expand Down Expand Up @@ -69,7 +69,7 @@ export default class ImportWebhooks extends BaseClass {
async importWebhooks() {
if (this.webhooks === undefined || isEmpty(this.webhooks)) {
log(this.importConfig, 'No Webhook Found', 'info');
return resolve();
return;
}

const apiContent = values(this.webhooks);
Expand Down

0 comments on commit 6063b47

Please sign in to comment.