Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #186 from amtrack/fix/deps
Browse files Browse the repository at this point in the history
fix(deps): update dependencies and project
  • Loading branch information
amtrack authored Oct 23, 2022
2 parents dee3415 + 1697a68 commit c27a4fe
Show file tree
Hide file tree
Showing 15 changed files with 4,076 additions and 2,144 deletions.
13 changes: 0 additions & 13 deletions .eslintrc.js

This file was deleted.

8 changes: 5 additions & 3 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ jobs:
default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: yarn
run: |
yarn install
yarn global add sfdx-cli
- name: Release package
run: npx semantic-release
env:
Expand Down
24 changes: 16 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
*-debug.log
*-error.log
/.nyc_output
/dist
/lib
/package-lock.json
/tmp
node_modules
# Node.js
/node_modules/

# TypeScript
/lib/

# Testing
/.nyc_output/
/coverage/

# oclif
/oclif.manifest.json

# Salesforce DX
/.sfdx/
/.sf/
7 changes: 0 additions & 7 deletions .mocharc.json

This file was deleted.

8 changes: 6 additions & 2 deletions bin/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/env node

require('@oclif/command').run()
.catch(require('@oclif/errors/handle'))
const oclif = require("@oclif/core");

oclif
.run()
.then(require("@oclif/core/flush"))
.catch(require("@oclif/core/handle"));
3 changes: 0 additions & 3 deletions messages/export.json

This file was deleted.

3 changes: 0 additions & 3 deletions messages/import.json

This file was deleted.

1 change: 0 additions & 1 deletion oclif.manifest.json

This file was deleted.

54 changes: 18 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,29 @@
"sfdx-plugin-auth-url": "bin/run"
},
"dependencies": {
"@oclif/command": "^1",
"@oclif/config": "^1",
"@oclif/errors": "^1",
"@salesforce/command": "3.1.0",
"tmp": "^0.2.1",
"tslib": "^2"
"@salesforce/command": "5.2.16",
"tmp": "0.2.1",
"tslib": "2.4.0"
},
"devDependencies": {
"@oclif/dev-cli": "^1",
"@oclif/plugin-help": "3.2.2",
"@oclif/test": "^1",
"@salesforce/dev-config": "2.1.0",
"@salesforce/ts-types": "^1.5.0",
"@types/chai": "4.2.15",
"@types/mocha": "8.2.2",
"@types/node": "13.13.42",
"@typescript-eslint/eslint-plugin": "^4.15.1",
"@typescript-eslint/parser": "^4.15.1",
"chai": "^4",
"eslint": "^7.20.0",
"eslint-config-prettier": "^8.2.0",
"mocha": "9.0.1",
"@oclif/test": "2.2.6",
"@salesforce/ts-sinon": "1.4.1",
"@types/mocha": "10.0.0",
"@types/tmp": "0.2.3",
"chai": "4.3.6",
"mocha": "10.1.0",
"nyc": "15.1.0",
"prettier": "^2.2.1",
"ts-node": "9.1.1",
"typescript": "^4.2.4"
"oclif": "3.2.21",
"ts-node": "10.9.1",
"typescript": "4.8.4"
},
"engines": {
"node": ">=v8.17.0"
"node": ">=14.16"
},
"files": [
"/bin",
"/lib",
"/messages",
"/oclif.manifest.json",
"/yarn.lock"
"/oclif.manifest.json"
],
"homepage": "https://github.com/amtrack/sfdx-plugin-auth-url",
"keywords": [
Expand All @@ -58,20 +45,15 @@
"description": "Commands for importing/exporting orgs using a Sfdx Auth Url."
}
},
"devPlugins": [
"@oclif/plugin-help"
"additionalHelpFlags": [
"-h"
]
},
"repository": "amtrack/sfdx-plugin-auth-url",
"scripts": {
"build": "rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme",
"format": "prettier --write '{src,test}/**/*.ts'",
"lint": "tsc -p . --noEmit && eslint '{src,test}/**/*.ts'",
"postpack": "rm -f oclif.manifest.json",
"posttest": "yarn lint",
"build": "rm -rf lib && tsc -p . && oclif manifest",
"prepack": "yarn build",
"prepare": "yarn build",
"test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
"version": "oclif-dev readme && git add README.md"
"test": "nyc --reporter=lcov --reporter=text mocha --require ts-node/register \"test/**/*.test.ts\""
}
}
8 changes: 3 additions & 5 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
":semanticCommits",
":semanticCommitTypeAll(chore)"
],
"rangeStrategy": "bump"
"config:base"
]
}
14 changes: 4 additions & 10 deletions src/commands/auth-url/export.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
import { core, SfdxCommand } from '@salesforce/command';
import { SfdxCommand } from '@salesforce/command';
import type { AnyJson } from '@salesforce/ts-types';
import { promisify } from 'util';
import child_process = require('child_process');
const exec = promisify(child_process.exec);

