sf_cli 1.0.0.beta5 → 1.0.0
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.
- checksums.yaml +4 -4
- data/README.rdoc +17 -0
- data/lib/sf_cli/console/commands.rb +4 -6
- data/lib/sf_cli/sf/project/core.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c83fc3297315182771f73c3ff599bfdd9abcff1c72a401d69bc8a734e9c7cd17
|
4
|
+
data.tar.gz: 8ed2425d43258abcc43e7ba9ec0dadf1cc18474d47ea286b38998b564cd68e6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f97ab229a3000ac570e2d46ccaf393a6f64fd5717587449dede15c149286624b2b37356f7ef5bbe23772a8e8f14519d291b3addfab0114b5963c5831d7f3d604
|
7
|
+
data.tar.gz: fb431e461147f16d9a2bac7cf13970f011dc53d77f936dd09a60ed47b2b28259722c3457f435136bfae03673d4bb8df6099ff234852fd03d16c221cf284fe481
|
data/README.rdoc
CHANGED
@@ -63,3 +63,20 @@ With sf command:
|
|
63
63
|
Doing the same thing independently:
|
64
64
|
contact = Contact.select(:Id, :Name).where(Name: 'Akin Kristen').take
|
65
65
|
contact.Name # Akin Kristen
|
66
|
+
== Developer Console
|
67
|
+
Developer console integrates both sf_cli's command methods and object model librry into IRB to make scripting easier in REPL.
|
68
|
+
|
69
|
+
You can directly use sf_cli's command methods:
|
70
|
+
$ sf_cli
|
71
|
+
> sf.query "SELECT Id, Name FROM Case", target_org: :your_org
|
72
|
+
|
73
|
+
Object Model is also available:
|
74
|
+
> use :your_org_name
|
75
|
+
> gen :Account, :Contact, :User #=> generate 3 Object model classes
|
76
|
+
> acc = Account.find_by Name: 'Hoge Fuga'
|
77
|
+
|
78
|
+
There are some other console commands:
|
79
|
+
> query "SELECT Id, Name, ... FROM BazBar__c" # just same as `sf data query` with human readable format
|
80
|
+
> apex "System.debug('abc');" # execute Apex code instantly
|
81
|
+
|
82
|
+
Type `help` for the help of all console commands
|
@@ -12,8 +12,6 @@ module SfCli
|
|
12
12
|
module Commands
|
13
13
|
def use(target_org)
|
14
14
|
org_info = sf.org.display target_org: target_org
|
15
|
-
#sf.org.login_web target_org: target_org, instance_url: org_info.instance_url unless org_info.connected?
|
16
|
-
|
17
15
|
conn = SfCli::Sf::Model::SfCommandConnection.new target_org: target_org, instance_url: org_info.instance_url
|
18
16
|
conn.open unless org_info.connected?
|
19
17
|
|
@@ -59,11 +57,11 @@ module SfCli
|
|
59
57
|
alias :gen :generate
|
60
58
|
alias :conn :connection
|
61
59
|
|
62
|
-
def help
|
60
|
+
def help
|
63
61
|
conf.inspect_mode = false
|
64
62
|
puts <<~HELP
|
65
63
|
Available commands:
|
66
|
-
use --- set current org.
|
64
|
+
use --- set current org.
|
67
65
|
gen --- generate Object model classes
|
68
66
|
query --- Query by SOQL with human readable format
|
69
67
|
apex --- run Apex code
|
@@ -74,14 +72,14 @@ module SfCli
|
|
74
72
|
use target-org
|
75
73
|
|
76
74
|
parameters:
|
77
|
-
targat-org --- Username or alias of the org you are going to use.
|
75
|
+
targat-org --- Username or alias of the org you are going to use. If you are not sure about them, check by `sf org list`.
|
78
76
|
|
79
77
|
[gen]
|
80
78
|
gen object-name, object-name, ...
|
81
79
|
generate object-name, object-name, ...
|
82
80
|
|
83
81
|
parameters:
|
84
|
-
object-name --- Comma separated Names. Symbol or String can be OK. At least 1 object name is required.
|
82
|
+
object-name --- Comma separated Names. Symbol or String can be OK. At least 1 object name is required.
|
85
83
|
|
86
84
|
example:
|
87
85
|
gen :Account, :Contact, :User
|
@@ -9,6 +9,7 @@ module SfCli
|
|
9
9
|
#
|
10
10
|
# @see https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_project_commands_unified.htm command reference
|
11
11
|
#
|
12
|
+
# @private :nodoc: just for developers
|
12
13
|
module Project
|
13
14
|
# @private :nodoc: just for developers
|
14
15
|
class Core
|