create-arxo 0.1.0 → 0.2.0

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
1
  # create-arxo
2
2
 
3
3
  `npm create arxo` copies a project that opens `de.bgb.fristen@0.1.0` and asks
4
- one `truth` question. Do not publish until the repository handoff says so.
4
+ one `truth` question.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-arxo",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Scaffold an Arxo Law project with one canon and one question",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -6,7 +6,7 @@
6
6
  "test": "node --test test/"
7
7
  },
8
8
  "dependencies": {
9
- "@arxo/law": "0.1.0",
10
- "@arxo/canon-bgb-fristen": "0.1.0"
9
+ "@arxo/law": "0.2.0",
10
+ "@arxo/canon-bgb-fristen": "0.1.2"
11
11
  }
12
12
  }
@@ -2,13 +2,25 @@ import assert from 'node:assert/strict';
2
2
  import test from 'node:test';
3
3
  import { open } from '@arxo/law';
4
4
 
5
- test('opens the bundled canon', async () => {
5
+ test('opens the bundled canon and asks one question', async () => {
6
6
  const wasmPath = process.env.ARXO_WASM;
7
- const pkg = await open('de.bgb.fristen@0.1.0', {
7
+ const fristen = await open('de.bgb.fristen@0.1.0', {
8
8
  offline: true,
9
9
  ...(wasmPath ? { wasmPath } : {}),
10
10
  });
11
- assert.equal(pkg.name, 'de.bgb.fristen');
12
- const r = await pkg.positions({ legalTime: '2026-09-17', answers: [] });
11
+ assert.equal(fristen.name, 'de.bgb.fristen');
12
+ // 14 days from 6 March 2026, § 187 (1) and § 188 (1) BGB: does the period end on 20 March?
13
+ const r = await fristen.truth('frist_ende', ['frist', '2026-03-20'], {
14
+ legalTime: '2026-09-17',
15
+ timezone: 'Europe/Berlin',
16
+ deadlinePolicy: 'urn:de:corpus:clir:bgb-fristen#BGB_FRISTEN_TAG',
17
+ answers: [
18
+ { predicate: 'frist_ereignis', args: ['frist', '2026-03-06'] },
19
+ { predicate: 'frist_dauer_tage', args: ['frist', '14 calendar_day'] },
20
+ ],
21
+ });
13
22
  assert.equal(r.via, 'local');
23
+ assert.equal(r.evaluationStatus, 'COMPUTED');
24
+ assert.equal(r.truthStatus, 'TRUE_ONLY');
25
+ assert.ok(r.document.byteLength > 0, 'the evaluation document is attached');
14
26
  });