Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: spfx questions #9788

Merged
merged 2 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/fx-core/resource/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"core.collaboration.Permission": ", Permission: ",
"core.developerPortal.scaffold.CannotFindManifest": "Could not find manifest from the downloaded package for teams app %s.",
"plugins.spfx.questions.framework.title": "Framework",
"plugins.spfx.questions.webpartName": "Name for SharePoint Framework Web Part",
"plugins.spfx.questions.webpartName.error.duplicate": "The folder %s already exists. Choose a different name for your component.",
"plugins.spfx.questions.webpartName.error.notMatch": "%s doesn't match pattern: %s",
"plugins.spfx.questions.packageSelect.title": "SharePoint Framework",
Expand Down
3 changes: 2 additions & 1 deletion packages/fx-core/src/question/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,8 @@ export function SPFxWebpartNameQuestion(): TextInputQuestion {
type: "text",
name: QuestionNames.SPFxWebpartName,
cliShortName: "w",
title: "Name for SharePoint Framework Web Part.",
cliDescription: "Name for SharePoint Framework Web Part.",
title: getLocalizedString("plugins.spfx.questions.webpartName"),
default: Constants.DEFAULT_WEBPART_NAME,
validation: {
validFunc: async (input: string, previousInputs?: Inputs): Promise<string | undefined> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface CreateProjectInputs extends Inputs {
"spfx-install-latest-package"?: boolean;
/** @description Framework */
"spfx-framework-type"?: "react" | "minimal" | "none";
/** @description Name for SharePoint Framework Web Part. */
/** @description Name for SharePoint Framework Web Part */
"spfx-webpart-name"?: string;
/** @description SPFx solution folder */
"spfx-folder"?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Inputs } from "@microsoft/teamsfx-api";
export interface SPFxAddWebpartInputs extends Inputs {
/** @description SPFx solution folder */
"spfx-folder"?: string;
/** @description Name for SharePoint Framework Web Part. */
/** @description Name for SharePoint Framework Web Part */
"spfx-webpart-name"?: string;
/** @description Select Teams manifest.json file */
"manifest-path"?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const DeployAadManifestOptions: CLICommandOption[] = [
type: "string",
shortName: "a",
description:
"Specifies the Azure AD app manifest file path, it's a relative path to project root folder, defaults to './aad.manifest.json'",
"Specifies the Azure AD app manifest file path, can be either absolute path or relative path to project root folder, defaults to './aad.manifest.json'",
},
{
name: "env",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const PermissionGrantOptions: CLICommandOption[] = [
type: "string",
shortName: "t",
description:
"Specifies the Teams app manifest template file path, it's a relative path to project root folder, defaults to './appPackage/manifest.json'",
"Specifies the Teams app manifest template file path, it can be either absolute path or relative path to project root folder, defaults to './appPackage/manifest.json'",
},
{
name: "env",
Expand All @@ -30,7 +30,7 @@ export const PermissionGrantOptions: CLICommandOption[] = [
type: "string",
shortName: "a",
description:
"Specifies the Azure AD app manifest file path, it's a relative path to project root folder, defaults to './aad.manifest.json'",
"Specifies the Azure AD app manifest file path, can be either absolute path or relative path to project root folder, defaults to './aad.manifest.json'",
},
{
name: "email",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const PermissionListOptions: CLICommandOption[] = [
type: "string",
shortName: "t",
description:
"Specifies the Teams app manifest template file path, it's a relative path to project root folder, defaults to './appPackage/manifest.json'",
"Specifies the Teams app manifest template file path, it can be either absolute path or relative path to project root folder, defaults to './appPackage/manifest.json'",
},
{
name: "env",
Expand All @@ -30,7 +30,7 @@ export const PermissionListOptions: CLICommandOption[] = [
type: "string",
shortName: "a",
description:
"Specifies the Azure AD app manifest file path, it's a relative path to project root folder, defaults to './aad.manifest.json'",
"Specifies the Azure AD app manifest file path, can be either absolute path or relative path to project root folder, defaults to './aad.manifest.json'",
},
];
export const PermissionListArguments: CLICommandArgument[] = [];
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const PreviewTeamsAppOptions: CLICommandOption[] = [
type: "string",
shortName: "t",
description:
"Specifies the Teams app manifest template file path, it's a relative path to project root folder, defaults to './appPackage/manifest.json'",
"Specifies the Teams app manifest template file path, it can be either absolute path or relative path to project root folder, defaults to './appPackage/manifest.json'",
required: true,
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ export const SPFxAddWebpartOptions: CLICommandOption[] = [
type: "string",
shortName: "t",
description:
"Specifies the Teams app manifest template file path, it's a relative path to project root folder, defaults to './appPackage/manifest.json'",
"Specifies the Teams app manifest template file path, it can be either absolute path or relative path to project root folder, defaults to './appPackage/manifest.json'",
required: true,
},
{
name: "local-manifest-path",
name: "local-teams-manifest-file",
questionName: "local-manifest-path",
type: "string",
shortName: "l",
description: "Select local Teams manifest.json file",
required: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const SelectTeamsManifestOptions: CLICommandOption[] = [
type: "string",
shortName: "t",
description:
"Specifies the Teams app manifest template file path, it's a relative path to project root folder, defaults to './appPackage/manifest.json'",
"Specifies the Teams app manifest template file path, it can be either absolute path or relative path to project root folder, defaults to './appPackage/manifest.json'",
required: true,
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const ValidateTeamsAppOptions: CLICommandOption[] = [
type: "string",
shortName: "t",
description:
"Specifies the Teams app manifest template file path, it's a relative path to project root folder, defaults to './appPackage/manifest.json'",
"Specifies the Teams app manifest template file path, it can be either absolute path or relative path to project root folder, defaults to './appPackage/manifest.json'",
},
{
name: "app-package-file",
Expand Down
6 changes: 4 additions & 2 deletions packages/fx-core/src/question/other.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function selectTeamsAppManifestQuestion(): SingleFileQuestion {
cliName: "teams-manifest-file",
cliShortName: "t",
cliDescription:
"Specifies the Teams app manifest template file path, it's a relative path to project root folder, defaults to './appPackage/manifest.json'",
"Specifies the Teams app manifest template file path, it can be either absolute path or relative path to project root folder, defaults to './appPackage/manifest.json'",
title: getLocalizedString("core.selectTeamsAppManifestQuestion.title"),
type: "singleFile",
default: (inputs: Inputs): string | undefined => {
Expand All @@ -246,6 +246,8 @@ function selectTeamsAppManifestQuestion(): SingleFileQuestion {
function selectLocalTeamsAppManifestQuestion(): SingleFileQuestion {
return {
name: QuestionNames.LocalTeamsAppManifestFilePath,
cliName: "local-teams-manifest-file",
cliShortName: "l",
title: getLocalizedString("core.selectLocalTeamsAppManifestQuestion.title"),
type: "singleFile",
default: (inputs: Inputs): string | undefined => {
Expand Down Expand Up @@ -538,7 +540,7 @@ export function selectAadManifestQuestion(): SingleFileQuestion {
cliName: "aad-manifest-file",
cliShortName: "a",
cliDescription:
"Specifies the Azure AD app manifest file path, it's a relative path to project root folder, defaults to './aad.manifest.json'",
"Specifies the Azure AD app manifest file path, can be either absolute path or relative path to project root folder, defaults to './aad.manifest.json'",
title: getLocalizedString("core.selectAadAppManifestQuestion.title"),
type: "singleFile",
default: (inputs: Inputs): string | undefined => {
Expand Down