@faststore/cli 3.0.83 → 3.0.88
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 +8 -8
- package/dist/commands/build.js +5 -3
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/dev.js +29 -4
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/generate-graphql.js +11 -9
- package/dist/commands/generate-graphql.js.map +1 -1
- package/dist/commands/start.js +3 -1
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/test.js +3 -1
- package/dist/commands/test.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/utils/commands.d.ts +1 -0
- package/dist/utils/commands.js +11 -0
- package/dist/utils/commands.js.map +1 -0
- package/oclif.manifest.json +1 -1
- package/package.json +8 -6
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.88 linux-x64 node-v18.20.4
|
|
34
34
|
$ faststore --help [COMMAND]
|
|
35
35
|
USAGE
|
|
36
36
|
$ faststore COMMAND
|
|
@@ -60,7 +60,7 @@ ARGUMENTS
|
|
|
60
60
|
PATH The path where the FastStore being built is. Defaults to cwd.
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
_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.88/dist/commands/build.ts)_
|
|
64
64
|
|
|
65
65
|
## `faststore cms-sync [PATH]`
|
|
66
66
|
|
|
@@ -75,7 +75,7 @@ FLAGS
|
|
|
75
75
|
-d, --dry-run
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
_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.88/dist/commands/cms-sync.ts)_
|
|
79
79
|
|
|
80
80
|
## `faststore dev [PATH]`
|
|
81
81
|
|
|
@@ -87,7 +87,7 @@ ARGUMENTS
|
|
|
87
87
|
PATH The path where the FastStore being run is. Defaults to cwd.
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
_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.88/dist/commands/dev.ts)_
|
|
91
91
|
|
|
92
92
|
## `faststore generate-graphql [PATH]`
|
|
93
93
|
|
|
@@ -102,7 +102,7 @@ FLAGS
|
|
|
102
102
|
-d, --debug
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
_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.88/dist/commands/generate-graphql.ts)_
|
|
106
106
|
|
|
107
107
|
## `faststore help [COMMAND]`
|
|
108
108
|
|
|
@@ -142,7 +142,7 @@ EXAMPLES
|
|
|
142
142
|
$ yarn faststore init discovery
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
-
_See code: [dist/commands/init.ts](https://github.com/vtex/faststore/blob/v3.0.
|
|
145
|
+
_See code: [dist/commands/init.ts](https://github.com/vtex/faststore/blob/v3.0.88/dist/commands/init.ts)_
|
|
146
146
|
|
|
147
147
|
## `faststore start [PATH]`
|
|
148
148
|
|
|
@@ -154,7 +154,7 @@ ARGUMENTS
|
|
|
154
154
|
PATH The path where the FastStore being run is. Defaults to cwd.
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
_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.88/dist/commands/start.ts)_
|
|
158
158
|
|
|
159
159
|
## `faststore test [PATH]`
|
|
160
160
|
|
|
@@ -166,5 +166,5 @@ ARGUMENTS
|
|
|
166
166
|
PATH The path where the FastStore being tested is. Defaults to cwd.
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
-
_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.88/dist/commands/test.ts)_
|
|
170
170
|
<!-- commandsstop -->
|
package/dist/commands/build.js
CHANGED
|
@@ -8,6 +8,7 @@ const fs_1 = require("fs");
|
|
|
8
8
|
const fs_extra_1 = require("fs-extra");
|
|
9
9
|
const directory_1 = require("../utils/directory");
|
|
10
10
|
const generate_1 = require("../utils/generate");
|
|
11
|
+
const commands_1 = require("../utils/commands");
|
|
11
12
|
class Build extends core_1.Command {
|
|
12
13
|
static args = [
|
|
13
14
|
{
|
|
@@ -20,13 +21,14 @@ class Build extends core_1.Command {
|
|
|
20
21
|
const basePath = args.path ?? process.cwd();
|
|
21
22
|
const { tmpDir } = (0, directory_1.withBasePath)(basePath);
|
|
22
23
|
await (0, generate_1.generate)({ setup: true, basePath });
|
|
23
|
-
const
|
|
24
|
+
const packageManager = (0, commands_1.getPreferredPackageManager)();
|
|
25
|
+
const buildResult = (0, child_process_1.spawnSync)(`${packageManager} run build`, {
|
|
24
26
|
shell: true,
|
|
25
27
|
cwd: tmpDir,
|
|
26
28
|
stdio: 'inherit',
|
|
27
29
|
});
|
|
28
|
-
if (
|
|
29
|
-
process.exit(
|
|
30
|
+
if (buildResult.status && buildResult.status !== 0) {
|
|
31
|
+
process.exit(buildResult.status);
|
|
30
32
|
}
|
|
31
33
|
await normalizeStandaloneBuildDir(basePath);
|
|
32
34
|
await copyResources(basePath);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"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AAA,wBAAY,EAAC,QAAQ,CAAC,CAAA;IAElD,MAAM,YAAY,CAAC,GAAG,MAAM,QAAQ,EAAE,GAAG,OAAO,QAAQ,CAAC,CAAA;IACzD,MAAM,YAAY,CAAC,GAAG,MAAM,kBAAkB,EAAE,GAAG,OAAO,kBAAkB,CAAC,CAAA;IAC7E,MAAM,YAAY,CAAC,GAAG,MAAM,SAAS,EAAE,GAAG,OAAO,SAAS,CAAC,CAAA;AAC7D,CAAC"}
|
package/dist/commands/dev.js
CHANGED
|
@@ -3,12 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
5
|
const child_process_1 = require("child_process");
|
|
6
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
7
|
const chokidar_1 = tslib_1.__importDefault(require("chokidar"));
|
|
7
8
|
const dotenv_1 = tslib_1.__importDefault(require("dotenv"));
|
|
8
9
|
const fs_1 = require("fs");
|
|
9
10
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
10
11
|
const directory_1 = require("../utils/directory");
|
|
11
12
|
const generate_1 = require("../utils/generate");
|
|
13
|
+
const commands_1 = require("../utils/commands");
|
|
14
|
+
const runCommandSync_1 = require("../utils/runCommandSync");
|
|
12
15
|
/**
|
|
13
16
|
* Taken from toolbelt
|
|
14
17
|
*
|
|
@@ -28,9 +31,22 @@ const defaultIgnored = [
|
|
|
28
31
|
'**/.faststore/**',
|
|
29
32
|
];
|
|
30
33
|
const devAbortController = new AbortController();
|
|
31
|
-
async function storeDev(rootDir, tmpDir) {
|
|
34
|
+
async function storeDev(rootDir, tmpDir, coreDir) {
|
|
32
35
|
const envVars = dotenv_1.default.parse((0, fs_1.readFileSync)(path_1.default.join(rootDir, 'vtex.env')));
|
|
33
|
-
const
|
|
36
|
+
const packageManager = (0, commands_1.getPreferredPackageManager)();
|
|
37
|
+
(0, runCommandSync_1.runCommandSync)({
|
|
38
|
+
cmd: `${packageManager} predev`,
|
|
39
|
+
errorMessage: 'GraphQL was not optimized and TS files were not updated. Changes in the GraphQL layer did not take effect',
|
|
40
|
+
throws: 'error',
|
|
41
|
+
debug: true,
|
|
42
|
+
cwd: tmpDir,
|
|
43
|
+
});
|
|
44
|
+
const { success } = copyGenerated(path_1.default.join(tmpDir, '@generated'), path_1.default.join(coreDir, '@generated'));
|
|
45
|
+
if (!success) {
|
|
46
|
+
console.log(`${chalk_1.default.yellow('warn')} - Failed to copy @generated schema back to node_modules, autocomplete and DX might be impacted.`);
|
|
47
|
+
console.log(`Attempted to copy from ${path_1.default.join(tmpDir, '@generated')} to ${path_1.default.join(coreDir, '@generated')}`);
|
|
48
|
+
}
|
|
49
|
+
const devProcess = (0, child_process_1.spawn)(`${packageManager} dev-only`, {
|
|
34
50
|
shell: true,
|
|
35
51
|
cwd: tmpDir,
|
|
36
52
|
signal: devAbortController.signal,
|
|
@@ -44,6 +60,15 @@ async function storeDev(rootDir, tmpDir) {
|
|
|
44
60
|
devAbortController.abort();
|
|
45
61
|
});
|
|
46
62
|
}
|
|
63
|
+
function copyGenerated(from, to) {
|
|
64
|
+
try {
|
|
65
|
+
(0, fs_1.cpSync)(from, to, { recursive: true, force: true });
|
|
66
|
+
return { success: true };
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
return { success: false };
|
|
70
|
+
}
|
|
71
|
+
}
|
|
47
72
|
class Dev extends core_1.Command {
|
|
48
73
|
static args = [
|
|
49
74
|
{
|
|
@@ -54,7 +79,7 @@ class Dev extends core_1.Command {
|
|
|
54
79
|
async run() {
|
|
55
80
|
const { args } = await this.parse(Dev);
|
|
56
81
|
const basePath = args.path ?? process.cwd();
|
|
57
|
-
const { getRoot, tmpDir } = (0, directory_1.withBasePath)(basePath);
|
|
82
|
+
const { getRoot, tmpDir, coreDir } = (0, directory_1.withBasePath)(basePath);
|
|
58
83
|
const queueChange = ( /* path: string, remove: boolean */) => {
|
|
59
84
|
(0, generate_1.generate)({ basePath });
|
|
60
85
|
};
|
|
@@ -73,7 +98,7 @@ class Dev extends core_1.Command {
|
|
|
73
98
|
watcher.close();
|
|
74
99
|
});
|
|
75
100
|
await (0, generate_1.generate)({ setup: true, basePath });
|
|
76
|
-
storeDev(getRoot(), tmpDir);
|
|
101
|
+
storeDev(getRoot(), tmpDir, coreDir);
|
|
77
102
|
return await new Promise((resolve, reject) => {
|
|
78
103
|
watcher
|
|
79
104
|
.on('add', ( /*file*/) => queueChange( /*file, false*/))
|
package/dist/commands/dev.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":";;;AAAA,sCAAsC;AACtC,iDAAsC;AACtC,gEAAgC;AAChC,4DAA4B;AAE5B,
|
|
1
|
+
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":";;;AAAA,sCAAsC;AACtC,iDAAsC;AACtC,0DAA0B;AAC1B,gEAAgC;AAChC,4DAA4B;AAE5B,2BAA0C;AAC1C,wDAAwB;AACxB,kDAAkD;AAClD,gDAA6C;AAC7C,gDAA+D;AAC/D,4DAAyD;AAGzD;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAA;AAEpE,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;AAEtC,MAAM,cAAc,GAAG;IACrB,WAAW;IACX,WAAW;IACX,YAAY;IACZ,cAAc;IACd,iBAAiB;IACjB,oBAAoB;IACpB,SAAS;IACT,eAAe;IACf,kBAAkB;CACnB,CAAA;AAED,MAAM,kBAAkB,GAAG,IAAI,eAAe,EAAE,CAAA;AAEhD,KAAK,UAAU,QAAQ,CAAC,OAAe,EAAE,MAAc,EAAE,OAAe;IACtE,MAAM,OAAO,GAAG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A;QACjB,CAAC,CAAC,CAAA;QAEF,MAAM,IAAA,mBAAQ,EAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;QAEzC,QAAQ,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;QAEpC,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC3C,OAAO;iBACJ,EAAE,CAAC,KAAK,EAAE,EAAC,QAAQ,EAAE,EAAE,CAAC,WAAW,EAAC,eAAe,CAAC,CAAC;iBACrD,EAAE,CAAC,QAAQ,EAAE,EAAC,QAAQ,EAAE,EAAE,CAAC,WAAW,EAAC,eAAe,CAAC,CAAC;iBACxD,EAAE,CAAC,QAAQ,EAAE,EAAC,QAAQ,EAAE,EAAE,CAAC,WAAW,EAAC,cAAc,CAAC,CAAC;iBACvD,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;gBAChB,kBAAkB,CAAC,KAAK,EAAE,CAAA;gBAC1B,MAAM,EAAE,CAAA;YACV,CAAC,CAAC;iBACD,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QACzB,CAAC,CAAC,CAAA;IACJ,CAAC;;AAjDH,sBAkDC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
4
5
|
const core_1 = require("@oclif/core");
|
|
5
6
|
const fs_extra_1 = require("fs-extra");
|
|
6
|
-
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
7
|
const directory_1 = require("../utils/directory");
|
|
8
8
|
const runCommandSync_1 = require("../utils/runCommandSync");
|
|
9
|
+
const commands_1 = require("../utils/commands");
|
|
9
10
|
class GenerateGraphql extends core_1.Command {
|
|
10
11
|
static flags = {
|
|
11
12
|
debug: core_1.Flags.boolean({ char: 'd' }),
|
|
@@ -23,35 +24,36 @@ class GenerateGraphql extends core_1.Command {
|
|
|
23
24
|
const { tmpDir, coreDir } = (0, directory_1.withBasePath)(basePath);
|
|
24
25
|
const debug = flags.debug ?? false;
|
|
25
26
|
const isCore = flags.core ?? false;
|
|
27
|
+
const packageManager = (0, commands_1.getPreferredPackageManager)();
|
|
26
28
|
if (!isCore && !(0, fs_extra_1.existsSync)(tmpDir)) {
|
|
27
29
|
console.log(`${chalk_1.default.red('error')} - The ".faststore" directory could not be found. When running faststore dev or faststore build, the generate-graphql command is automatically executed.`);
|
|
28
30
|
process.exit(1);
|
|
29
31
|
}
|
|
30
32
|
(0, runCommandSync_1.runCommandSync)({
|
|
31
|
-
cmd:
|
|
32
|
-
errorMessage:
|
|
33
|
+
cmd: `${packageManager} run generate:schema`,
|
|
34
|
+
errorMessage: `Failed to run '${packageManager} generate:schema'. Please check your setup.`,
|
|
33
35
|
throws: 'error',
|
|
34
36
|
debug,
|
|
35
37
|
cwd: isCore ? undefined : tmpDir,
|
|
36
38
|
});
|
|
37
39
|
(0, runCommandSync_1.runCommandSync)({
|
|
38
|
-
cmd:
|
|
40
|
+
cmd: `${packageManager} run generate:codegen`,
|
|
39
41
|
errorMessage: 'GraphQL was not optimized and TS files were not updated. Changes in the GraphQL layer did not take effect',
|
|
40
42
|
throws: 'error',
|
|
41
43
|
debug,
|
|
42
44
|
cwd: isCore ? undefined : tmpDir,
|
|
43
45
|
});
|
|
44
46
|
(0, runCommandSync_1.runCommandSync)({
|
|
45
|
-
cmd:
|
|
46
|
-
errorMessage:
|
|
47
|
+
cmd: `${packageManager} run format:generated`,
|
|
48
|
+
errorMessage: `Failed to format generated files. '${packageManager} format:generated' thrown errors`,
|
|
47
49
|
throws: 'warning',
|
|
48
50
|
debug,
|
|
49
51
|
cwd: isCore ? undefined : tmpDir,
|
|
50
52
|
});
|
|
51
|
-
//
|
|
53
|
+
// The command generate:copy-back expects the DESTINATION var to be present so it can copy the files to the correct directory
|
|
52
54
|
(0, runCommandSync_1.runCommandSync)({
|
|
53
|
-
cmd: `DESTINATION=${coreDir}
|
|
54
|
-
errorMessage:
|
|
55
|
+
cmd: `DESTINATION=${coreDir} ${packageManager} run generate:copy-back`,
|
|
56
|
+
errorMessage: `Failed to copy back typings files. '${packageManager} generate:copy-back' thrown errors`,
|
|
55
57
|
throws: 'warning',
|
|
56
58
|
debug,
|
|
57
59
|
cwd: isCore ? undefined : tmpDir,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-graphql.js","sourceRoot":"","sources":["../../src/commands/generate-graphql.ts"],"names":[],"mappings":";;;AAAA,sCAA4C;AAC5C,uCAAqC;
|
|
1
|
+
{"version":3,"file":"generate-graphql.js","sourceRoot":"","sources":["../../src/commands/generate-graphql.ts"],"names":[],"mappings":";;;AAAA,0DAAyB;AACzB,sCAA4C;AAC5C,uCAAqC;AAErC,kDAAiD;AACjD,4DAAwD;AACxD,gDAA8D;AAE9D,MAAqB,eAAgB,SAAQ,cAAO;IAClD,MAAM,CAAC,KAAK,GAAG;QACb,KAAK,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;QACnC,IAAI,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;KACjD,CAAA;IAED,MAAM,CAAC,IAAI,GAAG;QACZ;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,yEAAyE;SACvF;KACF,CAAA;IAED,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAA;QAEzD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAA;QAC3C,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,wBAAY,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E,SAAS;YACjB,KAAK;YACL,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM;SACjC,CAAC,CAAA;QAEF,OAAO,CAAC,GAAG,CACT,GAAG,eAAK,CAAC,KAAK,CACZ,SAAS,CACV,uEAAuE,CACzE,CAAA;IACH,CAAC;;AA3EH,kCA4EC"}
|
package/dist/commands/start.js
CHANGED
|
@@ -4,6 +4,7 @@ const core_1 = require("@oclif/core");
|
|
|
4
4
|
const child_process_1 = require("child_process");
|
|
5
5
|
const fs_extra_1 = require("fs-extra");
|
|
6
6
|
const directory_1 = require("../utils/directory");
|
|
7
|
+
const commands_1 = require("../utils/commands");
|
|
7
8
|
class Start extends core_1.Command {
|
|
8
9
|
static args = [
|
|
9
10
|
{
|
|
@@ -15,10 +16,11 @@ class Start extends core_1.Command {
|
|
|
15
16
|
const { args } = await this.parse(Start);
|
|
16
17
|
const basePath = args.path ?? process.cwd();
|
|
17
18
|
const { tmpDir } = (0, directory_1.withBasePath)(basePath);
|
|
19
|
+
const packageManager = (0, commands_1.getPreferredPackageManager)();
|
|
18
20
|
if (!(0, fs_extra_1.existsSync)(tmpDir)) {
|
|
19
21
|
throw Error('The ".faststore" directory could not be found. If you are trying to serve your store, run "faststore build" first.');
|
|
20
22
|
}
|
|
21
|
-
return (0, child_process_1.spawn)(
|
|
23
|
+
return (0, child_process_1.spawn)(`${packageManager} run serve`, {
|
|
22
24
|
shell: true,
|
|
23
25
|
cwd: tmpDir,
|
|
24
26
|
stdio: 'inherit',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":";;AAAA,sCAAqC;AACrC,iDAAqC;AACrC,uCAAqC;AACrC,kDAAiD;
|
|
1
|
+
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":";;AAAA,sCAAqC;AACrC,iDAAqC;AACrC,uCAAqC;AACrC,kDAAiD;AACjD,gDAA8D;AAE9D,MAAqB,KAAM,SAAQ,cAAO;IACxC,MAAM,CAAC,IAAI,GAAG;QACZ;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,6DAA6D;SAC3E;KACF,CAAA;IAED,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QACxC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAA;QAC3C,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,wBAAY,EAAC,QAAQ,CAAC,CAAA;QACzC,MAAM,cAAc,GAAG,IAAA,qCAA0B,GAAE,CAAA;QAEnD,IAAI,CAAC,IAAA,qBAAU,EAAC,MAAM,CAAC,EAAE;YACvB,MAAM,KAAK,CACT,oHAAoH,CACrH,CAAA;SACF;QAED,OAAO,IAAA,qBAAK,EAAC,GAAG,cAAc,YAAY,EAAE;YAC1C,KAAK,EAAE,IAAI;YACX,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,SAAS;SACjB,CAAC,CAAA;IACJ,CAAC;;AAzBH,wBA0BC"}
|
package/dist/commands/test.js
CHANGED
|
@@ -6,6 +6,7 @@ const child_process_1 = require("child_process");
|
|
|
6
6
|
const chokidar_1 = tslib_1.__importDefault(require("chokidar"));
|
|
7
7
|
const generate_1 = require("../utils/generate");
|
|
8
8
|
const directory_1 = require("../utils/directory");
|
|
9
|
+
const commands_1 = require("../utils/commands");
|
|
9
10
|
/**
|
|
10
11
|
* Taken from toolbelt
|
|
11
12
|
*
|
|
@@ -26,7 +27,8 @@ const defaultIgnored = [
|
|
|
26
27
|
];
|
|
27
28
|
const testAbortController = new AbortController();
|
|
28
29
|
async function storeTest(tmpDir) {
|
|
29
|
-
const
|
|
30
|
+
const packageManager = (0, commands_1.getPreferredPackageManager)();
|
|
31
|
+
const testProcess = (0, child_process_1.spawn)(`${packageManager} run test:e2e`, {
|
|
30
32
|
shell: true,
|
|
31
33
|
cwd: tmpDir,
|
|
32
34
|
signal: testAbortController.signal,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/commands/test.ts"],"names":[],"mappings":";;;AAAA,sCAAqC;AACrC,iDAAqC;AACrC,gEAA+B;AAE/B,gDAA4C;AAC5C,kDAAiD;
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/commands/test.ts"],"names":[],"mappings":";;;AAAA,sCAAqC;AACrC,iDAAqC;AACrC,gEAA+B;AAE/B,gDAA4C;AAC5C,kDAAiD;AACjD,gDAA8D;AAE9D;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAA;AAEpE,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;AAEtC,MAAM,cAAc,GAAG;IACrB,WAAW;IACX,WAAW;IACX,YAAY;IACZ,cAAc;IACd,iBAAiB;IACjB,oBAAoB;IACpB,SAAS;IACT,eAAe;IACf,kBAAkB;CACnB,CAAA;AAED,MAAM,mBAAmB,GAAG,IAAI,eAAe,EAAE,CAAA;AAEjD,KAAK,UAAU,SAAS,CAAC,MAAc;IACrC,MAAM,cAAc,GAAG,IAAA,qCAA0B,GAAE,CAAA;IAEnD,MAAM,WAAW,GAAG,IAAA,qBAAK,EAAC,GAAG,cAAc,eAAe,EAAE;QAC1D,KAAK,EAAE,IAAI;QACX,GAAG,EAAE,MAAM;QACX,MAAM,EAAE,mBAAmB,CAAC,MAAM;QAClC,KAAK,EAAE,SAAS;KACjB,CAAC,CAAA;IAEF,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;QAC3B,mBAAmB,CAAC,KAAK,EAAE,CAAA;IAC7B,CAAC,CAAC,CAAA;AACJ,CAAC;AAED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,CAAA;QACzB,CAAC,CAAC,CAAA;IACJ,CAAC;;AAzCH,uBA0CC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { default as Dev } from './commands/dev';
|
|
|
4
4
|
import { default as Build } from './commands/build';
|
|
5
5
|
import { default as Serve } from './commands/start';
|
|
6
6
|
import { default as CmsSync } from './commands/cms-sync';
|
|
7
|
-
import { default as GenerateGraphql } from './commands/generate-graphql';
|
|
8
7
|
import { default as Test } from './commands/test';
|
|
9
8
|
export declare const commands: {
|
|
10
9
|
init: typeof Init;
|
|
@@ -12,6 +11,5 @@ export declare const commands: {
|
|
|
12
11
|
build: typeof Build;
|
|
13
12
|
serve: typeof Serve;
|
|
14
13
|
'cms-sync': typeof CmsSync;
|
|
15
|
-
'generate-graphql': typeof GenerateGraphql;
|
|
16
14
|
test: typeof Test;
|
|
17
15
|
};
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,6 @@ const dev_1 = tslib_1.__importDefault(require("./commands/dev"));
|
|
|
9
9
|
const build_1 = tslib_1.__importDefault(require("./commands/build"));
|
|
10
10
|
const start_1 = tslib_1.__importDefault(require("./commands/start"));
|
|
11
11
|
const cms_sync_1 = tslib_1.__importDefault(require("./commands/cms-sync"));
|
|
12
|
-
const generate_graphql_1 = tslib_1.__importDefault(require("./commands/generate-graphql"));
|
|
13
12
|
const test_1 = tslib_1.__importDefault(require("./commands/test"));
|
|
14
13
|
exports.commands = {
|
|
15
14
|
init: init_1.default,
|
|
@@ -17,7 +16,6 @@ exports.commands = {
|
|
|
17
16
|
build: build_1.default,
|
|
18
17
|
serve: start_1.default,
|
|
19
18
|
'cms-sync': cms_sync_1.default,
|
|
20
|
-
'generate-graphql': generate_graphql_1.default,
|
|
21
19
|
test: test_1.default,
|
|
22
20
|
};
|
|
23
21
|
//# sourceMappingURL=index.js.map
|
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,mEAAiD;AACjD,iEAA+C;AAC/C,qEAAmD;AACnD,qEAAmD;AACnD,2EAAwD;AACxD,
|
|
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,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,IAAI,EAAE,cAAI;CACX,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getPreferredPackageManager(): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPreferredPackageManager = void 0;
|
|
4
|
+
const node_child_process_1 = require("node:child_process");
|
|
5
|
+
// Retrieves the package manager based on the developer lockfile, using `ni`.
|
|
6
|
+
function getPreferredPackageManager() {
|
|
7
|
+
const agent = (0, node_child_process_1.spawnSync)("na", ['\?'], { encoding: 'utf8' }).stdout.trim();
|
|
8
|
+
return agent;
|
|
9
|
+
}
|
|
10
|
+
exports.getPreferredPackageManager = getPreferredPackageManager;
|
|
11
|
+
//# sourceMappingURL=commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/utils/commands.ts"],"names":[],"mappings":";;;AAAA,2DAA8C;AAE9C,6EAA6E;AAC7E,SAAgB,0BAA0B;IACxC,MAAM,KAAK,GAAG,IAAA,8BAAS,EAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;IAEzE,OAAO,KAAK,CAAA;AACd,CAAC;AAJD,gEAIC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"3.0.
|
|
1
|
+
{"version":"3.0.88","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.88",
|
|
4
4
|
"description": "FastStore CLI",
|
|
5
5
|
"author": "Emerson Laurentino @emersonlaurentino",
|
|
6
6
|
"bin": {
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
"/oclif.manifest.json"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
+
"@antfu/ni": "^0.21.12",
|
|
21
|
+
"@faststore/core": "^3.0.88",
|
|
20
22
|
"@inquirer/prompts": "^5.1.2",
|
|
21
23
|
"@oclif/core": "^1.16.4",
|
|
22
24
|
"@oclif/plugin-help": "^5",
|
|
@@ -29,8 +31,8 @@
|
|
|
29
31
|
"path": "^0.12.7"
|
|
30
32
|
},
|
|
31
33
|
"devDependencies": {
|
|
32
|
-
"@faststore/eslint-config": "^3.0.
|
|
33
|
-
"@faststore/shared": "^3.0.
|
|
34
|
+
"@faststore/eslint-config": "^3.0.88",
|
|
35
|
+
"@faststore/shared": "^3.0.88",
|
|
34
36
|
"@types/chai": "^4",
|
|
35
37
|
"@types/degit": "^2.8.6",
|
|
36
38
|
"@types/fs-extra": "^9.0.13",
|
|
@@ -63,8 +65,8 @@
|
|
|
63
65
|
"lint": "eslint src/**/*.ts",
|
|
64
66
|
"test": "jest src/**/*.test.ts",
|
|
65
67
|
"postpack": "shx rm -f oclif.manifest.json",
|
|
66
|
-
"posttest": "
|
|
67
|
-
"prepack": "
|
|
68
|
+
"posttest": "na run lint",
|
|
69
|
+
"prepack": "na run && oclif manifest && oclif readme",
|
|
68
70
|
"version": "oclif readme && git add README.md"
|
|
69
71
|
},
|
|
70
72
|
"bugs": "https://github.com/vtex/faststore/issues",
|
|
@@ -72,5 +74,5 @@
|
|
|
72
74
|
"oclif"
|
|
73
75
|
],
|
|
74
76
|
"types": "dist/index.d.ts",
|
|
75
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "31a958b995b2477f5c15b0b7dd8ec522e47629d9"
|
|
76
78
|
}
|