@hubspot/cms-dev-server 0.15.12 → 0.15.14
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 +32 -3
- package/package.json +3 -3
- package/types/island-runtime.d.ts +0 -2
package/dist/run.js
CHANGED
|
@@ -1047,7 +1047,7 @@ function trackUsage(action) {
|
|
|
1047
1047
|
eventName: EVENT_NAME,
|
|
1048
1048
|
action,
|
|
1049
1049
|
nodeVersion: getNodeVersionData(),
|
|
1050
|
-
version: "0.15.
|
|
1050
|
+
version: "0.15.14",
|
|
1051
1051
|
os: getPlatform()
|
|
1052
1052
|
};
|
|
1053
1053
|
const uri = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
|
|
@@ -3083,6 +3083,35 @@ function logMissingScopeWarning(error) {
|
|
|
3083
3083
|
function isMissingScopeError(error) {
|
|
3084
3084
|
return error.statusCode === 403 && (error.error.message.match(OAUTH_ERROR_REGEX) || error.error.message.startsWith(NOT_PUBLIC_USE_ERROR));
|
|
3085
3085
|
}
|
|
3086
|
+
function handleSecretsError(error) {
|
|
3087
|
+
if (error && error.statusCode && error.error) {
|
|
3088
|
+
const { statusCode, error: errorDetails } = error;
|
|
3089
|
+
if ((errorDetails == null ? void 0 : errorDetails.category) === "MISSING_SCOPES") {
|
|
3090
|
+
console.log(
|
|
3091
|
+
"\nMissing scopes for secrets.",
|
|
3092
|
+
"\nSecrets require Serverless functions which are scoped to Enterprise portals.\n"
|
|
3093
|
+
);
|
|
3094
|
+
} else {
|
|
3095
|
+
console.error(`Error ${statusCode}: ${errorDetails.message}`);
|
|
3096
|
+
if (errorDetails.correlationId) {
|
|
3097
|
+
console.error(`Correlation ID: ${errorDetails.correlationId}`);
|
|
3098
|
+
}
|
|
3099
|
+
if (errorDetails.category) {
|
|
3100
|
+
console.error(`Category: ${errorDetails.category}`);
|
|
3101
|
+
}
|
|
3102
|
+
if (errorDetails.links) {
|
|
3103
|
+
if (errorDetails.links.support) {
|
|
3104
|
+
console.error(`Support URL: ${errorDetails.links.support}`);
|
|
3105
|
+
}
|
|
3106
|
+
if (errorDetails.links.forum) {
|
|
3107
|
+
console.error(`Forum URL: ${errorDetails.links.forum}`);
|
|
3108
|
+
}
|
|
3109
|
+
}
|
|
3110
|
+
}
|
|
3111
|
+
} else {
|
|
3112
|
+
console.error("Unexpected error structure:", error);
|
|
3113
|
+
}
|
|
3114
|
+
}
|
|
3086
3115
|
|
|
3087
3116
|
// src/proxyPage/fetchDomains.ts
|
|
3088
3117
|
async function fetchDomains(portalId) {
|
|
@@ -3617,8 +3646,8 @@ async function createDevServer(webRoot2, storybook2, hubspotCliConfigPathOption2
|
|
|
3617
3646
|
);
|
|
3618
3647
|
}
|
|
3619
3648
|
}
|
|
3620
|
-
} catch (
|
|
3621
|
-
|
|
3649
|
+
} catch (error) {
|
|
3650
|
+
handleSecretsError(error);
|
|
3622
3651
|
}
|
|
3623
3652
|
} else {
|
|
3624
3653
|
console.warn(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/cms-dev-server",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.14",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@hubspot/cli-lib": "^3.0.12",
|
|
29
|
-
"@hubspot/cms-components": "^0.15.
|
|
29
|
+
"@hubspot/cms-components": "^0.15.14",
|
|
30
30
|
"@inquirer/select": "^2.0.0",
|
|
31
31
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
32
32
|
"@storybook/addon-actions": "7.1.1",
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
"publishConfig": {
|
|
109
109
|
"access": "public"
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "91d840fcf23f9b175bd8155dd1e2d2a31cb3fbef"
|
|
112
112
|
}
|