|
1 | 1 | import * as path from "path"; |
2 | | -import * as constants from "../constants"; |
3 | 2 | import { ProjectData } from "../project-data"; |
4 | 3 | import { exported } from "../common/decorators"; |
5 | 4 | import { |
@@ -139,13 +138,6 @@ export class ProjectDataService implements IProjectDataService { |
139 | 138 | }; |
140 | 139 | } |
141 | 140 |
|
142 | | - public setUseLegacyWorkflow(projectDir: string, value: any): void { |
143 | | - this.$logger.trace(`useLegacyWorkflow will be set to ${value}`); |
144 | | - this.updateNsConfigValue(projectDir, { useLegacyWorkflow: value }); |
145 | | - this.refreshProjectData(projectDir); |
146 | | - this.$logger.trace(`useLegacyWorkflow was set to ${value}`); |
147 | | - } |
148 | | - |
149 | 141 | public getAppExecutableFiles(projectDir: string): string[] { |
150 | 142 | const projectData = this.getProjectData(projectDir); |
151 | 143 |
|
@@ -179,33 +171,6 @@ export class ProjectDataService implements IProjectDataService { |
179 | 171 | return files; |
180 | 172 | } |
181 | 173 |
|
182 | | - private refreshProjectData(projectDir: string) { |
183 | | - if (this.projectDataCache[projectDir]) { |
184 | | - this.projectDataCache[projectDir].initializeProjectData(projectDir); |
185 | | - } |
186 | | - } |
187 | | - |
188 | | - private updateNsConfigValue(projectDir: string, updateObject: INsConfig): void { |
189 | | - const nsConfigPath = path.join(projectDir, constants.CONFIG_NS_FILE_NAME); |
190 | | - const currentNsConfig = this.getNsConfig(nsConfigPath); |
191 | | - const newNsConfig = Object.assign(currentNsConfig, updateObject); |
192 | | - |
193 | | - this.$fs.writeJson(nsConfigPath, newNsConfig); |
194 | | - } |
195 | | - |
196 | | - private getNsConfig(nsConfigPath: string): INsConfig { |
197 | | - let result = this.getNsConfigDefaultObject(); |
198 | | - if (this.$fs.exists(nsConfigPath)) { |
199 | | - try { |
200 | | - result = <INsConfig>this.$fs.readJson(nsConfigPath); |
201 | | - } catch (e) { |
202 | | - // default |
203 | | - } |
204 | | - } |
205 | | - |
206 | | - return result; |
207 | | - } |
208 | | - |
209 | 174 | private getImageDefinitions(): IImageDefinitionsStructure { |
210 | 175 | const pathToImageDefinitions = path.join(__dirname, "..", "..", CLI_RESOURCES_DIR_NAME, AssetConstants.assets, AssetConstants.imageDefinitionsFileName); |
211 | 176 | const imageDefinitions = this.$fs.readJson(pathToImageDefinitions); |
|
0 commit comments