@sassoftware/restaflib 4.4.28 → 4.4.31

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 CHANGED
@@ -594,7 +594,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
594
594
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
595
595
 
596
596
  "use strict";
597
- 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 © 2019, 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\n/**\r\n *\r\n * @description Fetch rows from cas Tables\r\n * \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 */\n\nfunction casFetchRows(_x, _x2, _x3) {\n return _casFetchRows.apply(this, arguments);\n}\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 casFetch, src, result, r;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n casFetch = payload.version === 2 ? 'casFetchRowsv2' : 'casFetchRows';\n src = _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"][casFetch]();\n _context.next = 4;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src, payload);\n\n case 4:\n result = _context.sent;\n r = result.items('results', 'casResults').toJS();\n\n if (r.data == null) {\n r.data = {\n rows: []\n };\n }\n\n return _context.abrupt(\"return\", r);\n\n case 8:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _casFetchRows.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (casFetchRows);\n\n//# sourceURL=webpack://restaflib/./casFetchRows.js?");
597
+ 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 © 2019, 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\n/**\r\n *\r\n * @description Fetch rows from cas Tables\r\n * \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 */\n\nfunction casFetchRows(_x, _x2, _x3) {\n return _casFetchRows.apply(this, arguments);\n}\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) {\n switch (_context.prev = _context.next) {\n case 0:\n debugger;\n\n if (payload.where == null) {\n payload.where = ' ';\n }\n\n src = _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['commonCasl']() + ' ' + _programs__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"]['casFetchRows']();\n debugger;\n _context.next = 6;\n return Object(_caslRunBase__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, src, payload);\n\n case 6:\n result = _context.sent;\n r = result.items('results', 'casResults').toJS();\n\n if (r.data == null) {\n r.data = {\n rows: []\n };\n }\n\n return _context.abrupt(\"return\", r);\n\n case 10:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _casFetchRows.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (casFetchRows);\n\n//# sourceURL=webpack://restaflib/./casFetchRows.js?");
598
598
 
599
599
  /***/ }),
600
600
 
@@ -646,7 +646,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IM
646
646
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
647
647
 
648
648
  "use strict";
