@scout9/app 1.0.0-alpha.0.2.5 → 1.0.0-alpha.0.2.7
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/{dev-60d45091.cjs → dev-170fa3f5.cjs} +18 -4603
- package/dist/{index-5ba79b93.cjs → index-44e73470.cjs} +15 -14
- package/dist/index.cjs +3 -49
- package/dist/macros-eff64992.cjs +4588 -0
- package/dist/{multipart-parser-13a3f02b.cjs → multipart-parser-bd1fae8a.cjs} +3 -2
- package/dist/schemas.cjs +55 -0
- package/dist/testing-tools.cjs +2 -1
- package/package.json +6 -1
- package/src/cli.js +2 -3
- package/src/exports.js +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var spirits = require("./spirits-76855e30.cjs");
|
|
4
|
-
var dev = require("./dev-
|
|
4
|
+
var dev = require("./dev-170fa3f5.cjs");
|
|
5
|
+
var macros = require("./macros-eff64992.cjs");
|
|
5
6
|
var require$$0 = require('fs');
|
|
6
7
|
var require$$2$1 = require('events');
|
|
7
8
|
var require$$1 = require('path');
|
|
@@ -29482,7 +29483,7 @@ class Body {
|
|
|
29482
29483
|
}
|
|
29483
29484
|
const {
|
|
29484
29485
|
toFormData
|
|
29485
|
-
} = await Promise.resolve().then(function () { return require("./multipart-parser-
|
|
29486
|
+
} = await Promise.resolve().then(function () { return require("./multipart-parser-bd1fae8a.cjs"); });
|
|
29486
29487
|
return toFormData(this.body, ct);
|
|
29487
29488
|
}
|
|
29488
29489
|
|
|
@@ -41891,7 +41892,7 @@ function _loadUserPackageJson() {
|
|
|
41891
41892
|
targetPkgUrl = isTest ? packageTestJsonUrl : packageJsonUrl;
|
|
41892
41893
|
_context.t0 = JSON;
|
|
41893
41894
|
_context.next = 10;
|
|
41894
|
-
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-
|
|
41895
|
+
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-44e73470.js', document.baseURI).href))), 'utf-8');
|
|
41895
41896
|
case 10:
|
|
41896
41897
|
_context.t1 = _context.sent;
|
|
41897
41898
|
pkg = _context.t0.parse.call(_context.t0, _context.t1);
|
|
@@ -42133,7 +42134,7 @@ function _loadEntityApiConfig() {
|
|
|
42133
42134
|
config[key] = true;
|
|
42134
42135
|
}
|
|
42135
42136
|
}
|
|
42136
|
-
|
|
42137
|
+
macros.EntityApiConfigurationSchema.parse(config);
|
|
42137
42138
|
return _context.abrupt("return", config);
|
|
42138
42139
|
case 14:
|
|
42139
42140
|
return _context.abrupt("return", null);
|
|
@@ -42282,7 +42283,7 @@ function _loadEntitiesConfig() {
|
|
|
42282
42283
|
throw new Error("Invalid entity type (".concat(entityType, ") returned at \"").concat(filePath, "\""));
|
|
42283
42284
|
case 21:
|
|
42284
42285
|
// Validate entity configuration
|
|
42285
|
-
result =
|
|
42286
|
+
result = macros.EntityConfigurationSchema.safeParse(entityConfig, {
|
|
42286
42287
|
path: ['entities', config.length]
|
|
42287
42288
|
});
|
|
42288
42289
|
if (result.success) {
|
|
@@ -42307,7 +42308,7 @@ function _loadEntitiesConfig() {
|
|
|
42307
42308
|
entities: parents.reverse(),
|
|
42308
42309
|
api: api
|
|
42309
42310
|
});
|
|
42310
|
-
|
|
42311
|
+
macros.EntityRootProjectConfigurationSchema.parse(entityProjectConfig);
|
|
42311
42312
|
existingIndex = config.findIndex(function (c) {
|
|
42312
42313
|
return c.entity === entityProjectConfig.entity;
|
|
42313
42314
|
});
|
|
@@ -42363,7 +42364,7 @@ function _loadEntitiesConfig() {
|
|
|
42363
42364
|
// }
|
|
42364
42365
|
|
|
42365
42366
|
// Validate the config
|
|
42366
|
-
|
|
42367
|
+
macros.EntitiesRootProjectConfigurationSchema.parse(config);
|
|
42367
42368
|
return _context4.abrupt("return", config);
|
|
42368
42369
|
case 32:
|
|
42369
42370
|
case "end":
|
|
@@ -42422,10 +42423,10 @@ function _loadWorkflowsConfig() {
|
|
|
42422
42423
|
entity: parents[0],
|
|
42423
42424
|
entities: parents.reverse()
|
|
42424
42425
|
};
|
|
42425
|
-
|
|
42426
|
+
macros.WorkflowConfigurationSchema.parse(workflowConfig);
|
|
42426
42427
|
return workflowConfig;
|
|
42427
42428
|
}); // Validate the config
|
|
42428
|
-
|
|
42429
|
+
macros.WorkflowsConfigurationSchema.parse(config);
|
|
42429
42430
|
return _context.abrupt("return", config);
|
|
42430
42431
|
case 4:
|
|
42431
42432
|
case "end":
|
|
@@ -42876,7 +42877,7 @@ var ProjectFiles = /*#__PURE__*/function () {
|
|
|
42876
42877
|
case 21:
|
|
42877
42878
|
projectConfig.workflows = _context4.sent;
|
|
42878
42879
|
// Validate the config
|
|
42879
|
-
result =
|
|
42880
|
+
result = macros.Scout9ProjectBuildConfigSchema.safeParse(projectConfig);
|
|
42880
42881
|
if (result.success) {
|
|
42881
42882
|
_context4.next = 26;
|
|
42882
42883
|
break;
|
|
@@ -43097,7 +43098,7 @@ var ProjectFiles = /*#__PURE__*/function () {
|
|
|
43097
43098
|
return ProjectFiles;
|
|
43098
43099
|
}();
|
|
43099
43100
|
|
|
43100
|
-
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-
|
|
43101
|
+
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-44e73470.js', document.baseURI).href)));
|
|
43101
43102
|
var __dirname$1 = path__default["default"].dirname(__filename$1);
|
|
43102
43103
|
function zipDirectory(source, out) {
|
|
43103
43104
|
var archive = archiver$1('tar', {
|
|
@@ -43312,7 +43313,7 @@ function _buildApp() {
|
|
|
43312
43313
|
case 11:
|
|
43313
43314
|
_context4.t0 = JSON;
|
|
43314
43315
|
_context4.next = 14;
|
|
43315
|
-
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-
|
|
43316
|
+
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-44e73470.js', document.baseURI).href))), 'utf-8');
|
|
43316
43317
|
case 14:
|
|
43317
43318
|
_context4.t1 = _context4.sent;
|
|
43318
43319
|
packageTemplate = _context4.t0.parse.call(_context4.t0, _context4.t1);
|
|
@@ -43599,7 +43600,7 @@ function _run$1() {
|
|
|
43599
43600
|
while (1) switch (_context8.prev = _context8.next) {
|
|
43600
43601
|
case 0:
|
|
43601
43602
|
_ref2 = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : {}, eventSource = _ref2.eventSource;
|
|
43602
|
-
result =
|
|
43603
|
+
result = macros.WorkflowEventSchema.safeParse(event);
|
|
43603
43604
|
if (result.success) {
|
|
43604
43605
|
_context8.next = 5;
|
|
43605
43606
|
break;
|
|
@@ -44427,7 +44428,7 @@ var Scout9Platform = {
|
|
|
44427
44428
|
break;
|
|
44428
44429
|
default:
|
|
44429
44430
|
console.error(dev.$.bold().red("> ".concat(error.message)));
|
|
44430
|
-
if (error instanceof
|
|
44431
|
+
if (error instanceof macros.z.ZodError) {
|
|
44431
44432
|
console.error(error.issues.map(function (i) {
|
|
44432
44433
|
return dev.$.red("".concat(dev.$.bold("\tZod Error (".concat(i.code, "): ")), "\"").concat(i.message, "\" ").concat(JSON.stringify(i.path)));
|
|
44433
44434
|
}).join('\n'));
|
package/dist/index.cjs
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require("./index-
|
|
6
|
-
var dev = require("./dev-
|
|
5
|
+
var index = require("./index-44e73470.cjs");
|
|
6
|
+
var dev = require("./dev-170fa3f5.cjs");
|
|
7
7
|
require("./spirits-76855e30.cjs");
|
|
8
|
+
require("./macros-eff64992.cjs");
|
|
8
9
|
require('fs');
|
|
9
10
|
require('events');
|
|
10
11
|
require('path');
|
|
@@ -47,59 +48,12 @@ exports.did = index.did;
|
|
|
47
48
|
exports.json = index.json;
|
|
48
49
|
exports.run = index.run;
|
|
49
50
|
exports.sendEvent = index.sendEvent;
|
|
50
|
-
exports.AgentConfigurationSchema = dev.AgentConfigurationSchema;
|
|
51
|
-
exports.AgentSchema = dev.AgentSchema;
|
|
52
|
-
exports.AgentsConfigurationSchema = dev.AgentsConfigurationSchema;
|
|
53
|
-
exports.AgentsSchema = dev.AgentsSchema;
|
|
54
|
-
exports.ContextExampleSchema = dev.ContextExampleSchema;
|
|
55
|
-
exports.ContextExampleWithTrainingDataSchema = dev.ContextExampleWithTrainingDataSchema;
|
|
56
|
-
exports.ConversationAnticipateSchema = dev.ConversationAnticipateSchema;
|
|
57
|
-
exports.ConversationContext = dev.ConversationContext;
|
|
58
|
-
exports.ConversationSchema = dev.ConversationSchema;
|
|
59
|
-
exports.CustomerSchema = dev.CustomerSchema;
|
|
60
|
-
exports.CustomerValueSchema = dev.CustomerValueSchema;
|
|
61
|
-
exports.EntitiesRootConfigurationSchema = dev.EntitiesRootConfigurationSchema;
|
|
62
|
-
exports.EntitiesRootProjectConfigurationSchema = dev.EntitiesRootProjectConfigurationSchema;
|
|
63
|
-
exports.EntityApiConfigurationSchema = dev.EntityApiConfigurationSchema;
|
|
64
|
-
exports.EntityConfigurationSchema = dev.EntityConfigurationSchema;
|
|
65
|
-
exports.EntityRootProjectConfigurationSchema = dev.EntityRootProjectConfigurationSchema;
|
|
66
|
-
exports.FollowupBaseSchema = dev.FollowupBaseSchema;
|
|
67
|
-
exports.FollowupSchema = dev.FollowupSchema;
|
|
68
|
-
exports.ForwardSchema = dev.ForwardSchema;
|
|
69
|
-
exports.InstructionObjectSchema = dev.InstructionObjectSchema;
|
|
70
|
-
exports.InstructionSchema = dev.InstructionSchema;
|
|
71
|
-
exports.IntentWorkflowEventSchema = dev.IntentWorkflowEventSchema;
|
|
72
|
-
exports.MessageSchema = dev.MessageSchema;
|
|
73
|
-
exports.PersonaConfigurationSchema = dev.PersonaConfigurationSchema;
|
|
74
|
-
exports.PersonaSchema = dev.PersonaSchema;
|
|
75
|
-
exports.PersonasConfigurationSchema = dev.PersonasConfigurationSchema;
|
|
76
|
-
exports.PersonasSchema = dev.PersonasSchema;
|
|
77
|
-
exports.Scout9ProjectBuildConfigSchema = dev.Scout9ProjectBuildConfigSchema;
|
|
78
|
-
exports.Scout9ProjectConfigSchema = dev.Scout9ProjectConfigSchema;
|
|
79
51
|
exports.Scout9Test = dev.Scout9Test;
|
|
80
|
-
exports.WorkflowConfigurationSchema = dev.WorkflowConfigurationSchema;
|
|
81
|
-
exports.WorkflowEventSchema = dev.WorkflowEventSchema;
|
|
82
|
-
exports.WorkflowFunctionSchema = dev.WorkflowFunctionSchema;
|
|
83
|
-
exports.WorkflowResponseMessage = dev.WorkflowResponseMessage;
|
|
84
|
-
exports.WorkflowResponseMessageApiRequest = dev.WorkflowResponseMessageApiRequest;
|
|
85
|
-
exports.WorkflowResponseMessageApiResponse = dev.WorkflowResponseMessageApiResponse;
|
|
86
|
-
exports.WorkflowResponseSchema = dev.WorkflowResponseSchema;
|
|
87
|
-
exports.WorkflowResponseSlotBaseSchema = dev.WorkflowResponseSlotBaseSchema;
|
|
88
|
-
exports.WorkflowResponseSlotSchema = dev.WorkflowResponseSlotSchema;
|
|
89
|
-
exports.WorkflowsConfigurationSchema = dev.WorkflowsConfigurationSchema;
|
|
90
|
-
exports.apiFunctionSchema = dev.apiFunctionSchema;
|
|
91
52
|
exports.createMockAgent = dev.createMockAgent;
|
|
92
53
|
exports.createMockConversation = dev.createMockConversation;
|
|
93
54
|
exports.createMockCustomer = dev.createMockCustomer;
|
|
94
55
|
exports.createMockMessage = dev.createMockMessage;
|
|
95
56
|
exports.createMockWorkflowEvent = dev.createMockWorkflowEvent;
|
|
96
|
-
exports.deleteApiFunctionSchema = dev.deleteApiFunctionSchema;
|
|
97
|
-
exports.eventResponseSchema = dev.eventResponseSchema;
|
|
98
57
|
exports.forward = dev.forward;
|
|
99
|
-
exports.getApiFunctionSchema = dev.getApiFunctionSchema;
|
|
100
58
|
exports.instruct = dev.instruct;
|
|
101
|
-
exports.patchApiFunctionSchema = dev.patchApiFunctionSchema;
|
|
102
|
-
exports.postApiFunctionSchema = dev.postApiFunctionSchema;
|
|
103
|
-
exports.putApiFunctionSchema = dev.putApiFunctionSchema;
|
|
104
|
-
exports.queryApiFunctionSchema = dev.queryApiFunctionSchema;
|
|
105
59
|
exports.reply = dev.reply;
|