Skip to content

Commit

Permalink
chore: merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Feb 2, 2023
2 parents 157a0c2 + af91d33 commit 4d900ba
Show file tree
Hide file tree
Showing 8 changed files with 289 additions and 270 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# [1.14.0](https://github.com/salesforcecli/plugin-packaging/compare/1.13.0...1.14.0) (2023-02-02)

### Features

- use latest sf-plugins-core and oclif/core ([c8910f7](https://github.com/salesforcecli/plugin-packaging/commit/c8910f70d280eb13bd1d197e00d7ffc3e5b2910f))

# [1.13.0](https://github.com/salesforcecli/plugin-packaging/compare/1.12.5...1.13.0) (2023-01-30)

### Features
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "@salesforce/plugin-packaging",
"description": "SFDX plugin that support Salesforce Packaging Platform",
"version": "1.12.5",
"version": "1.14.0",
"main": "lib/index.js",
"author": "Salesforce",
"bugs": "https://github.com/forcedotcom/cli/issues",
"dependencies": {
"@oclif/core": "^1.25.0",
"@oclif/core": "^2.0.7",
"@salesforce/core": "^3.33.0",
"@salesforce/kit": "^1.8.3",
"@salesforce/packaging": "^1.2.3",
"@salesforce/sf-plugins-core": "^1.22.1",
"@salesforce/sf-plugins-core": "^2.0.1",
"chalk": "^4.1.2",
"tslib": "^2"
},
Expand Down
9 changes: 5 additions & 4 deletions src/commands/package/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ export class PackageCreateCommand extends SfCommand<PackageCreate> {
summary: messages.getMessage('flags.name.summary'),
required: true,
}),
'package-type': Flags.enum({
'package-type': Flags.custom<PackageType>({
options: ['Managed', 'Unlocked'],
})({
required: true,
char: 't',
deprecateAliases: true,
aliases: ['packagetype'],
summary: messages.getMessage('flags.package-type.summary'),
description: messages.getMessage('flags.package-type.description'),
required: true,
options: ['Managed', 'Unlocked'],
}),
description: Flags.string({
char: 'd',
Expand Down Expand Up @@ -84,7 +85,7 @@ export class PackageCreateCommand extends SfCommand<PackageCreate> {
name: flags.name,
noNamespace: flags['no-namespace'],
orgDependent: flags['org-dependent'],
packageType: flags['package-type'] as PackageType,
packageType: flags['package-type'],
path: flags.path,
};
const result: PackageCreate = await Package.create(
Expand Down
17 changes: 10 additions & 7 deletions src/commands/package/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,31 +75,34 @@ export class Install extends SfCommand<PackageInstallRequest> {
summary: messages.getMessage('flags.package.summary'),
required: true,
}),
'apex-compile': Flags.enum({
'apex-compile': Flags.custom<PackageInstallCreateRequest['ApexCompileType']>({
options: ['all', 'package'],
})({
char: 'a',
deprecateAliases: true,
aliases: ['apexcompile'],
summary: messages.getMessage('flags.apex-compile.summary'),
description: messages.getMessage('flags.apex-compile.description'),
default: 'all',
options: ['all', 'package'],
}),
'security-type': Flags.enum({
'security-type': Flags.custom<'AllUsers' | 'AdminsOnly'>({
options: ['AllUsers', 'AdminsOnly'],
})({
char: 's',
deprecateAliases: true,
aliases: ['securitytype'],
summary: messages.getMessage('flags.security-type.summary'),
default: 'AdminsOnly',
options: ['AllUsers', 'AdminsOnly'],
}),
'upgrade-type': Flags.enum({
'upgrade-type': Flags.custom<'DeprecateOnly' | 'Mixed' | 'Delete'>({
options: ['DeprecateOnly', 'Mixed', 'Delete'],
})({
char: 't',
deprecateAliases: true,
aliases: ['upgradetype'],
summary: messages.getMessage('flags.upgrade-type.summary'),
description: messages.getMessage('flags.upgrade-type.description'),
default: 'Mixed',
options: ['DeprecateOnly', 'Mixed', 'Delete'],
}),
};

Expand All @@ -125,7 +128,7 @@ export class Install extends SfCommand<PackageInstallRequest> {
const request: PackageInstallCreateRequest = {
SubscriberPackageVersionKey: await this.subscriberPackageVersion.getId(),
Password: flags['installation-key'],
ApexCompileType: flags['apex-compile'] as PackageInstallCreateRequest['ApexCompileType'],
ApexCompileType: flags['apex-compile'],
SecurityType: securityType[flags['security-type']] as PackageInstallCreateRequest['SecurityType'],
UpgradeType: upgradeType[flags['upgrade-type']] as PackageInstallCreateRequest['UpgradeType'],
};
Expand Down
4 changes: 2 additions & 2 deletions src/commands/package/installed/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
requiredOrgFlagWithDeprecations,
SfCommand,
} from '@salesforce/sf-plugins-core';
import { CliUx } from '@oclif/core';
import { ux } from '@oclif/core';
import { SubscriberPackageVersion } from '@salesforce/packaging';

Messages.importMessagesDirectory(__dirname);
Expand Down Expand Up @@ -59,7 +59,7 @@ export class PackageInstalledListCommand extends SfCommand<PackageInstalledComma
SubscriberPackageVersionNumber: `${record.SubscriberPackageVersion?.MajorVersion}.${record.SubscriberPackageVersion?.MinorVersion}.${record.SubscriberPackageVersion?.PatchVersion}.${record.SubscriberPackageVersion?.BuildNumber}`,
}));

const tableOptions: CliUx.Table.table.Options = {
const tableOptions: ux.Table.table.Options = {
Id: { header: 'ID' },
SubscriberPackageId: { header: 'Package ID' },
SubscriberPackageName: { header: 'Package Name' },
Expand Down
9 changes: 6 additions & 3 deletions src/commands/package/version/create/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const packaging = Messages.loadMessages('@salesforce/plugin-packaging', 'packagi

export type CreateListCommandResult = PackageVersionCreateRequestResult[];

type Status = 'Queued' | 'InProgress' | 'Success' | 'Error';

export class PackageVersionCreateListCommand extends SfCommand<CreateListCommandResult> {
public static readonly summary = messages.getMessage('summary');
public static readonly description = messages.getMessage('description');
Expand All @@ -38,10 +40,11 @@ export class PackageVersionCreateListCommand extends SfCommand<CreateListCommand
aliases: ['createdlastdays'],
summary: packaging.getMessage('flags.created-last-days.summary'),
}),
status: Flags.enum({
status: Flags.custom<Status>({
options: ['Queued', 'InProgress', 'Success', 'Error'],
})({
char: 's',
summary: messages.getMessage('flags.status.summary'),
options: ['Queued', 'InProgress', 'Success', 'Error'],
}),
};

Expand All @@ -50,7 +53,7 @@ export class PackageVersionCreateListCommand extends SfCommand<CreateListCommand
const connection = flags['target-hub-org'].getConnection(flags['api-version']);
const results = await PackageVersion.getPackageVersionCreateRequests(connection, {
createdlastdays: flags['created-last-days'],
status: flags.status as 'Queued' | 'InProgress' | 'Success' | 'Error',
status: flags.status,
connection,
});

Expand Down
4 changes: 2 additions & 2 deletions src/commands/package/version/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
SfCommand,
} from '@salesforce/sf-plugins-core';
import { Messages, SfProject } from '@salesforce/core';
import { CliUx } from '@oclif/core';
import { ux } from '@oclif/core';
import {
getContainerOptions,
getPackageVersionStrings,
Expand Down Expand Up @@ -213,7 +213,7 @@ export class PackageVersionListCommand extends SfCommand<PackageVersionListComma
}

// eslint-disable-next-line class-methods-use-this
private getColumnData(concise: boolean, verbose: boolean): CliUx.Table.table.Columns<Record<string, unknown>> {
private getColumnData(concise: boolean, verbose: boolean): ux.Table.table.Columns<Record<string, unknown>> {
if (concise) {
return {
Package2Id: { header: messages.getMessage('package-id') },
Expand Down
Loading

0 comments on commit 4d900ba

Please sign in to comment.