@ecomweb/cli 0.6.1 → 0.8.0
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 +235 -40
- package/dist/base-command.d.ts +8 -0
- package/dist/base-command.js +43 -4
- package/dist/base-command.js.map +1 -1
- package/dist/commands/auth/login.d.ts +6 -4
- package/dist/commands/auth/login.js +117 -89
- package/dist/commands/auth/login.js.map +1 -1
- package/dist/commands/auth/logout.js +28 -9
- package/dist/commands/auth/logout.js.map +1 -1
- package/dist/commands/auth/profiles/delete.js +11 -0
- package/dist/commands/auth/profiles/delete.js.map +1 -1
- package/dist/commands/auth/profiles/list.js +2 -2
- package/dist/commands/auth/profiles/list.js.map +1 -1
- package/dist/commands/auth/status.js +17 -9
- package/dist/commands/auth/status.js.map +1 -1
- package/dist/commands/deploy.js +16 -3
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/deployments/promote.js +1 -1
- package/dist/commands/deployments/promote.js.map +1 -1
- package/dist/commands/deployments/rollback.js +1 -1
- package/dist/commands/deployments/rollback.js.map +1 -1
- package/dist/commands/deployments/unpublish.js +1 -1
- package/dist/commands/deployments/unpublish.js.map +1 -1
- package/dist/commands/describe.d.ts +1 -1
- package/dist/commands/describe.js +4 -4
- package/dist/commands/describe.js.map +1 -1
- package/dist/commands/{init.d.ts → metafield-definitions/create.d.ts} +4 -6
- package/dist/commands/metafield-definitions/create.js +34 -0
- package/dist/commands/metafield-definitions/create.js.map +1 -0
- package/dist/commands/metafield-definitions/delete.d.ts +21 -0
- package/dist/commands/metafield-definitions/delete.js +32 -0
- package/dist/commands/metafield-definitions/delete.js.map +1 -0
- package/dist/commands/metafield-definitions/get.d.ts +21 -0
- package/dist/commands/metafield-definitions/get.js +30 -0
- package/dist/commands/metafield-definitions/get.js.map +1 -0
- package/dist/commands/metafield-definitions/list.d.ts +19 -0
- package/dist/commands/metafield-definitions/list.js +35 -0
- package/dist/commands/metafield-definitions/list.js.map +1 -0
- package/dist/commands/metafield-definitions/update.d.ts +23 -0
- package/dist/commands/metafield-definitions/update.js +39 -0
- package/dist/commands/metafield-definitions/update.js.map +1 -0
- package/dist/commands/{auth/verify.d.ts → metafields/get.d.ts} +2 -3
- package/dist/commands/metafields/get.js +32 -0
- package/dist/commands/metafields/get.js.map +1 -0
- package/dist/commands/metafields/set.d.ts +24 -0
- package/dist/commands/metafields/set.js +83 -0
- package/dist/commands/metafields/set.js.map +1 -0
- package/dist/commands/metaobject-definitions/create.d.ts +20 -0
- package/dist/commands/metaobject-definitions/create.js +33 -0
- package/dist/commands/metaobject-definitions/create.js.map +1 -0
- package/dist/commands/metaobject-definitions/delete.d.ts +21 -0
- package/dist/commands/metaobject-definitions/delete.js +32 -0
- package/dist/commands/metaobject-definitions/delete.js.map +1 -0
- package/dist/commands/metaobject-definitions/get.d.ts +21 -0
- package/dist/commands/metaobject-definitions/get.js +31 -0
- package/dist/commands/metaobject-definitions/get.js.map +1 -0
- package/dist/commands/metaobject-definitions/list.d.ts +20 -0
- package/dist/commands/metaobject-definitions/list.js +41 -0
- package/dist/commands/metaobject-definitions/list.js.map +1 -0
- package/dist/commands/metaobject-definitions/update.d.ts +23 -0
- package/dist/commands/metaobject-definitions/update.js +38 -0
- package/dist/commands/metaobject-definitions/update.js.map +1 -0
- package/dist/commands/metaobjects/create.d.ts +24 -0
- package/dist/commands/metaobjects/create.js +40 -0
- package/dist/commands/metaobjects/create.js.map +1 -0
- package/dist/commands/metaobjects/delete.d.ts +22 -0
- package/dist/commands/metaobjects/delete.js +34 -0
- package/dist/commands/metaobjects/delete.js.map +1 -0
- package/dist/commands/metaobjects/get.d.ts +22 -0
- package/dist/commands/metaobjects/get.js +32 -0
- package/dist/commands/metaobjects/get.js.map +1 -0
- package/dist/commands/metaobjects/list.d.ts +24 -0
- package/dist/commands/metaobjects/list.js +56 -0
- package/dist/commands/metaobjects/list.js.map +1 -0
- package/dist/commands/metaobjects/update.d.ts +27 -0
- package/dist/commands/metaobjects/update.js +45 -0
- package/dist/commands/metaobjects/update.js.map +1 -0
- package/dist/commands/storefront/init.d.ts +3 -1
- package/dist/commands/storefront/init.js +23 -2
- package/dist/commands/storefront/init.js.map +1 -1
- package/dist/commands/stores/create.d.ts +21 -0
- package/dist/commands/stores/create.js +68 -0
- package/dist/commands/stores/create.js.map +1 -0
- package/dist/commands/stores/current.js +1 -1
- package/dist/commands/stores/current.js.map +1 -1
- package/dist/commands/stores/list.js +3 -3
- package/dist/commands/stores/list.js.map +1 -1
- package/dist/commands/stores/switch.js +14 -6
- package/dist/commands/stores/switch.js.map +1 -1
- package/dist/commands/theme/create.d.ts +20 -0
- package/dist/commands/theme/create.js +40 -0
- package/dist/commands/theme/create.js.map +1 -0
- package/dist/commands/{auth/register.d.ts → theme/duplicate.d.ts} +4 -2
- package/dist/commands/theme/duplicate.js +34 -0
- package/dist/commands/theme/duplicate.js.map +1 -0
- package/dist/commands/theme/link.d.ts +24 -0
- package/dist/commands/theme/link.js +60 -0
- package/dist/commands/theme/link.js.map +1 -0
- package/dist/commands/{setup.d.ts → theme/list.d.ts} +2 -3
- package/dist/commands/theme/list.js +32 -0
- package/dist/commands/theme/list.js.map +1 -0
- package/dist/commands/theme/publish.d.ts +22 -0
- package/dist/commands/theme/publish.js +68 -0
- package/dist/commands/theme/publish.js.map +1 -0
- package/dist/commands/theme/schema/push.d.ts +20 -0
- package/dist/commands/theme/schema/push.js +61 -0
- package/dist/commands/theme/schema/push.js.map +1 -0
- package/dist/commands/theme/update.d.ts +23 -0
- package/dist/commands/theme/update.js +62 -0
- package/dist/commands/theme/update.js.map +1 -0
- package/dist/commands/theme/use.d.ts +23 -0
- package/dist/commands/theme/use.js +71 -0
- package/dist/commands/theme/use.js.map +1 -0
- package/dist/commands/theme/versions.d.ts +21 -0
- package/dist/commands/theme/versions.js +33 -0
- package/dist/commands/theme/versions.js.map +1 -0
- package/dist/lib/api-client.d.ts +5 -4
- package/dist/lib/api-client.js +32 -16
- package/dist/lib/api-client.js.map +1 -1
- package/dist/lib/codex-skill.d.ts +1 -1
- package/dist/lib/codex-skill.js +12 -8
- package/dist/lib/codex-skill.js.map +1 -1
- package/dist/lib/config.d.ts +6 -18
- package/dist/lib/config.js +35 -64
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/credential-store.d.ts +44 -0
- package/dist/lib/credential-store.js +137 -0
- package/dist/lib/credential-store.js.map +1 -0
- package/dist/lib/custom-data.d.ts +42 -0
- package/dist/lib/custom-data.js +167 -0
- package/dist/lib/custom-data.js.map +1 -0
- package/dist/lib/deployments.d.ts +8 -1
- package/dist/lib/deployments.js +58 -11
- package/dist/lib/deployments.js.map +1 -1
- package/dist/lib/describe-metafields.d.ts +9 -0
- package/dist/lib/describe-metafields.js +213 -0
- package/dist/lib/describe-metafields.js.map +1 -0
- package/dist/lib/device-login.d.ts +22 -0
- package/dist/lib/device-login.js +66 -0
- package/dist/lib/device-login.js.map +1 -0
- package/dist/lib/errors.d.ts +1 -0
- package/dist/lib/errors.js +6 -1
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/file-lock.d.ts +6 -0
- package/dist/lib/file-lock.js +66 -0
- package/dist/lib/file-lock.js.map +1 -0
- package/dist/lib/live-confirm.d.ts +11 -0
- package/dist/lib/live-confirm.js +34 -0
- package/dist/lib/live-confirm.js.map +1 -0
- package/dist/lib/open-browser.d.ts +13 -0
- package/dist/lib/open-browser.js +38 -0
- package/dist/lib/open-browser.js.map +1 -0
- package/dist/lib/pending-login.d.ts +5 -0
- package/dist/lib/pending-login.js +39 -0
- package/dist/lib/pending-login.js.map +1 -0
- package/dist/lib/project-setup.d.ts +1 -0
- package/dist/lib/project-setup.js +20 -0
- package/dist/lib/project-setup.js.map +1 -1
- package/dist/lib/secure-file.d.ts +1 -0
- package/dist/lib/secure-file.js +15 -0
- package/dist/lib/secure-file.js.map +1 -0
- package/dist/lib/session.d.ts +40 -0
- package/dist/lib/session.js +80 -0
- package/dist/lib/session.js.map +1 -0
- package/dist/lib/store-selection.d.ts +19 -0
- package/dist/lib/store-selection.js +23 -0
- package/dist/lib/store-selection.js.map +1 -0
- package/dist/lib/template-scaffold.d.ts +1 -0
- package/dist/lib/template-scaffold.js +5 -2
- package/dist/lib/template-scaffold.js.map +1 -1
- package/dist/lib/theme-schema-export.d.ts +1 -1
- package/dist/lib/theme-schema-export.js +4 -5
- package/dist/lib/theme-schema-export.js.map +1 -1
- package/dist/lib/themes.d.ts +143 -0
- package/dist/lib/themes.js +277 -0
- package/dist/lib/themes.js.map +1 -0
- package/dist/lib/validators.js +16 -0
- package/dist/lib/validators.js.map +1 -1
- package/oclif.manifest.json +8168 -5388
- package/package.json +2 -1
- package/dist/commands/auth/register.js +0 -35
- package/dist/commands/auth/register.js.map +0 -1
- package/dist/commands/auth/verify.js +0 -43
- package/dist/commands/auth/verify.js.map +0 -1
- package/dist/commands/init.js +0 -84
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/setup.js +0 -186
- package/dist/commands/setup.js.map +0 -1
- package/dist/lib/email-login.d.ts +0 -35
- package/dist/lib/email-login.js +0 -86
- package/dist/lib/email-login.js.map +0 -1
package/README.md
CHANGED
|
@@ -5,20 +5,17 @@ Agent-friendly CLI for the ecomweb platform. Manage your store, products, orders
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
#
|
|
9
|
-
npx @ecomweb/cli
|
|
8
|
+
npx @ecomweb/cli auth login # approve this CLI in your browser
|
|
9
|
+
npx @ecomweb/cli stores list # every store you belong to
|
|
10
10
|
|
|
11
11
|
# Or install globally
|
|
12
12
|
npm install -g @ecomweb/cli
|
|
13
|
-
ecomweb
|
|
13
|
+
ecomweb auth login
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
2. **Verify email** — enter the 6-digit code
|
|
20
|
-
3. **Set up store** — pick an existing store or create a new one
|
|
21
|
-
4. **Ready!** — API key is generated and saved automatically
|
|
16
|
+
`auth login` shows a short code and opens the dashboard. Check the code matches,
|
|
17
|
+
press **Approve**, and the CLI is logged in as you: your role in each of your
|
|
18
|
+
stores, no API key. No store yet? `ecomweb stores create --name "My Store"`.
|
|
22
19
|
|
|
23
20
|
## Usage
|
|
24
21
|
|
|
@@ -39,6 +36,20 @@ ecomweb orders update-status <id> --status confirmed
|
|
|
39
36
|
ecomweb blog-posts list
|
|
40
37
|
ecomweb blog-posts create --stdin < post.json
|
|
41
38
|
|
|
39
|
+
# Custom data (metafields and metaobjects)
|
|
40
|
+
ecomweb metafield-definitions list --owner-type product
|
|
41
|
+
ecomweb metafields set --owner product:12 --key custom.care_guide --value '"Wash cold"'
|
|
42
|
+
ecomweb metaobject-definitions create --file feedbacks.json
|
|
43
|
+
ecomweb metaobjects list --type feedbacks --filter rating=5
|
|
44
|
+
ecomweb describe metaobject-definitions
|
|
45
|
+
|
|
46
|
+
# Themes
|
|
47
|
+
ecomweb theme list
|
|
48
|
+
ecomweb theme duplicate 7 --name "My code"
|
|
49
|
+
ecomweb theme versions 54
|
|
50
|
+
ecomweb theme use 54 31
|
|
51
|
+
ecomweb theme publish 54
|
|
52
|
+
|
|
42
53
|
# All commands
|
|
43
54
|
ecomweb --help
|
|
44
55
|
ecomweb <topic> --help
|
|
@@ -46,23 +57,19 @@ ecomweb <topic> --help
|
|
|
46
57
|
|
|
47
58
|
## Start with an AI agent
|
|
48
59
|
|
|
49
|
-
Build your store's storefront with Claude Code or Codex. Log in
|
|
50
|
-
ecomweb email (we email you a 6-digit code; no API key needed), then create the
|
|
60
|
+
Build your store's storefront with Claude Code or Codex. Log in, then create the
|
|
51
61
|
project:
|
|
52
62
|
|
|
53
63
|
```bash
|
|
54
|
-
npx @ecomweb/cli auth login
|
|
64
|
+
npx @ecomweb/cli auth login # approve in the browser
|
|
55
65
|
npx @ecomweb/cli storefront init # create, install and run it
|
|
56
66
|
npx @ecomweb/cli storefront init --github # the same, as a new GitHub repository
|
|
57
67
|
```
|
|
58
68
|
|
|
59
|
-
Without a terminal (agents, scripts),
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
code was already used without a name, run `auth login --email you@shop.vn
|
|
64
|
-
--store-name "My Store"` again: the verified session is kept, so no new code
|
|
65
|
-
is sent.
|
|
69
|
+
Without a terminal (agents, scripts), `auth login` prints the link and the code
|
|
70
|
+
as JSON and exits. After the user approves, `auth login --wait` finishes the
|
|
71
|
+
login (it waits up to 100 seconds per run; run it again while it answers
|
|
72
|
+
`authorization_pending`). Nothing secret passes through the chat.
|
|
66
73
|
|
|
67
74
|
Inside a storefront project, commands use that project's store (its
|
|
68
75
|
`.ecomweb.json`) unless you pass `--store-ref`.
|
|
@@ -88,9 +95,12 @@ Claude Code users: install the plugin with
|
|
|
88
95
|
|
|
89
96
|
## Deploying a storefront
|
|
90
97
|
|
|
91
|
-
On stores
|
|
92
|
-
Each deploy
|
|
93
|
-
theme
|
|
98
|
+
On stores whose plan includes storefront hosting, from your storefront
|
|
99
|
+
project's folder. Each deploy adds a build to a theme's versions (any theme):
|
|
100
|
+
once built, the theme uses it. Settings you customize stay with the theme.
|
|
101
|
+
On a plan without hosting, `deploy` stops with `HOSTING_NOT_IN_PLAN` (exit 2)
|
|
102
|
+
and says to upgrade; you can still run the code on your own server and
|
|
103
|
+
connect it with `ecomweb theme link`.
|
|
94
104
|
|
|
95
105
|
```bash
|
|
96
106
|
ecomweb deploy --theme 12 # a theme that isn't live: build, then its 24-hour preview
|
|
@@ -102,15 +112,23 @@ ecomweb deploy --dry-run # just pack: what would be uploaded
|
|
|
102
112
|
ecomweb logs <deployment-id> # a build's log, followed until it ends
|
|
103
113
|
|
|
104
114
|
ecomweb deployments # the store's deployments
|
|
105
|
-
ecomweb deployments promote <id> #
|
|
106
|
-
ecomweb deployments rollback <id> # the same, by another name
|
|
107
|
-
ecomweb deployments unpublish #
|
|
115
|
+
ecomweb deployments promote <id> # use that build on its theme and serve it
|
|
116
|
+
ecomweb deployments rollback <id> # the same, by another name (or: ecomweb theme use)
|
|
117
|
+
ecomweb deployments unpublish # the live theme, if it uses a build, switches to its newest release
|
|
108
118
|
```
|
|
109
119
|
|
|
110
|
-
|
|
111
|
-
`
|
|
112
|
-
`
|
|
113
|
-
|
|
120
|
+
When no theme is named (`--theme`, `ECOMWEB_STORE_THEME_ID` or `storeThemeId`
|
|
121
|
+
in `.ecomweb.json`), `deploy` on a terminal asks which one and offers to save
|
|
122
|
+
it as `storeThemeId` in `.ecomweb.json` (its other fields are kept). Without a
|
|
123
|
+
terminal (CI) it stops with `STORE_THEME_REQUIRED` and lists the themes.
|
|
124
|
+
|
|
125
|
+
A deploy to the live theme without `--allow-live` stops with `THEME_IS_LIVE`:
|
|
126
|
+
use `--allow-live` to ship it, or `--draft` to preview it first.
|
|
127
|
+
|
|
128
|
+
A theme that uses a link to your own site keeps a new build in its versions
|
|
129
|
+
without using it (and without a preview): `deploy` says so, and its result
|
|
130
|
+
has `"waits_for_link": true`. Use the build with `ecomweb theme versions` and
|
|
131
|
+
`ecomweb theme use`.
|
|
114
132
|
|
|
115
133
|
`--draft` deploys to the live theme's draft ("<name> (bản nháp)"), which
|
|
116
134
|
ecomweb makes on first use as a copy of the live theme; publish it from the
|
|
@@ -152,14 +170,160 @@ until the new one is ready. A store that crashes for 10 minutes falls back
|
|
|
152
170
|
to the standard storefront until it is healthy again, and its owner gets an
|
|
153
171
|
email.
|
|
154
172
|
|
|
155
|
-
##
|
|
173
|
+
## Themes
|
|
174
|
+
|
|
175
|
+
A theme is its settings (edited in the dashboard) and a list of versions,
|
|
176
|
+
with one in use. There are three kinds of version:
|
|
177
|
+
|
|
178
|
+
| Kind | What it is | Added by | Mode shown |
|
|
179
|
+
|---|---|---|---|
|
|
180
|
+
| `release` | A release of a theme from the theme store (Default 1.0.0) | `theme create`, `theme update` | `theme` |
|
|
181
|
+
| `build` | Your code, built and hosted by ecomweb | `ecomweb deploy` | `custom` |
|
|
182
|
+
| `link` | Your code on your own server (Vercel, your own); the store's address sends shoppers there | `theme link` | `headless` |
|
|
156
183
|
|
|
157
|
-
|
|
184
|
+
`theme use` is the only switch: it picks the version the theme uses. Settings
|
|
185
|
+
stay with the theme whichever version is in use.
|
|
158
186
|
|
|
159
187
|
```bash
|
|
160
|
-
ecomweb
|
|
161
|
-
ecomweb
|
|
162
|
-
ecomweb
|
|
188
|
+
ecomweb theme list --output table # id, name, mode, version in use, live, newer release
|
|
189
|
+
ecomweb theme create # add the Default theme from the theme store
|
|
190
|
+
ecomweb theme create --from default --name "Summer"
|
|
191
|
+
ecomweb theme duplicate 7 --name "My code" # a copy: settings and the same version in use
|
|
192
|
+
ecomweb theme versions 54 --output table # id, kind, label, current, serving, usable, created
|
|
193
|
+
ecomweb theme use 54 31 # use version 31 (asks first on the live theme)
|
|
194
|
+
ecomweb theme link 54 --url https://shop.example.com \
|
|
195
|
+
--allowed-origin "https://shop-*-team.vercel.app" # add a link to your site and use it
|
|
196
|
+
ecomweb theme update 54 # add the newest theme store release and use it
|
|
197
|
+
ecomweb theme update 54 --version 1.0.5 # or a given release
|
|
198
|
+
ecomweb theme publish 54 # make it live (asks first on a terminal)
|
|
199
|
+
ecomweb theme schema push --theme 54 # the settings schema of the link in use
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
`theme versions` lists every version, newest first. `current` is the one the
|
|
203
|
+
theme uses; `serving` is what shoppers get now, so it is only ever `true` on
|
|
204
|
+
the live theme. It differs from `current` when the plan lost storefront
|
|
205
|
+
hosting: the live theme then serves its newest release. `usable` is `yes`, or `no: <reason>` (`build_failed`,
|
|
206
|
+
`build_pruned`, `build_in_progress`, `hosting_not_in_plan`,
|
|
207
|
+
`release_withdrawn`); `theme use` refuses those with `VERSION_NOT_USABLE` and
|
|
208
|
+
says what to do.
|
|
209
|
+
|
|
210
|
+
On the live theme, `theme use`, `theme link` and `theme update` change what
|
|
211
|
+
shoppers see right away, so on a terminal they name it and ask first (copy
|
|
212
|
+
the theme with `theme duplicate` to try a version of another kind without
|
|
213
|
+
touching your shop); `--yes` skips that. CI or a run without a terminal never
|
|
214
|
+
asks: it needs `--yes`, and without it stops before changing anything
|
|
215
|
+
(`CONFIRMATION_REQUIRED`). On a theme that isn't live they just switch.
|
|
216
|
+
|
|
217
|
+
`theme link` takes the https address of the site running the theme's code;
|
|
218
|
+
ecomweb keeps managing its settings. `--allowed-origin` (repeatable) adds
|
|
219
|
+
origins the site also runs on, such as previews; one `*` inside the first
|
|
220
|
+
label is allowed, shared suffixes such as `*.vercel.app` are not.
|
|
221
|
+
|
|
222
|
+
`theme publish` makes the theme live right away, serving its version in use.
|
|
223
|
+
On a terminal it names the theme it replaces and asks first; `--yes` skips
|
|
224
|
+
that. CI or a run without a terminal never asks: it needs `--yes`, and
|
|
225
|
+
without it stops before calling the API (`CONFIRMATION_REQUIRED`).
|
|
226
|
+
|
|
227
|
+
`theme create` adds a theme from the theme store only (`--from`, default the
|
|
228
|
+
Default theme). To put your own code on a theme, deploy to it; to connect your
|
|
229
|
+
own site, `theme link` it.
|
|
230
|
+
|
|
231
|
+
`theme schema push` runs the project's `pnpm run theme:export` and uploads the
|
|
232
|
+
settings schema of the link the theme uses, so its settings can be edited in
|
|
233
|
+
the dashboard; run it in CI when the schema changes. The theme comes from
|
|
234
|
+
`--theme`, `ECOMWEB_STORE_THEME_ID` or `storeThemeId` in `.ecomweb.json`. A
|
|
235
|
+
theme that doesn't use a link stops with `THEME_NOT_LINKED`: a build gets its
|
|
236
|
+
schema with each `ecomweb deploy`, a release from the theme store.
|
|
237
|
+
|
|
238
|
+
### From the Default theme to your own code
|
|
239
|
+
|
|
240
|
+
For a developer starting from a store that runs ecomweb's Default theme, on a
|
|
241
|
+
plan with storefront hosting.
|
|
242
|
+
|
|
243
|
+
1. **Log in and pick the store.**
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
npm i -g @ecomweb/cli
|
|
247
|
+
ecomweb auth login # approve in the browser, then choose the store
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
2. **Copy the theme to work on.** Your shop keeps running the original while
|
|
251
|
+
you work on the copy, which starts with the same settings and version.
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
ecomweb theme list --output table
|
|
255
|
+
ecomweb theme duplicate 7 --name "My code" # → theme 54
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
3. **Get the code and run it.** `--theme` saves the copy as `storeThemeId` in
|
|
259
|
+
`.ecomweb.json`, so deploys go to it; the project is installed and the dev
|
|
260
|
+
server offered. Add `--github` to create it as a repository instead.
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
ecomweb storefront init --theme 54
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
4. **Change the code, and its settings.** Edit pages and components as
|
|
267
|
+
usual. The settings a merchant can change live in the theme's schema;
|
|
268
|
+
`pnpm theme:export` shows what the next deploy uploads.
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
pnpm theme:export
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
5. **Deploy and preview.** The theme comes from `.ecomweb.json`. Once built,
|
|
275
|
+
the build is the version the theme uses and its 24-hour preview starts.
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
ecomweb deploy # prints the preview URL
|
|
279
|
+
ecomweb logs <deployment-id> # if a build fails
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
6. **Publish.** Shoppers now see your code, with the settings carried over
|
|
283
|
+
from the Default theme. (Or Xuất bản on the theme in the dashboard.)
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
ecomweb theme publish 54
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
7. **Keep shipping.** Deploys to the live theme need `--allow-live` and go
|
|
290
|
+
live once built (with `--github`, a push to main does this). Try a change
|
|
291
|
+
on the live theme's draft copy first with `--draft`.
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
ecomweb deploy --allow-live
|
|
295
|
+
ecomweb deploy --draft
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
**Going back.** Every build and release stays in the theme's versions: pick
|
|
299
|
+
an earlier build, or the Default release the copy started with, and use it.
|
|
300
|
+
On the live theme it asks first (`--yes` in CI).
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
ecomweb theme versions 54 --output table
|
|
304
|
+
ecomweb theme use 54 <version id>
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
Or publish the original theme 7 again: `ecomweb theme publish 7`.
|
|
308
|
+
|
|
309
|
+
**Headless: your code on your own server.** Run the project from step 3 on
|
|
310
|
+
your own host (Vercel, your own), then link the theme to it and push its
|
|
311
|
+
settings schema, so its settings stay editable in the dashboard. Links work
|
|
312
|
+
on every plan.
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
ecomweb theme link 54 --url https://shop.example.com
|
|
316
|
+
ecomweb theme schema push --theme 54
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
## Authentication
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
ecomweb auth login # browser approval; --no-browser prints the link only
|
|
323
|
+
ecomweb auth logout # revokes this CLI's session
|
|
324
|
+
ecomweb auth status # who you are, and the credential in use
|
|
325
|
+
ecomweb stores create --name "My Store"
|
|
326
|
+
ecomweb stores switch <ref>
|
|
163
327
|
```
|
|
164
328
|
|
|
165
329
|
## Output Formats
|
|
@@ -189,15 +353,40 @@ ecomweb auth status # Check auth status, and which API URL is in u
|
|
|
189
353
|
### Profiles
|
|
190
354
|
|
|
191
355
|
```bash
|
|
192
|
-
ecomweb
|
|
193
|
-
ecomweb products list --profile staging
|
|
356
|
+
ecomweb auth login --profile staging --api-url <staging-api-url> # Create (or update) the profile and sign in
|
|
357
|
+
ecomweb products list --profile staging # Use it: same API, same session
|
|
194
358
|
```
|
|
195
359
|
|
|
360
|
+
`auth login` saves the profile, with the API URL it used when one was given
|
|
361
|
+
by `--api-url` or `ECOMWEB_API_URL`, only once the login is approved, in the
|
|
362
|
+
same step that saves the session. A login that fails or is abandoned changes
|
|
363
|
+
nothing. Without either, a new profile gets the production API.
|
|
364
|
+
|
|
365
|
+
A login is bound to the API that issued it. If a command resolves another API
|
|
366
|
+
URL (say `ECOMWEB_API_URL` is set in one shell and not the other), it fails
|
|
367
|
+
with `SESSION_FOR_OTHER_API` and sends no token: pass `--api-url` with the
|
|
368
|
+
session's URL, or sign in to the other API under its own `--profile`.
|
|
369
|
+
|
|
370
|
+
### Where the login is kept
|
|
371
|
+
|
|
372
|
+
In the OS keychain (macOS Keychain, Windows Credential Manager, the Linux
|
|
373
|
+
Secret Service), under the service `ecomweb-cli`. Where there is none, in
|
|
374
|
+
`~/.config/ecomweb/credentials/<profile>.session.json` (mode 0600). Force one
|
|
375
|
+
with `ECOMWEB_CREDENTIAL_STORE=file` or `keychain`.
|
|
376
|
+
|
|
377
|
+
### CI and servers
|
|
378
|
+
|
|
379
|
+
Use a store API key from the dashboard (Settings, API keys), with only the
|
|
380
|
+
scopes the job needs and an expiry. Pass it as `ECOMWEB_API_KEY` (or
|
|
381
|
+
`--api-key`); it is never written to disk and wins over a login.
|
|
382
|
+
|
|
196
383
|
### Environment Variables
|
|
197
384
|
|
|
198
385
|
| Variable | Description |
|
|
199
386
|
|----------|-------------|
|
|
200
|
-
| `ECOMWEB_API_KEY` | API key (
|
|
387
|
+
| `ECOMWEB_API_KEY` | Store API key for CI and servers (wins over a login) |
|
|
388
|
+
| `ECOMWEB_CREDENTIAL_STORE` | `keychain` or `file`: where the login is kept |
|
|
389
|
+
| `ECOMWEB_NO_BROWSER` | Set to never open a browser (same as `--no-browser`) |
|
|
201
390
|
| `ECOMWEB_STORE_REF` | Store ref (overrides config) |
|
|
202
391
|
| `ECOMWEB_API_URL` | API base URL (overrides default) |
|
|
203
392
|
|
|
@@ -219,11 +408,17 @@ node ./bin/run.js --help
|
|
|
219
408
|
> a local API explicitly:
|
|
220
409
|
>
|
|
221
410
|
> ```bash
|
|
222
|
-
>
|
|
223
|
-
>
|
|
224
|
-
>
|
|
411
|
+
> ecomweb auth login --profile local --api-url http://localhost:3001 # approve on your local dashboard
|
|
412
|
+
> ecomweb auth profiles use local # make it the default
|
|
413
|
+
> ecomweb stores list # now talks to localhost:3001
|
|
225
414
|
> ```
|
|
226
415
|
>
|
|
416
|
+
> The login saves `http://localhost:3001` as the `local` profile's API URL, so
|
|
417
|
+
> later commands need neither the flag nor `ECOMWEB_API_URL`. Switch back with
|
|
418
|
+
> `ecomweb auth profiles use default`. (Logging in with `ECOMWEB_API_URL`
|
|
419
|
+
> exported and no `--profile` also works, but rewrites the `default` profile's
|
|
420
|
+
> URL.)
|
|
421
|
+
>
|
|
227
422
|
> Note the missing `/api/v1` on the local URL. The API sets **no global
|
|
228
423
|
> prefix** — routes hang directly off the origin. The production default
|
|
229
424
|
> includes the prefix because the ingress adds it there.
|
package/dist/base-command.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Command } from "@oclif/core";
|
|
2
2
|
import { ConfigManager } from "./lib/config";
|
|
3
|
+
import { CredentialStore, StoredSession } from "./lib/credential-store";
|
|
3
4
|
import { ApiClient } from "./lib/api-client";
|
|
4
5
|
import { OutputEnvelope, OutputOptions } from "./lib/output";
|
|
5
6
|
export declare abstract class BaseCommand extends Command {
|
|
@@ -17,6 +18,13 @@ export declare abstract class BaseCommand extends Command {
|
|
|
17
18
|
};
|
|
18
19
|
protected configManager: ConfigManager;
|
|
19
20
|
protected apiClient: ApiClient;
|
|
21
|
+
protected credentials: CredentialStore;
|
|
22
|
+
protected get profileName(): string;
|
|
23
|
+
protected lockPathFor(profile: string): string;
|
|
24
|
+
protected get apiUrl(): string;
|
|
25
|
+
protected revokeSession(session: StoredSession, profile?: string): Promise<unknown | undefined>;
|
|
26
|
+
protected now(): number;
|
|
27
|
+
protected sleep(ms: number): Promise<void>;
|
|
20
28
|
protected get outputOptions(): OutputOptions;
|
|
21
29
|
private parsedFlags;
|
|
22
30
|
init(): Promise<void>;
|
package/dist/base-command.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.BaseCommand = void 0;
|
|
4
7
|
const core_1 = require("@oclif/core");
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
5
9
|
const config_1 = require("./lib/config");
|
|
10
|
+
const credential_store_1 = require("./lib/credential-store");
|
|
11
|
+
const session_1 = require("./lib/session");
|
|
6
12
|
const api_client_1 = require("./lib/api-client");
|
|
7
13
|
const project_setup_1 = require("./lib/project-setup");
|
|
8
14
|
const errors_1 = require("./lib/errors");
|
|
@@ -12,6 +18,33 @@ class BaseCommand extends core_1.Command {
|
|
|
12
18
|
super(...arguments);
|
|
13
19
|
this.parsedFlags = {};
|
|
14
20
|
}
|
|
21
|
+
get profileName() {
|
|
22
|
+
return this.configManager.getProfileName();
|
|
23
|
+
}
|
|
24
|
+
lockPathFor(profile) {
|
|
25
|
+
return node_path_1.default.join(config_1.CREDENTIALS_DIR, `${profile}.lock`);
|
|
26
|
+
}
|
|
27
|
+
get apiUrl() {
|
|
28
|
+
return this.configManager.resolveApiUrl(this.getFlag("api-url"));
|
|
29
|
+
}
|
|
30
|
+
async revokeSession(session, profile) {
|
|
31
|
+
try {
|
|
32
|
+
const fallback = profile ? this.configManager.getProfile(profile).api_url : this.apiUrl;
|
|
33
|
+
await new api_client_1.ApiClient({ baseUrl: session.api_url ?? fallback, timeout: 10_000 }).post("/auth/logout", {
|
|
34
|
+
refresh_token: session.refresh_token,
|
|
35
|
+
});
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
return error ?? new Error("revoke failed");
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
now() {
|
|
43
|
+
return Date.now();
|
|
44
|
+
}
|
|
45
|
+
sleep(ms) {
|
|
46
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
47
|
+
}
|
|
15
48
|
get outputOptions() {
|
|
16
49
|
const flags = this.parsedFlags;
|
|
17
50
|
return {
|
|
@@ -26,13 +59,19 @@ class BaseCommand extends core_1.Command {
|
|
|
26
59
|
await super.init();
|
|
27
60
|
const { flags } = await this.parse(this.constructor);
|
|
28
61
|
this.parsedFlags = flags;
|
|
29
|
-
this.configManager = new config_1.ConfigManager();
|
|
62
|
+
this.configManager = new config_1.ConfigManager(flags.profile);
|
|
30
63
|
const apiUrl = this.configManager.resolveApiUrl(flags["api-url"]);
|
|
31
64
|
const apiKey = this.configManager.resolveApiKey(flags["api-key"]);
|
|
32
|
-
this.
|
|
33
|
-
|
|
34
|
-
|
|
65
|
+
this.credentials = (0, credential_store_1.lazyCredentialStore)(() => (0, credential_store_1.openCredentialStore)({ dir: config_1.CREDENTIALS_DIR }));
|
|
66
|
+
const anonymous = new api_client_1.ApiClient({ baseUrl: apiUrl });
|
|
67
|
+
const session = new session_1.SessionManager({
|
|
68
|
+
store: this.credentials,
|
|
69
|
+
profile: this.profileName,
|
|
70
|
+
lockPath: this.lockPathFor(this.profileName),
|
|
71
|
+
apiUrl,
|
|
72
|
+
refresh: (refresh_token) => anonymous.post("/auth/session/refresh", { refresh_token }),
|
|
35
73
|
});
|
|
74
|
+
this.apiClient = new api_client_1.ApiClient({ baseUrl: apiUrl, apiKey, session });
|
|
36
75
|
const storeRef = this.resolveStore();
|
|
37
76
|
if (storeRef) {
|
|
38
77
|
this.apiClient.setStoreRef(storeRef);
|
package/dist/base-command.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-command.js","sourceRoot":"","sources":["../src/base-command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base-command.js","sourceRoot":"","sources":["../src/base-command.ts"],"names":[],"mappings":";;;;;;AAAA,sCAA6C;AAC7C,0DAA6B;AAC7B,yCAA8D;AAC9D,6DAAkH;AAClH,2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WAAW,EAAE,sCAAsC;QACnD,GAAG,EAAE,mBAAmB;KACzB,CAAC;IACF,SAAS,EAAE,YAAK,CAAC,MAAM,CAAC;QACtB,WAAW,EAAE,kCAAkC;QAC/C,GAAG,EAAE,iBAAiB;KACvB,CAAC;IACF,SAAS,EAAE,YAAK,CAAC,MAAM,CAAC;QACtB,WAAW,EAAE,uCAAuC;QACpD,GAAG,EAAE,iBAAiB;KACvB,CAAC;IACF,MAAM,EAAE,YAAK,CAAC,MAAM,CAAC;QACnB,WAAW,EAAE,eAAe;QAC5B,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;QACjC,OAAO,EAAE,MAAM;KAChB,CAAC;IACF,KAAK,EAAE,YAAK,CAAC,OAAO,CAAC;QACnB,WAAW,EAAE,0BAA0B;QACvC,OAAO,EAAE,KAAK;KACf,CAAC;IACF,SAAS,EAAE,YAAK,CAAC,OAAO,CAAC;QACvB,WAAW,EAAE,2BAA2B;QACxC,OAAO,EAAE,KAAK;KACf,CAAC;IACF,OAAO,EAAE,YAAK,CAAC,MAAM,CAAC;QACpB,WAAW,EAAE,sBAAsB;KACpC,CAAC;IACF,IAAI,EAAE,YAAK,CAAC,OAAO,CAAC;QAClB,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,KAAK;KACf,CAAC;IACF,MAAM,EAAE,YAAK,CAAC,MAAM,CAAC;QACnB,WAAW,EAAE,wCAAwC;KACtD,CAAC;IACF,OAAO,EAAE,YAAK,CAAC,MAAM,CAAC;QACpB,WAAW,EAAE,wCAAwC;KACtD,CAAC;CACH,AAvCe,CAuCd"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { BaseCommand } from "../../base-command";
|
|
2
|
+
export declare const WAIT_LIMIT_MS = 100000;
|
|
2
3
|
export default class AuthLogin extends BaseCommand {
|
|
3
4
|
static description: string;
|
|
4
5
|
static examples: string[];
|
|
5
6
|
static flags: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"store-name": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
wait: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
browser: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
9
|
"store-ref": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
10
|
"api-key": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
11
|
"api-url": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
@@ -18,5 +18,7 @@ export default class AuthLogin extends BaseCommand {
|
|
|
18
18
|
exclude: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
19
|
};
|
|
20
20
|
run(): Promise<void>;
|
|
21
|
-
|
|
21
|
+
protected isInteractive(): boolean;
|
|
22
|
+
private outputPending;
|
|
23
|
+
private selectStore;
|
|
22
24
|
}
|