@sasjs/cli 3.6.2 → 3.6.6
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/README.md +0 -3
- package/build/cli.js +4 -4
- package/build/cli.spec.js +6 -6
- package/build/commands/add/addCommand.js +2 -2
- package/build/commands/add/addCredential.js +27 -27
- package/build/commands/add/addTarget.js +10 -10
- package/build/commands/add/internal/input.js +30 -30
- package/build/commands/add/internal/saveConfig.js +2 -2
- package/build/commands/add/spec/addCommand.spec.js +24 -20
- package/build/commands/add/spec/addCredential.spec.js +14 -14
- package/build/commands/add/spec/addTarget.spec.js +22 -22
- package/build/commands/build/build.js +81 -77
- package/build/commands/build/buildCommand.js +3 -3
- package/build/commands/build/compileBuildCommand.js +4 -4
- package/build/commands/build/internal/config.js +8 -8
- package/build/commands/build/internal/getLaunchPageCode.js +2 -2
- package/build/commands/build/spec/build.spec.js +10 -10
- package/build/commands/build/spec/buildCommand.spec.js +16 -12
- package/build/commands/build/spec/cb.spec.server.js +18 -18
- package/build/commands/build/spec/compileBuildCommand.spec.js +17 -13
- package/build/commands/compile/compile.js +61 -61
- package/build/commands/compile/compileCommand.js +10 -10
- package/build/commands/compile/compileSingleFile.js +17 -17
- package/build/commands/compile/internal/checkCompileStatus.js +11 -11
- package/build/commands/compile/internal/compareFolders.js +11 -11
- package/build/commands/compile/internal/compileJobFile.js +3 -3
- package/build/commands/compile/internal/compileServiceFile.js +14 -14
- package/build/commands/compile/internal/compileTestFile.js +41 -37
- package/build/commands/compile/internal/getAllJobFolders.js +13 -9
- package/build/commands/compile/internal/getAllServiceFolders.js +13 -9
- package/build/commands/compile/internal/getServerType.js +1 -1
- package/build/commands/compile/internal/identifySasFile.js +2 -2
- package/build/commands/compile/internal/loadDependencies.js +5 -5
- package/build/commands/compile/internal/spec/compileTestFile.spec.js +40 -40
- package/build/commands/compile/spec/compareFolders.spec.js +27 -27
- package/build/commands/compile/spec/compile.spec.js +93 -93
- package/build/commands/compile/spec/compileCommand.spec.js +37 -33
- package/build/commands/compile/spec/compileJobFile.spec.js +11 -11
- package/build/commands/compile/spec/compileServiceFile.spec.js +11 -11
- package/build/commands/compile/spec/copyFilesToBuildFolder.spec.js +7 -7
- package/build/commands/compile/spec/loadDependencies.spec.js +30 -30
- package/build/commands/context/contextCommand.js +16 -16
- package/build/commands/context/create.js +1 -1
- package/build/commands/context/delete.js +2 -2
- package/build/commands/context/edit.js +1 -1
- package/build/commands/context/export.js +5 -5
- package/build/commands/context/internal/validateConfigPath.js +1 -1
- package/build/commands/context/list.js +4 -4
- package/build/commands/context/spec/contextCommand.spec.js +80 -76
- package/build/commands/context/spec/create.spec.js +3 -3
- package/build/commands/context/spec/delete.spec.js +3 -3
- package/build/commands/context/spec/edit.spec.js +3 -3
- package/build/commands/context/spec/export.spec.js +8 -8
- package/build/commands/context/spec/list.spec.js +5 -5
- package/build/commands/create/create.js +12 -12
- package/build/commands/create/createCommand.js +2 -2
- package/build/commands/create/internal/createReadme.js +2 -2
- package/build/commands/create/spec/create.spec.js +39 -39
- package/build/commands/create/spec/createCommand.spec.js +14 -10
- package/build/commands/db/db.js +22 -22
- package/build/commands/db/dbCommand.js +1 -1
- package/build/commands/db/spec/db.spec.js +8 -8
- package/build/commands/db/spec/dbCommand.spec.js +11 -7
- package/build/commands/deploy/compileBuildDeployCommand.js +6 -6
- package/build/commands/deploy/deploy.d.ts +7 -0
- package/build/commands/deploy/deploy.js +131 -81
- package/build/commands/deploy/deployCommand.js +2 -2
- package/build/commands/deploy/internal/getDeployScripts.js +14 -10
- package/build/commands/deploy/spec/cbd.spec.js +15 -15
- package/build/commands/deploy/spec/cbd.spec.server.js +40 -40
- package/build/commands/deploy/spec/compileBuildDeployCommand.spec.js +18 -14
- package/build/commands/deploy/spec/deployCommand.spec.js +15 -11
- package/build/commands/deploy/spec/getDeployScripts.spec.js +8 -8
- package/build/commands/deploy/spec/utils.js +17 -17
- package/build/commands/docs/docsCommand.js +7 -7
- package/build/commands/docs/generateDocs.js +33 -29
- package/build/commands/docs/generateDot.js +12 -8
- package/build/commands/docs/initDocs.js +1 -1
- package/build/commands/docs/internal/createDotFiles.js +6 -6
- package/build/commands/docs/internal/getDotFileContent.js +17 -17
- package/build/commands/docs/internal/getFileInputs.js +1 -1
- package/build/commands/docs/internal/getFileOutputs.js +1 -1
- package/build/commands/docs/internal/getFoldersForDocs.js +4 -4
- package/build/commands/docs/internal/populateNodeDictionary.js +1 -1
- package/build/commands/docs/spec/docsCommand.spec.js +25 -21
- package/build/commands/docs/spec/generateDocs.spec.js +60 -60
- package/build/commands/docs/spec/generateDot.spec.js +23 -23
- package/build/commands/docs/spec/getDocConfig.spec.js +2 -2
- package/build/commands/docs/spec/initDocs.spec.js +7 -7
- package/build/commands/flow/execute.js +8 -8
- package/build/commands/flow/flowCommand.js +5 -5
- package/build/commands/flow/internal/checkPredecessorDeadlock.js +11 -7
- package/build/commands/flow/internal/executeFlow.js +23 -23
- package/build/commands/flow/internal/failAllSuccessors.js +1 -1
- package/build/commands/flow/internal/generateFileName.js +2 -2
- package/build/commands/flow/internal/normalizeFilePath.js +1 -1
- package/build/commands/flow/internal/parseJobDetails.js +3 -3
- package/build/commands/flow/internal/printError.js +1 -1
- package/build/commands/flow/internal/saveLog.js +8 -8
- package/build/commands/flow/internal/saveToCsv.js +2 -2
- package/build/commands/flow/internal/spec/allFlowsCompleted.spec.js +4 -4
- package/build/commands/flow/internal/spec/checkPredecessorDeadlock.spec.js +4 -4
- package/build/commands/flow/internal/spec/executeFlow.spec.js +10 -10
- package/build/commands/flow/internal/spec/failAllSuccessors.spec.js +1 -1
- package/build/commands/flow/internal/spec/saveToCsv.spec.js +16 -16
- package/build/commands/flow/internal/spec/validateParams.spec.js +33 -33
- package/build/commands/flow/internal/validateParams.js +17 -17
- package/build/commands/flow/spec/flow.spec.js +1 -1
- package/build/commands/flow/spec/flow.spec.server.js +60 -60
- package/build/commands/flow/spec/flowCommand.spec.js +16 -12
- package/build/commands/folder/create.js +2 -2
- package/build/commands/folder/delete.js +2 -2
- package/build/commands/folder/folderCommand.js +11 -11
- package/build/commands/folder/move.js +2 -2
- package/build/commands/folder/spec/folder.spec.server.js +35 -35
- package/build/commands/folder/spec/folderCommand.spec.js +23 -19
- package/build/commands/help/help.js +50 -48
- package/build/commands/help/helpCommand.js +1 -1
- package/build/commands/help/spec/help.spec.js +8 -8
- package/build/commands/help/spec/helpCommand.spec.js +11 -7
- package/build/commands/init/init.js +7 -7
- package/build/commands/init/initCommand.js +1 -1
- package/build/commands/init/spec/init.spec.server.js +17 -17
- package/build/commands/init/spec/initCommand.spec.js +11 -7
- package/build/commands/job/internal/execute/sasjs.js +1 -1
- package/build/commands/job/internal/execute/viya.js +35 -35
- package/build/commands/job/internal/utils.js +6 -6
- package/build/commands/job/jobCommand.js +6 -6
- package/build/commands/job/spec/execute.spec.js +6 -6
- package/build/commands/job/spec/getContextName.spec.js +2 -2
- package/build/commands/job/spec/job.spec.server.js +53 -53
- package/build/commands/job/spec/jobCommand.spec.js +17 -13
- package/build/commands/lint/initLint.js +2 -2
- package/build/commands/lint/lintCommand.js +10 -10
- package/build/commands/lint/processLint.js +5 -5
- package/build/commands/lint/spec/lintCommand.spec.js +19 -15
- package/build/commands/request/request.js +16 -16
- package/build/commands/request/requestCommand.js +5 -5
- package/build/commands/request/spec/request.spec.server.js +71 -71
- package/build/commands/request/spec/requestCommand.spec.js +17 -13
- package/build/commands/run/run.js +23 -23
- package/build/commands/run/runCommand.js +2 -2
- package/build/commands/run/spec/run.spec.server.js +51 -51
- package/build/commands/run/spec/runCommand.spec.js +10 -6
- package/build/commands/servicepack/deploy.js +6 -6
- package/build/commands/servicepack/servicePackCommand.js +3 -3
- package/build/commands/servicepack/spec/servicepack.spec.server.js +6 -6
- package/build/commands/servicepack/spec/servicepackCommand.spec.js +10 -6
- package/build/commands/shared/createConfigFile.js +2 -2
- package/build/commands/shared/createFileStructure.js +6 -6
- package/build/commands/shared/createLintConfigFile.js +1 -1
- package/build/commands/shared/deployToSasViyaWithServicePack.js +4 -4
- package/build/commands/shared/fetchLogFileContent.js +10 -6
- package/build/commands/testing/internal/saveOutput.js +38 -34
- package/build/commands/testing/spec/testCommand.spec.js +17 -13
- package/build/commands/testing/spec/testing.spec.server.js +38 -38
- package/build/commands/testing/test.js +45 -41
- package/build/commands/testing/testCommand.js +2 -2
- package/build/commands/version/spec/version.spec.js +1 -1
- package/build/commands/version/spec/versionCommand.spec.js +11 -7
- package/build/commands/version/version.js +3 -3
- package/build/commands/version/versionCommand.js +2 -2
- package/build/commands/web/internal/createAssetServices.js +28 -24
- package/build/commands/web/internal/getWebServiceContent.js +6 -6
- package/build/commands/web/internal/sasjsout.d.ts +1 -1
- package/build/commands/web/internal/sasjsout.js +1 -1
- package/build/commands/web/internal/spec/updateLinkTag.spec.js +2 -2
- package/build/commands/web/internal/spec/updateScriptTag.spec.js +10 -10
- package/build/commands/web/internal/updateAllTags.js +19 -15
- package/build/commands/web/internal/updateLinkTag.js +2 -2
- package/build/commands/web/internal/updateScriptTag.js +6 -6
- package/build/commands/web/spec/web.spec.js +23 -23
- package/build/commands/web/spec/webCommand.spec.js +16 -12
- package/build/commands/web/web.js +25 -25
- package/build/commands/web/webCommand.js +3 -3
- package/build/types/command/commandBase.js +19 -15
- package/build/types/command/parse.js +1 -1
- package/build/types/command/spec/commandBase.spec.js +16 -12
- package/build/types/command/targetCommand.js +4 -4
- package/build/types/command/unalias.js +9 -5
- package/build/utils/auth.js +7 -7
- package/build/utils/config.js +56 -49
- package/build/utils/displayResult.js +4 -4
- package/build/utils/file.js +11 -11
- package/build/utils/fileStructures/builtFiles.js +2 -2
- package/build/utils/fileStructures/builtFilesCustom1.js +2 -2
- package/build/utils/getLogFilePath.js +1 -1
- package/build/utils/loadEnvVariables.js +3 -3
- package/build/utils/prefixAppLoc.js +1 -1
- package/build/utils/saveLog.js +7 -7
- package/build/utils/setConstants.js +4 -4
- package/build/utils/setProjectDir.js +2 -2
- package/build/utils/spec/config.spec.js +80 -80
- package/build/utils/spec/displayResult.spec.js +7 -7
- package/build/utils/spec/file.spec.js +15 -15
- package/build/utils/spec/removeComments.spec.js +11 -11
- package/build/utils/spec/setConstants.spec.js +3 -3
- package/build/utils/spec/utils.spec.js +55 -55
- package/build/utils/test.js +59 -59
- package/build/utils/utils.js +47 -43
- package/package.json +11 -11
|
@@ -66,9 +66,9 @@ var createGlobalTarget = function (serverType) {
|
|
|
66
66
|
switch (_a.label) {
|
|
67
67
|
case 0:
|
|
68
68
|
dotenv_1.default.config();
|
|
69
|
-
timestamp = utils_1.generateTimestamp();
|
|
70
|
-
targetName = "cli-tests-cbd-"
|
|
71
|
-
return [4 /*yield*/, utils_2.setConstants()];
|
|
69
|
+
timestamp = (0, utils_1.generateTimestamp)();
|
|
70
|
+
targetName = "cli-tests-cbd-".concat(timestamp);
|
|
71
|
+
return [4 /*yield*/, (0, utils_2.setConstants)()];
|
|
72
72
|
case 1:
|
|
73
73
|
_a.sent();
|
|
74
74
|
target = new utils_1.Target({
|
|
@@ -77,7 +77,7 @@ var createGlobalTarget = function (serverType) {
|
|
|
77
77
|
serverUrl: (serverType === utils_1.ServerType.SasViya
|
|
78
78
|
? process.env.VIYA_SERVER_URL
|
|
79
79
|
: process.env.SAS9_SERVER_URL),
|
|
80
|
-
appLoc: "/Public/app/cli-tests/"
|
|
80
|
+
appLoc: "/Public/app/cli-tests/".concat(targetName),
|
|
81
81
|
contextName: process.sasjsConstants.contextName,
|
|
82
82
|
serviceConfig: {
|
|
83
83
|
serviceFolders: ['sasjs/testServices', 'sasjs/testJob'],
|
|
@@ -102,7 +102,7 @@ var createGlobalTarget = function (serverType) {
|
|
|
102
102
|
deployScripts: []
|
|
103
103
|
}
|
|
104
104
|
});
|
|
105
|
-
return [4 /*yield*/, config_1.saveToGlobalConfig(target)];
|
|
105
|
+
return [4 /*yield*/, (0, config_1.saveToGlobalConfig)(target)];
|
|
106
106
|
case 2:
|
|
107
107
|
_a.sent();
|
|
108
108
|
return [2 /*return*/, target];
|
|
@@ -119,15 +119,15 @@ var createLocalTarget = function (serverType) {
|
|
|
119
119
|
switch (_a.label) {
|
|
120
120
|
case 0:
|
|
121
121
|
dotenv_1.default.config();
|
|
122
|
-
timestamp = utils_1.generateTimestamp();
|
|
123
|
-
targetName = "cli-tests-cbd-"
|
|
122
|
+
timestamp = (0, utils_1.generateTimestamp)();
|
|
123
|
+
targetName = "cli-tests-cbd-".concat(timestamp);
|
|
124
124
|
target = new utils_1.Target({
|
|
125
125
|
name: targetName,
|
|
126
126
|
serverType: serverType,
|
|
127
127
|
serverUrl: (serverType === utils_1.ServerType.SasViya
|
|
128
128
|
? process.env.VIYA_SERVER_URL
|
|
129
129
|
: process.env.SAS9_SERVER_URL),
|
|
130
|
-
appLoc: "/Public/app/cli-tests/"
|
|
130
|
+
appLoc: "/Public/app/cli-tests/".concat(targetName),
|
|
131
131
|
contextName: process.sasjsConstants.contextName,
|
|
132
132
|
serviceConfig: {
|
|
133
133
|
serviceFolders: ['sasjs/testServices', 'sasjs/testJob', 'sasjs/services'],
|
|
@@ -146,7 +146,7 @@ var createLocalTarget = function (serverType) {
|
|
|
146
146
|
deployScripts: []
|
|
147
147
|
}
|
|
148
148
|
});
|
|
149
|
-
return [4 /*yield*/, utils_3.readFile(path_1.default.join(process.projectDir, 'sasjs', 'sasjsconfig.json'))];
|
|
149
|
+
return [4 /*yield*/, (0, utils_3.readFile)(path_1.default.join(process.projectDir, 'sasjs', 'sasjsconfig.json'))];
|
|
150
150
|
case 1:
|
|
151
151
|
configContent = _a.sent();
|
|
152
152
|
configJSON = JSON.parse(configContent);
|
|
@@ -156,7 +156,7 @@ var createLocalTarget = function (serverType) {
|
|
|
156
156
|
deployServicePack: true
|
|
157
157
|
} })
|
|
158
158
|
];
|
|
159
|
-
return [4 /*yield*/, utils_3.createFile(path_1.default.join(process.projectDir, 'sasjs', 'sasjsconfig.json'), JSON.stringify(configJSON, null, 2))];
|
|
159
|
+
return [4 /*yield*/, (0, utils_3.createFile)(path_1.default.join(process.projectDir, 'sasjs', 'sasjsconfig.json'), JSON.stringify(configJSON, null, 2))];
|
|
160
160
|
case 2:
|
|
161
161
|
_a.sent();
|
|
162
162
|
return [2 /*return*/, target];
|
|
@@ -172,7 +172,7 @@ var updateLocalTarget = function (targetName, data) { return __awaiter(void 0, v
|
|
|
172
172
|
switch (_b.label) {
|
|
173
173
|
case 0:
|
|
174
174
|
dotenv_1.default.config();
|
|
175
|
-
return [4 /*yield*/, utils_3.readFile(path_1.default.join(process.projectDir, 'sasjs', 'sasjsconfig.json'))];
|
|
175
|
+
return [4 /*yield*/, (0, utils_3.readFile)(path_1.default.join(process.projectDir, 'sasjs', 'sasjsconfig.json'))];
|
|
176
176
|
case 1:
|
|
177
177
|
configContent = _b.sent();
|
|
178
178
|
configJSON = JSON.parse(configContent);
|
|
@@ -180,7 +180,7 @@ var updateLocalTarget = function (targetName, data) { return __awaiter(void 0, v
|
|
|
180
180
|
configJSON.targets = [
|
|
181
181
|
__assign(__assign({}, target), data)
|
|
182
182
|
];
|
|
183
|
-
return [4 /*yield*/, utils_3.createFile(path_1.default.join(process.projectDir, 'sasjs', 'sasjsconfig.json'), JSON.stringify(configJSON, null, 2))];
|
|
183
|
+
return [4 /*yield*/, (0, utils_3.createFile)(path_1.default.join(process.projectDir, 'sasjs', 'sasjsconfig.json'), JSON.stringify(configJSON, null, 2))];
|
|
184
184
|
case 2:
|
|
185
185
|
_b.sent();
|
|
186
186
|
return [2 /*return*/];
|
|
@@ -191,10 +191,10 @@ exports.updateLocalTarget = updateLocalTarget;
|
|
|
191
191
|
var copyJobsAndServices = function (appName) { return __awaiter(void 0, void 0, void 0, function () {
|
|
192
192
|
return __generator(this, function (_a) {
|
|
193
193
|
switch (_a.label) {
|
|
194
|
-
case 0: return [4 /*yield*/, utils_3.copy(path_1.default.join(__dirname, 'testJob'), path_1.default.join(__dirname, appName, 'sasjs', 'testJob'))];
|
|
194
|
+
case 0: return [4 /*yield*/, (0, utils_3.copy)(path_1.default.join(__dirname, 'testJob'), path_1.default.join(__dirname, appName, 'sasjs', 'testJob'))];
|
|
195
195
|
case 1:
|
|
196
196
|
_a.sent();
|
|
197
|
-
return [4 /*yield*/, utils_3.copy(path_1.default.join(__dirname, 'testServices'), path_1.default.join(__dirname, appName, 'sasjs', 'testServices'))];
|
|
197
|
+
return [4 /*yield*/, (0, utils_3.copy)(path_1.default.join(__dirname, 'testServices'), path_1.default.join(__dirname, appName, 'sasjs', 'testServices'))];
|
|
198
198
|
case 2:
|
|
199
199
|
_a.sent();
|
|
200
200
|
return [2 /*return*/];
|
|
@@ -204,8 +204,8 @@ var copyJobsAndServices = function (appName) { return __awaiter(void 0, void 0,
|
|
|
204
204
|
exports.copyJobsAndServices = copyJobsAndServices;
|
|
205
205
|
var generateTarget = function (isLocal) {
|
|
206
206
|
dotenv_1.default.config();
|
|
207
|
-
var timestamp = utils_1.generateTimestamp();
|
|
208
|
-
var targetName = "cli-tests-cbd-"
|
|
207
|
+
var timestamp = (0, utils_1.generateTimestamp)();
|
|
208
|
+
var targetName = "cli-tests-cbd-".concat(timestamp);
|
|
209
209
|
var authConfig = isLocal
|
|
210
210
|
? undefined
|
|
211
211
|
: {
|
|
@@ -218,7 +218,7 @@ var generateTarget = function (isLocal) {
|
|
|
218
218
|
name: targetName,
|
|
219
219
|
serverType: utils_1.ServerType.SasViya,
|
|
220
220
|
serverUrl: process.env.VIYA_SERVER_URL,
|
|
221
|
-
appLoc: "/Public/app/cli-tests/"
|
|
221
|
+
appLoc: "/Public/app/cli-tests/".concat(targetName),
|
|
222
222
|
contextName: utils_4.contextName,
|
|
223
223
|
serviceConfig: {
|
|
224
224
|
serviceFolders: ['sasjs/testServices', 'sasjs/testJob', 'sasjs/services'],
|
|
@@ -139,13 +139,13 @@ var DocsCommand = /** @class */ (function (_super) {
|
|
|
139
139
|
case 0: return [4 /*yield*/, this.getTargetInfo()];
|
|
140
140
|
case 1:
|
|
141
141
|
target = (_a.sent()).target;
|
|
142
|
-
return [4 /*yield*/, utils_1.getLocalConfig()];
|
|
142
|
+
return [4 /*yield*/, (0, utils_1.getLocalConfig)()];
|
|
143
143
|
case 2:
|
|
144
144
|
config = _a.sent();
|
|
145
|
-
return [4 /*yield*/, __1.generateDocs(target, config, this.parsed.outDirectory)
|
|
145
|
+
return [4 /*yield*/, (0, __1.generateDocs)(target, config, this.parsed.outDirectory)
|
|
146
146
|
.then(function (res) {
|
|
147
147
|
var _a;
|
|
148
|
-
(_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("Docs have been generated!\nThe docs are located in the "
|
|
148
|
+
(_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("Docs have been generated!\nThe docs are located in the ".concat(res.outDirectory, "' directory.\nClick to open: ").concat(res.outDirectory, "/index.html"));
|
|
149
149
|
return command_1.ReturnCode.Success;
|
|
150
150
|
})
|
|
151
151
|
.catch(function (err) {
|
|
@@ -168,13 +168,13 @@ var DocsCommand = /** @class */ (function (_super) {
|
|
|
168
168
|
case 0: return [4 /*yield*/, this.getTargetInfo()];
|
|
169
169
|
case 1:
|
|
170
170
|
target = (_a.sent()).target;
|
|
171
|
-
return [4 /*yield*/, utils_1.getLocalConfig()];
|
|
171
|
+
return [4 /*yield*/, (0, utils_1.getLocalConfig)()];
|
|
172
172
|
case 2:
|
|
173
173
|
config = _a.sent();
|
|
174
|
-
return [4 /*yield*/, __1.generateDot(target, config, this.parsed.outDirectory)
|
|
174
|
+
return [4 /*yield*/, (0, __1.generateDot)(target, config, this.parsed.outDirectory)
|
|
175
175
|
.then(function (res) {
|
|
176
176
|
var _a;
|
|
177
|
-
(_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("Dot files have been generated!\nFiles are located in the "
|
|
177
|
+
(_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("Dot files have been generated!\nFiles are located in the ".concat(res.outDirectory, "' directory."));
|
|
178
178
|
return command_1.ReturnCode.Success;
|
|
179
179
|
})
|
|
180
180
|
.catch(function (err) {
|
|
@@ -194,7 +194,7 @@ var DocsCommand = /** @class */ (function (_super) {
|
|
|
194
194
|
var returnCode;
|
|
195
195
|
return __generator(this, function (_a) {
|
|
196
196
|
switch (_a.label) {
|
|
197
|
-
case 0: return [4 /*yield*/, __1.initDocs()
|
|
197
|
+
case 0: return [4 /*yield*/, (0, __1.initDocs)()
|
|
198
198
|
.then(function () {
|
|
199
199
|
var _a;
|
|
200
200
|
(_a = process.logger) === null || _a === void 0 ? void 0 : _a.success('The doxygen configuration files have been initialised under `/sasjs/doxy/`. You can now run `sasjs doc`.');
|
|
@@ -62,10 +62,14 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
62
62
|
}
|
|
63
63
|
return ar;
|
|
64
64
|
};
|
|
65
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
66
|
-
for (var i = 0,
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
66
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
67
|
+
if (ar || !(i in from)) {
|
|
68
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
69
|
+
ar[i] = from[i];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
69
73
|
};
|
|
70
74
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
71
75
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -96,9 +100,9 @@ function generateDocs(target, config, outDirectory) {
|
|
|
96
100
|
return __generator(this, function (_f) {
|
|
97
101
|
switch (_f.label) {
|
|
98
102
|
case 0:
|
|
99
|
-
_c = getDocConfig_1.getDocConfig(target, config, outDirectory), serverUrl = _c.serverUrl, newOutDirectory = _c.newOutDirectory, enableLineage = _c.enableLineage, doxyContentFromConfig = _c.doxyContent;
|
|
100
|
-
_d = getFoldersForDocs_1.getFoldersForDocs(target, config), macroCoreFolders = _d.macroCore, macroFolders = _d.macro, programFolders = _d.program, serviceFolders = _d.service, jobFolders = _d.job;
|
|
101
|
-
combinedFolders = __spreadArray([], __read(new Set(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(macroCoreFolders)), __read(macroFolders)), __read(programFolders)), __read(serviceFolders)), __read(jobFolders))))).map(function (fpath) { return "\""
|
|
103
|
+
_c = (0, getDocConfig_1.getDocConfig)(target, config, outDirectory), serverUrl = _c.serverUrl, newOutDirectory = _c.newOutDirectory, enableLineage = _c.enableLineage, doxyContentFromConfig = _c.doxyContent;
|
|
104
|
+
_d = (0, getFoldersForDocs_1.getFoldersForDocs)(target, config), macroCoreFolders = _d.macroCore, macroFolders = _d.macro, programFolders = _d.program, serviceFolders = _d.service, jobFolders = _d.job;
|
|
105
|
+
combinedFolders = __spreadArray([], __read(new Set(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(macroCoreFolders), false), __read(macroFolders), false), __read(programFolders), false), __read(serviceFolders), false), __read(jobFolders), false))), false).map(function (fpath) { return "\"".concat(fpath, "\""); })
|
|
102
106
|
.join(' ');
|
|
103
107
|
if (combinedFolders.length === 0) {
|
|
104
108
|
throw new Error("Unable to locate folders for generating docs.\n" +
|
|
@@ -113,7 +117,7 @@ function generateDocs(target, config, outDirectory) {
|
|
|
113
117
|
_f.label = 1;
|
|
114
118
|
case 1:
|
|
115
119
|
_f.trys.push([1, 3, , 4]);
|
|
116
|
-
return [4 /*yield*/, utils_1.readFile(path_1.default.join(process.projectDir, 'package.json'))];
|
|
120
|
+
return [4 /*yield*/, (0, utils_1.readFile)(path_1.default.join(process.projectDir, 'package.json'))];
|
|
117
121
|
case 2:
|
|
118
122
|
packageJsonContent = _f.sent();
|
|
119
123
|
packageJson = JSON.parse(packageJsonContent);
|
|
@@ -128,12 +132,12 @@ function generateDocs(target, config, outDirectory) {
|
|
|
128
132
|
case 4:
|
|
129
133
|
doxyContent = __assign({ favIcon: 'favicon.ico', footer: 'new_footer.html', header: 'new_header.html', layout: 'DoxygenLayout.xml', logo: 'logo.png', readMe: '../../README.md', stylesheet: 'new_stylesheet.css', path: path_1.default.join(process.projectDir, 'sasjs', 'doxy') }, doxyContentFromConfig);
|
|
130
134
|
if (doxyContentFromConfig === null || doxyContentFromConfig === void 0 ? void 0 : doxyContentFromConfig.path)
|
|
131
|
-
doxyContent.path = utils_1.getAbsolutePath(doxyContentFromConfig.path, process.projectDir);
|
|
135
|
+
doxyContent.path = (0, utils_1.getAbsolutePath)(doxyContentFromConfig.path, process.projectDir);
|
|
132
136
|
doxyParams = setVariableCmd({
|
|
133
137
|
DOXY_HTML_OUTPUT: newOutDirectory,
|
|
134
|
-
DOXY_INPUT: "\""
|
|
135
|
-
HTML_EXTRA_FILES: "\""
|
|
136
|
-
HTML_EXTRA_STYLESHEET: "\""
|
|
138
|
+
DOXY_INPUT: "\"".concat(path_1.default.join(doxyContent.path, doxyContent.readMe), "\" ").concat(combinedFolders),
|
|
139
|
+
HTML_EXTRA_FILES: "\"".concat(path_1.default.join(doxyContent.path, doxyContent.favIcon), "\""),
|
|
140
|
+
HTML_EXTRA_STYLESHEET: "\"".concat(path_1.default.join(doxyContent.path, doxyContent.stylesheet), "\""),
|
|
137
141
|
HTML_FOOTER: path_1.default.join(doxyContent.path, doxyContent.footer),
|
|
138
142
|
HTML_HEADER: path_1.default.join(doxyContent.path, doxyContent.header),
|
|
139
143
|
LAYOUT_FILE: path_1.default.join(doxyContent.path, doxyContent.layout),
|
|
@@ -144,35 +148,35 @@ function generateDocs(target, config, outDirectory) {
|
|
|
144
148
|
return [4 /*yield*/, getDoxyConfigPath(doxyContent.path)];
|
|
145
149
|
case 5:
|
|
146
150
|
doxyConfigPath = _f.sent();
|
|
147
|
-
(_b = process.logger) === null || _b === void 0 ? void 0 : _b.info("Using "
|
|
148
|
-
spinner = ora_1.default(chalk_1.default.greenBright('Generating docs', chalk_1.default.cyanBright(newOutDirectory)));
|
|
151
|
+
(_b = process.logger) === null || _b === void 0 ? void 0 : _b.info("Using ".concat(doxyConfigPath, " as Doxygen Configuration."));
|
|
152
|
+
spinner = (0, ora_1.default)(chalk_1.default.greenBright('Generating docs', chalk_1.default.cyanBright(newOutDirectory)));
|
|
149
153
|
if (process.env.LOG_LEVEL !== utils_1.LogLevel.Debug)
|
|
150
154
|
spinner.start();
|
|
151
|
-
return [4 /*yield*/, utils_1.fileExists(newOutDirectory)];
|
|
155
|
+
return [4 /*yield*/, (0, utils_1.fileExists)(newOutDirectory)];
|
|
152
156
|
case 6:
|
|
153
157
|
pathExists = _f.sent();
|
|
154
158
|
if (!pathExists) return [3 /*break*/, 8];
|
|
155
|
-
return [4 /*yield*/, utils_1.deleteFolder(newOutDirectory)];
|
|
159
|
+
return [4 /*yield*/, (0, utils_1.deleteFolder)(newOutDirectory)];
|
|
156
160
|
case 7:
|
|
157
161
|
_f.sent();
|
|
158
162
|
_f.label = 8;
|
|
159
|
-
case 8: return [4 /*yield*/, utils_1.createFolder(newOutDirectory)];
|
|
163
|
+
case 8: return [4 /*yield*/, (0, utils_1.createFolder)(newOutDirectory)];
|
|
160
164
|
case 9:
|
|
161
165
|
_f.sent();
|
|
162
|
-
_e = shelljs_1.default.exec(doxyParams
|
|
166
|
+
_e = shelljs_1.default.exec("".concat(doxyParams, " doxygen \"").concat(doxyConfigPath, "\""), {
|
|
163
167
|
silent: process.env.LOG_LEVEL !== utils_1.LogLevel.Debug
|
|
164
168
|
}), stderr = _e.stderr, code = _e.code;
|
|
165
169
|
if (process.env.LOG_LEVEL !== utils_1.LogLevel.Debug)
|
|
166
170
|
spinner.stop();
|
|
167
171
|
if (code !== 0) {
|
|
168
172
|
if (stderr.startsWith('error: ')) {
|
|
169
|
-
throw new Error("\n"
|
|
173
|
+
throw new Error("\n".concat(stderr));
|
|
170
174
|
}
|
|
171
|
-
throw new Error("The Doxygen application is not installed or configured. This external tool is used by 'sasjs doc'.\n"
|
|
175
|
+
throw new Error("The Doxygen application is not installed or configured. This external tool is used by 'sasjs doc'.\n".concat(stderr, "\nPlease download and install from here: https://www.doxygen.nl/download.html#srcbin"));
|
|
172
176
|
}
|
|
173
177
|
if (!enableLineage) return [3 /*break*/, 11];
|
|
174
|
-
foldersListForDot = __spreadArray([], __read(new Set(__spreadArray(__spreadArray([], __read(serviceFolders)), __read(jobFolders)))));
|
|
175
|
-
return [4 /*yield*/, createDotFiles_1.createDotFiles(foldersListForDot, newOutDirectory, serverUrl)];
|
|
178
|
+
foldersListForDot = __spreadArray([], __read(new Set(__spreadArray(__spreadArray([], __read(serviceFolders), false), __read(jobFolders), false))), false);
|
|
179
|
+
return [4 /*yield*/, (0, createDotFiles_1.createDotFiles)(foldersListForDot, newOutDirectory, serverUrl)];
|
|
176
180
|
case 10:
|
|
177
181
|
_f.sent();
|
|
178
182
|
_f.label = 11;
|
|
@@ -184,15 +188,15 @@ function generateDocs(target, config, outDirectory) {
|
|
|
184
188
|
exports.generateDocs = generateDocs;
|
|
185
189
|
function setVariableCmd(params) {
|
|
186
190
|
var command = '';
|
|
187
|
-
var isWin = utils_2.isWindows();
|
|
191
|
+
var isWin = (0, utils_2.isWindows)();
|
|
188
192
|
if (isWin) {
|
|
189
193
|
for (var param in params) {
|
|
190
|
-
command += "set "
|
|
194
|
+
command += "set ".concat(param, "=").concat(params[param], " && ");
|
|
191
195
|
}
|
|
192
196
|
}
|
|
193
197
|
else {
|
|
194
198
|
for (var param in params) {
|
|
195
|
-
command += param
|
|
199
|
+
command += "".concat(param, "='").concat(params[param], "' ");
|
|
196
200
|
}
|
|
197
201
|
}
|
|
198
202
|
return command;
|
|
@@ -203,22 +207,22 @@ var getDoxyConfigPath = function (doxyContentPath) { return __awaiter(void 0, vo
|
|
|
203
207
|
switch (_a.label) {
|
|
204
208
|
case 0:
|
|
205
209
|
doxyFilePath = path_1.default.join(doxyContentPath, 'Doxyfile');
|
|
206
|
-
return [4 /*yield*/, utils_1.fileExists(doxyFilePath)];
|
|
210
|
+
return [4 /*yield*/, (0, utils_1.fileExists)(doxyFilePath)];
|
|
207
211
|
case 1:
|
|
208
212
|
if (_a.sent())
|
|
209
213
|
return [2 /*return*/, doxyFilePath];
|
|
210
214
|
doxyFilePath = path_1.default.join(doxyContentPath, 'DoxyFile');
|
|
211
|
-
return [4 /*yield*/, utils_1.fileExists(doxyFilePath)];
|
|
215
|
+
return [4 /*yield*/, (0, utils_1.fileExists)(doxyFilePath)];
|
|
212
216
|
case 2:
|
|
213
217
|
if (_a.sent())
|
|
214
218
|
return [2 /*return*/, doxyFilePath];
|
|
215
219
|
doxyFilePath = path_1.default.join(doxyContentPath, 'doxyfile');
|
|
216
|
-
return [4 /*yield*/, utils_1.fileExists(doxyFilePath)];
|
|
220
|
+
return [4 /*yield*/, (0, utils_1.fileExists)(doxyFilePath)];
|
|
217
221
|
case 3:
|
|
218
222
|
if (_a.sent())
|
|
219
223
|
return [2 /*return*/, doxyFilePath];
|
|
220
224
|
doxyFilePath = path_1.default.join(doxyContentPath, 'doxyFile');
|
|
221
|
-
return [4 /*yield*/, utils_1.fileExists(doxyFilePath)];
|
|
225
|
+
return [4 /*yield*/, (0, utils_1.fileExists)(doxyFilePath)];
|
|
222
226
|
case 4:
|
|
223
227
|
if (_a.sent())
|
|
224
228
|
return [2 /*return*/, doxyFilePath];
|
|
@@ -51,10 +51,14 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
51
51
|
}
|
|
52
52
|
return ar;
|
|
53
53
|
};
|
|
54
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
55
|
-
for (var i = 0,
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
55
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
56
|
+
if (ar || !(i in from)) {
|
|
57
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
58
|
+
ar[i] = from[i];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
58
62
|
};
|
|
59
63
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
64
|
exports.generateDot = void 0;
|
|
@@ -75,10 +79,10 @@ function generateDot(target, config, outDirectory) {
|
|
|
75
79
|
return __generator(this, function (_c) {
|
|
76
80
|
switch (_c.label) {
|
|
77
81
|
case 0:
|
|
78
|
-
_a = getDocConfig_1.getDocConfig(target, config, outDirectory), serverUrl = _a.serverUrl, newOutDirectory = _a.newOutDirectory;
|
|
79
|
-
_b = getFoldersForDocs_1.getFoldersForDocs(target, config), serviceFolders = _b.service, jobFolders = _b.job;
|
|
80
|
-
folderList = __spreadArray([], __read(new Set(__spreadArray(__spreadArray([], __read(serviceFolders)), __read(jobFolders)))));
|
|
81
|
-
return [4 /*yield*/, createDotFiles_1.createDotFiles(folderList, newOutDirectory, serverUrl)];
|
|
82
|
+
_a = (0, getDocConfig_1.getDocConfig)(target, config, outDirectory), serverUrl = _a.serverUrl, newOutDirectory = _a.newOutDirectory;
|
|
83
|
+
_b = (0, getFoldersForDocs_1.getFoldersForDocs)(target, config), serviceFolders = _b.service, jobFolders = _b.job;
|
|
84
|
+
folderList = __spreadArray([], __read(new Set(__spreadArray(__spreadArray([], __read(serviceFolders), false), __read(jobFolders), false))), false);
|
|
85
|
+
return [4 /*yield*/, (0, createDotFiles_1.createDotFiles)(folderList, newOutDirectory, serverUrl)];
|
|
82
86
|
case 1:
|
|
83
87
|
_c.sent();
|
|
84
88
|
return [2 /*return*/, { outDirectory: newOutDirectory }];
|
|
@@ -48,7 +48,7 @@ function initDocs() {
|
|
|
48
48
|
switch (_a.label) {
|
|
49
49
|
case 0:
|
|
50
50
|
parentFolderName = '.';
|
|
51
|
-
return [4 /*yield*/, utils_1.setupDoxygen(parentFolderName)];
|
|
51
|
+
return [4 /*yield*/, (0, utils_1.setupDoxygen)(parentFolderName)];
|
|
52
52
|
case 1:
|
|
53
53
|
_a.sent();
|
|
54
54
|
return [2 /*return*/];
|
|
@@ -59,26 +59,26 @@ function createDotFiles(folderList, outDirectory, serverUrl) {
|
|
|
59
59
|
case 0:
|
|
60
60
|
dotFilePath = path_1.default.join(outDirectory, 'data_lineage.dot');
|
|
61
61
|
dotGraphPath = path_1.default.join(outDirectory, 'data_lineage.svg');
|
|
62
|
-
return [4 /*yield*/, utils_1.createFolder(outDirectory)];
|
|
62
|
+
return [4 /*yield*/, (0, utils_1.createFolder)(outDirectory)];
|
|
63
63
|
case 1:
|
|
64
64
|
_c.sent();
|
|
65
|
-
return [4 /*yield*/, getDotFileContent_1.getDotFileContent(folderList, serverUrl)];
|
|
65
|
+
return [4 /*yield*/, (0, getDotFileContent_1.getDotFileContent)(folderList, serverUrl)];
|
|
66
66
|
case 2:
|
|
67
67
|
dotFileContent = _c.sent();
|
|
68
|
-
return [4 /*yield*/, utils_1.createFile(dotFilePath, dotFileContent)];
|
|
68
|
+
return [4 /*yield*/, (0, utils_1.createFile)(dotFilePath, dotFileContent)];
|
|
69
69
|
case 3:
|
|
70
70
|
_c.sent();
|
|
71
|
-
(_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("File "
|
|
71
|
+
(_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("File ".concat(dotFilePath, " has been created."));
|
|
72
72
|
_c.label = 4;
|
|
73
73
|
case 4:
|
|
74
74
|
_c.trys.push([4, 7, , 8]);
|
|
75
75
|
return [4 /*yield*/, node_graphviz_1.graphviz.dot(dotFileContent, 'svg')];
|
|
76
76
|
case 5:
|
|
77
77
|
svg = _c.sent();
|
|
78
|
-
return [4 /*yield*/, utils_1.createFile(dotGraphPath, svg)];
|
|
78
|
+
return [4 /*yield*/, (0, utils_1.createFile)(dotGraphPath, svg)];
|
|
79
79
|
case 6:
|
|
80
80
|
_c.sent();
|
|
81
|
-
(_b = process.logger) === null || _b === void 0 ? void 0 : _b.success("File "
|
|
81
|
+
(_b = process.logger) === null || _b === void 0 ? void 0 : _b.success("File ".concat(dotGraphPath, " has been created."));
|
|
82
82
|
return [3 /*break*/, 8];
|
|
83
83
|
case 7:
|
|
84
84
|
e_1 = _c.sent();
|
|
@@ -64,34 +64,34 @@ function getDotFileContent(folderList, serverUrl) {
|
|
|
64
64
|
paramNodes = new Map();
|
|
65
65
|
paramNodeTyes = new Map();
|
|
66
66
|
// Populating both Maps
|
|
67
|
-
return [4 /*yield*/, utils_1.asyncForEach(folderList, function (folder) { return __awaiter(_this, void 0, void 0, function () {
|
|
67
|
+
return [4 /*yield*/, (0, utils_1.asyncForEach)(folderList, function (folder) { return __awaiter(_this, void 0, void 0, function () {
|
|
68
68
|
var filesNamesInPath;
|
|
69
69
|
var _this = this;
|
|
70
70
|
return __generator(this, function (_a) {
|
|
71
71
|
switch (_a.label) {
|
|
72
|
-
case 0: return [4 /*yield*/, utils_1.listFilesInFolder(folder)];
|
|
72
|
+
case 0: return [4 /*yield*/, (0, utils_1.listFilesInFolder)(folder)];
|
|
73
73
|
case 1:
|
|
74
74
|
filesNamesInPath = (_a.sent()).filter(function (f) { return f.endsWith('.sas'); });
|
|
75
|
-
return [4 /*yield*/, utils_1.asyncForEach(filesNamesInPath, function (fileName) { return __awaiter(_this, void 0, void 0, function () {
|
|
75
|
+
return [4 /*yield*/, (0, utils_1.asyncForEach)(filesNamesInPath, function (fileName) { return __awaiter(_this, void 0, void 0, function () {
|
|
76
76
|
var filePath, fileContent, fileBrief, fileInputs, fileOutputs;
|
|
77
77
|
return __generator(this, function (_a) {
|
|
78
78
|
switch (_a.label) {
|
|
79
79
|
case 0:
|
|
80
80
|
filePath = path_1.default.join(folder, fileName);
|
|
81
|
-
return [4 /*yield*/, utils_1.readFile(filePath)];
|
|
81
|
+
return [4 /*yield*/, (0, utils_1.readFile)(filePath)];
|
|
82
82
|
case 1:
|
|
83
83
|
fileContent = _a.sent();
|
|
84
|
-
fileBrief = file_1.getBrief(fileContent);
|
|
84
|
+
fileBrief = (0, file_1.getBrief)(fileContent);
|
|
85
85
|
if (fileBrief === undefined)
|
|
86
86
|
return [2 /*return*/];
|
|
87
87
|
fileName = fileName.toUpperCase();
|
|
88
|
-
fileInputs = getFileInputs_1.getFileInputs(fileName, fileContent, paramNodes);
|
|
89
|
-
fileOutputs = getFileOutputs_1.getFileOutputs(fileContent, paramNodes);
|
|
88
|
+
fileInputs = (0, getFileInputs_1.getFileInputs)(fileName, fileContent, paramNodes);
|
|
89
|
+
fileOutputs = (0, getFileOutputs_1.getFileOutputs)(fileContent, paramNodes);
|
|
90
90
|
if (fileInputs.length === 0 && fileOutputs.length === 0)
|
|
91
91
|
return [2 /*return*/];
|
|
92
92
|
fileNodes.set(fileName, {
|
|
93
93
|
edges: fileOutputs,
|
|
94
|
-
label: (fileName
|
|
94
|
+
label: "".concat(fileName, " | ").concat(fileBrief)
|
|
95
95
|
.replace(/\\/g, '\\\\')
|
|
96
96
|
.replace(/"/g, '\\"')
|
|
97
97
|
});
|
|
@@ -108,9 +108,9 @@ function getDotFileContent(folderList, serverUrl) {
|
|
|
108
108
|
case 1:
|
|
109
109
|
// Populating both Maps
|
|
110
110
|
_a.sent();
|
|
111
|
-
populateNodeDictionary_1.populateNodeDictionary(nodeDictionary, paramNodes);
|
|
112
|
-
populateNodeDictionary_1.populateNodeDictionary(nodeDictionary, fileNodes);
|
|
113
|
-
populateParamNodeTypes_1.populateParamNodeTypes(paramNodeTyes, paramNodes);
|
|
111
|
+
(0, populateNodeDictionary_1.populateNodeDictionary)(nodeDictionary, paramNodes);
|
|
112
|
+
(0, populateNodeDictionary_1.populateNodeDictionary)(nodeDictionary, fileNodes);
|
|
113
|
+
(0, populateParamNodeTypes_1.populateParamNodeTypes)(paramNodeTyes, paramNodes);
|
|
114
114
|
dotNodes = '', dotVertices = '';
|
|
115
115
|
// Generating Nodes for Dot fileContent
|
|
116
116
|
paramNodes.forEach(function (node, key) {
|
|
@@ -118,29 +118,29 @@ function getDotFileContent(folderList, serverUrl) {
|
|
|
118
118
|
var librefFound = key.match(/^[A-Z]{2,5}\./);
|
|
119
119
|
if (librefFound)
|
|
120
120
|
color = paramNodeTyes.get(librefFound[0]);
|
|
121
|
-
var attrURL = serverUrl ? "URL=\""
|
|
121
|
+
var attrURL = serverUrl ? "URL=\"".concat(serverUrl + key, "\"") : '';
|
|
122
122
|
var NDkey = nodeDictionary.get(key);
|
|
123
|
-
dotNodes += NDkey
|
|
123
|
+
dotNodes += "".concat(NDkey, " [ label=\"").concat(node.label, "\" ").concat(attrURL, " shape=\"cylinder\" style=\"filled\" color=\"").concat(color, "\"]\n");
|
|
124
124
|
if (node.edges.length) {
|
|
125
125
|
var dotFormatEdges = node.edges
|
|
126
126
|
.map(function (edgeKey) { return nodeDictionary.get(edgeKey); })
|
|
127
127
|
.join(' ');
|
|
128
|
-
dotVertices += nodeDictionary.get(key)
|
|
128
|
+
dotVertices += "".concat(nodeDictionary.get(key), " -> {").concat(dotFormatEdges, "}\n");
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
131
|
fileNodes.forEach(function (node, key) {
|
|
132
132
|
var url = key.toLowerCase().replace(/_/g, '__').replace('.sas', '_8sas') +
|
|
133
133
|
'_source.html';
|
|
134
134
|
var NDkey = nodeDictionary.get(key);
|
|
135
|
-
dotNodes += NDkey
|
|
135
|
+
dotNodes += "".concat(NDkey, " [ shape=\"record\" label=\"{").concat(node.label, "}\" href=\"").concat(url, "\" ]\n");
|
|
136
136
|
if (node.edges.length) {
|
|
137
137
|
var dotFormatEdges = node.edges
|
|
138
138
|
.map(function (edgeKey) { return nodeDictionary.get(edgeKey); })
|
|
139
139
|
.join(' ');
|
|
140
|
-
dotVertices += nodeDictionary.get(key)
|
|
140
|
+
dotVertices += "".concat(nodeDictionary.get(key), " -> {").concat(dotFormatEdges, "}\n");
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
|
-
return [2 /*return*/, "digraph lliprc{\n"
|
|
143
|
+
return [2 /*return*/, "digraph lliprc{\n".concat(dotNodes, "\n").concat(dotVertices, "\n}")];
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
146
|
});
|
|
@@ -9,7 +9,7 @@ var utils_1 = require("@sasjs/utils");
|
|
|
9
9
|
* @param {Map} paramNodes- Map for params(Inputs/Outputs)
|
|
10
10
|
*/
|
|
11
11
|
function getFileInputs(fileName, fileContent, paramNodes) {
|
|
12
|
-
var fileInputs = utils_1.getList('<h4> Data Inputs </h4>', fileContent)
|
|
12
|
+
var fileInputs = (0, utils_1.getList)('<h4> Data Inputs </h4>', fileContent)
|
|
13
13
|
.map(function (input) { return input.toUpperCase(); })
|
|
14
14
|
.filter(function (input) { return !input.endsWith('.DLL'); });
|
|
15
15
|
fileInputs.forEach(function (inputParam) {
|
|
@@ -8,7 +8,7 @@ var utils_1 = require("@sasjs/utils");
|
|
|
8
8
|
* @param {Map} paramNodes- Map for params(Inputs/Outputs)
|
|
9
9
|
*/
|
|
10
10
|
function getFileOutputs(fileContent, paramNodes) {
|
|
11
|
-
var fileOutputs = utils_1.getList('<h4> Data Outputs </h4>', fileContent)
|
|
11
|
+
var fileOutputs = (0, utils_1.getList)('<h4> Data Outputs </h4>', fileContent)
|
|
12
12
|
.map(function (output) { return output.toUpperCase(); })
|
|
13
13
|
.filter(function (output) { return !output.endsWith('.DLL'); });
|
|
14
14
|
fileOutputs.forEach(function (outputParam) {
|
|
@@ -31,19 +31,19 @@ function extractFoldersForDocs(config) {
|
|
|
31
31
|
? []
|
|
32
32
|
: [process.sasjsConstants.macroCorePath];
|
|
33
33
|
var macroFolders = (config === null || config === void 0 ? void 0 : config.macroFolders)
|
|
34
|
-
? config.macroFolders.map(function (f) { return utils_1.getAbsolutePath(f, buildSourceFolder); })
|
|
34
|
+
? config.macroFolders.map(function (f) { return (0, utils_1.getAbsolutePath)(f, buildSourceFolder); })
|
|
35
35
|
: [];
|
|
36
36
|
var programFolders = (config === null || config === void 0 ? void 0 : config.programFolders)
|
|
37
|
-
? config.programFolders.map(function (f) { return utils_1.getAbsolutePath(f, buildSourceFolder); })
|
|
37
|
+
? config.programFolders.map(function (f) { return (0, utils_1.getAbsolutePath)(f, buildSourceFolder); })
|
|
38
38
|
: [];
|
|
39
39
|
var serviceFolders = ((_b = config === null || config === void 0 ? void 0 : config.serviceConfig) === null || _b === void 0 ? void 0 : _b.serviceFolders)
|
|
40
40
|
? config.serviceConfig.serviceFolders.map(function (f) {
|
|
41
|
-
return utils_1.getAbsolutePath(f, buildSourceFolder);
|
|
41
|
+
return (0, utils_1.getAbsolutePath)(f, buildSourceFolder);
|
|
42
42
|
})
|
|
43
43
|
: [];
|
|
44
44
|
var jobFolders = ((_c = config === null || config === void 0 ? void 0 : config.jobConfig) === null || _c === void 0 ? void 0 : _c.jobFolders)
|
|
45
45
|
? config.jobConfig.jobFolders.map(function (f) {
|
|
46
|
-
return utils_1.getAbsolutePath(f, buildSourceFolder);
|
|
46
|
+
return (0, utils_1.getAbsolutePath)(f, buildSourceFolder);
|
|
47
47
|
})
|
|
48
48
|
: [];
|
|
49
49
|
return {
|
|
@@ -9,7 +9,7 @@ exports.populateNodeDictionary = void 0;
|
|
|
9
9
|
function populateNodeDictionary(nodeDictionary, nodes) {
|
|
10
10
|
nodes.forEach(function (node, key) {
|
|
11
11
|
if (!nodeDictionary.has(key))
|
|
12
|
-
nodeDictionary.set(key, "n"
|
|
12
|
+
nodeDictionary.set(key, "n".concat(nodeDictionary.size));
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
exports.populateNodeDictionary = populateNodeDictionary;
|