@heroku-cli/heroku-connect-plugin 0.11.1 → 0.11.3
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 +71 -48
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,88 +1,111 @@
|
|
|
1
|
-
Heroku Connect CLI Plugin
|
|
2
|
-
==================
|
|
1
|
+
# Heroku Connect CLI Plugin
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
## Install
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
```shell
|
|
6
|
+
$ heroku plugins:install @heroku-cli/heroku-connect-plugin
|
|
7
|
+
Installing plugin @heroku-cli/heroku-connect-plugin... installed
|
|
8
|
+
```
|
|
7
9
|
|
|
10
|
+
## Help
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
```shell
|
|
13
|
+
$ heroku help connect
|
|
14
|
+
```
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
## Commands
|
|
12
17
|
|
|
13
|
-
|
|
18
|
+
```text
|
|
19
|
+
heroku connect:db:set - Set database parameters
|
|
20
|
+
heroku connect:diagnose - Display diagnostic information about a connection
|
|
21
|
+
heroku connect:export - Export a mapping configuration JSON file
|
|
22
|
+
heroku connect:import FILE - Import a mapping configuration JSON file
|
|
23
|
+
heroku connect:info - Display connection information
|
|
24
|
+
heroku connect:mapping:state MAPPING - Return the state of a mapping
|
|
25
|
+
heroku connect:mapping:delete MAPPING - Delete an existing mapping
|
|
26
|
+
heroku connect:mapping:reload MAPPING - Reload a mapping's data from Salesforce
|
|
27
|
+
heroku connect:pause - Pause a connection
|
|
28
|
+
heroku connect:resume - Resume a connection
|
|
29
|
+
heroku connect:restart - Restart a connection
|
|
30
|
+
heroku connect:sf:auth - Authenticate a connection to Salesforce
|
|
31
|
+
heroku connect:state - Return the state flag for a single connection
|
|
32
|
+
```
|
|
14
33
|
|
|
15
|
-
|
|
16
|
-
heroku connect:diagnose - Display diagnostic information about a connection
|
|
17
|
-
heroku connect:export - Export a mapping configuration JSON file
|
|
18
|
-
heroku connect:import FILE - Import a mapping configuration JSON file
|
|
19
|
-
heroku connect:info - Display connection information
|
|
20
|
-
heroku connect:mapping:state MAPPING - Return the state of a mapping
|
|
21
|
-
heroku connect:mapping:delete MAPPING - Delete an existing mapping
|
|
22
|
-
heroku connect:mapping:reload MAPPING - Reload a mapping's data from Salesforce
|
|
23
|
-
heroku connect:pause - Pause a connection
|
|
24
|
-
heroku connect:resume - Resume a connection
|
|
25
|
-
heroku connect:restart - Restart a connection
|
|
26
|
-
heroku connect:sf:auth - Authenticate a connection to Salesforce
|
|
27
|
-
heroku connect:state - Return the state flag for a single connection
|
|
28
|
-
|
|
29
|
-
# Examples
|
|
34
|
+
## Examples
|
|
30
35
|
|
|
31
36
|
Download an existing mapping configuration
|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
```shell
|
|
39
|
+
$ heroku connect:export
|
|
40
|
+
Saved config-file: app-name-resource-name.json
|
|
41
|
+
```
|
|
35
42
|
|
|
36
|
-
|
|
43
|
+
## Tutorial
|
|
37
44
|
|
|
38
45
|
Make sure you have a Heroku app, with a Postgres database attached
|
|
39
46
|
|
|
40
|
-
|
|
47
|
+
### Add the Heroku Connect add-on to your app
|
|
41
48
|
|
|
42
|
-
|
|
49
|
+
```shell
|
|
50
|
+
$ heroku addons:create herokuconnect
|
|
51
|
+
```
|
|
43
52
|
|
|
44
|
-
|
|
53
|
+
### Link the new connection (the Heroku Connect add-on instance) to your Heroku user
|
|
45
54
|
|
|
46
|
-
|
|
55
|
+
```shell
|
|
56
|
+
$ heroku connect:info
|
|
57
|
+
```
|
|
47
58
|
|
|
48
|
-
|
|
59
|
+
### Now link the connection to the database, specifying the config var and schema name
|
|
49
60
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
61
|
+
```shell
|
|
62
|
+
$ heroku connect:db:set --db=DATABASE_URL --schema=salesforce
|
|
63
|
+
settings database parameters... done
|
|
64
|
+
db_key: DATABASE_URL
|
|
65
|
+
schema_name: salesforce
|
|
66
|
+
```
|
|
54
67
|
|
|
55
68
|
If either option is not supplied, this command will ask for a value.
|
|
56
69
|
|
|
57
|
-
|
|
70
|
+
### Authorize the connection to access your Salesforce organization
|
|
58
71
|
|
|
59
|
-
|
|
60
|
-
|
|
72
|
+
```shell
|
|
73
|
+
$ heroku connect:sf:auth
|
|
74
|
+
Launching Salesforce for authorization. If your browser doesn't open, please copy the following URL to proceed:
|
|
61
75
|
|
|
62
|
-
|
|
76
|
+
https://login.salesforce.com/services/oauth2/authorize?…
|
|
63
77
|
|
|
64
78
|
This will launch your browser for an interactive authorization session.
|
|
79
|
+
```
|
|
65
80
|
|
|
66
|
-
|
|
81
|
+
### Verify that connection is now in 'IDLE' state
|
|
67
82
|
|
|
68
|
-
|
|
69
|
-
|
|
83
|
+
```shell
|
|
84
|
+
$ heroku connect:state
|
|
85
|
+
IDLE
|
|
86
|
+
```
|
|
70
87
|
|
|
71
|
-
|
|
88
|
+
### Now restore the exported configuration
|
|
72
89
|
|
|
73
90
|
This could be exported using the `connect:export` command or directly through the Heroku Connect dashboard. By editing this configuration file, you can add and edit existing mappings easily.
|
|
74
91
|
|
|
75
|
-
|
|
76
|
-
|
|
92
|
+
```shell
|
|
93
|
+
$ heroku connect:import app-name-resource-name.json
|
|
94
|
+
Upload complete
|
|
95
|
+
```
|
|
77
96
|
|
|
78
97
|
If you need to delete a mapping after the configuration has been imported, you can use a separate command for that:
|
|
79
98
|
|
|
80
|
-
|
|
99
|
+
```shell
|
|
100
|
+
$ heroku connect:mapping:delete Contact
|
|
101
|
+
```
|
|
81
102
|
|
|
82
|
-
|
|
103
|
+
### Connect to your database to see the data
|
|
83
104
|
|
|
84
|
-
|
|
85
|
-
|
|
105
|
+
```shell
|
|
106
|
+
$ heroku pg:psql
|
|
107
|
+
> select * from salesforce.contact;
|
|
108
|
+
```
|
|
86
109
|
|
|
87
110
|
## Contributing
|
|
88
111
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heroku-cli/heroku-connect-plugin",
|
|
3
3
|
"description": "Heroku Connect plugin for Heroku CLI",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.3",
|
|
5
5
|
"author": "Heroku",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"mocha": "^10.7.0",
|
|
36
|
-
"mockdate": "^
|
|
36
|
+
"mockdate": "^3.0.5",
|
|
37
37
|
"nock": "^13.5.4",
|
|
38
|
-
"sinon": "^
|
|
38
|
+
"sinon": "^19.0.2",
|
|
39
39
|
"standard": "^17.1.0",
|
|
40
|
-
"unexpected": "^
|
|
40
|
+
"unexpected": "^13.2.1"
|
|
41
41
|
}
|
|
42
42
|
}
|