smartystreets-javascript-sdk 2.1.0 → 2.1.1
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/Makefile +2 -2
- package/examples/us_autocomplete_pro.js +7 -2
- package/package.json +1 -1
package/Makefile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/make -f
|
|
2
2
|
|
|
3
|
-
VERSION := $(shell tagit -
|
|
3
|
+
VERSION := $(shell tagit -p --dry-run)
|
|
4
4
|
VERSION_FILE1 := package.json
|
|
5
5
|
VERSION_FILE2 := package-lock.json
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ node_modules:
|
|
|
11
11
|
npm install
|
|
12
12
|
|
|
13
13
|
publish: test version upload unversion
|
|
14
|
-
tagit -
|
|
14
|
+
tagit -p
|
|
15
15
|
git push origin --tags
|
|
16
16
|
|
|
17
17
|
upload:
|
|
@@ -2,7 +2,12 @@ const SmartySDK = require("smartystreets-javascript-sdk");
|
|
|
2
2
|
const SmartyCore = SmartySDK.core;
|
|
3
3
|
const Lookup = SmartySDK.usAutocompletePro.Lookup;
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// for Server-to-server requests, use this code:
|
|
6
|
+
// let authId = process.env.SMARTY_AUTH_ID;
|
|
7
|
+
// let authToken = process.env.SMARTY_AUTH_TOKEN;
|
|
8
|
+
// const credentials = new SmartyCore.StaticCredentials(authId, authToken);
|
|
9
|
+
|
|
10
|
+
// for client-side requests (browser/mobile), use this code:
|
|
6
11
|
let key = process.env.SMARTY_EMBEDDED_KEY;
|
|
7
12
|
const credentials = new SmartyCore.SharedCredentials(key);
|
|
8
13
|
|
|
@@ -54,4 +59,4 @@ async function handleRequest(lookup, lookupType) {
|
|
|
54
59
|
} catch(err) {
|
|
55
60
|
console.log(err)
|
|
56
61
|
}
|
|
57
|
-
}
|
|
62
|
+
}
|