@bestcheckout/dynamic-component-cli 0.1.0 → 0.1.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/README.md +525 -12
- package/package.json +14 -10
- package/skills/checkout-theme-dynamic-development/SKILL.md +14 -0
- package/skills/checkout-theme-dynamic-development/agents/openai.yaml +3 -0
- package/skills/checkout-theme-dynamic-development/references/behaviors.json +1214 -0
- package/skills/checkout-theme-dynamic-development/references/cli-development.md +43 -0
- package/skills/checkout-theme-dynamic-development/references/component-catalog.json +5172 -0
- package/skills/checkout-theme-dynamic-development/references/workflow.md +114 -0
- package/src/core/build.mjs +62 -46
- package/src/core/doctor.mjs +14 -2
- package/src/core/project.mjs +10 -7
- package/src/core/server.mjs +16 -3
- package/src/core/source-bundle.mjs +135 -0
- package/src/protocol/validation.mjs +57 -1
- package/templates/starter/README.md +6 -0
- package/types/index.d.ts +182 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bestcheckout/dynamic-component-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "CLI and starter project generator for BestCheckout dynamic components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -11,17 +11,10 @@
|
|
|
11
11
|
"src",
|
|
12
12
|
"types",
|
|
13
13
|
"templates",
|
|
14
|
+
"skills",
|
|
14
15
|
"README.md",
|
|
15
16
|
"LICENSE"
|
|
16
17
|
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"test": "node --test tests/*.test.mjs",
|
|
19
|
-
"pack:check": "npm pack --dry-run",
|
|
20
|
-
"test:integration": "node tests/standalone.integration.mjs",
|
|
21
|
-
"test:editor": "node scripts/test-editor.mjs",
|
|
22
|
-
"sync:protocol": "node scripts/sync-protocol.mjs",
|
|
23
|
-
"check:protocol": "node scripts/sync-protocol.mjs --check"
|
|
24
|
-
},
|
|
25
18
|
"engines": {
|
|
26
19
|
"node": ">=20.10.0"
|
|
27
20
|
},
|
|
@@ -37,6 +30,7 @@
|
|
|
37
30
|
"dependencies": {
|
|
38
31
|
"acorn": "8.15.0",
|
|
39
32
|
"esbuild": "0.21.5",
|
|
33
|
+
"fflate": "0.8.2",
|
|
40
34
|
"playwright": "1.56.1",
|
|
41
35
|
"react": "18.3.1",
|
|
42
36
|
"react-dom": "18.3.1",
|
|
@@ -49,5 +43,15 @@
|
|
|
49
43
|
},
|
|
50
44
|
"devDependencies": {
|
|
51
45
|
"dts-bundle-generator": "9.5.1"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"test": "node --test tests/*.test.mjs",
|
|
49
|
+
"pack:check": "npm pack --dry-run",
|
|
50
|
+
"test:integration": "node tests/standalone.integration.mjs",
|
|
51
|
+
"test:editor": "node scripts/test-editor.mjs",
|
|
52
|
+
"test:payment-example": "node tests/payment-example.integration.mjs",
|
|
53
|
+
"test:payment-host": "node tests/payment-host.integration.mjs",
|
|
54
|
+
"sync:protocol": "node scripts/sync-protocol.mjs",
|
|
55
|
+
"check:protocol": "node scripts/sync-protocol.mjs --check"
|
|
52
56
|
}
|
|
53
|
-
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: checkout-theme-dynamic-development
|
|
3
|
+
description: "Develop or edit local BestCheckout dynamic React components with the dynamic-component CLI for Checkout, Upsell, Downsell and Thank You. Use for local source implementation, validation and Editor preview while preserving business-function completeness. Not needed for MCP-only page customization or platform repository maintenance."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Local Checkout component development
|
|
7
|
+
|
|
8
|
+
Help a developer work in a local dynamic-component project. BestCheckout MCP and the shop-visual source repository are not prerequisites. The CLI provides the development server, validation and builds; Editor integration provides page preview, Save and Publish.
|
|
9
|
+
|
|
10
|
+
Read the [shared development principles](references/workflow.md) and [local development steps](references/cli-development.md). Use the installed project's CLI version and public documentation for implementation. Read relevant profiles from the generated [behavior catalog](references/behaviors.json) and [component catalog](references/component-catalog.json) as directed by the local steps, checking version compatibility. Do not load every profile for a small change.
|
|
11
|
+
|
|
12
|
+
If MCP is also connected, it may supply relevant page context within the user's scope. Its presence does not change the local source or save path: do not submit the same work through MCP resource writes, accept changes or publish as a side effect of local development. A requested switch of development path requires reconciling the latest source, component identity and saved state before continuing. For MCP-only customization, use its own execution guide; this Skill need not be installed or invoked.
|
|
13
|
+
|
|
14
|
+
Missing page configuration, Editor access or a real Host leaves the corresponding checks unverified. Continue local implementation and checks that do not depend on those facts; ask only for decisions that materially change the result. Do not claim page-wide completeness or invent a business result from a sample preview.
|