@hubspot/local-dev-lib 2.0.1 → 2.1.1
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/api/hubdb.d.ts +2 -1
- package/api/hubdb.js +7 -1
- package/lib/cms/modules.js +2 -2
- package/lib/portManager.d.ts +1 -0
- package/lib/portManager.js +2 -1
- package/package.json +1 -1
- package/types/Hubdb.d.ts +9 -0
- package/types/Modules.d.ts +1 -0
package/api/hubdb.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AxiosPromise } from 'axios';
|
|
2
2
|
import { QueryParams } from '../types/Http';
|
|
3
|
-
import { CreateRowsResponse, FetchRowsResponse, Row, Schema, Table } from '../types/Hubdb';
|
|
3
|
+
import { CreateRowsResponse, FetchRowsResponse, Row, Schema, Table, FetchTablesResponse } from '../types/Hubdb';
|
|
4
|
+
export declare function fetchTables(accountId: number): AxiosPromise<FetchTablesResponse>;
|
|
4
5
|
export declare function fetchTable(accountId: number, tableId: string): AxiosPromise<Table>;
|
|
5
6
|
export declare function createTable(accountId: number, schema: Schema): AxiosPromise<Table>;
|
|
6
7
|
export declare function updateTable(accountId: number, tableId: string, schema: Schema): AxiosPromise<Table>;
|
package/api/hubdb.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteRows = exports.fetchRows = exports.createRows = exports.deleteTable = exports.publishTable = exports.updateTable = exports.createTable = exports.fetchTable = void 0;
|
|
3
|
+
exports.deleteRows = exports.fetchRows = exports.createRows = exports.deleteTable = exports.publishTable = exports.updateTable = exports.createTable = exports.fetchTable = exports.fetchTables = void 0;
|
|
4
4
|
const http_1 = require("../http");
|
|
5
5
|
const HUBDB_API_PATH = 'cms/v3/hubdb';
|
|
6
|
+
function fetchTables(accountId) {
|
|
7
|
+
return http_1.http.get(accountId, {
|
|
8
|
+
url: `${HUBDB_API_PATH}/tables`,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
exports.fetchTables = fetchTables;
|
|
6
12
|
function fetchTable(accountId, tableId) {
|
|
7
13
|
return http_1.http.get(accountId, {
|
|
8
14
|
url: `${HUBDB_API_PATH}/tables/${tableId}`,
|
package/lib/cms/modules.js
CHANGED
|
@@ -106,7 +106,7 @@ const updateFileContents = async (file, metaData, getInternalVersion) => {
|
|
|
106
106
|
async function createModule(moduleDefinition, name, dest, getInternalVersion, options = {
|
|
107
107
|
allowExistingDir: false,
|
|
108
108
|
}) {
|
|
109
|
-
const { moduleLabel, contentTypes, global, reactType: isReactModule, } = moduleDefinition;
|
|
109
|
+
const { moduleLabel, contentTypes, global, reactType: isReactModule, availableForNewContent, } = moduleDefinition;
|
|
110
110
|
const moduleMetaData = {
|
|
111
111
|
label: moduleLabel,
|
|
112
112
|
css_assets: [],
|
|
@@ -118,7 +118,7 @@ async function createModule(moduleDefinition, name, dest, getInternalVersion, op
|
|
|
118
118
|
other_assets: [],
|
|
119
119
|
smart_type: 'NOT_SMART',
|
|
120
120
|
tags: [],
|
|
121
|
-
is_available_for_new_content:
|
|
121
|
+
is_available_for_new_content: availableForNewContent,
|
|
122
122
|
};
|
|
123
123
|
const folderName = name.endsWith('.module') ? name : `${name}.module`;
|
|
124
124
|
const destPath = !isReactModule
|
package/lib/portManager.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RequestPortsData } from '../types/PortManager';
|
|
2
2
|
export declare const BASE_URL: string;
|
|
3
|
+
export declare function isPortManagerServerRunning(): Promise<boolean>;
|
|
3
4
|
export declare function startPortManagerServer(): Promise<void>;
|
|
4
5
|
export declare function stopPortManagerServer(): Promise<void>;
|
|
5
6
|
export declare function requestPorts(portData: Array<RequestPortsData>): Promise<{
|
package/lib/portManager.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.portManagerHasActiveServers = exports.deleteServerInstance = exports.requestPorts = exports.stopPortManagerServer = exports.startPortManagerServer = exports.BASE_URL = void 0;
|
|
6
|
+
exports.portManagerHasActiveServers = exports.deleteServerInstance = exports.requestPorts = exports.stopPortManagerServer = exports.startPortManagerServer = exports.isPortManagerServerRunning = exports.BASE_URL = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
|
8
8
|
const PortManagerServer_1 = require("../utils/PortManagerServer");
|
|
9
9
|
const detectPort_1 = require("../utils/detectPort");
|
|
@@ -13,6 +13,7 @@ async function isPortManagerServerRunning() {
|
|
|
13
13
|
const port = await (0, detectPort_1.detectPort)(ports_1.PORT_MANAGER_SERVER_PORT);
|
|
14
14
|
return port !== ports_1.PORT_MANAGER_SERVER_PORT;
|
|
15
15
|
}
|
|
16
|
+
exports.isPortManagerServerRunning = isPortManagerServerRunning;
|
|
16
17
|
async function startPortManagerServer() {
|
|
17
18
|
const isRunning = await isPortManagerServerRunning();
|
|
18
19
|
if (!isRunning) {
|
package/package.json
CHANGED
package/types/Hubdb.d.ts
CHANGED