@contentstack/cli-variants 2.0.0-beta.3 → 2.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/export/attributes.js +1 -1
- package/lib/export/audiences.js +1 -1
- package/lib/export/events.js +1 -1
- package/lib/export/experiences.js +1 -1
- package/lib/export/projects.js +1 -1
- package/lib/export/variant-entries.js +1 -1
- package/lib/import/attribute.js +1 -1
- package/lib/import/audiences.js +1 -1
- package/lib/import/events.js +1 -1
- package/lib/import/experiences.js +2 -2
- package/lib/import/project.js +1 -1
- package/lib/types/utils.d.ts +0 -1
- package/lib/utils/logger.js +1 -1
- package/package.json +4 -4
- package/src/export/attributes.ts +1 -1
- package/src/export/audiences.ts +1 -1
- package/src/export/events.ts +1 -1
- package/src/export/experiences.ts +1 -1
- package/src/export/projects.ts +1 -1
- package/src/export/variant-entries.ts +1 -1
- package/src/import/attribute.ts +1 -1
- package/src/import/audiences.ts +1 -1
- package/src/import/events.ts +1 -1
- package/src/import/experiences.ts +2 -2
- package/src/import/project.ts +1 -1
- package/src/types/utils.ts +0 -1
- package/src/utils/logger.ts +1 -1
package/lib/export/attributes.js
CHANGED
|
@@ -27,7 +27,7 @@ class ExportAttributes extends utils_1.PersonalizationAdapter {
|
|
|
27
27
|
this.exportConfig = exportConfig;
|
|
28
28
|
this.personalizeConfig = exportConfig.modules.personalize;
|
|
29
29
|
this.attributesConfig = exportConfig.modules.attributes;
|
|
30
|
-
this.attributesFolderPath = (0, node_path_1.resolve)((0, cli_utilities_1.sanitizePath)(exportConfig.
|
|
30
|
+
this.attributesFolderPath = (0, node_path_1.resolve)((0, cli_utilities_1.sanitizePath)(exportConfig.exportDir), (0, cli_utilities_1.sanitizePath)(exportConfig.branchName || ''), (0, cli_utilities_1.sanitizePath)(this.personalizeConfig.dirName), (0, cli_utilities_1.sanitizePath)(this.attributesConfig.dirName));
|
|
31
31
|
this.attributes = [];
|
|
32
32
|
this.exportConfig.context.module = constants_1.MODULE_CONTEXTS.ATTRIBUTES;
|
|
33
33
|
}
|
package/lib/export/audiences.js
CHANGED
|
@@ -27,7 +27,7 @@ class ExportAudiences extends utils_1.PersonalizationAdapter {
|
|
|
27
27
|
this.exportConfig = exportConfig;
|
|
28
28
|
this.personalizeConfig = exportConfig.modules.personalize;
|
|
29
29
|
this.audiencesConfig = exportConfig.modules.audiences;
|
|
30
|
-
this.audiencesFolderPath = (0, node_path_1.resolve)((0, cli_utilities_1.sanitizePath)(exportConfig.
|
|
30
|
+
this.audiencesFolderPath = (0, node_path_1.resolve)((0, cli_utilities_1.sanitizePath)(exportConfig.exportDir), (0, cli_utilities_1.sanitizePath)(exportConfig.branchName || ''), (0, cli_utilities_1.sanitizePath)(this.personalizeConfig.dirName), (0, cli_utilities_1.sanitizePath)(this.audiencesConfig.dirName));
|
|
31
31
|
this.audiences = [];
|
|
32
32
|
this.exportConfig.context.module = constants_1.MODULE_CONTEXTS.AUDIENCES;
|
|
33
33
|
}
|
package/lib/export/events.js
CHANGED
|
@@ -27,7 +27,7 @@ class ExportEvents extends utils_1.PersonalizationAdapter {
|
|
|
27
27
|
this.exportConfig = exportConfig;
|
|
28
28
|
this.personalizeConfig = exportConfig.modules.personalize;
|
|
29
29
|
this.eventsConfig = exportConfig.modules.events;
|
|
30
|
-
this.eventsFolderPath = (0, node_path_1.resolve)((0, cli_utilities_1.sanitizePath)(exportConfig.
|
|
30
|
+
this.eventsFolderPath = (0, node_path_1.resolve)((0, cli_utilities_1.sanitizePath)(exportConfig.exportDir), (0, cli_utilities_1.sanitizePath)(exportConfig.branchName || ''), (0, cli_utilities_1.sanitizePath)(this.personalizeConfig.dirName), (0, cli_utilities_1.sanitizePath)(this.eventsConfig.dirName));
|
|
31
31
|
this.events = [];
|
|
32
32
|
this.exportConfig.context.module = constants_1.MODULE_CONTEXTS.EVENTS;
|
|
33
33
|
}
|
|
@@ -59,7 +59,7 @@ class ExportExperiences extends utils_1.PersonalizationAdapter {
|
|
|
59
59
|
});
|
|
60
60
|
this.exportConfig = exportConfig;
|
|
61
61
|
this.personalizeConfig = exportConfig.modules.personalize;
|
|
62
|
-
this.experiencesFolderPath = path.resolve((0, cli_utilities_1.sanitizePath)(exportConfig.
|
|
62
|
+
this.experiencesFolderPath = path.resolve((0, cli_utilities_1.sanitizePath)(exportConfig.exportDir), (0, cli_utilities_1.sanitizePath)(exportConfig.branchName || ''), (0, cli_utilities_1.sanitizePath)(this.personalizeConfig.dirName), 'experiences');
|
|
63
63
|
this.exportConfig.context.module = constants_1.MODULE_CONTEXTS.EXPERIENCES;
|
|
64
64
|
}
|
|
65
65
|
start() {
|
package/lib/export/projects.js
CHANGED
|
@@ -22,7 +22,7 @@ class ExportProjects extends utils_1.PersonalizationAdapter {
|
|
|
22
22
|
});
|
|
23
23
|
this.exportConfig = exportConfig;
|
|
24
24
|
this.personalizeConfig = exportConfig.modules.personalize;
|
|
25
|
-
this.projectsFolderPath = (0, node_path_1.resolve)((0, cli_utilities_1.sanitizePath)(exportConfig.
|
|
25
|
+
this.projectsFolderPath = (0, node_path_1.resolve)((0, cli_utilities_1.sanitizePath)(exportConfig.exportDir), (0, cli_utilities_1.sanitizePath)(exportConfig.branchName || ''), (0, cli_utilities_1.sanitizePath)(this.personalizeConfig.dirName), 'projects');
|
|
26
26
|
this.projectsData = [];
|
|
27
27
|
this.exportConfig.context.module = constants_1.MODULE_CONTEXTS.PROJECTS;
|
|
28
28
|
}
|
|
@@ -68,7 +68,7 @@ class VariantEntries extends variant_api_adapter_1.default {
|
|
|
68
68
|
this.processInitialized = false;
|
|
69
69
|
this.totalVariantCount = 0;
|
|
70
70
|
this.processedVariantCount = 0;
|
|
71
|
-
this.entriesDirPath = (0, path_1.resolve)((0, cli_utilities_1.sanitizePath)(config.
|
|
71
|
+
this.entriesDirPath = (0, path_1.resolve)((0, cli_utilities_1.sanitizePath)(config.exportDir), (0, cli_utilities_1.sanitizePath)(config.branchName || ''), (0, cli_utilities_1.sanitizePath)(config.modules.entries.dirName));
|
|
72
72
|
if (this.config && this.config.context) {
|
|
73
73
|
this.config.context.module = 'variant-entries';
|
|
74
74
|
}
|
package/lib/import/attribute.js
CHANGED
|
@@ -112,7 +112,7 @@ class Attribute extends utils_1.PersonalizationAdapter {
|
|
|
112
112
|
return this.withLoadingSpinner('ATTRIBUTES: Analyzing import data...', () => __awaiter(this, void 0, void 0, function* () {
|
|
113
113
|
var _a;
|
|
114
114
|
const { dirName, fileName } = this.attributeConfig;
|
|
115
|
-
const attributesPath = (0, path_1.resolve)((0, cli_utilities_1.sanitizePath)(this.config.
|
|
115
|
+
const attributesPath = (0, path_1.resolve)((0, cli_utilities_1.sanitizePath)(this.config.contentDir), (0, cli_utilities_1.sanitizePath)(this.personalizeConfig.dirName), (0, cli_utilities_1.sanitizePath)(dirName), (0, cli_utilities_1.sanitizePath)(fileName));
|
|
116
116
|
cli_utilities_1.log.debug(`Checking for attributes file: ${attributesPath}`, this.config.context);
|
|
117
117
|
if (!(0, fs_1.existsSync)(attributesPath)) {
|
|
118
118
|
cli_utilities_1.log.warn(`Attributes file not found: ${attributesPath}`, this.config.context);
|
package/lib/import/audiences.js
CHANGED
|
@@ -118,7 +118,7 @@ class Audiences extends utils_1.PersonalizationAdapter {
|
|
|
118
118
|
return this.withLoadingSpinner('AUDIENCES: Analyzing import data...', () => __awaiter(this, void 0, void 0, function* () {
|
|
119
119
|
var _a;
|
|
120
120
|
const { dirName, fileName } = this.audienceConfig;
|
|
121
|
-
const audiencesPath = (0, path_1.resolve)((0, cli_utilities_1.sanitizePath)(this.config.
|
|
121
|
+
const audiencesPath = (0, path_1.resolve)((0, cli_utilities_1.sanitizePath)(this.config.contentDir), (0, cli_utilities_1.sanitizePath)(this.personalizeConfig.dirName), (0, cli_utilities_1.sanitizePath)(dirName), (0, cli_utilities_1.sanitizePath)(fileName));
|
|
122
122
|
cli_utilities_1.log.debug(`Checking for audiences file: ${audiencesPath}`, this.config.context);
|
|
123
123
|
if (!(0, fs_1.existsSync)(audiencesPath)) {
|
|
124
124
|
cli_utilities_1.log.warn(`Audiences file not found: ${audiencesPath}`, this.config.context);
|
package/lib/import/events.js
CHANGED
|
@@ -115,7 +115,7 @@ class Events extends utils_1.PersonalizationAdapter {
|
|
|
115
115
|
return this.withLoadingSpinner('EVENTS: Analyzing import data...', () => __awaiter(this, void 0, void 0, function* () {
|
|
116
116
|
var _a;
|
|
117
117
|
const { dirName, fileName } = this.eventConfig;
|
|
118
|
-
const eventsPath = (0, path_1.resolve)((0, cli_utilities_1.sanitizePath)(this.config.
|
|
118
|
+
const eventsPath = (0, path_1.resolve)((0, cli_utilities_1.sanitizePath)(this.config.contentDir), (0, cli_utilities_1.sanitizePath)(this.personalizeConfig.dirName), (0, cli_utilities_1.sanitizePath)(dirName), (0, cli_utilities_1.sanitizePath)(fileName));
|
|
119
119
|
cli_utilities_1.log.debug(`Checking for events file: ${eventsPath}`, this.config.context);
|
|
120
120
|
if (!(0, fs_1.existsSync)(eventsPath)) {
|
|
121
121
|
cli_utilities_1.log.warn(`Events file not found: ${eventsPath}`, this.config.context);
|
|
@@ -45,7 +45,7 @@ class Experiences extends utils_1.PersonalizationAdapter {
|
|
|
45
45
|
super(Object.assign(config, conf));
|
|
46
46
|
this.config = config;
|
|
47
47
|
this.personalizeConfig = this.config.modules.personalize;
|
|
48
|
-
this.experiencesDirPath = (0, path_1.resolve)((0, cli_utilities_1.sanitizePath)(this.config.
|
|
48
|
+
this.experiencesDirPath = (0, path_1.resolve)((0, cli_utilities_1.sanitizePath)(this.config.contentDir), (0, cli_utilities_1.sanitizePath)(this.personalizeConfig.dirName), (0, cli_utilities_1.sanitizePath)(this.personalizeConfig.experiences.dirName));
|
|
49
49
|
this.experiencesPath = (0, path_1.join)((0, cli_utilities_1.sanitizePath)(this.experiencesDirPath), (0, cli_utilities_1.sanitizePath)(this.personalizeConfig.experiences.fileName));
|
|
50
50
|
this.experienceConfig = this.personalizeConfig.experiences;
|
|
51
51
|
this.audienceConfig = this.personalizeConfig.audiences;
|
|
@@ -59,7 +59,7 @@ class Experiences extends utils_1.PersonalizationAdapter {
|
|
|
59
59
|
this.failedCmsExpPath = (0, path_1.resolve)((0, cli_utilities_1.sanitizePath)(this.expMapperDirPath), 'failed-cms-experience.json');
|
|
60
60
|
this.failedCmsExpPath = (0, path_1.resolve)((0, cli_utilities_1.sanitizePath)(this.expMapperDirPath), 'failed-cms-experience.json');
|
|
61
61
|
this.experienceCTsPath = (0, path_1.resolve)((0, cli_utilities_1.sanitizePath)(this.experiencesDirPath), 'experiences-content-types.json');
|
|
62
|
-
this.experienceVariantsIdsPath = (0, path_1.resolve)((0, cli_utilities_1.sanitizePath)(this.config.
|
|
62
|
+
this.experienceVariantsIdsPath = (0, path_1.resolve)((0, cli_utilities_1.sanitizePath)(this.config.contentDir), (0, cli_utilities_1.sanitizePath)(this.personalizeConfig.dirName), (0, cli_utilities_1.sanitizePath)(this.experienceConfig.dirName), 'experiences-variants-ids.json');
|
|
63
63
|
this.variantUidMapperFilePath = (0, path_1.resolve)((0, cli_utilities_1.sanitizePath)(this.expMapperDirPath), 'variants-uid-mapping.json');
|
|
64
64
|
this.experiencesUidMapper = {};
|
|
65
65
|
this.cmsVariantGroups = {};
|
package/lib/import/project.js
CHANGED
|
@@ -117,7 +117,7 @@ class Project extends utils_1.PersonalizationAdapter {
|
|
|
117
117
|
var _a;
|
|
118
118
|
const personalize = this.config.modules.personalize;
|
|
119
119
|
const { dirName, fileName } = personalize.projects;
|
|
120
|
-
const projectPath = (0, path_1.join)((0, cli_utilities_1.sanitizePath)(this.config.
|
|
120
|
+
const projectPath = (0, path_1.join)((0, cli_utilities_1.sanitizePath)(this.config.contentDir), (0, cli_utilities_1.sanitizePath)(personalize.dirName), (0, cli_utilities_1.sanitizePath)(dirName), (0, cli_utilities_1.sanitizePath)(fileName));
|
|
121
121
|
cli_utilities_1.log.debug(`Checking for project file: ${projectPath}`, this.config.context);
|
|
122
122
|
if (!(0, fs_1.existsSync)(projectPath)) {
|
|
123
123
|
this.config.modules.personalize.importData = false;
|
package/lib/types/utils.d.ts
CHANGED
package/lib/utils/logger.js
CHANGED
|
@@ -156,7 +156,7 @@ function init(_logPath, module) {
|
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
158
|
const log = (config, message, type) => {
|
|
159
|
-
const logsPath = config.data;
|
|
159
|
+
const logsPath = 'exportDir' in config ? config.exportDir : 'contentDir' in config ? config.contentDir : config.data;
|
|
160
160
|
// ignoring the type argument, as we are not using it to create a logfile anymore
|
|
161
161
|
const module = config['backupDir'] ? 'import' : 'export';
|
|
162
162
|
if (type !== 'error') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-variants",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.5",
|
|
4
4
|
"description": "Variants plugin",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"typescript": "^5.8.3"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@contentstack/cli-utilities": "~
|
|
30
|
+
"@contentstack/cli-utilities": "~2.0.0-beta",
|
|
31
31
|
"@oclif/core": "^4.3.0",
|
|
32
32
|
"@oclif/plugin-help": "^6.2.28",
|
|
33
|
-
"lodash": "^4.17.
|
|
33
|
+
"lodash": "^4.17.23",
|
|
34
34
|
"mkdirp": "^1.0.4",
|
|
35
35
|
"winston": "^3.17.0"
|
|
36
36
|
}
|
|
37
|
-
}
|
|
37
|
+
}
|
package/src/export/attributes.ts
CHANGED
|
@@ -22,7 +22,7 @@ export default class ExportAttributes extends PersonalizationAdapter<ExportConfi
|
|
|
22
22
|
this.personalizeConfig = exportConfig.modules.personalize;
|
|
23
23
|
this.attributesConfig = exportConfig.modules.attributes;
|
|
24
24
|
this.attributesFolderPath = pResolve(
|
|
25
|
-
sanitizePath(exportConfig.
|
|
25
|
+
sanitizePath(exportConfig.exportDir),
|
|
26
26
|
sanitizePath(exportConfig.branchName || ''),
|
|
27
27
|
sanitizePath(this.personalizeConfig.dirName),
|
|
28
28
|
sanitizePath(this.attributesConfig.dirName),
|
package/src/export/audiences.ts
CHANGED
|
@@ -22,7 +22,7 @@ export default class ExportAudiences extends PersonalizationAdapter<ExportConfig
|
|
|
22
22
|
this.personalizeConfig = exportConfig.modules.personalize;
|
|
23
23
|
this.audiencesConfig = exportConfig.modules.audiences;
|
|
24
24
|
this.audiencesFolderPath = pResolve(
|
|
25
|
-
sanitizePath(exportConfig.
|
|
25
|
+
sanitizePath(exportConfig.exportDir),
|
|
26
26
|
sanitizePath(exportConfig.branchName || ''),
|
|
27
27
|
sanitizePath(this.personalizeConfig.dirName),
|
|
28
28
|
sanitizePath(this.audiencesConfig.dirName),
|
package/src/export/events.ts
CHANGED
|
@@ -22,7 +22,7 @@ export default class ExportEvents extends PersonalizationAdapter<ExportConfig> {
|
|
|
22
22
|
this.personalizeConfig = exportConfig.modules.personalize;
|
|
23
23
|
this.eventsConfig = exportConfig.modules.events;
|
|
24
24
|
this.eventsFolderPath = pResolve(
|
|
25
|
-
sanitizePath(exportConfig.
|
|
25
|
+
sanitizePath(exportConfig.exportDir),
|
|
26
26
|
sanitizePath(exportConfig.branchName || ''),
|
|
27
27
|
sanitizePath(this.personalizeConfig.dirName),
|
|
28
28
|
sanitizePath(this.eventsConfig.dirName),
|
|
@@ -22,7 +22,7 @@ export default class ExportExperiences extends PersonalizationAdapter<ExportConf
|
|
|
22
22
|
this.exportConfig = exportConfig;
|
|
23
23
|
this.personalizeConfig = exportConfig.modules.personalize;
|
|
24
24
|
this.experiencesFolderPath = path.resolve(
|
|
25
|
-
sanitizePath(exportConfig.
|
|
25
|
+
sanitizePath(exportConfig.exportDir),
|
|
26
26
|
sanitizePath(exportConfig.branchName || ''),
|
|
27
27
|
sanitizePath(this.personalizeConfig.dirName),
|
|
28
28
|
'experiences',
|
package/src/export/projects.ts
CHANGED
|
@@ -19,7 +19,7 @@ export default class ExportProjects extends PersonalizationAdapter<ExportConfig>
|
|
|
19
19
|
this.exportConfig = exportConfig;
|
|
20
20
|
this.personalizeConfig = exportConfig.modules.personalize;
|
|
21
21
|
this.projectsFolderPath = pResolve(
|
|
22
|
-
sanitizePath(exportConfig.
|
|
22
|
+
sanitizePath(exportConfig.exportDir),
|
|
23
23
|
sanitizePath(exportConfig.branchName || ''),
|
|
24
24
|
sanitizePath(this.personalizeConfig.dirName),
|
|
25
25
|
'projects',
|
|
@@ -31,7 +31,7 @@ export default class VariantEntries extends VariantAdapter<VariantHttpClient<Exp
|
|
|
31
31
|
};
|
|
32
32
|
super(Object.assign(config, conf));
|
|
33
33
|
this.entriesDirPath = resolve(
|
|
34
|
-
sanitizePath(config.
|
|
34
|
+
sanitizePath(config.exportDir),
|
|
35
35
|
sanitizePath(config.branchName || ''),
|
|
36
36
|
sanitizePath(config.modules.entries.dirName),
|
|
37
37
|
);
|
package/src/import/attribute.ts
CHANGED
|
@@ -124,7 +124,7 @@ export default class Attribute extends PersonalizationAdapter<ImportConfig> {
|
|
|
124
124
|
return this.withLoadingSpinner('ATTRIBUTES: Analyzing import data...', async () => {
|
|
125
125
|
const { dirName, fileName } = this.attributeConfig;
|
|
126
126
|
const attributesPath = resolve(
|
|
127
|
-
sanitizePath(this.config.
|
|
127
|
+
sanitizePath(this.config.contentDir),
|
|
128
128
|
sanitizePath(this.personalizeConfig.dirName),
|
|
129
129
|
sanitizePath(dirName),
|
|
130
130
|
sanitizePath(fileName),
|
package/src/import/audiences.ts
CHANGED
|
@@ -138,7 +138,7 @@ export default class Audiences extends PersonalizationAdapter<ImportConfig> {
|
|
|
138
138
|
return this.withLoadingSpinner('AUDIENCES: Analyzing import data...', async () => {
|
|
139
139
|
const { dirName, fileName } = this.audienceConfig;
|
|
140
140
|
const audiencesPath = resolve(
|
|
141
|
-
sanitizePath(this.config.
|
|
141
|
+
sanitizePath(this.config.contentDir),
|
|
142
142
|
sanitizePath(this.personalizeConfig.dirName),
|
|
143
143
|
sanitizePath(dirName),
|
|
144
144
|
sanitizePath(fileName),
|
package/src/import/events.ts
CHANGED
|
@@ -123,7 +123,7 @@ export default class Events extends PersonalizationAdapter<ImportConfig> {
|
|
|
123
123
|
return this.withLoadingSpinner('EVENTS: Analyzing import data...', async () => {
|
|
124
124
|
const { dirName, fileName } = this.eventConfig;
|
|
125
125
|
const eventsPath = resolve(
|
|
126
|
-
sanitizePath(this.config.
|
|
126
|
+
sanitizePath(this.config.contentDir),
|
|
127
127
|
sanitizePath(this.personalizeConfig.dirName),
|
|
128
128
|
sanitizePath(dirName),
|
|
129
129
|
sanitizePath(fileName),
|
|
@@ -57,7 +57,7 @@ export default class Experiences extends PersonalizationAdapter<ImportConfig> {
|
|
|
57
57
|
|
|
58
58
|
this.personalizeConfig = this.config.modules.personalize;
|
|
59
59
|
this.experiencesDirPath = resolve(
|
|
60
|
-
sanitizePath(this.config.
|
|
60
|
+
sanitizePath(this.config.contentDir),
|
|
61
61
|
sanitizePath(this.personalizeConfig.dirName),
|
|
62
62
|
sanitizePath(this.personalizeConfig.experiences.dirName),
|
|
63
63
|
);
|
|
@@ -86,7 +86,7 @@ export default class Experiences extends PersonalizationAdapter<ImportConfig> {
|
|
|
86
86
|
this.failedCmsExpPath = resolve(sanitizePath(this.expMapperDirPath), 'failed-cms-experience.json');
|
|
87
87
|
this.experienceCTsPath = resolve(sanitizePath(this.experiencesDirPath), 'experiences-content-types.json');
|
|
88
88
|
this.experienceVariantsIdsPath = resolve(
|
|
89
|
-
sanitizePath(this.config.
|
|
89
|
+
sanitizePath(this.config.contentDir),
|
|
90
90
|
sanitizePath(this.personalizeConfig.dirName),
|
|
91
91
|
sanitizePath(this.experienceConfig.dirName),
|
|
92
92
|
'experiences-variants-ids.json',
|
package/src/import/project.ts
CHANGED
|
@@ -133,7 +133,7 @@ export default class Project extends PersonalizationAdapter<ImportConfig> {
|
|
|
133
133
|
const personalize = this.config.modules.personalize;
|
|
134
134
|
const { dirName, fileName } = personalize.projects;
|
|
135
135
|
const projectPath = join(
|
|
136
|
-
sanitizePath(this.config.
|
|
136
|
+
sanitizePath(this.config.contentDir),
|
|
137
137
|
sanitizePath(personalize.dirName),
|
|
138
138
|
sanitizePath(dirName),
|
|
139
139
|
sanitizePath(fileName),
|
package/src/types/utils.ts
CHANGED
package/src/utils/logger.ts
CHANGED
|
@@ -132,7 +132,7 @@ function init(_logPath: string, module: string) {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
export const log = (config: ExportConfig | ImportConfig, message: any, type: 'info' | 'error' | 'success') => {
|
|
135
|
-
const logsPath = config.data;
|
|
135
|
+
const logsPath = 'exportDir' in config ? config.exportDir : 'contentDir' in config ? config.contentDir : (config as any).data;
|
|
136
136
|
// ignoring the type argument, as we are not using it to create a logfile anymore
|
|
137
137
|
const module = (config as ImportConfig)['backupDir'] ? 'import' : 'export';
|
|
138
138
|
if (type !== 'error') {
|