@faststore/cli 3.0.82 → 3.0.83
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 +28 -7
- package/dist/commands/init.d.ts +10 -0
- package/dist/commands/init.js +38 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ $ npm install -g @faststore/cli
|
|
|
30
30
|
$ faststore COMMAND
|
|
31
31
|
running command...
|
|
32
32
|
$ faststore (--version)
|
|
33
|
-
@faststore/cli/3.0.
|
|
33
|
+
@faststore/cli/3.0.83 linux-x64 node-v18.20.3
|
|
34
34
|
$ faststore --help [COMMAND]
|
|
35
35
|
USAGE
|
|
36
36
|
$ faststore COMMAND
|
|
@@ -46,6 +46,7 @@ USAGE
|
|
|
46
46
|
* [`faststore dev [PATH]`](#faststore-dev-path)
|
|
47
47
|
* [`faststore generate-graphql [PATH]`](#faststore-generate-graphql-path)
|
|
48
48
|
* [`faststore help [COMMAND]`](#faststore-help-command)
|
|
49
|
+
* [`faststore init [PATH]`](#faststore-init-path)
|
|
49
50
|
* [`faststore start [PATH]`](#faststore-start-path)
|
|
50
51
|
* [`faststore test [PATH]`](#faststore-test-path)
|
|
51
52
|
|
|
@@ -59,7 +60,7 @@ ARGUMENTS
|
|
|
59
60
|
PATH The path where the FastStore being built is. Defaults to cwd.
|
|
60
61
|
```
|
|
61
62
|
|
|
62
|
-
_See code: [dist/commands/build.ts](https://github.com/vtex/faststore/blob/v3.0.
|
|
63
|
+
_See code: [dist/commands/build.ts](https://github.com/vtex/faststore/blob/v3.0.83/dist/commands/build.ts)_
|
|
63
64
|
|
|
64
65
|
## `faststore cms-sync [PATH]`
|
|
65
66
|
|
|
@@ -74,7 +75,7 @@ FLAGS
|
|
|
74
75
|
-d, --dry-run
|
|
75
76
|
```
|
|
76
77
|
|
|
77
|
-
_See code: [dist/commands/cms-sync.ts](https://github.com/vtex/faststore/blob/v3.0.
|
|
78
|
+
_See code: [dist/commands/cms-sync.ts](https://github.com/vtex/faststore/blob/v3.0.83/dist/commands/cms-sync.ts)_
|
|
78
79
|
|
|
79
80
|
## `faststore dev [PATH]`
|
|
80
81
|
|
|
@@ -86,7 +87,7 @@ ARGUMENTS
|
|
|
86
87
|
PATH The path where the FastStore being run is. Defaults to cwd.
|
|
87
88
|
```
|
|
88
89
|
|
|
89
|
-
_See code: [dist/commands/dev.ts](https://github.com/vtex/faststore/blob/v3.0.
|
|
90
|
+
_See code: [dist/commands/dev.ts](https://github.com/vtex/faststore/blob/v3.0.83/dist/commands/dev.ts)_
|
|
90
91
|
|
|
91
92
|
## `faststore generate-graphql [PATH]`
|
|
92
93
|
|
|
@@ -101,7 +102,7 @@ FLAGS
|
|
|
101
102
|
-d, --debug
|
|
102
103
|
```
|
|
103
104
|
|
|
104
|
-
_See code: [dist/commands/generate-graphql.ts](https://github.com/vtex/faststore/blob/v3.0.
|
|
105
|
+
_See code: [dist/commands/generate-graphql.ts](https://github.com/vtex/faststore/blob/v3.0.83/dist/commands/generate-graphql.ts)_
|
|
105
106
|
|
|
106
107
|
## `faststore help [COMMAND]`
|
|
107
108
|
|
|
@@ -123,6 +124,26 @@ DESCRIPTION
|
|
|
123
124
|
|
|
124
125
|
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.22/src/commands/help.ts)_
|
|
125
126
|
|
|
127
|
+
## `faststore init [PATH]`
|
|
128
|
+
|
|
129
|
+
Creates a discovery folder based on the starter.store template.
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
USAGE
|
|
133
|
+
$ faststore init [PATH]
|
|
134
|
+
|
|
135
|
+
ARGUMENTS
|
|
136
|
+
PATH The path where the Discovery folder will be created. Defaults to ./discovery.
|
|
137
|
+
|
|
138
|
+
DESCRIPTION
|
|
139
|
+
Creates a discovery folder based on the starter.store template.
|
|
140
|
+
|
|
141
|
+
EXAMPLES
|
|
142
|
+
$ yarn faststore init discovery
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
_See code: [dist/commands/init.ts](https://github.com/vtex/faststore/blob/v3.0.83/dist/commands/init.ts)_
|
|
146
|
+
|
|
126
147
|
## `faststore start [PATH]`
|
|
127
148
|
|
|
128
149
|
```
|
|
@@ -133,7 +154,7 @@ ARGUMENTS
|
|
|
133
154
|
PATH The path where the FastStore being run is. Defaults to cwd.
|
|
134
155
|
```
|
|
135
156
|
|
|
136
|
-
_See code: [dist/commands/start.ts](https://github.com/vtex/faststore/blob/v3.0.
|
|
157
|
+
_See code: [dist/commands/start.ts](https://github.com/vtex/faststore/blob/v3.0.83/dist/commands/start.ts)_
|
|
137
158
|
|
|
138
159
|
## `faststore test [PATH]`
|
|
139
160
|
|
|
@@ -145,5 +166,5 @@ ARGUMENTS
|
|
|
145
166
|
PATH The path where the FastStore being tested is. Defaults to cwd.
|
|
146
167
|
```
|
|
147
168
|
|
|
148
|
-
_See code: [dist/commands/test.ts](https://github.com/vtex/faststore/blob/v3.0.
|
|
169
|
+
_See code: [dist/commands/test.ts](https://github.com/vtex/faststore/blob/v3.0.83/dist/commands/test.ts)_
|
|
149
170
|
<!-- commandsstop -->
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
|
|
5
|
+
const degit_1 = tslib_1.__importDefault(require("degit"));
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
7
|
+
const prompts_1 = require("@inquirer/prompts");
|
|
8
|
+
class Init extends core_1.Command {
|
|
9
|
+
static args = [
|
|
10
|
+
{
|
|
11
|
+
name: 'path',
|
|
12
|
+
description: 'The path where the Discovery folder will be created. Defaults to ./discovery.',
|
|
13
|
+
},
|
|
14
|
+
];
|
|
15
|
+
static description = 'Creates a discovery folder based on the starter.store template.';
|
|
16
|
+
static examples = ['$ yarn faststore init discovery'];
|
|
17
|
+
async run() {
|
|
18
|
+
const { args } = await this.parse(Init);
|
|
19
|
+
const discoveryPath = args.path ?? './discovery';
|
|
20
|
+
const discoveryFolderExists = node_fs_1.default.existsSync(discoveryPath);
|
|
21
|
+
if (discoveryFolderExists) {
|
|
22
|
+
const confirmOverride = await (0, prompts_1.confirm)({
|
|
23
|
+
message: `It looks like you already have a discovery folder named "${discoveryPath}" in your store. Do you want to override it?`,
|
|
24
|
+
});
|
|
25
|
+
if (!confirmOverride)
|
|
26
|
+
return this.log('🛑 Interrupted initializing discovery');
|
|
27
|
+
}
|
|
28
|
+
const discoveryEmitter = (0, degit_1.default)('vtex-sites/starter.store', {
|
|
29
|
+
force: true,
|
|
30
|
+
});
|
|
31
|
+
this.log('Pulling starter.store template...');
|
|
32
|
+
discoveryEmitter.clone(discoveryPath).then(() => {
|
|
33
|
+
this.log(`Discovery created successfully! You can find it at ${discoveryPath}`);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.default = Init;
|
|
38
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";;;AAAA,8DAAwB;AACxB,0DAAyB;AACzB,sCAAqC;AACrC,+CAA2C;AAE3C,MAAqB,IAAK,SAAQ,cAAO;IACvC,MAAM,CAAC,IAAI,GAAG;QACZ;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EACT,+EAA+E;SAClF;KACF,CAAA;IAED,MAAM,CAAC,WAAW,GAChB,iEAAiE,CAAA;IAEnE,MAAM,CAAC,QAAQ,GAAG,CAAC,iCAAiC,CAAC,CAAA;IAErD,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAEvC,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,IAAI,aAAa,CAAA;QAChD,MAAM,qBAAqB,GAAG,iBAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAA;QAE1D,IAAI,qBAAqB,EAAE;YACzB,MAAM,eAAe,GAAG,MAAM,IAAA,iBAAO,EAAC;gBACpC,OAAO,EAAE,4DAA4D,aAAa,8CAA8C;aACjI,CAAC,CAAA;YAEF,IAAI,CAAC,eAAe;gBAClB,OAAO,IAAI,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAA;SAC3D;QAED,MAAM,gBAAgB,GAAG,IAAA,eAAK,EAAC,0BAA0B,EAAE;YACzD,KAAK,EAAE,IAAI;SACZ,CAAC,CAAA;QAEF,IAAI,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAA;QAE7C,gBAAgB,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YAC9C,IAAI,CAAC,GAAG,CACN,sDAAsD,aAAa,EAAE,CACtE,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;;AAxCH,uBAyCC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { run } from '@oclif/core';
|
|
2
|
+
import { default as Init } from './commands/init';
|
|
2
3
|
import { default as Dev } from './commands/dev';
|
|
3
4
|
import { default as Build } from './commands/build';
|
|
4
5
|
import { default as Serve } from './commands/start';
|
|
@@ -6,6 +7,7 @@ import { default as CmsSync } from './commands/cms-sync';
|
|
|
6
7
|
import { default as GenerateGraphql } from './commands/generate-graphql';
|
|
7
8
|
import { default as Test } from './commands/test';
|
|
8
9
|
export declare const commands: {
|
|
10
|
+
init: typeof Init;
|
|
9
11
|
dev: typeof Dev;
|
|
10
12
|
build: typeof Build;
|
|
11
13
|
serve: typeof Serve;
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.commands = exports.run = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
var core_1 = require("@oclif/core");
|
|
6
6
|
Object.defineProperty(exports, "run", { enumerable: true, get: function () { return core_1.run; } });
|
|
7
|
+
const init_1 = tslib_1.__importDefault(require("./commands/init"));
|
|
7
8
|
const dev_1 = tslib_1.__importDefault(require("./commands/dev"));
|
|
8
9
|
const build_1 = tslib_1.__importDefault(require("./commands/build"));
|
|
9
10
|
const start_1 = tslib_1.__importDefault(require("./commands/start"));
|
|
@@ -11,6 +12,7 @@ const cms_sync_1 = tslib_1.__importDefault(require("./commands/cms-sync"));
|
|
|
11
12
|
const generate_graphql_1 = tslib_1.__importDefault(require("./commands/generate-graphql"));
|
|
12
13
|
const test_1 = tslib_1.__importDefault(require("./commands/test"));
|
|
13
14
|
exports.commands = {
|
|
15
|
+
init: init_1.default,
|
|
14
16
|
dev: dev_1.default,
|
|
15
17
|
build: build_1.default,
|
|
16
18
|
serve: start_1.default,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,oCAAiC;AAAxB,2FAAA,GAAG,OAAA;AAEZ,iEAA+C;AAC/C,qEAAmD;AACnD,qEAAmD;AACnD,2EAAwD;AACxD,2FAAwE;AACxE,mEAAiD;AAEpC,QAAA,QAAQ,GAAG;IACtB,GAAG,EAAE,aAAG;IACR,KAAK,EAAE,eAAK;IACZ,KAAK,EAAE,eAAK;IACZ,UAAU,EAAE,kBAAO;IACnB,kBAAkB,EAAE,0BAAe;IACnC,IAAI,EAAE,cAAI;CACX,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,oCAAiC;AAAxB,2FAAA,GAAG,OAAA;AAEZ,mEAAiD;AACjD,iEAA+C;AAC/C,qEAAmD;AACnD,qEAAmD;AACnD,2EAAwD;AACxD,2FAAwE;AACxE,mEAAiD;AAEpC,QAAA,QAAQ,GAAG;IACtB,IAAI,EAAE,cAAI;IACV,GAAG,EAAE,aAAG;IACR,KAAK,EAAE,eAAK;IACZ,KAAK,EAAE,eAAK;IACZ,UAAU,EAAE,kBAAO;IACnB,kBAAkB,EAAE,0BAAe;IACnC,IAAI,EAAE,cAAI;CACX,CAAA"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"3.0.
|
|
1
|
+
{"version":"3.0.83","commands":{"build":{"id":"build","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"The path where the FastStore being built is. Defaults to cwd."}]},"cms-sync":{"id":"cms-sync","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"flags":{"dry-run":{"name":"dry-run","type":"boolean","char":"d","allowNo":false}},"args":[{"name":"path","description":"The path where the FastStore being synched with the CMS is. Defaults to cwd."}]},"dev":{"id":"dev","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"The path where the FastStore being run is. Defaults to cwd."}]},"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":[{"name":"path","description":"The path where the FastStore GraphQL customization is. Defaults to cwd."}]},"init":{"id":"init","description":"Creates a discovery folder based on the starter.store template.","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"examples":["$ yarn faststore init discovery"],"flags":{},"args":[{"name":"path","description":"The path where the Discovery folder will be created. Defaults to ./discovery."}]},"start":{"id":"start","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"The path where the FastStore being run is. Defaults to cwd."}]},"test":{"id":"test","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"path","description":"The path where the FastStore being tested is. Defaults to cwd."}]}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.83",
|
|
4
4
|
"description": "FastStore CLI",
|
|
5
5
|
"author": "Emerson Laurentino @emersonlaurentino",
|
|
6
6
|
"bin": {
|
|
@@ -17,11 +17,13 @@
|
|
|
17
17
|
"/oclif.manifest.json"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
+
"@inquirer/prompts": "^5.1.2",
|
|
20
21
|
"@oclif/core": "^1.16.4",
|
|
21
22
|
"@oclif/plugin-help": "^5",
|
|
22
23
|
"@oclif/plugin-not-found": "^2.3.3",
|
|
23
24
|
"chalk": "~4.1.2",
|
|
24
25
|
"chokidar": "^3.5.3",
|
|
26
|
+
"degit": "^2.8.4",
|
|
25
27
|
"dotenv": "^16.4.5",
|
|
26
28
|
"fs-extra": "^10.1.0",
|
|
27
29
|
"path": "^0.12.7"
|
|
@@ -30,6 +32,7 @@
|
|
|
30
32
|
"@faststore/eslint-config": "^3.0.68",
|
|
31
33
|
"@faststore/shared": "^3.0.68",
|
|
32
34
|
"@types/chai": "^4",
|
|
35
|
+
"@types/degit": "^2.8.6",
|
|
33
36
|
"@types/fs-extra": "^9.0.13",
|
|
34
37
|
"@types/node": "^16.11.63",
|
|
35
38
|
"chai": "^4",
|
|
@@ -69,5 +72,5 @@
|
|
|
69
72
|
"oclif"
|
|
70
73
|
],
|
|
71
74
|
"types": "dist/index.d.ts",
|
|
72
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "8d76597df9b3940d4d3fb22462e479798a61a6fb"
|
|
73
76
|
}
|