@budibase/frontend-core 3.12.18 → 3.12.19
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": "@budibase/frontend-core",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.19",
|
|
4
4
|
"description": "Budibase frontend core libraries used in builder and client",
|
|
5
5
|
"author": "Budibase",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"shortid": "2.2.15",
|
|
18
18
|
"socket.io-client": "^4.7.5"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "94cb8fdab259feba40c3a05446b4807df0d80f6f"
|
|
21
21
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PublishStatusResponse } from "@budibase/types"
|
|
2
|
+
import { BaseAPIClient } from "./types"
|
|
3
|
+
|
|
4
|
+
export interface DeploymentEndpoints {
|
|
5
|
+
getPublishStatus: () => Promise<PublishStatusResponse>
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const buildDeploymentEndpoints = (
|
|
9
|
+
API: BaseAPIClient
|
|
10
|
+
): DeploymentEndpoints => ({
|
|
11
|
+
getPublishStatus: async () => {
|
|
12
|
+
return await API.get({
|
|
13
|
+
url: "/api/deploy/status",
|
|
14
|
+
})
|
|
15
|
+
},
|
|
16
|
+
})
|
package/src/api/index.ts
CHANGED
|
@@ -51,6 +51,7 @@ import { buildFeatureFlagEndpoints } from "./features"
|
|
|
51
51
|
import { buildNavigationEndpoints } from "./navigation"
|
|
52
52
|
import { buildWorkspaceAppEndpoints } from "./workspaceApps"
|
|
53
53
|
import { buildResourceEndpoints } from "./resource"
|
|
54
|
+
import { buildDeploymentEndpoints } from "./deploy"
|
|
54
55
|
|
|
55
56
|
export type { APIClient } from "./types"
|
|
56
57
|
|
|
@@ -296,6 +297,7 @@ export const createAPIClient = (config: APIClientConfig = {}): APIClient => {
|
|
|
296
297
|
...buildMigrationEndpoints(API),
|
|
297
298
|
...buildAgentEndpoints(API),
|
|
298
299
|
...buildFeatureFlagEndpoints(API),
|
|
300
|
+
deployment: buildDeploymentEndpoints(API),
|
|
299
301
|
viewV2: buildViewV2Endpoints(API),
|
|
300
302
|
rowActions: buildRowActionEndpoints(API),
|
|
301
303
|
oauth2: buildOAuth2Endpoints(API),
|
package/src/api/types.ts
CHANGED
|
@@ -38,6 +38,7 @@ import { AgentEndpoints } from "./agents"
|
|
|
38
38
|
import { NavigationEndpoints } from "./navigation"
|
|
39
39
|
import { WorkspaceAppEndpoints } from "./workspaceApps"
|
|
40
40
|
import { ResourceEndpoints } from "./resource"
|
|
41
|
+
import { DeploymentEndpoints } from "./deploy"
|
|
41
42
|
|
|
42
43
|
export enum HTTPMethod {
|
|
43
44
|
POST = "POST",
|
|
@@ -147,4 +148,5 @@ export type APIClient = BaseAPIClient &
|
|
|
147
148
|
oauth2: OAuth2Endpoints
|
|
148
149
|
navigation: NavigationEndpoints
|
|
149
150
|
workspaceApp: WorkspaceAppEndpoints
|
|
151
|
+
deployment: DeploymentEndpoints
|
|
150
152
|
}
|
|
@@ -73,15 +73,16 @@ export const initialise = (context: StoreContext) => {
|
|
|
73
73
|
const $metadata = get(metadata)
|
|
74
74
|
let metadataUpdates: Record<string, any> = {}
|
|
75
75
|
for (let row of $rows) {
|
|
76
|
+
const meta = $metadata[row._id]
|
|
76
77
|
const changed =
|
|
77
78
|
// No _rev indicates a new row
|
|
78
79
|
!row._rev ||
|
|
79
80
|
// _rev changed since last evaluation
|
|
80
|
-
|
|
81
|
+
(meta && meta.version !== row._rev) ||
|
|
81
82
|
// this is an external row, we have no way to know if it has changed, so
|
|
82
83
|
// we always re-evaluate
|
|
83
84
|
row._rev === EXTERNAL_ROW_REV
|
|
84
|
-
if (!changed) {
|
|
85
|
+
if (!changed && meta) {
|
|
85
86
|
continue
|
|
86
87
|
}
|
|
87
88
|
|