Skip to content

Commit

Permalink
Merge pull request #954 from salesforcecli/sm/registry-variants
Browse files Browse the repository at this point in the history
feat: registryVariants
  • Loading branch information
WillieRuemmele authored Mar 29, 2024
2 parents b1864ae + b13aeea commit 6f216dc
Show file tree
Hide file tree
Showing 38 changed files with 1,545 additions and 3,659 deletions.
23 changes: 11 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,26 @@
"bugs": "https://github.com/forcedotcom/cli/issues",
"dependencies": {
"@oclif/core": "^3.26.0",
"@salesforce/apex-node": "^3.1.0",
"@salesforce/apex-node": "^4.0.2",
"@salesforce/core": "^6.7.3",
"@salesforce/kit": "^3.0.15",
"@salesforce/plugin-info": "^3.0.33",
"@salesforce/sf-plugins-core": "^8.0.0",
"@salesforce/source-deploy-retrieve": "^10.5.5",
"@salesforce/source-tracking": "^5.1.18",
"@salesforce/kit": "^3.1.0",
"@salesforce/plugin-info": "^3.1.0",
"@salesforce/sf-plugins-core": "^8.0.2",
"@salesforce/source-deploy-retrieve": "^10.6.1",
"@salesforce/source-tracking": "^5.2.0",
"@salesforce/ts-types": "^2.0.9",
"chalk": "^5.3.0"
},
"devDependencies": {
"@oclif/plugin-command-snapshot": "^5.1.2",
"@salesforce/cli-plugins-testkit": "^5.1.10",
"@oclif/plugin-command-snapshot": "^5.1.4",
"@salesforce/cli-plugins-testkit": "^5.1.12",
"@salesforce/dev-scripts": "^8.4.2",
"@salesforce/plugin-command-reference": "^3.0.71",
"@salesforce/plugin-source": "^2.11.4",
"@salesforce/source-testkit": "^2.1.105",
"@salesforce/plugin-command-reference": "^3.0.73",
"@salesforce/source-testkit": "^2.1.108",
"@salesforce/ts-sinon": "^1.4.19",
"cross-env": "^7.0.3",
"eslint-plugin-sf-plugin": "^1.17.4",
"oclif": "^4.4.19",
"oclif": "^4.7.0",
"ts-node": "^10.9.2",
"typescript": "^5.4.3"
},
Expand Down
16 changes: 8 additions & 8 deletions schemas/project-delete-source.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@
"type": "object",
"properties": {
"changed": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"columnNumber": {
"type": "string"
Expand All @@ -207,15 +206,13 @@
"type": "string"
},
"created": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"createdDate": {
"type": "string"
},
"deleted": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"fileName": {
"type": "string"
Expand All @@ -237,13 +234,16 @@
"enum": ["Warning", "Error"]
},
"success": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
}
},
"required": ["changed", "created", "createdDate", "deleted", "fileName", "fullName", "success"],
"additionalProperties": false
},
"BooleanString": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
},
"RunTestResult": {
"type": "object",
"properties": {
Expand Down
16 changes: 8 additions & 8 deletions schemas/project-deploy-cancel.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@
"type": "object",
"properties": {
"changed": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"columnNumber": {
"type": "string"
Expand All @@ -246,15 +245,13 @@
"type": "string"
},
"created": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"createdDate": {
"type": "string"
},
"deleted": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"fileName": {
"type": "string"
Expand All @@ -276,13 +273,16 @@
"enum": ["Warning", "Error"]
},
"success": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
}
},
"required": ["changed", "created", "createdDate", "deleted", "fileName", "fullName", "success"],
"additionalProperties": false
},
"BooleanString": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
},
"RunTestResult": {
"type": "object",
"properties": {
Expand Down
16 changes: 8 additions & 8 deletions schemas/project-deploy-quick.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@
"type": "object",
"properties": {
"changed": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"columnNumber": {
"type": "string"
Expand All @@ -246,15 +245,13 @@
"type": "string"
},
"created": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"createdDate": {
"type": "string"
},
"deleted": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"fileName": {
"type": "string"
Expand All @@ -276,13 +273,16 @@
"enum": ["Warning", "Error"]
},
"success": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
}
},
"required": ["changed", "created", "createdDate", "deleted", "fileName", "fullName", "success"],
"additionalProperties": false
},
"BooleanString": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
},
"RunTestResult": {
"type": "object",
"properties": {
Expand Down
16 changes: 8 additions & 8 deletions schemas/project-deploy-report.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@
"type": "object",
"properties": {
"changed": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"columnNumber": {
"type": "string"
Expand All @@ -246,15 +245,13 @@
"type": "string"
},
"created": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"createdDate": {
"type": "string"
},
"deleted": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"fileName": {
"type": "string"
Expand All @@ -276,13 +273,16 @@
"enum": ["Warning", "Error"]
},
"success": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
}
},
"required": ["changed", "created", "createdDate", "deleted", "fileName", "fullName", "success"],
"additionalProperties": false
},
"BooleanString": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
},
"RunTestResult": {
"type": "object",
"properties": {
Expand Down
16 changes: 8 additions & 8 deletions schemas/project-deploy-resume.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@
"type": "object",
"properties": {
"changed": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"columnNumber": {
"type": "string"
Expand All @@ -246,15 +245,13 @@
"type": "string"
},
"created": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"createdDate": {
"type": "string"
},
"deleted": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"fileName": {
"type": "string"
Expand All @@ -276,13 +273,16 @@
"enum": ["Warning", "Error"]
},
"success": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
}
},
"required": ["changed", "created", "createdDate", "deleted", "fileName", "fullName", "success"],
"additionalProperties": false
},
"BooleanString": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
},
"RunTestResult": {
"type": "object",
"properties": {
Expand Down
16 changes: 8 additions & 8 deletions schemas/project-deploy-start.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@
"type": "object",
"properties": {
"changed": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"columnNumber": {
"type": "string"
Expand All @@ -246,15 +245,13 @@
"type": "string"
},
"created": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"createdDate": {
"type": "string"
},
"deleted": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"fileName": {
"type": "string"
Expand All @@ -276,13 +273,16 @@
"enum": ["Warning", "Error"]
},
"success": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
}
},
"required": ["changed", "created", "createdDate", "deleted", "fileName", "fullName", "success"],
"additionalProperties": false
},
"BooleanString": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
},
"RunTestResult": {
"type": "object",
"properties": {
Expand Down
16 changes: 8 additions & 8 deletions schemas/project-deploy-validate.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@
"type": "object",
"properties": {
"changed": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"columnNumber": {
"type": "string"
Expand All @@ -246,15 +245,13 @@
"type": "string"
},
"created": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"createdDate": {
"type": "string"
},
"deleted": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
},
"fileName": {
"type": "string"
Expand All @@ -276,13 +273,16 @@
"enum": ["Warning", "Error"]
},
"success": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
"$ref": "#/definitions/BooleanString"
}
},
"required": ["changed", "created", "createdDate", "deleted", "fileName", "fullName", "success"],
"additionalProperties": false
},
"BooleanString": {
"type": ["string", "boolean"],
"enum": ["true", "false", true, false]
},
"RunTestResult": {
"type": "object",
"properties": {
Expand Down
5 changes: 3 additions & 2 deletions src/commands/project/convert/mdapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
ComponentSetBuilder,
ConvertResult,
MetadataConverter,
RegistryAccess,
} from '@salesforce/source-deploy-retrieve';
import {
arrayWithDeprecation,
Expand Down Expand Up @@ -117,13 +118,13 @@ export class Mdapi extends SfCommand<ConvertMdapiJson> {
directoryPaths: [this.flags['root-dir']],
}
: undefined,
...(this.project ? { projectDir: this.project?.getPath() } : {}),
});

const numOfComponents = this.componentSet.getSourceComponents().toArray().length;
if (numOfComponents > 0) {
this.spinner.start(`Converting ${numOfComponents} metadata components`);

const converter = new MetadataConverter();
const converter = new MetadataConverter(new RegistryAccess(undefined, this.project?.getPath()));
this.convertResult = await converter.convert(this.componentSet, 'source', {
type: 'directory',
outputDirectory: outputDir,
Expand Down
Loading

0 comments on commit 6f216dc

Please sign in to comment.