@decocms/apps 1.3.1 → 1.4.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/package.json +3 -1
- package/registry.ts +59 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/apps",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Deco commerce apps for TanStack Start - Shopify, VTEX, commerce types, analytics utils",
|
|
6
6
|
"exports": {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"./commerce/components/Picture": "./commerce/components/Picture.tsx",
|
|
14
14
|
"./commerce/utils/*": "./commerce/utils/*.ts",
|
|
15
15
|
"./commerce/sdk/*": "./commerce/sdk/*.ts",
|
|
16
|
+
"./registry": "./registry.ts",
|
|
16
17
|
"./shopify": "./shopify/index.ts",
|
|
17
18
|
"./shopify/mod": "./shopify/mod.ts",
|
|
18
19
|
"./shopify/client": "./shopify/client.ts",
|
|
@@ -94,6 +95,7 @@
|
|
|
94
95
|
"vtex/",
|
|
95
96
|
"resend/",
|
|
96
97
|
"website/",
|
|
98
|
+
"registry.ts",
|
|
97
99
|
"!**/__tests__/",
|
|
98
100
|
"!scripts/"
|
|
99
101
|
],
|
package/registry.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Declarative catalogue of installable apps published under `@decocms/apps`.
|
|
3
|
+
*
|
|
4
|
+
* `@decocms/start`'s `autoconfigApps()` consumes this array to wire CMS
|
|
5
|
+
* commerce loaders and admin invoke handlers for whichever apps the host
|
|
6
|
+
* site has configured in its decofile. New apps are added here — no edit
|
|
7
|
+
* to the framework or the site is required.
|
|
8
|
+
*
|
|
9
|
+
* Import path: `@decocms/apps/registry`
|
|
10
|
+
*
|
|
11
|
+
* NOTE: the type is inlined rather than imported from
|
|
12
|
+
* `@decocms/start/apps` so this file ships in `@decocms/apps@1.4.0`
|
|
13
|
+
* against any installed `@decocms/start` version. Once callers pin a
|
|
14
|
+
* start version that exposes `AppRegistry`, the type can be swapped.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
interface AppRegistryEntry {
|
|
18
|
+
/** Block key in the decofile, e.g. "deco-shopify". */
|
|
19
|
+
blockKey: string;
|
|
20
|
+
/** Lazy dynamic import of the app's mod module. */
|
|
21
|
+
module: () => Promise<any>;
|
|
22
|
+
/** Human-readable name shown in admin install UI. */
|
|
23
|
+
displayName?: string;
|
|
24
|
+
/** Icon URL (absolute or site-relative) shown in admin install UI. */
|
|
25
|
+
icon?: string;
|
|
26
|
+
/** Grouping label, e.g. "commerce", "email", "analytics". */
|
|
27
|
+
category?: string;
|
|
28
|
+
/** Short summary shown in admin install UI. */
|
|
29
|
+
description?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
type AppRegistry = readonly AppRegistryEntry[];
|
|
33
|
+
|
|
34
|
+
export const APP_REGISTRY: AppRegistry = [
|
|
35
|
+
{
|
|
36
|
+
blockKey: "deco-shopify",
|
|
37
|
+
module: () => import("./shopify/mod"),
|
|
38
|
+
displayName: "Shopify",
|
|
39
|
+
category: "commerce",
|
|
40
|
+
description: "Shopify Storefront API commerce integration",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
blockKey: "deco-vtex",
|
|
44
|
+
module: () => import("./vtex/mod"),
|
|
45
|
+
displayName: "VTEX",
|
|
46
|
+
category: "commerce",
|
|
47
|
+
description: "VTEX IO commerce integration",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
blockKey: "deco-resend",
|
|
51
|
+
module: () => import("./resend/mod"),
|
|
52
|
+
displayName: "Resend",
|
|
53
|
+
category: "email",
|
|
54
|
+
description: "Transactional email via Resend",
|
|
55
|
+
},
|
|
56
|
+
];
|
|
57
|
+
|
|
58
|
+
export default APP_REGISTRY;
|
|
59
|
+
export type { AppRegistryEntry, AppRegistry };
|