649
- 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_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 _uploadSetup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./uploadSetup */ \"./uploadSetup.js\");\n/* harmony import */ var _uploadHandlers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./uploadHandlers */ \"./uploadHandlers/index.js\");\n/*\r\n* Copyright © 2019, 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\nvar fs = __webpack_require__(/*! fs */ \"../../../node_modules/node-libs-browser/mock/empty.js\").promises;\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 */\n\nfunction casUpload(_x, _x2, _x3, _x4, _x5, _x6) {\n return _casUpload.apply(this, arguments);\n}\n\nfunction _casUpload() {\n _casUpload = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, session, source, output, save, altSrc) {\n var fileInfo, buf, r, _output$split, _output$split2, caslib, name;\n\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n // parse source file to fgure out what we are uploading\n fileInfo = Object(_uploadSetup__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(source, output); // read the file\n\n if (!(altSrc != null)) {\n _context.next = 5;\n break;\n }\n\n _context.t0 = altSrc;\n _context.next = 8;\n break;\n\n case 5:\n _context.next = 7;\n return fs.readFile(source, fileInfo.fileOptions);\n\n case 7:\n _context.t0 = _context.sent;\n\n case 8:\n buf = _context.t0;\n\n // transfrom data if necessary for upload\n if (fileInfo.transform !== null) {\n buf = fileInfo.transform(buf, fileInfo);\n } // upload using specific upload handlers\n\n\n _context.next = 12;\n return fileInfo.handler(store, session, buf, fileInfo, save);\n\n case 12:\n r = _context.sent;\n\n if (!(save === true)) {\n _context.next = 18;\n break;\n }\n\n _output$split = output.split('.'), _output$split2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_output$split, 2), caslib = _output$split2[0], name = _output$split2[1];\n _context.next = 17;\n return Object(_uploadHandlers__WEBPACK_IMPORTED_MODULE_4__[/* saveTable */ \"a\"])(store, session, caslib, name);\n\n case 17:\n r = r + '\\n' + \" \".concat(output, \" was saved\");\n\n case 18:\n return _context.abrupt(\"return\", r);\n\n case 19:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _casUpload.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (casUpload);\n\n//# sourceURL=webpack://restaflib/./casUpload.js?");
649
+ 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_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 _uploadSetup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./uploadSetup */ \"./uploadSetup.js\");\n/* harmony import */ var _uploadHandlers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./uploadHandlers */ \"./uploadHandlers/index.js\");\n/*\r\n* Copyright © 2019, 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\nvar fs = __webpack_require__(/*! fs */ \"../../../node_modules/node-libs-browser/mock/empty.js\").promises;\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 */\n\nfunction casUpload(_x, _x2, _x3, _x4, _x5, _x6) {\n return _casUpload.apply(this, arguments);\n}\n\nfunction _casUpload() {\n _casUpload = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(store, session, source, output, save, altSrc) {\n var fileInfo, buf, r, _output$split, _output$split2, caslib, name;\n\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n // parse source file to fgure out what we are uploading\n fileInfo = Object(_uploadSetup__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(source, output); // read the file\n\n if (!(altSrc != null)) {\n _context.next = 5;\n break;\n }\n\n _context.t0 = altSrc;\n _context.next = 8;\n break;\n\n case 5:\n _context.next = 7;\n return fs.readFile(source, fileInfo.fileOptions);\n\n case 7:\n _context.t0 = _context.sent;\n\n case 8:\n buf = _context.t0;\n\n // transfrom data if necessary for upload\n if (fileInfo.transform !== null) {\n buf = fileInfo.transform(buf, fileInfo);\n } // upload using specific upload handlers\n\n\n debugger;\n _context.next = 13;\n return fileInfo.handler(store, session, buf, fileInfo, save);\n\n case 13:\n r = _context.sent;\n console.log(r.items().toJS());\n\n if (!(save === true)) {\n _context.next = 20;\n break;\n }\n\n _output$split = output.split('.'), _output$split2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_output$split, 2), caslib = _output$split2[0], name = _output$split2[1];\n _context.next = 19;\n return Object(_uploadHandlers__WEBPACK_IMPORTED_MODULE_4__[/* saveTable */ \"a\"])(store, session, caslib, name);\n\n case 19:\n r = r + '\\n' + \" \".concat(output, \" was saved\");\n\n case 20:\n return _context.abrupt(\"return\", r);\n\n case 21:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _casUpload.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (casUpload);\n\n//# sourceURL=webpack://restaflib/./casUpload.js?");
650
650
 
651
651
  /***/ }),
652
652
 
@@ -789,7 +789,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
789
789
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
790
790
 
791
791
  "use strict";
792
- 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 © 2019, 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 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 {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 */\n\nfunction computeSetupTables(_x, _x2, _x3, _x4) {\n return _computeSetupTables.apply(this, arguments);\n}\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) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!(preamble != null)) {\n _context.next = 6;\n break;\n }\n\n _context.next = 3;\n return Object(_computeRun__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, preamble);\n\n case 3:\n result = _context.sent;\n\n if (!(result.SASJobStatus !== 'completed')) {\n _context.next = 6;\n break;\n }\n\n throw \"Error: Preamble failed with completion code of \".concat(result.SASJobStatus);\n\n case 6:\n _context.next = 8;\n return Object(_computeSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, null, tables);\n\n case 8:\n r = _context.sent;\n return _context.abrupt(\"return\", r);\n\n case 10:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _computeSetupTables.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeSetupTables);\n\n//# sourceURL=webpack://restaflib/./computeSetupTables.js?");
792
+ 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 © 2019, 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 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 */\n\nfunction computeSetupTables(_x, _x2, _x3, _x4) {\n return _computeSetupTables.apply(this, arguments);\n}\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) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!(preamble != null)) {\n _context.next = 6;\n break;\n }\n\n _context.next = 3;\n return Object(_computeRun__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(store, session, preamble);\n\n case 3:\n result = _context.sent;\n\n if (!(result.SASJobStatus !== 'completed')) {\n _context.next = 6;\n break;\n }\n\n throw \"Error: Preamble failed with completion code of \".concat(result.SASJobStatus);\n\n case 6:\n _context.next = 8;\n return Object(_computeSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, null, tables);\n\n case 8:\n r = _context.sent;\n return _context.abrupt(\"return\", r);\n\n case 10:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _computeSetupTables.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeSetupTables);\n\n//# sourceURL=webpack://restaflib/./computeSetupTables.js?");
793
793
 
