@pie-element/passage 2.2.1-next.30 → 2.2.1-next.35

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.
@@ -0,0 +1 @@
1
+ []
File without changes
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.model = model;
9
+
10
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
+
12
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
13
+
14
+ /**
15
+ *
16
+ * @param {*} question
17
+ * @param {*} session
18
+ * @param {*} env
19
+ * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.
20
+ */
21
+ function model(_x, _x2, _x3, _x4) {
22
+ return _model.apply(this, arguments);
23
+ }
24
+
25
+ function _model() {
26
+ _model = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(question, session, env, updateSession) {
27
+ return _regenerator["default"].wrap(function _callee$(_context) {
28
+ while (1) {
29
+ switch (_context.prev = _context.next) {
30
+ case 0:
31
+ // TODO use env to send teacherInstructions
32
+ console.log({
33
+ question: question,
34
+ env: env
35
+ });
36
+ return _context.abrupt("return", question);
37
+
38
+ case 2:
39
+ case "end":
40
+ return _context.stop();
41
+ }
42
+ }
43
+ }, _callee);
44
+ }));
45
+ return _model.apply(this, arguments);
46
+ }
47
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.js"],"names":["model","question","session","env","updateSession","console","log"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;SACsBA,K;;;;;yFAAf,iBAAqBC,QAArB,EAA+BC,OAA/B,EAAwCC,GAAxC,EAA6CC,aAA7C;AAAA;AAAA;AAAA;AAAA;AACL;AACAC,YAAAA,OAAO,CAACC,GAAR,CAAY;AAAEL,cAAAA,QAAQ,EAARA,QAAF;AAAYE,cAAAA,GAAG,EAAHA;AAAZ,aAAZ;AAFK,6CAIEF,QAJF;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G","sourcesContent":["/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.\n */\nexport async function model(question, session, env, updateSession) {\n // TODO use env to send teacherInstructions\n console.log({ question, env });\n\n return question;\n}\n"],"file":"index.js"}
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@pie-element/passage-controller",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "description": "",
6
+ "main": "lib/index.js",
7
+ "module": "src/index.js",
8
+ "author": "",
9
+ "license": "ISC"
10
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ *
3
+ * @param {*} question
4
+ * @param {*} session
5
+ * @param {*} env
6
+ * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.
7
+ */
8
+ async function model(question, session, env, updateSession) {
9
+ // TODO use env to send teacherInstructions
10
+ console.log({ question, env });
11
+
12
+ return question;
13
+ }
14
+
15
+ export { model };
package/module/demo.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import Element from './element.js';
2
+ import * as controller from './controller.js';
2
3
 
3
4
  var generate = {};
4
5
 
@@ -44,13 +45,6 @@ var config = {
44
45
  // configure
45
46
  class Configure extends HTMLElement{}
46
47
 
47
-
48
- // controller
49
- const controller = {
50
- model: (q) => Promise.resolve(q),
51
- outcome: (q) => Promise.resolve(q)
52
- };
53
-
54
48
 
55
49
  //Note: demo-el is a custom element loaded in the markup.
56
50
  customElements.whenDefined("demo-el").then(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/passage",
3
- "version": "2.2.1-next.30+7ce61a722",
3
+ "version": "2.2.1-next.35+5078c07da",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -17,7 +17,7 @@
17
17
  "react": "^16.8.1",
18
18
  "react-dom": "^16.8.1"
19
19
  },
20
- "gitHead": "7ce61a722eb67dc5cae1f25edd105b4172bc538d",
20
+ "gitHead": "5078c07da92c962c49c675bacc826177e157a2dc",
21
21
  "scripts": {
22
22
  "postpublish": "../../scripts/postpublish"
23
23
  },