@skaldapp/shared 1.2.28 → 1.2.30
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/index.d.ts +1 -1
- package/dist/index.js +1 -10
- package/package.json +4 -6
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export type TPage = FromSchema<typeof Page> & {
|
|
|
19
19
|
siblings: TPage[];
|
|
20
20
|
to?: string;
|
|
21
21
|
};
|
|
22
|
-
export declare const
|
|
22
|
+
export declare const sharedStore: {
|
|
23
23
|
kvNodes: Record<string, TPage>;
|
|
24
24
|
nodes: TPage[];
|
|
25
25
|
add: (pId: string) => string | undefined;
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import useFlatJsonTree from "@skaldapp/flat-json-tree";
|
|
2
2
|
import AJV from "ajv";
|
|
3
3
|
import dynamicDefaults from "ajv-keywords/dist/definitions/dynamicDefaults.js";
|
|
4
|
-
import { consola } from "consola/browser";
|
|
5
|
-
import { ofetch } from "ofetch";
|
|
6
4
|
import { generateSlug } from "random-word-slugs";
|
|
7
5
|
import { reactive, ref, toRef, watch } from "vue";
|
|
8
6
|
import Credential from "./schemas/credential.js";
|
|
@@ -59,14 +57,7 @@ const schemas = [Nodes, Page], ajv = new AJV({
|
|
|
59
57
|
},
|
|
60
58
|
},
|
|
61
59
|
}, tree = ref([]), validate = Object.fromEntries(schemas.map(({ $id }) => [$id, ajv.getSchema($id)])), { kvNodes, nodes, ...flatJsonTree } = useFlatJsonTree(tree);
|
|
62
|
-
export const
|
|
63
|
-
try {
|
|
64
|
-
return await ofetch(input);
|
|
65
|
-
}
|
|
66
|
-
catch (error) {
|
|
67
|
-
consola.error(error);
|
|
68
|
-
}
|
|
69
|
-
}, sharedStore = reactive({
|
|
60
|
+
export const sharedStore = reactive({
|
|
70
61
|
tree,
|
|
71
62
|
...flatJsonTree,
|
|
72
63
|
kvNodes: kvNodes,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://www.schemastore.org/package",
|
|
3
3
|
"name": "@skaldapp/shared",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.30",
|
|
5
5
|
"description": "A TypeScript library providing reactive data structures, JSON schema validation, and tree utilities for Vue-based applications in the skald ecosystem.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"vue",
|
|
@@ -33,17 +33,15 @@
|
|
|
33
33
|
},
|
|
34
34
|
"prettier": "@skaldapp/configs/prettierrc",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@skaldapp/flat-json-tree": "^2.2.
|
|
36
|
+
"@skaldapp/flat-json-tree": "^2.2.21",
|
|
37
37
|
"ajv": "^8.17.1",
|
|
38
38
|
"ajv-keywords": "^5.1.0",
|
|
39
|
-
"consola": "^3.4.2",
|
|
40
39
|
"json-schema-to-ts": "^3.1.1",
|
|
41
|
-
"ofetch": "^1.5.1",
|
|
42
40
|
"random-word-slugs": "^0.1.7",
|
|
43
|
-
"vue": "^3.5.
|
|
41
|
+
"vue": "^3.5.27"
|
|
44
42
|
},
|
|
45
43
|
"devDependencies": {
|
|
46
|
-
"@skaldapp/configs": "^1.2.
|
|
44
|
+
"@skaldapp/configs": "^1.2.46",
|
|
47
45
|
"eslint": "^9.39.2"
|
|
48
46
|
}
|
|
49
47
|
}
|