Skip to content
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"yarn-deduplicate": "^6.0.2"
},
"devDependencies": {
"@oclif/plugin-command-snapshot": "^5.2.3",
"@oclif/plugin-command-snapshot": "^5.3.31",
"@salesforce/cli-plugins-testkit": "^5.3.20",
"@salesforce/dev-scripts": "^10.2.11",
"@salesforce/plugin-command-reference": "^3.1.5",
Expand Down
82 changes: 82 additions & 0 deletions schemas/dev-audit-messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/AuditResults",
"definitions": {
"AuditResults": {
"type": "object",
"properties": {
"unusedBundles": {
"type": "array",
"items": {
"type": "string"
}
},
"unusedMessages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Bundle": {
"type": "string"
},
"Name": {
"type": "string"
},
"ReferencedInNonLiteral": {
"type": "string"
}
},
"required": ["Bundle", "Name", "ReferencedInNonLiteral"],
"additionalProperties": false
}
},
"missingBundles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Bundle": {
"type": "string"
},
"File": {
"type": "string"
},
"SourceVar": {
"type": "string"
}
},
"required": ["Bundle", "File", "SourceVar"],
"additionalProperties": false
}
},
"missingMessages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"File": {
"type": "string"
},
"Name": {
"type": "string"
},
"SourceVar": {
"type": "string"
},
"Bundle": {
"type": "string"
},
"IsLiteral": {
"type": "boolean"
}
},
"required": ["File", "Name", "SourceVar", "Bundle", "IsLiteral"],
"additionalProperties": false
}
}
},
"required": ["unusedBundles", "unusedMessages", "missingBundles", "missingMessages"],
"additionalProperties": false
}
}
}
25 changes: 25 additions & 0 deletions schemas/dev-configure-repo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/ConfigureRepoResult",
"definitions": {
"ConfigureRepoResult": {
"type": "object",
"properties": {
"botAccess": {
"type": "boolean"
},
"labels": {
"type": "boolean"
},
"prRestrictions": {
"type": "boolean"
},
"prBypass": {
"type": "boolean"
}
},
"required": ["botAccess", "labels", "prRestrictions", "prBypass"],
"additionalProperties": false
}
}
}
86 changes: 86 additions & 0 deletions schemas/dev-configure-secrets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/SecretsResult",
"definitions": {
"SecretsResult": {
"type": "object",
"properties": {
"AWS_ACCESS_KEY_ID": {
"type": "string",
"enum": [
"not needed",
"overridden by repo",
"shared to repo by org",
"exists, but not shared with repo",
"does not exist in org",
"unable to check"
]
},
"AWS_SECRET_ACCESS_KEY": {
"type": "string",
"enum": [
"not needed",
"overridden by repo",
"shared to repo by org",
"exists, but not shared with repo",
"does not exist in org",
"unable to check"
]
},
"NPM_TOKEN": {
"type": "string",
"enum": [
"not needed",
"overridden by repo",
"shared to repo by org",
"exists, but not shared with repo",
"does not exist in org",
"unable to check"
]
},
"TESTKIT_AUTH_URL": {
"type": "string",
"enum": [
"not needed",
"overridden by repo",
"shared to repo by org",
"exists, but not shared with repo",
"does not exist in org",
"unable to check"
]
},
"SF_CLI_BOT_GITHUB_TOKEN": {
"type": "string",
"enum": [
"not needed",
"overridden by repo",
"shared to repo by org",
"exists, but not shared with repo",
"does not exist in org",
"unable to check"
]
},
"SF_CHANGE_CASE_SFDX_AUTH_URL": {
"type": "string",
"enum": [
"not needed",
"overridden by repo",
"shared to repo by org",
"exists, but not shared with repo",
"does not exist in org",
"unable to check"
]
}
},
"required": [
"AWS_ACCESS_KEY_ID",
"AWS_SECRET_ACCESS_KEY",
"NPM_TOKEN",
"TESTKIT_AUTH_URL",
"SF_CLI_BOT_GITHUB_TOKEN",
"SF_CHANGE_CASE_SFDX_AUTH_URL"
],
"additionalProperties": false
}
}
}
25 changes: 25 additions & 0 deletions schemas/dev-convert-messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/DevConvertMessagesResults",
"definitions": {
"DevConvertMessagesResults": {
"type": "array",
"items": {
"$ref": "#/definitions/DevConvertMessagesResult"
}
},
"DevConvertMessagesResult": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"contents": {
"type": "string"
}
},
"required": ["path", "contents"],
"additionalProperties": false
}
}
}
6 changes: 4 additions & 2 deletions src/commands/dev/convert/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ export type DevConvertMessagesResult = {
contents: string;
};

export type DevConvertMessagesResults = DevConvertMessagesResult[];

type ValueType = string | string[] | Record<string, string>;

const skip1Line = `${EOL}${EOL}`;
export default class DevConvertMessages extends SfCommand<DevConvertMessagesResult[]> {
export default class DevConvertMessages extends SfCommand<DevConvertMessagesResults> {
public static readonly summary = messages.getMessage('summary');
public static readonly description = messages.getMessage('description');
public static readonly examples = messages.getMessages('examples');
Expand All @@ -44,7 +46,7 @@ export default class DevConvertMessages extends SfCommand<DevConvertMessagesResu
}),
};

public async run(): Promise<DevConvertMessagesResult[]> {
public async run(): Promise<DevConvertMessagesResults> {
const { flags } = await this.parse(DevConvertMessages);
const projectDir = path.resolve(flags['project-dir']);
const { name: pluginName } = JSON.parse(
Expand Down
Loading
Loading