@openfn/language-mongodb 1.1.1 → 2.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.
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "properties": {
4
- "clusterUrl": {
5
- "title": "Cluster URL",
4
+ "clusterHostname": {
5
+ "title": "Cluster Hostname",
6
6
  "type": "string",
7
- "description": "Your MongoDB cluster / host URL",
8
- "format": "uri",
7
+ "description": "Your MongoDB cluster hostname",
8
+ "format": "hostname",
9
9
  "minLength": 1,
10
10
  "examples": [
11
11
  "yourCluster-xxxyzzz.mongodb.net"
@@ -34,8 +34,8 @@
34
34
  "type": "object",
35
35
  "additionalProperties": true,
36
36
  "required": [
37
- "clusterUrl",
37
+ "clusterHostname",
38
38
  "username",
39
39
  "password"
40
40
  ]
41
- }
41
+ }
package/dist/index.cjs CHANGED
@@ -79,12 +79,12 @@ function execute(...operations) {
79
79
  };
80
80
  }
81
81
  function connect(state) {
82
- const { clusterUrl, username, password } = state.configuration;
82
+ const { clusterHostname, username, password } = state.configuration;
83
83
  const uri = `mongodb+srv://${encodeURIComponent(
84
84
  username
85
85
  )}:${encodeURIComponent(
86
86
  password
87
- )}@${clusterUrl}/test?retryWrites=true&w=majority`;
87
+ )}@${clusterHostname}/test?retryWrites=true&w=majority`;
88
88
  const client = new MongoClient(uri, { useNewUrlParser: true });
89
89
  return new Promise((resolve, reject) => {
90
90
  client.connect((err) => {
package/dist/index.js CHANGED
@@ -55,12 +55,12 @@ function execute(...operations) {
55
55
  };
56
56
  }
57
57
  function connect(state) {
58
- const { clusterUrl, username, password } = state.configuration;
58
+ const { clusterHostname, username, password } = state.configuration;
59
59
  const uri = `mongodb+srv://${encodeURIComponent(
60
60
  username
61
61
  )}:${encodeURIComponent(
62
62
  password
63
- )}@${clusterUrl}/test?retryWrites=true&w=majority`;
63
+ )}@${clusterHostname}/test?retryWrites=true&w=majority`;
64
64
  const client = new MongoClient(uri, { useNewUrlParser: true });
65
65
  return new Promise((resolve, reject) => {
66
66
  client.connect((err) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-mongodb",
3
- "version": "1.1.1",
3
+ "version": "2.0.0",
4
4
  "description": "A language package for working with MongoDb",
5
5
  "main": "dist/index.cjs",
6
6
  "author": "Open Function Group",