-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
84 changed files
with
248 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
#!/usr/bin/env node | ||
|
||
const oclif = require("@oclif/core"); | ||
// eslint-disable-next-line node/shebang | ||
async function main() { | ||
const { execute } = await import('@oclif/core'); | ||
await execute({ dir: import.meta.url }); | ||
} | ||
|
||
oclif | ||
.run() | ||
.then(require("@oclif/core/flush")) | ||
.catch(require("@oclif/core/handle")); | ||
await main(); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"version": "0.0.0-development", | ||
"description": "sfdx plugin for browser automation", | ||
"author": "Matthias Rolke <[email protected]>", | ||
"type": "module", | ||
"bin": { | ||
"sfdx-browserforce-plugin": "bin/run" | ||
}, | ||
|
@@ -24,13 +25,9 @@ | |
"ts-node": "10.9.1", | ||
"typescript": "5.2.2" | ||
}, | ||
"engines": { | ||
"node": ">=14.0.0" | ||
}, | ||
"files": [ | ||
"/bin", | ||
"/lib", | ||
"/messages", | ||
"/oclif.manifest.json" | ||
], | ||
"keywords": [ | ||
|
@@ -52,6 +49,10 @@ | |
"-h" | ||
] | ||
}, | ||
"mocha": { | ||
"loader": "ts-node/esm", | ||
"no-warnings": "ExperimentalWarning" | ||
}, | ||
"repository": "amtrack/sfdx-browserforce-plugin", | ||
"scripts": { | ||
"build": "rm -rf lib && tsc -p . && oclif manifest", | ||
|
@@ -60,7 +61,7 @@ | |
"generate:plugin": "npx hygen plugin new", | ||
"prepack": "yarn build", | ||
"prepare": "yarn build", | ||
"test": "tsc --resolveJsonModule -p test && nyc --reporter=lcov --reporter=text mocha --require ts-node/register \"test/**/*.test.ts\" \"src/**/*.test.ts\"", | ||
"test:e2e": "tsc --resolveJsonModule -p test && mocha --require ts-node/register --slow 30s --timeout 2m --file test/e2e-setup.ts \"test/**/*.e2e-spec.ts\" \"src/**/*.e2e-spec.ts\"" | ||
"test": "tsc -p test && nyc --reporter=lcov --reporter=text mocha \"test/**/*.test.ts\" \"src/**/*.test.ts\"", | ||
"test:e2e": "tsc -p test && mocha --slow 30s --timeout 2m --file test/e2e-setup.ts \"test/**/*.e2e-spec.ts\" \"src/**/*.e2e-spec.ts\"" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
const salesforcePrettierConfig = require('@salesforce/prettier-config'); | ||
import salesforcePrettierConfig from '@salesforce/prettier-config'; | ||
|
||
module.exports = { | ||
export default { | ||
...salesforcePrettierConfig, | ||
trailingComma: 'none' | ||
singleQuote: false | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import { Messages } from '@salesforce/core'; | ||
import { BrowserforceCommand } from '../../browserforce-command'; | ||
import { BrowserforceCommand } from '../../browserforce-command.js'; | ||
|
||
Messages.importMessagesDirectory(__dirname); | ||
const messages = Messages.loadMessages('sfdx-browserforce-plugin', 'browserforce'); | ||
|
||
export class BrowserforceApply extends BrowserforceCommand { | ||
public static description = messages.getMessage('applyCommandDescription'); | ||
type BrowserforceApplyResponse = { | ||
success: boolean; | ||
} | ||
|
||
export class BrowserforceApply extends BrowserforceCommand<BrowserforceApplyResponse> { | ||
public static description = 'apply a plan from a definition file'; | ||
public static examples = [ | ||
`$ <%= config.bin %> <%= command.id %> -f ./config/setup-admin-login-as-any.json --target-org [email protected] | ||
logging in... done | ||
|
@@ -17,7 +16,7 @@ export class BrowserforceApply extends BrowserforceCommand { | |
` | ||
]; | ||
|
||
public async run(): Promise<unknown> { | ||
public async run(): Promise<BrowserforceApplyResponse> { | ||
const { flags } = await this.parse(BrowserforceApply); | ||
this.log(`Applying definition file ${flags.definitionfile} to org ${flags['target-org'].getUsername()}`); | ||
for (const setting of this.settings) { | ||
|
@@ -52,6 +51,8 @@ export class BrowserforceApply extends BrowserforceCommand { | |
this.log(`[${driver.name}] no action necessary`); | ||
} | ||
} | ||
return { success: true }; | ||
return { | ||
success: true | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
import { writeFile } from 'fs/promises'; | ||
import { Messages } from '@salesforce/core'; | ||
import * as path from 'path'; | ||
import { BrowserforceCommand } from '../../browserforce-command'; | ||
import { BrowserforceCommand } from '../../browserforce-command.js'; | ||
|
||
Messages.importMessagesDirectory(__dirname); | ||
const messages = Messages.loadMessages('sfdx-browserforce-plugin', 'browserforce'); | ||
|
||
export class BrowserforcePlanCommand extends BrowserforceCommand { | ||
public static description = messages.getMessage('planCommandDescription'); | ||
type BrowserforceApplyResponse = { | ||
success: boolean; | ||
} | ||
|
||
export class BrowserforcePlanCommand extends BrowserforceCommand<BrowserforceApplyResponse> { | ||
public static description = 'retrieve state and generate plan file'; | ||
public static examples = [ | ||
`$ <%= config.bin %> <%= command.id %> -f ./config/setup-admin-login-as-any.json --target-org [email protected] | ||
logging in... done | ||
|
@@ -19,7 +18,7 @@ export class BrowserforcePlanCommand extends BrowserforceCommand { | |
` | ||
]; | ||
|
||
public async run(): Promise<unknown> { | ||
public async run(): Promise<BrowserforceApplyResponse> { | ||
const { flags } = await this.parse(BrowserforcePlanCommand); | ||
this.log( | ||
`Generating plan with definition file ${flags.definitionfile} from org ${flags['target-org'].getUsername()}` | ||
|
@@ -58,6 +57,6 @@ export class BrowserforcePlanCommand extends BrowserforceCommand { | |
await writeFile(path.resolve(flags.planfile), JSON.stringify(plan, null, 2)); | ||
this.spinner.stop(); | ||
} | ||
return { success: true, plan }; | ||
return { success: true }; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/plugins/customer-portal/available-custom-objects/index.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/plugins/customer-portal/available-custom-objects/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.