cisco-axl 1.1.9 → 1.2.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.
- package/package.json +1 -1
- package/test/tests.js +6 -1
package/package.json
CHANGED
package/test/tests.js
CHANGED
|
@@ -12,6 +12,11 @@ if(process.env.NODE_ENV === "development"){
|
|
|
12
12
|
require('dotenv').config({ path: path.join(__dirname, '..', 'env', 'staging.env') })
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
const versionValid = makeValidator(x => {
|
|
16
|
+
if (/.*\..*[^\\]/.test(x)) return x.toUpperCase()
|
|
17
|
+
else throw new Error('CUCM_VERSION must be in the format of ##.#')
|
|
18
|
+
})
|
|
19
|
+
|
|
15
20
|
const env = cleanEnv(process.env, {
|
|
16
21
|
NODE_ENV: str({
|
|
17
22
|
choices: ["development", "test", "production", "staging"],
|
|
@@ -20,7 +25,7 @@ const env = cleanEnv(process.env, {
|
|
|
20
25
|
CUCM_HOSTNAME: host({ desc: "Cisco CUCM Hostname or IP Address." }),
|
|
21
26
|
CUCM_USERNAME: str({ desc: "Cisco CUCM AXL Username." }),
|
|
22
27
|
CUCM_PASSWORD: str({ desc: "Cisco CUCM AXL Password." }),
|
|
23
|
-
CUCM_VERSION:
|
|
28
|
+
CUCM_VERSION: versionValid({ desc: "Cisco CUCM Version." , example: "12.5" })
|
|
24
29
|
});
|
|
25
30
|
|
|
26
31
|
// Set up new AXL service
|