@stonecrop/stonecrop 0.12.2 → 0.12.3
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/dist/src/stonecrop.js +6 -6
- package/dist/stonecrop.js +3 -3
- package/dist/stonecrop.js.map +1 -1
- package/package.json +5 -5
- package/src/stonecrop.ts +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/stonecrop",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"pinia-shared-state": "^1.0.1",
|
|
35
35
|
"pinia-xstate": "^3.0.0",
|
|
36
36
|
"xstate": "^5.25.0",
|
|
37
|
-
"@stonecrop/schema": "0.12.
|
|
37
|
+
"@stonecrop/schema": "0.12.3"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"pinia": "^3.0.4",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"vue-router": "^5.0.6",
|
|
61
61
|
"vite": "^7.3.2",
|
|
62
62
|
"vitest": "^4.1.5",
|
|
63
|
-
"@stonecrop/
|
|
64
|
-
"stonecrop
|
|
65
|
-
"
|
|
63
|
+
"@stonecrop/aform": "0.12.3",
|
|
64
|
+
"@stonecrop/atable": "0.12.3",
|
|
65
|
+
"stonecrop-rig": "0.7.0"
|
|
66
66
|
},
|
|
67
67
|
"description": "Schema-driven framework with XState workflows and HST state management",
|
|
68
68
|
"publishConfig": {
|
package/src/stonecrop.ts
CHANGED
|
@@ -396,10 +396,10 @@ export class Stonecrop {
|
|
|
396
396
|
throw new Error(`Doctype not found: ${typeof doctype === 'string' ? doctype : doctype.slug}`)
|
|
397
397
|
}
|
|
398
398
|
|
|
399
|
-
const
|
|
399
|
+
const result = await this._client.getRecord(resolved, recordId)
|
|
400
400
|
|
|
401
|
-
if (record) {
|
|
402
|
-
this.addRecord(resolved, recordId, record)
|
|
401
|
+
if (result?.record) {
|
|
402
|
+
this.addRecord(resolved, recordId, result.record)
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
|
|
@@ -593,11 +593,11 @@ export class Stonecrop {
|
|
|
593
593
|
)
|
|
594
594
|
}
|
|
595
595
|
|
|
596
|
-
const
|
|
596
|
+
const result = await this._client.getRecord({ name: doctype.doctype }, recordId, {
|
|
597
597
|
includeNested: options?.includeNested ?? true,
|
|
598
598
|
})
|
|
599
599
|
|
|
600
|
-
if (!record) {
|
|
600
|
+
if (!result?.record) {
|
|
601
601
|
throw createCodedError(`Record not found: ${doctype.doctype} ${recordId}`, 'RECORD_NOT_FOUND')
|
|
602
602
|
}
|
|
603
603
|
|
|
@@ -611,7 +611,7 @@ export class Stonecrop {
|
|
|
611
611
|
this.hstStore.set(`${slug}.${recordId}`, {}, 'system')
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
-
for (const [key, value] of Object.entries(record)) {
|
|
614
|
+
for (const [key, value] of Object.entries(result.record)) {
|
|
615
615
|
this.hstStore.set(`${slug}.${recordId}.${key}`, value, 'system')
|
|
616
616
|
}
|
|
617
617
|
}
|