@hubspot/cms-dev-server 1.2.38 → 1.2.40
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/.DS_Store +0 -0
- package/dist/index.js +3 -5
- package/dist/run.js +3 -5
- package/package.json +4 -4
- package/types/lib/debugAuth.d.ts +2 -0
- package/types/lib/localComponentsLoader.d.ts +2 -0
- package/types/lib/viteAssetHandler.d.ts +15 -0
- package/types/plugins/hubspotStaticAssetPlugin.d.ts +2 -0
- package/types/plugins/remoteAssetsPlugin.d.ts +7 -0
- package/types/plugins/requestSigningPlugin.d.ts +6 -0
- package/types/routes/createAppServerRoutes.d.ts +5 -0
- package/types/routes/homeRouteHandler.d.ts +3 -0
package/dist/.DS_Store
ADDED
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -1642,7 +1642,7 @@ function trackUsage(action) {
|
|
|
1642
1642
|
eventName: EVENT_NAME,
|
|
1643
1643
|
action,
|
|
1644
1644
|
nodeVersion: getNodeVersionData(),
|
|
1645
|
-
version: "1.2.
|
|
1645
|
+
version: "1.2.40",
|
|
1646
1646
|
os: getPlatform()
|
|
1647
1647
|
};
|
|
1648
1648
|
const url3 = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
|
|
@@ -4828,7 +4828,7 @@ function createHttpsRedirectingServer(opts, handler) {
|
|
|
4828
4828
|
}
|
|
4829
4829
|
|
|
4830
4830
|
// src/lib/getJSRenderingGates.ts
|
|
4831
|
-
import {
|
|
4831
|
+
import { getAccessToken } from "@hubspot/local-dev-lib/personalAccessKey";
|
|
4832
4832
|
|
|
4833
4833
|
// src/lib/gates.ts
|
|
4834
4834
|
function getGatesFromEnv() {
|
|
@@ -4846,9 +4846,7 @@ var mapEnabledFeaturesToGates = (enabledFeatures) => {
|
|
|
4846
4846
|
}, []);
|
|
4847
4847
|
};
|
|
4848
4848
|
async function getJsRenderingGates(portalId, env2, personalAccessKey) {
|
|
4849
|
-
const {
|
|
4850
|
-
data: { enabledFeatures }
|
|
4851
|
-
} = await fetchAccessToken(personalAccessKey, env2, portalId);
|
|
4849
|
+
const { enabledFeatures } = await getAccessToken(personalAccessKey, env2, portalId);
|
|
4852
4850
|
const envGates = getGatesFromEnv();
|
|
4853
4851
|
const gates = mapEnabledFeaturesToGates(enabledFeatures);
|
|
4854
4852
|
const mergedGates = [...envGates, ...gates];
|
package/dist/run.js
CHANGED
|
@@ -2249,7 +2249,7 @@ function trackUsage(action) {
|
|
|
2249
2249
|
eventName: EVENT_NAME,
|
|
2250
2250
|
action,
|
|
2251
2251
|
nodeVersion: getNodeVersionData(),
|
|
2252
|
-
version: "1.2.
|
|
2252
|
+
version: "1.2.40",
|
|
2253
2253
|
os: getPlatform()
|
|
2254
2254
|
};
|
|
2255
2255
|
const url3 = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
|
|
@@ -5652,7 +5652,7 @@ function createHttpsRedirectingServer(opts, handler) {
|
|
|
5652
5652
|
}
|
|
5653
5653
|
|
|
5654
5654
|
// src/lib/getJSRenderingGates.ts
|
|
5655
|
-
import {
|
|
5655
|
+
import { getAccessToken } from "@hubspot/local-dev-lib/personalAccessKey";
|
|
5656
5656
|
|
|
5657
5657
|
// src/lib/gates.ts
|
|
5658
5658
|
function getGatesFromEnv() {
|
|
@@ -5670,9 +5670,7 @@ var mapEnabledFeaturesToGates = (enabledFeatures) => {
|
|
|
5670
5670
|
}, []);
|
|
5671
5671
|
};
|
|
5672
5672
|
async function getJsRenderingGates(portalId, env2, personalAccessKey) {
|
|
5673
|
-
const {
|
|
5674
|
-
data: { enabledFeatures }
|
|
5675
|
-
} = await fetchAccessToken(personalAccessKey, env2, portalId);
|
|
5673
|
+
const { enabledFeatures } = await getAccessToken(personalAccessKey, env2, portalId);
|
|
5676
5674
|
const envGates = getGatesFromEnv();
|
|
5677
5675
|
const gates = mapEnabledFeaturesToGates(enabledFeatures);
|
|
5678
5676
|
const mergedGates = [...envGates, ...gates];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/cms-dev-server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.40",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@babel/parser": "^7.25.3",
|
|
30
30
|
"@babel/traverse": "^7.25.3",
|
|
31
31
|
"@babel/types": "^7.25.2",
|
|
32
|
-
"@hubspot/cms-components": "^1.2.
|
|
33
|
-
"@hubspot/local-dev-lib": "
|
|
32
|
+
"@hubspot/cms-components": "^1.2.40",
|
|
33
|
+
"@hubspot/local-dev-lib": "5.8.2",
|
|
34
34
|
"@inquirer/select": "^2.0.0",
|
|
35
35
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
36
36
|
"@radix-ui/react-dialog": "^1.1.2",
|
|
@@ -133,5 +133,5 @@
|
|
|
133
133
|
"publishConfig": {
|
|
134
134
|
"access": "public"
|
|
135
135
|
},
|
|
136
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "a395f0fb51be6ccf9773c7c1e2ce5bc4c42a14f2"
|
|
137
137
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ViteDevServer } from 'vite';
|
|
2
|
+
/**
|
|
3
|
+
* Processes HTML to find remote assets and replace with Vite-managed URLs
|
|
4
|
+
*/
|
|
5
|
+
export declare function processRemoteAssets(html: string, viteServer: ViteDevServer): Promise<string>;
|
|
6
|
+
/**
|
|
7
|
+
* Vite plugin to handle remote assets
|
|
8
|
+
*/
|
|
9
|
+
export declare function remoteAssetsPlugin(): {
|
|
10
|
+
name: string;
|
|
11
|
+
apply: "serve";
|
|
12
|
+
configResolved(config: any): void;
|
|
13
|
+
resolveId(id: string): string;
|
|
14
|
+
load(id: string): Promise<string>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Request, Response, NextFunction } from 'express';
|
|
2
|
+
export declare function handleGetModulePages(req: Request, res: Response, next: NextFunction): Promise<Response<any, Record<string, any>>>;
|
|
3
|
+
export declare function handleOpenFile(req: Request, res: Response, next: NextFunction): Response<any, Record<string, any>>;
|
|
4
|
+
export declare function createAppServerRoutes(): import("express-serve-static-core").Router;
|
|
5
|
+
export default createAppServerRoutes;
|