@sasjs/cli 4.5.0 → 4.5.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/build/utils/config.js
CHANGED
|
@@ -1148,6 +1148,7 @@ exports.getTestTearDown = getTestTearDown;
|
|
|
1148
1148
|
* @returns - instance of @sasjs/adapter.
|
|
1149
1149
|
*/
|
|
1150
1150
|
function getSASjs(target) {
|
|
1151
|
+
var verbose = process.env.VERBOSE;
|
|
1151
1152
|
return new node_1.default({
|
|
1152
1153
|
serverUrl: target.serverUrl,
|
|
1153
1154
|
appLoc: target.appLoc,
|
|
@@ -1156,7 +1157,7 @@ function getSASjs(target) {
|
|
|
1156
1157
|
httpsAgentOptions: target.httpsAgentOptions,
|
|
1157
1158
|
debug: true,
|
|
1158
1159
|
useComputeApi: target.serverType === utils_1.ServerType.SasViya,
|
|
1159
|
-
verbose:
|
|
1160
|
+
verbose: typeof verbose === 'string' ? /on/i.test(verbose) : false // only string equal to 'on'(case insensitive) will enable verbose mode
|
|
1160
1161
|
});
|
|
1161
1162
|
}
|
|
1162
1163
|
exports.getSASjs = getSASjs;
|
|
@@ -770,12 +770,17 @@ describe('getSASjs', function () {
|
|
|
770
770
|
useComputeApi = sasjsConfig.useComputeApi;
|
|
771
771
|
expect(useComputeApi).toEqual(false);
|
|
772
772
|
});
|
|
773
|
-
it(
|
|
773
|
+
it("should enable verbose mode if VERBOSE env is present and is equal to 'on'(case insensitive)", function () {
|
|
774
774
|
process.env.VERBOSE = 'on';
|
|
775
775
|
var sasjs = (0, config_1.getSASjs)({});
|
|
776
776
|
var sasjsConfig = sasjs.getSasjsConfig();
|
|
777
777
|
var verbose = sasjsConfig.verbose;
|
|
778
778
|
expect(verbose).toEqual(true);
|
|
779
|
+
process.env.VERBOSE = 'ON';
|
|
780
|
+
sasjs = (0, config_1.getSASjs)({});
|
|
781
|
+
sasjsConfig = sasjs.getSasjsConfig();
|
|
782
|
+
verbose = sasjsConfig.verbose;
|
|
783
|
+
expect(verbose).toEqual(true);
|
|
779
784
|
});
|
|
780
785
|
it('should disable verbose mode if VERBOSE env is not present', function () {
|
|
781
786
|
process.env.VERBOSE = '';
|
|
@@ -784,4 +789,11 @@ describe('getSASjs', function () {
|
|
|
784
789
|
var verbose = sasjsConfig.verbose;
|
|
785
790
|
expect(verbose).toEqual(false);
|
|
786
791
|
});
|
|
792
|
+
it("should disable verbose mode if VERBOSE env is present and is not equal to 'on'(case insensitive)", function () {
|
|
793
|
+
process.env.VERBOSE = 'start';
|
|
794
|
+
var sasjs = (0, config_1.getSASjs)({});
|
|
795
|
+
var sasjsConfig = sasjs.getSasjsConfig();
|
|
796
|
+
var verbose = sasjsConfig.verbose;
|
|
797
|
+
expect(verbose).toEqual(false);
|
|
798
|
+
});
|
|
787
799
|
});
|
package/package.json
CHANGED
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"lint:fix": "npx prettier --write \"{src,test}/**/*.{ts,tsx,js,jsx,html,css,sass,less,yml,md,graphql}\"",
|
|
21
21
|
"lint": "npx prettier --check \"{src,test}/**/*.{ts,tsx,js,jsx,html,css,sass,less,yml,md,graphql}\"",
|
|
22
22
|
"preinstall": "npm run nodeVersionMessage",
|
|
23
|
-
"prepare": "git rev-parse --git-dir && git config core.hooksPath ./.git-hooks || true"
|
|
23
|
+
"prepare": "git rev-parse --git-dir && git config core.hooksPath ./.git-hooks || true",
|
|
24
|
+
"doc": "npx compodoc -p tsconfig.doc.json --coverageTest 15 --coverageTestThresholdFail"
|
|
24
25
|
},
|
|
25
26
|
"testServerTypes": "sasjs",
|
|
26
27
|
"release": {
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
"Viya",
|
|
41
42
|
"SASjs"
|
|
42
43
|
],
|
|
43
|
-
"author": "",
|
|
44
|
+
"author": "4GL Apps",
|
|
44
45
|
"license": "ISC",
|
|
45
46
|
"bugs": {
|
|
46
47
|
"url": "https://github.com/sasjs/cli/issues"
|
|
@@ -77,6 +78,7 @@
|
|
|
77
78
|
"@babel/core": "7.21.0",
|
|
78
79
|
"@babel/preset-env": "7.20.2",
|
|
79
80
|
"@babel/preset-typescript": "7.21.0",
|
|
81
|
+
"@compodoc/compodoc": "1.1.21",
|
|
80
82
|
"@types/adm-zip": "0.5.0",
|
|
81
83
|
"@types/debug": "4.1.7",
|
|
82
84
|
"@types/find": "0.2.1",
|
|
@@ -102,5 +104,5 @@
|
|
|
102
104
|
"typescript": "4.9.5",
|
|
103
105
|
"util": "0.12.4"
|
|
104
106
|
},
|
|
105
|
-
"version": "4.5.
|
|
107
|
+
"version": "4.5.1"
|
|
106
108
|
}
|