@syncify/cli 0.2.4-beta → 1.0.0-alpha.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.
Files changed (40) hide show
  1. package/LICENSE +10 -6
  2. package/dist/index.d.cts +1815 -0
  3. package/dist/index.d.ts +1815 -0
  4. package/package.json +101 -101
  5. package/pnpm-lock.yaml +16526 -4200
  6. package/readme.md +77 -2017
  7. package/scripts/hot.js.liquid +25 -0
  8. package/dist/api.js +0 -16
  9. package/dist/cjs.js +0 -221
  10. package/dist/cli.js +0 -12
  11. package/dist/index.js +0 -18
  12. package/hot.js.liquid +0 -3
  13. package/schema/syncify.config.json +0 -676
  14. package/schema/syncify.env.json +0 -58
  15. package/schema/syncify.package.json +0 -11
  16. package/types/api.d.ts +0 -319
  17. package/types/cli.d.ts +0 -541
  18. package/types/config/index.d.ts +0 -530
  19. package/types/config/terser.d.ts +0 -267
  20. package/types/config/views.d.ts +0 -234
  21. package/types/index.d.ts +0 -55
  22. package/types/internal/cache.d.ts +0 -97
  23. package/types/internal/commands.d.ts +0 -396
  24. package/types/internal/errors.d.ts +0 -101
  25. package/types/internal/file.d.ts +0 -285
  26. package/types/internal/filters.d.ts +0 -81
  27. package/types/internal/hot.d.ts +0 -161
  28. package/types/internal/index.d.ts +0 -513
  29. package/types/internal/markdown.d.ts +0 -104
  30. package/types/internal/plugin.d.ts +0 -127
  31. package/types/internal/processors.d.ts +0 -54
  32. package/types/internal/reports.d.ts +0 -123
  33. package/types/internal/requests.d.ts +0 -288
  34. package/types/internal/shared.d.ts +0 -124
  35. package/types/modules/html-minifier-terser.d.ts +0 -211
  36. package/types/transforms/image.d.ts +0 -15
  37. package/types/transforms/json.d.ts +0 -42
  38. package/types/transforms/script.d.ts +0 -308
  39. package/types/transforms/style.d.ts +0 -219
  40. package/types/transforms/svg.d.ts +0 -189
