@absolutejs/sync-pack-favorites 0.2.1 → 0.2.2
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.js +16 -1
- package/dist/index.js.map +2 -2
- package/dist/manifest.d.ts +3 -0
- package/dist/manifest.js +8546 -0
- package/dist/manifest.js.map +123 -0
- package/dist/manifest.json +53 -0
- package/package.json +24 -4
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contract": 1,
|
|
3
|
+
"identity": {
|
|
4
|
+
"accent": "#eab308",
|
|
5
|
+
"category": "sync",
|
|
6
|
+
"description": "Per-actor saved-resources pack for `@absolutejs/sync` — one `engine.registerPack(createFavoritesPack(...))` adds favorite/unfavorite/pin mutations and an owner-scoped live list, with deterministic row ids for idempotent toggling and an optional join collection that pairs each favorite with its host resource row.",
|
|
7
|
+
"docsUrl": "https://github.com/absolutejs/sync-packs/tree/main/favorites",
|
|
8
|
+
"name": "@absolutejs/sync-pack-favorites",
|
|
9
|
+
"tagline": "Let members save and pin their favorite things."
|
|
10
|
+
},
|
|
11
|
+
"settings": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"prefix": {
|
|
15
|
+
"description": "Name prefix for the pack’s table, collection, and mutations.",
|
|
16
|
+
"title": "Name prefix",
|
|
17
|
+
"type": "string"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"wiring": [
|
|
22
|
+
{
|
|
23
|
+
"description": "Rides @absolutejs/sync’s engine recipe: `engine` is its module-scope binding.",
|
|
24
|
+
"id": "default",
|
|
25
|
+
"server": {
|
|
26
|
+
"code": "// getActorId defaults to (ctx) => ctx.userId; add joinResources for a\n// favorites-with-resource live collection.\nengine.registerPack(createFavoritesPack(${settings}));",
|
|
27
|
+
"imports": [
|
|
28
|
+
{
|
|
29
|
+
"from": "@absolutejs/sync-pack-favorites",
|
|
30
|
+
"names": [
|
|
31
|
+
"createFavoritesPack"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"placement": "module-scope"
|
|
36
|
+
},
|
|
37
|
+
"title": "Register favorites on the sync engine"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"tools": {
|
|
41
|
+
"pack_surface": {
|
|
42
|
+
"annotations": {
|
|
43
|
+
"readOnlyHint": true
|
|
44
|
+
},
|
|
45
|
+
"description": "What this favorites pack adds to the sync engine: the table it owns, its collections (including any resource join), and its mutations.",
|
|
46
|
+
"input": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"properties": {}
|
|
49
|
+
},
|
|
50
|
+
"kind": "runtime"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@absolutejs/sync-pack-favorites",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Per-actor saved-resources pack for @absolutejs/sync — favorite/unfavorite/pin/list with optional join to host resources",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/absolutejs/sync-packs.git",
|
|
8
8
|
"directory": "favorites"
|
|
9
9
|
},
|
|
10
|
+
"homepage": "https://github.com/absolutejs/sync-packs/tree/main/favorites",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/absolutejs/sync-packs/issues"
|
|
13
|
+
},
|
|
10
14
|
"main": "./dist/index.js",
|
|
11
15
|
"module": "./dist/index.js",
|
|
12
16
|
"types": "./dist/index.d.ts",
|
|
@@ -24,7 +28,7 @@
|
|
|
24
28
|
"bookmarks"
|
|
25
29
|
],
|
|
26
30
|
"scripts": {
|
|
27
|
-
"build": "rm -rf dist && bun build src/index.ts --outdir dist --sourcemap --target=bun --external @absolutejs/sync && tsc --project tsconfig.build.json",
|
|
31
|
+
"build": "rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/sync && tsc --project tsconfig.build.json && absolute-manifest emit",
|
|
28
32
|
"test": "bun test",
|
|
29
33
|
"typecheck": "tsc --noEmit",
|
|
30
34
|
"format": "prettier --write \"./**/*.{ts,json,md}\"",
|
|
@@ -44,7 +48,23 @@
|
|
|
44
48
|
"types": "./dist/index.d.ts",
|
|
45
49
|
"import": "./dist/index.js",
|
|
46
50
|
"default": "./dist/index.js"
|
|
47
|
-
}
|
|
51
|
+
},
|
|
52
|
+
"./manifest": {
|
|
53
|
+
"types": "./dist/manifest.d.ts",
|
|
54
|
+
"import": "./dist/manifest.js",
|
|
55
|
+
"default": "./dist/manifest.js"
|
|
56
|
+
},
|
|
57
|
+
"./manifest.json": "./dist/manifest.json"
|
|
58
|
+
},
|
|
59
|
+
"files": [
|
|
60
|
+
"dist",
|
|
61
|
+
"README.md"
|
|
62
|
+
],
|
|
63
|
+
"absolutejs": {
|
|
64
|
+
"manifestContract": 1
|
|
48
65
|
},
|
|
49
|
-
"
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@absolutejs/manifest": "^0.1.0",
|
|
68
|
+
"@sinclair/typebox": "^0.34.0"
|
|
69
|
+
}
|
|
50
70
|
}
|