794
794
  /***/ }),
795
795
 
@@ -802,7 +802,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
802
802
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
803
803
 
804
804
  "use strict";
805
- 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\n/*\r\n * Copyright © 2019, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\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} job - rafObject representing the compute service job after job completion\r\n * \r\n * @returns {promise} - the computeSummary object for easy handling of logs,listing,ods, tables\r\n * @example\r\n * \r\n */\nfunction computeSummary(_x, _x2, _x3, _x4) {\n return _computeSummary.apply(this, arguments);\n}\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 '';\n var result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!(job != null && tables == null)) {\n _context.next = 6;\n break;\n }\n\n _context.next = 3;\n return jobResults(store, session, job);\n\n case 3:\n result = _context.sent;\n _context.next = 9;\n break;\n\n case 6:\n _context.next = 8;\n return isetupTable(store, session, tables);\n\n case 8:\n result = _context.sent;\n\n case 9:\n return _context.abrupt(\"return\", result);\n\n case 10:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _computeSummary.apply(this, arguments);\n}\n\nfunction jobResults(_x5, _x6, _x7) {\n return _jobResults.apply(this, arguments);\n}\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\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.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 cResult.log = job.links('log');\n cResult.listing = job.links('listing');\n reportLink = job.links('results');\n\n if (!(reportLink !== null)) {\n _context2.next = 10;\n break;\n }\n\n _context2.next = 7;\n return store.apiCall(reportLink);\n\n case 7:\n results = _context2.sent;\n size = results.itemsList().size;\n\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\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\n case 10:\n return _context2.abrupt(\"return\", cResult);\n\n case 11:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n return _jobResults.apply(this, arguments);\n}\n\nfunction isetupTable(_x8, _x9, _x10) {\n return _isetupTable.apply(this, arguments);\n}\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\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee3$(_context3) {\n while (1) {\n 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 console.log(tableList);\n i = 0;\n\n case 4:\n if (!(i < tableList.length)) {\n _context3.next = 30;\n break;\n }\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 = 11;\n return store.apiCall(session.links('librefs'), p);\n\n case 11:\n currentLibrefs = _context3.sent;\n\n if (!(currentLibrefs.itemsList().size === 0)) {\n _context3.next = 14;\n break;\n }\n\n throw \"Libref \".concat(libref, \" not found\");\n\n case 14:\n // get the links for this libref\n rlink = currentLibrefs.itemsCmd(libref, 'self');\n _context3.next = 17;\n return store.apiCall(rlink);\n\n case 17:\n currentLibrefSelf = _context3.sent;\n // get the table\n p = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n _context3.next = 21;\n return store.apiCall(currentLibrefSelf.links('tables'));\n\n case 21:\n _tables = _context3.sent;\n\n if (!(_tables.itemsList().size === 0)) {\n _context3.next = 24;\n break;\n }\n\n throw \"Table \".concat(name, \" not found\");\n\n case 24:\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\n case 27:\n i++;\n _context3.next = 4;\n break;\n\n case 30:\n return _context3.abrupt(\"return\", cResult);\n\n case 31:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3);\n }));\n return _isetupTable.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeSummary);\n\n//# sourceURL=webpack://restaflib/./computeSummary.js?");
805
+ 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\n/*\r\n * Copyright © 2019, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n * SPDX-License-Identifier: Apache-2.0\r\n*/\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}\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 '';\n var result;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!(job != null && tables == null)) {\n _context.next = 6;\n break;\n }\n\n _context.next = 3;\n return jobResults(store, session, job);\n\n case 3:\n result = _context.sent;\n _context.next = 9;\n break;\n\n case 6:\n _context.next = 8;\n return isetupTable(store, session, tables);\n\n case 8:\n result = _context.sent;\n\n case 9:\n return _context.abrupt(\"return\", result);\n\n case 10:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _computeSummary.apply(this, arguments);\n}\n\nfunction jobResults(_x5, _x6, _x7) {\n return _jobResults.apply(this, arguments);\n}\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\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.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 cResult.log = job.links('log');\n cResult.listing = job.links('listing');\n reportLink = job.links('results');\n\n if (!(reportLink !== null)) {\n _context2.next = 10;\n break;\n }\n\n _context2.next = 7;\n return store.apiCall(reportLink);\n\n case 7:\n results = _context2.sent;\n size = results.itemsList().size;\n\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\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\n case 10:\n return _context2.abrupt(\"return\", cResult);\n\n case 11:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n return _jobResults.apply(this, arguments);\n}\n\nfunction isetupTable(_x8, _x9, _x10) {\n return _isetupTable.apply(this, arguments);\n}\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\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee3$(_context3) {\n while (1) {\n 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 console.log(tableList);\n i = 0;\n\n case 4:\n if (!(i < tableList.length)) {\n _context3.next = 30;\n break;\n }\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 = 11;\n return store.apiCall(session.links('librefs'), p);\n\n case 11:\n currentLibrefs = _context3.sent;\n\n if (!(currentLibrefs.itemsList().size === 0)) {\n _context3.next = 14;\n break;\n }\n\n throw \"Libref \".concat(libref, \" not found\");\n\n case 14:\n // get the links for this libref\n rlink = currentLibrefs.itemsCmd(libref, 'self');\n _context3.next = 17;\n return store.apiCall(rlink);\n\n case 17:\n currentLibrefSelf = _context3.sent;\n // get the table\n p = {\n qs: {\n filter: \"eq(name,'\".concat(name, \"')\")\n }\n };\n _context3.next = 21;\n return store.apiCall(currentLibrefSelf.links('tables'));\n\n case 21:\n _tables = _context3.sent;\n\n if (!(_tables.itemsList().size === 0)) {\n _context3.next = 24;\n break;\n }\n\n throw \"Table \".concat(name, \" not found\");\n\n case 24:\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\n case 27:\n i++;\n _context3.next = 4;\n break;\n\n case 30:\n return _context3.abrupt(\"return\", cResult);\n\n case 31:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3);\n }));\n return _isetupTable.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (computeSummary);\n\n//# sourceURL=webpack://restaflib/./computeSummary.js?");
806
806
 
