smartystreets-javascript-sdk 2.1.0 → 2.1.2
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/Readme.md +1 -1
- 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:
|
package/Readme.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
#### SMARTY DISCLAIMER: Subject to the terms of the associated license agreement, this software is freely available for your use. This software is FREE, AS IN PUPPIES, and is a gift. Enjoy your new responsibility. This means that while we may consider enhancement requests, we may or may not choose to entertain requests at our sole and absolute discretion.
|
|
2
2
|
|
|
3
3
|
# Smarty JavaScript SDK
|
|
4
4
|
|
|
@@ -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
|
+
}
|