@hubspot/local-dev-lib 0.3.5 → 0.3.7

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.
@@ -75,12 +75,12 @@ exports.validateSrcAndDestPaths = validateSrcAndDestPaths;
75
75
  const MODULE_STRING_TRANSFORMATIONS = [
76
76
  {
77
77
  regex: /\/\* import global styles \*\//g,
78
- string: 'import "./global-samplejsr.css";',
78
+ string: 'import "./global-sample-react-module.css";',
79
79
  fallback: '',
80
80
  },
81
81
  {
82
82
  regex: /\/\* Default config \*\//g,
83
- string: 'export const defaultModuleConfig = { \n moduleName: "sample_jsr", \n version: 0, \n};',
83
+ string: 'export const defaultModuleConfig = { \n moduleName: "sample_react-module", \n version: 0, \n};',
84
84
  fallback: '',
85
85
  },
86
86
  ];
@@ -152,7 +152,7 @@ async function createModule(moduleDefinition, name, dest, getInternalVersion, op
152
152
  return false;
153
153
  }
154
154
  return true;
155
- case 'global-samplejsr.css':
155
+ case 'global-sample-react-module.css':
156
156
  case 'stories':
157
157
  case 'tests':
158
158
  if (getInternalVersion) {
@@ -1,28 +1,5 @@
1
1
  "use strict";
2
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
26
3
  var __importDefault = (this && this.__importDefault) || function (mod) {
27
4
  return (mod && mod.__esModule) ? mod : { "default": mod };
28
5
  };
@@ -106,10 +83,9 @@ async function fieldsArrayToJson(fields) {
106
83
  * @returns {Promise | undefined} - Returns _default_ exported content if ESM, or exported module content if CJS, or undefined if node version < 13.2 and file is .mjs.
107
84
  */
108
85
  async function dynamicImport(filePath) {
109
- var _a;
110
86
  if (semver_1.default.gte(process.version, '13.2.0')) {
111
- const exported = await (_a = (0, url_1.pathToFileURL)(filePath).toString(), Promise.resolve().then(() => __importStar(require(_a)))).then(content => content.default);
112
- return exported;
87
+ const exported = await new Function(`return import("${(0, url_1.pathToFileURL)(filePath)}")`)();
88
+ return exported.default;
113
89
  }
114
90
  else {
115
91
  if ((0, path_2.getExt)(filePath) == 'mjs') {
package/lib/cms/watch.js CHANGED
@@ -7,7 +7,7 @@ exports.watch = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
8
  const chokidar_1 = __importDefault(require("chokidar"));
9
9
  const p_queue_1 = __importDefault(require("p-queue"));
10
- const debounce_1 = require("debounce");
10
+ const debounce_1 = __importDefault(require("debounce"));
11
11
  const apiErrors_1 = require("../../errors/apiErrors");
12
12
  const handleFieldsJS_1 = require("./handleFieldsJS");
13
13
  const uploadFolder_1 = require("./uploadFolder");
@@ -34,7 +34,7 @@ function _notifyOfThemePreview(filePath, accountId) {
34
34
  previewUrl,
35
35
  }));
36
36
  }
37
- const notifyOfThemePreview = (0, debounce_1.debounce)(_notifyOfThemePreview, 1000);
37
+ const notifyOfThemePreview = (0, debounce_1.default)(_notifyOfThemePreview, 1000);
38
38
  async function uploadFile(accountId, file, dest, options, mode = null) {
39
39
  const src = options.src;
40
40
  const absoluteSrcPath = path_1.default.resolve((0, path_2.getCwd)(), file);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/local-dev-lib",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "Provides library functionality for HubSpot local development tooling, including the HubSpot CLI",
5
5
  "main": "lib/index.js",
6
6
  "repository": {
@@ -64,6 +64,7 @@
64
64
  "chokidar": "^3.5.3",
65
65
  "content-disposition": "^0.5.4",
66
66
  "cors": "^2.8.5",
67
+ "debounce": "^2.0.0",
67
68
  "express": "^4.18.2",
68
69
  "extract-zip": "^2.0.1",
69
70
  "findup-sync": "^5.0.0",