sfdx-deliverability-access 0.1.13 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ sfdx deliverability:access --help
|
|
|
43
43
|
|
|
44
44
|
## Version History
|
|
45
45
|
|
|
46
|
-
* 0.1.
|
|
46
|
+
* 0.1.16 - Fixes bug by promisifying `exec()` so the plugin can be used in CI/CD flows
|
|
47
47
|
* Initial Release (0.1.4)
|
|
48
48
|
|
|
49
49
|
## License
|
|
@@ -34,7 +34,7 @@ class Access extends command_1.SfdxCommand {
|
|
|
34
34
|
void this.toggleDeliverability(accessUrl, childElementIndex);
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
|
-
this.ux.stopSpinner('Access Level could not be set');
|
|
37
|
+
this.ux.stopSpinner('❌ Access Level could not be set.');
|
|
38
38
|
throw new core_1.SfdxError(`${accessLevel} is not a valid value for the Level flag.`, 'Invalid value for Level flag');
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -49,8 +49,8 @@ class Access extends command_1.SfdxCommand {
|
|
|
49
49
|
'&retURL=/lightning/setup/OrgEmailSettings/home');
|
|
50
50
|
}
|
|
51
51
|
catch (error) {
|
|
52
|
-
this.ux.stopSpinner('Access Level could not be set');
|
|
53
|
-
const errorMessage = `Unable to parse url from 'sfdx force:org:open' command. Please make sure you have a default org set or you are passing a valid username/alias with the '-u' or '--user' flag.\n\
|
|
52
|
+
this.ux.stopSpinner('❌ Access Level could not be set.');
|
|
53
|
+
const errorMessage = `Unable to parse url from 'sfdx force:org:open' command. Please make sure you have a default org set or you are passing a valid username/alias with the '-u' or '--user' flag.\n\n${String(error)}`;
|
|
54
54
|
throw new core_1.SfdxError(errorMessage);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -71,10 +71,10 @@ class Access extends command_1.SfdxCommand {
|
|
|
71
71
|
await driver.executeScript(`document.getElementsByClassName('pbSubsection')[0].children[0].children[0].children[0].children[0].children[0].children[${childElementIndex}].selected=true`);
|
|
72
72
|
await driver.findElement(webdriver.By.id('thePage:theForm:editBlock:buttons:saveBtn')).click();
|
|
73
73
|
await driver.sleep(1000);
|
|
74
|
-
this.ux.stopSpinner('Email Deliverability Access Level has been set!');
|
|
74
|
+
this.ux.stopSpinner('🎉 Email Deliverability Access Level has been set!');
|
|
75
75
|
}
|
|
76
76
|
catch (error) {
|
|
77
|
-
this.ux.stopSpinner('Access Level could not be set');
|
|
77
|
+
this.ux.stopSpinner('❌ Access Level could not be set.');
|
|
78
78
|
this.ux.log(`The following error occurred:\n${String(error)}`);
|
|
79
79
|
}
|
|
80
80
|
finally {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access.js","sourceRoot":"","sources":["../../../src/commands/deliverability/access.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,6BAA6B;AAC7B,iDAAqC;AACrC,iDAAyD;AACzD,2CAAuD;AACvD,gDAAiD;AACjD,oDAAqD;AACrD,sDAAuD;AACvD,6CAA8C;AAC9C,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;AAC/B,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,oBAAI,CAAC,CAAC;AAEzC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAiB;IAC9C,CAAC,MAAM,EAAE,GAAG,CAAC;IACb,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,QAAQ,EAAE,GAAG,CAAC;IACf,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,KAAK,EAAE,GAAG,CAAC;IACZ,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;CACX,CAAC,CAAC;AAEH,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,MAAM,QAAQ,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,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;KACzD,CAAC;IACF,IAAI,EAAE,eAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;KACxD,CAAC;CACH,CAAC;AAEe,sBAAe,GAAG,KAAK,CAAC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.1.
|
|
1
|
+
{"version":"0.1.16","commands":{"deliverability:access":{"id":"deliverability:access","description":"Set Email Deliverability Access Level for an org.","usage":"<%= command.id %> [-l <string>] [-u <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"sfdx-deliverability-access","pluginType":"core","aliases":[],"examples":["sfdx deliverability:access --level All","sfdx deliverability:access --level None","sfdx deliverability:access --level System"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"level":{"name":"level","type":"option","char":"l","description":"No access: None, none, n, 0\nSystem email only: System, system, s, 1\nAll email: All, all, a, 2"},"user":{"name":"user","type":"option","char":"u","description":"Username or alias for the target org; overrides default target org"}},"args":[]}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sfdx-deliverability-access",
|
|
3
3
|
"description": "SFDX Plugin to set Email Deliverability Access Level for an org via command line. This project uses Selenium, Webdriver and headless browsing to open Setup in the target org and set Email Deliverability Access Level to the desired value.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.16",
|
|
5
5
|
"author": "gfarb @gfarb",
|
|
6
6
|
"bugs": "https://github.com/gfarb/sfdx-deliverability-access/issues",
|
|
7
7
|
"dependencies": {
|