@hubspot/app-connect-sdk 1.0.0-alpha.8 → 1.0.0-alpha.9
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/app-connect-sdk",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.9",
|
|
4
4
|
"description": "HubSpot App Connect SDK (alpha release). Documentation and integration guidance forthcoming.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"tsdown": "0.22.0-beta.3",
|
|
45
45
|
"typescript": "6.0.3",
|
|
46
46
|
"vitest": "4.0.18",
|
|
47
|
+
"@private/eslint-config": "0.1.0",
|
|
47
48
|
"@private/prettier-config": "0.1.0",
|
|
48
|
-
"@private/tsconfig": "0.1.0"
|
|
49
|
-
"@private/eslint-config": "0.1.0"
|
|
49
|
+
"@private/tsconfig": "0.1.0"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"clean": "rm -rf dist build *.tsbuildinfo node_modules .turbo",
|
|
@@ -7,9 +7,8 @@ import {
|
|
|
7
7
|
registerHubSpotConnectRoutes,
|
|
8
8
|
} from '../../hono/index.ts';
|
|
9
9
|
|
|
10
|
-
const PORT = Deno.env.get('PORT')
|
|
11
|
-
|
|
12
|
-
: undefined;
|
|
10
|
+
const PORT = Deno.env.get('PORT');
|
|
11
|
+
const port = typeof PORT === 'string' ? parseInt(PORT!, 10) : undefined;
|
|
13
12
|
|
|
14
13
|
const HUBSPOT_CONNECT_BASE_PATH = '/functions/v1/hubspot-connect';
|
|
15
14
|
|
|
@@ -24,10 +23,10 @@ export function runHubSpotConnectLovableServer(
|
|
|
24
23
|
const hubspotConnectEnv = loadHubSpotConnectRoutesEnv();
|
|
25
24
|
|
|
26
25
|
const serveHandler = (request: Request): Response | Promise<Response> => {
|
|
27
|
-
const app = new Hono();
|
|
26
|
+
const app = new Hono().basePath(HUBSPOT_CONNECT_BASE_PATH);
|
|
28
27
|
|
|
29
28
|
registerHubSpotConnectRoutes({
|
|
30
|
-
app
|
|
29
|
+
app,
|
|
31
30
|
appKeys,
|
|
32
31
|
basePath: HUBSPOT_CONNECT_BASE_PATH,
|
|
33
32
|
hubspotConnectEnv,
|
|
@@ -37,9 +36,10 @@ export function runHubSpotConnectLovableServer(
|
|
|
37
36
|
return app.fetch(request);
|
|
38
37
|
};
|
|
39
38
|
|
|
40
|
-
const server =
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
const server =
|
|
40
|
+
port !== undefined
|
|
41
|
+
? Deno.serve({ port }, serveHandler)
|
|
42
|
+
: Deno.serve(serveHandler);
|
|
43
43
|
|
|
44
44
|
return server.finished;
|
|
45
45
|
}
|