@faststore/cli 4.1.0-dev.3 → 4.1.0-dev.4

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 (2) hide show
  1. package/README.md +58 -19
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <a href="https://faststore.dev">
2
+ <a href="https://developers.vtex.com/docs/guides/faststore">
3
3
  <img alt="Faststore" src="../ui/static/logo.png" width="60" />
4
4
  </a>
5
5
  </p>
@@ -11,32 +11,71 @@
11
11
  The FastStore Command Line Interface
12
12
  </strong>
13
13
  </p>
14
+ <p align="center">
15
+ <a href="https://www.npmjs.com/package/@faststore/cli">
16
+ <img src="https://badge.fury.io/js/%40faststore%2Fcli.svg" alt="npm version" />
17
+ </a>
18
+ </p>
14
19
 
15
- The FastStore Command Line Interface (CLI) is the main pre-configured tool for initializing, building and developing FastStore projects.
20
+ `@faststore/cli` is the primary toolchain for FastStore projects. It handles project initialization, local development, builds, GraphQL schema caching, and CMS synchronization. It also keeps store projects in sync with `@faststore/core`.
16
21
 
17
- Also the CLI is the responsible on keeping the stores up-to-date with the `@faststore/core` package and enables the cloud platform to understand the FastStore project.
18
22
 
19
- ## Installation
23
+ ## Package structure
24
+
25
+ ```text
26
+ src/
27
+ ├── commands/ # One file per CLI command (dev.ts, build.ts, generate.ts, etc.)
28
+ ├── utils/ # Shared utilities used across commands
29
+ └── index.ts # Package entry point
30
+ ```
31
+
32
+ ## How to run
20
33
 
21
- From the command line in your project directory, run:
34
+ ### Prerequisites
22
35
 
23
- ```cmd
24
- npm install -g @faststore/cli
36
+ - Node.js ≥ 20
37
+ - pnpm
38
+
39
+ ### Local setup
40
+
41
+ ```bash
42
+ # 1. Install dependencies (from the repo root)
43
+ pnpm install
44
+
45
+ # 2. Build the CLI
46
+ pnpm build
25
47
  ```
26
48
 
27
- <!-- usage -->
28
- ```sh-session
29
- $ npm install -g @faststore/cli
30
- $ faststore COMMAND
31
- running command...
32
- $ faststore (--version)
33
- @faststore/cli/4.1.0-dev.3 linux-x64 node-v24.13.0
34
- $ faststore --help [COMMAND]
35
- USAGE
36
- $ faststore COMMAND
37
- ...
49
+ ## How to develop
50
+
51
+ ### Adding a new command
52
+
53
+ Commands are built with [oclif](https://oclif.io/). Each command is a single file in `src/commands/`:
54
+
55
+ 1. Create `src/commands/<command-name>.ts` extending `Command` from `@oclif/core`
56
+ 2. Define `args`, `flags`, and implement the `run()` method
57
+ 3. Run `pnpm build` to compile
58
+ 4. Test with `node bin/run.js <command-name>`
59
+
60
+ ## How to test
61
+
62
+ ```bash
63
+ pnpm test
38
64
  ```
39
- <!-- usagestop -->
65
+
66
+ ## How to publish
67
+
68
+ Versioning and publishing are managed at the monorepo root by Lerna. Do not publish this package independently. The `## Commands` section in this README is regenerated automatically when a new version is packed. Refer to the [Contributing guidelines](../../CONTRIBUTING.MD) for the full release workflow.
69
+
70
+ ## Documentation
71
+
72
+ - **Faststore CLI:** [Running FastStore CLI on the project](https://developers.vtex.com/docs/guides/faststore/developer-tools-faststore-cli)
73
+
74
+ <br />
75
+
76
+ <br />
77
+
78
+ > The `## Commands` section below is auto-generated by `oclif readme` during `prepack`. Do not edit it manually — changes will be overwritten on the next build.
40
79
 
41
80
  ## Commands
42
81
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/cli",
3
- "version": "4.1.0-dev.3",
3
+ "version": "4.1.0-dev.4",
4
4
  "description": "FastStore CLI",
5
5
  "author": "Emerson Laurentino @emersonlaurentino",
6
6
  "type": "module",
@@ -27,8 +27,8 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "@antfu/ni": "catalog:",
30
- "@faststore/api": "4.1.0-dev.3",
31
- "@faststore/core": "4.1.0-dev.3",
30
+ "@faststore/api": "4.1.0-dev.4",
31
+ "@faststore/core": "4.1.0-dev.4",
32
32
  "@graphql-codegen/cli": "catalog:",
33
33
  "@graphql-tools/merge": "catalog:",
34
34
  "@graphql-tools/utils": "catalog:",
@@ -96,5 +96,5 @@
96
96
  "engines": {
97
97
  "node": ">=20"
98
98
  },
99
- "gitHead": "83d08ea86efed01d93749e743f5c32172d41a5ab"
99
+ "gitHead": "7d9d73ad6c722cb82e0a6a914a0556bfee765df8"
100
100
  }