807
807
  /***/ }),
808
808
 
@@ -1131,19 +1131,6 @@ eval("/*\r\n* Copyright © 2019, SAS Institute Inc., Cary, NC, USA. All Rights
1131
1131
 
1132
1132
  /***/ }),
1133
1133
 
1134
- /***/ "./programs/casFetchRowsv2.js":
1135
- /*!************************************!*\
1136
- !*** ./programs/casFetchRowsv2.js ***!
1137
- \************************************/
1138
- /*! exports provided: default */
1139
- /*! exports used: default */
1140
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1141
-
1142
- "use strict";
1143
- eval("/*\r\n* Copyright © 2019, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\nfunction casFetchRowsv2() {\n var code = \"\\n print _args_;\\n\\n results = casFetchRows(_args_.table.caslib, _args_.table.name , _args_.qs.from, _args_.qs.count, _args_.qs.format, _args_.data.where); \\n send_response({casResults = results}); \\n \\n function casFetchRows(caslib, name, from, count, format, where) ; \\n \\n rc = checkAndLoadTable(caslib, name);\\n \\n if (rc ne true) then do;\\n results = {Errors= 'Unable to access ' ||caslib||'.'||name}; \\n return results; \\n end; \\n\\n /*\\n * get all table to get rowCount\\n */\\n\\n action table.tableinfo r= result/ \\n caslib = caslib \\n name = name; \\n \\n rowCount = result.TableInfo[1, 'rows']; \\n to = min(from + count -1, rowCount); \\n \\n /*\\n * get column information\\n */\\n\\n action table.columninfo r=infoResult /\\n table = {caslib=caslib name=name};\\n\\n columns ={{Column='_Index_',ID=0,Type='double',RawLength=5,FormattedLength=5,NFL=0,NFD=0}};\\n i = 2;\\n do c over inforesult.columninfo;\\n columns[i] = c;\\n i = i + 1;\\n end;\\n \\n /*\\n * Fetch the current set of rows\\n */\\n /* wherex = dictTowhere(where); let user send in the where clause */\\n print where;\\n\\n action table.fetch r = result / \\n table = {caslib=caslib, name=name where=where} \\n from= from to=to format=format \\n ;\\n\\n /* \\n * create payload to return\\n */\\n\\n i = 1;\\n rows ={};\\n do row over result.fetch;\\n rr = {};\\n j = 1;\\n do key,v over row;\\n rr[j] = override(columns[j].Type, v);\\n j = j + 1;\\n end;\\n rows[i] = rr;\\n i = i + 1;\\n end;\\n\\n pagePrev = max(from - count, 1);\\n \\n if ( to eq rowCount ) then do; \\n pageNext = -1; \\n end; \\n else do ; \\n pageNext = min(to + 1, rowCount); \\n end; \\n table = {caslib=caslib, name=name};\\n pagination = {\\n next= {qs={from=pageNext, count=count, format=format}, data={where = where}, version=2, table=table },\\n prev={from=pagePrev, count=count, format=format, where=where, version=2, table=table}\\n };\\n return( \\n {pagination = pagination, data = {schema=columns, rows=rows }}\\n );\\n end; \\n \\n \\n /*\\n * For non-primary column types set new content\\n */\\n\\n function override(type, iv);\\n if (type EQ 'varbinary') then v = '...varbinary';\\n else if (type EQ 'blob') then v = '...blob';\\n else if (type EQ 'table') then v = '...table';\\n else if (type EQ 'dictionary') then v = '...dictionary';\\n else if (type EQ 'list') then v = '...list';\\n else if (type EQ 'isArray') then v = '...array';\\n else v = iv;\\n return v;\\n end;\\n\\n \\n \";\n return code;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (casFetchRowsv2);\n\n//# sourceURL=webpack://restaflib/./programs/casFetchRowsv2.js?");
1144
-
1145
- /***/ }),
1146
-
1147
1134
  /***/ "./programs/commonCasl.js":
