Skip to content

Commit

Permalink
feat: sfdxCommand => sfCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Dec 2, 2022
1 parent d3da8f3 commit f2fbb56
Show file tree
Hide file tree
Showing 29 changed files with 758 additions and 730 deletions.
6 changes: 3 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
module.exports = {
extends: ['eslint-config-salesforce-typescript', 'eslint-config-salesforce-license'],
extends: ['eslint-config-salesforce-typescript', 'eslint-config-salesforce-license', 'plugin:sf-plugin/migration'],
rules: {
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error']
}
'@typescript-eslint/no-shadow': ['error'],
},
};
76 changes: 21 additions & 55 deletions command-snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@
"command": "channel:promote",
"plugin": "@salesforce/plugin-release-management",
"flags": [
"candidate",
"architecture-target",
"cli",
"dryrun",
"indexes",
"json",
"loglevel",
"maxage",
"max-age",
"platform",
"promote-from-channel",
"promote-to-channel",
"sha",
"target",
"targets",
"version",
"xz"
],
Expand All @@ -22,124 +21,91 @@
{
"command": "cli:install:test",
"plugin": "@salesforce/plugin-release-management",
"flags": ["channel", "cli", "json", "loglevel", "method", "output-file"],
"flags": ["channel", "cli", "json", "method", "output-file"],
"alias": []
},
{
"command": "cli:latestrc:build",
"plugin": "@salesforce/plugin-release-management",
"flags": [
"build-only",
"json",
"loglevel",
"only",
"patch",
"pinned-deps",
"rctag",
"resolutions",
"schema",
"snapshot"
],
"flags": ["build-only", "json", "only", "patch", "pinned-deps", "rctag", "resolutions", "schema", "snapshot"],
"alias": []
},
{
"command": "cli:releasenotes",
"plugin": "@salesforce/plugin-release-management",
"flags": ["cli", "json", "loglevel", "markdown", "since"],
"flags": ["cli", "json", "markdown", "since"],
"alias": []
},
{
"command": "cli:schemas:collect",
"plugin": "@salesforce/plugin-release-management",
"flags": ["json", "loglevel"],
"flags": ["json"],
"alias": []
},
{
"command": "cli:schemas:compare",
"plugin": "@salesforce/plugin-release-management",
"flags": ["json", "loglevel"],
"flags": ["json"],
"alias": []
},
{
"command": "cli:tarballs:prepare",
"plugin": "@salesforce/plugin-release-management",
"flags": ["dryrun", "json", "loglevel", "types", "verbose"],
"flags": ["dryrun", "json", "types", "verbose"],
"alias": []
},
{
"command": "cli:tarballs:smoke",
"plugin": "@salesforce/plugin-release-management",
"flags": ["cli", "json", "loglevel", "verbose"],
"flags": ["cli", "json", "verbose"],
"alias": []
},
{
"command": "cli:tarballs:verify",
"plugin": "@salesforce/plugin-release-management",
"flags": ["cli", "json", "loglevel", "windows-username-buffer"],
"flags": ["cli", "json", "windows-username-buffer"],
"alias": []
},
{
"command": "cli:versions:inspect",
"plugin": "@salesforce/plugin-release-management",
"flags": ["channels", "cli", "dependencies", "json", "locations", "loglevel", "salesforce"],
"flags": ["channels", "cli", "dependencies", "json", "locations", "salesforce"],
"alias": []
},
{
"command": "dependabot:automerge",
"plugin": "@salesforce/plugin-release-management",
"flags": ["dryrun", "json", "loglevel", "max-version-bump", "merge-method", "owner", "repo", "skip-ci"],
"flags": ["dryrun", "json", "max-version-bump", "merge-method", "owner", "repo", "skip-ci"],
"alias": []
},
{
"command": "dependabot:consolidate",
"plugin": "@salesforce/plugin-release-management",
"flags": [
"base-branch",
"dryrun",
"ignore",
"json",
"loglevel",
"max-version-bump",
"no-pr",
"owner",
"repo",
"target-branch"
],
"flags": ["base-branch", "dryrun", "ignore", "json", "max-version-bump", "no-pr", "owner", "repo", "target-branch"],
"alias": []
},
{
"command": "npm:dependencies:pin",
"plugin": "@salesforce/plugin-release-management",
"flags": ["dryrun", "json", "loglevel", "tag"],
"flags": ["dryrun", "json", "tag"],
"alias": []
},
{
"command": "npm:package:promote",
"plugin": "@salesforce/plugin-release-management",
"flags": ["candidate", "dryrun", "json", "loglevel", "target"],
"flags": ["candidate", "dryrun", "json", "target"],
"alias": []
},
{
"command": "npm:package:release",
"plugin": "@salesforce/plugin-release-management",
"flags": [
"dryrun",
"githubtag",
"install",
"json",
"loglevel",
"npmaccess",
"npmtag",
"prerelease",
"sign",
"verify"
],
"flags": ["dryrun", "githubtag", "install", "json", "npmaccess", "npmtag", "prerelease", "sign", "verify"],
"alias": []
},
{
"command": "npm:release:validate",
"plugin": "@salesforce/plugin-release-management",
"flags": ["json", "loglevel", "verbose"],
"flags": ["json", "verbose"],
"alias": []
},
{
Expand All @@ -151,13 +117,13 @@
{
"command": "repositories",
"plugin": "@salesforce/plugin-release-management",
"flags": ["columns", "csv", "extended", "filter", "json", "loglevel", "no-header", "no-truncate", "output", "sort"],
"flags": ["columns", "csv", "extended", "filter", "json", "no-header", "no-truncate", "output", "sort"],
"alias": []
},
{
"command": "typescript:update",
"plugin": "@salesforce/plugin-release-management",
"flags": ["json", "loglevel", "target", "version"],
"flags": ["json", "target", "version"],
"alias": []
}
]
2 changes: 1 addition & 1 deletion messages/channel.promote.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"description": "promote a s3 channel",
"summary": "promote a s3 channel",
"examples": [
"<%= config.bin %> <%= command.id %> --candidate latest-rc --target latest --platform win --platform mac"
],
Expand All @@ -16,7 +17,6 @@
"version": "the version of the candidate to be promoted, which must exist already in s3. Used to fetch the correct sha",
"InvalidToken": "This command requires a valid amazon s3 login",
"InvalidTag": "the %s channel does not exist in Amazon",
"MissingSourceOfPromote": "You must provide a value for candidate, sha or version.",
"CannotPromoteToSameChannel": "Candidate and target channels cannot the same.",
"DryRunMessage": "Dry run results.\nPromoting cli %s version %s commit %s to channel %s for platforms %s",
"MissingDependencies": "Missing required environment variables or utilities",
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"sf-release": "bin/run"
},
"dependencies": {
"@oclif/core": "^1.19.1",
"@oclif/core": "^1.20.4",
"@octokit/core": "^4.1.0",
"@salesforce/command": "^5.2.11",
"@salesforce/core": "^3.26.0",
"@salesforce/kit": "^1.6.1",
"@salesforce/plugin-command-reference": "^1.4.7",
"@salesforce/plugin-command-reference": "^2.2.8",
"@salesforce/plugin-trust": "^2.1.0",
"@salesforce/sf-plugins-core": "^1.19.0",
"@salesforce/ts-types": "^1.5.21",
"agent-base": "^6.0.2",
"aws-sdk": "^2.1238.0",
Expand Down Expand Up @@ -55,6 +55,7 @@
"eslint-plugin-header": "^3.0.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsdoc": "^39.6.2",
"eslint-plugin-sf-plugin": "file:/Users/shane.mclaughlin/eng/eslint-plugin-sf-plugin",
"husky": "^7.0.4",
"mocha": "^9.1.3",
"nyc": "^15.1.0",
Expand All @@ -64,7 +65,7 @@
"shx": "0.3.4",
"sinon": "10.0.0",
"ts-node": "^10.0.0",
"typescript": "^4.8.4"
"typescript": "^4.9.3"
},
"config": {},
"engines": {
Expand Down Expand Up @@ -176,4 +177,4 @@
"publishConfig": {
"access": "public"
}
}
}
8 changes: 4 additions & 4 deletions src/codeSigning/packAndSign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { EOL } from 'os';
import { join as pathJoin } from 'path';
import { Agent } from 'https';
import { Agents } from 'got';
import { UX } from '@salesforce/command';
import { Ux } from '@salesforce/sf-plugins-core';
import { Logger } from '@salesforce/core';
import { NamedError } from '@salesforce/kit';
import * as ProxyAgent from 'proxy-agent';
Expand Down Expand Up @@ -66,11 +66,11 @@ class PathGetter {
}
}

let cliUx: UX;
let cliUx: Ux;
let pathGetter: PathGetter;

export const api = {
setUx(ux: UX): void {
setUx(ux: Ux): void {
cliUx = ux;
},

Expand Down Expand Up @@ -256,7 +256,7 @@ export const api = {
packageJson.sfdx = getSfdxProperty(packageNameWithOrWithoutScope, npmName.tag);
await api.writePackageJson(packageJson);
cliUx.log('Successfully updated package.json with public key and signature file locations.');
cliUx.logJson(packageJson.sfdx);
cliUx.styledJSON(packageJson.sfdx);

const filepath = await api.pack();
cliUx.log(`Packed tgz to ${filepath}`);
Expand Down
Loading

0 comments on commit f2fbb56

Please sign in to comment.