Skip to content

Commit 8cc184b

Browse files
committed
Updated pa commands to reflect official pac cli v1.0.6
1 parent 66fdd90 commit 8cc184b

7 files changed

Lines changed: 16 additions & 13 deletions

File tree

src/o365/pa/commands/pcf/pcf-init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface Options extends GlobalOptions {
2727

2828
/*
2929
* Logic extracted from bolt.module.pcf.dll
30-
* Version: 0.4.3
30+
* Version: 1.0.6
3131
* Class: bolt.module.pcf.PcfInitVerb
3232
*/
3333
class PaPcfInitCommand extends Command {

src/o365/pa/commands/pcf/pcf-init/assets/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@types/powerapps-component-framework": "^1.2.0"
1414
},
1515
"devDependencies": {
16-
"pcf-scripts": "^0",
17-
"pcf-start": "^0"
16+
"pcf-scripts": "^1",
17+
"pcf-start": "^1"
1818
}
1919
}

src/o365/pa/commands/pcf/pcf-init/assets/template_pcfprojecttype.pcfproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</PropertyGroup>
2222

2323
<ItemGroup>
24-
<PackageReference Include="Microsoft.PowerApps.MSBuild.Pcf" Version="0.*"/>
24+
<PackageReference Include="Microsoft.PowerApps.MSBuild.Pcf" Version="1.*"/>
2525
</ItemGroup>
2626

2727
<ItemGroup>

src/o365/pa/commands/solution/solution-init.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface Options extends GlobalOptions {
2626

2727
/*
2828
* Logic extracted from bolt.module.solution.dll
29-
* Version: 0.4.3
29+
* Version: 1.0.6
3030
* Class: bolt.module.solution.SolutionInitVerb
3131
*/
3232
class PaSolutionInitCommand extends Command {
@@ -55,19 +55,21 @@ class PaSolutionInitCommand extends Command {
5555
const workingDirectoryName: string = path.basename(workingDirectory);
5656
const cdsAssetsDirectory: string = path.join(workingDirectory, 'Other');
5757
const cdsAssetsDirectorySolutionsFile: string = path.join(workingDirectory, 'Other', 'Solution.xml');
58-
const customizationOptionValuePrefix: string = this.generateOptionValuePrefixForPublisher(args.options.publisherPrefix);
58+
const publisherName: string = args.options.publisherName;
59+
const publisherPrefix: string = args.options.publisherPrefix.toLocaleLowerCase();
60+
const customizationOptionValuePrefix: string = this.generateOptionValuePrefixForPublisher(publisherPrefix);
5961
const variables: SolutionInitVariables = {
60-
"$publisherName$": args.options.publisherName,
61-
"$customizationPrefix$": args.options.publisherPrefix,
62+
"$publisherName$": publisherName,
63+
"$customizationPrefix$": publisherPrefix,
6264
"$customizationOptionValuePrefix$": customizationOptionValuePrefix,
6365
"$cdsProjectGuid$": uuidv4(),
6466
"solutionprojecttype": workingDirectoryName,
6567
"$solutionName$": workingDirectoryName
6668
};
6769

6870
if (this.verbose) {
69-
cmd.log(`publisherName: ${args.options.publisherName}`);
70-
cmd.log(`publisherPrefix: ${args.options.publisherPrefix}`);
71+
cmd.log(`publisherName: ${publisherName}`);
72+
cmd.log(`publisherPrefix: ${publisherPrefix}`);
7173
cmd.log(`customizationOptionValuePrefix: ${customizationOptionValuePrefix}`);
7274
cmd.log(`solutionInitTemplatePath: ${solutionInitTemplatePath}`);
7375
cmd.log(`cdsAssetsTemplatePath: ${cdsAssetsTemplatePath}`);
@@ -91,7 +93,7 @@ class PaSolutionInitCommand extends Command {
9193
}
9294
else {
9395
TemplateInstantiator.instantiate(cmd, cdsAssetsTemplatePath, cdsAssetsDirectory, false, variables, this.verbose);
94-
cmd.log(vorpal.chalk.green(`CDS solution files were successfully created for this project in the sub-directory 'Other', using solution name '${workingDirectory}', publisher name '${args.options.publisherName}', and customization prefix '${args.options.publisherPrefix}'.`));
96+
cmd.log(vorpal.chalk.green(`CDS solution files were successfully created for this project in the sub-directory 'Other', using solution name '${workingDirectory}', publisher name '${publisherName}', and customization prefix '${publisherPrefix}'.`));
9597
cmd.log(`Please verify the publisher information and solution name found in the '${vorpal.chalk.grey('Solution.xml')}' file.`);
9698
}
9799

src/o365/pa/commands/solution/solution-init/assets/Other/Customizations.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<OrganizationSettings />
1111
<optionsets />
1212
<CustomControls />
13+
<SolutionPluginAssemblies />
1314
<EntityDataProviders />
1415
<Languages>
1516
<Language>1033</Language>

src/o365/pa/commands/solution/solution-init/assets/template_solutionprojecttype.cdsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
-->
2323

2424
<ItemGroup>
25-
<PackageReference Include="Microsoft.PowerApps.MSBuild.Solution" Version="0.*"/>
25+
<PackageReference Include="Microsoft.PowerApps.MSBuild.Solution" Version="1.*"/>
2626
</ItemGroup>
2727

2828
<ItemGroup>

src/o365/pa/template-instantiator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { SolutionInitVariables } from "./commands/solution/solution-init/solutio
55

66
/*
77
* Logic extracted from bolt.cli.dll
8-
* Version: 0.4.3
8+
* Version: 1.0.6
99
* Class: bolt.cli.TemplateInstantiator
1010
*/
1111
export default class TemplateInstantiator {

0 commit comments

Comments
 (0)