Skip to content

Added support to the new target: MS.VS.Services.Resource.Cloud #236

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion app/exec/extension/_lib/extension-composer-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export class ComposerFactory {
targets.forEach((target) => {
switch (target.id) {
case "Microsoft.VisualStudio.Services" :
case "Microsoft.VisualStudio.Services.Cloud" :
case "Microsoft.VisualStudio.Services.Cloud":
case "Microsoft.VisualStudio.Services.Resource.Cloud":
case "Microsoft.TeamFoundation.Server" :
composers.push(new VSSExtensionComposer(settings));
break;
Expand Down
24 changes: 24 additions & 0 deletions app/exec/extension/_lib/vsix-manifest-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,30 @@ export class VsixManifestBuilder extends ManifestBuilder {
});
}
break;
case "cloudresources":
if (_.isObject(value)) {
Object.keys(value).forEach(function (resourceType) {
let resourceTypeCased = _.capitalize(_.camelCase(resourceType));
let resourceValue = _.get(value, resourceType);
if (resourceValue) {
if (_.isObject(resourceValue)) {
Object.keys(resourceValue).forEach((childType) => {
let childResourceValue = _.get(resourceValue, childType);
if (childResourceValue) {
this.addProperty("Microsoft.VisualStudio.Services.Resource.Cloud." + resourceTypeCased + childType, childResourceValue);
} else {
trace.warn("'%s' property not found for resource: '%s'... ignoring.", childType, resourceType);
}
});
} else {
this.addProperty("Microsoft.VisualStudio.Services.Resource.Cloud." + resourceTypeCased, resourceValue);
}
} else {
trace.warn("'%s' property not found for resource: 'cloudResources'... ignoring.", resourceType);
}
});
}
break;
case "repository":
if (_.isObject(value)) {
const {type, url, uri} = value;
Expand Down