@hubspot/local-dev-lib 0.3.5 → 0.3.6
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/lib/cms/modules.js +3 -3
- package/lib/cms/processFieldsJs.js +2 -26
- package/package.json +1 -1
package/lib/cms/modules.js
CHANGED
|
@@ -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-
|
|
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: "
|
|
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-
|
|
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 (
|
|
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/package.json
CHANGED