@faststore/cli 2.1.82 → 2.2.0-alpha.1

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 CHANGED
@@ -1,29 +1,34 @@
1
- FastStore CLI
2
- =================
1
+ # FastStore CLI
3
2
 
4
3
  <!-- toc -->
4
+ * [FastStore CLI](#faststore-cli)
5
5
  * [Usage](#usage)
6
6
  * [Commands](#commands)
7
7
  <!-- tocstop -->
8
+
8
9
  # Usage
10
+
9
11
  <!-- usage -->
10
12
  ```sh-session
11
13
  $ npm install -g @faststore/cli
12
14
  $ faststore COMMAND
13
15
  running command...
14
16
  $ faststore (--version)
15
- @faststore/cli/2.1.82 linux-x64 node-v16.20.2
17
+ @faststore/cli/2.2.0-alpha.1 linux-x64 node-v16.20.2
16
18
  $ faststore --help [COMMAND]
17
19
  USAGE
18
20
  $ faststore COMMAND
19
21
  ...
20
22
  ```
21
23
  <!-- usagestop -->
24
+
22
25
  # Commands
26
+
23
27
  <!-- commands -->
24
28
  * [`faststore build`](#faststore-build)
25
29
  * [`faststore cms-sync`](#faststore-cms-sync)
26
30
  * [`faststore dev`](#faststore-dev)
31
+ * [`faststore generate-graphql`](#faststore-generate-graphql)
27
32
  * [`faststore help [COMMAND]`](#faststore-help-command)
28
33
  * [`faststore start`](#faststore-start)
29
34
 
@@ -34,7 +39,7 @@ USAGE
34
39
  $ faststore build
35
40
  ```
36
41
 
37
- _See code: [dist/commands/build.ts](https://github.com/vtex/faststore/blob/v2.1.82/dist/commands/build.ts)_
42
+ _See code: [dist/commands/build.ts](https://github.com/vtex/faststore/blob/v2.2.0-alpha.1/dist/commands/build.ts)_
38
43
 
39
44
  ## `faststore cms-sync`
40
45
 
@@ -43,7 +48,7 @@ USAGE
43
48
  $ faststore cms-sync
44
49
  ```
45
50
 
46
- _See code: [dist/commands/cms-sync.ts](https://github.com/vtex/faststore/blob/v2.1.82/dist/commands/cms-sync.ts)_
51
+ _See code: [dist/commands/cms-sync.ts](https://github.com/vtex/faststore/blob/v2.2.0-alpha.1/dist/commands/cms-sync.ts)_
47
52
 
48
53
  ## `faststore dev`
49
54
 
@@ -52,7 +57,19 @@ USAGE
52
57
  $ faststore dev
53
58
  ```
54
59
 
55
- _See code: [dist/commands/dev.ts](https://github.com/vtex/faststore/blob/v2.1.82/dist/commands/dev.ts)_
60
+ _See code: [dist/commands/dev.ts](https://github.com/vtex/faststore/blob/v2.2.0-alpha.1/dist/commands/dev.ts)_
61
+
62
+ ## `faststore generate-graphql`
63
+
64
+ ```
65
+ USAGE
66
+ $ faststore generate-graphql [-d]
67
+
68
+ FLAGS
69
+ -d, --debug
70
+ ```
71
+
72
+ _See code: [dist/commands/generate-graphql.ts](https://github.com/vtex/faststore/blob/v2.2.0-alpha.1/dist/commands/generate-graphql.ts)_
56
73
 
57
74
  ## `faststore help [COMMAND]`
58
75
 
@@ -81,5 +98,5 @@ USAGE
81
98
  $ faststore start
82
99
  ```
83
100
 
84
- _See code: [dist/commands/start.ts](https://github.com/vtex/faststore/blob/v2.1.82/dist/commands/start.ts)_
101
+ _See code: [dist/commands/start.ts](https://github.com/vtex/faststore/blob/v2.2.0-alpha.1/dist/commands/start.ts)_
85
102
  <!-- commandsstop -->
@@ -0,0 +1,8 @@
1
+ /// <reference types="node" />
2
+ import { Command } from '@oclif/core';
3
+ export default class GenerateGraphql extends Command {
4
+ static flags: {
5
+ debug: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
6
+ };
7
+ run(): Promise<import("child_process").ChildProcess>;
8
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const child_process_1 = require("child_process");
5
+ const fs_extra_1 = require("fs-extra");
6
+ const directory_1 = require("../utils/directory");
7
+ class GenerateGraphql extends core_1.Command {
8
+ static flags = {
9
+ debug: core_1.Flags.boolean({ char: 'd' }),
10
+ };
11
+ async run() {
12
+ if (!(0, fs_extra_1.existsSync)(directory_1.tmpDir)) {
13
+ throw Error('The ".faststore" directory could not be found. When running faststore dev or faststore build, the generate-graphql command is automatically executed.');
14
+ }
15
+ const { flags } = await this.parse(GenerateGraphql);
16
+ return (0, child_process_1.spawn)(`yarn generate${flags.debug ? ' --debug' : ''}`, {
17
+ shell: true,
18
+ cwd: directory_1.tmpDir,
19
+ stdio: 'inherit',
20
+ });
21
+ }
22
+ }
23
+ exports.default = GenerateGraphql;
24
+ //# sourceMappingURL=generate-graphql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-graphql.js","sourceRoot":"","sources":["../../src/commands/generate-graphql.ts"],"names":[],"mappings":";;AAAA,sCAA4C;AAC5C,iDAAqC;AACrC,uCAAqC;AACrC,kDAA2C;AAE3C,MAAqB,eAAgB,SAAQ,cAAO;IAClD,MAAM,CAAC,KAAK,GAAG;QACb,KAAK,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;KACpC,CAAA;IAED,KAAK,CAAC,GAAG;QACP,IAAI,CAAC,IAAA,qBAAU,EAAC,kBAAM,CAAC,EAAE;YACvB,MAAM,KAAK,CACT,uJAAuJ,CACxJ,CAAA;SACF;QAED,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAA;QAEnD,OAAO,IAAA,qBAAK,EAAC,gBAAgB,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE;YAC5D,KAAK,EAAE,IAAI;YACX,GAAG,EAAE,kBAAM;YACX,KAAK,EAAE,SAAS;SACjB,CAAC,CAAA;IACJ,CAAC;;AAnBH,kCAoBC"}
@@ -1 +1 @@
1
- {"version":"2.1.82","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":[]},"start":{"id":"start","strict":true,"pluginName":"@faststore/cli","pluginAlias":"@faststore/cli","pluginType":"core","aliases":[],"flags":{},"args":[]}}}
1
+ {"version":"2.2.0-alpha.1","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}},"args":[]},"start":{"id":"start","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": "2.1.82",
3
+ "version": "2.2.0-alpha.1",
4
4
  "description": "FastStore CLI",
5
5
  "author": "Emerson Laurentino @emersonlaurentino",
6
6
  "bin": {
@@ -28,8 +28,8 @@
28
28
  "stringify-object": "^3.3.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@faststore/eslint-config": "^2.1.82",
32
- "@faststore/shared": "^2.1.82",
31
+ "@faststore/eslint-config": "^2.2.0-alpha.1",
32
+ "@faststore/shared": "^2.2.0-alpha.1",
33
33
  "@types/chai": "^4",
34
34
  "@types/fs-extra": "^9.0.13",
35
35
  "@types/node": "^16.11.63",
@@ -69,5 +69,5 @@
69
69
  "oclif"
70
70
  ],
71
71
  "types": "dist/index.d.ts",
72
- "gitHead": "b7c1d2b96c5172b14c841cc44fc8431efc271697"
72
+ "gitHead": "6eff908883fa54cb72d548b12a610490df833804"
73
73
  }