tpmkms_4wp 9.3.0-beta.12 → 9.3.0-beta.13

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.
@@ -25,7 +25,7 @@
25
25
  "semantics": [
26
26
  {
27
27
  "match": "({context, isA}) => isA(context.marker, 'dateTimeSelector') && !!context.evaluate",
28
- "apply": "({context, isProcess}) => {\n context.evalue = instantiate(isProcess, context)\n }"
28
+ "apply": "({context, isProcess, isTest}) => {\n context.evalue = instantiate(isProcess || isTest, context)\n }"
29
29
  }
30
30
  ]
31
31
  }
@@ -21,9 +21,9 @@ const dateTimeSelectors_helpers = require('./helpers/dateTimeSelectors')
21
21
  10 am
22
22
  */
23
23
 
24
- function instantiate(isProcess, dateTimeSelector) {
24
+ function instantiate(isProcessOrTest, dateTimeSelector) {
25
25
  let now;
26
- if (isProcess) {
26
+ if (isProcessOrTest) {
27
27
  // so the unit tests work consistently. the month is zero based so 5 is june
28
28
  now = new Date(2025, 5, 29, 14, 52, 0)
29
29
  } else {
@@ -47,22 +47,13 @@ const template = {
47
47
  convolution: true,
48
48
  children: ['onDate_dates', 'atTime', 'date_dates'],
49
49
  bridge: "{ ...next(operator), date: after[0], time: after[1], interpolate: '${date} ${time}' }",
50
- /*
51
- evaluator: {
52
- match: ({context, isA}) => isA(context.marker, 'dateTimeSelector'),
53
- apply: ({context, isProcess}) => {
54
- debugger
55
- context.evalue = instantiate(isProcess, context)
56
- },
57
- }
58
- */
59
50
  },
60
51
  ],
61
52
  semantics: [
62
53
  {
63
54
  match: ({context, isA}) => isA(context.marker, 'dateTimeSelector') && !!context.evaluate,
64
- apply: ({context, isProcess}) => {
65
- context.evalue = instantiate(isProcess, context)
55
+ apply: ({context, isProcess, isTest}) => {
56
+ context.evalue = instantiate(isProcess || isTest, context)
66
57
  },
67
58
  }
68
59
  ],
@@ -17,7 +17,7 @@
17
17
  "bridge": "{ ...next(operator), operator: operator, who: after[0], reminder: after[1], interpolate: '${operator} ${who} ${reminder}' }",
18
18
  "withDateBridge": "{ ...next(operator), operator: operator, who: after[0], reminder: after[1], date: after[2], interpolate: '${operator} ${who} ${reminder} ${date}' }",
19
19
  "withDateAndTimeBridge": "{ ...next(operator), operator: operator, who: after[0], reminder: after[1], date: after[2], time: after[3], interpolate: '${operator} ${who} ${reminder} ${date} ${time}' }",
20
- "semantic": "async ({api, gsp, gp, context}) => {\n const text = await gsp(context.reminder.slice(1));\n const reminder = { text, dateTimeSelector: context.date }\n if (context.date) {\n reminder.dateTimeSelector = context.date\n reminder.dateTimeSelectorText = await gp(context.date)\n }\n debugger\n await api.instantiate(reminder)\n api.add(reminder)\n }"
20
+ "semantic": "async ({api, gsp, gp, context}) => {\n const text = await gsp(context.reminder.slice(1));\n const reminder = { text, dateTimeSelector: context.date }\n if (context.date) {\n reminder.dateTimeSelector = context.date\n reminder.dateTimeSelectorText = await gp(context.date)\n }\n await api.instantiate(reminder)\n api.add(reminder)\n }"
21
21
  },
22
22
  {
23
23
  "id": "reminders",
@@ -31,7 +31,7 @@ class API {
31
31
 
32
32
  async instantiate(reminder) {
33
33
  let now;
34
- if (this.args.isProcess) {
34
+ if (this.args.isProcess || this.args.isTest) {
35
35
  // so the unit tests work consistently
36
36
  now = new Date(2025, 5, 29, 14, 52, 0)
37
37
  } else {
package/package.json CHANGED
@@ -341,8 +341,8 @@
341
341
  "scriptjs": "^2.5.9",
342
342
  "table": "^6.7.1",
343
343
  "uuid": "^9.0.0",
344
- "theprogrammablemind_4wp": "9.3.0-beta.12"
344
+ "theprogrammablemind_4wp": "9.3.0-beta.13"
345
345
  },
346
- "version": "9.3.0-beta.12",
346
+ "version": "9.3.0-beta.13",
347
347
  "license": "UNLICENSED"
348
348
  }