@scout9/app 1.0.0-alpha.0.8.8 → 1.0.0-alpha.0.9.0
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/_rollupPluginBabelHelpers-9c73c95c.cjs +733 -0
- package/dist/{dev-b085bde6.cjs → dev-024a0325.cjs} +204 -203
- package/dist/{index-02973b72.cjs → index-93d877d8.cjs} +112 -112
- package/dist/index.cjs +5 -4
- package/dist/{macros-f62cceac.cjs → macros-77983cef.cjs} +4 -2
- package/dist/{multipart-parser-efb778dc.cjs → multipart-parser-593e5511.cjs} +5 -4
- package/dist/schemas.cjs +2 -1
- package/dist/spirits.cjs +1175 -2
- package/dist/testing-tools.cjs +4 -3
- package/package.json +1 -1
- package/src/public.d.ts +5 -0
- package/src/runtime/schemas/entity.js +1 -0
- package/src/testing-tools/spirits.js +67 -7
- package/types/index.d.ts +32 -27
- package/types/index.d.ts.map +1 -1
- package/dist/spirits-2d7d7919.cjs +0 -1734
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var dev = require("./dev-
|
|
5
|
-
var macros = require("./macros-
|
|
3
|
+
var _rollupPluginBabelHelpers = require("./_rollupPluginBabelHelpers-9c73c95c.cjs");
|
|
4
|
+
var dev = require("./dev-024a0325.cjs");
|
|
5
|
+
var macros = require("./macros-77983cef.cjs");
|
|
6
6
|
var require$$0 = require('fs');
|
|
7
7
|
var require$$2$1 = require('events');
|
|
8
8
|
var require$$1 = require('path');
|
|
@@ -29483,7 +29483,7 @@ class Body {
|
|
|
29483
29483
|
}
|
|
29484
29484
|
const {
|
|
29485
29485
|
toFormData
|
|
29486
|
-
} = await Promise.resolve().then(function () { return require("./multipart-parser-
|
|
29486
|
+
} = await Promise.resolve().then(function () { return require("./multipart-parser-593e5511.cjs"); });
|
|
29487
29487
|
return toFormData(this.body, ct);
|
|
29488
29488
|
}
|
|
29489
29489
|
|
|
@@ -41729,11 +41729,11 @@ function platformApi(_x) {
|
|
|
41729
41729
|
return _platformApi.apply(this, arguments);
|
|
41730
41730
|
}
|
|
41731
41731
|
function _platformApi() {
|
|
41732
|
-
_platformApi =
|
|
41732
|
+
_platformApi = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee(url) {
|
|
41733
41733
|
var options,
|
|
41734
41734
|
retries,
|
|
41735
41735
|
_args = arguments;
|
|
41736
|
-
return
|
|
41736
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
|
|
41737
41737
|
while (1) switch (_context.prev = _context.next) {
|
|
41738
41738
|
case 0:
|
|
41739
41739
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
@@ -41750,10 +41750,10 @@ function _platformApi() {
|
|
|
41750
41750
|
}
|
|
41751
41751
|
throw new Error('Missing required environment variable "SCOUT9_API_KEY"');
|
|
41752
41752
|
case 6:
|
|
41753
|
-
return _context.abrupt("return", fetch(url,
|
|
41753
|
+
return _context.abrupt("return", fetch(url, _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({
|
|
41754
41754
|
method: 'GET'
|
|
41755
41755
|
}, options), {}, {
|
|
41756
|
-
headers:
|
|
41756
|
+
headers: _rollupPluginBabelHelpers._objectSpread2({
|
|
41757
41757
|
'Authorization': process.env.SCOUT9_API_KEY || ''
|
|
41758
41758
|
}, options.headers || {})
|
|
41759
41759
|
})).then(function (res) {
|
|
@@ -41783,9 +41783,9 @@ function syncData(_x) {
|
|
|
41783
41783
|
return _syncData.apply(this, arguments);
|
|
41784
41784
|
}
|
|
41785
41785
|
function _syncData() {
|
|
41786
|
-
_syncData =
|
|
41786
|
+
_syncData = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee(config) {
|
|
41787
41787
|
var result, agents, entities, organization, initialContext;
|
|
41788
|
-
return
|
|
41788
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
|
|
41789
41789
|
while (1) switch (_context.prev = _context.next) {
|
|
41790
41790
|
case 0:
|
|
41791
41791
|
if (process.env.SCOUT9_API_KEY) {
|
|
@@ -41816,7 +41816,7 @@ function _syncData() {
|
|
|
41816
41816
|
accumulator.push(agent);
|
|
41817
41817
|
} else {
|
|
41818
41818
|
// Merge agent
|
|
41819
|
-
accumulator[existingAgentIndex] =
|
|
41819
|
+
accumulator[existingAgentIndex] = _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, accumulator[existingAgentIndex]), agent);
|
|
41820
41820
|
}
|
|
41821
41821
|
return accumulator;
|
|
41822
41822
|
}, config.agents);
|
|
@@ -41838,7 +41838,7 @@ function _syncData() {
|
|
|
41838
41838
|
accumulator.push(entity);
|
|
41839
41839
|
} else {
|
|
41840
41840
|
// Merge agent
|
|
41841
|
-
accumulator[existingEntityIndex] =
|
|
41841
|
+
accumulator[existingEntityIndex] = _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, accumulator[existingEntityIndex]), entity);
|
|
41842
41842
|
}
|
|
41843
41843
|
return accumulator;
|
|
41844
41844
|
}, config.entities);
|
|
@@ -41849,8 +41849,8 @@ function _syncData() {
|
|
|
41849
41849
|
return a.id === entity.id;
|
|
41850
41850
|
});
|
|
41851
41851
|
});
|
|
41852
|
-
config.organization =
|
|
41853
|
-
config.initialContext = [].concat(
|
|
41852
|
+
config.organization = _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, (config === null || config === void 0 ? void 0 : config.organization) || {}), organization || {});
|
|
41853
|
+
config.initialContext = [].concat(_rollupPluginBabelHelpers._toConsumableArray(Array.isArray(config === null || config === void 0 ? void 0 : config.initialContext) ? config.initialContext : []), _rollupPluginBabelHelpers._toConsumableArray(Array.isArray(initialContext) ? initialContext : []));
|
|
41854
41854
|
return _context.abrupt("return", config);
|
|
41855
41855
|
case 13:
|
|
41856
41856
|
case "end":
|
|
@@ -41870,9 +41870,9 @@ function loadUserPackageJson(_x) {
|
|
|
41870
41870
|
return _loadUserPackageJson.apply(this, arguments);
|
|
41871
41871
|
}
|
|
41872
41872
|
function _loadUserPackageJson() {
|
|
41873
|
-
_loadUserPackageJson =
|
|
41873
|
+
_loadUserPackageJson = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee(_ref) {
|
|
41874
41874
|
var _ref$cwd, cwd, packageJsonPath, packageTestJsonPath, packageJsonUrl, packageTestJsonUrl, isTest, targetPkgUrl, pkg;
|
|
41875
|
-
return
|
|
41875
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
|
|
41876
41876
|
while (1) switch (_context.prev = _context.next) {
|
|
41877
41877
|
case 0:
|
|
41878
41878
|
_ref$cwd = _ref.cwd, cwd = _ref$cwd === void 0 ? process.cwd() : _ref$cwd;
|
|
@@ -41884,7 +41884,7 @@ function _loadUserPackageJson() {
|
|
|
41884
41884
|
targetPkgUrl = isTest ? packageTestJsonUrl : packageJsonUrl;
|
|
41885
41885
|
_context.t0 = JSON;
|
|
41886
41886
|
_context.next = 10;
|
|
41887
|
-
return fs__default["default"].readFile(new URL(targetPkgUrl, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-
|
|
41887
|
+
return fs__default["default"].readFile(new URL(targetPkgUrl, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-93d877d8.js', document.baseURI).href))), 'utf-8');
|
|
41888
41888
|
case 10:
|
|
41889
41889
|
_context.t1 = _context.sent;
|
|
41890
41890
|
pkg = _context.t0.parse.call(_context.t0, _context.t1);
|
|
@@ -41914,7 +41914,7 @@ var EventResponse = /*#__PURE__*/function () {
|
|
|
41914
41914
|
* @throws {Error} If the body is not a valid object.
|
|
41915
41915
|
*/
|
|
41916
41916
|
function EventResponse(body, init) {
|
|
41917
|
-
|
|
41917
|
+
_rollupPluginBabelHelpers._classCallCheck(this, EventResponse);
|
|
41918
41918
|
/**
|
|
41919
41919
|
* @type {T}
|
|
41920
41920
|
* @private
|
|
@@ -41926,7 +41926,7 @@ var EventResponse = /*#__PURE__*/function () {
|
|
|
41926
41926
|
* @private
|
|
41927
41927
|
*/
|
|
41928
41928
|
this.init = init;
|
|
41929
|
-
if (
|
|
41929
|
+
if (_rollupPluginBabelHelpers._typeof(this.body) !== 'object') {
|
|
41930
41930
|
throw new Error("EventResponse body in not a valid object:\n\"".concat(JSON.stringify(body, null, 2), "\""));
|
|
41931
41931
|
}
|
|
41932
41932
|
}
|
|
@@ -41935,7 +41935,7 @@ var EventResponse = /*#__PURE__*/function () {
|
|
|
41935
41935
|
* Get the response object.
|
|
41936
41936
|
* @returns {Response} The response object.
|
|
41937
41937
|
*/
|
|
41938
|
-
|
|
41938
|
+
_rollupPluginBabelHelpers._createClass(EventResponse, [{
|
|
41939
41939
|
key: "response",
|
|
41940
41940
|
get: function get() {
|
|
41941
41941
|
return Response.json(this.body, this.init);
|
|
@@ -41985,7 +41985,7 @@ function processPayload(payload) {
|
|
|
41985
41985
|
var maxKb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 250;
|
|
41986
41986
|
if (Buffer.byteLength(JSON.stringify(payload.event), 'utf8') / 1024 > maxKb) {
|
|
41987
41987
|
payload.event;
|
|
41988
|
-
var rest =
|
|
41988
|
+
var rest = _rollupPluginBabelHelpers._objectWithoutProperties(payload, _excluded); // Remove event from payload, too large
|
|
41989
41989
|
return rest;
|
|
41990
41990
|
} else {
|
|
41991
41991
|
return payload;
|
|
@@ -42010,10 +42010,10 @@ function did(_x) {
|
|
|
42010
42010
|
* @return {Promise<boolean>}
|
|
42011
42011
|
*/
|
|
42012
42012
|
function _did() {
|
|
42013
|
-
_did =
|
|
42013
|
+
_did = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee(prompt) {
|
|
42014
42014
|
var _event$context;
|
|
42015
42015
|
var convoId, event, _yield$Scout9Api$did$, value;
|
|
42016
|
-
return
|
|
42016
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context2) {
|
|
42017
42017
|
while (1) switch (_context2.prev = _context2.next) {
|
|
42018
42018
|
case 0:
|
|
42019
42019
|
convoId = dev.MacroGlobals.$convo();
|
|
@@ -42077,7 +42077,7 @@ function does(_x2) {
|
|
|
42077
42077
|
* @return {Promise<ContextOutput>}
|
|
42078
42078
|
*/
|
|
42079
42079
|
function _does() {
|
|
42080
|
-
_does =
|
|
42080
|
+
_does = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee2(prompt) {
|
|
42081
42081
|
var _event$context2;
|
|
42082
42082
|
var relation,
|
|
42083
42083
|
convoId,
|
|
@@ -42085,7 +42085,7 @@ function _does() {
|
|
|
42085
42085
|
_yield$Scout9Api$does,
|
|
42086
42086
|
value,
|
|
42087
42087
|
_args2 = arguments;
|
|
42088
|
-
return
|
|
42088
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee2$(_context3) {
|
|
42089
42089
|
while (1) switch (_context3.prev = _context3.next) {
|
|
42090
42090
|
case 0:
|
|
42091
42091
|
relation = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : 'customer';
|
|
@@ -42128,10 +42128,10 @@ function context(_x3, _x4) {
|
|
|
42128
42128
|
return _context.apply(this, arguments);
|
|
42129
42129
|
}
|
|
42130
42130
|
function _context() {
|
|
42131
|
-
_context =
|
|
42131
|
+
_context = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee3(prompt, examples) {
|
|
42132
42132
|
var _event$context3;
|
|
42133
42133
|
var convoId, event, _yield$Scout9Api$capt, value;
|
|
42134
|
-
return
|
|
42134
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee3$(_context4) {
|
|
42135
42135
|
while (1) switch (_context4.prev = _context4.next) {
|
|
42136
42136
|
case 0:
|
|
42137
42137
|
convoId = dev.MacroGlobals.$convo();
|
|
@@ -42177,9 +42177,9 @@ function loadEntityApiConfig(_x, _x2) {
|
|
|
42177
42177
|
* @returns {Promise<EntitiesBuildConfig>}
|
|
42178
42178
|
*/
|
|
42179
42179
|
function _loadEntityApiConfig() {
|
|
42180
|
-
_loadEntityApiConfig =
|
|
42180
|
+
_loadEntityApiConfig = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee(cwd, filePath) {
|
|
42181
42181
|
var dir, extension, apiFilePath, mod, config, methods, key;
|
|
42182
|
-
return
|
|
42182
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
|
|
42183
42183
|
while (1) switch (_context.prev = _context.next) {
|
|
42184
42184
|
case 0:
|
|
42185
42185
|
dir = path__default["default"].dirname(filePath);
|
|
@@ -42216,7 +42216,7 @@ function loadEntitiesConfig() {
|
|
|
42216
42216
|
return _loadEntitiesConfig.apply(this, arguments);
|
|
42217
42217
|
}
|
|
42218
42218
|
function _loadEntitiesConfig() {
|
|
42219
|
-
_loadEntitiesConfig =
|
|
42219
|
+
_loadEntitiesConfig = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee2() {
|
|
42220
42220
|
var _ref,
|
|
42221
42221
|
_ref$cwd,
|
|
42222
42222
|
cwd,
|
|
@@ -42233,7 +42233,7 @@ function _loadEntitiesConfig() {
|
|
|
42233
42233
|
_i,
|
|
42234
42234
|
_data,
|
|
42235
42235
|
_args4 = arguments;
|
|
42236
|
-
return
|
|
42236
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee2$(_context4) {
|
|
42237
42237
|
while (1) switch (_context4.prev = _context4.next) {
|
|
42238
42238
|
case 0:
|
|
42239
42239
|
_ref = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {}, _ref$cwd = _ref.cwd, cwd = _ref$cwd === void 0 ? process.cwd() : _ref$cwd, _ref$src = _ref.src, src = _ref$src === void 0 ? 'src' : _ref$src;
|
|
@@ -42244,11 +42244,11 @@ function _loadEntitiesConfig() {
|
|
|
42244
42244
|
absolute: true
|
|
42245
42245
|
});
|
|
42246
42246
|
data = [];
|
|
42247
|
-
_iterator =
|
|
42247
|
+
_iterator = _rollupPluginBabelHelpers._createForOfIteratorHelper(filePaths);
|
|
42248
42248
|
_context4.prev = 5;
|
|
42249
|
-
_loop2 = /*#__PURE__*/
|
|
42249
|
+
_loop2 = /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _loop2() {
|
|
42250
42250
|
var filePath, segments, srcIndex, parents, api;
|
|
42251
|
-
return
|
|
42251
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _loop2$(_context3) {
|
|
42252
42252
|
while (1) switch (_context3.prev = _context3.next) {
|
|
42253
42253
|
case 0:
|
|
42254
42254
|
filePath = _step.value;
|
|
@@ -42304,9 +42304,9 @@ function _loadEntitiesConfig() {
|
|
|
42304
42304
|
return _context4.finish(17);
|
|
42305
42305
|
case 20:
|
|
42306
42306
|
specialEntities = ['agents'];
|
|
42307
|
-
_loop = /*#__PURE__*/
|
|
42307
|
+
_loop = /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _loop() {
|
|
42308
42308
|
var _data$_i, filePath, parents, api, entityConfig, fileName, isSpecial, entityConfigHandler, entityType, result, entityProjectConfig, existingIndex;
|
|
42309
|
-
return
|
|
42309
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _loop$(_context2) {
|
|
42310
42310
|
while (1) switch (_context2.prev = _context2.next) {
|
|
42311
42311
|
case 0:
|
|
42312
42312
|
_data$_i = _data[_i], filePath = _data$_i.filePath, parents = _data$_i.parents, api = _data$_i.api;
|
|
@@ -42369,7 +42369,7 @@ function _loadEntitiesConfig() {
|
|
|
42369
42369
|
return _context2.abrupt("return", 1);
|
|
42370
42370
|
case 29:
|
|
42371
42371
|
// Validate project configuration
|
|
42372
|
-
entityProjectConfig =
|
|
42372
|
+
entityProjectConfig = _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, entityConfig), {}, {
|
|
42373
42373
|
entity: parents[0],
|
|
42374
42374
|
entities: parents.reverse(),
|
|
42375
42375
|
api: api
|
|
@@ -42396,11 +42396,11 @@ function _loadEntitiesConfig() {
|
|
|
42396
42396
|
}
|
|
42397
42397
|
throw new Error("Invalid entity configuration at \"".concat(filePath, "\", entity name mismatch"));
|
|
42398
42398
|
case 41:
|
|
42399
|
-
config[existingIndex] =
|
|
42400
|
-
definitions: [].concat(
|
|
42401
|
-
training: [].concat(
|
|
42402
|
-
tests: [].concat(
|
|
42403
|
-
api: !config[existingIndex].api && !entityProjectConfig.api ? null :
|
|
42399
|
+
config[existingIndex] = _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, config[existingIndex]), {}, {
|
|
42400
|
+
definitions: [].concat(_rollupPluginBabelHelpers._toConsumableArray(config[existingIndex].definitions), _rollupPluginBabelHelpers._toConsumableArray(entityProjectConfig.definitions || [])),
|
|
42401
|
+
training: [].concat(_rollupPluginBabelHelpers._toConsumableArray(config[existingIndex].training), _rollupPluginBabelHelpers._toConsumableArray(entityProjectConfig.training || [])),
|
|
42402
|
+
tests: [].concat(_rollupPluginBabelHelpers._toConsumableArray(config[existingIndex].tests), _rollupPluginBabelHelpers._toConsumableArray(entityProjectConfig.tests || [])),
|
|
42403
|
+
api: !config[existingIndex].api && !entityProjectConfig.api ? null : _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, config[existingIndex].api || {}), entityProjectConfig.api || {})
|
|
42404
42404
|
});
|
|
42405
42405
|
_context2.next = 45;
|
|
42406
42406
|
break;
|
|
@@ -42452,7 +42452,7 @@ function loadWorkflowsConfig() {
|
|
|
42452
42452
|
return _loadWorkflowsConfig.apply(this, arguments);
|
|
42453
42453
|
}
|
|
42454
42454
|
function _loadWorkflowsConfig() {
|
|
42455
|
-
_loadWorkflowsConfig =
|
|
42455
|
+
_loadWorkflowsConfig = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee() {
|
|
42456
42456
|
var _ref,
|
|
42457
42457
|
_ref$cwd,
|
|
42458
42458
|
cwd,
|
|
@@ -42460,7 +42460,7 @@ function _loadWorkflowsConfig() {
|
|
|
42460
42460
|
src,
|
|
42461
42461
|
config,
|
|
42462
42462
|
_args = arguments;
|
|
42463
|
-
return
|
|
42463
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
|
|
42464
42464
|
while (1) switch (_context.prev = _context.next) {
|
|
42465
42465
|
case 0:
|
|
42466
42466
|
_ref = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref$cwd = _ref.cwd, cwd = _ref$cwd === void 0 ? process.cwd() : _ref$cwd, _ref$src = _ref.src, src = _ref$src === void 0 ? 'src' : _ref$src;
|
|
@@ -42556,7 +42556,7 @@ var ProjectModule = /*#__PURE__*/function () {
|
|
|
42556
42556
|
templateBuilder = _ref.templateBuilder,
|
|
42557
42557
|
_ref$logger = _ref.logger,
|
|
42558
42558
|
logger = _ref$logger === void 0 ? new dev.ProgressLogger() : _ref$logger;
|
|
42559
|
-
|
|
42559
|
+
_rollupPluginBabelHelpers._classCallCheck(this, ProjectModule);
|
|
42560
42560
|
this.cwd = cwd;
|
|
42561
42561
|
this.autoSave = autoSave;
|
|
42562
42562
|
this.logger = logger;
|
|
@@ -42582,17 +42582,17 @@ var ProjectModule = /*#__PURE__*/function () {
|
|
|
42582
42582
|
* @param {boolean} ignoreModule - if true, will not require the module
|
|
42583
42583
|
* @returns {Promise<{mod?: function, exe: string; filePath: string}>}
|
|
42584
42584
|
*/
|
|
42585
|
-
|
|
42585
|
+
_rollupPluginBabelHelpers._createClass(ProjectModule, [{
|
|
42586
42586
|
key: "load",
|
|
42587
42587
|
value: (function () {
|
|
42588
|
-
var _load =
|
|
42588
|
+
var _load = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee() {
|
|
42589
42589
|
var config,
|
|
42590
42590
|
ignoreModule,
|
|
42591
42591
|
filePath,
|
|
42592
42592
|
_defaultFilepath,
|
|
42593
42593
|
mod,
|
|
42594
42594
|
_args = arguments;
|
|
42595
|
-
return
|
|
42595
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
|
|
42596
42596
|
while (1) switch (_context.prev = _context.next) {
|
|
42597
42597
|
case 0:
|
|
42598
42598
|
config = _args.length > 0 && _args[0] !== undefined ? _args[0] : undefined;
|
|
@@ -42670,7 +42670,7 @@ var ProjectModule = /*#__PURE__*/function () {
|
|
|
42670
42670
|
}, {
|
|
42671
42671
|
key: "save",
|
|
42672
42672
|
value: (function () {
|
|
42673
|
-
var _save =
|
|
42673
|
+
var _save = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee2(config) {
|
|
42674
42674
|
var _this$logger2, _this$logger2$info;
|
|
42675
42675
|
var ignoreModule,
|
|
42676
42676
|
filePathOverride,
|
|
@@ -42681,7 +42681,7 @@ var ProjectModule = /*#__PURE__*/function () {
|
|
|
42681
42681
|
_this$logger$warn,
|
|
42682
42682
|
mod,
|
|
42683
42683
|
_args2 = arguments;
|
|
42684
|
-
return
|
|
42684
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
42685
42685
|
while (1) switch (_context2.prev = _context2.next) {
|
|
42686
42686
|
case 0:
|
|
42687
42687
|
ignoreModule = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : false;
|
|
@@ -42748,12 +42748,12 @@ var ProjectModule = /*#__PURE__*/function () {
|
|
|
42748
42748
|
}, {
|
|
42749
42749
|
key: "resolve",
|
|
42750
42750
|
value: (function () {
|
|
42751
|
-
var _resolve =
|
|
42751
|
+
var _resolve = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee3(mod) {
|
|
42752
42752
|
var acceptableTypes,
|
|
42753
42753
|
result,
|
|
42754
42754
|
entityType,
|
|
42755
42755
|
_args3 = arguments;
|
|
42756
|
-
return
|
|
42756
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
42757
42757
|
while (1) switch (_context3.prev = _context3.next) {
|
|
42758
42758
|
case 0:
|
|
42759
42759
|
acceptableTypes = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : ['async function', 'function', 'array', 'object', 'json object'];
|
|
@@ -42806,7 +42806,7 @@ var ProjectModule = /*#__PURE__*/function () {
|
|
|
42806
42806
|
if (paths.length > 1) {
|
|
42807
42807
|
throw new Error("Input Error: Multiple files found - [".concat(paths.join(', '), "], remove one and rerun \"scout9 sync\" to fix"));
|
|
42808
42808
|
}
|
|
42809
|
-
var _paths =
|
|
42809
|
+
var _paths = _rollupPluginBabelHelpers._slicedToArray(paths, 1),
|
|
42810
42810
|
filePath = _paths[0];
|
|
42811
42811
|
if (!filePath) {
|
|
42812
42812
|
throw new Error("Not Found: No filepath available in ".concat(_filePath));
|
|
@@ -42834,7 +42834,7 @@ var ProjectFiles = /*#__PURE__*/function () {
|
|
|
42834
42834
|
_ref2$src = _ref2.src,
|
|
42835
42835
|
src = _ref2$src === void 0 ? './src' : _ref2$src,
|
|
42836
42836
|
logger = _ref2.logger;
|
|
42837
|
-
|
|
42837
|
+
_rollupPluginBabelHelpers._classCallCheck(this, ProjectFiles);
|
|
42838
42838
|
this.cwd = cwd;
|
|
42839
42839
|
this.src = src;
|
|
42840
42840
|
this.autoSave = autoSave;
|
|
@@ -42905,16 +42905,16 @@ var ProjectFiles = /*#__PURE__*/function () {
|
|
|
42905
42905
|
* Loads all the project configuration data
|
|
42906
42906
|
* @returns {Promise<Scout9ProjectBuildConfig>}
|
|
42907
42907
|
*/
|
|
42908
|
-
|
|
42908
|
+
_rollupPluginBabelHelpers._createClass(ProjectFiles, [{
|
|
42909
42909
|
key: "load",
|
|
42910
42910
|
value: (function () {
|
|
42911
|
-
var _load2 =
|
|
42911
|
+
var _load2 = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee4() {
|
|
42912
42912
|
var projectConfig, mod, result, _iterator, _step, _this$logger3, _this$logger3$info, _this$logger4, entityConfig;
|
|
42913
|
-
return
|
|
42913
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
42914
42914
|
while (1) switch (_context4.prev = _context4.next) {
|
|
42915
42915
|
case 0:
|
|
42916
|
-
_context4.t0 =
|
|
42917
|
-
_context4.t1 =
|
|
42916
|
+
_context4.t0 = _rollupPluginBabelHelpers._objectSpread2;
|
|
42917
|
+
_context4.t1 = _rollupPluginBabelHelpers._objectSpread2;
|
|
42918
42918
|
_context4.t2 = {};
|
|
42919
42919
|
_context4.next = 5;
|
|
42920
42920
|
return this._loadEnv();
|
|
@@ -42964,7 +42964,7 @@ var ProjectFiles = /*#__PURE__*/function () {
|
|
|
42964
42964
|
throw dev.logUserValidationError(result.error, "".concat(this.src, "/index.js"));
|
|
42965
42965
|
case 26:
|
|
42966
42966
|
// Log
|
|
42967
|
-
_iterator =
|
|
42967
|
+
_iterator = _rollupPluginBabelHelpers._createForOfIteratorHelper(projectConfig.entities);
|
|
42968
42968
|
try {
|
|
42969
42969
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
42970
42970
|
entityConfig = _step.value;
|
|
@@ -42997,7 +42997,7 @@ var ProjectFiles = /*#__PURE__*/function () {
|
|
|
42997
42997
|
}, {
|
|
42998
42998
|
key: "sync",
|
|
42999
42999
|
value: (function () {
|
|
43000
|
-
var _sync =
|
|
43000
|
+
var _sync = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee5(config) {
|
|
43001
43001
|
var cb,
|
|
43002
43002
|
_iterator2,
|
|
43003
43003
|
_step2,
|
|
@@ -43006,7 +43006,7 @@ var ProjectFiles = /*#__PURE__*/function () {
|
|
|
43006
43006
|
paths,
|
|
43007
43007
|
filepath,
|
|
43008
43008
|
_args5 = arguments;
|
|
43009
|
-
return
|
|
43009
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
43010
43010
|
while (1) switch (_context5.prev = _context5.next) {
|
|
43011
43011
|
case 0:
|
|
43012
43012
|
cb = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : function (message, type) {};
|
|
@@ -43033,7 +43033,7 @@ var ProjectFiles = /*#__PURE__*/function () {
|
|
|
43033
43033
|
return this.customer.load(config, true);
|
|
43034
43034
|
case 16:
|
|
43035
43035
|
// If entity file doesn't exist, create it
|
|
43036
|
-
_iterator2 =
|
|
43036
|
+
_iterator2 = _rollupPluginBabelHelpers._createForOfIteratorHelper(config.entities);
|
|
43037
43037
|
_context5.prev = 17;
|
|
43038
43038
|
_iterator2.s();
|
|
43039
43039
|
case 19:
|
|
@@ -43102,9 +43102,9 @@ var ProjectFiles = /*#__PURE__*/function () {
|
|
|
43102
43102
|
}, {
|
|
43103
43103
|
key: "_loadEnv",
|
|
43104
43104
|
value: (function () {
|
|
43105
|
-
var _loadEnv2 =
|
|
43105
|
+
var _loadEnv2 = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee6() {
|
|
43106
43106
|
var configFilePath, exists, _yield$loadUserPackag, pkg, tag, _yield$this$root$load, mod, filePath, root;
|
|
43107
|
-
return
|
|
43107
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
43108
43108
|
while (1) switch (_context6.prev = _context6.next) {
|
|
43109
43109
|
case 0:
|
|
43110
43110
|
if (!process.env.SCOUT9_API_KEY) {
|
|
@@ -43158,7 +43158,7 @@ var ProjectFiles = /*#__PURE__*/function () {
|
|
|
43158
43158
|
}
|
|
43159
43159
|
throw new Error("Invalid root project file ".concat(filePath, " - must be an object, example:\n\nexport default {/** ... */}"));
|
|
43160
43160
|
case 27:
|
|
43161
|
-
return _context6.abrupt("return",
|
|
43161
|
+
return _context6.abrupt("return", _rollupPluginBabelHelpers._objectSpread2({
|
|
43162
43162
|
tag: tag
|
|
43163
43163
|
}, root));
|
|
43164
43164
|
case 28:
|
|
@@ -43176,7 +43176,7 @@ var ProjectFiles = /*#__PURE__*/function () {
|
|
|
43176
43176
|
return ProjectFiles;
|
|
43177
43177
|
}();
|
|
43178
43178
|
|
|
43179
|
-
var __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-
|
|
43179
|
+
var __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-93d877d8.js', document.baseURI).href)));
|
|
43180
43180
|
var __dirname$1 = path__default["default"].dirname(__filename$1);
|
|
43181
43181
|
function zipDirectory(source, out) {
|
|
43182
43182
|
var archive = archiver$1('tar', {
|
|
@@ -43204,9 +43204,9 @@ function deployZipDirectory(_x, _x2) {
|
|
|
43204
43204
|
return _deployZipDirectory.apply(this, arguments);
|
|
43205
43205
|
}
|
|
43206
43206
|
function _deployZipDirectory() {
|
|
43207
|
-
_deployZipDirectory =
|
|
43207
|
+
_deployZipDirectory = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee(zipFilePath, config) {
|
|
43208
43208
|
var form, blob, url, response;
|
|
43209
|
-
return
|
|
43209
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
|
|
43210
43210
|
while (1) switch (_context.prev = _context.next) {
|
|
43211
43211
|
case 0:
|
|
43212
43212
|
form = new FormData();
|
|
@@ -43265,9 +43265,9 @@ function buildApp(_x4, _x5, _x6, _x7) {
|
|
|
43265
43265
|
return _buildApp.apply(this, arguments);
|
|
43266
43266
|
} // For dev server, downloads the dev app if it doesn't exist
|
|
43267
43267
|
function _buildApp() {
|
|
43268
|
-
_buildApp =
|
|
43268
|
+
_buildApp = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee4(cwd, src, dest, config) {
|
|
43269
43269
|
var root, copyDirectory, srcDir, appTemplateJsPath, templatePackagePath, packageTemplate, _yield$loadUserPackag, pkg, redactedConfig, _iterator2, _step2, agent, dockerfile, devAppFolder, exists;
|
|
43270
|
-
return
|
|
43270
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
43271
43271
|
while (1) switch (_context4.prev = _context4.next) {
|
|
43272
43272
|
case 0:
|
|
43273
43273
|
_context4.next = 2;
|
|
@@ -43283,9 +43283,9 @@ function _buildApp() {
|
|
|
43283
43283
|
case 4:
|
|
43284
43284
|
root = src.replace(process.cwd(), '');
|
|
43285
43285
|
copyDirectory = /*#__PURE__*/function () {
|
|
43286
|
-
var _ref7 =
|
|
43286
|
+
var _ref7 = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee3(source, destination, permittedExtensions) {
|
|
43287
43287
|
var dir, _iterator, _step, dirent, sourcePath, destinationPath, fileExtension;
|
|
43288
|
-
return
|
|
43288
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
43289
43289
|
while (1) switch (_context3.prev = _context3.next) {
|
|
43290
43290
|
case 0:
|
|
43291
43291
|
_context3.next = 2;
|
|
@@ -43299,7 +43299,7 @@ function _buildApp() {
|
|
|
43299
43299
|
});
|
|
43300
43300
|
case 4:
|
|
43301
43301
|
dir = _context3.sent;
|
|
43302
|
-
_iterator =
|
|
43302
|
+
_iterator = _rollupPluginBabelHelpers._createForOfIteratorHelper(dir);
|
|
43303
43303
|
_context3.prev = 6;
|
|
43304
43304
|
_iterator.s();
|
|
43305
43305
|
case 8:
|
|
@@ -43391,7 +43391,7 @@ function _buildApp() {
|
|
|
43391
43391
|
case 11:
|
|
43392
43392
|
_context4.t0 = JSON;
|
|
43393
43393
|
_context4.next = 14;
|
|
43394
|
-
return fs__default["default"].readFile(new URL(templatePackagePath, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-
|
|
43394
|
+
return fs__default["default"].readFile(new URL(templatePackagePath, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index-93d877d8.js', document.baseURI).href))), 'utf-8');
|
|
43395
43395
|
case 14:
|
|
43396
43396
|
_context4.t1 = _context4.sent;
|
|
43397
43397
|
packageTemplate = _context4.t0.parse.call(_context4.t0, _context4.t1);
|
|
@@ -43402,7 +43402,7 @@ function _buildApp() {
|
|
|
43402
43402
|
case 18:
|
|
43403
43403
|
_yield$loadUserPackag = _context4.sent;
|
|
43404
43404
|
pkg = _yield$loadUserPackag.pkg;
|
|
43405
|
-
pkg.dependencies =
|
|
43405
|
+
pkg.dependencies = _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, pkg.dependencies), packageTemplate.dependencies);
|
|
43406
43406
|
pkg.scripts.start = 'node app.js';
|
|
43407
43407
|
_context4.next = 24;
|
|
43408
43408
|
return fs__default["default"].writeFile(path__default["default"].resolve(dest, 'package.json'), JSON.stringify(pkg, null, 2));
|
|
@@ -43414,8 +43414,8 @@ function _buildApp() {
|
|
|
43414
43414
|
return fs__default["default"].copyFile(path__default["default"].resolve(cwd, '.env'), path__default["default"].resolve(dest, '.env'));
|
|
43415
43415
|
case 28:
|
|
43416
43416
|
// Copy config.js - redact any sensitive information // @TODO use security encoder
|
|
43417
|
-
redactedConfig =
|
|
43418
|
-
_iterator2 =
|
|
43417
|
+
redactedConfig = _rollupPluginBabelHelpers._objectSpread2({}, config);
|
|
43418
|
+
_iterator2 = _rollupPluginBabelHelpers._createForOfIteratorHelper(redactedConfig.agents);
|
|
43419
43419
|
try {
|
|
43420
43420
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
43421
43421
|
agent = _step2.value;
|
|
@@ -43481,9 +43481,9 @@ function downloadDevApp(_x8, _x9) {
|
|
|
43481
43481
|
* @returns {Promise<{app: *, fileName: string, exe: string, filePath: string}>}
|
|
43482
43482
|
*/
|
|
43483
43483
|
function _downloadDevApp() {
|
|
43484
|
-
_downloadDevApp =
|
|
43484
|
+
_downloadDevApp = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee5(destination, version) {
|
|
43485
43485
|
var url, downloadLocalResponse, arrayBuffer;
|
|
43486
|
-
return
|
|
43486
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
43487
43487
|
while (1) switch (_context5.prev = _context5.next) {
|
|
43488
43488
|
case 0:
|
|
43489
43489
|
url = "https://scout9.com/api/b/platform/dev?v=".concat(version);
|
|
@@ -43530,7 +43530,7 @@ function getApp() {
|
|
|
43530
43530
|
* @returns {Promise<T>}
|
|
43531
43531
|
*/
|
|
43532
43532
|
function _getApp() {
|
|
43533
|
-
_getApp =
|
|
43533
|
+
_getApp = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee6() {
|
|
43534
43534
|
var _ref,
|
|
43535
43535
|
_ref$cwd,
|
|
43536
43536
|
cwd,
|
|
@@ -43545,7 +43545,7 @@ function _getApp() {
|
|
|
43545
43545
|
app,
|
|
43546
43546
|
type,
|
|
43547
43547
|
_args6 = arguments;
|
|
43548
|
-
return
|
|
43548
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
43549
43549
|
while (1) switch (_context6.prev = _context6.next) {
|
|
43550
43550
|
case 0:
|
|
43551
43551
|
_ref = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, _ref$cwd = _ref.cwd, cwd = _ref$cwd === void 0 ? process.cwd() : _ref$cwd, _ref$src = _ref.src, src = _ref$src === void 0 ? 'src' : _ref$src, _ref$ignoreAppRequire = _ref.ignoreAppRequire, ignoreAppRequire = _ref$ignoreAppRequire === void 0 ? false : _ref$ignoreAppRequire;
|
|
@@ -43616,9 +43616,9 @@ function getAgentContacts() {
|
|
|
43616
43616
|
* @returns {Promise<WorkflowResponse>}
|
|
43617
43617
|
*/
|
|
43618
43618
|
function _getAgentContacts() {
|
|
43619
|
-
_getAgentContacts =
|
|
43619
|
+
_getAgentContacts = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee7() {
|
|
43620
43620
|
var configuration, scout9;
|
|
43621
|
-
return
|
|
43621
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
43622
43622
|
while (1) switch (_context7.prev = _context7.next) {
|
|
43623
43623
|
case 0:
|
|
43624
43624
|
configuration = new dev.build.Configuration({
|
|
@@ -43666,7 +43666,7 @@ function run$1(_x10) {
|
|
|
43666
43666
|
* Calls scout9 backend to get project config file
|
|
43667
43667
|
*/
|
|
43668
43668
|
function _run$1() {
|
|
43669
|
-
_run$1 =
|
|
43669
|
+
_run$1 = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee8(event) {
|
|
43670
43670
|
var _ref2,
|
|
43671
43671
|
eventSource,
|
|
43672
43672
|
result,
|
|
@@ -43674,7 +43674,7 @@ function _run$1() {
|
|
|
43674
43674
|
scout9,
|
|
43675
43675
|
response,
|
|
43676
43676
|
_args8 = arguments;
|
|
43677
|
-
return
|
|
43677
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
43678
43678
|
while (1) switch (_context8.prev = _context8.next) {
|
|
43679
43679
|
case 0:
|
|
43680
43680
|
_ref2 = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : {}, eventSource = _ref2.eventSource;
|
|
@@ -43716,9 +43716,9 @@ function runConfig() {
|
|
|
43716
43716
|
* @returns {messages: string[]}
|
|
43717
43717
|
*/
|
|
43718
43718
|
function _runConfig() {
|
|
43719
|
-
_runConfig =
|
|
43719
|
+
_runConfig = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee9() {
|
|
43720
43720
|
var configuration, scout9, response;
|
|
43721
|
-
return
|
|
43721
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
43722
43722
|
while (1) switch (_context9.prev = _context9.next) {
|
|
43723
43723
|
case 0:
|
|
43724
43724
|
if (process.env.SCOUT9_API_KEY) {
|
|
@@ -43758,7 +43758,7 @@ function build() {
|
|
|
43758
43758
|
* @return {Promise<{deploy: Object, contacts: any}>}
|
|
43759
43759
|
*/
|
|
43760
43760
|
function _build() {
|
|
43761
|
-
_build =
|
|
43761
|
+
_build = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee10() {
|
|
43762
43762
|
var _ref3,
|
|
43763
43763
|
_ref3$cwd,
|
|
43764
43764
|
cwd,
|
|
@@ -43774,7 +43774,7 @@ function _build() {
|
|
|
43774
43774
|
_step3,
|
|
43775
43775
|
file,
|
|
43776
43776
|
_args10 = arguments;
|
|
43777
|
-
return
|
|
43777
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
43778
43778
|
while (1) switch (_context10.prev = _context10.next) {
|
|
43779
43779
|
case 0:
|
|
43780
43780
|
_ref3 = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {}, _ref3$cwd = _ref3.cwd, cwd = _ref3$cwd === void 0 ? process.cwd() : _ref3$cwd, _ref3$src = _ref3.src, src = _ref3$src === void 0 ? './src' : _ref3$src, _ref3$dest = _ref3.dest, dest = _ref3$dest === void 0 ? '/tmp/project' : _ref3$dest, _ref3$logger = _ref3.logger, _ref3$logger === void 0 ? new dev.ProgressLogger() : _ref3$logger, _ref3.mode;
|
|
@@ -43803,7 +43803,7 @@ function _build() {
|
|
|
43803
43803
|
cwd: cwd,
|
|
43804
43804
|
absolute: true
|
|
43805
43805
|
});
|
|
43806
|
-
_iterator3 =
|
|
43806
|
+
_iterator3 = _rollupPluginBabelHelpers._createForOfIteratorHelper(files);
|
|
43807
43807
|
_context10.prev = 9;
|
|
43808
43808
|
_iterator3.s();
|
|
43809
43809
|
case 11:
|
|
@@ -43850,9 +43850,9 @@ function deploy(_x11, _x12) {
|
|
|
43850
43850
|
* @param {Scout9ProjectBuildConfig} config
|
|
43851
43851
|
*/
|
|
43852
43852
|
function _deploy() {
|
|
43853
|
-
_deploy =
|
|
43853
|
+
_deploy = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee11(_ref4, config) {
|
|
43854
43854
|
var _ref4$cwd, cwd, _ref4$src, src, _ref4$dest, dest, _ref4$logger, logger, destPaths, zipFilePath, response, contacts;
|
|
43855
|
-
return
|
|
43855
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
43856
43856
|
while (1) switch (_context11.prev = _context11.next) {
|
|
43857
43857
|
case 0:
|
|
43858
43858
|
_ref4$cwd = _ref4.cwd, cwd = _ref4$cwd === void 0 ? process.cwd() : _ref4$cwd, _ref4$src = _ref4.src, src = _ref4$src === void 0 ? './src' : _ref4$src, _ref4$dest = _ref4.dest, dest = _ref4$dest === void 0 ? '/tmp/project' : _ref4$dest, _ref4$logger = _ref4.logger, logger = _ref4$logger === void 0 ? new dev.ProgressLogger() : _ref4$logger;
|
|
@@ -43927,9 +43927,9 @@ function test(_x13, _x14) {
|
|
|
43927
43927
|
* @returns {Promise<{success: boolean; config: Scout9ProjectBuildConfig}>}
|
|
43928
43928
|
*/
|
|
43929
43929
|
function _test() {
|
|
43930
|
-
_test =
|
|
43930
|
+
_test = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee12(_ref5, config) {
|
|
43931
43931
|
var _ref5$cwd, _ref5$logger, logger, testableEntities, tests;
|
|
43932
|
-
return
|
|
43932
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
43933
43933
|
while (1) switch (_context12.prev = _context12.next) {
|
|
43934
43934
|
case 0:
|
|
43935
43935
|
_ref5$cwd = _ref5.cwd, _ref5$cwd === void 0 ? process.cwd() : _ref5$cwd, _ref5.src, _ref5.dest, _ref5$logger = _ref5.logger, logger = _ref5$logger === void 0 ? new dev.ProgressLogger() : _ref5$logger;
|
|
@@ -43969,7 +43969,7 @@ function sync() {
|
|
|
43969
43969
|
return _sync.apply(this, arguments);
|
|
43970
43970
|
}
|
|
43971
43971
|
function _sync() {
|
|
43972
|
-
_sync =
|
|
43972
|
+
_sync = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee13() {
|
|
43973
43973
|
var _ref6,
|
|
43974
43974
|
_ref6$cwd,
|
|
43975
43975
|
cwd,
|
|
@@ -43981,7 +43981,7 @@ function _sync() {
|
|
|
43981
43981
|
logger,
|
|
43982
43982
|
config,
|
|
43983
43983
|
_args13 = arguments;
|
|
43984
|
-
return
|
|
43984
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
43985
43985
|
while (1) switch (_context13.prev = _context13.next) {
|
|
43986
43986
|
case 0:
|
|
43987
43987
|
_ref6 = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {}, _ref6$cwd = _ref6.cwd, cwd = _ref6$cwd === void 0 ? process.cwd() : _ref6$cwd, _ref6$src = _ref6.src, src = _ref6$src === void 0 ? 'src' : _ref6$src, _ref6$projectFiles = _ref6.projectFiles, projectFiles = _ref6$projectFiles === void 0 ? new ProjectFiles({
|
|
@@ -44048,7 +44048,7 @@ var Scout9Platform = {
|
|
|
44048
44048
|
* @returns {Promise<Scout9ProjectBuildConfig>}
|
|
44049
44049
|
*/
|
|
44050
44050
|
sync: function () {
|
|
44051
|
-
var _sync2 =
|
|
44051
|
+
var _sync2 = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee() {
|
|
44052
44052
|
var _ref,
|
|
44053
44053
|
_ref$cwd,
|
|
44054
44054
|
cwd,
|
|
@@ -44060,7 +44060,7 @@ var Scout9Platform = {
|
|
|
44060
44060
|
config,
|
|
44061
44061
|
result,
|
|
44062
44062
|
_args = arguments;
|
|
44063
|
-
return
|
|
44063
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
|
|
44064
44064
|
while (1) switch (_context.prev = _context.next) {
|
|
44065
44065
|
case 0:
|
|
44066
44066
|
_ref = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref$cwd = _ref.cwd, cwd = _ref$cwd === void 0 ? process.cwd() : _ref$cwd, _ref$src = _ref.src, src = _ref$src === void 0 ? 'src' : _ref$src, _ref.mode;
|
|
@@ -44122,7 +44122,7 @@ var Scout9Platform = {
|
|
|
44122
44122
|
* @returns {Promise<Scout9ProjectBuildConfig>}
|
|
44123
44123
|
*/
|
|
44124
44124
|
deploy: function () {
|
|
44125
|
-
var _deploy2 =
|
|
44125
|
+
var _deploy2 = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee2() {
|
|
44126
44126
|
var _ref2,
|
|
44127
44127
|
_ref2$cwd,
|
|
44128
44128
|
cwd,
|
|
@@ -44140,7 +44140,7 @@ var Scout9Platform = {
|
|
|
44140
44140
|
projectFiles,
|
|
44141
44141
|
result,
|
|
44142
44142
|
_args2 = arguments;
|
|
44143
|
-
return
|
|
44143
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
44144
44144
|
while (1) switch (_context2.prev = _context2.next) {
|
|
44145
44145
|
case 0:
|
|
44146
44146
|
_ref2 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, _ref2$cwd = _ref2.cwd, cwd = _ref2$cwd === void 0 ? process.cwd() : _ref2$cwd, _ref2$src = _ref2.src, src = _ref2$src === void 0 ? './src' : _ref2$src, _ref2$dest = _ref2.dest, dest = _ref2$dest === void 0 ? '/tmp/project' : _ref2$dest, _ref2$sync = _ref2.sync, sync$1 = _ref2$sync === void 0 ? false : _ref2$sync;
|
|
@@ -44244,7 +44244,7 @@ var Scout9Platform = {
|
|
|
44244
44244
|
* @returns {Promise<Scout9ProjectBuildConfig>}
|
|
44245
44245
|
*/
|
|
44246
44246
|
test: function () {
|
|
44247
|
-
var _test2 =
|
|
44247
|
+
var _test2 = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee3() {
|
|
44248
44248
|
var _ref3,
|
|
44249
44249
|
_ref3$cwd,
|
|
44250
44250
|
cwd,
|
|
@@ -44256,7 +44256,7 @@ var Scout9Platform = {
|
|
|
44256
44256
|
messages,
|
|
44257
44257
|
config,
|
|
44258
44258
|
_args3 = arguments;
|
|
44259
|
-
return
|
|
44259
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
44260
44260
|
while (1) switch (_context3.prev = _context3.next) {
|
|
44261
44261
|
case 0:
|
|
44262
44262
|
_ref3 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, _ref3$cwd = _ref3.cwd, cwd = _ref3$cwd === void 0 ? process.cwd() : _ref3$cwd, _ref3$src = _ref3.src, src = _ref3$src === void 0 ? './src' : _ref3$src, _ref3$dest = _ref3.dest, dest = _ref3$dest === void 0 ? '/tmp/project' : _ref3$dest, _ref3.mode;
|
|
@@ -44318,7 +44318,7 @@ var Scout9Platform = {
|
|
|
44318
44318
|
* @returns {Promise<Scout9ProjectBuildConfig>}
|
|
44319
44319
|
*/
|
|
44320
44320
|
build: function () {
|
|
44321
|
-
var _build2 =
|
|
44321
|
+
var _build2 = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee4() {
|
|
44322
44322
|
var _ref4,
|
|
44323
44323
|
_ref4$cwd,
|
|
44324
44324
|
cwd,
|
|
@@ -44332,7 +44332,7 @@ var Scout9Platform = {
|
|
|
44332
44332
|
messages,
|
|
44333
44333
|
config,
|
|
44334
44334
|
_args4 = arguments;
|
|
44335
|
-
return
|
|
44335
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
44336
44336
|
while (1) switch (_context4.prev = _context4.next) {
|
|
44337
44337
|
case 0:
|
|
44338
44338
|
_ref4 = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {}, _ref4$cwd = _ref4.cwd, cwd = _ref4$cwd === void 0 ? process.cwd() : _ref4$cwd, _ref4$src = _ref4.src, src = _ref4$src === void 0 ? './src' : _ref4$src, _ref4$dest = _ref4.dest, dest = _ref4$dest === void 0 ? '/tmp/project' : _ref4$dest, _ref4$mode = _ref4.mode, mode = _ref4$mode === void 0 ? 'production' : _ref4$mode;
|
|
@@ -44395,7 +44395,7 @@ var Scout9Platform = {
|
|
|
44395
44395
|
* @returns {Promise<Scout9ProjectBuildConfig>}
|
|
44396
44396
|
*/
|
|
44397
44397
|
config: function () {
|
|
44398
|
-
var _config =
|
|
44398
|
+
var _config = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee5() {
|
|
44399
44399
|
var _ref5,
|
|
44400
44400
|
_ref5$cwd,
|
|
44401
44401
|
cwd,
|
|
@@ -44405,7 +44405,7 @@ var Scout9Platform = {
|
|
|
44405
44405
|
src,
|
|
44406
44406
|
projectFiles,
|
|
44407
44407
|
_args5 = arguments;
|
|
44408
|
-
return
|
|
44408
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
44409
44409
|
while (1) switch (_context5.prev = _context5.next) {
|
|
44410
44410
|
case 0:
|
|
44411
44411
|
_ref5 = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {}, _ref5$cwd = _ref5.cwd, cwd = _ref5$cwd === void 0 ? process.cwd() : _ref5$cwd, _ref5$local = _ref5.local, local = _ref5$local === void 0 ? false : _ref5$local, _ref5$src = _ref5.src, src = _ref5$src === void 0 ? './src' : _ref5$src;
|
|
@@ -44455,9 +44455,9 @@ var Scout9Platform = {
|
|
|
44455
44455
|
* @returns {WorkflowResponse}
|
|
44456
44456
|
*/
|
|
44457
44457
|
run: function () {
|
|
44458
|
-
var _run2 =
|
|
44458
|
+
var _run2 = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee6(event, _ref6) {
|
|
44459
44459
|
var _ref6$cwd, cwd, _ref6$mode, mode, _ref6$src, src, eventSource;
|
|
44460
|
-
return
|
|
44460
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
44461
44461
|
while (1) switch (_context6.prev = _context6.next) {
|
|
44462
44462
|
case 0:
|
|
44463
44463
|
_ref6$cwd = _ref6.cwd, cwd = _ref6$cwd === void 0 ? process.cwd() : _ref6$cwd, _ref6$mode = _ref6.mode, mode = _ref6$mode === void 0 ? 'production' : _ref6$mode, _ref6$src = _ref6.src, src = _ref6$src === void 0 ? './src' : _ref6$src, eventSource = _ref6.eventSource;
|
|
@@ -44557,8 +44557,8 @@ function run(_x, _x2) {
|
|
|
44557
44557
|
* @returns {WorkflowResponse}
|
|
44558
44558
|
*/
|
|
44559
44559
|
function _run() {
|
|
44560
|
-
_run =
|
|
44561
|
-
return
|
|
44560
|
+
_run = _rollupPluginBabelHelpers._asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers._regeneratorRuntime().mark(function _callee(event, options) {
|
|
44561
|
+
return _rollupPluginBabelHelpers._regeneratorRuntime().wrap(function _callee$(_context) {
|
|
44562
44562
|
while (1) switch (_context.prev = _context.next) {
|
|
44563
44563
|
case 0:
|
|
44564
44564
|
return _context.abrupt("return", Scout9Platform.run(event, options));
|
|
@@ -44596,7 +44596,7 @@ function json(data, init) {
|
|
|
44596
44596
|
if (!headers.has('content-type')) {
|
|
44597
44597
|
headers.set('content-type', 'application/json');
|
|
44598
44598
|
}
|
|
44599
|
-
return new EventResponse(data,
|
|
44599
|
+
return new EventResponse(data, _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, init), {}, {
|
|
44600
44600
|
headers: headers
|
|
44601
44601
|
}));
|
|
44602
44602
|
}
|