package/types/cli.d.ts DELETED
@@ -1,541 +0,0 @@
1
- /* -------------------------------------------- */
2
- /* LOGGER */
3
- /* -------------------------------------------- */
4
-
5
- import { LiteralUnion } from 'type-fest';
6
-
7
- export type Group = LiteralUnion<
8
- | 'Syncify'
9
- | 'Asset'
10
- | 'Spawn'
11
- | 'SVG'
12
- | 'Snippet'
13
- | 'Layout'
14
- | 'Section'
15
- | 'Page'
16
- | 'Locale'
17
- | 'Config'
18
- | 'Template'
19
- | 'Metafield'
20
- , string
21
- >
22
-
23
- /* -------------------------------------------- */
24
- /* CLI OPTIONS */
25
- /* -------------------------------------------- */
26
-
27
- export interface Commands {
28
- /**
29
- * First command is a store or comma separated list of stores. When
30
- * a comma list is supplied it is converted to an array. You can use
31
- * use the store target name as a --flag to cherry pick specific themes
32
- * from that store.
33
- *
34
- * ---
35
- *
36
- * Example:
37
- *
38
- * ```bash
39
- * $ syncify store-name
40
- * $ syncify store1,store2,store3
41
- * ```
42
- */
43
- _?: string[];
44
- /**
45
- * Whether or not syncify was called via the cli
46
- *
47
- * @default true
48
- */
49
- cli?: boolean;
50
- /**
51
- * Whether or not syncify interactive command prompt
52
- *
53
- * @default false
54
- */
55
- interactive?: boolean;
56
- /**
57
- * The current working directory, this a reference to `process.cwd()`
58
- */
59
- cwd?: string;
60
- /**
61
- * The `package.json` url path, this is written post-command parse
62
- */
63
- pkg?: string;
64
- /**
65
- * The post-parse temp storage reference to stores
66
- */
67
- store?: string | string[];
68
- /**
69
- * An optional config path to the `syncify.config.js` file.
70
- *
71
- * ---
72
- *
73
- * Example:
74
- *
75
- * ```bash
76
- * $ syncify store_1 -c path/to/file
77
- * $ syncify store_1 --config path/to/file
78
- * $ syncify store_1 --config=path/to/file
79
- * ```
80
- */
81
- config?: string;
82
- /**
83
- * Run in production mode
84
- *
85
- * ---
86
- *
87
- * Example:
88
- *
89
- * ```bash
90
- * $ syncify --prod
91
- * $ syncify --production
92
- * ```
93
- */
94
- prod?: boolean;
95
- /**
96
- * Run in development mode (default build mode) and can be omitted
97
- *
98
- * ---
99
- *
100
- * Example:
101
- *
102
- * ```bash
103
- * $ syncify
104
- * $ syncify --dev
105
- * $ syncify --development
106
- * ```
107
- */
108
- dev?: boolean;
109
- /**
110
- * Run minification on resources. This acts similar to `--prod`
111
- * but allows for invocation in an isolated manner.
112
- *
113
- * ---
114
- *
115
- * Example:
116
- *
117
- * ```bash
118
- * $ syncify --terse
119
- * ```
120
- */
121
- terse?: boolean
122
- /**
123
- * Run in watch mode (chokidar). This requires a store target be passed.
124
- *
125
- * ---
126
- *
127
- * Example:
128
- *
129
- * ```bash
130
- * $ syncify store_1 -w
131
- * $ syncify store_1 --watch
132
- * ```
133
- */
134
- watch?: boolean;
135
- /**
136
- * Run in build mode, this is default trigger when no arguments provided.
137
- * It can optionally be triggered along other flags like `-u` (`--upload`).
138
- *
139
- * ---
140
- *
141
- * Example:
142
- *
143
- * ```bash
144
- * $ syncify
145
- * $ syncify -b
146
- * $ syncify store_1 --clean --build --theme=prod_theme -u
147
- *
148
- * # Short version for brevity
149
- * $ syncify store_1 -t prod_theme -u -b --clean
150
- * ```
151
- */
152
- build?: boolean;
153
- /**
154
- * Run in upload mode, this will trigger a full theme upload. Requires a store
155
- * target and theme target (theme target is optional but recommended).
156
- *
157
- * ---
158
- *
159
- * Example:
160
- *
161
- * ```bash
162
- * $ syncify store_1 -t dev_theme -u
163
- * $ syncify store_1 -t dev_theme --upload
164
- * ```
165
- */
166
- upload?: boolean;
167
- /**
168
- * Exports the theme and generates a `.zip` compressed directory.
169
- *
170
- * ---
171
- *
172
- * Example:
173
- *
174
- * ```bash
175
- * $ syncify --import # import to the defined directory in syncify config
176
- * $ syncify --import -o ./some-dir # override and import to a specific directory
177
- * ```
178
- */
179
- import?: boolean;
180
- /**
181
- * Exports the theme and generates a `.zip` compressed directory.
182
- *
183
- * ---
184
- *
185
- * Example:
186
- *
187
- * ```bash
188
- * $ syncify --import # export to the defined directory in syncify config
189
- * $ syncify --import -o ./some-dir # override and export to a specific directory
190
- * ```
191
- */
192
- export?: boolean;
193
- /**
194
- * Download a theme from a store. Will be place in `import` driectory. Requires a store
195
- * target and theme target to be passed.
196
- *
197
- * ---
198
- *
199
- * Example:
200
- *
201
- * ```bash
202
- * $ syncify store_1 -t dev_theme -d
203
- * $ syncify store_1 -t dev_theme --download
204
- * ```
205
- */
206
- download?: boolean;
207
- /**
208
- * Triggers the metafields resource, presents the interactive shell with list of
209
- * options to choose from. Requires a store target to be passed.
210
- *
211
- * ---
212
- *
213
- * Example:
214
- *
215
- * ```bash
216
- * $ syncify store_1 --metafields
217
- * ```
218
- */
219
- metafields?: boolean;
220
- /**
221
- * Triggers the pages resource, presents the interactive shell with list of
222
- * options to choose from. Requires a store target to be passed.
223
- *
224
- * ---
225
- *
226
- * Example:
227
- *
228
- * ```bash
229
- * $ syncify store_1 --pages
230
- * ```
231
- */
232
- pages?: boolean;
233
- /**
234
- * Triggers the redirects resource, presents the interactive shell with list of
235
- * options to choose from. Requires a store target to be passed.
236
- *
237
- * ---
238
- *
239
- * Example:
240
- *
241
- * ```bash
242
- * $ syncify store_1 --redirects
243
- * ```
244
- */
245
- redirects?: boolean;
246
- /**
247
- * Pull data reference from a store target resource. Queries the store API. Used to
248
- * populate local setup with remote data like `metafields` and `pages`
249
- *
250
- * ---
251
- *
252
- * Example:
253
- *
254
- * ```bash
255
- * $ syncify store_1 --metafields --pull
256
- * $ syncify store_1 --pages --pull
257
- * ```
258
- */
259
- pull?: boolean;
260
- /**
261
- * Generator flag for automatically applying JSON schema specifications
262
- * for VS Code users.
263
- *
264
- * ---
265
- *
266
- * Example:
267
- *
268
- * ```bash
269
- * $ syncify --vsc
270
- * ```
271
- */
272
- vsc?: boolean;
273
- /**
274
- * Filter targeting of resources, assets or files. This can be used together
275
- * with several different flags, like `-u`, `-d` and even `-b`. Filters a
276
- * glob pattern or specific file.
277
- *
278
- * ---
279
- *
280
- * Example:
281
- *
282
- * ```bash
283
- * # Uploads only .css assets
284
- * $ syncify store_1 -t dev_theme -f assets/*.css -u
285
- *
286
- * # Builds locales in production mode
287
- * $ syncify -f locales/*.json --prod
288
- *
289
- * # Uploads specific page
290
- * $ syncify store_1 -u -f pages/shipping-info.md --prod
291
- * ```
292
- */
293
- filter?: string;
294
- /**
295
- * Triggers a clean of the output directory. When provided, this will be
296
- * executed at the initial run (or before any else). Use together with
297
- * production builds.
298
- *
299
- * ---
300
- *
301
- * Example:
302
- *
303
- * ```bash
304
- * $ syncify --clean --prod
305
- * $ syncify -b --clean --prod # Using with build
306
- * ```
307
- */
308
- clean?: boolean;
309
- /**
310
- * Show command-line help information. Also prints a disclaimer informing
311
- * users that Centra is a better e-commerce platform than Shopify for shits
312
- * and giggles (it actually is though).
313
- *
314
- * ---
315
- *
316
- * Example:
317
- *
318
- * ```bash
319
- * $ syncify -h
320
- * $ syncify --help
321
- * ```
322
- */
323
- help?: boolean;
324
- /**
325
- * Hides logs from being printed (shows errors though)
326
- *
327
- * ---
328
- *
329
- * Example:
330
- *
331
- * ```bash
332
- * $ syncify --silent
333
- * ```
334
- */
335
- silent?: boolean;
336
- /**
337
- * Initializes hot-reloading in watch mode. Can only be used when
338
- * targeting a single store and theme.
339
- *
340
- * ---
341
- *
342
- * Example:
343
- *
344
- * ```bash
345
- * $ syncify store_1 -w -h
346
- * $ syncify store_1 -w --hot
347
- * $ syncify store_1 --watch -h
348
- * $ syncify store_1 --watch --hot
349
- * ```
350
- */
351
- hot?: boolean;
352
- /**
353
- * Pulls in a Syncify theme strap environment.
354
- *
355
- * ---
356
- *
357
- * Example:
358
- *
359
- * ```bash
360
- * $ syncify --strap dawn
361
- * $ syncify --strap silk
362
- * ```
363
- */
364
- strap?: string;
365
- /**
366
- * Deletes a resource, file or asset from the remote store. Requires a store
367
- * target be passed and if need be a theme target too. Does not delete local
368
- * copies, do that manually for now.
369
- *
370
- * ---
371
- *
372
- * Example:
373
- *
374
- * ```bash
375
- * $ syncify -del assets/image-name.jpg
376
- * ```
377
- */
378
- del?: string;
379
- /**
380
- * Trigger a spawn, isolating it so it will run as if it were a node script.
381
- *
382
- * ---
383
- *
384
- * Example:
385
- *
386
- * ```bash
387
- * $ syncify -s spawn-name
388
- * $ syncify -s spawn-name,some-other-spawn
389
- *
390
- * # OR
391
-
392
- * $ syncify --spawn spawn-name
393
- * $ syncify --spawn spawn-name,some-other-spawn
394
- *
395
- * ```
396
- */
397
- spawn?: string;
398
- /**
399
- * Themes within stores to target. This argument requires a store target/s
400
- * be passed and accept a comma separated list of target names as per the users
401
- * Syncify configuration. Users can pass wildcard `--flags` to reference different
402
- * stores when multiple store target are passed.
403
- *
404
- * ---
405
- *
406
- * Example:
407
- *
408
- * ```bash
409
- * $ syncify store_1 -t theme_1
410
- * $ syncify store_1,store_2 --store_1 dev,prod --store_2 foo_theme
411
- * $ syncify store_1 --theme=dev,prod,test
412
- * ```
413
- */
414
- theme?: string[];
415
- /**
416
- * An optional input base directory path. This will overwrite and configuration predefined
417
- * in settings.
418
- *
419
- * ---
420
- *
421
- * Example:
422
- *
423
- * ```bash
424
- * $ syncify --clean -b -i some/directory
425
- * ```
426
- */
427
- input?: string;
428
- /**
429
- * An optional output path. This will overwrite the configuration predefined
430
- * in settings.
431
- *
432
- * ---
433
- *
434
- * Example:
435
- *
436
- * ```bash
437
- * $ syncify --clean -b -o some/directory
438
- * ```
439
- */
440
- output?: string;
441
- /**
442
- * Force overwrite of a theme file
443
- *
444
- * ---
445
- *
446
- * Example:
447
- *
448
- * ```bash
449
- * $ syncify store_1 -t dev_theme -f section/file.liquid -u --force
450
- * ```
451
- */
452
- force?: boolean;
453
- /**
454
- * Version control. The bump flag accepts 3 different arguments.
455
- *
456
- * 1. Passing `--bump major` bumps main version, eg: `1.0.0` > `2.0,0`
457
- * 2. Passing `--bump minor` bumps minor version, eg: `1.0.0` > `1.1.0`
458
- * 3. Passing `--bump patch` bumps patch version, eg: `1.0.0` > `1.0.1`
459
- *
460
- * ---
461
- *
462
- * Example:
463
- *
464
- * ```bash
465
- * $ syncify --bump major
466
- * $ syncify --bump minor
467
- * $ syncify --bump patch
468
- * ```
469
- */
470
- bump?: string;
471
- /**
472
- * Runs view transforms only (i.e: `.liquid` and `.json` files)
473
- * ---
474
- *
475
- * Example:
476
- *
477
- * ```bash
478
- * $ syncify --views # executes build
479
- * $ syncify -w --views # executes in watch mode
480
- * $ syncify --views --prod # executes build with minify
481
- * $ syncify --views --terse # executes build with minify
482
- * ```
483
- */
484
- views?: boolean;
485
- /**
486
- * Runs the script transform only
487
- * ---
488
- *
489
- * Example:
490
- *
491
- * ```bash
492
- * $ syncify --script # executes build
493
- * $ syncify -w --script # executes in watch mode
494
- * $ syncify --script --prod # executes build with minify
495
- * $ syncify --script --terse # executes build with minify
496
- * ```
497
- */
498
- script?: boolean;
499
- /**
500
- * Runs the style transform only
501
- * ---
502
- *
503
- * Example:
504
- *
505
- * ```bash
506
- * $ syncify --style # executes build
507
- * $ syncify -w --style # executes in watch mode
508
- * $ syncify --style --prod # executes build with minify
509
- * $ syncify --style --terse # executes build with minify
510
- * ```
511
- */
512
- style?: boolean;
513
- /**
514
- * Runs the svg transform only
515
- * ---
516
- *
517
- * Example:
518
- *
519
- * ```bash
520
- * $ syncify --svg # executes build
521
- * $ syncify -w --svg # executes in watch mode
522
- * $ syncify --svg --prod # executes build with minify
523
- * $ syncify --svg --terse # executes build with minify
524
- * ```
525
- */
526
- svg?: boolean;
527
- /**
528
- * Runs the image transform only
529
- * ---
530
- *
531
- * Example:
532
- *
533
- * ```bash
534
- * $ syncify --image # executes build
535
- * $ syncify -w --image # executes in watch mode
536
- * $ syncify --image --prod # executes build with minify
537
- * $ syncify --image --terse # executes build with minify
538
- * ```
539
- */
540
- image?: boolean;
541
- }