@base44/app-plugin-commerce 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
CHANGED
|
@@ -73,9 +73,10 @@ From your existing Base44 app:
|
|
|
73
73
|
npx base44 agents push
|
|
74
74
|
```
|
|
75
75
|
3. **Copy the UI files:** `src/commerce/admin/` → `src/commerce/admin/` and `src/commerce/utils/` → `src/commerce/utils/`.
|
|
76
|
-
4. **Confirm UI deps** — `sonner`, `recharts` and `react-markdown` all ship with the default Base44 template and are the only ones the admin needs
|
|
76
|
+
4. **Confirm UI deps** — `sonner`, `recharts` and `react-markdown` all ship with the default Base44 template and are the only ones the admin needs, so usually there is **nothing to install**. Read your app's `package.json` first and install *only* the names missing from it — never re-install a package that is already a dependency:
|
|
77
77
|
```bash
|
|
78
|
-
|
|
78
|
+
grep -E '"(sonner|recharts|react-markdown)"' package.json # all three listed → skip the install
|
|
79
|
+
npm i <only the missing names>
|
|
79
80
|
```
|
|
80
81
|
See [`src/commerce/admin/README.md`](./src/commerce/admin/README.md) for the exact shadcn component list.
|
|
81
82
|
5. **Mount the admin router** in your app:
|
|
@@ -112,6 +113,8 @@ If you build on Base44's hosted platform, use the Base44 agent/MCP to write the
|
|
|
112
113
|
|
|
113
114
|
Publishing is manual: **Actions → Manual Package Publish → Run workflow** ([`.github/workflows/manual-publish.yml`](./.github/workflows/manual-publish.yml)).
|
|
114
115
|
|
|
115
|
-
Inputs: `version` (`patch`/`minor`/`major` or an explicit `0.
|
|
116
|
+
Inputs: `version` (`patch`/`minor`/`major` or an explicit `0.2.0`), `npm_tag` (`latest`, `beta`, …) and `dry_run`. The workflow bumps `package.json`, prints the tarball contents, runs `npm publish`, then commits the bump, tags `v<version>` and cuts a GitHub release. A dry run publishes nothing and leaves no tag or commit.
|
|
116
117
|
|
|
117
|
-
|
|
118
|
+
Registry auth uses **npm trusted publishing** — the workflow holds no npm token. It authenticates over OIDC (`id-token: write` plus `npm install -g npm@latest`, which needs npm ≥ 11.5.1), which also signs a provenance attestation for each release. This requires a trusted publisher on the npm package (**Settings → Trusted Publisher → GitHub Actions**, repository `base44/app-plugin-commerce`, workflow `manual-publish.yml`, no environment); if that config is missing or the workflow filename changes, publishing fails with `ENEEDAUTH`.
|
|
119
|
+
|
|
120
|
+
Pushing the release commit and tag additionally needs the org's `BASE44_GITHUB_ACTIONS_APP_ID` variable and `BASE44_GITHUB_ACTIONS_APP_PRIVATE_KEY` secret.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@base44/app-plugin-commerce",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Base44 Commerce plugin — entities, backend functions, shared commerce engine, admin UI and the commerce skill, shipped as copyable source",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"base44",
|
package/scripts/install.js
CHANGED
|
@@ -145,7 +145,8 @@
|
|
|
145
145
|
console.log(
|
|
146
146
|
"\nNext steps (see skills/commerce/installation-guidelines.md + post-installation.md):\n" +
|
|
147
147
|
" 1. No deps to add: sonner, recharts and react-markdown ship with the default\n" +
|
|
148
|
-
" Base44 template —
|
|
148
|
+
" Base44 template — check package.json and npm i only what is truly missing;\n" +
|
|
149
|
+
" do not re-install packages already listed as dependencies\n" +
|
|
149
150
|
' 2. Mount the admin router: <Route path="/admin/*" element={<AdminApp />} />\n' +
|
|
150
151
|
" and implement the payment return page /order-received (post-installation.md)\n" +
|
|
151
152
|
" 3. Grant your user the admin role, then settle the store's data — generate a catalog,\n" +
|
|
@@ -44,7 +44,7 @@ Confirm your `base44/config.jsonc` `entitiesDir`/`functionsDir` point at these f
|
|
|
44
44
|
1. `npx base44 entities push` — creates/updates the 24 entity schemas. *(CLI path only — the Base44 runtime deploys on write.)*
|
|
45
45
|
2. `npx base44 functions deploy` — deploys the 16 functions. *(CLI path only.)*
|
|
46
46
|
3. `npx base44 agents push` — registers the `commerce/StoreAdmin` agent (§3). *(CLI path only.)*
|
|
47
|
-
4.
|
|
47
|
+
4. Check the app's `package.json` for `sonner`, `recharts` and `react-markdown`, and run `npm i` **only** for the ones actually absent — all three ship with the default Base44 template, so the normal outcome is no install at all. Do not re-install a package that is already a dependency. Nothing else is needed. Verify the shadcn primitives listed in [`src/commerce/admin/README.md`](../../src/commerce/admin/README.md) exist in your app.
|
|
48
48
|
5. Mount the admin router (see [`post-installation.md`](./post-installation.md)).
|
|
49
49
|
6. Grant your user the `admin` role.
|
|
50
50
|
7. Decide the store's data with the user — generate a real starter catalog, seed the generic demo data, or leave the store empty and let the operator hit **Initialize store defaults** on the admin's first-run screen. See [`post-installation.md`](./post-installation.md) §2; both seeded options mark the business as ready and the first-run screen never appears.
|
|
@@ -11,7 +11,7 @@ The admin UI is a self-contained React app under `src/commerce/admin/`. Its only
|
|
|
11
11
|
**Steps:**
|
|
12
12
|
|
|
13
13
|
1. Copy `src/commerce/admin/` → `src/commerce/admin/` and `src/commerce/utils/` → `src/commerce/utils/` (already done if you ran `scripts/install.js`).
|
|
14
|
-
2.
|
|
14
|
+
2. Check the app's `package.json` for `sonner`, `recharts` and `react-markdown` (the StoreAdmin bot uses the last one), and run `npm i` **only** for the ones actually absent — all three ship with the default Base44 template, so the normal outcome is no install at all. Do not re-install a package that is already a dependency. The template needs **no other dependency**. Verify the shadcn primitives listed in `src/commerce/admin/README.md` are present (`npx shadcn@latest add <name>` for any missing).
|
|
15
15
|
3. Mount the router:
|
|
16
16
|
```jsx
|
|
17
17
|
import AdminApp from "@/commerce/admin";
|
|
@@ -12,11 +12,14 @@ Tailwind + shadcn/ui + React Router) to get a full store back office.
|
|
|
12
12
|
1. Deploy the backend first (`base44/` entities + functions — see the root README).
|
|
13
13
|
2. Copy this folder to `src/commerce/admin/` in your app.
|
|
14
14
|
3. Confirm the deps — `sonner`, `recharts` and `react-markdown` all come with
|
|
15
|
-
the default template and are all this folder needs
|
|
16
|
-
|
|
15
|
+
the default template and are all this folder needs, so usually there is
|
|
16
|
+
nothing to install. Read your app's `package.json` first and install *only*
|
|
17
|
+
the names missing from it — never re-install a package that is already a
|
|
18
|
+
dependency:
|
|
17
19
|
|
|
18
20
|
```bash
|
|
19
|
-
|
|
21
|
+
grep -E '"(sonner|recharts|react-markdown)"' package.json # all three listed → skip the install
|
|
22
|
+
npm i <only the missing names>
|
|
20
23
|
```
|
|
21
24
|
|
|
22
25
|
4. Mount the app in your router:
|