1148
1135
  /*!********************************!*\
1149
1136
  !*** ./programs/commonCasl.js ***!
@@ -1166,7 +1153,7 @@ eval("/*\r\n* Copyright © 2019, SAS Institute Inc., Cary, NC, USA. All Rights
1166
1153
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1167
1154
 
1168
1155
  "use strict";
1169
- eval("/* harmony import */ var _scoreCasl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scoreCasl */ \"./programs/scoreCasl.js\");\n/* harmony import */ var _scoreCasl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_scoreCasl__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _casFetchData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./casFetchData */ \"./programs/casFetchData.js\");\n/* harmony import */ var _commonCasl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./commonCasl */ \"./programs/commonCasl.js\");\n/* harmony import */ var _casFetchRows__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./casFetchRows */ \"./programs/casFetchRows.js\");\n/* harmony import */ var _casFetchRowsv2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./casFetchRowsv2 */ \"./programs/casFetchRowsv2.js\");\n/*\r\n* Copyright © 2019, 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/* harmony default export */ __webpack_exports__[\"a\"] = ({\n commonCasl: _commonCasl__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"],\n casFetchData: _casFetchData__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"],\n casFetchRows: _casFetchRows__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"],\n scoreCasl: _scoreCasl__WEBPACK_IMPORTED_MODULE_0___default.a,\n casFetchRowsv2: _casFetchRowsv2__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]\n});\n\n//# sourceURL=webpack://restaflib/./programs/index.js?");
1156
+ eval("/* harmony import */ var _scoreCasl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scoreCasl */ \"./programs/scoreCasl.js\");\n/* harmony import */ var _scoreCasl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_scoreCasl__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _casFetchData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./casFetchData */ \"./programs/casFetchData.js\");\n/* harmony import */ var _commonCasl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./commonCasl */ \"./programs/commonCasl.js\");\n/* harmony import */ var _casFetchRows__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./casFetchRows */ \"./programs/casFetchRows.js\");\n/*\r\n* Copyright © 2019, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\r\n* SPDX-License-Identifier: Apache-2.0\r\n*/\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n commonCasl: _commonCasl__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"],\n casFetchData: _casFetchData__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"],\n casFetchRows: _casFetchRows__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"],\n scoreCasl: _scoreCasl__WEBPACK_IMPORTED_MODULE_0___default.a\n});\n\n//# sourceURL=webpack://restaflib/./programs/index.js?");
1170
1157
 
