@hubspot/cms-dev-server 0.9.0 → 0.10.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/dist/run.js CHANGED
@@ -2,11 +2,55 @@
2
2
 
3
3
  // src/lib/cli.ts
4
4
  import { resolve } from "path";
5
+
6
+ // src/lib/logColors.ts
7
+ var CONTROL_CHARACTER = "\x1B";
8
+ var DEFAULT_SCHEME = "[0m";
9
+ var ForeGroudANSIColorMap = {
10
+ black: 30,
11
+ red: 31,
12
+ green: 32,
13
+ yellow: 33,
14
+ blue: 34,
15
+ magenta: 35,
16
+ cyan: 36,
17
+ white: 37
18
+ };
19
+ function wrapMessageInColor(color, message) {
20
+ return `${CONTROL_CHARACTER}[${ForeGroudANSIColorMap[color]}m${message}${CONTROL_CHARACTER}${DEFAULT_SCHEME}`;
21
+ }
22
+
23
+ // src/lib/cli.ts
24
+ function printHelpMessage() {
25
+ console.log(`
26
+ HubSpot CMS Dev Server
27
+
28
+ Usage: hs-cms-dev-server <path> [options]
29
+
30
+ Mandatory:
31
+ <path> Path to the directory containing your assets.
32
+
33
+ Options:
34
+ -c, --config Path to alternate hubspot.config.yaml configuration.
35
+ -a, --account The account name or id to use for the dev server.
36
+ --ssl Enables SSL for the dev server, serving it over an https:// URL.
37
+ --storybook Launches a Storybook dev server.
38
+
39
+ For more information on HubSpot CMS JS Rendering, visit:
40
+ ${wrapMessageInColor(
41
+ "cyan",
42
+ "https://github.hubspot.com/cms-js-building-block-examples/"
43
+ )}`);
44
+ }
5
45
  function getDevServerCommandLineOptions(argv) {
6
46
  const args = [...argv];
7
47
  const webRoot2 = args[2];
8
48
  let hubspotCliConfigPathOption2;
9
49
  let hubspotCliAccountNameOption2;
50
+ if (args.length == 2 || args.includes("help") || args.includes("--help")) {
51
+ printHelpMessage();
52
+ process.exit(0);
53
+ }
10
54
  const configOptionIndex = args.findIndex(
11
55
  (arg) => arg === "-c" || arg === "--config"
12
56
  );
@@ -2384,23 +2428,6 @@ async function fetchWebsiteDomainNames(portalId) {
2384
2428
  return domainNames;
2385
2429
  }
2386
2430
 
2387
- // src/lib/logColors.ts
2388
- var CONTROL_CHARACTER = "\x1B";
2389
- var DEFAULT_SCHEME = "[0m";
2390
- var ForeGroudANSIColorMap = {
2391
- black: 30,
2392
- red: 31,
2393
- green: 32,
2394
- yellow: 33,
2395
- blue: 34,
2396
- megenta: 35,
2397
- cyan: 36,
2398
- white: 37
2399
- };
2400
- function wrapMessageInColor(color, message) {
2401
- return `${CONTROL_CHARACTER}[${ForeGroudANSIColorMap[color]}m${message}${CONTROL_CHARACTER}${DEFAULT_SCHEME}`;
2402
- }
2403
-
2404
2431
  // src/createDevServer.ts
2405
2432
  var BASE_PATH = "/";
2406
2433
  var PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : 3e3;
@@ -2444,7 +2471,7 @@ async function createDevServer(webRoot2, storybook2, hubspotCliConfigPathOption2
2444
2471
  );
2445
2472
  } catch (e) {
2446
2473
  console.warn(
2447
- `Unable to get gating information. gated features will not be availalbe in the local dev server`
2474
+ `Unable to get gating information. Gated features will not be available in the local dev server.`
2448
2475
  );
2449
2476
  }
2450
2477
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cms-dev-server",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "engines": {
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@hubspot/cli-lib": "^3.0.12",
28
- "@hubspot/cms-components": "^0.9.0",
28
+ "@hubspot/cms-components": "^0.10.0",
29
29
  "@originjs/vite-plugin-commonjs": "^1.0.3",
30
30
  "@storybook/addon-actions": "7.0.7",
31
31
  "@storybook/addon-essentials": "7.0.7",
@@ -101,5 +101,5 @@
101
101
  "publishConfig": {
102
102
  "access": "public"
103
103
  },
104
- "gitHead": "f57bf5f6b7984a619c6e5c1b80d4e51fe636a9a7"
104
+ "gitHead": "33530a6ecbfd2c6c3ff53dc17d1172f2cd780da8"
105
105
  }
Binary file
@@ -1,2 +0,0 @@
1
- import { Alias } from 'vite';
2
- export default function generateBpmAliases(webRoot: string): Alias[];
@@ -1,3 +0,0 @@
1
- import { Plugin } from 'vite';
2
- declare const noNodeBuiltinsPlugin: () => Plugin;
3
- export default noNodeBuiltinsPlugin;
@@ -1,2 +0,0 @@
1
- import { Plugin } from 'vite';
2
- export default function devSecretsPlugin(secretNames: Array<string>): Plugin;
@@ -1,2 +0,0 @@
1
- import { Plugin } from 'vite';
2
- export default function resolveSharedDeps(): Plugin | null;