diff --git a/README.md b/README.md index 530103720..8f684ceaf 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,10 @@ The AppBuilder CLI lets you build, test, deploy, and publish cross-platform hybr Installation === -Latest version: AppBuilder 3.7.7 -
Release date: Nov 10, 2017 +Latest version: AppBuilder 3.7.8 +
Release date: Nov 30, 2017 -> AppBuilder 3.7.7 is an update release. For a complete list of the improvements and updates available in this release, see AppBuilder 3.7.7 Release Notes.
For a complete list of the improvements and updates available in the earlier major release, see AppBuilder 3.7 Release Notes. +> AppBuilder 3.7.8 is an update release. For a complete list of the improvements and updates available in this release, see AppBuilder 3.7.8 Release Notes.
For a complete list of the improvements and updates available in the earlier major release, see AppBuilder 3.7 Release Notes. ### System Requirements @@ -374,10 +374,10 @@ If addressing the configuration issues does not resolve your problem, you can [r Features === -Latest version: AppBuilder 3.7.6 -
Release date: Oct 02, 2017 +Latest version: AppBuilder 3.7.8 +
Release date: Nov 30, 2017 -> AppBuilder 3.7.6 is an update release. For a complete list of the improvements and updates available in this release, see AppBuilder 3.7.6 Release Notes.
For a complete list of the improvements and updates available in the earlier major release, see AppBuilder 3.7 Release Notes. +> AppBuilder 3.7.8 is an update release. For a complete list of the improvements and updates available in this release, see AppBuilder 3.7.8 Release Notes.
For a complete list of the improvements and updates available in the earlier major release, see AppBuilder 3.7 Release Notes. #### What you can do with this version of the AppBuilder CLI diff --git a/docs/man_pages/project/creation/export.md b/docs/man_pages/project/creation/export.md index 634fceb64..c816075eb 100644 --- a/docs/man_pages/project/creation/export.md +++ b/docs/man_pages/project/creation/export.md @@ -3,7 +3,7 @@ export Usage | Synopsis ------|------- -Export selected project from solution so that it can be used with Cordova CLI | `$ appbuilder cloud export [ [ [--path ]]]` +Export selected project from solution so that it can be used with Cordova CLI | `$ appbuilder export [ [ [--path ]]]` Exports a cloud-based project from a selected solution to facilitate the migration to a different framework. NativeScript projects can be developed with the NativeScript CLI, whereas Hybrid projects can be developed with the Cordova CLI. diff --git a/lib/commands/cloud-projects.ts b/lib/commands/cloud-projects.ts index a956fe030..8a7b81ad3 100644 --- a/lib/commands/cloud-projects.ts +++ b/lib/commands/cloud-projects.ts @@ -8,8 +8,8 @@ class SolutionIdCommandParameter implements ICommandParameter { public async validate(validationValue?: string): Promise { if (validationValue) { - let app = await this.$remoteProjectService.getSolutionData(validationValue); - return !!app; + const { solutionData } = await this.$remoteProjectService.getSolutionData(validationValue); + return !!solutionData; } return false; diff --git a/lib/declarations.d.ts b/lib/declarations.d.ts index 364e3ad96..005275e3d 100644 --- a/lib/declarations.d.ts +++ b/lib/declarations.d.ts @@ -165,6 +165,11 @@ interface ILoginManager { telerikLogin(user: string, password: string): Promise; } +interface SolutionFullInfo { + solutionData: Server.SolutionData; + solutionName: string; +} + declare module Server.Contract { interface IParameter { name: string; @@ -902,7 +907,7 @@ interface IRemoteProjectService { exportProject(remoteSolutionName: string, remoteProjectName: string): Promise; exportSolution(remoteSolutionName: string): Promise; getAvailableAppsAndSolutions(): Promise; - getSolutionData(propertyValue: string): Promise; + getSolutionData(propertyValue: string): Promise; } interface IProjectSimulatorService { diff --git a/lib/services/cloud-projects-service.ts b/lib/services/cloud-projects-service.ts index 702b3c947..628d3619d 100644 --- a/lib/services/cloud-projects-service.ts +++ b/lib/services/cloud-projects-service.ts @@ -16,7 +16,7 @@ export class CloudProjectsService implements ICloudProjectsService { opts.solutionName = await this.$prompter.promptForChoice("Select solution to export", solutionNames); } - const solutionData = await this.$remoteProjectService.getSolutionData(opts.solutionName); + const { solutionData, solutionName } = await this.$remoteProjectService.getSolutionData(opts.solutionName); if (!solutionData.Items || !solutionData.Items.length) { this.$errors.failWithoutHelp(`Solution ${solutionData.Name} does not contain any projects.`); } @@ -37,7 +37,7 @@ export class CloudProjectsService implements ICloudProjectsService { opts.projectName = await this.$remoteProjectService.getProjectName(opts.solutionName, opts.projectName); const solution = solutionData.Items[0]; framework = solution.Framework.toLowerCase() === "nativescript" ? "tns" : solution.Framework; - const app = apps.find(sln => sln.colorizedDisplayName === solution.Name); + const app = apps.find(sln => sln.colorizedDisplayName === solutionName); id = app && app.id; } diff --git a/lib/services/remote-projects-service.ts b/lib/services/remote-projects-service.ts index d1d31cbc3..6d3fa778c 100644 --- a/lib/services/remote-projects-service.ts +++ b/lib/services/remote-projects-service.ts @@ -50,7 +50,7 @@ export class RemoteProjectService implements IRemoteProjectService { let app = await this.getApp(appId); if (!(this.clientProjectsPerSolution[app.id] && this.clientProjectsPerSolution[app.id].length > 0)) { - this.clientProjectsPerSolution[app.id] = _.sortBy((await this.getSolutionDataCore(app)).Items, project => project.Name); + this.clientProjectsPerSolution[app.id] = _.sortBy((await this.getSolutionDataCore(app)).solutionData.Items, project => project.Name); } return this.clientProjectsPerSolution[app.id]; @@ -76,7 +76,7 @@ export class RemoteProjectService implements IRemoteProjectService { this.$logger.info("%s has been successfully exported to %s", slnName, solutionDir); } - public async getSolutionData(solutionIdentifier: string): Promise { + public async getSolutionData(solutionIdentifier: string): Promise { let app = await this.getApp(solutionIdentifier); return await this.getSolutionDataCore(app); } @@ -89,9 +89,13 @@ export class RemoteProjectService implements IRemoteProjectService { return this._isMigrationEnabledForUser; } - private async getSolutionDataCore(app: ITapAppData): Promise { + private async getSolutionDataCore(app: ITapAppData): Promise { let name = app.isApp ? app.id : app.name; - return this.$serviceProxy.makeTapServiceCall(() => this.$server.apps.getApplication(name), { discardSolutionSpaceHeader: app.isApp }); + const solutionData = await this.$serviceProxy.makeTapServiceCall(() => this.$server.apps.getApplication(name), { discardSolutionSpaceHeader: app.isApp }); + return { + solutionData, + solutionName: app.colorizedDisplayName + }; } private async getProjectData(solutionName: string, projectName: string): Promise { diff --git a/package.json b/package.json index 1825f9410..33b1a4856 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "appbuilder", "preferGlobal": true, - "version": "3.7.7", + "version": "3.7.8", "author": "Telerik ", "description": "command line interface to Telerik AppBuilder", "bin": {