// Initialize Messages with the current plugin directory
core.Messages.importMessagesDirectory(__dirname);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
const messages = core.Messages.loadMessages('sfdx-plugin-auth-url', 'export');

export default class ExportOrgUsingAuthUrlCommand extends SfdxCommand {
public static description = messages.getMessage('commandDescription');
public static description =
'Print a Sfdx Auth Url.\nThis is a wrapper for sfdx force:org:display --verbose.';

public static examples = [
`$ sfdx auth-url:export --targetusername myOrg@example.com
`$ sfdx <%= command.id %> --targetusername myOrg@example.com
force://PlatformCLI::xxx@amazing-cloudy-374844.my.salesforce.com
`
];
Expand Down
17 changes: 6 additions & 11 deletions src/commands/auth-url/import.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
import { core, flags, SfdxCommand } from '@salesforce/command';
import { flags, SfdxCommand } from '@salesforce/command';
import type { AnyJson } from '@salesforce/ts-types';
import { promises as fsPromises } from 'fs';
import type { FileResult } from 'tmp';
import { promisify } from 'util';
import child_process = require('child_process');
import tmp = require('tmp');
const exec = promisify(child_process.exec);

// Initialize Messages with the current plugin directory
core.Messages.importMessagesDirectory(__dirname);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
const messages = core.Messages.loadMessages('sfdx-plugin-auth-url', 'import');

export default class ImportOrgUsingAuthUrlCommand extends SfdxCommand {
public static description = messages.getMessage('commandDescription');
public static description =
'Authorize an org.\nThis is a wrapper for sfdx auth:sfdxurl:store without requiring a sfdxAuthUrl file.';

public static examples = [
'$ sfdx auth-url:import --setalias myOrg force://PlatformCLI::xxx@amazing-cloudy-374844.my.salesforce.com'
'$ sfdx <%= command.id %> --setalias myOrg force://PlatformCLI::xxx@amazing-cloudy-374844.my.salesforce.com'
];

public static args = [
Expand All @@ -43,7 +38,7 @@ export default class ImportOrgUsingAuthUrlCommand extends SfdxCommand {
})
};

protected tempObj;
protected tempObj!: FileResult;

public async run(): Promise<AnyJson> {
this.tempObj = tmp.fileSync();
Expand Down
4 changes: 0 additions & 4 deletions test/tsconfig.json

This file was deleted.

17 changes: 11 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{
"extends": "./node_modules/@salesforce/dev-config/tsconfig",
"compilerOptions": {
"outDir": "./lib",
"rootDir": "./src"
"outDir": "lib",
"module": "commonjs",
"target": "es2020",
"lib": ["es2020"],
"sourceMap": true,
"declaration": true,
"moduleResolution": "node",
"esModuleInterop": true,
"strict": true,
"noUnusedLocals": true
},
"include": [
"./src/**/*"
]
"include": ["./src/**/*.ts"]
}
Loading

0 comments on commit c27a4fe

Please sign in to comment.