@actuate-media/plugin-commerce 0.0.13 → 0.0.14
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/CHANGELOG.md +28 -0
- package/dist/index.d.ts +2 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @actuate-media/plugin-commerce
|
|
2
2
|
|
|
3
|
+
## 0.0.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c231dd0: Add `definePlugin` and migrate all 10 plugins onto the canonical `PluginDefinition` contract.
|
|
8
|
+
|
|
9
|
+
cms-core already exported `PluginDefinition`, but every plugin hand-rolled a
|
|
10
|
+
local `ActuatePlugin` interface — a lossy subset that dropped `version`/`init`
|
|
11
|
+
and, in blocks/email/ai, widened hook payloads to `unknown[]`/`event: string`.
|
|
12
|
+
That's copy-paste drift with no shared source of truth.
|
|
13
|
+
|
|
14
|
+
`cms-core` now exports `definePlugin(plugin: PluginDefinition)` (an identity
|
|
15
|
+
helper like `defineConfig`), and each plugin imports the canonical type instead
|
|
16
|
+
of its own: the local `ActuatePlugin` interfaces are deleted, factory return
|
|
17
|
+
types are `PluginDefinition`, and the widened `hooks.ts` types are retyped as
|
|
18
|
+
`PluginHook[]`. Type-only change — no runtime behavior, plugin `name`, or config
|
|
19
|
+
options changed. Net −69 lines.
|
|
20
|
+
|
|
21
|
+
- 325694f: Import `definePlugin` from the lightweight `@actuate-media/cms-core/config`
|
|
22
|
+
entry instead of the barrel.
|
|
23
|
+
|
|
24
|
+
The plugin-definition migration imported the `definePlugin` **value** from
|
|
25
|
+
`@actuate-media/cms-core`, which pulls the entire cms-core barrel (graphql,
|
|
26
|
+
sharp, sentry, codegen) into every plugin's runtime — bundle bloat for
|
|
27
|
+
consumers and, under parallel test load, a timeout. The `/config` subpath exists
|
|
28
|
+
precisely to avoid the barrel. Types stay as erased `import type`, so nothing
|
|
29
|
+
heavy is loaded. No API or behavior change.
|
|
30
|
+
|
|
3
31
|
## 0.0.13
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type PluginDefinition } from '@actuate-media/cms-core/config';
|
|
2
2
|
export interface CommercePluginConfig {
|
|
3
3
|
stripe?: {
|
|
4
4
|
secretKey: string;
|
|
@@ -12,19 +12,8 @@ export interface CommercePluginConfig {
|
|
|
12
12
|
enabled?: boolean;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
interface ActuatePlugin {
|
|
16
|
-
name: string;
|
|
17
|
-
fields?: Record<string, FieldDefinition>;
|
|
18
|
-
collections?: Record<string, CollectionDefinition>;
|
|
19
|
-
adminNavItems?: Array<{
|
|
20
|
-
label: string;
|
|
21
|
-
icon: string;
|
|
22
|
-
path: string;
|
|
23
|
-
}>;
|
|
24
|
-
hooks?: PluginHook[];
|
|
25
|
-
}
|
|
26
15
|
/** Creates the Actuate Commerce plugin with optional Stripe, tax, and shipping configuration. */
|
|
27
|
-
export declare function commercePlugin(config?: CommercePluginConfig):
|
|
16
|
+
export declare function commercePlugin(config?: CommercePluginConfig): PluginDefinition;
|
|
28
17
|
export type { CommercePluginConfig as CommerceConfig };
|
|
29
18
|
export { commerceFields } from './fields.js';
|
|
30
19
|
export { commerceCollections } from './collections.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAKpF,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE;QACP,SAAS,EAAE,MAAM,CAAA;QACjB,aAAa,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB,CAAA;IACD,GAAG,CAAC,EAAE;QACJ,aAAa,CAAC,EAAE,OAAO,CAAA;KACxB,CAAA;IACD,QAAQ,CAAC,EAAE;QACT,OAAO,CAAC,EAAE,OAAO,CAAA;KAClB,CAAA;CACF;AAED,iGAAiG;AACjG,wBAAgB,cAAc,CAAC,MAAM,GAAE,oBAAyB,GAAG,gBAAgB,CAiBlF;AAED,YAAY,EAAE,oBAAoB,IAAI,cAAc,EAAE,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { definePlugin } from '@actuate-media/cms-core/config';
|
|
1
2
|
import { commerceFields } from './fields.js';
|
|
2
3
|
import { commerceCollections } from './collections.js';
|
|
3
4
|
import { commerceHooks } from './hooks.js';
|
|
4
5
|
/** Creates the Actuate Commerce plugin with optional Stripe, tax, and shipping configuration. */
|
|
5
6
|
export function commercePlugin(config = {}) {
|
|
6
|
-
return {
|
|
7
|
+
return definePlugin({
|
|
7
8
|
name: 'commerce',
|
|
8
9
|
fields: commerceFields,
|
|
9
10
|
collections: commerceCollections,
|
|
@@ -18,7 +19,7 @@ export function commercePlugin(config = {}) {
|
|
|
18
19
|
},
|
|
19
20
|
],
|
|
20
21
|
hooks: commerceHooks,
|
|
21
|
-
};
|
|
22
|
+
});
|
|
22
23
|
}
|
|
23
24
|
export { commerceFields } from './fields.js';
|
|
24
25
|
export { commerceCollections } from './collections.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAyB,MAAM,gCAAgC,CAAA;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAgB1C,iGAAiG;AACjG,MAAM,UAAU,cAAc,CAAC,SAA+B,EAAE;IAC9D,OAAO,YAAY,CAAC;QAClB,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,cAAc;QACtB,WAAW,EAAE,mBAAmB;QAChC,aAAa,EAAE;YACb,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,oBAAoB,EAAE;YAClE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,kBAAkB,EAAE;YACpE,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,qBAAqB,EAAE;YACpE;gBACE,KAAK,EAAE,oBAAoB;gBAC3B,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,qBAAqB;aAC5B;SACF;QACD,KAAK,EAAE,aAAa;KACrB,CAAC,CAAA;AACJ,CAAC;AAGD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actuate-media/plugin-commerce",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@types/react": "^19.0.0",
|
|
29
29
|
"typescript": "^5.7.0",
|
|
30
30
|
"vitest": "^4.1.0",
|
|
31
|
-
"@actuate-media/cms-core": "0.
|
|
31
|
+
"@actuate-media/cms-core": "0.93.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@actuate-media/cms-core": ">=0.1.0",
|