@empyria/restate 0.1.0 → 0.1.1

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/AGENTS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # AGENTS.md
2
2
 
3
- Restate.dev helpers for **Principia**, a nanoservice framework built primarily on Bun:
3
+ Restate.dev helpers for **Empyria**, a nanoservice framework built primarily on Bun:
4
4
  an Admin API client, a dynamic-dispatch service, cron-driven workflow scheduling, and
5
5
  schema validation for workflow handlers.
6
6
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @empyria/restate
2
2
 
3
- [Restate.dev](https://restate.dev) helpers for **Principia**, a nanoservice framework built
3
+ [Restate.dev](https://restate.dev) helpers for **Empyria**, a nanoservice framework built
4
4
  primarily on Bun: an Admin API client, a generic dynamic-dispatch service, cron-driven
5
5
  workflow scheduling, and Restate-aware input/output schema validation.
6
6
 
package/lib/Cron.js CHANGED
@@ -2,7 +2,7 @@ import * as restate from '@restatedev/restate-sdk'
2
2
  import { TerminalError, serde } from '@restatedev/restate-sdk'
3
3
  import { Cron } from 'croner'
4
4
 
5
- let JOB_STATE_NAME = 'principia-job-state'
5
+ let JOB_STATE_NAME = 'empyria-job-state'
6
6
 
7
7
  export const setJobStateName = (jobStateName) => {
8
8
  JOB_STATE_NAME = jobStateName
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@empyria/restate",
3
- "version": "0.1.0",
4
- "description": "Restate.dev helpers for the Principia nanoservice framework",
3
+ "version": "0.1.1",
4
+ "description": "Restate.dev helpers for the Empyria nanoservice framework",
5
5
  "license": "MIT",
6
6
  "author": "Imre Fazekas <imre.fazekas@icloud.com>",
7
7
  "repository": {
@@ -24,8 +24,8 @@
24
24
  "test:watch": "bun test --watch"
25
25
  },
26
26
  "dependencies": {
27
- "@empyria/classification": "0.1.0",
28
- "@empyria/common": "0.1.0",
27
+ "@empyria/classification": "0.1.1",
28
+ "@empyria/common": "0.1.1",
29
29
  "@restatedev/restate-sdk": "1.16.6",
30
30
  "@restatedev/restate-sdk-clients": "1.16.6",
31
31
  "@restatedev/restate-sdk-core": "1.16.6",
package/test/Cron.test.js CHANGED
@@ -4,11 +4,11 @@ import { TerminalError } from '@restatedev/restate-sdk'
4
4
 
5
5
  describe('setJobStateName', () => {
6
6
  test('returns the name it was given', () => {
7
- expect(setJobStateName('principia-job-state')).toBe('principia-job-state')
7
+ expect(setJobStateName('empyria-job-state')).toBe('empyria-job-state')
8
8
  })
9
9
 
10
- test('defaults to "principia-job-state"', () => {
11
- expect(JOB_STATE_NAME).toBe('principia-job-state')
10
+ test('defaults to "empyria-job-state"', () => {
11
+ expect(JOB_STATE_NAME).toBe('empyria-job-state')
12
12
  })
13
13
  })
14
14
 
@@ -1,6 +1,6 @@
1
1
  import { describe, test, expect } from 'bun:test'
2
2
  import { withValidation } from '../lib/Validation.js'
3
- import { PrincipiaError } from '@empyria/common'
3
+ import { EmpyriaError } from '@empyria/common'
4
4
 
5
5
  const inputSchema = {
6
6
  type: 'object',
@@ -24,11 +24,11 @@ describe('withValidation', () => {
24
24
 
25
25
  test('throws when the input does not match the schema', async () => {
26
26
  const handler = withValidation(inputSchema, outputSchema, async () => ({ greeting: 'hi' }))
27
- await expect(handler({}, {})).rejects.toThrow(PrincipiaError)
27
+ await expect(handler({}, {})).rejects.toThrow(EmpyriaError)
28
28
  })
29
29
 
30
30
  test('throws when the handler output does not match the schema', async () => {
31
31
  const handler = withValidation(inputSchema, outputSchema, async () => ({ wrong: true }))
32
- await expect(handler({}, { name: 'Bob' })).rejects.toThrow(PrincipiaError)
32
+ await expect(handler({}, { name: 'Bob' })).rejects.toThrow(EmpyriaError)
33
33
  })
34
34
  })