@faststore/cli 2.1.79 → 2.2.0-alpha.0

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
@@ -12,7 +12,7 @@ $ npm install -g @faststore/cli
12
12
  $ faststore COMMAND
13
13
  running command...
14
14
  $ faststore (--version)
15
- @faststore/cli/2.1.79 linux-x64 node-v16.20.2
15
+ @faststore/cli/2.2.0-alpha.0 linux-x64 node-v16.20.2
16
16
  $ faststore --help [COMMAND]
17
17
  USAGE
18
18
  $ faststore COMMAND
@@ -24,6 +24,7 @@ USAGE
24
24
  * [`faststore build`](#faststore-build)
25
25
  * [`faststore cms-sync`](#faststore-cms-sync)
26
26
  * [`faststore dev`](#faststore-dev)
27
+ * [`faststore generate-graphql`](#faststore-generate-graphql)
27
28
  * [`faststore help [COMMAND]`](#faststore-help-command)
28
29
  * [`faststore start`](#faststore-start)
29
30
 
@@ -34,7 +35,7 @@ USAGE
34
35
  $ faststore build
35
36
  ```
36
37
 
37
- _See code: [dist/commands/build.ts](https://github.com/vtex/faststore/blob/v2.1.79/dist/commands/build.ts)_
38
+ _See code: [dist/commands/build.ts](https://github.com/vtex/faststore/blob/v2.2.0-alpha.0/dist/commands/build.ts)_
38
39
 
39
40
  ## `faststore cms-sync`
40
41
 
@@ -43,7 +44,7 @@ USAGE
43
44
  $ faststore cms-sync
44
45
  ```
45
46
 
46
- _See code: [dist/commands/cms-sync.ts](https://github.com/vtex/faststore/blob/v2.1.79/dist/commands/cms-sync.ts)_
47
+ _See code: [dist/commands/cms-sync.ts](https://github.com/vtex/faststore/blob/v2.2.0-alpha.0/dist/commands/cms-sync.ts)_
47
48
 
48
49
  ## `faststore dev`
49
50
 
@@ -52,7 +53,19 @@ USAGE
52
53
  $ faststore dev
53
54
  ```
54
55
 
55
- _See code: [dist/commands/dev.ts](https://github.com/vtex/faststore/blob/v2.1.79/dist/commands/dev.ts)_
56
+ _See code: [dist/commands/dev.ts](https://github.com/vtex/faststore/blob/v2.2.0-alpha.0/dist/commands/dev.ts)_
57
+
58
+ ## `faststore generate-graphql`
59
+
60
+ ```
61
+ USAGE
62
+ $ faststore generate-graphql [-d]
63
+
64
+ FLAGS
65
+ -d, --debug
66
+ ```
67
+
68
+ _See code: [dist/commands/generate-graphql.ts](https://github.com/vtex/faststore/blob/v2.2.0-alpha.0/dist/commands/generate-graphql.ts)_
56
69
 
57
70
  ## `faststore help [COMMAND]`
58
71
 
@@ -81,5 +94,5 @@ USAGE
81
94
  $ faststore start
82
95
  ```
83
96
 
84
- _See code: [dist/commands/start.ts](https://github.com/vtex/faststore/blob/v2.1.79/dist/commands/start.ts)_
97
+ _See code: [dist/commands/start.ts](https://github.com/vtex/faststore/blob/v2.2.0-alpha.0/dist/commands/start.ts)_
85
98
  <!-- 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.79","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.0","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.79",
3
+ "version": "2.2.0-alpha.0",
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.78",
32
- "@faststore/shared": "^2.1.78",
31
+ "@faststore/eslint-config": "^2.2.0-alpha.0",
32
+ "@faststore/shared": "^2.2.0-alpha.0",
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": "c1bf4b2dce704aea0bf7fd46a9b8e2c990de8ba2"
72
+ "gitHead": "356e52b6eae13cc4000c6915985009d45e7ae0c6"
73
73
  }