1171
1158
  /***/ }),
1172
1159
 
@@ -1243,7 +1230,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
1243
1230
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1244
1231
 
1245
1232
  "use strict";
1246
- 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 © 2019, 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\nfunction uploadSrc(_x, _x2, _x3, _x4, _x5) {\n return _uploadSrc.apply(this, arguments);\n}\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, casl, r;\n\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _fileInfo$output = fileInfo.output, caslib = _fileInfo$output.caslib, name = _fileInfo$output.name;\n\n if (!(name == null)) {\n _context.next = 3;\n break;\n }\n\n throw 'Please specify table as caslib.name';\n\n case 3:\n // name = name.toLowerCase(name);\n // setup header for upload and the rest of the payload\n JSON_Parameters = {\n casout: {\n caslib: caslib,\n\n /* a valid caslib */\n name: name\n /* name of output file on cas server */\n\n },\n importOptions: {\n fileType: fileInfo.fileType\n /* type of the file being uploaded */\n\n }\n };\n\n if (fileInfo.fileExt === 'sas' || fileInfo.fileExt === 'ds2') {\n JSON_Parameters.importOptions.delimiter = '\\\\';\n }\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 = 8;\n return store.runAction(session, p);\n\n case 8:\n if (!(save === true)) {\n _context.next = 13;\n break;\n }\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 = 12;\n return Object(_caslRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, casl, null);\n\n case 12:\n r = _context.sent;\n\n case 13:\n return _context.abrupt(\"return\", \"Upload of \".concat(fileInfo.source, \" to \").concat((fileInfo.output, caslib), \".\").concat(fileInfo.output.name, \" completed\"));\n\n case 14:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _uploadSrc.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (uploadSrc);\n\n//# sourceURL=webpack://restaflib/./uploadHandlers/uploadSrc.js?");
1233
+ 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 © 2019, 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\nfunction uploadSrc(_x, _x2, _x3, _x4, _x5) {\n return _uploadSrc.apply(this, arguments);\n}\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;\n\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _fileInfo$output = fileInfo.output, caslib = _fileInfo$output.caslib, name = _fileInfo$output.name;\n\n if (!(name == null)) {\n _context.next = 3;\n break;\n }\n\n throw 'Please specify table as caslib.name';\n\n case 3:\n // name = name.toLowerCase(name);\n // setup header for upload and the rest of the payload\n JSON_Parameters = {\n casout: {\n caslib: caslib,\n\n /* a valid caslib */\n name: name\n /* name of output file on cas server */\n\n },\n importOptions: {\n fileType: fileInfo.fileType\n /* type of the file being uploaded */\n\n }\n };\n\n if (fileInfo.fileExt === 'sas' || fileInfo.fileExt === 'ds2') {\n JSON_Parameters.importOptions.delimiter = '\\\\';\n }\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 console.log(p.data);\n debugger;\n _context.next = 10;\n return store.runAction(session, p);\n\n case 10:\n r = _context.sent;\n console.log(r.items().toJS());\n debugger;\n\n if (!(save === true)) {\n _context.next = 18;\n break;\n }\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 = 17;\n return Object(_caslRun__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(store, session, casl, null);\n\n case 17:\n _r = _context.sent;\n\n case 18:\n return _context.abrupt(\"return\", \"Upload of \".concat(fileInfo.source, \" to \").concat((fileInfo.output, caslib), \".\").concat(fileInfo.output.name, \" completed\"));\n\n case 19:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return _uploadSrc.apply(this, arguments);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (uploadSrc);\n\n//# sourceURL=webpack://restaflib/./uploadHandlers/uploadSrc.js?");
1247
1234
 
