@sasjs/cli 3.17.1 → 3.18.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/build/commands/add/internal/input.d.ts +1 -1
- package/build/commands/add/internal/input.js +4 -2
- package/build/commands/compile/internal/compileFile.js +6 -3
- package/build/commands/compile/internal/spec/compileTestFile.spec.js +1 -1
- package/build/commands/deploy/spec/cbd.spec.js +2 -1
- package/package.json +5 -5
|
@@ -28,7 +28,7 @@ export declare const getCredentialsInputSas9: (target: Target, scope: TargetScop
|
|
|
28
28
|
userName: string;
|
|
29
29
|
password: string;
|
|
30
30
|
}>;
|
|
31
|
-
export declare const getDefaultValues: (targetName: string) => {
|
|
31
|
+
export declare const getDefaultValues: (targetName: string, serverType?: string | undefined) => {
|
|
32
32
|
client: string;
|
|
33
33
|
secret: string;
|
|
34
34
|
};
|
|
@@ -363,7 +363,7 @@ var getCredentialsInputSasjs = function (target) { return __awaiter(void 0, void
|
|
|
363
363
|
var client;
|
|
364
364
|
return __generator(this, function (_a) {
|
|
365
365
|
switch (_a.label) {
|
|
366
|
-
case 0: return [4 /*yield*/, (0, input_1.getString)('Please enter your Client ID: ', function (v) { return !!v || 'Client ID is required.'; }, (0, exports.getDefaultValues)(target.name).client)];
|
|
366
|
+
case 0: return [4 /*yield*/, (0, input_1.getString)('Please enter your Client ID: ', function (v) { return !!v || 'Client ID is required.'; }, (0, exports.getDefaultValues)(target.name, types_1.ServerType.Sasjs).client)];
|
|
367
367
|
case 1:
|
|
368
368
|
client = _a.sent();
|
|
369
369
|
return [2 /*return*/, { client: client }];
|
|
@@ -411,7 +411,7 @@ var getCredentialsInputSas9 = function (target, scope) { return __awaiter(void 0
|
|
|
411
411
|
});
|
|
412
412
|
}); };
|
|
413
413
|
exports.getCredentialsInputSas9 = getCredentialsInputSas9;
|
|
414
|
-
var getDefaultValues = function (targetName) {
|
|
414
|
+
var getDefaultValues = function (targetName, serverType) {
|
|
415
415
|
dotenv_1.default.config({ path: path_1.default.join(process.projectDir, ".env.".concat(targetName)) });
|
|
416
416
|
var defaultClient = process.env.CLIENT === 'undefined' ||
|
|
417
417
|
process.env.CLIENT === 'null' ||
|
|
@@ -423,6 +423,8 @@ var getDefaultValues = function (targetName) {
|
|
|
423
423
|
!process.env.SECRET
|
|
424
424
|
? ''
|
|
425
425
|
: process.env.SECRET;
|
|
426
|
+
if (serverType === types_1.ServerType.Sasjs && defaultClient === '')
|
|
427
|
+
defaultClient = 'clientID1';
|
|
426
428
|
return { client: defaultClient, secret: defaultSecret };
|
|
427
429
|
};
|
|
428
430
|
exports.getDefaultValues = getDefaultValues;
|
|
@@ -122,10 +122,11 @@ function getPreCodeForServicePack(serverType) {
|
|
|
122
122
|
'/* so we provide instead as __program */\n' +
|
|
123
123
|
'%global __program _program;\n' +
|
|
124
124
|
'%let _program=%sysfunc(coalescec(&__program,&_program));\n' +
|
|
125
|
-
'%macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO);\n' +
|
|
125
|
+
'%macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO,maxobs=MAX);\n' +
|
|
126
126
|
' %mv_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt\n' +
|
|
127
127
|
' ,missing=&missing\n' +
|
|
128
128
|
' ,showmeta=&showmeta\n' +
|
|
129
|
+
' ,maxobs=&maxobs\n' +
|
|
129
130
|
' )' +
|
|
130
131
|
'%mend;\n';
|
|
131
132
|
return [3 /*break*/, 14];
|
|
@@ -143,10 +144,11 @@ function getPreCodeForServicePack(serverType) {
|
|
|
143
144
|
case 8:
|
|
144
145
|
content = _g + _l.sent();
|
|
145
146
|
content +=
|
|
146
|
-
' %macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO);\n' +
|
|
147
|
+
' %macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO,maxobs=MAX);\n' +
|
|
147
148
|
' %mm_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt\n' +
|
|
148
149
|
' ,missing=&missing\n' +
|
|
149
150
|
' ,showmeta=&showmeta\n' +
|
|
151
|
+
' ,maxobs=&maxobs\n' +
|
|
150
152
|
' )' +
|
|
151
153
|
' %mend;\n';
|
|
152
154
|
return [3 /*break*/, 14];
|
|
@@ -164,10 +166,11 @@ function getPreCodeForServicePack(serverType) {
|
|
|
164
166
|
case 12:
|
|
165
167
|
content = _k + _l.sent();
|
|
166
168
|
content +=
|
|
167
|
-
' %macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO);\n' +
|
|
169
|
+
' %macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO,maxobs=MAX);\n' +
|
|
168
170
|
' %ms_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt\n' +
|
|
169
171
|
' ,missing=&missing\n' +
|
|
170
172
|
' ,showmeta=&showmeta\n' +
|
|
173
|
+
' ,maxobs=&maxobs\n' +
|
|
171
174
|
' )' +
|
|
172
175
|
' %mend;\n';
|
|
173
176
|
return [3 /*break*/, 14];
|
|
@@ -131,7 +131,7 @@ describe('compileTestFile', function () {
|
|
|
131
131
|
testVar = replaceLineBreaks("* Test Variables start;\n\n%let ".concat(Object.keys(target.testConfig.macroVars)[0], "=").concat(Object.values(target.testConfig.macroVars)[0], ";\n\n* Test Variables end;"));
|
|
132
132
|
testInit = replaceLineBreaks("* TestInit start;\n\n\n%put testing, init;\n* TestInit end;");
|
|
133
133
|
testTerm = replaceLineBreaks("* TestTerm start;\n\n\n%put testing, termed;\n* TestTerm end;");
|
|
134
|
-
mvWebout = "%macro mv_webout(action,ds,fref=_mvwtemp,dslabel=,fmt=
|
|
134
|
+
mvWebout = "%macro mv_webout(action,ds,fref=_mvwtemp,dslabel=,fmt=N,stream=Y,missing=NULL";
|
|
135
135
|
expect(testFileContent.indexOf(testVar)).toBeGreaterThan(-1);
|
|
136
136
|
expect(testFileContent.indexOf(testInit)).toBeGreaterThan(-1);
|
|
137
137
|
expect(testFileContent.indexOf(testTerm)).toBeGreaterThan(-1);
|
|
@@ -128,10 +128,11 @@ describe('sasjs cbd with server type SASJS', function () {
|
|
|
128
128
|
return [4 /*yield*/, (0, utils_1.readFile)("".concat(macroCorePath, "/server/ms_webout.sas"))];
|
|
129
129
|
case 8:
|
|
130
130
|
ms_webout = _b.sent();
|
|
131
|
-
webout = ' %macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO);\n' +
|
|
131
|
+
webout = ' %macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO,maxobs=MAX);\n' +
|
|
132
132
|
' %ms_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt\n' +
|
|
133
133
|
' ,missing=&missing\n' +
|
|
134
134
|
' ,showmeta=&showmeta\n' +
|
|
135
|
+
' ,maxobs=&maxobs\n' +
|
|
135
136
|
' )' +
|
|
136
137
|
' %mend;\n';
|
|
137
138
|
mocksPath = path_1.default.join(__dirname, appName, 'sasjs', 'mocks');
|
package/package.json
CHANGED
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@sasjs/adapter": "3.10.
|
|
52
|
-
"@sasjs/core": "4.
|
|
53
|
-
"@sasjs/lint": "1.
|
|
51
|
+
"@sasjs/adapter": "3.10.11",
|
|
52
|
+
"@sasjs/core": "4.35.3",
|
|
53
|
+
"@sasjs/lint": "1.12.0",
|
|
54
54
|
"@sasjs/utils": "2.47.0",
|
|
55
55
|
"adm-zip": "0.5.9",
|
|
56
56
|
"chalk": "4.1.2",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"jest": "27.4.7",
|
|
90
90
|
"jest-cli": "27.4.7",
|
|
91
91
|
"jest-extended": "1.1.0",
|
|
92
|
-
"nodemon": "2.0.
|
|
92
|
+
"nodemon": "2.0.19",
|
|
93
93
|
"prettier": "2.6.2",
|
|
94
94
|
"ts-jest": "27.1.2",
|
|
95
95
|
"ts-node": "10.4.0",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"typescript": "4.5.4",
|
|
98
98
|
"util": "0.12.4"
|
|
99
99
|
},
|
|
100
|
-
"version": "3.
|
|
100
|
+
"version": "3.18.2"
|
|
101
101
|
}
|