balena-settings-client
Advanced tools
Comparing version 4.0.5 to 4.0.6-add-tunnel-url-1ba76321fb0fee86644ab5c5f1c23ed25c921eeb
@@ -48,2 +48,7 @@ declare const _default: { | ||
/** | ||
* @property {Function} tunnelUrl - Balena Tunnel url | ||
* @memberof defaults | ||
*/ | ||
tunnelUrl(): string; | ||
/** | ||
* @property {String} dataDirectory - data directory path | ||
@@ -50,0 +55,0 @@ * @memberof defaults |
@@ -92,2 +92,9 @@ "use strict"; | ||
/** | ||
* @property {Function} tunnelUrl - Balena Tunnel url | ||
* @memberof defaults | ||
*/ | ||
tunnelUrl: function () { | ||
return "tunnel." + this.balenaUrl; | ||
}, | ||
/** | ||
* @property {String} dataDirectory - data directory path | ||
@@ -94,0 +101,0 @@ * @memberof defaults |
@@ -18,2 +18,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parse = exports.isSettingVariable = exports.getSettingName = void 0; | ||
var _ = require("lodash"); | ||
@@ -20,0 +21,0 @@ /** |
@@ -18,2 +18,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getAll = exports.get = void 0; | ||
/** | ||
@@ -20,0 +21,0 @@ * This module attempts to retrieve configuration from the following places: |
@@ -59,2 +59,2 @@ /** | ||
*/ | ||
export declare const evaluateSetting: <T>(settings: object | null | undefined, property: string) => T; | ||
export declare const evaluateSetting: <T>(settings: object | undefined | null, property: string) => T; |
@@ -18,2 +18,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.evaluateSetting = exports.mergeObjects = void 0; | ||
var _ = require("lodash"); | ||
@@ -20,0 +21,0 @@ /** |
@@ -18,2 +18,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parse = void 0; | ||
/** | ||
@@ -20,0 +21,0 @@ * @summary Parse a YAML string |
@@ -7,2 +7,7 @@ # Change Log | ||
# v4.0.6 | ||
## (2021-01-20) | ||
* defaults: Add tunnelUrl to return a computed value [Rich Bayliss] | ||
# v4.0.5 | ||
@@ -9,0 +14,0 @@ ## (2020-04-21) |
@@ -105,2 +105,10 @@ /* | ||
/** | ||
* @property {Function} tunnelUrl - Balena Tunnel url | ||
* @memberof defaults | ||
*/ | ||
tunnelUrl() { | ||
return `tunnel.${this.balenaUrl}`; | ||
}, | ||
/** | ||
* @property {String} dataDirectory - data directory path | ||
@@ -107,0 +115,0 @@ * @memberof defaults |
{ | ||
"name": "balena-settings-client", | ||
"version": "4.0.5", | ||
"version": "4.0.6-add-tunnel-url-1ba76321fb0fee86644ab5c5f1c23ed25c921eeb", | ||
"description": "Balena client application shared settings", | ||
@@ -5,0 +5,0 @@ "main": "build/settings.js", |
@@ -117,2 +117,14 @@ import { expect } from 'chai'; | ||
describe('.tunnelUrl', () => { | ||
it('should be a valid url', () => { | ||
const setting = utils.evaluateSetting<string>(defaults, 'tunnelUrl'); | ||
expect(() => url.parse(setting)).to.not.throw(Error); | ||
}); | ||
it('should not contain a protocol', () => { | ||
const setting = utils.evaluateSetting<string>(defaults, 'tunnelUrl'); | ||
expect(url.parse(setting).protocol).to.not.exist; | ||
}); | ||
}); | ||
describe('.dataDirectory', () => | ||
@@ -119,0 +131,0 @@ it('should be an absolute path', () => { |
@@ -175,2 +175,3 @@ import * as Promise from 'bluebird'; | ||
proxyUrl: 'devices.balenadev.custom.com/', | ||
tunnelUrl: 'tunnel.balenadev.custom.com/', | ||
dataDirectory: '/opt', | ||
@@ -177,0 +178,0 @@ cacheDirectory: path.join('/opt', 'cache'), |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85817
1968
1