@faststore/cli 1.12.27 → 1.12.32

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/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.12.28](https://github.com/vtex/faststore/compare/v1.12.27...v1.12.28) (2022-11-09)
7
+
8
+
9
+ ### Features
10
+
11
+ * adds start command to serve stores ([#1511](https://github.com/vtex/faststore/issues/1511)) ([9ef30b5](https://github.com/vtex/faststore/commit/9ef30b5e83c3518240d65235c4f84394ab0fc4cd))
12
+
13
+
14
+
6
15
  ## [1.12.27](https://github.com/vtex/faststore/compare/v1.12.26...v1.12.27) (2022-11-09)
7
16
 
8
17
 
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/0.2.0 darwin-arm64 node-v16.18.0
15
+ @faststore/cli/1.12.32 darwin-arm64 node-v16.18.0
16
16
  $ faststore --help [COMMAND]
17
17
  USAGE
18
18
  $ faststore COMMAND
@@ -33,7 +33,7 @@ USAGE
33
33
  $ faststore build
34
34
  ```
35
35
 
36
- _See code: [dist/commands/build.ts](https://github.com/vtex/faststore/blob/v0.2.0/dist/commands/build.ts)_
36
+ _See code: [dist/commands/build.ts](https://github.com/vtex/faststore/blob/v1.12.32/dist/commands/build.ts)_
37
37
 
38
38
  ## `faststore dev`
39
39
 
@@ -42,7 +42,7 @@ USAGE
42
42
  $ faststore dev
43
43
  ```
44
44
 
45
- _See code: [dist/commands/dev.ts](https://github.com/vtex/faststore/blob/v0.2.0/dist/commands/dev.ts)_
45
+ _See code: [dist/commands/dev.ts](https://github.com/vtex/faststore/blob/v1.12.32/dist/commands/dev.ts)_
46
46
 
47
47
  ## `faststore help [COMMAND]`
48
48
 
@@ -71,5 +71,5 @@ USAGE
71
71
  $ faststore start
72
72
  ```
73
73
 
74
- _See code: [dist/commands/start.ts](https://github.com/vtex/faststore/blob/v0.2.0/dist/commands/start.ts)_
74
+ _See code: [dist/commands/start.ts](https://github.com/vtex/faststore/blob/v1.12.32/dist/commands/start.ts)_
75
75
  <!-- commandsstop -->
@@ -1,4 +1,5 @@
1
+ /// <reference types="node" />
1
2
  import { Command } from '@oclif/core';
2
3
  export default class Start extends Command {
3
- run(): Promise<void>;
4
+ run(): Promise<import("child_process").ChildProcess>;
4
5
  }
@@ -1,9 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
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");
4
7
  class Start extends core_1.Command {
5
8
  async run() {
6
- console.log('running start command');
9
+ if (!(0, fs_extra_1.existsSync)(directory_1.tmpDir)) {
10
+ throw Error('The ".faststore" directory could not be found. If you are trying to serve your store, run "faststore build" first.');
11
+ }
12
+ return (0, child_process_1.spawn)(`yarn serve`, {
13
+ shell: true,
14
+ cwd: directory_1.tmpDir,
15
+ stdio: 'inherit',
16
+ });
7
17
  }
8
18
  }
9
19
  exports.default = Start;
@@ -1 +1 @@
1
- {"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":";;AAAA,sCAAqC;AAErC,MAAqB,KAAM,SAAQ,cAAO;IACxC,KAAK,CAAC,GAAG;QACP,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAA;IACtC,CAAC;CACF;AAJD,wBAIC"}
1
+ {"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":";;AAAA,sCAAqC;AACrC,iDAAqC;AACrC,uCAAqC;AACrC,kDAA2C;AAE3C,MAAqB,KAAM,SAAQ,cAAO;IACxC,KAAK,CAAC,GAAG;QACP,IAAI,CAAC,IAAA,qBAAU,EAAC,kBAAM,CAAC,EAAE;YACvB,MAAM,KAAK,CACT,oHAAoH,CACrH,CAAA;SACF;QAED,OAAO,IAAA,qBAAK,EAAC,YAAY,EAAE;YACzB,KAAK,EAAE,IAAI;YACX,GAAG,EAAE,kBAAM;YACX,KAAK,EAAE,SAAS;SACjB,CAAC,CAAA;IACJ,CAAC;CACF;AAdD,wBAcC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/cli",
3
- "version": "1.12.27",
3
+ "version": "1.12.32",
4
4
  "description": "FastStore CLI",
5
5
  "author": "Emerson Laurentino @emersonlaurentino",
6
6
  "bin": {
@@ -26,7 +26,7 @@
26
26
  "path": "^0.12.7"
27
27
  },
28
28
  "devDependencies": {
29
- "@faststore/shared": "^1.12.20",
29
+ "@faststore/shared": "^1.12.32",
30
30
  "@types/chai": "^4",
31
31
  "@types/fs-extra": "^9.0.13",
32
32
  "@types/node": "^16.11.63",
@@ -63,5 +63,5 @@
63
63
  "oclif"
64
64
  ],
65
65
  "types": "dist/index.d.ts",
66
- "gitHead": "706e7cd0212de256f715cc301f94b4f59dccd377"
66
+ "gitHead": "9deb68d7b10560726e2f50841d319590a7249392"
67
67
  }