@loopress/cli 0.15.0 → 0.16.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 +128 -24
- package/dist/commands/acf/list.d.ts +10 -0
- package/dist/commands/acf/list.js +36 -0
- package/dist/commands/acf/pull.d.ts +15 -0
- package/dist/commands/acf/pull.js +80 -0
- package/dist/commands/acf/push.d.ts +17 -0
- package/dist/commands/acf/push.js +108 -0
- package/dist/commands/composer/init.d.ts +9 -0
- package/dist/commands/composer/init.js +47 -0
- package/dist/commands/composer/pull.js +7 -4
- package/dist/help.js +1 -1
- package/dist/lib/base.d.ts +1 -0
- package/dist/lib/base.js +5 -0
- package/dist/types/project-config.generated.d.ts +4 -0
- package/dist/utils/acf-format.d.ts +4 -0
- package/dist/utils/acf-format.js +12 -0
- package/dist/utils/composer.d.ts +8 -0
- package/dist/utils/plugins.js +5 -3
- package/oclif.manifest.json +310 -106
- package/package.json +4 -1
- package/schemas/project-config.schema.json +5 -0
|
@@ -2,21 +2,24 @@ import { writeFile } from 'node:fs/promises';
|
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { LoopressCommand } from '../../lib/base.js';
|
|
4
4
|
export default class ComposerPull extends LoopressCommand {
|
|
5
|
-
static description = 'Pull composer.lock from WordPress';
|
|
5
|
+
static description = 'Pull composer.json and composer.lock from WordPress';
|
|
6
6
|
static examples = ['$ lps composer pull', '$ lps composer pull --dry-run'];
|
|
7
7
|
static flags = {
|
|
8
8
|
...LoopressCommand.dryRunFlag,
|
|
9
9
|
};
|
|
10
10
|
async run() {
|
|
11
11
|
const { url } = this.siteConfig;
|
|
12
|
-
this.log(`Pulling composer.lock from ${url}`);
|
|
12
|
+
this.log(`Pulling composer.json and composer.lock from ${url}`);
|
|
13
|
+
const { composerJson } = await this.wp.get('loopress/v1/composer/json');
|
|
13
14
|
const { composerLock } = await this.wp.get('loopress/v1/composer/lock');
|
|
14
15
|
if (this.dryRun) {
|
|
15
|
-
this.log('[dry-run] Would write composer.lock');
|
|
16
|
+
this.log('[dry-run] Would write composer.json and composer.lock');
|
|
16
17
|
return;
|
|
17
18
|
}
|
|
19
|
+
const composerJsonPath = join(process.cwd(), this.rootDir, 'composer.json');
|
|
18
20
|
const lockPath = join(process.cwd(), this.rootDir, 'composer.lock');
|
|
21
|
+
await writeFile(composerJsonPath, composerJson, 'utf8');
|
|
19
22
|
await writeFile(lockPath, composerLock, 'utf8');
|
|
20
|
-
this.log(`Wrote composer.lock`);
|
|
23
|
+
this.log(`Wrote composer.json and composer.lock`);
|
|
21
24
|
}
|
|
22
25
|
}
|
package/dist/help.js
CHANGED
|
@@ -7,7 +7,7 @@ const BANNER = `
|
|
|
7
7
|
@@@@ ++++ ▗▖ ▗▄▖ ▗▄▖ ▗▄▄▖ ▗▄▄▖ ▗▄▄▄▖ ▗▄▄▖ ▗▄▄▖
|
|
8
8
|
@@@@ ++++ ▐▌ ▐▌ ▐▌▐▌ ▐▌▐▌ ▐▌▐▌ ▐▌▐▌ ▐▌ ▐▌
|
|
9
9
|
@@@@ ++++ ▐▌ ▐▌ ▐▌▐▌ ▐▌▐▛▀▘ ▐▛▀▚▖▐▛▀▀▘ ▝▀▚▖ ▝▀▚▖
|
|
10
|
-
@@@@ ++++ ▐▙▄▄▖▝▚▄▞▘▝▚▄▞▘▐▌ ▐▌ ▐▌▐▙▄▄▖▗▄▄▞▘▗▄▄▞▘ (
|
|
10
|
+
@@@@ ++++ ▐▙▄▄▖▝▚▄▞▘▝▚▄▞▘▐▌ ▐▌ ▐▌▐▙▄▄▖▗▄▄▞▘▗▄▄▞▘ (ALPHA)
|
|
11
11
|
@@@@ ++++
|
|
12
12
|
@@@@ ++++
|
|
13
13
|
@@@@@@@@@@@*++
|
package/dist/lib/base.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare abstract class LoopressCommand extends Command {
|
|
|
13
13
|
protected get rootDir(): string;
|
|
14
14
|
protected get wp(): WpClient;
|
|
15
15
|
init(): Promise<void>;
|
|
16
|
+
protected resolveAcfPath(override?: string): string;
|
|
16
17
|
protected resolveSnippetsPath(override?: string): string;
|
|
17
18
|
private resolveEnvironment;
|
|
18
19
|
}
|
package/dist/lib/base.js
CHANGED
|
@@ -35,6 +35,11 @@ export class LoopressCommand extends Command {
|
|
|
35
35
|
this.localConfig = await readLocalConfig();
|
|
36
36
|
this.siteConfig = this.resolveEnvironment();
|
|
37
37
|
}
|
|
38
|
+
resolveAcfPath(override) {
|
|
39
|
+
if (override)
|
|
40
|
+
return override;
|
|
41
|
+
return join(this.rootDir, this.localConfig.acfDir ?? 'acf');
|
|
42
|
+
}
|
|
38
43
|
resolveSnippetsPath(override) {
|
|
39
44
|
if (override)
|
|
40
45
|
return override;
|
|
@@ -11,6 +11,10 @@ export interface LoopressProjectConfiguration {
|
|
|
11
11
|
* Directory where code snippets are read from and written to, relative to rootDir.
|
|
12
12
|
*/
|
|
13
13
|
snippetsDir?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Directory where ACF field groups, post types, taxonomies and options pages are read from and written to, relative to rootDir.
|
|
16
|
+
*/
|
|
17
|
+
acfDir?: string;
|
|
14
18
|
/**
|
|
15
19
|
* Project identifier from the global Loopress config. When set, takes precedence over the currently active project in the global config.
|
|
16
20
|
*/
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const ACF_OBJECT_TYPES: readonly ["field-groups", "post-types", "taxonomies", "options-pages"];
|
|
2
|
+
export type AcfObjectType = (typeof ACF_OBJECT_TYPES)[number];
|
|
3
|
+
export declare function acfEndpoint(type: AcfObjectType): string;
|
|
4
|
+
export declare function getAcfKey(data: Record<string, unknown>): null | string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const ACF_OBJECT_TYPES = ['field-groups', 'post-types', 'taxonomies', 'options-pages'];
|
|
2
|
+
export function acfEndpoint(type) {
|
|
3
|
+
return `loopress/v1/acf/${type}`;
|
|
4
|
+
}
|
|
5
|
+
// Deliberately loose: ACF's own export JSON is large, deeply nested, and versioned by ACF
|
|
6
|
+
// itself (new settings appear across ACF releases). We only need `key` for filenames/identity;
|
|
7
|
+
// everything else round-trips through pull/push untouched, so there's no generated type for it
|
|
8
|
+
// (see the plan for why: shadowing ACF's own schema would be an ongoing losing battle, and the
|
|
9
|
+
// shared schema:types compiler options (additionalProperties: false) would be actively wrong here).
|
|
10
|
+
export function getAcfKey(data) {
|
|
11
|
+
return typeof data.key === 'string' && data.key.trim() !== '' ? data.key : null;
|
|
12
|
+
}
|
package/dist/utils/composer.d.ts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export interface ComposerJson {
|
|
2
|
+
extra?: {
|
|
3
|
+
'installer-paths'?: Record<string, string[]>;
|
|
4
|
+
};
|
|
5
|
+
name?: string;
|
|
6
|
+
repositories?: Array<{
|
|
7
|
+
type: string;
|
|
8
|
+
url: string;
|
|
9
|
+
}>;
|
|
2
10
|
require?: Record<string, string>;
|
|
3
11
|
'require-dev'?: Record<string, string>;
|
|
4
12
|
}
|
package/dist/utils/plugins.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// Loopress must never manage itself: pulling it into loopress.json would make a later
|
|
2
2
|
// `plugin push` try to reinstall it from WordPress.org, where it doesn't exist, potentially
|
|
3
|
-
// clobbering the plugin's own directory in the process.
|
|
4
|
-
|
|
3
|
+
// clobbering the plugin's own directory in the process. Checked against every slug this
|
|
4
|
+
// plugin has ever shipped under (pre-rename "loopress", and the current "loopress-full" /
|
|
5
|
+
// "loopress-light" editions), since a given site could be running any of them.
|
|
6
|
+
const LOOPRESS_PLUGIN_SLUGS = new Set(['loopress', 'loopress-full', 'loopress-light']);
|
|
5
7
|
export function mergePluginManifest(existing, incoming) {
|
|
6
8
|
const merged = { ...existing, ...incoming };
|
|
7
9
|
const added = Object.keys(incoming).filter((s) => !(s in existing));
|
|
@@ -25,7 +27,7 @@ export function parseInstalledPlugins(raw) {
|
|
|
25
27
|
slug: slugFromPluginFile(item.plugin),
|
|
26
28
|
version: item.version,
|
|
27
29
|
}))
|
|
28
|
-
.filter((plugin) => plugin.slug
|
|
30
|
+
.filter((plugin) => !LOOPRESS_PLUGIN_SLUGS.has(plugin.slug));
|
|
29
31
|
}
|
|
30
32
|
export function diffPlugins(manifest, installed) {
|
|
31
33
|
const installedMap = new Map(installed.map((p) => [p.slug, p]));
|
package/oclif.manifest.json
CHANGED
|
@@ -113,12 +113,13 @@
|
|
|
113
113
|
"status.js"
|
|
114
114
|
]
|
|
115
115
|
},
|
|
116
|
-
"
|
|
116
|
+
"acf:list": {
|
|
117
117
|
"aliases": [],
|
|
118
118
|
"args": {},
|
|
119
|
-
"description": "List
|
|
119
|
+
"description": "List ACF field groups, post types, taxonomies, and options pages from WordPress",
|
|
120
120
|
"examples": [
|
|
121
|
-
"$ lps
|
|
121
|
+
"$ lps acf list",
|
|
122
|
+
"$ lps acf list --type field-groups"
|
|
122
123
|
],
|
|
123
124
|
"flags": {
|
|
124
125
|
"json": {
|
|
@@ -127,11 +128,24 @@
|
|
|
127
128
|
"name": "json",
|
|
128
129
|
"allowNo": false,
|
|
129
130
|
"type": "boolean"
|
|
131
|
+
},
|
|
132
|
+
"type": {
|
|
133
|
+
"description": "Limit to specific ACF object types",
|
|
134
|
+
"name": "type",
|
|
135
|
+
"hasDynamicHelp": false,
|
|
136
|
+
"multiple": true,
|
|
137
|
+
"options": [
|
|
138
|
+
"field-groups",
|
|
139
|
+
"post-types",
|
|
140
|
+
"taxonomies",
|
|
141
|
+
"options-pages"
|
|
142
|
+
],
|
|
143
|
+
"type": "option"
|
|
130
144
|
}
|
|
131
145
|
},
|
|
132
146
|
"hasDynamicHelp": false,
|
|
133
147
|
"hiddenAliases": [],
|
|
134
|
-
"id": "
|
|
148
|
+
"id": "acf:list",
|
|
135
149
|
"pluginAlias": "@loopress/cli",
|
|
136
150
|
"pluginName": "@loopress/cli",
|
|
137
151
|
"pluginType": "core",
|
|
@@ -149,52 +163,81 @@
|
|
|
149
163
|
"relativePath": [
|
|
150
164
|
"dist",
|
|
151
165
|
"commands",
|
|
152
|
-
"
|
|
166
|
+
"acf",
|
|
153
167
|
"list.js"
|
|
154
168
|
]
|
|
155
169
|
},
|
|
156
|
-
"
|
|
170
|
+
"acf:pull": {
|
|
157
171
|
"aliases": [],
|
|
158
172
|
"args": {
|
|
159
173
|
"path": {
|
|
160
|
-
"description": "Path to
|
|
174
|
+
"description": "Path to ACF directory (overrides project config)",
|
|
161
175
|
"name": "path"
|
|
162
176
|
}
|
|
163
177
|
},
|
|
164
|
-
"description": "
|
|
178
|
+
"description": "Pull ACF field groups, post types, taxonomies, and options pages from WordPress",
|
|
165
179
|
"examples": [
|
|
166
|
-
"$ lps
|
|
167
|
-
"$ lps
|
|
180
|
+
"$ lps acf pull",
|
|
181
|
+
"$ lps acf pull --type field-groups"
|
|
168
182
|
],
|
|
169
|
-
"flags": {
|
|
183
|
+
"flags": {
|
|
184
|
+
"dry-run": {
|
|
185
|
+
"char": "d",
|
|
186
|
+
"description": "Show what would change without making changes",
|
|
187
|
+
"name": "dry-run",
|
|
188
|
+
"allowNo": false,
|
|
189
|
+
"type": "boolean"
|
|
190
|
+
},
|
|
191
|
+
"type": {
|
|
192
|
+
"description": "Limit to specific ACF object types",
|
|
193
|
+
"name": "type",
|
|
194
|
+
"hasDynamicHelp": false,
|
|
195
|
+
"multiple": true,
|
|
196
|
+
"options": [
|
|
197
|
+
"field-groups",
|
|
198
|
+
"post-types",
|
|
199
|
+
"taxonomies",
|
|
200
|
+
"options-pages"
|
|
201
|
+
],
|
|
202
|
+
"type": "option"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
170
205
|
"hasDynamicHelp": false,
|
|
171
206
|
"hiddenAliases": [],
|
|
172
|
-
"id": "
|
|
207
|
+
"id": "acf:pull",
|
|
173
208
|
"pluginAlias": "@loopress/cli",
|
|
174
209
|
"pluginName": "@loopress/cli",
|
|
175
210
|
"pluginType": "core",
|
|
176
211
|
"strict": true,
|
|
177
212
|
"enableJsonFlag": false,
|
|
213
|
+
"dryRunFlag": {
|
|
214
|
+
"dry-run": {
|
|
215
|
+
"char": "d",
|
|
216
|
+
"description": "Show what would change without making changes",
|
|
217
|
+
"allowNo": false,
|
|
218
|
+
"type": "boolean"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
178
221
|
"isESM": true,
|
|
179
222
|
"relativePath": [
|
|
180
223
|
"dist",
|
|
181
224
|
"commands",
|
|
182
|
-
"
|
|
183
|
-
"
|
|
225
|
+
"acf",
|
|
226
|
+
"pull.js"
|
|
184
227
|
]
|
|
185
228
|
},
|
|
186
|
-
"
|
|
229
|
+
"acf:push": {
|
|
187
230
|
"aliases": [],
|
|
188
231
|
"args": {
|
|
189
232
|
"path": {
|
|
190
|
-
"description": "Path to
|
|
233
|
+
"description": "Path to ACF directory (overrides project config)",
|
|
191
234
|
"name": "path"
|
|
192
235
|
}
|
|
193
236
|
},
|
|
194
|
-
"description": "
|
|
237
|
+
"description": "Push ACF field groups, post types, taxonomies, and options pages to WordPress",
|
|
195
238
|
"examples": [
|
|
196
|
-
"$ lps
|
|
197
|
-
"$ lps
|
|
239
|
+
"$ lps acf push",
|
|
240
|
+
"$ lps acf push --type field-groups"
|
|
198
241
|
],
|
|
199
242
|
"flags": {
|
|
200
243
|
"dry-run": {
|
|
@@ -203,11 +246,56 @@
|
|
|
203
246
|
"name": "dry-run",
|
|
204
247
|
"allowNo": false,
|
|
205
248
|
"type": "boolean"
|
|
249
|
+
},
|
|
250
|
+
"type": {
|
|
251
|
+
"description": "Limit to specific ACF object types",
|
|
252
|
+
"name": "type",
|
|
253
|
+
"hasDynamicHelp": false,
|
|
254
|
+
"multiple": true,
|
|
255
|
+
"options": [
|
|
256
|
+
"field-groups",
|
|
257
|
+
"post-types",
|
|
258
|
+
"taxonomies",
|
|
259
|
+
"options-pages"
|
|
260
|
+
],
|
|
261
|
+
"type": "option"
|
|
206
262
|
}
|
|
207
263
|
},
|
|
208
264
|
"hasDynamicHelp": false,
|
|
209
265
|
"hiddenAliases": [],
|
|
210
|
-
"id": "
|
|
266
|
+
"id": "acf:push",
|
|
267
|
+
"pluginAlias": "@loopress/cli",
|
|
268
|
+
"pluginName": "@loopress/cli",
|
|
269
|
+
"pluginType": "core",
|
|
270
|
+
"strict": true,
|
|
271
|
+
"isESM": true,
|
|
272
|
+
"relativePath": [
|
|
273
|
+
"dist",
|
|
274
|
+
"commands",
|
|
275
|
+
"acf",
|
|
276
|
+
"push.js"
|
|
277
|
+
]
|
|
278
|
+
},
|
|
279
|
+
"composer:init": {
|
|
280
|
+
"aliases": [],
|
|
281
|
+
"args": {},
|
|
282
|
+
"description": "Create a composer.json wired to WPackagist for installing WordPress.org plugins and themes",
|
|
283
|
+
"examples": [
|
|
284
|
+
"$ lps composer init",
|
|
285
|
+
"$ lps composer init --dry-run"
|
|
286
|
+
],
|
|
287
|
+
"flags": {
|
|
288
|
+
"dry-run": {
|
|
289
|
+
"char": "d",
|
|
290
|
+
"description": "Show what would change without making changes",
|
|
291
|
+
"name": "dry-run",
|
|
292
|
+
"allowNo": false,
|
|
293
|
+
"type": "boolean"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"hasDynamicHelp": false,
|
|
297
|
+
"hiddenAliases": [],
|
|
298
|
+
"id": "composer:init",
|
|
211
299
|
"pluginAlias": "@loopress/cli",
|
|
212
300
|
"pluginName": "@loopress/cli",
|
|
213
301
|
"pluginType": "core",
|
|
@@ -225,22 +313,58 @@
|
|
|
225
313
|
"relativePath": [
|
|
226
314
|
"dist",
|
|
227
315
|
"commands",
|
|
228
|
-
"
|
|
229
|
-
"
|
|
316
|
+
"composer",
|
|
317
|
+
"init.js"
|
|
230
318
|
]
|
|
231
319
|
},
|
|
232
|
-
"
|
|
320
|
+
"composer:pull": {
|
|
233
321
|
"aliases": [],
|
|
234
|
-
"args": {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
322
|
+
"args": {},
|
|
323
|
+
"description": "Pull composer.json and composer.lock from WordPress",
|
|
324
|
+
"examples": [
|
|
325
|
+
"$ lps composer pull",
|
|
326
|
+
"$ lps composer pull --dry-run"
|
|
327
|
+
],
|
|
328
|
+
"flags": {
|
|
329
|
+
"dry-run": {
|
|
330
|
+
"char": "d",
|
|
331
|
+
"description": "Show what would change without making changes",
|
|
332
|
+
"name": "dry-run",
|
|
333
|
+
"allowNo": false,
|
|
334
|
+
"type": "boolean"
|
|
238
335
|
}
|
|
239
336
|
},
|
|
240
|
-
"
|
|
337
|
+
"hasDynamicHelp": false,
|
|
338
|
+
"hiddenAliases": [],
|
|
339
|
+
"id": "composer:pull",
|
|
340
|
+
"pluginAlias": "@loopress/cli",
|
|
341
|
+
"pluginName": "@loopress/cli",
|
|
342
|
+
"pluginType": "core",
|
|
343
|
+
"strict": true,
|
|
344
|
+
"enableJsonFlag": false,
|
|
345
|
+
"dryRunFlag": {
|
|
346
|
+
"dry-run": {
|
|
347
|
+
"char": "d",
|
|
348
|
+
"description": "Show what would change without making changes",
|
|
349
|
+
"allowNo": false,
|
|
350
|
+
"type": "boolean"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"isESM": true,
|
|
354
|
+
"relativePath": [
|
|
355
|
+
"dist",
|
|
356
|
+
"commands",
|
|
357
|
+
"composer",
|
|
358
|
+
"pull.js"
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
"composer:push": {
|
|
362
|
+
"aliases": [],
|
|
363
|
+
"args": {},
|
|
364
|
+
"description": "Push composer.json and composer.lock to WordPress and run composer install",
|
|
241
365
|
"examples": [
|
|
242
|
-
"$ lps
|
|
243
|
-
"$ lps
|
|
366
|
+
"$ lps composer push",
|
|
367
|
+
"$ lps composer push --dry-run"
|
|
244
368
|
],
|
|
245
369
|
"flags": {
|
|
246
370
|
"dry-run": {
|
|
@@ -253,7 +377,7 @@
|
|
|
253
377
|
},
|
|
254
378
|
"hasDynamicHelp": false,
|
|
255
379
|
"hiddenAliases": [],
|
|
256
|
-
"id": "
|
|
380
|
+
"id": "composer:push",
|
|
257
381
|
"pluginAlias": "@loopress/cli",
|
|
258
382
|
"pluginName": "@loopress/cli",
|
|
259
383
|
"pluginType": "core",
|
|
@@ -262,7 +386,7 @@
|
|
|
262
386
|
"relativePath": [
|
|
263
387
|
"dist",
|
|
264
388
|
"commands",
|
|
265
|
-
"
|
|
389
|
+
"composer",
|
|
266
390
|
"push.js"
|
|
267
391
|
]
|
|
268
392
|
},
|
|
@@ -410,6 +534,159 @@
|
|
|
410
534
|
"switch.js"
|
|
411
535
|
]
|
|
412
536
|
},
|
|
537
|
+
"snippet:list": {
|
|
538
|
+
"aliases": [],
|
|
539
|
+
"args": {},
|
|
540
|
+
"description": "List snippets from WordPress",
|
|
541
|
+
"examples": [
|
|
542
|
+
"$ lps snippet list"
|
|
543
|
+
],
|
|
544
|
+
"flags": {
|
|
545
|
+
"json": {
|
|
546
|
+
"char": "j",
|
|
547
|
+
"description": "Output in JSON format",
|
|
548
|
+
"name": "json",
|
|
549
|
+
"allowNo": false,
|
|
550
|
+
"type": "boolean"
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
"hasDynamicHelp": false,
|
|
554
|
+
"hiddenAliases": [],
|
|
555
|
+
"id": "snippet:list",
|
|
556
|
+
"pluginAlias": "@loopress/cli",
|
|
557
|
+
"pluginName": "@loopress/cli",
|
|
558
|
+
"pluginType": "core",
|
|
559
|
+
"strict": true,
|
|
560
|
+
"enableJsonFlag": false,
|
|
561
|
+
"dryRunFlag": {
|
|
562
|
+
"dry-run": {
|
|
563
|
+
"char": "d",
|
|
564
|
+
"description": "Show what would change without making changes",
|
|
565
|
+
"allowNo": false,
|
|
566
|
+
"type": "boolean"
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
"isESM": true,
|
|
570
|
+
"relativePath": [
|
|
571
|
+
"dist",
|
|
572
|
+
"commands",
|
|
573
|
+
"snippet",
|
|
574
|
+
"list.js"
|
|
575
|
+
]
|
|
576
|
+
},
|
|
577
|
+
"snippet:publish": {
|
|
578
|
+
"aliases": [],
|
|
579
|
+
"args": {
|
|
580
|
+
"path": {
|
|
581
|
+
"description": "Path to snippets directory (overrides project config)",
|
|
582
|
+
"name": "path"
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
"description": "Publish snippets to your Loopress account so they can be deployed to other projects. Does not touch any WordPress site.",
|
|
586
|
+
"examples": [
|
|
587
|
+
"$ lps snippet publish",
|
|
588
|
+
"$ lps snippet publish --path ./snippets"
|
|
589
|
+
],
|
|
590
|
+
"flags": {},
|
|
591
|
+
"hasDynamicHelp": false,
|
|
592
|
+
"hiddenAliases": [],
|
|
593
|
+
"id": "snippet:publish",
|
|
594
|
+
"pluginAlias": "@loopress/cli",
|
|
595
|
+
"pluginName": "@loopress/cli",
|
|
596
|
+
"pluginType": "core",
|
|
597
|
+
"strict": true,
|
|
598
|
+
"enableJsonFlag": false,
|
|
599
|
+
"isESM": true,
|
|
600
|
+
"relativePath": [
|
|
601
|
+
"dist",
|
|
602
|
+
"commands",
|
|
603
|
+
"snippet",
|
|
604
|
+
"publish.js"
|
|
605
|
+
]
|
|
606
|
+
},
|
|
607
|
+
"snippet:pull": {
|
|
608
|
+
"aliases": [],
|
|
609
|
+
"args": {
|
|
610
|
+
"path": {
|
|
611
|
+
"description": "Path to snippets directory (overrides project config)",
|
|
612
|
+
"name": "path"
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
"description": "Pull snippets from WordPress",
|
|
616
|
+
"examples": [
|
|
617
|
+
"$ lps snippet pull",
|
|
618
|
+
"$ lps snippet pull --path ./snippets"
|
|
619
|
+
],
|
|
620
|
+
"flags": {
|
|
621
|
+
"dry-run": {
|
|
622
|
+
"char": "d",
|
|
623
|
+
"description": "Show what would change without making changes",
|
|
624
|
+
"name": "dry-run",
|
|
625
|
+
"allowNo": false,
|
|
626
|
+
"type": "boolean"
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
"hasDynamicHelp": false,
|
|
630
|
+
"hiddenAliases": [],
|
|
631
|
+
"id": "snippet:pull",
|
|
632
|
+
"pluginAlias": "@loopress/cli",
|
|
633
|
+
"pluginName": "@loopress/cli",
|
|
634
|
+
"pluginType": "core",
|
|
635
|
+
"strict": true,
|
|
636
|
+
"enableJsonFlag": false,
|
|
637
|
+
"dryRunFlag": {
|
|
638
|
+
"dry-run": {
|
|
639
|
+
"char": "d",
|
|
640
|
+
"description": "Show what would change without making changes",
|
|
641
|
+
"allowNo": false,
|
|
642
|
+
"type": "boolean"
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
"isESM": true,
|
|
646
|
+
"relativePath": [
|
|
647
|
+
"dist",
|
|
648
|
+
"commands",
|
|
649
|
+
"snippet",
|
|
650
|
+
"pull.js"
|
|
651
|
+
]
|
|
652
|
+
},
|
|
653
|
+
"snippet:push": {
|
|
654
|
+
"aliases": [],
|
|
655
|
+
"args": {
|
|
656
|
+
"path": {
|
|
657
|
+
"description": "Path to snippets directory (overrides project config)",
|
|
658
|
+
"name": "path"
|
|
659
|
+
}
|
|
660
|
+
},
|
|
661
|
+
"description": "Push snippets to WordPress. Local snippet files created or updated remotely are renamed on disk to the `<id>-<slug>` convention.",
|
|
662
|
+
"examples": [
|
|
663
|
+
"$ lps snippet push",
|
|
664
|
+
"$ lps snippet push --path ./snippets"
|
|
665
|
+
],
|
|
666
|
+
"flags": {
|
|
667
|
+
"dry-run": {
|
|
668
|
+
"char": "d",
|
|
669
|
+
"description": "Show what would change without making changes",
|
|
670
|
+
"name": "dry-run",
|
|
671
|
+
"allowNo": false,
|
|
672
|
+
"type": "boolean"
|
|
673
|
+
}
|
|
674
|
+
},
|
|
675
|
+
"hasDynamicHelp": false,
|
|
676
|
+
"hiddenAliases": [],
|
|
677
|
+
"id": "snippet:push",
|
|
678
|
+
"pluginAlias": "@loopress/cli",
|
|
679
|
+
"pluginName": "@loopress/cli",
|
|
680
|
+
"pluginType": "core",
|
|
681
|
+
"strict": true,
|
|
682
|
+
"isESM": true,
|
|
683
|
+
"relativePath": [
|
|
684
|
+
"dist",
|
|
685
|
+
"commands",
|
|
686
|
+
"snippet",
|
|
687
|
+
"push.js"
|
|
688
|
+
]
|
|
689
|
+
},
|
|
413
690
|
"plugin:add": {
|
|
414
691
|
"aliases": [],
|
|
415
692
|
"args": {
|
|
@@ -577,80 +854,7 @@
|
|
|
577
854
|
"telemetry",
|
|
578
855
|
"enable.js"
|
|
579
856
|
]
|
|
580
|
-
},
|
|
581
|
-
"composer:pull": {
|
|
582
|
-
"aliases": [],
|
|
583
|
-
"args": {},
|
|
584
|
-
"description": "Pull composer.lock from WordPress",
|
|
585
|
-
"examples": [
|
|
586
|
-
"$ lps composer pull",
|
|
587
|
-
"$ lps composer pull --dry-run"
|
|
588
|
-
],
|
|
589
|
-
"flags": {
|
|
590
|
-
"dry-run": {
|
|
591
|
-
"char": "d",
|
|
592
|
-
"description": "Show what would change without making changes",
|
|
593
|
-
"name": "dry-run",
|
|
594
|
-
"allowNo": false,
|
|
595
|
-
"type": "boolean"
|
|
596
|
-
}
|
|
597
|
-
},
|
|
598
|
-
"hasDynamicHelp": false,
|
|
599
|
-
"hiddenAliases": [],
|
|
600
|
-
"id": "composer:pull",
|
|
601
|
-
"pluginAlias": "@loopress/cli",
|
|
602
|
-
"pluginName": "@loopress/cli",
|
|
603
|
-
"pluginType": "core",
|
|
604
|
-
"strict": true,
|
|
605
|
-
"enableJsonFlag": false,
|
|
606
|
-
"dryRunFlag": {
|
|
607
|
-
"dry-run": {
|
|
608
|
-
"char": "d",
|
|
609
|
-
"description": "Show what would change without making changes",
|
|
610
|
-
"allowNo": false,
|
|
611
|
-
"type": "boolean"
|
|
612
|
-
}
|
|
613
|
-
},
|
|
614
|
-
"isESM": true,
|
|
615
|
-
"relativePath": [
|
|
616
|
-
"dist",
|
|
617
|
-
"commands",
|
|
618
|
-
"composer",
|
|
619
|
-
"pull.js"
|
|
620
|
-
]
|
|
621
|
-
},
|
|
622
|
-
"composer:push": {
|
|
623
|
-
"aliases": [],
|
|
624
|
-
"args": {},
|
|
625
|
-
"description": "Push composer.json and composer.lock to WordPress and run composer install",
|
|
626
|
-
"examples": [
|
|
627
|
-
"$ lps composer push",
|
|
628
|
-
"$ lps composer push --dry-run"
|
|
629
|
-
],
|
|
630
|
-
"flags": {
|
|
631
|
-
"dry-run": {
|
|
632
|
-
"char": "d",
|
|
633
|
-
"description": "Show what would change without making changes",
|
|
634
|
-
"name": "dry-run",
|
|
635
|
-
"allowNo": false,
|
|
636
|
-
"type": "boolean"
|
|
637
|
-
}
|
|
638
|
-
},
|
|
639
|
-
"hasDynamicHelp": false,
|
|
640
|
-
"hiddenAliases": [],
|
|
641
|
-
"id": "composer:push",
|
|
642
|
-
"pluginAlias": "@loopress/cli",
|
|
643
|
-
"pluginName": "@loopress/cli",
|
|
644
|
-
"pluginType": "core",
|
|
645
|
-
"strict": true,
|
|
646
|
-
"isESM": true,
|
|
647
|
-
"relativePath": [
|
|
648
|
-
"dist",
|
|
649
|
-
"commands",
|
|
650
|
-
"composer",
|
|
651
|
-
"push.js"
|
|
652
|
-
]
|
|
653
857
|
}
|
|
654
858
|
},
|
|
655
|
-
"version": "0.
|
|
859
|
+
"version": "0.16.0"
|
|
656
860
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loopress/cli",
|
|
3
3
|
"description": "CLI tool for syncing WordPress code snippets, plugins, and Composer dependencies via the REST API",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.16.0",
|
|
5
5
|
"author": "jean-smaug",
|
|
6
6
|
"bin": {
|
|
7
7
|
"loopress": "bin/run.js",
|
|
@@ -84,6 +84,9 @@
|
|
|
84
84
|
],
|
|
85
85
|
"topicSeparator": " ",
|
|
86
86
|
"topics": {
|
|
87
|
+
"acf": {
|
|
88
|
+
"description": "Manage ACF field groups, post types, taxonomies, and options pages"
|
|
89
|
+
},
|
|
87
90
|
"composer": {
|
|
88
91
|
"description": "Sync composer.json and composer.lock between your project and WordPress"
|
|
89
92
|
},
|