@faststore/cli 3.0.1 → 3.0.7
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 +33 -17
- package/dist/utils/directory.d.ts +1 -1
- package/dist/utils/directory.js +10 -3
- package/dist/utils/directory.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://faststore.dev">
|
|
3
|
+
<img alt="Faststore" src="../ui/static/logo.png" width="60" />
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
<h1 align="center">
|
|
7
|
+
FastStore CLI
|
|
8
|
+
</h1>
|
|
9
|
+
<p align="center">
|
|
10
|
+
<strong>
|
|
11
|
+
The FastStore Command Line Interface
|
|
12
|
+
</strong>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
The FastStore Command Line Interface (CLI) is the main pre-configured tool for initializing, building and developing FastStore projects.
|
|
16
|
+
|
|
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
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
From the command line in your project directory, run:
|
|
22
|
+
|
|
23
|
+
```cmd
|
|
24
|
+
npm install -g @faststore/cli
|
|
25
|
+
```
|
|
10
26
|
|
|
11
27
|
<!-- usage -->
|
|
12
28
|
```sh-session
|
|
@@ -14,7 +30,7 @@ $ npm install -g @faststore/cli
|
|
|
14
30
|
$ faststore COMMAND
|
|
15
31
|
running command...
|
|
16
32
|
$ faststore (--version)
|
|
17
|
-
@faststore/cli/3.0.
|
|
33
|
+
@faststore/cli/3.0.7 linux-x64 node-v18.19.0
|
|
18
34
|
$ faststore --help [COMMAND]
|
|
19
35
|
USAGE
|
|
20
36
|
$ faststore COMMAND
|
|
@@ -22,7 +38,7 @@ USAGE
|
|
|
22
38
|
```
|
|
23
39
|
<!-- usagestop -->
|
|
24
40
|
|
|
25
|
-
|
|
41
|
+
## Commands
|
|
26
42
|
|
|
27
43
|
<!-- commands -->
|
|
28
44
|
* [`faststore build`](#faststore-build)
|
|
@@ -40,7 +56,7 @@ USAGE
|
|
|
40
56
|
$ faststore build
|
|
41
57
|
```
|
|
42
58
|
|
|
43
|
-
_See code: [dist/commands/build.ts](https://github.com/vtex/faststore/blob/v3.0.
|
|
59
|
+
_See code: [dist/commands/build.ts](https://github.com/vtex/faststore/blob/v3.0.7/dist/commands/build.ts)_
|
|
44
60
|
|
|
45
61
|
## `faststore cms-sync`
|
|
46
62
|
|
|
@@ -49,7 +65,7 @@ USAGE
|
|
|
49
65
|
$ faststore cms-sync
|
|
50
66
|
```
|
|
51
67
|
|
|
52
|
-
_See code: [dist/commands/cms-sync.ts](https://github.com/vtex/faststore/blob/v3.0.
|
|
68
|
+
_See code: [dist/commands/cms-sync.ts](https://github.com/vtex/faststore/blob/v3.0.7/dist/commands/cms-sync.ts)_
|
|
53
69
|
|
|
54
70
|
## `faststore dev`
|
|
55
71
|
|
|
@@ -58,7 +74,7 @@ USAGE
|
|
|
58
74
|
$ faststore dev
|
|
59
75
|
```
|
|
60
76
|
|
|
61
|
-
_See code: [dist/commands/dev.ts](https://github.com/vtex/faststore/blob/v3.0.
|
|
77
|
+
_See code: [dist/commands/dev.ts](https://github.com/vtex/faststore/blob/v3.0.7/dist/commands/dev.ts)_
|
|
62
78
|
|
|
63
79
|
## `faststore generate-graphql`
|
|
64
80
|
|
|
@@ -70,7 +86,7 @@ FLAGS
|
|
|
70
86
|
-d, --debug
|
|
71
87
|
```
|
|
72
88
|
|
|
73
|
-
_See code: [dist/commands/generate-graphql.ts](https://github.com/vtex/faststore/blob/v3.0.
|
|
89
|
+
_See code: [dist/commands/generate-graphql.ts](https://github.com/vtex/faststore/blob/v3.0.7/dist/commands/generate-graphql.ts)_
|
|
74
90
|
|
|
75
91
|
## `faststore help [COMMAND]`
|
|
76
92
|
|
|
@@ -99,7 +115,7 @@ USAGE
|
|
|
99
115
|
$ faststore start
|
|
100
116
|
```
|
|
101
117
|
|
|
102
|
-
_See code: [dist/commands/start.ts](https://github.com/vtex/faststore/blob/v3.0.
|
|
118
|
+
_See code: [dist/commands/start.ts](https://github.com/vtex/faststore/blob/v3.0.7/dist/commands/start.ts)_
|
|
103
119
|
|
|
104
120
|
## `faststore test`
|
|
105
121
|
|
|
@@ -108,5 +124,5 @@ USAGE
|
|
|
108
124
|
$ faststore test
|
|
109
125
|
```
|
|
110
126
|
|
|
111
|
-
_See code: [dist/commands/test.ts](https://github.com/vtex/faststore/blob/v3.0.
|
|
127
|
+
_See code: [dist/commands/test.ts](https://github.com/vtex/faststore/blob/v3.0.7/dist/commands/test.ts)_
|
|
112
128
|
<!-- commandsstop -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
export declare const tmpFolderName = ".faststore";
|
|
1
2
|
export declare const getRoot: () => string;
|
|
2
3
|
export declare const userDir: string;
|
|
3
4
|
export declare const faststoreDir: string;
|
|
4
|
-
export declare const tmpFolderName = ".faststore";
|
|
5
5
|
export declare const tmpDir: string;
|
|
6
6
|
export declare const coreFolderName = "core";
|
|
7
7
|
export declare const coreDir: string;
|
package/dist/utils/directory.js
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tmpCmsWebhookUrlsFileDir = exports.cmsWebhookUrlsFileName = exports.tmpNodeModulesDir = exports.userNodeModulesDir = exports.tmpStoreConfigFileDir = exports.userStoreConfigFileDir = exports.configFileName = exports.userCMSDir = exports.coreCMSDir = exports.tmpCMSDir = exports.cmsFolderName = exports.tmpThemesCustomizationsFileDir = exports.userThemesFileDir = exports.tmpCustomizationsSrcDir = exports.tmpCustomizationsDir = exports.customizationsFolderName = exports.userSrcDir = exports.srcFolderName = exports.coreDir = exports.coreFolderName = exports.tmpDir = exports.
|
|
3
|
+
exports.tmpCmsWebhookUrlsFileDir = exports.cmsWebhookUrlsFileName = exports.tmpNodeModulesDir = exports.userNodeModulesDir = exports.tmpStoreConfigFileDir = exports.userStoreConfigFileDir = exports.configFileName = exports.userCMSDir = exports.coreCMSDir = exports.tmpCMSDir = exports.cmsFolderName = exports.tmpThemesCustomizationsFileDir = exports.userThemesFileDir = exports.tmpCustomizationsSrcDir = exports.tmpCustomizationsDir = exports.customizationsFolderName = exports.userSrcDir = exports.srcFolderName = exports.coreDir = exports.coreFolderName = exports.tmpDir = exports.faststoreDir = exports.userDir = exports.getRoot = exports.tmpFolderName = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
|
+
// build folder
|
|
7
|
+
exports.tmpFolderName = '.faststore';
|
|
8
|
+
// always returns the root of the project, AKA the starter root or @faststore/core dir root when running in the monorepo
|
|
6
9
|
const getRoot = () => {
|
|
7
10
|
if (process.env.OCLIF_COMPILATION) {
|
|
8
11
|
return '';
|
|
9
12
|
}
|
|
13
|
+
if (process.cwd().endsWith(exports.tmpFolderName)) {
|
|
14
|
+
// if the current working directory is the build folder (tmp folder), return the starter root
|
|
15
|
+
// this makes sure the semantics of the starter root are consistent with the directories declared below
|
|
16
|
+
return path_1.default.join(process.cwd(), '..');
|
|
17
|
+
}
|
|
10
18
|
return process.cwd();
|
|
11
19
|
};
|
|
12
20
|
exports.getRoot = getRoot;
|
|
@@ -14,8 +22,7 @@ exports.getRoot = getRoot;
|
|
|
14
22
|
exports.userDir = (0, exports.getRoot)();
|
|
15
23
|
// node_modules folder for faststorer packages
|
|
16
24
|
exports.faststoreDir = path_1.default.join(exports.userDir, 'node_modules', '@faststore');
|
|
17
|
-
// build folder
|
|
18
|
-
exports.tmpFolderName = '.faststore';
|
|
25
|
+
// build folder dir
|
|
19
26
|
exports.tmpDir = path_1.default.join(exports.userDir, exports.tmpFolderName);
|
|
20
27
|
// node_modules folder for @faststore/core
|
|
21
28
|
exports.coreFolderName = 'core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directory.js","sourceRoot":"","sources":["../../src/utils/directory.ts"],"names":[],"mappings":";;;;AAAA,wDAAuB;
|
|
1
|
+
{"version":3,"file":"directory.js","sourceRoot":"","sources":["../../src/utils/directory.ts"],"names":[],"mappings":";;;;AAAA,wDAAuB;AAEvB,eAAe;AACF,QAAA,aAAa,GAAG,YAAY,CAAA;AAEzC,wHAAwH;AACjH,MAAM,OAAO,GAAG,GAAG,EAAE;IAC1B,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;QACjC,OAAO,EAAE,CAAA;KACV;IAED,IAAG,OAAO,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,qBAAa,CAAC,EAAE;QACxC,6FAA6F;QAC7F,uGAAuG;QACvG,OAAO,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAA;KACtC;IAED,OAAO,OAAO,CAAC,GAAG,EAAE,CAAA;AACtB,CAAC,CAAA;AAZY,QAAA,OAAO,WAYnB;AAED,eAAe;AACF,QAAA,OAAO,GAAG,IAAA,eAAO,GAAE,CAAA;AAEhC,8CAA8C;AACjC,QAAA,YAAY,GAAG,cAAI,CAAC,IAAI,CAAC,eAAO,EAAE,cAAc,EAAE,YAAY,CAAC,CAAA;AAE5E,mBAAmB;AACN,QAAA,MAAM,GAAG,cAAI,CAAC,IAAI,CAAC,eAAO,EAAE,qBAAa,CAAC,CAAA;AAEvD,0CAA0C;AAC7B,QAAA,cAAc,GAAG,MAAM,CAAA;AACvB,QAAA,OAAO,GAAG,cAAI,CAAC,IAAI,CAAC,oBAAY,EAAE,sBAAc,CAAC,CAAA;AAE9D,sBAAsB;AACT,QAAA,aAA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kB,GAAG,cAAI,CAAC,IAAI,CAAC,eAAO,EAAE,cAAc,CAAC,CAAA;AACpE,8BAA8B;AACjB,QAAA,iBAAiB,GAAG,cAAI,CAAC,IAAI,CAAC,cAAM,EAAE,cAAc,CAAC,CAAA;AAElE,+BAA+B;AAClB,QAAA,sBAAsB,GAAG,uBAAuB,CAAA;AAC7D,wCAAwC;AAC3B,QAAA,wBAAwB,GAAG,cAAI,CAAC,IAAI,CAAC,cAAM,EAAE,8BAAsB,CAAC,CAAA"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"3.0.
|
|
1
|
+
{"version":"3.0.7","commands":{"build":{"id":"build","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"cms-sync":{"id":"cms-sync","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"dev":{"id":"dev","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"generate-graphql":{"id":"generate-graphql","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"flags":{"debug":{"name":"debug","type":"boolean","char":"d","allowNo":false},"core":{"name":"core","type":"boolean","char":"c","hidden":true,"allowNo":false}},"args":[]},"start":{"id":"start","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"test":{"id":"test","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"flags":{},"args":[]}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"description": "FastStore CLI",
|
|
5
5
|
"author": "Emerson Laurentino @emersonlaurentino",
|
|
6
6
|
"bin": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"path": "^0.12.7"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@faststore/eslint-config": "^3.0.
|
|
30
|
-
"@faststore/shared": "^3.0.
|
|
29
|
+
"@faststore/eslint-config": "^3.0.7",
|
|
30
|
+
"@faststore/shared": "^3.0.7",
|
|
31
31
|
"@types/chai": "^4",
|
|
32
32
|
"@types/fs-extra": "^9.0.13",
|
|
33
33
|
"@types/node": "^16.11.63",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"oclif"
|
|
66
66
|
],
|
|
67
67
|
"types": "dist/index.d.ts",
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "1672bc9ba921b70b5f9acfa2845c8f566d29be16"
|
|
69
69
|
}
|