create-wirejs-app 2.0.183 → 2.0.184

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-wirejs-app",
3
- "version": "2.0.183",
3
+ "version": "2.0.184",
4
4
  "description": "Initializes a wirejs package.",
5
5
  "author": "Jon Wire",
6
6
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
- "from": "wirejs-test@thepointless.com",
3
- "to": "iambipedal@gmail.com",
4
- "subject": "[wirejs test] first test",
5
- "body": "This is a test message from your wirejs app:\n\nsome message body",
6
- "sentAt": "2026-02-25T23:28:44.056Z"
2
+ "from": "wirejs-test@thepointless.com",
3
+ "to": "iambipedal@gmail.com",
4
+ "subject": "[wirejs test] first test",
5
+ "body": "This is a test message from your wirejs app:\n\nsome message body",
6
+ "sentAt": "2026-02-25T23:28:44.056Z"
7
7
  }
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  AuthenticationApi,
3
3
  BackgroundJob,
4
+ CronJob,
4
5
  RealtimeService,
5
6
  withContext,
6
7
  } from "wirejs-resources";
@@ -31,6 +32,25 @@ const counter = new BackgroundJob('app', 'countdowns', {
31
32
  },
32
33
  });
33
34
 
35
+ new CronJob('app', 'chat-ping', {
36
+ schedule: '*/5 * * * *',
37
+ async handler() {
38
+ console.log('chat-ping invocation handler start');
39
+ const now = new Date();
40
+ const nowString = now.toLocaleString();
41
+ const tzOffset = now.getTimezoneOffset() / 60;
42
+ const tzOffsetString = tzOffset ? `+${tzOffset}` : `-${tzOffset}`;
43
+ const tz = `UTC${tzOffsetString}`;
44
+
45
+ await realtimeService.publish('test', [{
46
+ username: 'cron',
47
+ body: `Hi. Just here to let you know what time it is. It's ${nowString} ${tz} ...`
48
+ }]);
49
+
50
+ console.log('chat-ping invocation handler end');
51
+ }
52
+ });
53
+
34
54
  export const Chat = (auth: AuthenticationApi) => withContext(context => ({
35
55
  async publish(room: string, message: string) {
36
56
  const user = await auth.requireCurrentUser(context);
@@ -9,7 +9,7 @@ export type { Chunk, ChunkData, Conversation, ConversationMessage, Role } from '
9
9
 
10
10
  export const LLM = (auth: AuthenticationApi) => {
11
11
  const infra = new Infra('app', 'llm', {
12
- models: ['mistral-nemo', 'llama3.2', 'llama3:8b', 'llama2'],
12
+ models: ['nova-pro', 'mistral-nemo', 'llama3.2', 'llama3:8b', 'llama2'],
13
13
  systemPrompt: `You are a helpful assistant.`,
14
14
  });
15
15
 
@@ -16,7 +16,7 @@ import {
16
16
  import { fromAsync, pad } from "./utils.js";
17
17
  import { Chunk, ChunkData, Conversation, ConversationMessage, WorkflowStep } from "./types.js";
18
18
 
19
- const DEFAULT_MODELS_LIST = ['mistral-nemo', 'llama3.2', 'llama3:8b', 'llama2'];
19
+ const DEFAULT_MODELS_LIST = ['nova-pro', 'mistral-nemo', 'llama3.2', 'llama3:8b', 'llama2'];
20
20
 
21
21
  export type PromptOptions = {
22
22
  systemPromptOverride?: string;
@@ -11,15 +11,15 @@
11
11
  "dependencies": {
12
12
  "dompurify": "^3.2.3",
13
13
  "marked": "^15.0.6",
14
- "wirejs-components": "^0.1.121",
14
+ "wirejs-components": "^0.1.122",
15
15
  "wirejs-dom": "^1.0.44",
16
- "wirejs-module-payments-stripe": "^0.1.72",
17
- "wirejs-resources": "^0.1.178",
18
- "wirejs-web-worker": "^1.0.75"
16
+ "wirejs-module-payments-stripe": "^0.1.73",
17
+ "wirejs-resources": "^0.1.179",
18
+ "wirejs-web-worker": "^1.0.76"
19
19
  },
20
20
  "devDependencies": {
21
21
  "typescript": "^5.7.3",
22
- "wirejs-scripts": "^3.0.176"
22
+ "wirejs-scripts": "^3.0.177"
23
23
  },
24
24
  "scripts": {
25
25
  "prebuild": "npm run prebuild --workspaces --if-present",