@budibase/backend-core 3.41.2 → 3.42.0

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/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@budibase/backend-core",
3
- "version": "3.41.2",
3
+ "version": "v3.42.0",
4
4
  "description": "Budibase backend core libraries used in server and worker",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/src/index.d.ts",
7
7
  "exports": {
8
- ".": "./dist/index.js",
8
+ ".": {
9
+ "types": "./dist/src/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ },
9
12
  "./tests": "./dist/tests/index.js",
10
13
  "./*": "./dist/*.js"
11
14
  },
@@ -24,7 +27,7 @@
24
27
  "build": "node ./scripts/build.js && yarn build:types",
25
28
  "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput",
26
29
  "build:oss": "node ./scripts/build.js",
27
- "build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly --paths null && tsc -p tsconfig.test.json --paths null",
30
+ "build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly --paths null && tsc -p tsconfig.test-utils.json --paths null",
28
31
  "check:types": "tsc -p tsconfig.json --noEmit --incremental --paths null",
29
32
  "test": "bash scripts/test.sh",
30
33
  "test:watch": "jest --watchAll"
@@ -110,5 +113,5 @@
110
113
  }
111
114
  }
112
115
  },
113
- "gitHead": "556bd76bac5c556b307b1022fce8e1fe51d928d7"
116
+ "gitHead": "180c04c6852aa7acf0402d53dc909eab764d0251"
114
117
  }
@@ -57,14 +57,14 @@ export declare const tenancy: {
57
57
  doInContext(workspaceId: string, task: any): Promise<any>;
58
58
  doInTenant<T>(tenantId: string | undefined, task: () => T): Promise<T>;
59
59
  doInSelfHostTenantUsingCloud<T>(tenantId: string, task: () => T): Promise<T>;
60
- doInLicenseContext<T>(license: import("packages/types/dist").License, task: () => T): Promise<T>;
61
- getLicense(): import("packages/types/dist").License | undefined;
60
+ doInLicenseContext<T>(license: import("@budibase/types").License, task: () => T): Promise<T>;
61
+ getLicense(): import("@budibase/types").License | undefined;
62
62
  isSelfHostUsingCloud(): boolean;
63
- getSelfHostCloudDB(): import("packages/types/dist").Database;
63
+ getSelfHostCloudDB(): import("@budibase/types").Database;
64
64
  doInWorkspaceContext<T>(workspaceId: string, task: () => T): Promise<T>;
65
- doInIdentityContext<T>(identity: import("packages/types/dist").IdentityContext, task: () => T): Promise<T>;
65
+ doInIdentityContext<T>(identity: import("@budibase/types").IdentityContext, task: () => T): Promise<T>;
66
66
  doInWorkspaceMigrationContext<T>(workspaceId: string, task: () => T): Promise<T>;
67
- getIdentity(): import("packages/types/dist").IdentityContext | undefined;
67
+ getIdentity(): import("@budibase/types").IdentityContext | undefined;
68
68
  getTenantId(): string;
69
69
  getAutomationId(): string | undefined;
70
70
  getWorkspaceId(): string | undefined;
@@ -75,27 +75,27 @@ export declare const tenancy: {
75
75
  doInIPContext(ip: string, task: any): Promise<unknown>;
76
76
  ensureSnippetContext(): Promise<void>;
77
77
  getEnvironmentVariables(): Record<string, string> | null;
78
- getGlobalDB(): import("packages/types/dist").Database;
79
- getAuditLogsDB(): import("packages/types/dist").Database;
80
- getWorkspaceDB(opts?: any): import("packages/types/dist").Database;
81
- getProdWorkspaceDB(opts?: any): import("packages/types/dist").Database;
82
- getDevWorkspaceDB(opts?: any): import("packages/types/dist").Database;
78
+ getGlobalDB(): import("@budibase/types").Database;
79
+ getAuditLogsDB(): import("@budibase/types").Database;
80
+ getWorkspaceDB(opts?: any): import("@budibase/types").Database;
81
+ getProdWorkspaceDB(opts?: any): import("@budibase/types").Database;
82
+ getDevWorkspaceDB(opts?: any): import("@budibase/types").Database;
83
83
  isScim(): boolean;
84
84
  getCurrentContext(): import("./context/types").ContextMap | undefined;
85
85
  getFeatureFlags(key: string): Record<string, boolean> | undefined;
86
86
  setFeatureFlags(key: string, value: Record<string, boolean>): void;
87
87
  getFeatureFlagOverrides(): Record<string, boolean>;
88
88
  doInFeatureFlagOverrideContext<T>(value: Record<string, boolean>, callback: () => Promise<T>): Promise<T>;
89
- getTableForView(viewId: string): import("packages/types/dist").Table | undefined;
90
- setTableForView(viewId: string, table: import("packages/types/dist").Table): void;
89
+ getTableForView(viewId: string): import("@budibase/types").Table | undefined;
90
+ setTableForView(viewId: string, table: import("@budibase/types").Table): void;
91
91
  isDevWorkspace(): boolean;
92
92
  isProdWorkspace(): boolean;
93
93
  getDevWorkspaceId: () => string;
94
94
  getProdWorkspaceId: () => string;
95
- getTenantDB(tenantId: string): import("packages/types/dist").Database;
95
+ getTenantDB(tenantId: string): import("@budibase/types").Database;
96
96
  addTenantToUrl(url: string): string;
97
97
  isUserInWorkspaceTenant: (workspace: string, user?: any) => boolean;
98
- getTenantIDFromCtx: (ctx: import("packages/types/dist").Ctx, opts: import("packages/types/dist").GetTenantIdOptions) => string | undefined;
98
+ getTenantIDFromCtx: (ctx: import("@budibase/types").Ctx, opts: import("@budibase/types").GetTenantIdOptions) => string | undefined;
99
99
  };
100
100
  export * from "./errors";
101
101
  export * from "./warnings";
@@ -1 +1 @@
1
- export declare function getPlatformDB(): import("packages/types/dist").Database;
1
+ export declare function getPlatformDB(): import("@budibase/types").Database;
@@ -1 +1 @@
1
- export declare function getTenantDB(tenantId: string): import("packages/types/dist").Database;
1
+ export declare function getTenantDB(tenantId: string): import("@budibase/types").Database;
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@budibase/backend-core",
3
- "version": "3.41.2",
3
+ "version": "v3.42.0",
4
4
  "description": "Budibase backend core libraries used in server and worker",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/src/index.d.ts",
7
7
  "exports": {
8
- ".": "./dist/index.js",
8
+ ".": {
9
+ "types": "./dist/src/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ },
9
12
  "./tests": "./dist/tests/index.js",
10
13
  "./*": "./dist/*.js"
11
14
  },
@@ -24,7 +27,7 @@
24
27
  "build": "node ./scripts/build.js && yarn build:types",
25
28
  "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput",
26
29
  "build:oss": "node ./scripts/build.js",
27
- "build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly --paths null && tsc -p tsconfig.test.json --paths null",
30
+ "build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly --paths null && tsc -p tsconfig.test-utils.json --paths null",
28
31
  "check:types": "tsc -p tsconfig.json --noEmit --incremental --paths null",
29
32
  "test": "bash scripts/test.sh",
30
33
  "test:watch": "jest --watchAll"
@@ -110,5 +113,5 @@
110
113
  }
111
114
  }
112
115
  },
113
- "gitHead": "556bd76bac5c556b307b1022fce8e1fe51d928d7"
116
+ "gitHead": "180c04c6852aa7acf0402d53dc909eab764d0251"
114
117
  }