tmkw / sf_cli

A Ruby class library for Salesforce CLI
https://tmkw.github.io/sf_cli/
MIT License
0 stars 0 forks source link

0.0.3 (and later) #1

Closed tmkw closed 2 months ago

tmkw commented 2 months ago

At first glance, I feel the bellowings are candidates. Of course not all are covered in 0.0.3.

tmkw commented 2 months ago

need to add required ruby version to gemspec

tmkw commented 2 months ago

After some consideration, those must be added for my use: [gemspec]

[sf command] sf commands are so many. So, I will divide them into some releases:

(0.0.3)

(0.0.4)

(0.0.5)

(0.0.6)

(0.0.7)

(0.0.8) sf data bulk operations?

tmkw commented 2 months ago

with 0.0.3, I want to change some desgin with this change, I will do like this:

  sf = SfCli::Sf.new

  sf.target_org = :hoge

  sf.org.display   #=> returns org 'hoge''s information
  sf.org.display :bar #=> returns org 'bar''s information

  sf.data.query 'SOQL'
  sf.data query 'SOQL', target_org: :bar
tmkw commented 2 months ago

hmm, does that make sence?? need more consideration....

tmkw commented 2 months ago

...in 0.0.3:

design change:

sf = SfCli::sf.new
sf.org.login_web  # login to default org

sf.org.target_org = :hoge
sf.org.login_web  # login to org "hoge"

sf.data.query "SELECT ...."  # query against default org

sf.data.target_org = :bar  # set bar as target org
sf.data.query "SELECT ..."  # query against org 'bar'

hmmm....

tmkw commented 2 months ago

Also, unit testings should be all included as 0.0.3.

adding sf command operations are after 0.0.4.

tmkw commented 2 months ago

CONCLUSION

0.0.3 includes:

  1. rubygem's issues (homepage, ruby version)

  2. design change:

    • stop keeping target-org as instance variable.
    • keep classes just thin wrapper of sf command as possible
    • keep library as fluent api as possible
sf = SfCli::sf.new
sf.org.login_web  # login to default org
sf.org.login_web target_org: :hoge  # login to org "hoge"

sf.data.query "SELECT ...."  # query against default org
sf.data.query "SELECT ..." , target_org: :bar  # query against org 'bar'

you must specify target_org every time when you access any orgs except default one.

  1. all tests should be set up and implemented

    • cucumber
    • rspec
  2. refactoring

    • exception class for each operation
    • use json responses
    • command line construction
    • debug mode
  3. operations add:

    • sf project deploy start
    • sf project retrieve start
    • sf org list
    • sf org logout
    • sf org display user
    • sf alias list
tmkw commented 2 months ago

with 0.0.1/refactoring, from 1 to 3 and most of 4 has been done.

so, tasks left for 0.0.3....

  1. refactoring exception class for each operation

operations add:

  • sf project deploy start
  • sf project retrieve start
  • sf org list
  • sf org logout
  • sf org display user
  • sf alias list
tmkw commented 2 months ago

I think the contents of 0.0.7 draft should be included in 0.0.3

(0.0.7)

sf data create record sf data delete record sf data get record sf data update record

tmkw commented 2 months ago

from priority perspective, the following should be included. it's ok that other candidates go to 0.0.7

tmkw commented 2 months ago

go to 0.0.7

tmkw commented 2 months ago

About 0.0.4 later, the followings are just idea.

0.0.4

all done :+1:

0.0.5

bulk operations

0.0.6

0.0.7

0.0.8

operations for non scratch org:

0.0.9

operations for non scratch org:

0.0.10

sf schema generate sobject sf schema generate field sf schema generate tab

0.0.11

0.0.12

sf api rest operations

0.0.13

sf api other operations OR sf org: scratch-org operations ?