Skip to content

Commit

Permalink
formatting and regenerate schema.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaietta committed Jun 8, 2024
1 parent 14fd42c commit 29b90b5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/configuration/appx.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All options are optional. All required for AppX configuration is inferred and co

<!-- do not edit. start of generated block -->
<ul>
<li><code id="AppXOptions-applicationId">applicationId</code> String - The application id. Defaults to <code>identityName</code>.</li>
<li><code id="AppXOptions-applicationId">applicationId</code> String - The application id. Defaults to <code>identityName</code>. This string contains alpha-numeric fields separated by periods. Each field must begin with an ASCII alphabetic character.</li>
<li><code id="AppXOptions-backgroundColor">backgroundColor</code> = <code>#464646</code> String | “undefined” - The background color of the app tile. See <a href="https://msdn.microsoft.com/en-us/library/windows/apps/br211471.aspx">Visual Elements</a>.</li>
<li><code id="AppXOptions-displayName">displayName</code> String | “undefined” - A friendly name that can be displayed to users. Corresponds to <a href="https://msdn.microsoft.com/en-us/library/windows/apps/br211432.aspx">Properties.DisplayName</a>. Defaults to the application product name.</li>
<li><code id="AppXOptions-identityName">identityName</code> String | “undefined” - The name. Corresponds to <a href="https://msdn.microsoft.com/en-us/library/windows/apps/br211441.aspx">Identity.Name</a>. Defaults to the <a href="/configuration/configuration#Metadata-name">application name</a>.</li>
Expand Down
2 changes: 1 addition & 1 deletion packages/app-builder-lib/scheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"type": "boolean"
},
"applicationId": {
"description": "The application id. Defaults to `identityName`. This string contains alpha-numeric fields separated by periods. Each field must begin with an ASCII alphabetic character",
"description": "The application id. Defaults to `identityName`. This string contains alpha-numeric fields separated by periods. Each field must begin with an ASCII alphabetic character.",
"type": "string"
},
"artifactName": {
Expand Down
2 changes: 1 addition & 1 deletion packages/app-builder-lib/src/options/AppXOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TargetSpecificOptions } from "../core"

export interface AppXOptions extends TargetSpecificOptions {
/**
* The application id. Defaults to `identityName` This string contains alpha-numeric fields separated by periods. Each field must begin with an ASCII alphabetic character.
* The application id. Defaults to `identityName`. This string contains alpha-numeric fields separated by periods. Each field must begin with an ASCII alphabetic character.
*/
readonly applicationId?: string

Expand Down
6 changes: 3 additions & 3 deletions packages/app-builder-lib/src/targets/AppxTarget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,11 @@ export default class AppXTarget extends Target {
case "applicationId": {
const validCharactersRegex = /^([A-Za-z][A-Za-z0-9]*)(\.[A-Za-z][A-Za-z0-9]*)*$/
const identitynumber = parseInt(options.identityName as string, 10) || NaN
let result:string
let result: string
if (!isNaN(identitynumber) && options.identityName !== null && options.identityName !== undefined) {
if (options.identityName[0] === "0") {
log.warn(`Remove the 0${identitynumber}`)
result = options.identityName.replace("0"+identitynumber.toString(), "")
result = options.identityName.replace("0" + identitynumber.toString(), "")
} else {
log.warn(`Remove the ${identitynumber}`)
result = options.identityName.replace(identitynumber.toString(), "")
Expand All @@ -246,7 +246,7 @@ export default class AppXTarget extends Target {
const message = `AppX Application.Id can not be consists of alpha-numeric and period"`
throw new InvalidConfigurationError(message)
} else if (restrictedApplicationIdValues.includes(result.toUpperCase())) {
const message = `AppX Application.Id can not be some values`
const message = `AppX identityName.Id can not include restricted values: ${JSON.stringify(restrictedApplicationIdValues)}`
throw new InvalidConfigurationError(message)
} else if (result == null && options.applicationId == null) {
const message = `Please set appx.applicationId (or correct appx.identityName or name)`
Expand Down

0 comments on commit 29b90b5

Please sign in to comment.