pressship 0.1.0 → 0.1.1
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 +401 -84
- package/assets/pressship.png +0 -0
- package/dist/cli.js +46 -0
- package/dist/cli.js.map +1 -1
- package/dist/package/pack.d.ts +40 -0
- package/dist/package/pack.js +122 -0
- package/dist/package/pack.js.map +1 -0
- package/dist/plugin/version.d.ts +12 -0
- package/dist/plugin/version.js +58 -0
- package/dist/plugin/version.js.map +1 -0
- package/dist/svn/release.d.ts +1 -0
- package/dist/svn/release.js +8 -0
- package/dist/svn/release.js.map +1 -1
- package/dist/wordpress-org/publish.d.ts +33 -0
- package/dist/wordpress-org/publish.js +148 -0
- package/dist/wordpress-org/publish.js.map +1 -0
- package/dist/wordpress-org/state.d.ts +29 -0
- package/dist/wordpress-org/state.js +113 -0
- package/dist/wordpress-org/state.js.map +1 -0
- package/dist/wordpress-org/submit.js +27 -0
- package/dist/wordpress-org/submit.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,102 +1,253 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/pressship.png" alt="Pressship" width="400">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<p align="center">
|
|
6
|
+
A modern CLI for preparing, validating, submitting, and releasing WordPress.org plugins from the terminal.
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://nodejs.org/"><img alt="Node.js 20+" src="https://img.shields.io/badge/node-%3E%3D20-339933?logo=node.js&logoColor=white"></a>
|
|
11
|
+
<a href="https://wordpress.org/plugins/developers/"><img alt="WordPress.org Plugin Directory" src="https://img.shields.io/badge/WordPress.org-plugin%20directory-3858e9?logo=wordpress&logoColor=white"></a>
|
|
12
|
+
<a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<strong>WordPress.org plugin publishing, but closer to <code>npm publish</code>.</strong>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
It is designed to make WordPress plugin publishing feel closer to npm package publishing:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx pressship login
|
|
23
|
+
npx pressship publish ./my-plugin --dry-run
|
|
24
|
+
npx pressship publish ./my-plugin
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Why Pressship?
|
|
28
|
+
|
|
29
|
+
Publishing a WordPress plugin to WordPress.org involves a lot of small steps: creating the right zip, validating `readme.txt`, running Plugin Check, logging into WordPress.org, uploading through the developer page, and later publishing releases through SVN.
|
|
30
|
+
|
|
31
|
+
Pressship automates that workflow while still using WordPress.org's existing review and release systems.
|
|
32
|
+
|
|
33
|
+
## Features
|
|
34
|
+
|
|
35
|
+
- Browser-based WordPress.org login with saved local session state.
|
|
36
|
+
- `whoami` and `logout` commands for session management.
|
|
37
|
+
- Plugin discovery from WordPress plugin headers.
|
|
38
|
+
- `readme.txt` parsing and local validation.
|
|
39
|
+
- WordPress.org readme validator automation.
|
|
40
|
+
- WordPress-installable zip generation.
|
|
41
|
+
- npm-style `publish` and `pack` commands.
|
|
42
|
+
- Managed WordPress.org Plugin Check setup and execution.
|
|
43
|
+
- Current WordPress.org submission state inspection.
|
|
44
|
+
- Pending-plugin reupload support via the WordPress.org developer page.
|
|
45
|
+
- SVN release workflow for approved plugins.
|
|
46
|
+
- Repeatable ignore globs and `.pressshipignore` support.
|
|
47
|
+
- Colorful CLI output with progress indicators.
|
|
48
|
+
|
|
49
|
+
## Quick Start
|
|
4
50
|
|
|
5
51
|
```bash
|
|
52
|
+
# Authenticate with WordPress.org.
|
|
6
53
|
npx pressship login
|
|
54
|
+
|
|
55
|
+
# Confirm the saved account.
|
|
7
56
|
npx pressship whoami
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
npx pressship
|
|
57
|
+
|
|
58
|
+
# Inspect current submitted plugin state.
|
|
59
|
+
npx pressship status ./my-plugin
|
|
60
|
+
|
|
61
|
+
# Validate and package without uploading or committing.
|
|
62
|
+
npx pressship publish ./my-plugin --dry-run
|
|
63
|
+
|
|
64
|
+
# Submit for review, reupload a pending plugin, or release an approved plugin.
|
|
65
|
+
npx pressship publish ./my-plugin
|
|
11
66
|
```
|
|
12
67
|
|
|
13
|
-
|
|
68
|
+
You can still use the explicit WordPress.org review and SVN flows:
|
|
14
69
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- Validates `readme.txt` against the WordPress.org readme validator.
|
|
20
|
-
- Builds a WordPress-installable zip with a single top-level plugin folder.
|
|
21
|
-
- Runs `wp plugin check` when WP-CLI and the Plugin Check plugin are available.
|
|
22
|
-
- Uploads the zip to the WordPress.org "Add your plugin" form after confirmation.
|
|
23
|
-
- Publishes approved plugin updates to WordPress.org SVN trunk and tags.
|
|
70
|
+
```bash
|
|
71
|
+
npx pressship submit ./my-plugin
|
|
72
|
+
npx pressship release ./my-plugin --slug my-plugin --username WpOrgUser
|
|
73
|
+
```
|
|
24
74
|
|
|
25
75
|
## Requirements
|
|
26
76
|
|
|
27
77
|
- Node.js 20 or newer.
|
|
28
78
|
- A WordPress.org account.
|
|
29
|
-
- Internet access
|
|
30
|
-
- PHP for Pressship's managed Plugin Check
|
|
31
|
-
- `svn` for `pressship release`.
|
|
79
|
+
- Internet access for first-run browser and Plugin Check setup.
|
|
80
|
+
- PHP for Pressship's managed Plugin Check environment when system WP-CLI is unavailable.
|
|
81
|
+
- `svn` for approved-plugin `pressship publish --release` and `pressship release`.
|
|
32
82
|
|
|
33
|
-
|
|
83
|
+
Pressship installs Playwright Chromium automatically when browser automation first needs it.
|
|
84
|
+
|
|
85
|
+
## Command Overview
|
|
34
86
|
|
|
35
87
|
```bash
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
88
|
+
pressship login
|
|
89
|
+
pressship whoami [--json]
|
|
90
|
+
pressship logout
|
|
91
|
+
pressship status [plugin-path-or-slug] [--json]
|
|
92
|
+
pressship version <patch|minor|major> [plugin-path]
|
|
93
|
+
pressship pack [plugin-path] [options]
|
|
94
|
+
pressship publish [plugin-path] [options]
|
|
95
|
+
pressship submit [plugin-path] [options]
|
|
96
|
+
pressship release [plugin-path] [options]
|
|
41
97
|
```
|
|
42
98
|
|
|
43
|
-
|
|
99
|
+
## Login Flow
|
|
44
100
|
|
|
45
101
|
```bash
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
102
|
+
pressship login
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Pressship opens `login.wordpress.org` in a real browser. Complete login manually, including any two-factor or account checks. Pressship waits until it detects a logged-in WordPress.org user, saves the browser session locally, and closes the browser.
|
|
106
|
+
|
|
107
|
+
Pressship does not store your WordPress.org password.
|
|
108
|
+
|
|
109
|
+
Useful commands:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
pressship whoami
|
|
113
|
+
pressship whoami --json
|
|
114
|
+
pressship logout
|
|
51
115
|
```
|
|
52
116
|
|
|
53
|
-
##
|
|
117
|
+
## Status Flow
|
|
54
118
|
|
|
55
|
-
|
|
119
|
+
```bash
|
|
120
|
+
pressship status
|
|
121
|
+
pressship status ./my-plugin
|
|
122
|
+
pressship status my-plugin
|
|
123
|
+
pressship status my-plugin --json
|
|
124
|
+
```
|
|
56
125
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
126
|
+
`status` reads the logged-in WordPress.org developer page and reports the current state of submitted plugins.
|
|
127
|
+
|
|
128
|
+
For pending submissions it can show:
|
|
129
|
+
|
|
130
|
+
- Review status.
|
|
131
|
+
- Assigned slug.
|
|
132
|
+
- Plugin ID.
|
|
133
|
+
- Submitted zip filename.
|
|
134
|
+
- Submitted version.
|
|
135
|
+
- Upload date.
|
|
136
|
+
- Plugin Check URL.
|
|
137
|
+
- Whether slug change is available.
|
|
138
|
+
- Whether updated zip upload is available.
|
|
139
|
+
|
|
140
|
+
When given a local plugin path, Pressship discovers the plugin headers and uses the inferred slug/name to find the matching WordPress.org submission.
|
|
141
|
+
|
|
142
|
+
Example output:
|
|
143
|
+
|
|
144
|
+
```text
|
|
145
|
+
Pressmind
|
|
146
|
+
Status Awaiting Review — This plugin has not yet been reviewed.
|
|
147
|
+
Slug pressmind
|
|
148
|
+
Submitted May 14, 2026
|
|
149
|
+
Plugin ID 313331
|
|
150
|
+
Reupload available
|
|
151
|
+
Slug change available
|
|
152
|
+
File pressmind.zip
|
|
153
|
+
Version 0.0.3
|
|
154
|
+
```
|
|
62
155
|
|
|
63
|
-
|
|
64
|
-
the browser launch. As a fallback, run `npm run browsers:install` locally or
|
|
65
|
-
`npx playwright install chromium` for a published install.
|
|
156
|
+
## Version Flow
|
|
66
157
|
|
|
67
|
-
|
|
158
|
+
```bash
|
|
159
|
+
pressship version patch
|
|
160
|
+
pressship version minor ./my-plugin
|
|
161
|
+
pressship version major ./my-plugin
|
|
162
|
+
```
|
|
68
163
|
|
|
69
|
-
|
|
164
|
+
`version` bumps local plugin metadata, similar to `npm version`.
|
|
165
|
+
|
|
166
|
+
It updates:
|
|
167
|
+
|
|
168
|
+
- The main plugin file `Version:` header.
|
|
169
|
+
- The `Stable tag:` value in `readme.txt`, when a readme exists.
|
|
170
|
+
|
|
171
|
+
Examples:
|
|
70
172
|
|
|
71
173
|
```bash
|
|
72
|
-
|
|
73
|
-
pressship
|
|
174
|
+
# 1.2.3 -> 1.2.4
|
|
175
|
+
pressship version patch
|
|
176
|
+
|
|
177
|
+
# 1.2.3 -> 1.3.0
|
|
178
|
+
pressship version minor ./my-plugin
|
|
179
|
+
|
|
180
|
+
# 1.2.3 -> 2.0.0
|
|
181
|
+
pressship version major ./my-plugin
|
|
74
182
|
```
|
|
75
183
|
|
|
76
|
-
|
|
184
|
+
## Publish Flow
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
pressship publish ./my-plugin
|
|
188
|
+
```
|
|
77
189
|
|
|
78
|
-
|
|
190
|
+
`publish` is the npm-style happy path. It discovers the plugin and then chooses the best WordPress.org publishing flow:
|
|
79
191
|
|
|
80
|
-
|
|
192
|
+
- Use `submit` when a matching WordPress.org review submission is pending or reuploadable.
|
|
193
|
+
- Use `release` when the plugin has an approved WordPress.org SVN repository and no pending review submission is found.
|
|
194
|
+
- Ask whether to submit or release when Pressship cannot confidently choose.
|
|
195
|
+
|
|
196
|
+
Useful options:
|
|
81
197
|
|
|
82
198
|
```bash
|
|
83
|
-
pressship
|
|
199
|
+
pressship publish ./my-plugin --dry-run
|
|
200
|
+
pressship publish ./my-plugin --submit
|
|
201
|
+
pressship publish ./my-plugin --release --username WpOrgUser
|
|
202
|
+
pressship publish ./my-plugin --skip-plugin-check
|
|
203
|
+
pressship publish ./my-plugin --skip-readme-validator
|
|
204
|
+
pressship publish ./my-plugin --wp-path /path/to/wordpress
|
|
205
|
+
pressship publish ./my-plugin --ignore "assets/**/*.mp4"
|
|
206
|
+
pressship publish ./my-plugin --yes
|
|
84
207
|
```
|
|
85
208
|
|
|
86
|
-
|
|
87
|
-
sessions. It only makes Pressship forget the saved session.
|
|
209
|
+
Use `--submit` for the review-upload flow and `--release` for the approved-plugin SVN flow when you want to be explicit.
|
|
88
210
|
|
|
89
|
-
|
|
211
|
+
## Pack Flow
|
|
90
212
|
|
|
91
|
-
|
|
213
|
+
```bash
|
|
214
|
+
pressship pack ./my-plugin
|
|
215
|
+
```
|
|
92
216
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
217
|
+
`pack` validates the plugin, runs Plugin Check, and creates the WordPress-installable `{slug}.zip` without uploading or committing. By default, it writes the zip to the current directory, similar to `npm pack`.
|
|
218
|
+
|
|
219
|
+
Useful options:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
pressship pack ./my-plugin --output-dir ./build
|
|
223
|
+
pressship pack ./my-plugin --ignore "assets/**/*.mp4"
|
|
224
|
+
pressship pack ./my-plugin --skip-readme-validator
|
|
225
|
+
pressship pack ./my-plugin --wp-path /path/to/wordpress
|
|
226
|
+
pressship pack ./my-plugin --no-validate
|
|
227
|
+
pressship pack ./my-plugin --json
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Use `--no-validate` only when you intentionally want to create the zip without readme validation or Plugin Check.
|
|
231
|
+
|
|
232
|
+
## Submit Flow
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
pressship submit ./my-plugin
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
`submit` is the explicit WordPress.org review preparation flow. It is equivalent to `publish --submit`:
|
|
239
|
+
|
|
240
|
+
1. Discover the plugin main file.
|
|
241
|
+
2. Parse WordPress plugin headers.
|
|
242
|
+
3. Parse and validate `readme.txt`.
|
|
243
|
+
4. Validate `readme.txt` with the WordPress.org readme validator.
|
|
244
|
+
5. Build a WordPress-installable zip.
|
|
245
|
+
6. Stage package contents for Plugin Check.
|
|
246
|
+
7. Run the official WordPress.org Plugin Check.
|
|
247
|
+
8. Ask for confirmation when blocking findings are reported.
|
|
248
|
+
9. Upload the zip to WordPress.org.
|
|
249
|
+
|
|
250
|
+
If WordPress.org already has a pending submission matching the plugin slug or name, Pressship uses the "Upload updated plugin for review" form instead of the new-plugin form.
|
|
100
251
|
|
|
101
252
|
Useful options:
|
|
102
253
|
|
|
@@ -106,55 +257,221 @@ pressship submit ./my-plugin --skip-plugin-check
|
|
|
106
257
|
pressship submit ./my-plugin --skip-readme-validator
|
|
107
258
|
pressship submit ./my-plugin --wp-path /path/to/wordpress
|
|
108
259
|
pressship submit ./my-plugin --ignore "assets/**/*.mp4"
|
|
260
|
+
pressship submit ./my-plugin --ignore "assets/**/*.mp4" --ignore "docs/raw/**"
|
|
109
261
|
pressship submit ./my-plugin --output-dir ./build
|
|
262
|
+
pressship submit ./my-plugin --yes
|
|
110
263
|
```
|
|
111
264
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
265
|
+
## Managed Plugin Check
|
|
266
|
+
|
|
267
|
+
By default, Pressship prepares its own local Plugin Check environment in your user config cache.
|
|
268
|
+
|
|
269
|
+
It can automatically:
|
|
270
|
+
|
|
271
|
+
- Use system WP-CLI when available.
|
|
272
|
+
- Download `wp-cli.phar` when system WP-CLI is unavailable.
|
|
273
|
+
- Download WordPress core.
|
|
274
|
+
- Create a managed `wp-config.php`.
|
|
275
|
+
- Install SQLite Database Integration for a local database-free setup.
|
|
276
|
+
- Run `wp core install` against the SQLite-backed local WordPress install.
|
|
277
|
+
- Download the WordPress.org Plugin Check plugin.
|
|
278
|
+
- Load Plugin Check with the required WP-CLI bootstrap file.
|
|
117
279
|
|
|
118
|
-
|
|
119
|
-
browser automation and fails loudly, with a debug screenshot, if the form changes.
|
|
280
|
+
This means most users can run:
|
|
120
281
|
|
|
121
|
-
|
|
282
|
+
```bash
|
|
283
|
+
pressship submit ./my-plugin --dry-run
|
|
284
|
+
```
|
|
122
285
|
|
|
123
|
-
|
|
286
|
+
without manually installing WordPress, WP-CLI, MySQL, or the Plugin Check plugin.
|
|
287
|
+
|
|
288
|
+
If you already have a local WordPress install with Plugin Check available, pass it explicitly:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
pressship submit ./my-plugin --wp-path /path/to/wordpress
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
## Release Flow
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
pressship release ./my-plugin --slug my-plugin --username WpOrgUser
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
WordPress.org initial review uses a zip upload. Approved plugin releases use SVN. Pressship keeps those workflows separate. `release` is equivalent to `publish --release`.
|
|
301
|
+
|
|
302
|
+
`release` will:
|
|
124
303
|
|
|
125
304
|
1. Checkout or update `https://plugins.svn.wordpress.org/<slug>`.
|
|
126
|
-
2. Sync
|
|
305
|
+
2. Sync packaged plugin files into `trunk/`.
|
|
127
306
|
3. Create `tags/<version>` from trunk.
|
|
128
307
|
4. Show `svn status`.
|
|
129
|
-
5.
|
|
308
|
+
5. Ask for confirmation.
|
|
309
|
+
6. Commit the release.
|
|
130
310
|
|
|
131
311
|
Useful options:
|
|
132
312
|
|
|
133
313
|
```bash
|
|
134
|
-
pressship release ./my-plugin --slug my-plugin
|
|
135
|
-
pressship release ./my-plugin --version 1.2.3
|
|
314
|
+
pressship release ./my-plugin --slug my-plugin
|
|
315
|
+
pressship release ./my-plugin --version 1.2.3
|
|
316
|
+
pressship release ./my-plugin --username WpOrgUser
|
|
317
|
+
pressship release ./my-plugin --message "Release 1.2.3"
|
|
136
318
|
pressship release ./my-plugin --ignore "assets/**/*.mp4"
|
|
137
319
|
pressship release ./my-plugin --dry-run
|
|
320
|
+
pressship release ./my-plugin --yes
|
|
138
321
|
```
|
|
139
322
|
|
|
140
323
|
## Packaging Rules
|
|
141
324
|
|
|
142
|
-
Pressship
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
325
|
+
Pressship creates a zip with one top-level plugin folder, matching the format expected by WordPress plugin upload.
|
|
326
|
+
|
|
327
|
+
It excludes common development artifacts by default:
|
|
328
|
+
|
|
329
|
+
- `.git`
|
|
330
|
+
- `.gitignore`
|
|
331
|
+
- `.github`
|
|
332
|
+
- `.DS_Store`
|
|
333
|
+
- `.idea`
|
|
334
|
+
- `.vscode`
|
|
335
|
+
- `.env`
|
|
336
|
+
- `.env.*`
|
|
337
|
+
- `node_modules`
|
|
338
|
+
- `dist`
|
|
339
|
+
- `build`
|
|
340
|
+
- `coverage`
|
|
341
|
+
- `tests`
|
|
342
|
+
- `*.log`
|
|
343
|
+
- `*.zip`
|
|
344
|
+
- `.pressshipignore`
|
|
345
|
+
- legacy `.pressportignore`
|
|
346
|
+
|
|
347
|
+
Add a `.pressshipignore` file in your plugin directory for project-specific exclusions:
|
|
348
|
+
|
|
349
|
+
```gitignore
|
|
350
|
+
assets/**/*.mp4
|
|
351
|
+
docs/raw/**
|
|
352
|
+
playground/**
|
|
353
|
+
```
|
|
148
354
|
|
|
149
|
-
You can also ignore files per command
|
|
355
|
+
You can also ignore files per command:
|
|
150
356
|
|
|
151
357
|
```bash
|
|
152
|
-
pressship submit ./my-plugin --ignore "assets/**/*.mp4"
|
|
358
|
+
pressship submit ./my-plugin --ignore "assets/**/*.mp4"
|
|
359
|
+
pressship publish ./my-plugin --ignore "assets/**/*.mp4"
|
|
360
|
+
pressship pack ./my-plugin --ignore "assets/**/*.mp4"
|
|
153
361
|
pressship release ./my-plugin --ignore "assets/**/*.mp4"
|
|
154
362
|
```
|
|
155
363
|
|
|
156
|
-
##
|
|
364
|
+
## Configuration And Cache
|
|
365
|
+
|
|
366
|
+
Pressship stores local state under your user config directory:
|
|
367
|
+
|
|
368
|
+
```text
|
|
369
|
+
~/.config/pressship/
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
This includes:
|
|
373
|
+
|
|
374
|
+
- WordPress.org browser session storage.
|
|
375
|
+
- Debug screenshots for failed browser automation.
|
|
376
|
+
- Managed Plugin Check cache.
|
|
377
|
+
- Managed WordPress core and SQLite setup.
|
|
378
|
+
|
|
379
|
+
You can override the config directory:
|
|
380
|
+
|
|
381
|
+
```bash
|
|
382
|
+
PRESSSHIP_CONFIG_DIR=/tmp/pressship pressship status
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
For migration compatibility, `PRESSPORT_CONFIG_DIR` is still accepted as a fallback.
|
|
386
|
+
|
|
387
|
+
## Troubleshooting
|
|
388
|
+
|
|
389
|
+
### Browser Runtime Missing
|
|
390
|
+
|
|
391
|
+
Pressship installs Chromium automatically. If that fails, run:
|
|
392
|
+
|
|
393
|
+
```bash
|
|
394
|
+
npx playwright install chromium
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
For local development:
|
|
398
|
+
|
|
399
|
+
```bash
|
|
400
|
+
npm run browsers:install
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### Not Logged In
|
|
404
|
+
|
|
405
|
+
Run:
|
|
406
|
+
|
|
407
|
+
```bash
|
|
408
|
+
pressship login
|
|
409
|
+
pressship whoami
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
If the saved session is stale:
|
|
413
|
+
|
|
414
|
+
```bash
|
|
415
|
+
pressship logout
|
|
416
|
+
pressship login
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
### Plugin Check Setup Problems
|
|
420
|
+
|
|
421
|
+
The managed Plugin Check environment is automatic, but it still needs PHP and internet access on first run.
|
|
422
|
+
|
|
423
|
+
To bypass Plugin Check:
|
|
424
|
+
|
|
425
|
+
```bash
|
|
426
|
+
pressship submit ./my-plugin --skip-plugin-check
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
To use your own WordPress install:
|
|
430
|
+
|
|
431
|
+
```bash
|
|
432
|
+
pressship submit ./my-plugin --wp-path /path/to/wordpress
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
### WordPress.org Form Changes
|
|
436
|
+
|
|
437
|
+
The WordPress.org submission and reupload flows are browser automation over the logged-in developer page, not a documented public API. If WordPress.org changes the form, Pressship fails loudly and saves a debug screenshot under the config directory.
|
|
438
|
+
|
|
439
|
+
## Development
|
|
440
|
+
|
|
441
|
+
```bash
|
|
442
|
+
npm install
|
|
443
|
+
npm run dev -- --help
|
|
444
|
+
npm run typecheck
|
|
445
|
+
npm test
|
|
446
|
+
npm run build
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
Run local commands without publishing:
|
|
450
|
+
|
|
451
|
+
```bash
|
|
452
|
+
npm run dev -- login
|
|
453
|
+
npm run dev -- whoami
|
|
454
|
+
npm run dev -- status
|
|
455
|
+
npm run dev -- pack ./my-plugin
|
|
456
|
+
npm run dev -- publish ./my-plugin --dry-run
|
|
457
|
+
npm run dev -- submit ./my-plugin --dry-run
|
|
458
|
+
npm run dev -- release ./my-plugin --dry-run
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
Package smoke test:
|
|
462
|
+
|
|
463
|
+
```bash
|
|
464
|
+
npm pack --dry-run
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
## Security Notes
|
|
468
|
+
|
|
469
|
+
- Pressship does not store your WordPress.org password.
|
|
470
|
+
- Login is completed in a real browser.
|
|
471
|
+
- Pressship stores Playwright browser session state locally.
|
|
472
|
+
- `logout` removes Pressship's saved local browser session.
|
|
473
|
+
- `logout` does not revoke other active WordPress.org sessions.
|
|
474
|
+
|
|
475
|
+
## License
|
|
157
476
|
|
|
158
|
-
|
|
159
|
-
use SVN trunk and tags. Pressship keeps those workflows separate with `submit`
|
|
160
|
-
and `release`.
|
|
477
|
+
MIT
|
|
Binary file
|
package/dist/cli.js
CHANGED
|
@@ -3,8 +3,12 @@ import { Command } from "commander";
|
|
|
3
3
|
import { login } from "./auth/login.js";
|
|
4
4
|
import { logout } from "./auth/logout.js";
|
|
5
5
|
import { whoami } from "./auth/whoami.js";
|
|
6
|
+
import { pack } from "./package/pack.js";
|
|
7
|
+
import { publish } from "./wordpress-org/publish.js";
|
|
6
8
|
import { submit } from "./wordpress-org/submit.js";
|
|
9
|
+
import { status } from "./wordpress-org/state.js";
|
|
7
10
|
import { release } from "./svn/release.js";
|
|
11
|
+
import { version } from "./plugin/version.js";
|
|
8
12
|
const program = new Command();
|
|
9
13
|
program
|
|
10
14
|
.name("pressship")
|
|
@@ -23,6 +27,36 @@ program
|
|
|
23
27
|
.description("Print the WordPress.org username for the saved login session.")
|
|
24
28
|
.option("--json", "Print account details as JSON")
|
|
25
29
|
.action((options) => run(() => whoami(options))());
|
|
30
|
+
program
|
|
31
|
+
.command("publish")
|
|
32
|
+
.description("Submit for review or release an approved plugin, similar to npm publish.")
|
|
33
|
+
.argument("[plugin-path]", "Path to the WordPress plugin directory")
|
|
34
|
+
.option("--submit", "Force WordPress.org review submission")
|
|
35
|
+
.option("--release", "Force WordPress.org SVN release")
|
|
36
|
+
.option("--dry-run", "Run the selected publish flow without uploading or committing")
|
|
37
|
+
.option("--skip-plugin-check", "Skip `wp plugin check` for submit flows")
|
|
38
|
+
.option("--skip-readme-validator", "Skip the remote WordPress.org readme validator for submit flows")
|
|
39
|
+
.option("--output-dir <path>", "Directory where the submission zip should be written")
|
|
40
|
+
.option("--wp-path <path>", "WordPress installation path for `wp plugin check`")
|
|
41
|
+
.option("--slug <slug>", "Approved WordPress.org plugin slug for release detection or release")
|
|
42
|
+
.option("--version <version>", "Version tag to create for release")
|
|
43
|
+
.option("--svn-dir <path>", "Local SVN working copy directory for release")
|
|
44
|
+
.option("--username <username>", "WordPress.org SVN username for release")
|
|
45
|
+
.option("-m, --message <message>", "SVN commit message for release")
|
|
46
|
+
.option("--ignore <glob>", "Ignore files in the package; repeat for multiple globs", collectValues, [])
|
|
47
|
+
.option("-y, --yes", "Continue without interactive confirmations where possible")
|
|
48
|
+
.action((pluginPath, options) => run(() => publish(pluginPath, options))());
|
|
49
|
+
program
|
|
50
|
+
.command("pack")
|
|
51
|
+
.description("Create a WordPress-installable plugin zip, similar to npm pack.")
|
|
52
|
+
.argument("[plugin-path]", "Path to the WordPress plugin directory")
|
|
53
|
+
.option("--output-dir <path>", "Directory where the plugin zip should be written")
|
|
54
|
+
.option("--ignore <glob>", "Ignore files in the package; repeat for multiple globs", collectValues, [])
|
|
55
|
+
.option("--no-validate", "Create the zip without readme validation or Plugin Check")
|
|
56
|
+
.option("--skip-readme-validator", "Skip the remote WordPress.org readme validator")
|
|
57
|
+
.option("--wp-path <path>", "WordPress installation path for `wp plugin check`")
|
|
58
|
+
.option("--json", "Print package details as JSON")
|
|
59
|
+
.action((pluginPath, options) => run(() => pack(pluginPath, options))());
|
|
26
60
|
program
|
|
27
61
|
.command("submit")
|
|
28
62
|
.description("Validate, package, and submit a plugin zip to WordPress.org for review.")
|
|
@@ -35,6 +69,18 @@ program
|
|
|
35
69
|
.option("--ignore <glob>", "Ignore files in the package; repeat for multiple globs", collectValues, [])
|
|
36
70
|
.option("-y, --yes", "Continue without interactive confirmations where possible")
|
|
37
71
|
.action((pluginPath, options) => run(() => submit(pluginPath, options))());
|
|
72
|
+
program
|
|
73
|
+
.command("status")
|
|
74
|
+
.description("Show current WordPress.org review state for submitted plugins.")
|
|
75
|
+
.argument("[plugin-path-or-slug]", "Filter by local plugin path, plugin slug, or display name")
|
|
76
|
+
.option("--json", "Print state as JSON")
|
|
77
|
+
.action((slugOrName, options) => run(() => status(slugOrName, options))());
|
|
78
|
+
program
|
|
79
|
+
.command("version")
|
|
80
|
+
.description("Bump the local plugin Version header and readme Stable tag.")
|
|
81
|
+
.argument("<patch|minor|major>", "Version bump type")
|
|
82
|
+
.argument("[plugin-path]", "Path to the WordPress plugin directory")
|
|
83
|
+
.action((bump, pluginPath) => run(() => version(bump, pluginPath))());
|
|
38
84
|
program
|
|
39
85
|
.command("release")
|
|
40
86
|
.description("Publish an approved plugin release to WordPress.org SVN trunk and tags.")
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAsB,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAsB,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,OAAO,EAAuB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE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