@faststore/cli 3.44.1 → 3.44.3
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 +13 -9
- package/dist/commands/build.d.ts +3 -0
- package/dist/commands/build.js +27 -1
- package/dist/commands/build.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
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.44.
|
|
33
|
+
@faststore/cli/3.44.3 linux-x64 node-v18.20.8
|
|
34
34
|
$ faststore --help [COMMAND]
|
|
35
35
|
USAGE
|
|
36
36
|
$ faststore COMMAND
|
|
@@ -54,14 +54,18 @@ USAGE
|
|
|
54
54
|
|
|
55
55
|
```
|
|
56
56
|
USAGE
|
|
57
|
-
$ faststore build [ACCOUNT] [PATH]
|
|
57
|
+
$ faststore build [ACCOUNT] [PATH] [--no-verify]
|
|
58
58
|
|
|
59
59
|
ARGUMENTS
|
|
60
60
|
ACCOUNT The account for which the Discovery is running. Currently noop.
|
|
61
61
|
PATH The path where the FastStore being built is. Defaults to cwd.
|
|
62
|
+
|
|
63
|
+
FLAGS
|
|
64
|
+
--no-verify Skips verification of faststore dependencies version string to prevent usage of packages outside npm
|
|
65
|
+
registry.
|
|
62
66
|
```
|
|
63
67
|
|
|
64
|
-
_See code: [dist/commands/build.js](https://github.com/vtex/faststore/blob/v3.44.
|
|
68
|
+
_See code: [dist/commands/build.js](https://github.com/vtex/faststore/blob/v3.44.3/dist/commands/build.js)_
|
|
65
69
|
|
|
66
70
|
## `faststore cms-sync [PATH]`
|
|
67
71
|
|
|
@@ -76,7 +80,7 @@ FLAGS
|
|
|
76
80
|
-d, --dry-run
|
|
77
81
|
```
|
|
78
82
|
|
|
79
|
-
_See code: [dist/commands/cms-sync.js](https://github.com/vtex/faststore/blob/v3.44.
|
|
83
|
+
_See code: [dist/commands/cms-sync.js](https://github.com/vtex/faststore/blob/v3.44.3/dist/commands/cms-sync.js)_
|
|
80
84
|
|
|
81
85
|
## `faststore create [PATH]`
|
|
82
86
|
|
|
@@ -96,7 +100,7 @@ EXAMPLES
|
|
|
96
100
|
$ yarn faststore create discovery
|
|
97
101
|
```
|
|
98
102
|
|
|
99
|
-
_See code: [dist/commands/create.js](https://github.com/vtex/faststore/blob/v3.44.
|
|
103
|
+
_See code: [dist/commands/create.js](https://github.com/vtex/faststore/blob/v3.44.3/dist/commands/create.js)_
|
|
100
104
|
|
|
101
105
|
## `faststore dev [ACCOUNT] [PATH] [PORT]`
|
|
102
106
|
|
|
@@ -110,7 +114,7 @@ ARGUMENTS
|
|
|
110
114
|
PORT The port where FastStore should run. Defaults to 3000.
|
|
111
115
|
```
|
|
112
116
|
|
|
113
|
-
_See code: [dist/commands/dev.js](https://github.com/vtex/faststore/blob/v3.44.
|
|
117
|
+
_See code: [dist/commands/dev.js](https://github.com/vtex/faststore/blob/v3.44.3/dist/commands/dev.js)_
|
|
114
118
|
|
|
115
119
|
## `faststore generate-graphql [PATH]`
|
|
116
120
|
|
|
@@ -122,7 +126,7 @@ ARGUMENTS
|
|
|
122
126
|
PATH The path where the FastStore GraphQL customization is. Defaults to cwd.
|
|
123
127
|
```
|
|
124
128
|
|
|
125
|
-
_See code: [dist/commands/generate-graphql.js](https://github.com/vtex/faststore/blob/v3.44.
|
|
129
|
+
_See code: [dist/commands/generate-graphql.js](https://github.com/vtex/faststore/blob/v3.44.3/dist/commands/generate-graphql.js)_
|
|
126
130
|
|
|
127
131
|
## `faststore help [COMMAND]`
|
|
128
132
|
|
|
@@ -156,7 +160,7 @@ ARGUMENTS
|
|
|
156
160
|
PORT The port where FastStore should run. Defaults to 3000.
|
|
157
161
|
```
|
|
158
162
|
|
|
159
|
-
_See code: [dist/commands/start.js](https://github.com/vtex/faststore/blob/v3.44.
|
|
163
|
+
_See code: [dist/commands/start.js](https://github.com/vtex/faststore/blob/v3.44.3/dist/commands/start.js)_
|
|
160
164
|
|
|
161
165
|
## `faststore test [PATH]`
|
|
162
166
|
|
|
@@ -168,5 +172,5 @@ ARGUMENTS
|
|
|
168
172
|
PATH The path where the FastStore being tested is. Defaults to cwd.
|
|
169
173
|
```
|
|
170
174
|
|
|
171
|
-
_See code: [dist/commands/test.js](https://github.com/vtex/faststore/blob/v3.44.
|
|
175
|
+
_See code: [dist/commands/test.js](https://github.com/vtex/faststore/blob/v3.44.3/dist/commands/test.js)_
|
|
172
176
|
<!-- commandsstop -->
|
package/dist/commands/build.d.ts
CHANGED
package/dist/commands/build.js
CHANGED
|
@@ -9,6 +9,7 @@ const fs_extra_1 = require("fs-extra");
|
|
|
9
9
|
const commands_1 = require("../utils/commands");
|
|
10
10
|
const directory_1 = require("../utils/directory");
|
|
11
11
|
const generate_1 = require("../utils/generate");
|
|
12
|
+
const logger_1 = require("../utils/logger");
|
|
12
13
|
class Build extends core_1.Command {
|
|
13
14
|
static args = [
|
|
14
15
|
{
|
|
@@ -20,9 +21,18 @@ class Build extends core_1.Command {
|
|
|
20
21
|
description: 'The path where the FastStore being built is. Defaults to cwd.',
|
|
21
22
|
},
|
|
22
23
|
];
|
|
24
|
+
static flags = {
|
|
25
|
+
['no-verify']: core_1.Flags.boolean({
|
|
26
|
+
description: 'Skips verification of faststore dependencies version string to prevent usage of packages outside npm registry.',
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
23
29
|
async run() {
|
|
24
|
-
const { args } = await this.parse(Build);
|
|
30
|
+
const { args, flags } = await this.parse(Build);
|
|
25
31
|
const basePath = args.path ?? process.cwd();
|
|
32
|
+
if (!flags['no-verify']) {
|
|
33
|
+
const invalidPackages = await checkDeps(basePath);
|
|
34
|
+
invalidPackages.forEach((pkg) => logger_1.logger.warn(`${chalk_1.default.yellow('warning')} - Dependency ${pkg} has invalid version signature. Please use a semver like ^1.0.0 (check the official releases on https://github.com/vtex/faststore)`));
|
|
35
|
+
}
|
|
26
36
|
const { tmpDir } = (0, directory_1.withBasePath)(basePath);
|
|
27
37
|
await (0, generate_1.generate)({ setup: true, basePath });
|
|
28
38
|
const packageManager = (0, commands_1.getPreferredPackageManager)();
|
|
@@ -79,4 +89,20 @@ async function copyResources(basePath) {
|
|
|
79
89
|
await copyResource(`${tmpDir}/public`, `${userDir}/public`);
|
|
80
90
|
}
|
|
81
91
|
}
|
|
92
|
+
async function checkDeps(basePath) {
|
|
93
|
+
const packageJsonPath = `${basePath}/package.json`;
|
|
94
|
+
if (!(0, fs_1.existsSync)(packageJsonPath))
|
|
95
|
+
throw new Error(`package.json not found at ${packageJsonPath}`);
|
|
96
|
+
const { devDependencies = {}, dependencies = {}, peerDependencies = {}, } = await Promise.resolve(`${packageJsonPath}`).then(s => tslib_1.__importStar(require(s)));
|
|
97
|
+
const allDeps = Object.assign({}, peerDependencies, devDependencies, dependencies);
|
|
98
|
+
const invalidPackages = [];
|
|
99
|
+
Object.entries(allDeps).forEach(([pkg, version]) => {
|
|
100
|
+
if (/^@faststore\/.+/i.test(pkg) === false)
|
|
101
|
+
return;
|
|
102
|
+
if (version && /^(http|https|git):.+/.test(version) === true) {
|
|
103
|
+
invalidPackages.push(pkg);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
return invalidPackages;
|
|
107
|
+
}
|
|
82
108
|
//# sourceMappingURL=build.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":";;;AAAA,sCAA4C;AAC5C,0DAAyB;AACzB,iDAAyC;AACzC,2BAA+B;AAC/B,uCAAsE;AACtE,gDAA8D;AAC9D,kDAAiD;AACjD,gDAA4C;AAC5C,4CAAwC;AAExC,MAAqB,KAAM,SAAQ,cAAO;IACxC,MAAM,CAAC,IAA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BAAgB,GAAG,EAAE,GACtB,GAAG,yBAAa,eAAe,+CAAC,CAAA;IAEjC,MAAM,OAAO,GAA2B,MAAM,CAAC,MAAM,CACnD,EAAE,EACF,gBAAgB,EAChB,eAAe,EACf,YAAY,CACb,CAAA;IAED,MAAM,eAAe,GAAkB,EAAE,CAAA;IAEzC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE,EAAE;QACjD,IAAI,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK;YAAE,OAAM;QAElD,IAAI,OAAO,IAAI,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;YAC7D,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAC3B,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,eAAe,CAAA;AACxB,CAAC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"3.44.
|
|
1
|
+
{"version":"3.44.3","commands":{"build":{"id":"build","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"flags":{"no-verify":{"name":"no-verify","type":"boolean","description":"Skips verification of faststore dependencies version string to prevent usage of packages outside npm registry.","allowNo":false}},"args":[{"name":"account","description":"The account for which the Discovery is running. Currently noop."},{"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."}]},"create":{"id":"create","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 create discovery"],"flags":{},"args":[{"name":"path","description":"The path where the Discovery folder will be created. Defaults to ./discovery."}]},"dev":{"id":"dev","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"account","description":"The account for which the Discovery is running. Currently noop."},{"name":"path","description":"The path where the FastStore being run is. Defaults to cwd."},{"name":"port","description":"The port where FastStore should run. Defaults to 3000."}]},"generate-graphql":{"id":"generate-graphql","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"flags":{"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."}]},"start":{"id":"start","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"account","description":"The account for which the Discovery is running. Currently noop."},{"name":"path","description":"The path where the FastStore being run is. Defaults to cwd."},{"name":"port","description":"The port where FastStore should run. Defaults to 3000."}]},"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.44.
|
|
3
|
+
"version": "3.44.3",
|
|
4
4
|
"description": "FastStore CLI",
|
|
5
5
|
"author": "Emerson Laurentino @emersonlaurentino",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@antfu/ni": "^0.21.12",
|
|
21
|
-
"@faststore/core": "^3.44.
|
|
21
|
+
"@faststore/core": "^3.44.2",
|
|
22
22
|
"@inquirer/prompts": "^5.1.2",
|
|
23
23
|
"@oclif/core": "^1.16.4",
|
|
24
24
|
"@oclif/plugin-help": "^5",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"oclif"
|
|
71
71
|
],
|
|
72
72
|
"types": "dist/index.d.ts",
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "b92b3916286cbd6db963a11b71d50ff451bccf5d"
|
|
74
74
|
}
|