1248
1235
  /***/ }),
1249
1236
 
@@ -1256,7 +1243,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_
1256
1243
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1257
1244
 
1258
1245
  "use strict";
1259
- eval("/* WEBPACK VAR INJECTION */(function(Buffer) {/* 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\n/*\r\n * Copyright © 2019, 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;\n /* option for file reader */\n\n var contentType = 'binary/octet-stream';\n /* header content-type on API call */\n\n var fileType;\n /* fileType for use in API call */\n\n var handler = _uploadHandlers__WEBPACK_IMPORTED_MODULE_1__[/* uploadSrc */ \"c\"];\n var transform = noChange;\n var fext = source.split('.').pop().toLowerCase();\n\n switch (fext) {\n case 'sas7bdat':\n {\n fileType = 'basesas';\n break;\n }\n\n case 'sashdat':\n {\n fileType = 'hdat';\n break;\n }\n\n case 'csv':\n {\n fileType = fext;\n fileOptions = 'UTF8';\n break;\n }\n\n case 'xslx':\n case 'xsl':\n {\n fileType = fext;\n break;\n }\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\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\n default:\n {\n throw \"Currently file type of \".concat(fext, \" is not supported\");\n }\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\n return {\n source: source,\n output: {\n caslib: caslib,\n name: name.toLowerCase()\n },\n fileType: fileType\n /* for cas actions */\n ,\n fileExt: fext,\n fileOptions: fileOptions,\n transform: transform,\n contentType: contentType,\n handler: handler\n };\n\n function toBase64(data) {\n return new Buffer.from(data).toString('base64');\n }\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, ''); // convert to a csv\n\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\n function noChange(data) {\n return data;\n }\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (uploadSetup);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/buffer/index.js */ \"../../../node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack://restaflib/./uploadSetup.js?");
1246
+ eval("/* WEBPACK VAR INJECTION */(function(Buffer) {/* 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\n/*\r\n * Copyright © 2019, 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;\n /* option for file reader */\n\n var contentType = 'binary/octet-stream';\n /* header content-type on API call */\n\n var fileType;\n /* fileType for use in API call */\n\n var handler = _uploadHandlers__WEBPACK_IMPORTED_MODULE_1__[/* uploadSrc */ \"c\"];\n var transform = noChange;\n var fext;\n\n if (source == null) {\n fext = 'csv';\n } else {\n fext = source.split('.').pop().toLowerCase();\n }\n\n ;\n\n switch (fext) {\n case 'sas7bdat':\n {\n fileType = 'basesas';\n break;\n }\n\n case 'sashdat':\n {\n fileType = 'hdat';\n break;\n }\n\n case 'csv':\n {\n fileType = fext;\n fileOptions = 'UTF8';\n break;\n }\n\n case 'xslx':\n case 'xsl':\n {\n fileType = fext;\n break;\n }\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\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\n default:\n {\n throw \"Currently file type of \".concat(fext, \" is not supported\");\n }\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\n return {\n source: source,\n output: {\n caslib: caslib,\n name: name.toLowerCase()\n },\n fileType: fileType\n /* for cas actions */\n ,\n fileExt: fext,\n fileOptions: fileOptions,\n transform: transform,\n contentType: contentType,\n handler: handler\n };\n\n function toBase64(data) {\n return new Buffer.from(data).toString('base64');\n }\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, ''); // convert to a csv\n\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\n function noChange(data) {\n return data;\n }\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (uploadSetup);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/buffer/index.js */ \"../../../node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack://restaflib/./uploadSetup.js?");
1260
1247
 
1261
1248
  /***/ }),
1262
1249