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

feat: registryVariants #954

Merged
merged 31 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8b020c3
feat: custom registries in mdapi convert
mshanemc Mar 20, 2024
033a2e0
feat: custom registries
mshanemc Mar 20, 2024
5dbe516
feat: support registry variants
mshanemc Mar 22, 2024
da1d8d4
Merge remote-tracking branch 'origin/main' into sm/registry-variants
mshanemc Mar 25, 2024
99d395a
chore: lockfile
mshanemc Mar 25, 2024
5de7e1a
test: assert expected args instead of all args
mshanemc Mar 25, 2024
f1eae12
test: changes for registryVariants
mshanemc Mar 25, 2024
35b8113
chore: schemas
mshanemc Mar 25, 2024
bd3ac2b
refactor: filter functions
mshanemc Mar 26, 2024
2d55f21
chore: bump kit
mshanemc Mar 26, 2024
791917b
chore: bump sfCommand
mshanemc Mar 27, 2024
8033064
refactor: function consolidation
mshanemc Mar 27, 2024
c496b74
feat: delete source handles decomposed types
mshanemc Mar 27, 2024
0ea11db
chore: bump stl
mshanemc Mar 28, 2024
7df7812
chore: dep bumps
mshanemc Mar 28, 2024
9de0b16
chore: bump stl
mshanemc Mar 28, 2024
cefeff2
refactor: remove plugin-source dependency
mshanemc Mar 28, 2024
2ac2462
style: comment cleanup
mshanemc Mar 28, 2024
499fcbf
refactor: another registry parameter
mshanemc Mar 28, 2024
b5e76f8
refactor: projectPath => registry in resolver
mshanemc Mar 28, 2024
8473017
chore: projectDir into constructed registryAccess
mshanemc Mar 28, 2024
3d83780
test: break up the delete nut
mshanemc Mar 28, 2024
0c2c6ba
fix: identify labels when comp is child OR parent
mshanemc Mar 28, 2024
ed7b6b7
chore: bump apex-node major version
mshanemc Mar 28, 2024
810ddb4
fix: delete stuff is very specific about customLabel vs. customLabels
mshanemc Mar 28, 2024
8cf89d5
test: keep STL out of half-nut retrieve
mshanemc Mar 28, 2024
2ab0c8a
refactor: type for mixedDeployDelete
mshanemc Mar 29, 2024
18b04a7
test: return type for NUT
mshanemc Mar 29, 2024
be96906
fix: stashPath map by fullname, not sourcepath
mshanemc Mar 29, 2024
f22fbb9
refactor: meaningful fallback messages for conflicts instead of as
mshanemc Mar 29, 2024
b13aeea
fix: unstash after a prompt = no
mshanemc Mar 29, 2024
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
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
Loading