@sassoftware/restaflib 5.3.3-2 → 5.3.3-3
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/dist/restaflib.js +251 -39
- package/dist/restaflib.min.js +9 -1
- package/lib/restaflib.js +189 -39
- package/package.json +1 -1
package/lib/restaflib.js
CHANGED
|
@@ -96,6 +96,30 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
96
96
|
/************************************************************************/
|
|
97
97
|
/******/ ({
|
|
98
98
|
|
|
99
|
+
/***/ "../../../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
|
|
100
|
+
/*!*************************************************************************************!*\
|
|
101
|
+
!*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
|
|
102
|
+
\*************************************************************************************/
|
|
103
|
+
/*! no static exports found */
|
|
104
|
+
/*! all exports used */
|
|
105
|
+
/***/ (function(module, exports) {
|
|
106
|
+
|
|
107
|
+
eval("function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/arrayLikeToArray.js?");
|
|
108
|
+
|
|
109
|
+
/***/ }),
|
|
110
|
+
|
|
111
|
+
/***/ "../../../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
|
|
112
|
+
/*!***********************************************************************************!*\
|
|
113
|
+
!*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
|
|
114
|
+
\***********************************************************************************/
|
|
115
|
+
/*! no static exports found */
|
|
116
|
+
/*! all exports used */
|
|
117
|
+
/***/ (function(module, exports) {
|
|
118
|
+
|
|
119
|
+
eval("function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/arrayWithHoles.js?");
|
|
120
|
+
|
|
121
|
+
/***/ }),
|
|
122
|
+
|
|
99
123
|
/***/ "../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js":
|
|
100
124
|
/*!*************************************************************************************!*\
|
|
101
125
|
!*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
|
|
@@ -120,6 +144,30 @@ eval("var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ \"../../
|
|
|
120
144
|
|
|
121
145
|
/***/ }),
|
|
122
146
|
|
|
147
|
+
/***/ "../../../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
|
|
148
|
+
/*!*****************************************************************************************!*\
|
|
149
|
+
!*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
|
|
150
|
+
\*****************************************************************************************/
|
|
151
|
+
/*! no static exports found */
|
|
152
|
+
/*! all exports used */
|
|
153
|
+
/***/ (function(module, exports) {
|
|
154
|
+
|
|
155
|
+
eval("function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js?");
|
|
156
|
+
|
|
157
|
+
/***/ }),
|
|
158
|
+
|
|
159
|
+
/***/ "../../../node_modules/@babel/runtime/helpers/nonIterableRest.js":
|
|
160
|
+
/*!************************************************************************************!*\
|
|
161
|
+
!*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
|
|
162
|
+
\************************************************************************************/
|
|
163
|
+
/*! no static exports found */
|
|
164
|
+
/*! all exports used */
|
|
165
|
+
/***/ (function(module, exports) {
|
|
166
|
+
|
|
167
|
+
eval("function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/nonIterableRest.js?");
|
|
168
|
+
|
|
169
|
+
/***/ }),
|
|
170
|
+
|
|
123
171
|
/***/ "../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js":
|
|
124
172
|
/*!***************************************************************************************!*\
|
|
125
173
|
!*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
|
|
@@ -132,6 +180,18 @@ eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"../../../node_modul
|
|
|
132
180
|
|
|
133
181
|
/***/ }),
|
|
134
182
|
|
|
183
|
+
/***/ "../../../node_modules/@babel/runtime/helpers/slicedToArray.js":
|
|
184
|
+
/*!**********************************************************************************!*\
|
|
185
|
+
!*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/slicedToArray.js ***!
|
|
186
|
+
\**********************************************************************************/
|
|
187
|
+
/*! no static exports found */
|
|
188
|
+
/*! exports used: default */
|
|
189
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
190
|
+
|
|
191
|
+
eval("var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ \"../../../node_modules/@babel/runtime/helpers/arrayWithHoles.js\");\nvar iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ \"../../../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ \"../../../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js\");\nvar nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ \"../../../node_modules/@babel/runtime/helpers/nonIterableRest.js\");\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/slicedToArray.js?");
|
|
192
|
+
|
|
193
|
+
/***/ }),
|
|
194
|
+
|
|
135
195
|
/***/ "../../../node_modules/@babel/runtime/helpers/toPrimitive.js":
|
|
136
196
|
/*!********************************************************************************!*\
|
|
137
197
|
!*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/toPrimitive.js ***!
|
|
@@ -168,6 +228,18 @@ eval("function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.
|
|
|
168
228
|
|
|
169
229
|
/***/ }),
|
|
170
230
|
|
|
231
|
+
/***/ "../../../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
|
|
232
|
+
/*!***********************************************************************************************!*\
|
|
233
|
+
!*** C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
|
|
234
|
+
\***********************************************************************************************/
|
|
235
|
+
/*! no static exports found */
|
|
236
|
+
/*! all exports used */
|
|
237
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
238
|
+
|
|
239
|
+
eval("var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ \"../../../node_modules/@babel/runtime/helpers/arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack://restaflib/C:/sassoftware/restaf/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js?");
|
|
240
|
+
|
|
241
|
+
/***/ }),
|
|
242
|
+
|
|
171
243
|
/***/ "../../../node_modules/@babel/runtime/regenerator/index.js":
|
|
172
244
|
/*!******************************************************************************!*\
|
|
173
245
|
!*** C:/sassoftware/restaf/node_modules/@babel/runtime/regenerator/index.js ***!
|
|
@@ -189,7 +261,7 @@ eval("// TODO(Babel 8): Remove this file.\n\nvar runtime = __webpack_require__(/
|
|
|
189
261
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
190
262
|
|
|
191
263
|
"use strict";
|
|
192
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n/**\r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * \r\n * @async\r\n * @module casActionRun\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {object} parameters - parameters for the action\r\n * \r\n * @returns {promise} returns results from cas \r\n * @alias module: casActionRun\r\n * @example\r\n * async function test_casAction () {\r\n * let {session} = await restaflib.casSetup(store);\r\n * // run fetch action\r\n * let p = \r\n * { action: 'table.fetch',\r\n * data : { table: { caslib: 'public', name: 'cars' } }\r\n * };\r\n * let casResults = await restaflib.casActionRun(store, session, p);\r\n * print.object(casResults.tables.Fetch, 'Fetched Table');\r\n * await store.apiCall(session.links('delete'));\r\n * }\r\n */\n\n\n// Notes: Function to call cas \n// See README file for notes on REUSECASSESSION\n//\n\n\nfunction casActionRun(_x) {\n return _casActionRun.apply(this, arguments);\n}\nfunction _casActionRun() {\n _casActionRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
264
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n/**\r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * \r\n * @async\r\n * @module casActionRun\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {object} parameters - parameters for the action\r\n * \r\n * @returns {promise} returns results from cas \r\n * @alias module: casActionRun\r\n * @example\r\n * async function test_casAction () {\r\n * let {session} = await restaflib.casSetup(store);\r\n * // run fetch action\r\n * let p = \r\n * { action: 'table.fetch',\r\n * data : { table: { caslib: 'public', name: 'cars' } }\r\n * };\r\n * let casResults = await restaflib.casActionRun(store, session, p);\r\n * print.object(casResults.tables.Fetch, 'Fetched Table');\r\n * await store.apiCall(session.links('delete'));\r\n * }\r\n */\n\n\n// Notes: Function to call cas \n// See README file for notes on REUSECASSESSION\n//\n\n\nfunction casActionRun(_x) {\n return _casActionRun.apply(this, arguments);\n}\nfunction _casActionRun() {\n _casActionRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store) {\n var _len,\n rest,\n _key,\n result,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n for (_len = _args.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = _args[_key];\n }\n _context.next = 3;\n return store.runAction.apply(store, rest);\n case 3:\n result = _context.sent;\n return _context.abrupt(\"return\", result.items().toJS());\n case 5:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casActionRun.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casActionRun);\n\n//# sourceURL=webpack://restaflib/./casActionRun.js?");
|
|
193
265
|
|
|
194
266
|
/***/ }),
|
|
195
267
|
|
|
@@ -202,7 +274,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
202
274
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
203
275
|
|
|
204
276
|
"use strict";
|
|
205
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _casSaveTable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./casSaveTable */ \"./casSaveTable.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programs */ \"./programs/index.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n\n/** \r\n* @description Append a cas table to a master cas table \r\n* @async\r\n* @module casAppendTable\r\n* @category restaflib/cas\r\n* @param {store} store - store\r\n* @param {rafObject} session - cas session\r\n* @param {casTable} input Input table with new rows {caslib: xxx, name: nnn}\r\n* @param {casTable} output Master table {caslib: xxx, name: nnn}\r\n* @param {boolean} saveflag If true the master table will be saved to disk\r\n* @param {*} payload -\r\n* @returns {promise} - return \r\n* @example\r\n* let status = restaflib.casAppendTable(store, session, 'casuser.temp', 'public.master', true));\r\n* \r\n*/\nfunction casAppendTable(_x, _x2, _x3, _x4, _x5) {\n return _casAppendTable.apply(this, arguments);\n}\nfunction _casAppendTable() {\n _casAppendTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
277
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _casSaveTable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./casSaveTable */ \"./casSaveTable.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programs */ \"./programs/index.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n\n/** \r\n* @description Append a cas table to a master cas table \r\n* @async\r\n* @module casAppendTable\r\n* @category restaflib/cas\r\n* @param {store} store - store\r\n* @param {rafObject} session - cas session\r\n* @param {casTable} input Input table with new rows {caslib: xxx, name: nnn}\r\n* @param {casTable} output Master table {caslib: xxx, name: nnn}\r\n* @param {boolean} saveflag If true the master table will be saved to disk\r\n* @param {*} payload -\r\n* @returns {promise} - return \r\n* @example\r\n* let status = restaflib.casAppendTable(store, session, 'casuser.temp', 'public.master', true));\r\n* \r\n*/\nfunction casAppendTable(_x, _x2, _x3, _x4, _x5) {\n return _casAppendTable.apply(this, arguments);\n}\nfunction _casAppendTable() {\n _casAppendTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, input, output, save) {\n var src, args, result, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['casAppendTable']();\n args = {\n masterTable: output,\n setTable: input,\n save: save != null ? save : true\n };\n _context.next = 4;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src, args);\n case 4:\n result = _context.sent;\n r = result.items('results', 'casResults').toJS();\n if (!(save === true)) {\n _context.next = 9;\n break;\n }\n _context.next = 9;\n return Object(_casSaveTable__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, output);\n case 9:\n return _context.abrupt(\"return\", r);\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casAppendTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casAppendTable);\n\n//# sourceURL=webpack://restaflib/./casAppendTable.js?");
|
|
206
278
|
|
|
207
279
|
/***/ }),
|
|
208
280
|
|
|
@@ -215,7 +287,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
215
287
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
216
288
|
|
|
217
289
|
"use strict";
|
|
218
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programs */ \"./programs/index.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n/**\r\n * @description Fetch rows from cas Tables\r\n * @async\r\n * @module casFetchData\r\n * @category restaflib/cas\r\n * @param {store} store restaf store\r\n * @param {rafObject} session cas session\r\n * @param {object} payload info to read data\r\n * @returns {promise} returns data and data for scrolling.\r\n * @example\r\n * let payload = { start:0, limit:20, format: false, table: {caslib: 'casuser', name: 'sales'}} ;\r\n * let result = await casFetchData(store, session, payload);\r\n * result = {\r\n * data : {rows: array of row data, schema=<schema for table>},\r\n * pagination: {next: {<page>}, prev: {<page>}\r\n * }\r\n * page = {start: <number>, limit: <number>, format: <true:false> table: <caslib: <string>, name:<string>}\r\n * }\r\n * Will return a row of length 0 if no data is found.\r\n * Will throw exceptions if cas code fails(ex: fetch action fails)\r\n */\nfunction casFetchData(_x, _x2, _x3) {\n return _casFetchData.apply(this, arguments);\n}\nfunction _casFetchData() {\n _casFetchData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
290
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programs */ \"./programs/index.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n/**\r\n * @description Fetch rows from cas Tables\r\n * @async\r\n * @module casFetchData\r\n * @category restaflib/cas\r\n * @param {store} store restaf store\r\n * @param {rafObject} session cas session\r\n * @param {object} payload info to read data\r\n * @returns {promise} returns data and data for scrolling.\r\n * @example\r\n * let payload = { start:0, limit:20, format: false, table: {caslib: 'casuser', name: 'sales'}} ;\r\n * let result = await casFetchData(store, session, payload);\r\n * result = {\r\n * data : {rows: array of row data, schema=<schema for table>},\r\n * pagination: {next: {<page>}, prev: {<page>}\r\n * }\r\n * page = {start: <number>, limit: <number>, format: <true:false> table: <caslib: <string>, name:<string>}\r\n * }\r\n * Will return a row of length 0 if no data is found.\r\n * Will throw exceptions if cas code fails(ex: fetch action fails)\r\n */\nfunction casFetchData(_x, _x2, _x3) {\n return _casFetchData.apply(this, arguments);\n}\nfunction _casFetchData() {\n _casFetchData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, payload) {\n var src, result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['casFetchData'](); // console.log(src);\n _context.next = 3;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src, payload);\n case 3:\n result = _context.sent;\n return _context.abrupt(\"return\", result.items('results', 'casResults').toJS());\n case 5:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casFetchData.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casFetchData);\n\n//# sourceURL=webpack://restaflib/./casFetchData.js?");
|
|
219
291
|
|
|
220
292
|
/***/ }),
|
|
221
293
|
|
|
@@ -228,7 +300,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
228
300
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
229
301
|
|
|
230
302
|
"use strict";
|
|
231
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programs */ \"./programs/index.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n/** \r\n * lib\r\n */\n/**\r\n *\r\n * @description Fetch rows from cas Tables\r\n * @private\r\n * @async\r\n * @module casFetchRows\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {object} payload - info to read data\r\n * @returns {promise} returns data and data for scrolling.\r\n * \r\n * @example\r\n * async function test_casFetchRows () {\r\n * let {session} = await casSetup(store);\r\n * let payload = {\r\n * from : 1,\r\n * count : 20,\r\n * format: true,\r\n * table : {caslib: 'Public', name: 'cars'}\r\n * };\r\n * \r\n * let result = await restaflib.casFetchRows(store, session, payload);\r\n * console.log(result.data.schema);\r\n * console.log('The next start is at:' + result.pagination.next.from);\r\n * console.log(result.data.rows[0].toString());\r\n * \r\n * while (result.pagination.next.from !== -1) {\r\n * console.log('The start is at: ' + result.pagination.next.from);\r\n * result = await restaflib.casFetchRows(store, session, result.pagination.next);\r\n * console.log('The next start is at:' + result.pagination.next.from);\r\n * console.log(result.data.rows[0].toString());\r\n * };\r\n * console.log('--------------------------------------- scroll backwards');\r\n *\r\n * while (result.pagination.prev.from !== -1) {\r\n * console.log('The start is at: ' + result.pagination.prev.from);\r\n * result = await restaflib.casFetchRows(store, session, result.pagination.prev);\r\n * console.log('The previous start is at: ' + result.pagination.prev.from);\r\n * console.log(result.data.rows[0].toString());\r\n * };\r\n *\r\n * await store.apiCall(session.links('delete'));\r\n * }\r\n */\nfunction casFetchRows(_x, _x2, _x3) {\n return _casFetchRows.apply(this, arguments);\n}\nfunction _casFetchRows() {\n _casFetchRows = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
303
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programs */ \"./programs/index.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n/** \r\n * lib\r\n */\n/**\r\n *\r\n * @description Fetch rows from cas Tables\r\n * @private\r\n * @async\r\n * @module casFetchRows\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {object} payload - info to read data\r\n * @returns {promise} returns data and data for scrolling.\r\n * \r\n * @example\r\n * async function test_casFetchRows () {\r\n * let {session} = await casSetup(store);\r\n * let payload = {\r\n * from : 1,\r\n * count : 20,\r\n * format: true,\r\n * table : {caslib: 'Public', name: 'cars'}\r\n * };\r\n * \r\n * let result = await restaflib.casFetchRows(store, session, payload);\r\n * console.log(result.data.schema);\r\n * console.log('The next start is at:' + result.pagination.next.from);\r\n * console.log(result.data.rows[0].toString());\r\n * \r\n * while (result.pagination.next.from !== -1) {\r\n * console.log('The start is at: ' + result.pagination.next.from);\r\n * result = await restaflib.casFetchRows(store, session, result.pagination.next);\r\n * console.log('The next start is at:' + result.pagination.next.from);\r\n * console.log(result.data.rows[0].toString());\r\n * };\r\n * console.log('--------------------------------------- scroll backwards');\r\n *\r\n * while (result.pagination.prev.from !== -1) {\r\n * console.log('The start is at: ' + result.pagination.prev.from);\r\n * result = await restaflib.casFetchRows(store, session, result.pagination.prev);\r\n * console.log('The previous start is at: ' + result.pagination.prev.from);\r\n * console.log(result.data.rows[0].toString());\r\n * };\r\n *\r\n * await store.apiCall(session.links('delete'));\r\n * }\r\n */\nfunction casFetchRows(_x, _x2, _x3) {\n return _casFetchRows.apply(this, arguments);\n}\nfunction _casFetchRows() {\n _casFetchRows = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, payload) {\n var src, result, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (payload.where == null) {\n payload.where = ' ';\n }\n src = _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['casFetchRows']();\n _context.next = 4;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src, payload);\n case 4:\n result = _context.sent;\n r = result.items('results', 'casResults').toJS();\n if (r.data == null) {\n r.data = {\n rows: []\n };\n }\n return _context.abrupt(\"return\", r);\n case 8:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casFetchRows.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casFetchRows);\n\n//# sourceURL=webpack://restaflib/./casFetchRows.js?");
|
|
232
304
|
|
|
233
305
|
/***/ }),
|
|
234
306
|
|
|
@@ -241,7 +313,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
241
313
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
242
314
|
|
|
243
315
|
"use strict";
|
|
244
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _caslRun__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRun */ \"./caslRun.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n/**\r\n *\r\n * @description Save a cas table with replace by default\r\n * \r\n * @async\r\n * @module casLoadTable\r\n * @category restaflib/cas\r\n * @param {store} store restaf store\r\n * @param {session} session cas session\r\n * @param {casTable} table cas table to be loaded\r\n * \r\n * @returns {promise} returns status object\r\n */\nfunction casLoadTable(_x, _x2, _x3, _x4) {\n return _casLoadTable.apply(this, arguments);\n}\nfunction _casLoadTable() {\n _casLoadTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
316
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _caslRun__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRun */ \"./caslRun.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n/**\r\n *\r\n * @description Save a cas table with replace by default\r\n * \r\n * @async\r\n * @module casLoadTable\r\n * @category restaflib/cas\r\n * @param {store} store restaf store\r\n * @param {session} session cas session\r\n * @param {casTable} table cas table to be loaded\r\n * \r\n * @returns {promise} returns status object\r\n */\nfunction casLoadTable(_x, _x2, _x3, _x4) {\n return _casLoadTable.apply(this, arguments);\n}\nfunction _casLoadTable() {\n _casLoadTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, table, _force) {\n var src, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = \"\\n\\t print _args_;\\n rc = checkAndLoadTable(_args_.caslib, _args_.name);\\n\\t\\tif (rc ne true) then do;\\n\\t\\t\\ttext = 'Unable to access ' ||_args_.caslib||'.'||_args_.name; \\n\\t\\t\\trx = {severity=2,reason=6, status='error',statusCode=2, formatted=text};\\n\\t\\t\\texit(rx); \\n\\t\\tend; \\n\\t print 'return code = ' || rc;\\n\\t send_response({casResults={status='ok'}});\\n \";\n _context.next = 3;\n return Object(_caslRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src, table, true);\n case 3:\n r = _context.sent;\n return _context.abrupt(\"return\", {\n msg: \"\".concat(table.caslib, \".\").concat(table.name, \" loaded}\"),\n statusCode: 0\n });\n case 5:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casLoadTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casLoadTable);\n\n//# sourceURL=webpack://restaflib/./casLoadTable.js?");
|
|
245
317
|
|
|
246
318
|
/***/ }),
|
|
247
319
|
|
|
@@ -254,7 +326,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
254
326
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
255
327
|
|
|
256
328
|
"use strict";
|
|
257
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n/**\r\n *\r\n * @description Save a cas table with replace by default\r\n * \r\n * @async\r\n * @module casSaveTable\r\n * @category restaflib/cas\r\n * @param {store} store restaf store\r\n * @param {session} session cas session\r\n * @param {casTable} table cas table to be saved\r\n * @param {boolean=} replace default is replace\r\n * @param {boolean=} loadTable load table (default= true)\r\n * \r\n * @returns {promise} returns status object\r\n */\n\n\nfunction casSaveTable(_x, _x2, _x3, _x4, _x5) {\n return _casSaveTable.apply(this, arguments);\n}\nfunction _casSaveTable() {\n _casSaveTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
329
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n/**\r\n *\r\n * @description Save a cas table with replace by default\r\n * \r\n * @async\r\n * @module casSaveTable\r\n * @category restaflib/cas\r\n * @param {store} store restaf store\r\n * @param {session} session cas session\r\n * @param {casTable} table cas table to be saved\r\n * @param {boolean=} replace default is replace\r\n * @param {boolean=} loadTable load table (default= true)\r\n * \r\n * @returns {promise} returns status object\r\n */\n\n\nfunction casSaveTable(_x, _x2, _x3, _x4, _x5) {\n return _casSaveTable.apply(this, arguments);\n}\nfunction _casSaveTable() {\n _casSaveTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, table, replace, loadTable) {\n var caslib, name, payload;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n caslib = table.caslib, name = table.name;\n payload = {\n action: 'table.save',\n data: {\n name: \"\".concat(name),\n caslib: \"\".concat(caslib),\n replace: replace === false ? false : true,\n table: table\n }\n };\n _context.next = 4;\n return store.runAction(session, payload);\n case 4:\n return _context.abrupt(\"return\", {\n msg: \"\".concat(caslib, \".\").concat(name, \" saved}\"),\n statusCode: 0\n });\n case 5:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casSaveTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casSaveTable);\n\n//# sourceURL=webpack://restaflib/./casSaveTable.js?");
|
|
258
330
|
|
|
259
331
|
/***/ }),
|
|
260
332
|
|
|
@@ -267,7 +339,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
267
339
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
268
340
|
|
|
269
341
|
"use strict";
|
|
270
|
-
eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n/*\r\n * ------------------------------------------------------------------------------------\r\n * * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights reserved * * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * * you may not use this file except in compliance with the License.\r\n * * You may obtain a copy of the License at\r\n * *\r\n * * http://www.apache.org/licenses/LICENSE-2.0\r\n * *\r\n * * Unless required by applicable law or agreed to in writing, software\r\n * * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ----------------------------------------------------------------------------------------\r\n *\r\n */\n/**\r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * \r\n * @async\r\n * @module casSetup\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {logonPayload} logonPayload - if not null, then use this to logon to Viya\r\n * @param {string=} sessionID - id of an existing session to attach.\r\n * @param {string} sasServer - name of cas server to use. else defaults to the first server on list.\r\n * \r\n * @returns {promise} returns an object {session: xxx, servers: yyy}\r\n * @example \r\n * const {servers, session} = await casSetup(storem logonPayload, <sessionID>)\r\n */\n\n\n\n\n\nfunction casSetup(_x, _x2, _x3, _x4) {\n return _casSetup.apply(this, arguments);\n}\nfunction _casSetup() {\n _casSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(
|
|
342
|
+
eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n/*\r\n * ------------------------------------------------------------------------------------\r\n * * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights reserved * * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * * you may not use this file except in compliance with the License.\r\n * * You may obtain a copy of the License at\r\n * *\r\n * * http://www.apache.org/licenses/LICENSE-2.0\r\n * *\r\n * * Unless required by applicable law or agreed to in writing, software\r\n * * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n * ----------------------------------------------------------------------------------------\r\n *\r\n */\n/**\r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * \r\n * @async\r\n * @module casSetup\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {logonPayload} logonPayload - if not null, then use this to logon to Viya\r\n * @param {string=} sessionID - id of an existing session to attach.\r\n * @param {string} sasServer - name of cas server to use. else defaults to the first server on list.\r\n * \r\n * @returns {promise} returns an object {session: xxx, servers: yyy}\r\n * @example \r\n * const {servers, session} = await casSetup(storem logonPayload, <sessionID>)\r\n */\n\n\n\n\n\nfunction casSetup(_x, _x2, _x3, _x4) {\n return _casSetup.apply(this, arguments);\n}\nfunction _casSetup() {\n _casSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, logonPayload, sessionID, casServer) {\n var msg, _yield$store$addServi, casManagement, servers, casserver, itemsList, index, session, payload, sessionList, selfcmd;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(logonPayload != null)) {\n _context.next = 4;\n break;\n }\n _context.next = 3;\n return store.logon(logonPayload);\n case 3:\n msg = _context.sent;\n case 4:\n _context.next = 6;\n return store.addServices('casManagement');\n case 6:\n _yield$store$addServi = _context.sent;\n casManagement = _yield$store$addServi.casManagement;\n _context.next = 10;\n return store.apiCall(casManagement.links('servers'));\n case 10:\n servers = _context.sent;\n if (!(servers.itemsList().size === 0)) {\n _context.next = 13;\n break;\n }\n throw {\n Error: 'No cas servers were found'\n };\n case 13:\n casserver = null;\n if (!(casServer == null)) {\n _context.next = 18;\n break;\n }\n casserver = servers.itemsList(0);\n _context.next = 25;\n break;\n case 18:\n itemsList = servers.itemsList().toJS();\n index = itemsList.findIndex(function (s) {\n return s === casServer;\n });\n if (!(index === -1)) {\n _context.next = 24;\n break;\n }\n throw {\n Error: \"server with name of \".concat(casServer, \" was not found\")\n };\n case 24:\n casserver = servers.itemsList(index);\n case 25:\n session = null;\n if (!(sessionID == null)) {\n _context.next = 32;\n break;\n }\n _context.next = 29;\n return store.apiCall(servers.itemsCmd(casserver, 'createSession'));\n case 29:\n session = _context.sent;\n _context.next = 46;\n break;\n case 32:\n if (!(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(sessionID) === 'object')) {\n _context.next = 36;\n break;\n }\n session = sessionID;\n _context.next = 46;\n break;\n case 36:\n payload = {\n qs: {\n filter: \"eq( id,'\".concat(sessionID, \"')\")\n }\n }; // console.log('after session' ,JSON.stringify(store.getXsrfData()));\n _context.next = 39;\n return store.apiCall(servers.itemsCmd(casserver, \"sessions\"), payload);\n case 39:\n sessionList = _context.sent;\n if (!(sessionList.items().size === 0)) {\n _context.next = 42;\n break;\n }\n throw \"ERROR: The sessionID \".concat(sessionID, \" was not found.\");\n case 42:\n selfcmd = sessionList.itemsCmd(sessionList.itemsList(0), \"self\");\n _context.next = 45;\n return store.apiCall(selfcmd);\n case 45:\n session = _context.sent;\n case 46:\n return _context.abrupt(\"return\", {\n servers: servers,\n session: session\n });\n case 47:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casSetup.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casSetup);\n\n//# sourceURL=webpack://restaflib/./casSetup.js?");
|
|
271
343
|
|
|
272
344
|
/***/ }),
|
|
273
345
|
|
|
@@ -293,7 +365,20 @@ eval("/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights
|
|
|
293
365
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
294
366
|
|
|
295
367
|
"use strict";
|
|
296
|
-
eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n/*\r\n * Copyright © 2021, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n/**\r\n * @description Update a record in a cas table\r\n * @async\r\n * @module casUpdateData\r\n * @category restaflib/cas\r\n * @param {store} store - store\r\n * @param {rafObject} session - cas session\r\n * @param {*} payload - {data,where,table}\r\n * @returns {promise} - return \r\n * @example\r\n * let inputs = restaflib.casUpdateData(store, session, payload);\r\n * payload = { where: {key1: vale1, key2: value2,...},\r\n * data: {var1:value1, var2:value2,....}},\r\n * table: {caslib: caslib, name: name}\r\n * Expects a single row\r\n */\nfunction casUpdateData(_x, _x2, _x3) {\n return _casUpdateData.apply(this, arguments);\n}\nfunction _casUpdateData() {\n _casUpdateData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(
|
|
368
|
+
eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n/*\r\n * Copyright © 2021, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n/**\r\n * @description Update a record in a cas table\r\n * @async\r\n * @module casUpdateData\r\n * @category restaflib/cas\r\n * @param {store} store - store\r\n * @param {rafObject} session - cas session\r\n * @param {*} payload - {data,where,table}\r\n * @returns {promise} - return \r\n * @example\r\n * let inputs = restaflib.casUpdateData(store, session, payload);\r\n * payload = { where: {key1: vale1, key2: value2,...},\r\n * data: {var1:value1, var2:value2,....}},\r\n * table: {caslib: caslib, name: name}\r\n * Expects a single row\r\n */\nfunction casUpdateData(_x, _x2, _x3) {\n return _casUpdateData.apply(this, arguments);\n}\nfunction _casUpdateData() {\n _casUpdateData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, session, payload) {\n var data, where, table, swhere, andbit, k, v, valString, set, _k, value, valueString, tbl, updateRow, pl, r, status, disp;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n data = payload.data, where = payload.where, table = payload.table;\n swhere = '';\n andbit = ' ';\n for (k in where) {\n v = where[k];\n valString = typeof v === \"string\" ? \"'\".concat(v.toString(), \"'\") : v;\n swhere = swhere + andbit + k + \"= \".concat(valString, \" \");\n andbit = ' AND ';\n }\n set = [];\n for (_k in data) {\n value = data[_k];\n valueString = void 0;\n if (value == null) {\n valueString = '.';\n } else if (typeof value === 'string') {\n valueString = JSON.stringify(value) /*`${JSON.stringify(value)}`*/;\n } else {\n valueString = value.toString();\n }\n set.push({\n var: _k,\n value: valueString\n });\n }\n tbl = _objectSpread(_objectSpread({}, table), {}, {\n where: \"\".concat(swhere)\n });\n updateRow = {\n table: tbl,\n set: set\n };\n pl = {\n action: 'table.update',\n data: updateRow\n };\n _context.next = 11;\n return store.runAction(session, pl);\n case 11:\n r = _context.sent;\n status = {\n msg: 'Update completed',\n statusCode: 0\n };\n disp = r.items().toJS().disposition;\n if (disp.statusCode !== 0) {\n status.statusCode = disp.statusCode;\n status.msg = disp.reason;\n }\n return _context.abrupt(\"return\", status);\n case 16:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casUpdateData.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casUpdateData);\n\n//# sourceURL=webpack://restaflib/./casUpdateData.js?");
|
|
369
|
+
|
|
370
|
+
/***/ }),
|
|
371
|
+
|
|
372
|
+
/***/ "./casUpload.js":
|
|
373
|
+
/*!**********************!*\
|
|
374
|
+
!*** ./casUpload.js ***!
|
|
375
|
+
\**********************/
|
|
376
|
+
/*! exports provided: default */
|
|
377
|
+
/*! exports used: default */
|
|
378
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
379
|
+
|
|
380
|
+
"use strict";
|
|
381
|
+
eval("/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"../../../node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _uploadSetup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./uploadSetup */ \"./uploadSetup.js\");\n/* harmony import */ var _uploadHandlers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./uploadHandlers */ \"./uploadHandlers/index.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n//import fs from 'fs'; \n\n\n\n\n\n\n/**\r\n * @description upload different artifacts\r\n * @private\r\n * @async\r\n * @module casUpload\r\n * @param {store} store \r\n * @param {*} session \r\n * @param {*} source \r\n * @param {*} output \r\n * @param {*} save \r\n * @param {*} altSrc \r\n * @returns {promise}\r\n */\nfunction casUpload(_x, _x2, _x3, _x4, _x5, _x6) {\n return _casUpload.apply(this, arguments);\n}\nfunction _casUpload() {\n _casUpload = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function _callee(store, session, source, output, save, altSrc) {\n var table, fileInfo, buf, r, _table$split, _table$split2, caslib, name;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n // parse source file to figure out what we are uploading\n // const fss = fs.promises\n table = output;\n if (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(output) === 'object') {\n table = \"\".concat(output.caslib, \".\").concat(output.name);\n }\n fileInfo = Object(_uploadSetup__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(source, table); // read the file\n //let buf = ( altSrc != null ) ? altSrc : await fss.readFile( source, fileInfo.fileOptions );\n buf = altSrc; // transfrom data if necessary for upload\n /*if ( fileInfo.transform !== null ) {\r\n buf = fileInfo.transform( buf, fileInfo );\r\n }*/\n // upload using specific upload handlers\n _context.next = 6;\n return fileInfo.handler(store, session, buf, fileInfo, save);\n case 6:\n r = _context.sent;\n if (!(save === true)) {\n _context.next = 12;\n break;\n }\n _table$split = table.split('.'), _table$split2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_table$split, 2), caslib = _table$split2[0], name = _table$split2[1];\n _context.next = 11;\n return Object(_uploadHandlers__WEBPACK_IMPORTED_MODULE_5__[/* saveTable */ \"a\"])(store, session, caslib, name);\n case 11:\n r = r + '\\n' + \" \".concat(output, \" was saved\");\n case 12:\n return _context.abrupt(\"return\", r);\n case 13:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _casUpload.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (casUpload);\n\n//# sourceURL=webpack://restaflib/./casUpload.js?");
|
|
297
382
|
|
|
298
383
|
/***/ }),
|
|
299
384
|
|
|
@@ -306,7 +391,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IM
|
|
|
306
391
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
307
392
|
|
|
308
393
|
"use strict";
|
|
309
|
-
eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programs */ \"./programs/index.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n/**\r\n *\r\n * @description Score data in casl\r\n * \r\n * @async\r\n * @module caslDescribe\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {object} scenario - scenario values\r\n * \r\n * @returns {promise} returns the scores as an object\r\n */\n\n\n\n\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n\nfunction caslDescribe(_x, _x2, _x3) {\n return _caslDescribe.apply(this, arguments);\n}\nfunction _caslDescribe() {\n _caslDescribe = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(
|
|
394
|
+
eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programs */ \"./programs/index.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n/**\r\n *\r\n * @description Score data in casl\r\n * \r\n * @async\r\n * @module caslDescribe\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {object} scenario - scenario values\r\n * \r\n * @returns {promise} returns the scores as an object\r\n */\n\n\n\n\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n\nfunction caslDescribe(_x, _x2, _x3) {\n return _caslDescribe.apply(this, arguments);\n}\nfunction _caslDescribe() {\n _caslDescribe = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, session, scenario) {\n var src, appEnv, result, finalResult;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['scoreCasl']();\n appEnv = _objectSpread({\n path: '/describe'\n }, scenario);\n _context.next = 4;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, src, appEnv);\n case 4:\n result = _context.sent;\n finalResult = result.items('results').toJS();\n return _context.abrupt(\"return\", finalResult);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _caslDescribe.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (caslDescribe);\n\n//# sourceURL=webpack://restaflib/./caslDescribe.js?");
|
|
310
395
|
|
|
311
396
|
/***/ }),
|
|
312
397
|
|
|
@@ -319,7 +404,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IM
|
|
|
319
404
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
320
405
|
|
|
321
406
|
"use strict";
|
|
322
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programs */ \"./programs/index.js\");\n\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n/**\r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * \r\n * @async\r\n * @module caslRun\r\n * @category restaflib/cas\r\n * \r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {string} src - casl src statements\r\n * @param {object=} args - user input args (reference this as _args_ in casl program)\r\n * @param {boolean=} useCommons - include the common casl programs(checkAndLoad etc...)\r\n * @returns {promise} returns results from cas\r\n * @example\r\n\r\n * let restaf = require(\"@sassoftware/restaf\");\r\nlet payload = require('./config')();\r\nlet {casSetup} = require('@sassoftware/restaflib');\r\n\r\nlet prtUtil = require(\"./prtUtil\");\r\n\r\nlet store = restaf.initStore({casProxy: true});\r\nasync function example () {\r\n let { session } = await casSetup (store, payload);\r\n // console.log(JSON.stringify(session.links(), null, 4));\r\n let casl = `\r\n action datastep.runcode/ single='YES' code = 'data casuser.a; x=1; run;';\r\n action table.fetch r=r1/\r\n table= { caslib= 'casuser', name= 'a' } ;\r\n run;\r\n action datastep.runcode/ single='YES' code = 'data casuser.b; y=1; run;';\r\n action table.fetch r=r2/\r\n table= { caslib= 'casuser', name= 'b' } ;\r\n run;\r\n c = {a=10, b=20};\r\n send_response({a=r1, b=r2, c=c});\r\n `;\r\n\r\n\r\n let r = await store.runCasl(session, casl);\r\n\r\n console.log(r.items().toJS());\r\n let a = r.items().toJS();\r\n console.log(a);\r\n return \"done\";\r\n}\r\n\r\nexample()\r\n .then(r => console.log(r))\r\n .catch(err => console.log(err));\r\n*/\nfunction caslRun(_x, _x2, _x3, _x4, _x5) {\n return _caslRun.apply(this, arguments);\n}\nfunction _caslRun() {\n _caslRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
407
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programs */ \"./programs/index.js\");\n\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n/**\r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * \r\n * @async\r\n * @module caslRun\r\n * @category restaflib/cas\r\n * \r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {string} src - casl src statements\r\n * @param {object=} args - user input args (reference this as _args_ in casl program)\r\n * @param {boolean=} useCommons - include the common casl programs(checkAndLoad etc...)\r\n * @returns {promise} returns results from cas\r\n * @example\r\n\r\n * let restaf = require(\"@sassoftware/restaf\");\r\nlet payload = require('./config')();\r\nlet {casSetup} = require('@sassoftware/restaflib');\r\n\r\nlet prtUtil = require(\"./prtUtil\");\r\n\r\nlet store = restaf.initStore({casProxy: true});\r\nasync function example () {\r\n let { session } = await casSetup (store, payload);\r\n // console.log(JSON.stringify(session.links(), null, 4));\r\n let casl = `\r\n action datastep.runcode/ single='YES' code = 'data casuser.a; x=1; run;';\r\n action table.fetch r=r1/\r\n table= { caslib= 'casuser', name= 'a' } ;\r\n run;\r\n action datastep.runcode/ single='YES' code = 'data casuser.b; y=1; run;';\r\n action table.fetch r=r2/\r\n table= { caslib= 'casuser', name= 'b' } ;\r\n run;\r\n c = {a=10, b=20};\r\n send_response({a=r1, b=r2, c=c});\r\n `;\r\n\r\n\r\n let r = await store.runCasl(session, casl);\r\n\r\n console.log(r.items().toJS());\r\n let a = r.items().toJS();\r\n console.log(a);\r\n return \"done\";\r\n}\r\n\r\nexample()\r\n .then(r => console.log(r))\r\n .catch(err => console.log(err));\r\n*/\nfunction caslRun(_x, _x2, _x3, _x4, _x5) {\n return _caslRun.apply(this, arguments);\n}\nfunction _caslRun() {\n _caslRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, src, args, useCommons) {\n var tsrc,\n _len,\n rest,\n _key,\n result,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n tsrc = src;\n if (useCommons !== false) {\n tsrc = src + ' ' + _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['commonCasl']();\n }\n for (_len = _args.length, rest = new Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n rest[_key - 5] = _args[_key];\n }\n _context.next = 5;\n return _caslRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"].apply(void 0, [store, session, tsrc, args].concat(rest));\n case 5:\n result = _context.sent;\n return _context.abrupt(\"return\", result.items().toJS());\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _caslRun.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (caslRun);\n\n//# sourceURL=webpack://restaflib/./caslRun.js?");
|
|
323
408
|
|
|
324
409
|
/***/ }),
|
|
325
410
|
|
|
@@ -332,7 +417,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
332
417
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
333
418
|
|
|
334
419
|
"use strict";
|
|
335
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jsonToDict__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonToDict */ \"./jsonToDict.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n/** \r\n * lib\r\n */\n/** \r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * @private\r\n * @async\r\n * @function caslRunBase(async)\r\n * @category restaflib/cas\r\n * @param {object} store - restaf store\r\n * @param {object} session - cas session\r\n * @param {object} src - casl src statements\r\n * @param {object} args - arguments to pass to on to CAS as _args_\r\n * \r\n * @returns {object} standard return value from apiCall\r\n */\nfunction caslRunBase(_x, _x2, _x3, _x4) {\n return _caslRunBase.apply(this, arguments);\n}\nfunction _caslRunBase() {\n _caslRunBase = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
420
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jsonToDict__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonToDict */ \"./jsonToDict.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n/** \r\n * lib\r\n */\n/** \r\n *\r\n * @description Calls cas server and returns the results(async)\r\n * @private\r\n * @async\r\n * @function caslRunBase(async)\r\n * @category restaflib/cas\r\n * @param {object} store - restaf store\r\n * @param {object} session - cas session\r\n * @param {object} src - casl src statements\r\n * @param {object} args - arguments to pass to on to CAS as _args_\r\n * \r\n * @returns {object} standard return value from apiCall\r\n */\nfunction caslRunBase(_x, _x2, _x3, _x4) {\n return _caslRunBase.apply(this, arguments);\n}\nfunction _caslRunBase() {\n _caslRunBase = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, src, args) {\n var _args_,\n code,\n payload,\n _len,\n rest,\n _key,\n result,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n //\n // create casl statements for arguments and appenv\n //\n _args_ = Object(_jsonToDict__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(args !== null ? args : {}, '_args_');\n code = _args_ + ' ' + src; // Patch for issues with sccasl.runcasl via REST API\n code = code.replace(/\\r?\\n|\\r/g, '');\n // setup payload for runAction\n payload = {\n action: 'sccasl.runcasl',\n data: {\n code: code\n }\n };\n for (_len = _args.length, rest = new Array(_len > 4 ? _len - 4 : 0), _key = 4; _key < _len; _key++) {\n rest[_key - 4] = _args[_key];\n }\n _context.next = 7;\n return store.runAction.apply(store, [session, payload].concat(rest));\n case 7:\n result = _context.sent;\n return _context.abrupt(\"return\", result);\n case 9:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _caslRunBase.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (caslRunBase);\n\n//# sourceURL=webpack://restaflib/./caslRunBase.js?");
|
|
336
421
|
|
|
337
422
|
/***/ }),
|
|
338
423
|
|
|
@@ -345,7 +430,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
345
430
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
346
431
|
|
|
347
432
|
"use strict";
|
|
348
|
-
eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programs */ \"./programs/index.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n/** \r\n * lib\r\n */\n/**\r\n *\r\n * @description Score data in casl\r\n * \r\n * @async\r\n * @module caslScore\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {object} scenario - scenario values\r\n * \r\n * @returns {promise} returns the scores as an object\r\n */\n\n\n\n\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n\nfunction caslScore(_x, _x2, _x3) {\n return _caslScore.apply(this, arguments);\n}\nfunction _caslScore() {\n _caslScore = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(
|
|
433
|
+
eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _programs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programs */ \"./programs/index.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n/** \r\n * lib\r\n */\n/**\r\n *\r\n * @description Score data in casl\r\n * \r\n * @async\r\n * @module caslScore\r\n * @category restaflib/cas\r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - cas session\r\n * @param {object} scenario - scenario values\r\n * \r\n * @returns {promise} returns the scores as an object\r\n */\n\n\n\n\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n\nfunction caslScore(_x, _x2, _x3) {\n return _caslScore.apply(this, arguments);\n}\nfunction _caslScore() {\n _caslScore = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, session, scenario) {\n var src, appEnv, result, finalResult;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]['scoreCasl']();\n appEnv = _objectSpread({\n path: '/score'\n }, scenario);\n _context.next = 4;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, src, appEnv);\n case 4:\n result = _context.sent;\n finalResult = result.items('results', 'casResults').toJS()[0];\n return _context.abrupt(\"return\", finalResult);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _caslScore.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (caslScore);\n\n//# sourceURL=webpack://restaflib/./caslScore.js?");
|
|
349
434
|
|
|
350
435
|
/***/ }),
|
|
351
436
|
|
|
@@ -358,7 +443,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IM
|
|
|
358
443
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
359
444
|
|
|
360
445
|
"use strict";
|
|
361
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n/** \r\n* @description Append a compute table to a master compute table \r\n* @async\r\n* @module computeAppendTable\r\n* @category restaflib/compute\r\n* @param {store} store - store\r\n* @param {rafObject} session - compute session\r\n* @param {computeTable} input Input table with new rows {libref: xxx, name: nnn}\r\n* @param {computeTable} output Master table {computelib: xxx, name: nnn}\r\n* @returns {promise} - return \r\n* @example\r\n* let status = restaflib.computeAppendTable(store, session, 'computeuser.temp', 'public.master', true));\r\n* \r\n*/\nfunction computeAppendTable(_x, _x2, _x3, _x4) {\n return _computeAppendTable.apply(this, arguments);\n}\nfunction _computeAppendTable() {\n _computeAppendTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
446
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n/** \r\n* @description Append a compute table to a master compute table \r\n* @async\r\n* @module computeAppendTable\r\n* @category restaflib/compute\r\n* @param {store} store - store\r\n* @param {rafObject} session - compute session\r\n* @param {computeTable} input Input table with new rows {libref: xxx, name: nnn}\r\n* @param {computeTable} output Master table {computelib: xxx, name: nnn}\r\n* @returns {promise} - return \r\n* @example\r\n* let status = restaflib.computeAppendTable(store, session, 'computeuser.temp', 'public.master', true));\r\n* \r\n*/\nfunction computeAppendTable(_x, _x2, _x3, _x4) {\n return _computeAppendTable.apply(this, arguments);\n}\nfunction _computeAppendTable() {\n _computeAppendTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, input, output) {\n var src, computeSummary, statusCode;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = \"\\n proc append base=\".concat(output.libref, \".{output.name} \\n data= \").concat(input.libref, \".\").concat(input.name, \"; run;\\n \");\n _context.next = 3;\n return Object(_computeRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src);\n case 3:\n computeSummary = _context.sent;\n statusCode = computeSummary.SASJobStatus === 'completed' ? 0 : 1;\n return _context.abrupt(\"return\", {\n msg: \"Append Completed. Status is: \".concat(computeSummary.SASJobStatus),\n statusCode: statusCode\n });\n case 6:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeAppendTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeAppendTable);\n\n//# sourceURL=webpack://restaflib/./computeAppendTable.js?");
|
|
362
447
|
|
|
363
448
|
/***/ }),
|
|
364
449
|
|
|
@@ -371,7 +456,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
371
456
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
372
457
|
|
|
373
458
|
"use strict";
|
|
374
|
-
eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n/**\r\n *\r\n * @description Fetch data from a SAS Table\r\n * @async\r\n * @module computeFetchData\r\n * @category restaflib/compute\r\n * @param {object} store - restaf store\r\n * @param {computeSummary} computeSummary - Summary object created by computeSummary method\r\n * @param {string} table - name of the table\r\n * @param {string} scroll direction - null(to get first set)|next|prev|first|last\r\n * @param {object} payload - query values\r\n *\r\n * @returns {promise} - {columns: <column names>, rows: <data for rows> , scrollOptions: <available scroll directions>}\r\n */\nfunction computeFetchData(_x, _x2, _x3, _x4, _x5, _x6) {\n return _computeFetchData.apply(this, arguments);\n} // convert cells to rowSet\nfunction _computeFetchData() {\n _computeFetchData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(
|
|
459
|
+
eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n/**\r\n *\r\n * @description Fetch data from a SAS Table\r\n * @async\r\n * @module computeFetchData\r\n * @category restaflib/compute\r\n * @param {object} store - restaf store\r\n * @param {computeSummary} computeSummary - Summary object created by computeSummary method\r\n * @param {string} table - name of the table\r\n * @param {string} scroll direction - null(to get first set)|next|prev|first|last\r\n * @param {object} payload - query values\r\n *\r\n * @returns {promise} - {columns: <column names>, rows: <data for rows> , scrollOptions: <available scroll directions>}\r\n */\nfunction computeFetchData(_x, _x2, _x3, _x4, _x5, _x6) {\n return _computeFetchData.apply(this, arguments);\n} // convert cells to rowSet\nfunction _computeFetchData() {\n _computeFetchData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, computeSummary, table, direction, payload, useRow) {\n var data, dataIsformatted, tname, ipayload, dataIsFormatted, linkRel, adhoc, tableInfo, t1, colCount, qc, columns, schema, items, cx, c, newcol, indx, result, rowsData, current, dir, _result, _rowsData;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n data = null;\n dataIsformatted = false;\n tname = typeof table === \"string\" ? table : \"\".concat(table.libref, \".\").concat(table.name);\n tname = tname.toUpperCase(); /*to allow for compute service table info */\n ipayload = payload != null ? _objectSpread({}, payload) : {\n qs: {}\n };\n ipayload.qs.includeIndex = true;\n dataIsFormatted = ipayload.qs.format;\n linkRel = useRow == null ? \"rows\" : useRow; // is payload an override or is this an adhoc request(i.e user is ignoring scroll info)\n adhoc = payload != null && direction == null ? true : false; // retrieve current info on this table(if any)\n tableInfo = computeSummary.tables[tname];\n if (!(tableInfo != null)) {\n _context.next = 47;\n break;\n }\n // reset current on if this is an adhoc request.\n if (adhoc === true) {\n tableInfo.current = null;\n }\n //get column info \n if (!(tableInfo.current === null || direction == null || direction === \"first\")) {\n _context.next = 35;\n break;\n }\n _context.next = 15;\n return store.apiCall(tableInfo.self);\n case 15:\n t1 = _context.sent;\n colCount = t1.items().toJS()[\"columnCount\"]; // get columns explicitly since user can control this thru payload\n qc = {\n qs: {\n start: 0,\n limit: colCount\n }\n };\n _context.next = 20;\n return store.apiCall(t1.links(\"columns\"), qc);\n case 20:\n columns = _context.sent;\n schema = [];\n items = columns.items().toJS();\n if (linkRel === \"rows\") {\n schema.push({\n name: \"_index_\",\n Column: \"_Index_\",\n Label: \"Index\",\n length: 8,\n type: \"FLOAT\",\n format: \"BEST\",\n informat: \"BEST\",\n custom: false,\n isFormat: false\n });\n }\n for (cx in items) {\n c = items[cx];\n console.log(c.name, c.data.type, c.data.format, c.data.informat);\n newcol = {\n name: c.name.toLowerCase(),\n Column: c.name.toLowerCase(),\n Label: c.data.label,\n length: c.data.length,\n type: c.data.type,\n format: c.data.format != null ? c.data.format.name : null,\n informat: c.data.informat != null ? c.data.informat.name : null,\n custom: false,\n isFormat: dataIsFormatted\n };\n indx = ipayload.qs.includeIndex === true ? 1 : 0;\n schema[c.data.index + indx] = newcol;\n }\n // Now get data using rows or rowSet rel\n _context.next = 27;\n return store.apiCall(t1.links(linkRel), ipayload);\n case 27:\n result = _context.sent;\n // If using linkRel of rows, convert the data to rowSet schema\n rowsData = linkRel === \"rowSet\" ? result.items('rows').toJS() : cells2RowSet(result);\n tableInfo.current = result;\n tableInfo.schema = schema;\n tableInfo.columns = columns;\n data = {\n columns: columns,\n schema: schema,\n rows: rowsData,\n scrollOptions: result.scrollCmds().keySeq().toJS()\n };\n _context.next = 47;\n break;\n case 35:\n current = tableInfo.current;\n dir = direction;\n if (direction === \"next\" && current.scrollCmds(\"next\") === null) {\n dir = current.links(\"last\") !== null ? \"last\" : null;\n }\n if (direction === \"prev\" && current.scrollCmds(\"prev\") === null) {\n dir = current.links(\"first\") !== null ? \"first\" : null;\n }\n data = {\n schema: tableInfo.schema,\n columns: tableInfo.columns,\n currentColumns: tableInfo.currentColumns,\n rows: [],\n scrollOptions: current.scrollCmds().keySeq().toJS()\n };\n if (!(dir !== null && current.scrollCmds(dir) !== null)) {\n _context.next = 47;\n break;\n }\n _context.next = 43;\n return store.apiCall(current.scrollCmds(dir), ipayload);\n case 43:\n _result = _context.sent;\n tableInfo.current = _result;\n _rowsData = linkRel !== \"rows\" ? _result.items('rows').toJS() : cells2RowSet(_result);\n data = {\n schema: tableInfo.schema,\n columns: tableInfo.schema,\n rows: _rowsData,\n scrollOptions: _result.scrollCmds().keySeq().toJS()\n };\n case 47:\n return _context.abrupt(\"return\", data);\n case 48:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeFetchData.apply(this, arguments);\n}\nfunction cells2RowSet(result) {\n var rowsData = result.items().toJS().map(function (r) {\n return r.cells;\n });\n return rowsData;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeFetchData);\n\n//# sourceURL=webpack://restaflib/./computeFetchData.js?");
|
|
375
460
|
|
|
376
461
|
/***/ }),
|
|
377
462
|
|
|
@@ -384,7 +469,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IM
|
|
|
384
469
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
385
470
|
|
|
386
471
|
"use strict";
|
|
387
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n\n//\n// Notes: Retrieve a SAS table and convert to a json\n// convert table to object of the form [{var1: value, var2: value,...},....]\n// ex: [{merlot:10, twobit:20}, {merlot: 20, twobit:30}]\n\n\n\n/**\r\n * @description return content of a file output from a compute run\r\n * @async\r\n * @module computeFileContent\r\n * @category restaflib/compute\r\n *\r\n * @param {object} store - restaf store\r\n * @param {object} computeSummary - computeSummary\r\n * @param {string} fileref - name of the fileref\r\n * @param {boolean} url - set to true if you want the url and not the content\r\n *\r\n * @returns {promise} - get uri for content]\r\n */\n\n\nfunction computeFileContent(_x, _x2, _x3, _x4) {\n return _computeFileContent.apply(this, arguments);\n}\nfunction _computeFileContent() {\n _computeFileContent = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
472
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n\n//\n// Notes: Retrieve a SAS table and convert to a json\n// convert table to object of the form [{var1: value, var2: value,...},....]\n// ex: [{merlot:10, twobit:20}, {merlot: 20, twobit:30}]\n\n\n\n/**\r\n * @description return content of a file output from a compute run\r\n * @async\r\n * @module computeFileContent\r\n * @category restaflib/compute\r\n *\r\n * @param {object} store - restaf store\r\n * @param {object} computeSummary - computeSummary\r\n * @param {string} fileref - name of the fileref\r\n * @param {boolean} url - set to true if you want the url and not the content\r\n *\r\n * @returns {promise} - get uri for content]\r\n */\n\n\nfunction computeFileContent(_x, _x2, _x3, _x4) {\n return _computeFileContent.apply(this, arguments);\n}\nfunction _computeFileContent() {\n _computeFileContent = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, computeSummary, fileref, url) {\n var fileInfo, payload, result, r, rx, _r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n fileInfo = computeSummary.files[fileref];\n if (!(fileInfo == null)) {\n _context.next = 3;\n break;\n }\n throw \"Invalid fileref \".concat(fileref);\n case 3:\n if (!(fileInfo.current === null)) {\n _context.next = 12;\n break;\n }\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(fileref, \"')\")\n }\n };\n _context.next = 7;\n return store.apiCall(computeSummary.session.links('files'), payload);\n case 7:\n result = _context.sent;\n _context.next = 10;\n return store.apiCall(result.itemsCmd(fileref, 'self'));\n case 10:\n result = _context.sent;\n fileInfo.current = result;\n case 12:\n if (!(url === true)) {\n _context.next = 17;\n break;\n }\n r = \"\".concat(computeSummary.session.host).concat(fileInfo.current.links('content', 'link', 'uri'));\n return _context.abrupt(\"return\", r);\n case 17:\n if (!(fileInfo.data === null)) {\n _context.next = 26;\n break;\n }\n _context.next = 20;\n return store.apiCall(fileInfo.current.links('content'));\n case 20:\n rx = _context.sent;\n _r = rx.items();\n fileInfo.data = _r;\n return _context.abrupt(\"return\", _r);\n case 26:\n return _context.abrupt(\"return\", fileInfo.data);\n case 27:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeFileContent.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeFileContent);\n\n//# sourceURL=webpack://restaflib/./computeFileContent.js?");
|
|
388
473
|
|
|
389
474
|
/***/ }),
|
|
390
475
|
|
|
@@ -397,7 +482,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
397
482
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
398
483
|
|
|
399
484
|
"use strict";
|
|
400
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n/**\r\n * @description Return Log|listing|ODS|list of tables in the compute service job\r\n * @async\r\n * @module computeResults\r\n * @category restaflib/compute\r\n * @param {object} store - restaf store\r\n * @param {object} computeSummary - computeSummary object\r\n * @param {string} type - type of result( log|listing|ods|table)\r\n * @returns {object|string} - string for all except table(array of names)\r\n */\nfunction computeResults(_x, _x2, _x3) {\n return _computeResults.apply(this, arguments);\n}\nfunction _computeResults() {\n _computeResults = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
485
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n/**\r\n * @description Return Log|listing|ODS|list of tables in the compute service job\r\n * @async\r\n * @module computeResults\r\n * @category restaflib/compute\r\n * @param {object} store - restaf store\r\n * @param {object} computeSummary - computeSummary object\r\n * @param {string} type - type of result( log|listing|ods|table)\r\n * @returns {object|string} - string for all except table(array of names)\r\n */\nfunction computeResults(_x, _x2, _x3) {\n return _computeResults.apply(this, arguments);\n}\nfunction _computeResults() {\n _computeResults = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, computeSummary, type) {\n var log, result, next, _result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(type === 'log' || type === 'listing')) {\n _context.next = 20;\n break;\n }\n log = [];\n if (!(computeSummary[type] !== null)) {\n _context.next = 16;\n break;\n }\n _context.next = 5;\n return store.apiCall(computeSummary[type]);\n case 5:\n result = _context.sent;\n log = log.concat(result.items().toJS());\n case 7:\n if (!((next = result.scrollCmds('next')) !== null)) {\n _context.next = 14;\n break;\n }\n _context.next = 10;\n return store.apiCall(next);\n case 10:\n result = _context.sent;\n log = log.concat(result.items().toJS());\n _context.next = 7;\n break;\n case 14:\n _context.next = 17;\n break;\n case 16:\n log[0] = \"Note: No \".concat(type);\n case 17:\n return _context.abrupt(\"return\", log);\n case 20:\n if (!(type === 'ods')) {\n _context.next = 31;\n break;\n }\n if (!(computeSummary.ods !== null)) {\n _context.next = 28;\n break;\n }\n _context.next = 24;\n return store.apiCall(computeSummary.ods);\n case 24:\n _result = _context.sent;\n return _context.abrupt(\"return\", _result.items());\n case 28:\n return _context.abrupt(\"return\", '<h2> No ODS output </h2>');\n case 29:\n _context.next = 40;\n break;\n case 31:\n if (!(type === 'tables')) {\n _context.next = 35;\n break;\n }\n return _context.abrupt(\"return\", Object.keys(computeSummary.tables));\n case 35:\n if (!(type === 'files')) {\n _context.next = 39;\n break;\n }\n return _context.abrupt(\"return\", Object.keys(computeSummary.files));\n case 39:\n throw \"Error: Invalid type \".concat(type);\n case 40:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeResults.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeResults);\n\n//# sourceURL=webpack://restaflib/./computeResults.js?");
|
|
401
486
|
|
|
402
487
|
/***/ }),
|
|
403
488
|
|
|
@@ -410,7 +495,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
410
495
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
411
496
|
|
|
412
497
|
"use strict";
|
|
413
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _computeRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeRunBase */ \"./computeRunBase.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n/**\r\n * @member compute\r\n * @description Prepare data for runCompute(@async)\r\n * @async\r\n * @module computeRun\r\n * @category restaflib/compute\r\n * \r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - current compute service session\r\n * @param {string} src - code to execute\r\n * @param {object=} macros - macros as a json\r\n * @param {number=} timeout - long polling timeout in seconds\r\n * @param {function=} checkStatus - callback to check on status\r\n * @param {object=} userContext - this is passed to the statusHandler \r\n * @returns {promise} computeSummary object. Job Status is computeSummary.SASJobStatus\r\n * @example\r\n * The job status will be one of these completed|warning|error|failed\r\n * Typical call:\r\n * let computeSummary = await computeRun(store,computeSession, src, args);\r\n * \r\n * Advanced call: If you want to track the job status pass a checkStatus function with some context\r\n \r\n const checkStatus = (state, context) => {\r\n console.log('state', state);\r\n console.log('context ', context);\r\n // do something useful - like in an UI display status for user\r\n \r\n // To stop waiting on job completion return a state value like 'exit' or any string\r\n // the value has to be something other than the state passed in.\r\n // this will force the code to stop waiting on the server and return to the app.\r\n // It is upto your app to take appropriate actions(like cancelling the job)\r\n // Below is a trivial example\r\n context.counter = context.counter + 1;\r\n\t\tif (state === 'running' && context.counter > 5) {\r\n\t\t\tcontext.realState = state;\r\n\t\t\tstate = 'exit';\r\n }\r\n return state;\r\n } // return true if you want to stop waiting on the job. Does not cancel the job\r\n \r\n===============================================\r\n\r\n* A simple example\r\n\r\n async function runtest(store, logonPayload) {\r\n let computeSession = await restaflib.computeSetup(store, null, logonPayload);\r\n let macros = {\r\n data: 'sashelp.cars'\r\n };\r\n let src = `\r\n ods html style=barrettsblue; \r\n proc print data=&data;run;\r\n ods html close; \r\n run;\r\n `;\r\n \r\n let computeSummary = await restaflib.computeRun(\r\n store,\r\n computeSession,\r\n src,\r\n macros\r\n );\r\n console.log('Job Status: ', computeSummary.SASJobStatus);\r\n\r\n let log = await restaflib.computeResults(store, computeSummary, \"log\");\r\n let ods = await restaflib.computeResults(store, computeSummary, \"ods\");\r\n return 'done';\r\n\r\n }\r\n\r\n */\n\n\n\nfunction computeRun(_x, _x2, _x3, _x4, _x5, _x6, _x7) {\n return _computeRun.apply(this, arguments);\n}\nfunction _computeRun() {\n _computeRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
498
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _computeRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeRunBase */ \"./computeRunBase.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n/**\r\n * @member compute\r\n * @description Prepare data for runCompute(@async)\r\n * @async\r\n * @module computeRun\r\n * @category restaflib/compute\r\n * \r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - current compute service session\r\n * @param {string} src - code to execute\r\n * @param {object=} macros - macros as a json\r\n * @param {number=} timeout - long polling timeout in seconds\r\n * @param {function=} checkStatus - callback to check on status\r\n * @param {object=} userContext - this is passed to the statusHandler \r\n * @returns {promise} computeSummary object. Job Status is computeSummary.SASJobStatus\r\n * @example\r\n * The job status will be one of these completed|warning|error|failed\r\n * Typical call:\r\n * let computeSummary = await computeRun(store,computeSession, src, args);\r\n * \r\n * Advanced call: If you want to track the job status pass a checkStatus function with some context\r\n \r\n const checkStatus = (state, context) => {\r\n console.log('state', state);\r\n console.log('context ', context);\r\n // do something useful - like in an UI display status for user\r\n \r\n // To stop waiting on job completion return a state value like 'exit' or any string\r\n // the value has to be something other than the state passed in.\r\n // this will force the code to stop waiting on the server and return to the app.\r\n // It is upto your app to take appropriate actions(like cancelling the job)\r\n // Below is a trivial example\r\n context.counter = context.counter + 1;\r\n\t\tif (state === 'running' && context.counter > 5) {\r\n\t\t\tcontext.realState = state;\r\n\t\t\tstate = 'exit';\r\n }\r\n return state;\r\n } // return true if you want to stop waiting on the job. Does not cancel the job\r\n \r\n===============================================\r\n\r\n* A simple example\r\n\r\n async function runtest(store, logonPayload) {\r\n let computeSession = await restaflib.computeSetup(store, null, logonPayload);\r\n let macros = {\r\n data: 'sashelp.cars'\r\n };\r\n let src = `\r\n ods html style=barrettsblue; \r\n proc print data=&data;run;\r\n ods html close; \r\n run;\r\n `;\r\n \r\n let computeSummary = await restaflib.computeRun(\r\n store,\r\n computeSession,\r\n src,\r\n macros\r\n );\r\n console.log('Job Status: ', computeSummary.SASJobStatus);\r\n\r\n let log = await restaflib.computeResults(store, computeSummary, \"log\");\r\n let ods = await restaflib.computeResults(store, computeSummary, \"ods\");\r\n return 'done';\r\n\r\n }\r\n\r\n */\n\n\n\nfunction computeRun(_x, _x2, _x3, _x4, _x5, _x6, _x7) {\n return _computeRun.apply(this, arguments);\n}\nfunction _computeRun() {\n _computeRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, src, macros, timeout, checkStatus, userContext) {\n var code, arg, c, asrc, resultSummary;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n // adjust for backward compatability\n if (typeof checkStatus === 'number') {\n checkStatus = null;\n }\n\n // generate macro variables\n code = ['options NOSYNTAXCHECK OBS=MAX;%let syscc=0;'];\n if (macros != null) {\n for (arg in macros) {\n c = \"%let \".concat(arg, \"=\").concat(macros[arg], \";\");\n code.push(c);\n }\n }\n\n // Concat macro to code\n asrc = src.replace(/\\t/g, ' ');\n asrc = asrc.split(/\\r?\\n/);\n code = code.concat(asrc).concat(';');\n\n // run code and get results\n _context.next = 8;\n return Object(_computeRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, code, timeout, checkStatus, userContext);\n case 8:\n resultSummary = _context.sent;\n return _context.abrupt(\"return\", resultSummary);\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeRun.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeRun);\n\n//# sourceURL=webpack://restaflib/./computeRun.js?");
|
|
414
499
|
|
|
415
500
|
/***/ }),
|
|
416
501
|
|
|
@@ -423,7 +508,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
423
508
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
424
509
|
|
|
425
510
|
"use strict";
|
|
426
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _computeSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n/**\r\n * @description Reduce compute service execution results\r\n * @private\r\n * @async\r\n * @module computeRunBase\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} session - compute service session\r\n * @param {code} code - SAS code to be executed\r\n * @param {int} timeout optional - timeout for long poll in seconds(default= 5)\r\n\r\n * \r\n * @returns {object} computeSummary Object\r\n * \r\n */\nfunction computeRunBase(_x, _x2, _x3, _x4, _x5, _x6) {\n return _computeRunBase.apply(this, arguments);\n}\nfunction _computeRunBase() {\n _computeRunBase = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
511
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _computeSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n/**\r\n * @description Reduce compute service execution results\r\n * @private\r\n * @async\r\n * @module computeRunBase\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} session - compute service session\r\n * @param {code} code - SAS code to be executed\r\n * @param {int} timeout optional - timeout for long poll in seconds(default= 5)\r\n\r\n * \r\n * @returns {object} computeSummary Object\r\n * \r\n */\nfunction computeRunBase(_x, _x2, _x3, _x4, _x5, _x6) {\n return _computeRunBase.apply(this, arguments);\n}\nfunction _computeRunBase() {\n _computeRunBase = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, code, timeout, eventHandler, userContext) {\n var payload, job, p, status, results;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n payload = {\n data: {\n code: code\n }\n }; // Now execute the data step and wait for completion\n // clear bad state if any\n _context.next = 3;\n return store.apiCall(session.links('execute'), payload);\n case 3:\n job = _context.sent;\n p = {\n qs: {\n wait: timeout != null ? timeout : 5\n },\n headers: {\n \"If-None-Match\": job.headers('etag')\n }\n };\n _context.next = 7;\n return store.jobState(job, p, 'longpoll', 0, eventHandler, userContext);\n case 7:\n status = _context.sent;\n _context.next = 10;\n return Object(_computeSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, status.job);\n case 10:\n results = _context.sent;\n results.SASJobStatus = status.data;\n results.jobStateStatus = status;\n return _context.abrupt(\"return\", results);\n case 14:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeRunBase.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeRunBase);\n\n//# sourceURL=webpack://restaflib/./computeRunBase.js?");
|
|
427
512
|
|
|
428
513
|
/***/ }),
|
|
429
514
|
|
|
@@ -436,7 +521,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
436
521
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
437
522
|
|
|
438
523
|
"use strict";
|
|
439
|
-
eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n/**\r\n * @description Setup access to compute service\r\n * @async\r\n * @module computeSetup\r\n * @category restaflib/compute\r\n * \r\n * @param {store} store - restaf store\r\n * @param {string=} contextName name of the context. If not specified defaults to Job Execution context\r\n * @param {logonPayload=} payload logon payload.If null assumes that logon was done earlier.\r\n * @param {sessionPayload=} sessionPayload for createSession call\r\n * @param {string=} sessionID id of a session to attach\r\n * @returns {promise} - returns a compute session\r\n */\n\n\n\nfunction computeSetup(_x, _x2, _x3, _x4, _x5) {\n return _computeSetup.apply(this, arguments);\n}\nfunction _computeSetup() {\n _computeSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(
|
|
524
|
+
eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n/**\r\n * @description Setup access to compute service\r\n * @async\r\n * @module computeSetup\r\n * @category restaflib/compute\r\n * \r\n * @param {store} store - restaf store\r\n * @param {string=} contextName name of the context. If not specified defaults to Job Execution context\r\n * @param {logonPayload=} payload logon payload.If null assumes that logon was done earlier.\r\n * @param {sessionPayload=} sessionPayload for createSession call\r\n * @param {string=} sessionID id of a session to attach\r\n * @returns {promise} - returns a compute session\r\n */\n\n\n\nfunction computeSetup(_x, _x2, _x3, _x4, _x5) {\n return _computeSetup.apply(this, arguments);\n}\nfunction _computeSetup() {\n _computeSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, contextName, payload, sessionPayload, sessionID) {\n var msg, _yield$store$addServi, compute, session, _p, sessionList, index, selfcmd, p, contexts, name, createSession;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(sessionID != null && _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(sessionID) === 'object')) {\n _context.next = 2;\n break;\n }\n return _context.abrupt(\"return\", sessionID);\n case 2:\n if (!(payload != null)) {\n _context.next = 6;\n break;\n }\n _context.next = 5;\n return store.logon(payload);\n case 5:\n msg = _context.sent;\n case 6:\n _context.next = 8;\n return store.addServices('compute');\n case 8:\n _yield$store$addServi = _context.sent;\n compute = _yield$store$addServi.compute;\n // Not PUP\n session = null; // Use user specified session\n if (!(sessionID != null)) {\n _context.next = 24;\n break;\n }\n _p = {\n start: 0,\n limit: 100,\n qs: {\n filter: \"eq(id,'\".concat(sessionID, \"')\")\n }\n };\n _context.next = 15;\n return store.apiCall(compute.links('sessions'), _p);\n case 15:\n sessionList = _context.sent;\n index = sessionList.itemsList().toJS().indexOf(sessionID);\n if (!(index < 0)) {\n _context.next = 19;\n break;\n }\n throw \"ERROR: The sessionID \".concat(sessionID, \" was not found.\");\n case 19:\n selfcmd = sessionList.itemsCmd(sessionList.itemsList(index), \"self\");\n _context.next = 22;\n return store.apiCall(selfcmd);\n case 22:\n session = _context.sent;\n return _context.abrupt(\"return\", session);\n case 24:\n if (!(store.store.config.options.computeServerId != null)) {\n _context.next = 30;\n break;\n }\n console.log('NOTE: Detected Workbench');\n _context.next = 28;\n return store.apiCall(compute.links('createSession'));\n case 28:\n session = _context.sent;\n return _context.abrupt(\"return\", session);\n case 30:\n // create a session - most common case\n\n if (contextName == null) {\n contextName = 'SAS Job Execution compute context';\n }\n p = {\n qs: {\n filter: \"contains(name,'\".concat(contextName, \"')\")\n }\n };\n contexts = null;\n _context.prev = 33;\n _context.next = 36;\n return store.apiCall(compute.links(\"contexts\"), p);\n case 36:\n contexts = _context.sent;\n if (!(contexts.itemsList().size === 0)) {\n _context.next = 39;\n break;\n }\n throw \"Context \".concat(contextName, \" not found\");\n case 39:\n _context.next = 45;\n break;\n case 41:\n _context.prev = 41;\n _context.t0 = _context[\"catch\"](33);\n console.log('Error: Not able to get context');\n throw _context.t0;\n case 45:\n name = contexts.itemsList(0);\n if (!(sessionID == null)) {\n _context.next = 52;\n break;\n }\n p = sessionPayload == null ? null : sessionPayload;\n createSession = contexts.itemsCmd(name, 'createSession');\n _context.next = 51;\n return store.apiCall(createSession, sessionPayload);\n case 51:\n session = _context.sent;\n case 52:\n return _context.abrupt(\"return\", session);\n case 53:\n case \"end\":\n return _context.stop();\n }\n }, _callee, null, [[33, 41]]);\n }));\n return _computeSetup.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeSetup);\n\n//# sourceURL=webpack://restaflib/./computeSetup.js?");
|
|
440
525
|
|
|
441
526
|
/***/ }),
|
|
442
527
|
|
|
@@ -449,7 +534,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_M
|
|
|
449
534
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
450
535
|
|
|
451
536
|
"use strict";
|
|
452
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _computeSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/* harmony import */ var _computeResults__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./computeResults */ \"./computeResults.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n\n\n/**\r\n * @description Setup access to compute service\r\n * @async\r\n * @private\r\n * @module computeSetup\r\n * @category restaflib/compute\r\n * \r\n * @param {store} store - restaf store\r\n * @param {session} SAS compute Session\r\n * @param {tables} tables Tables to be setup{libref:xx,name:xxx} or array of this object \r\n * @param {string} preamble SAS code to execute before setup\r\n * @returns {promise} - returns a compute summary \r\n */\nfunction computeSetupTables(_x, _x2, _x3, _x4) {\n return _computeSetupTables.apply(this, arguments);\n}\nfunction _computeSetupTables() {\n _computeSetupTables = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
537
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _computeSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/* harmony import */ var _computeResults__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./computeResults */ \"./computeResults.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n\n\n/**\r\n * @description Setup access to compute service\r\n * @async\r\n * @private\r\n * @module computeSetup\r\n * @category restaflib/compute\r\n * \r\n * @param {store} store - restaf store\r\n * @param {session} SAS compute Session\r\n * @param {tables} tables Tables to be setup{libref:xx,name:xxx} or array of this object \r\n * @param {string} preamble SAS code to execute before setup\r\n * @returns {promise} - returns a compute summary \r\n */\nfunction computeSetupTables(_x, _x2, _x3, _x4) {\n return _computeSetupTables.apply(this, arguments);\n}\nfunction _computeSetupTables() {\n _computeSetupTables = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, tables, preamble) {\n var result, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(preamble != null)) {\n _context.next = 6;\n break;\n }\n _context.next = 3;\n return Object(_computeRun__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, preamble);\n case 3:\n result = _context.sent;\n if (!(result.SASJobStatus !== 'completed')) {\n _context.next = 6;\n break;\n }\n throw \"Error: Preamble failed with completion code of \".concat(result.SASJobStatus);\n case 6:\n _context.next = 8;\n return Object(_computeSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, null, tables);\n case 8:\n r = _context.sent;\n return _context.abrupt(\"return\", r);\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeSetupTables.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeSetupTables);\n\n//# sourceURL=webpack://restaflib/./computeSetupTables.js?");
|
|
453
538
|
|
|
454
539
|
/***/ }),
|
|
455
540
|
|
|
@@ -462,7 +547,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
462
547
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
463
548
|
|
|
464
549
|
"use strict";
|
|
465
|
-
eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n/**\r\n * @description Reduce the job information into consummable form(async)\r\n * \r\n * @async\r\n * @module computeSummary\r\n * @category restaflib/compute\r\n * \r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - compute Session\r\n * @param {rafObject} job - rafObject representing the compute service job after job completion\r\n * @param {object|Array=} tables (see computeSetupTables)\r\n * @returns {promise} - the computeSummary object for easy handling of logs,listing,ods, tables\r\n * \r\n */\nfunction computeSummary(_x, _x2, _x3, _x4) {\n return _computeSummary.apply(this, arguments);\n}\nfunction _computeSummary() {\n _computeSummary = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(
|
|
550
|
+
eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n/**\r\n * @description Reduce the job information into consummable form(async)\r\n * \r\n * @async\r\n * @module computeSummary\r\n * @category restaflib/compute\r\n * \r\n * @param {store} store - restaf store\r\n * @param {rafObject} session - compute Session\r\n * @param {rafObject} job - rafObject representing the compute service job after job completion\r\n * @param {object|Array=} tables (see computeSetupTables)\r\n * @returns {promise} - the computeSummary object for easy handling of logs,listing,ods, tables\r\n * \r\n */\nfunction computeSummary(_x, _x2, _x3, _x4) {\n return _computeSummary.apply(this, arguments);\n}\nfunction _computeSummary() {\n _computeSummary = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, session, job, tables) {\n var result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(job != null && tables == null)) {\n _context.next = 6;\n break;\n }\n _context.next = 3;\n return jobResults(store, session, job);\n case 3:\n result = _context.sent;\n _context.next = 9;\n break;\n case 6:\n _context.next = 8;\n return isetupTable(store, session, tables);\n case 8:\n result = _context.sent;\n case 9:\n return _context.abrupt(\"return\", result);\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeSummary.apply(this, arguments);\n}\nfunction jobResults(_x5, _x6, _x7) {\n return _jobResults.apply(this, arguments);\n}\nfunction _jobResults() {\n _jobResults = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee2(store, session, job) {\n var cResult, reportLink, results, size, i, resultItem, type, r, _r, _r2;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n cResult = {\n session: session,\n log: null,\n listing: null,\n ods: null,\n job: job /*null*/,\n tables: {},\n files: {}\n };\n cResult.log = job.links('log');\n cResult.listing = job.links('listing');\n reportLink = job.links('results');\n if (!(reportLink !== null)) {\n _context2.next = 10;\n break;\n }\n _context2.next = 7;\n return store.apiCall(reportLink);\n case 7:\n results = _context2.sent;\n size = results.itemsList().size;\n if (size > 0) {\n for (i = 0; i < size; i++) {\n resultItem = results.itemsList(i);\n type = results.items(resultItem, 'data', 'type').toLowerCase();\n if (type === 'ods') {\n cResult['ods'] = results.itemsCmd(resultItem, 'self');\n } else if (type === 'table') {\n r = {\n self: results.itemsCmd(resultItem, 'self'),\n current: null\n };\n cResult.tables[resultItem.toUpperCase()] = r;\n } else if (type === 'file') {\n _r = {\n self: resultItem,\n current: null,\n data: null\n };\n cResult.files[resultItem] = _r;\n } else {\n _r2 = {\n self: resultItem,\n current: null,\n data: null\n };\n cResult[type] = _r2;\n }\n }\n }\n case 10:\n return _context2.abrupt(\"return\", cResult);\n case 11:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _jobResults.apply(this, arguments);\n}\nfunction isetupTable(_x8, _x9, _x0) {\n return _isetupTable.apply(this, arguments);\n}\nfunction _isetupTable() {\n _isetupTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee3(store, session, tables) {\n var cResult, tableList, i, itable, libref, name, p, currentLibrefs, rlink, currentLibrefSelf, _tables, tname, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n cResult = {\n session: session,\n log: null,\n listing: null,\n ods: null,\n job: null,\n tables: {},\n files: {}\n };\n tableList = _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(tables) === 'object' ? [tables] : tables;\n i = 0;\n case 3:\n if (!(i < tableList.length)) {\n _context3.next = 29;\n break;\n }\n itable = tableList[i];\n libref = itable.libref.toUpperCase();\n name = itable.name.toUpperCase();\n p = {\n qs: {\n filter: \"eq(name,'\".concat(libref, \"')\")\n }\n };\n _context3.next = 10;\n return store.apiCall(session.links('librefs'), p);\n case 10:\n currentLibrefs = _context3.sent;\n if (!(currentLibrefs.itemsList().size === 0)) {\n _context3.next = 13;\n break;\n }\n throw \"ERROR: Libref \".concat(libref, \" not found\");\n case 13:\n // get the links for this libref\n rlink = currentLibrefs.itemsCmd(libref, 'self');\n _context3.next = 16;\n return store.apiCall(rlink);\n case 16:\n currentLibrefSelf = _context3.sent;\n // get the table\n p = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n _context3.next = 20;\n return store.apiCall(currentLibrefSelf.links('tables'), p);\n case 20:\n _tables = _context3.sent;\n if (!(_tables.itemsList().size === 0)) {\n _context3.next = 23;\n break;\n }\n throw \"ERROR: Table \".concat(name, \" not found\");\n case 23:\n tname = \"\".concat(libref, \".\").concat(name).toLowerCase();\n r = {\n self: _tables.itemsCmd(name, 'self'),\n current: null\n };\n cResult.tables[tname.toUpperCase()] = r;\n case 26:\n i++;\n _context3.next = 3;\n break;\n case 29:\n return _context3.abrupt(\"return\", cResult);\n case 30:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }));\n return _isetupTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeSummary);\n\n//# sourceURL=webpack://restaflib/./computeSummary.js?");
|
|
466
551
|
|
|
467
552
|
/***/ }),
|
|
468
553
|
|
|
@@ -475,7 +560,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_M
|
|
|
475
560
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
476
561
|
|
|
477
562
|
"use strict";
|
|
478
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/*\r\n * Copyright © 2021, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n/**\r\n* @description Update a record in a cas table\r\n* @async\r\n* @private\r\n* @module computeUpdateData\r\n* @category restaflib/cas\r\n* @param {store} store - store\r\n* @param {rafObject} session - cas session\r\n* @param {*} payload - {data,where,table}\r\n* @returns {promise} - return \r\n* @example\r\n* let inputs = restaflib.computeUpdateData(store, session, payload);\r\n* payload = { where: {key1: vale1, key2: value2,...},\r\n* data: {var1:value1, var2:value2,....},\r\n* table: {caslib: caslib, name: name}\r\n* Expects a single row\r\n*/\nfunction computeUpdateData(_x, _x2, _x3) {\n return _computeUpdateData.apply(this, arguments);\n}\nfunction _computeUpdateData() {\n _computeUpdateData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
563
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/*\r\n * Copyright © 2021, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n/**\r\n* @description Update a record in a cas table\r\n* @async\r\n* @private\r\n* @module computeUpdateData\r\n* @category restaflib/cas\r\n* @param {store} store - store\r\n* @param {rafObject} session - cas session\r\n* @param {*} payload - {data,where,table}\r\n* @returns {promise} - return \r\n* @example\r\n* let inputs = restaflib.computeUpdateData(store, session, payload);\r\n* payload = { where: {key1: vale1, key2: value2,...},\r\n* data: {var1:value1, var2:value2,....},\r\n* table: {caslib: caslib, name: name}\r\n* Expects a single row\r\n*/\nfunction computeUpdateData(_x, _x2, _x3) {\n return _computeUpdateData.apply(this, arguments);\n}\nfunction _computeUpdateData() {\n _computeUpdateData = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, payload) {\n var data, table, where, src, set, comma, k, swhere, andbit, _k, v, valString, asrc, p, job, qs, status, c;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n data = payload.data, table = payload.table, where = payload.where;\n src = \"proc sql; update \".concat(table.libref, \".\").concat(table.name);\n set = 'SET ';\n comma = ' ';\n for (k in data) {\n set = set + comma + k + '=' + value2String(data[k]);\n comma = ', ';\n }\n src = src + ' ' + set;\n swhere = ' WHERE ';\n andbit = ' ';\n if (typeof where === 'string') {\n swhere = swhere + where;\n } else {\n for (_k in where) {\n v = where[_k];\n valString = value2String(v);\n swhere = swhere + andbit + _k + \"= \".concat(valString, \" \");\n andbit = ' AND ';\n }\n }\n src = src + ' ' + swhere + ';run;';\n asrc = src.split(/\\r?\\n/);\n p = {\n data: {\n code: asrc\n }\n };\n _context.next = 14;\n return store.apiCall(session.links('execute'), p);\n case 14:\n job = _context.sent;\n qs = {\n qs: {\n newState: 'Completed',\n timeout: 1\n }\n }; // eslint-disable-next-line no-unused-vars\n _context.next = 18;\n return store.jobState(job, qs);\n case 18:\n status = _context.sent;\n c = status.data === 'completed' ? 0 : 1;\n return _context.abrupt(\"return\", {\n statusCode: c,\n msg: status.data\n });\n case 21:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeUpdateData.apply(this, arguments);\n}\nfunction value2String(value) {\n var valueString;\n if (value == null) {\n valueString = '.';\n } else if (typeof value === 'string') {\n valueString = JSON.stringify(value);\n } else {\n valueString = value.toString();\n }\n return valueString;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeUpdateData);\n\n//# sourceURL=webpack://restaflib/./computeUpdateData.js?");
|
|
479
564
|
|
|
480
565
|
/***/ }),
|
|
481
566
|
|
|
@@ -488,7 +573,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
488
573
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
489
574
|
|
|
490
575
|
"use strict";
|
|
491
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n\n\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n/**\r\n * @description upload different artifacts\r\n * @private\r\n * @async\r\n * @module computeUpload\r\n * @param {store} store \r\n * @param {rafobject} session compute session \r\n * @param {computeTable} table - name of table to be created\r\n * @param {object} data - rows of data objects\r\n * @param {object} columns columns\r\n * @returns {promise}\r\n */\nfunction computeUpload(_x, _x2, _x3, _x4, _x5) {\n return _computeUpload.apply(this, arguments);\n}\nfunction _computeUpload() {\n _computeUpload = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
576
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n\n\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n/**\r\n * @description upload different artifacts\r\n * @private\r\n * @async\r\n * @module computeUpload\r\n * @param {store} store \r\n * @param {rafobject} session compute session \r\n * @param {computeTable} table - name of table to be created\r\n * @param {object} data - rows of data objects\r\n * @param {object} columns columns\r\n * @returns {promise}\r\n */\nfunction computeUpload(_x, _x2, _x3, _x4, _x5) {\n return _computeUpload.apply(this, arguments);\n}\nfunction _computeUpload() {\n _computeUpload = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, table, csvArray, columns) {\n var src, l, inx, k, c, x;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n src = \"data \".concat(table.libref, \".\").concat(table.name, \"; INFILE datalines delimiter=',' ;\\n\");\n l = '';\n inx = 'INPUT ';\n for (k in columns) {\n c = columns[k];\n inx = inx + c.Column + ' ';\n if (c.Type === 'CHAR') {\n x = \" \".concat(c.Column, \" $ \").concat(c.length, \" \\n\");\n l = l + ' ' + x;\n }\n }\n if (l.length > 0) {\n l = 'LENGTH ' + l + ';\\n';\n }\n inx = inx + ';\\n';\n src = src + ';\\n' + l + inx + 'datalines;\\n' + csvArray + '\\n; run; proc print;run;\\n';\n _context.next = 9;\n return Object(_computeRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src);\n case 9:\n return _context.abrupt(\"return\", {\n msg: 'done',\n statusCode: 0\n });\n case 10:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _computeUpload.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeUpload);\n\n//# sourceURL=webpack://restaflib/./computeUpload.js?");
|
|
492
577
|
|
|
493
578
|
/***/ }),
|
|
494
579
|
|
|
@@ -501,7 +586,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
501
586
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
502
587
|
|
|
503
588
|
"use strict";
|
|
504
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n/**\r\n * @description Search for a named report(async)\r\n * @async\r\n * @module findReport\r\n * @category restaflib/report\r\n * \r\n * @param {object} store - restaf store\r\n * @param {string} name - name of the VA report (null to get a list of all reports)\r\n * \r\n * @returns {object} - either null or rafObject for the report\r\n */\n\n\nfunction findReport(_x, _x2) {\n return _findReport.apply(this, arguments);\n}\nfunction _findReport() {\n _findReport = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
589
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n/**\r\n * @description Search for a named report(async)\r\n * @async\r\n * @module findReport\r\n * @category restaflib/report\r\n * \r\n * @param {object} store - restaf store\r\n * @param {string} name - name of the VA report (null to get a list of all reports)\r\n * \r\n * @returns {object} - either null or rafObject for the report\r\n */\n\n\nfunction findReport(_x, _x2) {\n return _findReport.apply(this, arguments);\n}\nfunction _findReport() {\n _findReport = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, name) {\n var _yield$store$addServi, reports, payload, reportsList;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return store.addServices('reports');\n case 2:\n _yield$store$addServi = _context.sent;\n reports = _yield$store$addServi.reports;\n console.log(reports);\n payload = null;\n if (name !== null) {\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n }\n // call the reports service\n console.log('-----------', reports.links('reports'));\n _context.next = 10;\n return store.apiCall(reports.links('reports'), payload);\n case 10:\n reportsList = _context.sent;\n return _context.abrupt(\"return\", reportsList.itemsList().size === 0 ? null : reportsList);\n case 12:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _findReport.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (findReport);\n\n//# sourceURL=webpack://restaflib/./findReport.js?");
|
|
505
590
|
|
|
506
591
|
/***/ }),
|
|
507
592
|
|
|
@@ -514,7 +599,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
514
599
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
515
600
|
|
|
516
601
|
"use strict";
|
|
517
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _findReport__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./findReport */ \"./findReport.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n/**\r\n * @description Return the svg of the specified report(async)\r\n * \r\n * @module getReportImage\r\n * @category restaflib/report\r\n * @param {object} store - restaf store\r\n * @param {string} name - name of the report\r\n * \r\n * @returns {string} - the svg of the report\r\n * \r\n */\n\n\n\nfunction getReportImage(_x, _x2) {\n return _getReportImage.apply(this, arguments);\n}\nfunction _getReportImage() {\n _getReportImage = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
602
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _findReport__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./findReport */ \"./findReport.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n/**\r\n * @description Return the svg of the specified report(async)\r\n * \r\n * @module getReportImage\r\n * @category restaflib/report\r\n * @param {object} store - restaf store\r\n * @param {string} name - name of the report\r\n * \r\n * @returns {string} - the svg of the report\r\n * \r\n */\n\n\n\nfunction getReportImage(_x, _x2) {\n return _getReportImage.apply(this, arguments);\n}\nfunction _getReportImage() {\n _getReportImage = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, name) {\n var reportImages, reportsList, uri, data, p, job, status, image;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n reportImages = store.rafObject('reportImages');\n _context.next = 3;\n return Object(_findReport__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, name);\n case 3:\n reportsList = _context.sent;\n if (!(reportsList === null)) {\n _context.next = 6;\n break;\n }\n return _context.abrupt(\"return\", \"\".concat(name, \" was not found\"));\n case 6:\n uri = reportsList.itemsCmd(reportsList.itemsList(0), 'self', 'link', 'uri');\n data = {\n reportUri: uri,\n sectionIndex: 0,\n layoutType: 'entireSection',\n size: \"400x400\"\n };\n p = {\n data: data\n };\n _context.next = 11;\n return store.apiCall(reportImages.links('createJob'), p);\n case 11:\n job = _context.sent;\n _context.next = 14;\n return store.jobState(job, {\n qs: {\n wait: 1.5\n }\n }, 10, 2);\n case 14:\n status = _context.sent;\n if (!(status.data !== 'completed')) {\n _context.next = 17;\n break;\n }\n return _context.abrupt(\"return\", \"Job failed \".concat(status.data));\n case 17:\n _context.next = 19;\n return store.apiCall(status.job.itemsCmd(status.job.itemsList(0), 'image'));\n case 19:\n image = _context.sent;\n return _context.abrupt(\"return\", image.items());\n case 21:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _getReportImage.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (getReportImage);\n\n//# sourceURL=webpack://restaflib/./getReportImage.js?");
|
|
518
603
|
|
|
519
604
|
/***/ }),
|
|
520
605
|
|
|
@@ -527,7 +612,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
527
612
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
528
613
|
|
|
529
614
|
"use strict";
|
|
530
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _findReport__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./findReport */ \"./findReport.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n/**\r\n * @description Generate url for report(async)\r\n * @module getReportUri\r\n * @category restaflib/report\r\n * \r\n * @param {object} store - restaf store\r\n * @param {string} name - name of report\r\n * \r\n * @returns {promise} array of report's of the form {name: name, uri: uri} for the report(s)\r\n */\n\n\n\nfunction getReportUri(_x, _x2) {\n return _getReportUri.apply(this, arguments);\n}\nfunction _getReportUri() {\n _getReportUri = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
615
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _findReport__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./findReport */ \"./findReport.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n/**\r\n * @description Generate url for report(async)\r\n * @module getReportUri\r\n * @category restaflib/report\r\n * \r\n * @param {object} store - restaf store\r\n * @param {string} name - name of report\r\n * \r\n * @returns {promise} array of report's of the form {name: name, uri: uri} for the report(s)\r\n */\n\n\n\nfunction getReportUri(_x, _x2) {\n return _getReportUri.apply(this, arguments);\n}\nfunction _getReportUri() {\n _getReportUri = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, name) {\n var reportsList, e, result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Object(_findReport__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, name);\n case 2:\n reportsList = _context.sent;\n if (!(reportsList === null)) {\n _context.next = 6;\n break;\n }\n e = name == null ? 'No reports were found' : \"\".concat(name, \" was not found\");\n throw e;\n case 6:\n result = [];\n reportsList.items().map(function (i, n) {\n var uri = {\n name: n,\n uri: reportsList.itemsCmd(n, 'self', 'link', 'uri')\n };\n result.push(uri);\n });\n return _context.abrupt(\"return\", result);\n case 9:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _getReportUri.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (getReportUri);\n\n//# sourceURL=webpack://restaflib/./getReportUri.js?");
|
|
531
616
|
|
|
532
617
|
/***/ }),
|
|
533
618
|
|
|
@@ -540,7 +625,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
540
625
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
541
626
|
|
|
542
627
|
"use strict";
|
|
543
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n//\n// Notes: Retrieve a SAS table and convert to a json\n// convert table to object of the form [{var1: value, var2: value,...},....]\n// ex: [{merlot:10, twobit:20}, {merlot: 20, twobit:30}]\n\n\n\n/**\r\n * @description Convert table to object of the form [{var1: value, var2: value,...},....](async)\r\n * @async\r\n * @private\r\n * @module getSASTableRows\r\n * @category restaflib/compute\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} computeSummary - computeSummary\r\n * @param {string} tableName - name of the table\r\n * \r\n * @returns {promise} - get retrieved rows [{var1:value, var2:...}]\r\n */\n\n\nfunction getSasTableRows(_x, _x2, _x3) {\n return _getSasTableRows.apply(this, arguments);\n}\nfunction _getSasTableRows() {\n _getSasTableRows = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
628
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n//\n// Notes: Retrieve a SAS table and convert to a json\n// convert table to object of the form [{var1: value, var2: value,...},....]\n// ex: [{merlot:10, twobit:20}, {merlot: 20, twobit:30}]\n\n\n\n/**\r\n * @description Convert table to object of the form [{var1: value, var2: value,...},....](async)\r\n * @async\r\n * @private\r\n * @module getSASTableRows\r\n * @category restaflib/compute\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} computeSummary - computeSummary\r\n * @param {string} tableName - name of the table\r\n * \r\n * @returns {promise} - get retrieved rows [{var1:value, var2:...}]\r\n */\n\n\nfunction getSasTableRows(_x, _x2, _x3) {\n return _getSasTableRows.apply(this, arguments);\n}\nfunction _getSasTableRows() {\n _getSasTableRows = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(store, computeSummary, tableName) {\n var tableSelf, t1, table, columns, rows, result, count, _loop, i;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n tableSelf = computeSummary.tables[tableName];\n _context2.next = 3;\n return store.apiCall(tableSelf);\n case 3:\n t1 = _context2.sent;\n _context2.next = 6;\n return store.apiCall(t1.links('rowSet'));\n case 6:\n table = _context2.sent;\n columns = table.items('columns');\n rows = table.items('rows');\n result = [];\n count = rows.size;\n _loop = /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee() {\n var row, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n row = rows.get(i);\n r = {};\n columns.map(function (c, i) {\n var varx = c.toLowerCase();\n r[varx] = row.get(i);\n });\n result.push(r);\n case 4:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n });\n i = 0;\n case 13:\n if (!(i < count)) {\n _context2.next = 18;\n break;\n }\n return _context2.delegateYield(_loop(), \"t0\", 15);\n case 15:\n i++;\n _context2.next = 13;\n break;\n case 18:\n return _context2.abrupt(\"return\", result);\n case 19:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _getSasTableRows.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (getSasTableRows);\n\n//# sourceURL=webpack://restaflib/./getSasTableRows.js?");
|
|
544
629
|
|
|
545
630
|
/***/ }),
|
|
546
631
|
|
|
@@ -553,7 +638,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
553
638
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
554
639
|
|
|
555
640
|
"use strict";
|
|
556
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _sassoftware_restaflib_src_masAddModel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @sassoftware/restaflib/src/masAddModel */ \"./masAddModel.js\");\n\n\n\n\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n/**\r\n * @private\r\n * @module getScoreStep\r\n * @category restaflib/mas\r\n * @param {*} store \r\n * @param {*} microanalyticScore \r\n * @param {*} name \r\n * @returns {promise}\r\n */\nfunction getScoreStep(_x, _x2, _x3) {\n return _getScoreStep.apply(this, arguments);\n}\nfunction _getScoreStep() {\n _getScoreStep = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
641
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _sassoftware_restaflib_src_masAddModel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @sassoftware/restaflib/src/masAddModel */ \"./masAddModel.js\");\n\n\n\n\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n/**\r\n * @private\r\n * @module getScoreStep\r\n * @category restaflib/mas\r\n * @param {*} store \r\n * @param {*} microanalyticScore \r\n * @param {*} name \r\n * @returns {promise}\r\n */\nfunction getScoreStep(_x, _x2, _x3) {\n return _getScoreStep.apply(this, arguments);\n}\nfunction _getScoreStep() {\n _getScoreStep = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, microanalyticScore, name) {\n var payload, modList, rafLink, allSteps, control;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(name.trim(), \"')\")\n }\n };\n _context.next = 3;\n return store.apiCall(microanalyticScore.links('modules'), payload);\n case 3:\n modList = _context.sent;\n if (!(modList.itemsList().size === 0)) {\n _context.next = 6;\n break;\n }\n return _context.abrupt(\"return\", null);\n case 6:\n rafLink = modList.itemsCmd(name, 'steps');\n _context.next = 9;\n return store.apiCall(rafLink);\n case 9:\n allSteps = _context.sent;\n control = {\n name: name,\n stepsRafLink: allSteps,\n stepIds: modList.items(name, 'data', 'stepIds').toJS(),\n microanalyticScore: microanalyticScore\n };\n return _context.abrupt(\"return\", control);\n case 12:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _getScoreStep.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (getScoreStep);\n\n//# sourceURL=webpack://restaflib/./getScoreStep.js?");
|
|
557
642
|
|
|
558
643
|
/***/ }),
|
|
559
644
|
|
|
@@ -561,12 +646,12 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
561
646
|
/*!******************!*\
|
|
562
647
|
!*** ./index.js ***!
|
|
563
648
|
\******************/
|
|
564
|
-
/*! exports provided: caslRun, caslRunBase, casSetup, casActionRun, casTableToJson, casFetchData, casFetchRows, casAppendTable, casUpdateData, casSaveTable, casLoadTable, computeRun, computeSetup, computeSummary, computeSetupTables, computeFetchData, computeFileContent, computeResults, computeAppendTable, computeUpdateData, computeUpload, findReport, getReportImage, getReportUri, getSasTableRows, jesSetup, jesRun, jesSummary, jsonToDict, caslScore, caslDescribe, masSetup, masAddModel, masDescribe, masRun, masScore, lib */
|
|
649
|
+
/*! exports provided: caslRun, caslRunBase, casSetup, casActionRun, casTableToJson, casFetchData, casFetchRows, casAppendTable, casUpdateData, casUpload, casSaveTable, casLoadTable, computeRun, computeSetup, computeSummary, computeSetupTables, computeFetchData, computeFileContent, computeResults, computeAppendTable, computeUpdateData, computeUpload, findReport, getReportImage, getReportUri, getSasTableRows, jesSetup, jesRun, jesSummary, jsonToDict, caslScore, caslDescribe, masSetup, masAddModel, masDescribe, masRun, masScore, lib */
|
|
565
650
|
/*! all exports used */
|
|
566
651
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
567
652
|
|
|
568
653
|
"use strict";
|
|
569
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lib\", function() { return lib; });\n/* harmony import */ var _caslRun__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./caslRun */ \"./caslRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"caslRun\", function() { return _caslRun__WEBPACK_IMPORTED_MODULE_0__[\"a\"]; });\n\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"caslRunBase\", function() { return _caslRunBase__WEBPACK_IMPORTED_MODULE_1__[\"a\"]; });\n\n/* harmony import */ var _caslScore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslScore */ \"./caslScore.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"caslScore\", function() { return _caslScore__WEBPACK_IMPORTED_MODULE_2__[\"a\"]; });\n\n/* harmony import */ var _caslDescribe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslDescribe */ \"./caslDescribe.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"caslDescribe\", function() { return _caslDescribe__WEBPACK_IMPORTED_MODULE_3__[\"a\"]; });\n\n/* harmony import */ var _casSetup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./casSetup */ \"./casSetup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casSetup\", function() { return _casSetup__WEBPACK_IMPORTED_MODULE_4__[\"a\"]; });\n\n/* harmony import */ var _casActionRun__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./casActionRun */ \"./casActionRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casActionRun\", function() { return _casActionRun__WEBPACK_IMPORTED_MODULE_5__[\"a\"]; });\n\n/* harmony import */ var _casFetchData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./casFetchData */ \"./casFetchData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casFetchData\", function() { return _casFetchData__WEBPACK_IMPORTED_MODULE_6__[\"a\"]; });\n\n/* harmony import */ var _casFetchRows__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./casFetchRows */ \"./casFetchRows.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casFetchRows\", function() { return _casFetchRows__WEBPACK_IMPORTED_MODULE_7__[\"a\"]; });\n\n/* harmony import */ var _casUpdateData__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./casUpdateData */ \"./casUpdateData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casUpdateData\", function() { return _casUpdateData__WEBPACK_IMPORTED_MODULE_8__[\"a\"]; });\n\n/* harmony import */ var _casAppendTable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./casAppendTable */ \"./casAppendTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casAppendTable\", function() { return _casAppendTable__WEBPACK_IMPORTED_MODULE_9__[\"a\"]; });\n\n/* harmony import */ var _casTableToJson__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./casTableToJson */ \"./casTableToJson.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casTableToJson\", function() { return _casTableToJson__WEBPACK_IMPORTED_MODULE_10__[\"a\"]; });\n\n/* harmony import */ var _casSaveTable__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./casSaveTable */ \"./casSaveTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casSaveTable\", function() { return _casSaveTable__WEBPACK_IMPORTED_MODULE_11__[\"a\"]; });\n\n/* harmony import */ var _casLoadTable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./casLoadTable */ \"./casLoadTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casLoadTable\", function() { return _casLoadTable__WEBPACK_IMPORTED_MODULE_12__[\"a\"]; });\n\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeRun\", function() { return _computeRun__WEBPACK_IMPORTED_MODULE_13__[\"a\"]; });\n\n/* harmony import */ var _computeSetup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./computeSetup */ \"./computeSetup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeSetup\", function() { return _computeSetup__WEBPACK_IMPORTED_MODULE_14__[\"a\"]; });\n\n/* harmony import */ var _computeSummary__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeSummary\", function() { return _computeSummary__WEBPACK_IMPORTED_MODULE_15__[\"a\"]; });\n\n/* harmony import */ var _computeSetupTables__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./computeSetupTables */ \"./computeSetupTables.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeSetupTables\", function() { return _computeSetupTables__WEBPACK_IMPORTED_MODULE_16__[\"a\"]; });\n\n/* harmony import */ var _computeResults__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./computeResults */ \"./computeResults.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeResults\", function() { return _computeResults__WEBPACK_IMPORTED_MODULE_17__[\"a\"]; });\n\n/* harmony import */ var _computeFetchData__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./computeFetchData */ \"./computeFetchData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeFetchData\", function() { return _computeFetchData__WEBPACK_IMPORTED_MODULE_18__[\"a\"]; });\n\n/* harmony import */ var _computeFileContent__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./computeFileContent */ \"./computeFileContent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeFileContent\", function() { return _computeFileContent__WEBPACK_IMPORTED_MODULE_19__[\"a\"]; });\n\n/* harmony import */ var _computeAppendTable__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./computeAppendTable */ \"./computeAppendTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeAppendTable\", function() { return _computeAppendTable__WEBPACK_IMPORTED_MODULE_20__[\"a\"]; });\n\n/* harmony import */ var _computeUpdateData__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./computeUpdateData */ \"./computeUpdateData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeUpdateData\", function() { return _computeUpdateData__WEBPACK_IMPORTED_MODULE_21__[\"a\"]; });\n\n/* harmony import */ var _computeUpload__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./computeUpload */ \"./computeUpload.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeUpload\", function() { return _computeUpload__WEBPACK_IMPORTED_MODULE_22__[\"a\"]; });\n\n/* harmony import */ var _findReport__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./findReport */ \"./findReport.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"findReport\", function() { return _findReport__WEBPACK_IMPORTED_MODULE_23__[\"a\"]; });\n\n/* harmony import */ var _getReportImage__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./getReportImage */ \"./getReportImage.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getReportImage\", function() { return _getReportImage__WEBPACK_IMPORTED_MODULE_24__[\"a\"]; });\n\n/* harmony import */ var _getReportUri__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./getReportUri */ \"./getReportUri.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getReportUri\", function() { return _getReportUri__WEBPACK_IMPORTED_MODULE_25__[\"a\"]; });\n\n/* harmony import */ var _getSasTableRows__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./getSasTableRows */ \"./getSasTableRows.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getSasTableRows\", function() { return _getSasTableRows__WEBPACK_IMPORTED_MODULE_26__[\"a\"]; });\n\n/* harmony import */ var _jesSetup__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./jesSetup */ \"./jesSetup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jesSetup\", function() { return _jesSetup__WEBPACK_IMPORTED_MODULE_27__[\"a\"]; });\n\n/* harmony import */ var _jesRun__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./jesRun */ \"./jesRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jesRun\", function() { return _jesRun__WEBPACK_IMPORTED_MODULE_28__[\"a\"]; });\n\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jesSummary\", function() { return _jesSummary__WEBPACK_IMPORTED_MODULE_29__[\"a\"]; });\n\n/* harmony import */ var _jsonToDict__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./jsonToDict */ \"./jsonToDict.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jsonToDict\", function() { return _jsonToDict__WEBPACK_IMPORTED_MODULE_30__[\"a\"]; });\n\n/* harmony import */ var _masSetup__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./masSetup */ \"./masSetup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masSetup\", function() { return _masSetup__WEBPACK_IMPORTED_MODULE_31__[\"a\"]; });\n\n/* harmony import */ var _masDescribe__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./masDescribe */ \"./masDescribe.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masDescribe\", function() { return _masDescribe__WEBPACK_IMPORTED_MODULE_32__[\"a\"]; });\n\n/* harmony import */ var _masRun__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./masRun */ \"./masRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masRun\", function() { return _masRun__WEBPACK_IMPORTED_MODULE_33__[\"a\"]; });\n\n/* harmony import */ var _masScore__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./masScore */ \"./masScore.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masScore\", function() { return _masScore__WEBPACK_IMPORTED_MODULE_34__[\"a\"]; });\n\n/* harmony import */ var _masAddModel__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./masAddModel */ \"./masAddModel.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masAddModel\", function() { return _masAddModel__WEBPACK_IMPORTED_MODULE_35__[\"a\"]; });\n\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./lib */ \"./lib.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n\n\n\n\n\n\n//import casUpload from './casUpload';\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//import print from './print';\n\n//import uploadData from './uploadData';\n\n\nvar lib = Object(_lib__WEBPACK_IMPORTED_MODULE_36__[/* default */ \"a\"])();\n\n\n//# sourceURL=webpack://restaflib/./index.js?");
|
|
654
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lib\", function() { return lib; });\n/* harmony import */ var _caslRun__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./caslRun */ \"./caslRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"caslRun\", function() { return _caslRun__WEBPACK_IMPORTED_MODULE_0__[\"a\"]; });\n\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"caslRunBase\", function() { return _caslRunBase__WEBPACK_IMPORTED_MODULE_1__[\"a\"]; });\n\n/* harmony import */ var _caslScore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslScore */ \"./caslScore.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"caslScore\", function() { return _caslScore__WEBPACK_IMPORTED_MODULE_2__[\"a\"]; });\n\n/* harmony import */ var _caslDescribe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslDescribe */ \"./caslDescribe.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"caslDescribe\", function() { return _caslDescribe__WEBPACK_IMPORTED_MODULE_3__[\"a\"]; });\n\n/* harmony import */ var _casSetup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./casSetup */ \"./casSetup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casSetup\", function() { return _casSetup__WEBPACK_IMPORTED_MODULE_4__[\"a\"]; });\n\n/* harmony import */ var _casActionRun__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./casActionRun */ \"./casActionRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casActionRun\", function() { return _casActionRun__WEBPACK_IMPORTED_MODULE_5__[\"a\"]; });\n\n/* harmony import */ var _casFetchData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./casFetchData */ \"./casFetchData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casFetchData\", function() { return _casFetchData__WEBPACK_IMPORTED_MODULE_6__[\"a\"]; });\n\n/* harmony import */ var _casFetchRows__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./casFetchRows */ \"./casFetchRows.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casFetchRows\", function() { return _casFetchRows__WEBPACK_IMPORTED_MODULE_7__[\"a\"]; });\n\n/* harmony import */ var _casUpdateData__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./casUpdateData */ \"./casUpdateData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casUpdateData\", function() { return _casUpdateData__WEBPACK_IMPORTED_MODULE_8__[\"a\"]; });\n\n/* harmony import */ var _casAppendTable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./casAppendTable */ \"./casAppendTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casAppendTable\", function() { return _casAppendTable__WEBPACK_IMPORTED_MODULE_9__[\"a\"]; });\n\n/* harmony import */ var _casTableToJson__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./casTableToJson */ \"./casTableToJson.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casTableToJson\", function() { return _casTableToJson__WEBPACK_IMPORTED_MODULE_10__[\"a\"]; });\n\n/* harmony import */ var _casUpload__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./casUpload */ \"./casUpload.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casUpload\", function() { return _casUpload__WEBPACK_IMPORTED_MODULE_11__[\"a\"]; });\n\n/* harmony import */ var _casSaveTable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./casSaveTable */ \"./casSaveTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casSaveTable\", function() { return _casSaveTable__WEBPACK_IMPORTED_MODULE_12__[\"a\"]; });\n\n/* harmony import */ var _casLoadTable__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./casLoadTable */ \"./casLoadTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"casLoadTable\", function() { return _casLoadTable__WEBPACK_IMPORTED_MODULE_13__[\"a\"]; });\n\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeRun\", function() { return _computeRun__WEBPACK_IMPORTED_MODULE_14__[\"a\"]; });\n\n/* harmony import */ var _computeSetup__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./computeSetup */ \"./computeSetup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeSetup\", function() { return _computeSetup__WEBPACK_IMPORTED_MODULE_15__[\"a\"]; });\n\n/* harmony import */ var _computeSummary__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeSummary\", function() { return _computeSummary__WEBPACK_IMPORTED_MODULE_16__[\"a\"]; });\n\n/* harmony import */ var _computeSetupTables__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./computeSetupTables */ \"./computeSetupTables.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeSetupTables\", function() { return _computeSetupTables__WEBPACK_IMPORTED_MODULE_17__[\"a\"]; });\n\n/* harmony import */ var _computeResults__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./computeResults */ \"./computeResults.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeResults\", function() { return _computeResults__WEBPACK_IMPORTED_MODULE_18__[\"a\"]; });\n\n/* harmony import */ var _computeFetchData__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./computeFetchData */ \"./computeFetchData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeFetchData\", function() { return _computeFetchData__WEBPACK_IMPORTED_MODULE_19__[\"a\"]; });\n\n/* harmony import */ var _computeFileContent__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./computeFileContent */ \"./computeFileContent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeFileContent\", function() { return _computeFileContent__WEBPACK_IMPORTED_MODULE_20__[\"a\"]; });\n\n/* harmony import */ var _computeAppendTable__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./computeAppendTable */ \"./computeAppendTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeAppendTable\", function() { return _computeAppendTable__WEBPACK_IMPORTED_MODULE_21__[\"a\"]; });\n\n/* harmony import */ var _computeUpdateData__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./computeUpdateData */ \"./computeUpdateData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeUpdateData\", function() { return _computeUpdateData__WEBPACK_IMPORTED_MODULE_22__[\"a\"]; });\n\n/* harmony import */ var _computeUpload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./computeUpload */ \"./computeUpload.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"computeUpload\", function() { return _computeUpload__WEBPACK_IMPORTED_MODULE_23__[\"a\"]; });\n\n/* harmony import */ var _findReport__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./findReport */ \"./findReport.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"findReport\", function() { return _findReport__WEBPACK_IMPORTED_MODULE_24__[\"a\"]; });\n\n/* harmony import */ var _getReportImage__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./getReportImage */ \"./getReportImage.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getReportImage\", function() { return _getReportImage__WEBPACK_IMPORTED_MODULE_25__[\"a\"]; });\n\n/* harmony import */ var _getReportUri__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./getReportUri */ \"./getReportUri.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getReportUri\", function() { return _getReportUri__WEBPACK_IMPORTED_MODULE_26__[\"a\"]; });\n\n/* harmony import */ var _getSasTableRows__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./getSasTableRows */ \"./getSasTableRows.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getSasTableRows\", function() { return _getSasTableRows__WEBPACK_IMPORTED_MODULE_27__[\"a\"]; });\n\n/* harmony import */ var _jesSetup__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./jesSetup */ \"./jesSetup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jesSetup\", function() { return _jesSetup__WEBPACK_IMPORTED_MODULE_28__[\"a\"]; });\n\n/* harmony import */ var _jesRun__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./jesRun */ \"./jesRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jesRun\", function() { return _jesRun__WEBPACK_IMPORTED_MODULE_29__[\"a\"]; });\n\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jesSummary\", function() { return _jesSummary__WEBPACK_IMPORTED_MODULE_30__[\"a\"]; });\n\n/* harmony import */ var _jsonToDict__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./jsonToDict */ \"./jsonToDict.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jsonToDict\", function() { return _jsonToDict__WEBPACK_IMPORTED_MODULE_31__[\"a\"]; });\n\n/* harmony import */ var _masSetup__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./masSetup */ \"./masSetup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masSetup\", function() { return _masSetup__WEBPACK_IMPORTED_MODULE_32__[\"a\"]; });\n\n/* harmony import */ var _masDescribe__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./masDescribe */ \"./masDescribe.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masDescribe\", function() { return _masDescribe__WEBPACK_IMPORTED_MODULE_33__[\"a\"]; });\n\n/* harmony import */ var _masRun__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./masRun */ \"./masRun.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masRun\", function() { return _masRun__WEBPACK_IMPORTED_MODULE_34__[\"a\"]; });\n\n/* harmony import */ var _masScore__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./masScore */ \"./masScore.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masScore\", function() { return _masScore__WEBPACK_IMPORTED_MODULE_35__[\"a\"]; });\n\n/* harmony import */ var _masAddModel__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./masAddModel */ \"./masAddModel.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"masAddModel\", function() { return _masAddModel__WEBPACK_IMPORTED_MODULE_36__[\"a\"]; });\n\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./lib */ \"./lib.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//import print from './print';\n\n//import uploadData from './uploadData';\n\n\nvar lib = Object(_lib__WEBPACK_IMPORTED_MODULE_37__[/* default */ \"a\"])();\n\n\n//# sourceURL=webpack://restaflib/./index.js?");
|
|
570
655
|
|
|
571
656
|
/***/ }),
|
|
572
657
|
|
|
@@ -579,7 +664,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
579
664
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
580
665
|
|
|
581
666
|
"use strict";
|
|
582
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jesRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jesRunBase */ \"./jesRunBase.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n/**\r\n * @description Prepare data for runCompute(@async)\r\n * @private\r\n * @module spBase\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} args - args from graphql server(enhanced)\r\n * @param {string} src - code to execute\r\n * \r\n * @returns {object} computeSummary object\r\n * \r\n */\nfunction jesRun(_x, _x2, _x3, _x4, _x5) {\n return _jesRun.apply(this, arguments);\n}\nfunction _jesRun() {\n _jesRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
667
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jesRunBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jesRunBase */ \"./jesRunBase.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n/**\r\n * @description Prepare data for runCompute(@async)\r\n * @private\r\n * @module spBase\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} args - args from graphql server(enhanced)\r\n * @param {string} src - code to execute\r\n * \r\n * @returns {object} computeSummary object\r\n * \r\n */\nfunction jesRun(_x, _x2, _x3, _x4, _x5) {\n return _jesRun.apply(this, arguments);\n}\nfunction _jesRun() {\n _jesRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, jes, src, jobDefinitionName, args) {\n var jobRequest, jobDefinition, payload, jobResult;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n // generate macro variables\n jobRequest = {}; //jobRequest.type = 'Compute';\n jobDefinition = {};\n if (!(jobDefinitionName !== null)) {\n _context.next = 6;\n break;\n }\n _context.next = 5;\n return jobDefUri(store, jobDefinitionName);\n case 5:\n jobRequest.jobDefinitionUri = _context.sent;\n case 6:\n // Concat macro to code\n if (src != -null) {\n jobDefinition.code = src; /*src.split(/\\r?\\n/);*/\n }\n jobDefinition.type = 'Compute';\n /*\r\n if (args !== null) {\r\n let props = [];\r\n for (let r in args) {\r\n let item = { name: r, value: args[r] };\r\n props.push(item);\r\n }\r\n jobDefinition.properties = props;\r\n }\r\n */\n jobRequest.arguments = args;\n jobRequest.jobDefinition = jobDefinition;\n payload = {\n data: jobRequest\n }; // run code and get results\n _context.next = 13;\n return Object(_jesRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, jes, payload);\n case 13:\n jobResult = _context.sent;\n return _context.abrupt(\"return\", jobResult);\n case 15:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesRun.apply(this, arguments);\n}\nfunction jobDefUri(_x6, _x7) {\n return _jobDefUri.apply(this, arguments);\n}\nfunction _jobDefUri() {\n _jobDefUri = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(store, name) {\n var jobDef, uri, payload, jdefList;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n jobDef = store.getService('jobDefinitions');\n uri = null;\n payload = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n _context2.next = 5;\n return Object(_jesRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, payload);\n case 5:\n jdefList = _context2.sent;\n if (!(jdefList.itemsList().size === 0)) {\n _context2.next = 10;\n break;\n }\n throw \"Error: \".concat(name, \" not found in the system\");\n case 10:\n uri = jdefList.itemsCmd(name, 'self', 'link', 'uri');\n case 11:\n return _context2.abrupt(\"return\", uri);\n case 12:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _jobDefUri.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (jesRun);\n\n//# sourceURL=webpack://restaflib/./jesRun.js?");
|
|
583
668
|
|
|
584
669
|
/***/ }),
|
|
585
670
|
|
|
@@ -592,7 +677,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
592
677
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
593
678
|
|
|
594
679
|
"use strict";
|
|
595
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n//\n// Notes: Run compute service \n//\n/** \r\n * @description Reduce compute service to an consummable form(async)\r\n * @private\r\n * @module jesRunBase\r\n * \r\n * @param {object} sore - restaf store\r\n * @param {code} code - SAS code to be executed\r\n * \r\n * @returns {object} rafobject of the results from a sas compute job\r\n * \r\n */\nfunction jesRunBase(_x, _x2, _x3) {\n return _jesRunBase.apply(this, arguments);\n}\nfunction _jesRunBase() {\n _jesRunBase = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
680
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n//\n// Notes: Run compute service \n//\n/** \r\n * @description Reduce compute service to an consummable form(async)\r\n * @private\r\n * @module jesRunBase\r\n * \r\n * @param {object} sore - restaf store\r\n * @param {code} code - SAS code to be executed\r\n * \r\n * @returns {object} rafobject of the results from a sas compute job\r\n * \r\n */\nfunction jesRunBase(_x, _x2, _x3) {\n return _jesRunBase.apply(this, arguments);\n}\nfunction _jesRunBase() {\n _jesRunBase = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, jes, payload) {\n var job, status, results;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return store.apiCall(jes.links('create'), payload);\n case 2:\n job = _context.sent;\n _context.next = 5;\n return store.jobState(job, null, 5, 2);\n case 5:\n status = _context.sent;\n if (!(status.data === 'running')) {\n _context.next = 10;\n break;\n }\n throw \"ERROR: Job did not complete in allotted time\";\n case 10:\n if (!(status.data === 'failed')) {\n _context.next = 14;\n break;\n }\n throw JSON.stringify(status);\n case 14:\n _context.next = 16;\n return Object(_jesSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, status.job);\n case 16:\n results = _context.sent;\n return _context.abrupt(\"return\", results);\n case 18:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesRunBase.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (jesRunBase);\n\n//# sourceURL=webpack://restaflib/./jesRunBase.js?");
|
|
596
681
|
|
|
597
682
|
/***/ }),
|
|
598
683
|
|
|
@@ -605,7 +690,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
605
690
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
606
691
|
|
|
607
692
|
"use strict";
|
|
608
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n/**\r\n * @description Setup access to compute service\r\n * @async\r\n * @module jesSetup\r\n * @private\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} payload - logon payload - If null assumes that logon was done earlier.\r\n * \r\n * @returns {object} - returns a jobExecution raf object\r\n */\n\n\nfunction jesSetup(_x, _x2) {\n return _jesSetup.apply(this, arguments);\n}\nfunction _jesSetup() {\n _jesSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
693
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n/**\r\n * @description Setup access to compute service\r\n * @async\r\n * @module jesSetup\r\n * @private\r\n * \r\n * @param {object} store - restaf store\r\n * @param {object} payload - logon payload - If null assumes that logon was done earlier.\r\n * \r\n * @returns {object} - returns a jobExecution raf object\r\n */\n\n\nfunction jesSetup(_x, _x2) {\n return _jesSetup.apply(this, arguments);\n}\nfunction _jesSetup() {\n _jesSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, payload) {\n var services;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(payload != null)) {\n _context.next = 3;\n break;\n }\n _context.next = 3;\n return store.logon(payload);\n case 3:\n _context.next = 5;\n return store.addServices('jobExecution', 'compute', 'jobDefinitions');\n case 5:\n services = _context.sent;\n return _context.abrupt(\"return\", services.jobExecution);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesSetup.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (jesSetup);\n\n//# sourceURL=webpack://restaflib/./jesSetup.js?");
|
|
609
694
|
|
|
610
695
|
/***/ }),
|
|
611
696
|
|
|
@@ -618,7 +703,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
618
703
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
619
704
|
|
|
620
705
|
"use strict";
|
|
621
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n/**\r\n * @description Reduce the job information into consummable form(async)\r\n * \r\n * @async\r\n * @module jesSummary\r\n * @category restaflib/jes\r\n * @private\r\n * @param {object} store - restaf store\r\n * @param {object} job - rafObject representing the compute service job\r\n * \r\n * @returns {object} - the computeSummary object for easy handling of logs,listing,ods, tables\r\n */\nfunction jesSummary(_x, _x2) {\n return _jesSummary.apply(this, arguments);\n}\nfunction _jesSummary() {\n _jesSummary = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
706
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\n/**\r\n * @description Reduce the job information into consummable form(async)\r\n * \r\n * @async\r\n * @module jesSummary\r\n * @category restaflib/jes\r\n * @private\r\n * @param {object} store - restaf store\r\n * @param {object} job - rafObject representing the compute service job\r\n * \r\n * @returns {object} - the computeSummary object for easy handling of logs,listing,ods, tables\r\n */\nfunction jesSummary(_x, _x2) {\n return _jesSummary.apply(this, arguments);\n}\nfunction _jesSummary() {\n _jesSummary = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, job) {\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n return _context.abrupt(\"return\", job);\n case 1:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _jesSummary.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (jesSummary);\n\n//# sourceURL=webpack://restaflib/./jesSummary.js?");
|
|
622
707
|
|
|
623
708
|
/***/ }),
|
|
624
709
|
|
|
@@ -644,7 +729,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_M
|
|
|
644
729
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
645
730
|
|
|
646
731
|
"use strict";
|
|
647
|
-
eval("/* harmony import */ var _caslRun__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./caslRun */ \"./caslRun.js\");\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _caslScore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslScore */ \"./caslScore.js\");\n/* harmony import */ var _caslDescribe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslDescribe */ \"./caslDescribe.js\");\n/* harmony import */ var _casSetup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./casSetup */ \"./casSetup.js\");\n/* harmony import */ var _casActionRun__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./casActionRun */ \"./casActionRun.js\");\n/* harmony import */ var _casFetchData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./casFetchData */ \"./casFetchData.js\");\n/* harmony import */ var _casUpdateData__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./casUpdateData */ \"./casUpdateData.js\");\n/* harmony import */ var _casTableToJson__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./casTableToJson */ \"./casTableToJson.js\");\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/* harmony import */ var _computeSetup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./computeSetup */ \"./computeSetup.js\");\n/* harmony import */ var _computeSummary__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/* harmony import */ var _computeResults__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./computeResults */ \"./computeResults.js\");\n/* harmony import */ var _computeFetchData__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./computeFetchData */ \"./computeFetchData.js\");\n/* harmony import */ var _computeFileContent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./computeFileContent */ \"./computeFileContent.js\");\n/* harmony import */ var _findReport__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./findReport */ \"./findReport.js\");\n/* harmony import */ var _getReportImage__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./getReportImage */ \"./getReportImage.js\");\n/* harmony import */ var _getReportUri__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./getReportUri */ \"./getReportUri.js\");\n/* harmony import */ var _getSasTableRows__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./getSasTableRows */ \"./getSasTableRows.js\");\n/* harmony import */ var _jesSetup__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./jesSetup */ \"./jesSetup.js\");\n/* harmony import */ var _jesRun__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./jesRun */ \"./jesRun.js\");\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/* harmony import */ var _jsonToDict__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./jsonToDict */ \"./jsonToDict.js\");\n/* harmony import */ var _masSetup__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./masSetup */ \"./masSetup.js\");\n/* harmony import */ var _masDescribe__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./masDescribe */ \"./masDescribe.js\");\n/* harmony import */ var _masRun__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./masRun */ \"./masRun.js\");\n/* harmony import */ var _masAddModel__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./masAddModel */ \"./masAddModel.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//import casUpload from './casUpload';\n//import uploadData from './uploadData';\n\nfunction lib() {\n return {\n caslRun: _caslRun__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"],\n caslRunBase: _caslRunBase__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"],\n casSetup: _casSetup__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"],\n casActionRun: _casActionRun__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"],\n // casTableToJson,\n casFetchData: _casFetchData__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"],\n casUpdateData: _casUpdateData__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"],\n computeRun: _computeRun__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"],\n computeSetup: _computeSetup__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"],\n computeSummary: _computeSummary__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"],\n computeFetchData: _computeFetchData__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"],\n computeFileContent: _computeFileContent__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"],\n computeResults: _computeResults__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"],\n findReport: _findReport__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"],\n getReportImage: _getReportImage__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"],\n getReportUri: _getReportUri__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"],\n getSASTableRows: _getSasTableRows__WEBPACK_IMPORTED_MODULE_18__[/* default */ \"a\"],\n jesSetup: _jesSetup__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"],\n jesRun: _jesRun__WEBPACK_IMPORTED_MODULE_20__[/* default */ \"a\"],\n jesSummary: _jesSummary__WEBPACK_IMPORTED_MODULE_21__[/* default */ \"a\"],\n jsonToDict: _jsonToDict__WEBPACK_IMPORTED_MODULE_22__[/* default */ \"a\"],\n casTableToJson: _casTableToJson__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"],\n caslScore: _caslScore__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"],\n caslDescribe: _caslDescribe__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"],\n masSetup: _masSetup__WEBPACK_IMPORTED_MODULE_23__[/* default */ \"a\"],\n masAddModel: _masAddModel__WEBPACK_IMPORTED_MODULE_26__[/* default */ \"a\"],\n masDescribe: _masDescribe__WEBPACK_IMPORTED_MODULE_24__[/* default */ \"a\"],\n masRun: _masRun__WEBPACK_IMPORTED_MODULE_25__[/* default */ \"a\"]\n\n // casUpload : casUpload,\n // uploadData: uploadData\n };\n}\n
|
|
732
|
+
eval("/* harmony import */ var _caslRun__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./caslRun */ \"./caslRun.js\");\n/* harmony import */ var _caslRunBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./caslRunBase */ \"./caslRunBase.js\");\n/* harmony import */ var _caslScore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./caslScore */ \"./caslScore.js\");\n/* harmony import */ var _caslDescribe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./caslDescribe */ \"./caslDescribe.js\");\n/* harmony import */ var _casSetup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./casSetup */ \"./casSetup.js\");\n/* harmony import */ var _casActionRun__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./casActionRun */ \"./casActionRun.js\");\n/* harmony import */ var _casFetchData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./casFetchData */ \"./casFetchData.js\");\n/* harmony import */ var _casUpdateData__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./casUpdateData */ \"./casUpdateData.js\");\n/* harmony import */ var _casTableToJson__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./casTableToJson */ \"./casTableToJson.js\");\n/* harmony import */ var _computeRun__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./computeRun */ \"./computeRun.js\");\n/* harmony import */ var _computeSetup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./computeSetup */ \"./computeSetup.js\");\n/* harmony import */ var _computeSummary__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./computeSummary */ \"./computeSummary.js\");\n/* harmony import */ var _computeResults__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./computeResults */ \"./computeResults.js\");\n/* harmony import */ var _computeFetchData__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./computeFetchData */ \"./computeFetchData.js\");\n/* harmony import */ var _computeFileContent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./computeFileContent */ \"./computeFileContent.js\");\n/* harmony import */ var _findReport__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./findReport */ \"./findReport.js\");\n/* harmony import */ var _getReportImage__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./getReportImage */ \"./getReportImage.js\");\n/* harmony import */ var _getReportUri__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./getReportUri */ \"./getReportUri.js\");\n/* harmony import */ var _getSasTableRows__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./getSasTableRows */ \"./getSasTableRows.js\");\n/* harmony import */ var _jesSetup__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./jesSetup */ \"./jesSetup.js\");\n/* harmony import */ var _jesRun__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./jesRun */ \"./jesRun.js\");\n/* harmony import */ var _jesSummary__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./jesSummary */ \"./jesSummary.js\");\n/* harmony import */ var _jsonToDict__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./jsonToDict */ \"./jsonToDict.js\");\n/* harmony import */ var _masSetup__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./masSetup */ \"./masSetup.js\");\n/* harmony import */ var _masDescribe__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./masDescribe */ \"./masDescribe.js\");\n/* harmony import */ var _masRun__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./masRun */ \"./masRun.js\");\n/* harmony import */ var _masAddModel__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./masAddModel */ \"./masAddModel.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//import casUpload from './casUpload';\n//import uploadData from './uploadData';\n\nfunction lib() {\n return {\n caslRun: _caslRun__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"],\n caslRunBase: _caslRunBase__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"],\n casSetup: _casSetup__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"],\n casActionRun: _casActionRun__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"],\n // casTableToJson,\n casFetchData: _casFetchData__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"],\n casUpdateData: _casUpdateData__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"],\n computeRun: _computeRun__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"],\n computeSetup: _computeSetup__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"],\n computeSummary: _computeSummary__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"],\n computeFetchData: _computeFetchData__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"],\n computeFileContent: _computeFileContent__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"],\n computeResults: _computeResults__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"],\n findReport: _findReport__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"],\n getReportImage: _getReportImage__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"],\n getReportUri: _getReportUri__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"],\n getSASTableRows: _getSasTableRows__WEBPACK_IMPORTED_MODULE_18__[/* default */ \"a\"],\n jesSetup: _jesSetup__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"],\n jesRun: _jesRun__WEBPACK_IMPORTED_MODULE_20__[/* default */ \"a\"],\n jesSummary: _jesSummary__WEBPACK_IMPORTED_MODULE_21__[/* default */ \"a\"],\n jsonToDict: _jsonToDict__WEBPACK_IMPORTED_MODULE_22__[/* default */ \"a\"],\n casTableToJson: _casTableToJson__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"],\n caslScore: _caslScore__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"],\n caslDescribe: _caslDescribe__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"],\n masSetup: _masSetup__WEBPACK_IMPORTED_MODULE_23__[/* default */ \"a\"],\n masAddModel: _masAddModel__WEBPACK_IMPORTED_MODULE_26__[/* default */ \"a\"],\n masDescribe: _masDescribe__WEBPACK_IMPORTED_MODULE_24__[/* default */ \"a\"],\n masRun: _masRun__WEBPACK_IMPORTED_MODULE_25__[/* default */ \"a\"]\n\n // casUpload : casUpload,\n // uploadData: uploadData\n };\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (lib);\n\n//# sourceURL=webpack://restaflib/./lib.js?");
|
|
648
733
|
|
|
649
734
|
/***/ }),
|
|
650
735
|
|
|
@@ -657,7 +742,7 @@ eval("/* harmony import */ var _caslRun__WEBPACK_IMPORTED_MODULE_0__ = __webpack
|
|
|
657
742
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
658
743
|
|
|
659
744
|
"use strict";
|
|
660
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _getScoreStep__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getScoreStep */ \"./getScoreStep.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n/**\r\n * setup access to MAS\r\n * @module masSetup\r\n * @category restaflib/mas\r\n * @param {object} store - restaf store\r\n * @param {object} masControl - control object from masSetup\r\n * @param {object} models - array of models to add\r\n * \r\n * @returns {object} - masControl used in masRun\r\n * @alias module: masSetup\r\n * @example \r\n * let masControl = await masSetup(store, ['modelA', 'modelB']);\r\n */\n\n\n\nfunction masAddModel(_x, _x2, _x3) {\n return _masAddModel.apply(this, arguments);\n}\nfunction _masAddModel() {\n _masAddModel = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
745
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _getScoreStep__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getScoreStep */ \"./getScoreStep.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n/**\r\n * setup access to MAS\r\n * @module masSetup\r\n * @category restaflib/mas\r\n * @param {object} store - restaf store\r\n * @param {object} masControl - control object from masSetup\r\n * @param {object} models - array of models to add\r\n * \r\n * @returns {object} - masControl used in masRun\r\n * @alias module: masSetup\r\n * @example \r\n * let masControl = await masSetup(store, ['modelA', 'modelB']);\r\n */\n\n\n\nfunction masAddModel(_x, _x2, _x3) {\n return _masAddModel.apply(this, arguments);\n}\nfunction _masAddModel() {\n _masAddModel = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, masControl, models) {\n var microanalyticScore, i, m, result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n microanalyticScore = masControl.service;\n i = 0;\n case 2:\n if (!(i < models.length)) {\n _context.next = 12;\n break;\n }\n m = models[i];\n if (!(masControl.steps[m] == null)) {\n _context.next = 9;\n break;\n }\n _context.next = 7;\n return Object(_getScoreStep__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, microanalyticScore, m);\n case 7:\n result = _context.sent;\n masControl.steps[m] = result;\n case 9:\n i++;\n _context.next = 2;\n break;\n case 12:\n return _context.abrupt(\"return\", true);\n case 13:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _masAddModel.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (masAddModel);\n\n//# sourceURL=webpack://restaflib/./masAddModel.js?");
|
|
661
746
|
|
|
662
747
|
/***/ }),
|
|
663
748
|
|
|
@@ -683,7 +768,7 @@ eval("/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights
|
|
|
683
768
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
684
769
|
|
|
685
770
|
"use strict";
|
|
686
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n/**\r\n * Score using MAS\r\n * @module masRun\r\n * @param {store} restaf store\r\n * @category restaflib/mas\r\n * @param {object} masControl - object from masSetup\r\n * @param {string} modelName - name of model to be executed\r\n * @param {object} scenario - can be [{name: var1, value: value1},{...} ] or {varname: value,...}\r\n * @param {string} stepName - if not specified it will default to score or execute\r\n * \r\n * @returns {promise} - returns scoring results\r\n * @alias module: masrun\r\n * @example\r\n * async function example (models, payload) {\r\n * await store.logon(payload);\r\n * let masControl = await restaflib.masSetup(store, models);\r\n * let defaults = {\r\n * prescriber_count : 1,\r\n * strength_per_unit: 15,\r\n * age : 74,\r\n * avg_opioid_prescriber_rate: 10.4,\r\n * doctorshop_med : 1,\r\n * max_avg_med_90 : 10,\r\n * max_mme_per_day: 40,\r\n * max_opioid_prescriber_rate: 13.21,\r\n * opioid_days: 3\r\n * };\r\n * let inp = restaflib.masDescribe(masControl, models[0], 'score');\r\n * print.object(inp, 'describe for score model');\r\n * inp = inp.map((n) => {\r\n * n.value = defaults[n.name];\r\n * return n;\r\n * });\r\n * print.object(inp, 'updated input for score model');\r\n * let result = await restaflib.masRun (store, masControl, models[0], inp, 'score');\r\n * print.object(result, 'scoring result');\r\n * }\r\n */\nfunction masRun(_x, _x2, _x3, _x4, _x5, _x6) {\n return _masRun.apply(this, arguments);\n}\nfunction _masRun() {\n _masRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
771
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n/**\r\n * Score using MAS\r\n * @module masRun\r\n * @param {store} restaf store\r\n * @category restaflib/mas\r\n * @param {object} masControl - object from masSetup\r\n * @param {string} modelName - name of model to be executed\r\n * @param {object} scenario - can be [{name: var1, value: value1},{...} ] or {varname: value,...}\r\n * @param {string} stepName - if not specified it will default to score or execute\r\n * \r\n * @returns {promise} - returns scoring results\r\n * @alias module: masrun\r\n * @example\r\n * async function example (models, payload) {\r\n * await store.logon(payload);\r\n * let masControl = await restaflib.masSetup(store, models);\r\n * let defaults = {\r\n * prescriber_count : 1,\r\n * strength_per_unit: 15,\r\n * age : 74,\r\n * avg_opioid_prescriber_rate: 10.4,\r\n * doctorshop_med : 1,\r\n * max_avg_med_90 : 10,\r\n * max_mme_per_day: 40,\r\n * max_opioid_prescriber_rate: 13.21,\r\n * opioid_days: 3\r\n * };\r\n * let inp = restaflib.masDescribe(masControl, models[0], 'score');\r\n * print.object(inp, 'describe for score model');\r\n * inp = inp.map((n) => {\r\n * n.value = defaults[n.name];\r\n * return n;\r\n * });\r\n * print.object(inp, 'updated input for score model');\r\n * let result = await restaflib.masRun (store, masControl, models[0], inp, 'score');\r\n * print.object(result, 'scoring result');\r\n * }\r\n */\nfunction masRun(_x, _x2, _x3, _x4, _x5, _x6) {\n return _masRun.apply(this, arguments);\n}\nfunction _masRun() {\n _masRun = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, masControl, modelName, scenario, step, cmd) {\n var stepControl, inputIsArray, inputs, r, item, scorePayload, currentStep, stepIndex, _stepIndex, rafLink, t, result, outputs, score;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n stepControl = masControl.steps[modelName];\n inputIsArray = false;\n inputs = [];\n if (Array.isArray(scenario) === false) {\n for (r in scenario) {\n item = {\n name: r,\n value: scenario[r]\n };\n inputs.push(item);\n }\n } else {\n inputIsArray = true;\n }\n scorePayload = {\n data: {\n inputs: inputIsArray === true ? scenario : inputs\n }\n };\n currentStep = null; //TBD: Need to convert stepId from array to object for cleaner coding\n if (!(step == null)) {\n _context.next = 15;\n break;\n }\n stepIndex = stepControl.stepIds.findIndex(function (x) {\n return x === 'execute' || x === 'score';\n });\n if (!(stepIndex === -1)) {\n _context.next = 12;\n break;\n }\n return _context.abrupt(\"return\", []);\n case 12:\n currentStep = stepControl.stepIds[stepIndex];\n case 13:\n _context.next = 21;\n break;\n case 15:\n _stepIndex = stepControl.stepIds.findIndex(function (x) {\n return x === step;\n });\n if (!(_stepIndex === -1)) {\n _context.next = 20;\n break;\n }\n return _context.abrupt(\"return\", []);\n case 20:\n currentStep = step;\n case 21:\n if (cmd == null) {\n cmd = 'execute';\n }\n rafLink = stepControl.stepsRafLink.itemsCmd(currentStep, cmd);\n if (!(rafLink === null)) {\n _context.next = 26;\n break;\n }\n t = [{\n name: 'Error',\n type: 'string',\n value: \"name: \".concat(modelName, \" step: \").concat(step, \" operation: \").concat(cmd, \" is an invalid combination\")\n }];\n return _context.abrupt(\"return\", t);\n case 26:\n _context.next = 28;\n return store.apiCall(rafLink, scorePayload);\n case 28:\n result = _context.sent;\n outputs = result.items('outputs').toJS();\n if (inputIsArray === true) {\n score = outputs;\n } else {\n score = {};\n outputs.map(function (m) {\n score[m.name] = m.value;\n });\n }\n return _context.abrupt(\"return\", score);\n case 32:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _masRun.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (masRun);\n\n//# sourceURL=webpack://restaflib/./masRun.js?");
|
|
687
772
|
|
|
688
773
|
/***/ }),
|
|
689
774
|
|
|
@@ -696,7 +781,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
696
781
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
697
782
|
|
|
698
783
|
"use strict";
|
|
699
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _masSetup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./masSetup */ \"./masSetup.js\");\n/* harmony import */ var _masRun__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./masRun */ \"./masRun.js\");\n\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n/**\r\n * Score using MAS\r\n * @module masScore\r\n * @category restaflib/mas\r\n * @param {store} restaf store\r\n * @param {string} modelName - name of model to be executed\r\n * @param {object} scenario - can be [{name: var1, value: value1},{...} ] or {varname: value,...}\r\n * @returns {promise} - returns scoring results\r\n * @alias module: masScore\r\n * @example\r\n * async function example (store, model) {\r\n * let scenario = {\r\n * prescriber_count : 1,\r\n * strength_per_unit: 15,\r\n * age : 74,\r\n * avg_opioid_prescriber_rate: 10.4,\r\n * doctorshop_med : 1,\r\n * max_avg_med_90 : 10,\r\n * max_mme_per_day: 40,\r\n * max_opioid_prescriber_rate: 13.21,\r\n * opioid_days: 3\r\n * };\r\n * \r\n * let result = await restaflib.masScore (store, model, scenario);\r\n * print.object(result, 'scoring result');\r\n * }\r\n */\n\n\nfunction masScore(_x, _x2, _x3) {\n return _masScore.apply(this, arguments);\n}\nfunction _masScore() {\n _masScore = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
784
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _masSetup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./masSetup */ \"./masSetup.js\");\n/* harmony import */ var _masRun__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./masRun */ \"./masRun.js\");\n\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n/**\r\n * Score using MAS\r\n * @module masScore\r\n * @category restaflib/mas\r\n * @param {store} restaf store\r\n * @param {string} modelName - name of model to be executed\r\n * @param {object} scenario - can be [{name: var1, value: value1},{...} ] or {varname: value,...}\r\n * @returns {promise} - returns scoring results\r\n * @alias module: masScore\r\n * @example\r\n * async function example (store, model) {\r\n * let scenario = {\r\n * prescriber_count : 1,\r\n * strength_per_unit: 15,\r\n * age : 74,\r\n * avg_opioid_prescriber_rate: 10.4,\r\n * doctorshop_med : 1,\r\n * max_avg_med_90 : 10,\r\n * max_mme_per_day: 40,\r\n * max_opioid_prescriber_rate: 13.21,\r\n * opioid_days: 3\r\n * };\r\n * \r\n * let result = await restaflib.masScore (store, model, scenario);\r\n * print.object(result, 'scoring result');\r\n * }\r\n */\n\n\nfunction masScore(_x, _x2, _x3) {\n return _masScore.apply(this, arguments);\n}\nfunction _masScore() {\n _masScore = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, modelName, scenario) {\n var masControl, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Object(_masSetup__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, [modelName]);\n case 2:\n masControl = _context.sent;\n _context.next = 5;\n return Object(_masRun__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, masControl, modelName, scenario, 'score', 'execute');\n case 5:\n r = _context.sent;\n return _context.abrupt(\"return\", r);\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _masScore.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (masScore);\n\n//# sourceURL=webpack://restaflib/./masScore.js?");
|
|
700
785
|
|
|
701
786
|
/***/ }),
|
|
702
787
|
|
|
@@ -709,7 +794,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
|
|
|
709
794
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
710
795
|
|
|
711
796
|
"use strict";
|
|
712
|
-
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _getScoreStep__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getScoreStep */ \"./getScoreStep.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n/**\r\n * setup access to MAS\r\n * @module masSetup\r\n * @category restaflib/mas\r\n * @param {object} store - restaf store\r\n * @param {object} models - an array of model names\r\n * @param {object} logonPayload - null|restaf logon payload\r\n * \r\n * @returns {object} - masControl used in masRun\r\n * @alias module: masSetup\r\n * @example \r\n * let masControl = await masSetup(store, ['modelA', 'modelB']);\r\n */\n\n\n\nfunction masSetup(_x, _x2, _x3) {\n return _masSetup.apply(this, arguments);\n}\nfunction _masSetup() {\n _masSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
797
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _getScoreStep__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getScoreStep */ \"./getScoreStep.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n/**\r\n * setup access to MAS\r\n * @module masSetup\r\n * @category restaflib/mas\r\n * @param {object} store - restaf store\r\n * @param {object} models - an array of model names\r\n * @param {object} logonPayload - null|restaf logon payload\r\n * \r\n * @returns {object} - masControl used in masRun\r\n * @alias module: masSetup\r\n * @example \r\n * let masControl = await masSetup(store, ['modelA', 'modelB']);\r\n */\n\n\n\nfunction masSetup(_x, _x2, _x3) {\n return _masSetup.apply(this, arguments);\n}\nfunction _masSetup() {\n _masSetup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, models, logonPayload) {\n var _yield$store$addServi, microanalyticScore, control, i, m, result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (!(logonPayload != null)) {\n _context.next = 3;\n break;\n }\n _context.next = 3;\n return store.logon(logonPayload);\n case 3:\n _context.next = 5;\n return store.addServices('microanalyticScore');\n case 5:\n _yield$store$addServi = _context.sent;\n microanalyticScore = _yield$store$addServi.microanalyticScore;\n control = {\n service: microanalyticScore,\n steps: {}\n };\n i = 0;\n case 9:\n if (!(i < models.length)) {\n _context.next = 18;\n break;\n }\n m = models[i];\n _context.next = 13;\n return Object(_getScoreStep__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, microanalyticScore, m);\n case 13:\n result = _context.sent;\n control.steps[m] = result;\n case 15:\n i++;\n _context.next = 9;\n break;\n case 18:\n return _context.abrupt(\"return\", control);\n case 19:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _masSetup.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (masSetup);\n\n//# sourceURL=webpack://restaflib/./masSetup.js?");
|
|
713
798
|
|
|
714
799
|
/***/ }),
|
|
715
800
|
|
|
@@ -790,6 +875,71 @@ eval("/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights
|
|
|
790
875
|
|
|
791
876
|
/***/ }),
|
|
792
877
|
|
|
878
|
+
/***/ "./uploadHandlers/index.js":
|
|
879
|
+
/*!*********************************!*\
|
|
880
|
+
!*** ./uploadHandlers/index.js ***!
|
|
881
|
+
\*********************************/
|
|
882
|
+
/*! exports provided: uploadAstore, uploadSrc, saveTable */
|
|
883
|
+
/*! exports used: saveTable, uploadAstore, uploadSrc */
|
|
884
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
885
|
+
|
|
886
|
+
"use strict";
|
|
887
|
+
eval("/* harmony import */ var _uploadAstore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uploadAstore */ \"./uploadHandlers/uploadAstore.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return _uploadAstore__WEBPACK_IMPORTED_MODULE_0__[\"a\"]; });\n\n/* harmony import */ var _uploadSrc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./uploadSrc */ \"./uploadHandlers/uploadSrc.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return _uploadSrc__WEBPACK_IMPORTED_MODULE_1__[\"a\"]; });\n\n/* harmony import */ var _saveTable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./saveTable */ \"./uploadHandlers/saveTable.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return _saveTable__WEBPACK_IMPORTED_MODULE_2__[\"a\"]; });\n\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\n\n//# sourceURL=webpack://restaflib/./uploadHandlers/index.js?");
|
|
888
|
+
|
|
889
|
+
/***/ }),
|
|
890
|
+
|
|
891
|
+
/***/ "./uploadHandlers/saveTable.js":
|
|
892
|
+
/*!*************************************!*\
|
|
893
|
+
!*** ./uploadHandlers/saveTable.js ***!
|
|
894
|
+
\*************************************/
|
|
895
|
+
/*! exports provided: default */
|
|
896
|
+
/*! exports used: default */
|
|
897
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
898
|
+
|
|
899
|
+
"use strict";
|
|
900
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\nfunction saveTable(_x, _x2, _x3, _x4) {\n return _saveTable.apply(this, arguments);\n}\nfunction _saveTable() {\n _saveTable = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, caslib, name) {\n var payload;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n payload = {\n action: 'table.save',\n data: {\n name: \"\".concat(name),\n caslib: \"\".concat(caslib),\n replace: true,\n table: {\n name: \"\".concat(name),\n caslib: \"\".concat(caslib)\n }\n }\n };\n _context.next = 3;\n return store.runAction(session, payload);\n case 3:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _saveTable.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (saveTable);\n\n//# sourceURL=webpack://restaflib/./uploadHandlers/saveTable.js?");
|
|
901
|
+
|
|
902
|
+
/***/ }),
|
|
903
|
+
|
|
904
|
+
/***/ "./uploadHandlers/uploadAstore.js":
|
|
905
|
+
/*!****************************************!*\
|
|
906
|
+
!*** ./uploadHandlers/uploadAstore.js ***!
|
|
907
|
+
\****************************************/
|
|
908
|
+
/*! exports provided: default */
|
|
909
|
+
/*! exports used: default */
|
|
910
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
911
|
+
|
|
912
|
+
"use strict";
|
|
913
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n\n\n\n\nfunction uploadAstore(_x, _x2, _x3, _x4) {\n return _uploadAstore.apply(this, arguments);\n}\nfunction _uploadAstore() {\n _uploadAstore = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, astoreBuf, fileInfo) {\n var _fileInfo$output, caslib, name, casl, payload, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _fileInfo$output = fileInfo.output, caslib = _fileInfo$output.caslib, name = _fileInfo$output.name;\n if (!(name == null)) {\n _context.next = 3;\n break;\n }\n throw 'Please specify table as caslib.name';\n case 3:\n name = name.toLowerCase(name);\n\n // delete old table\n casl = \"\\n action table.droptable /\\n caslib= '\".concat(caslib, \"' name= '\").concat(name, \"' quiet=true;\\n\\n action table.deleteSource/\\n caslib= '\").concat(caslib, \"' source= '\").concat(name, \".sashdat' quiet=true; \\n \");\n payload = {\n action: 'sccasl.runcasl',\n data: {\n code: casl\n }\n };\n _context.next = 8;\n return store.runAction(session, payload);\n case 8:\n // upload table\n\n payload = {\n action: 'astore.upload',\n data: {\n rstore: {\n name: \"\".concat(name),\n caslib: \"\".concat(caslib),\n replace: true\n },\n store: astoreBuf\n }\n };\n _context.next = 11;\n return store.runAction(session, payload);\n case 11:\n r = _context.sent;\n return _context.abrupt(\"return\", \"Upload of \".concat(fileInfo.source, \" to \").concat(caslib, \".\").concat(name, \" completed\"));\n case 13:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _uploadAstore.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (uploadAstore);\n\n//# sourceURL=webpack://restaflib/./uploadHandlers/uploadAstore.js?");
|
|
914
|
+
|
|
915
|
+
/***/ }),
|
|
916
|
+
|
|
917
|
+
/***/ "./uploadHandlers/uploadSrc.js":
|
|
918
|
+
/*!*************************************!*\
|
|
919
|
+
!*** ./uploadHandlers/uploadSrc.js ***!
|
|
920
|
+
\*************************************/
|
|
921
|
+
/*! exports provided: default */
|
|
922
|
+
/*! exports used: default */
|
|
923
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
924
|
+
|
|
925
|
+
"use strict";
|
|
926
|
+
eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"../../../node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"../../../node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _caslRun__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../caslRun */ \"./caslRun.js\");\n/*\r\n* Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n\nfunction uploadSrc(_x, _x2, _x3, _x4, _x5) {\n return _uploadSrc.apply(this, arguments);\n}\nfunction _uploadSrc() {\n _uploadSrc = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(store, session, modelBuf, fileInfo, save) {\n var _fileInfo$output, caslib, name, JSON_Parameters, p, r, casl, _r, text;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _fileInfo$output = fileInfo.output, caslib = _fileInfo$output.caslib, name = _fileInfo$output.name;\n if (!(name == null)) {\n _context.next = 3;\n break;\n }\n throw 'Please specify table as caslib.name';\n case 3:\n _context.next = 5;\n return cleanup(store, session, caslib, name);\n case 5:\n JSON_Parameters = {\n casout: {\n caslib: caslib,\n /* a valid caslib */\n name: name /* name of output file on cas server */\n },\n importOptions: {\n fileType: fileInfo.fileType /* type of the file being uploaded */\n }\n };\n if (fileInfo.fileExt === 'sas' || fileInfo.fileExt === 'ds2') {\n JSON_Parameters.importOptions.delimiter = '\\\\';\n }\n p = {\n headers: {\n 'JSON-Parameters': JSON_Parameters,\n 'Content-Type': 'binary/octet-stream'\n },\n data: modelBuf,\n action: 'table.upload'\n };\n _context.next = 10;\n return store.runAction(session, p);\n case 10:\n r = _context.sent;\n if (!(save === true)) {\n _context.next = 16;\n break;\n }\n casl = \"\\n\\t\\t\\taction table.save r = result / \\n\\t\\t\\ttable = {caslib='\".concat(caslib, \"' name='\").concat(name, \"'} replace=true\\n\\t\\t\\tcaslib='\").concat(caslib, \"' name='\").concat(name, \"';\\n\\n\\t\\t\\tsend_response(result);\\n\\t\\t\\t\");\n _context.next = 15;\n return Object(_caslRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, casl, null, true);\n case 15:\n _r = _context.sent;\n case 16:\n text = fileInfo.source == null ? \"inline source\" : fileInfo.source;\n return _context.abrupt(\"return\", \"Upload of \".concat(text, \" to \").concat((fileInfo.output, caslib), \".\").concat(fileInfo.output.name, \" completed\"));\n case 18:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _uploadSrc.apply(this, arguments);\n}\nfunction cleanup(_x6, _x7, _x8, _x9) {\n return _cleanup.apply(this, arguments);\n}\nfunction _cleanup() {\n _cleanup = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(store, session, caslib, name) {\n var table, deleteSrc, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n table = \"\".concat(caslib, \".\").concat(name);\n deleteSrc = \"\\n\\t\\taction table.dropTable/ \\n caslib='\".concat(caslib, \"' name='\").concat(name, \"' quiet=TRUE; \\n \\n action table.deleteSource status=src / \\n caslib='casuser' source= '\").concat(table, \"' quiet=TRUE; \\n\\t\\tsend_response({csResults = {results= 'data deleted'}})\\n\\t\\t\");\n _context2.next = 4;\n return Object(_caslRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, deleteSrc);\n case 4:\n r = _context2.sent;\n case 5:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _cleanup.apply(this, arguments);\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (uploadSrc);\n\n//# sourceURL=webpack://restaflib/./uploadHandlers/uploadSrc.js?");
|
|
927
|
+
|
|
928
|
+
/***/ }),
|
|
929
|
+
|
|
930
|
+
/***/ "./uploadSetup.js":
|
|
931
|
+
/*!************************!*\
|
|
932
|
+
!*** ./uploadSetup.js ***!
|
|
933
|
+
\************************/
|
|
934
|
+
/*! exports provided: default */
|
|
935
|
+
/*! exports used: default */
|
|
936
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
937
|
+
|
|
938
|
+
"use strict";
|
|
939
|
+
eval("/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"../../../node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _uploadHandlers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./uploadHandlers */ \"./uploadHandlers/index.js\");\n\n/*\r\n * Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\n\n/**\r\n * parse a source file name\r\n * @module uploadSetup\r\n * @private\r\n * @param {string} source - the source file( absolute or relative path can be used)\r\n * @returns {object} - returns {ext: file-extension, fileOptions: <option for fread>, transform: transform for content-type, contentType: content-type}\r\n * @alias module: uploadSetup\r\n * @example\r\n * let t = uploadSetup('./cars.sashdat');\r\n */\n\nfunction uploadSetup(source, output) {\n var fileOptions = null; /* option for file reader */\n var contentType = 'binary/octet-stream'; /* header content-type on API call */\n\n var fileType; /* fileType for use in API call */\n var handler = _uploadHandlers__WEBPACK_IMPORTED_MODULE_1__[/* uploadSrc */ \"c\"];\n var transform = noChange;\n var fext;\n if (source == null) {\n fext = 'csv';\n } else {\n fext = source.split('.').pop().toLowerCase();\n }\n switch (fext) {\n case 'sas7bdat':\n {\n fileType = 'basesas';\n break;\n }\n case 'sashdat':\n {\n fileType = 'hdat';\n break;\n }\n case 'csv':\n {\n fileType = fext;\n fileOptions = 'UTF8';\n break;\n }\n case 'xslx':\n case 'xsl':\n {\n fileType = fext;\n break;\n }\n case 'astore':\n case 'sasast':\n {\n fileType = fext;\n handler = _uploadHandlers__WEBPACK_IMPORTED_MODULE_1__[/* uploadAstore */ \"b\"];\n transform = toBase64;\n break;\n }\n case 'ds2':\n case 'sas':\n {\n fileType = 'csv';\n fileOptions = 'UTF8';\n handler = _uploadHandlers__WEBPACK_IMPORTED_MODULE_1__[/* uploadSrc */ \"c\"];\n transform = toCsv;\n break;\n }\n default:\n {\n throw \"Currently file type of \".concat(fext, \" is not supported\");\n }\n }\n var _output$split = output.split('.'),\n _output$split2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_output$split, 2),\n caslib = _output$split2[0],\n name = _output$split2[1];\n return {\n source: source,\n output: {\n caslib: caslib,\n name: name.toLowerCase()\n },\n fileType: fileType /* for cas actions */,\n fileExt: fext,\n fileOptions: fileOptions,\n transform: transform,\n contentType: contentType,\n handler: handler\n };\n function toBase64(data) {\n return new Buffer.from(data).toString('base64');\n }\n function toCsv(data, fileInfo) {\n // preprocess to get rid of things that upset datastep\n // eslint-disable-next-line no-control-regex\n var isrc = data.replace(/[^\\x00-\\x7F]/g, '');\n var src = isrc.replace(/\\r?\\n/g, '');\n // convert to a csv\n var fileType = fileInfo.fileExt;\n var varname = fileType === 'sas' ? 'dataStepSrc' : fileType === 'ds2' ? 'ds2Src' : fileType === 'casl' ? 'caslSrc' : 'dataStepsrc';\n var csv = 'modelName' + '\\\\' + varname + '\\n' + fileInfo.output.name + '\\\\' + ' ' + src + '\\n';\n return csv;\n }\n function noChange(data) {\n return data;\n }\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (uploadSetup);\n\n//# sourceURL=webpack://restaflib/./uploadSetup.js?");
|
|
940
|
+
|
|
941
|
+
/***/ }),
|
|
942
|
+
|
|
793
943
|
/***/ 0:
|
|
794
944
|
/*!*********************!*\
|
|
795
945
|
!*** multi ./index ***!
|