@wp-operations/wp-ops 0.7.1 → 0.7.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
@@ -33,7 +33,7 @@ wp-ops doctor
33
33
 
34
34
  | Command | What it does |
35
35
  |---|---|
36
- | `init [dir]` | Asks for each section of the project's `platform.json` (name, author, website, languages and default language, content types and their fields, taxonomies, modules, brand color) and writes it. Start from the default content types or from empty. Then creates the platform theme in `wp-operations/`, `.github/platform.json`, the app manifests, `packages/`, the app folders, the workflows and `.gitignore`, and runs `git init`. `--yes` takes the default `platform.json`; `--template=empty` starts with no content types. Never overwrites a file. |
36
+ | `init [dir]` | Asks for each section of the project's `platform.json` (name, author, website, languages and default language, content types and their fields, taxonomies, modules, brand color, optional app categories) and writes it. Start from the default content types or from empty. Then creates the platform theme in `wp-operations/`, `.github/platform.json`, the app manifests, `packages/`, the app folders, the workflows and `.gitignore`, and runs `git init`. `--yes` takes the default `platform.json`; `--template=empty` starts with no content types. Never overwrites a file. |
37
37
  | `github <owner/name>` | Creates the GitHub repository if it does not exist (private unless `--public`), sets it as `origin`, commits and pushes `main`. `init` asks for it at the end (or `--github=owner/name`). Uses `GITHUB_TOKEN`, or the token git already uses for github.com. |
38
38
  | `start` | Runs the platform (`wp-operations/`) locally. Site data stays in `.local/` (gitignored). `wp-ops start <dir>` runs one app instead. |
39
39
  | `update` | Replaces `wp-operations/` with the platform shipped in your wp-ops version. Update wp-ops first (`npm install -g @wp-operations/wp-ops`), then run it and commit. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wp-operations/wp-ops",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "The wp-operations tool. One install gives the platform and wp-ops, wp-app, wp-ide and wp-code.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -153,6 +153,8 @@ export async function askPlatform(base, { name: suggested = '' } = {}) {
153
153
 
154
154
  p.log.step('app');
155
155
  answers.brandColor = check(await p.text({ message: 'Brand color', initialValue: base.app?.theme?.colors?.brand || '#8b7cf6', validate: (v) => (/^#[0-9a-f]{3,8}$/i.test(v) ? undefined : 'Use a hex color, e.g. #8b7cf6') }));
156
+ const categories = check(await p.text({ message: 'App categories, comma separated (optional, Enter to skip)', placeholder: 'e.g. Learning, Business', defaultValue: '' }));
157
+ answers.categories = String(categories || '').split(',').map((c) => c.trim()).filter(Boolean);
156
158
 
157
159
  return answers;
158
160
  } catch (error) {