@faststore/cli 1.12.27 → 1.12.28

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
 
@@ -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.28",
4
4
  "description": "FastStore CLI",
5
5
  "author": "Emerson Laurentino @emersonlaurentino",
6
6
  "bin": {
@@ -63,5 +63,5 @@
63
63
  "oclif"
64
64
  ],
65
65
  "types": "dist/index.d.ts",
66
- "gitHead": "706e7cd0212de256f715cc301f94b4f59dccd377"
66
+ "gitHead": "40fe63fe1e2e5164a46f515fcc49afc0452927a4"
67
67
  }