@salesforce/webapp-experimental 1.58.0 → 1.58.2

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.
@@ -3,7 +3,7 @@
3
3
  * All rights reserved.
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
- import { getDataSDK } from "./graphql.js";
6
+ import { getDataSDK } from "@salesforce/sdk-data";
7
7
  // Project standard API version from environment variable with fallback
8
8
  export const API_VERSION = typeof __SF_API_VERSION__ !== "undefined" ? __SF_API_VERSION__ : "65.0";
9
9
  const BASE_DATA_URL = `/services/data/v${API_VERSION}`;
@@ -4,7 +4,6 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
  export { uiApiClient } from "./clients.js";
7
- export { getDataSDK, gql, type NodeOfConnection } from "./graphql.js";
8
7
  export { getHighRevenueAccounts, type Account } from "./utils/accounts.js";
9
8
  export { getRecord, createRecord, updateRecord, deleteRecord } from "./utils/records.js";
10
9
  export { getCurrentUser } from "./utils/user.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGtE,OAAO,EAAE,sBAAsB,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEzF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,EAAE,sBAAsB,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEzF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
package/dist/api/index.js CHANGED
@@ -5,8 +5,6 @@
5
5
  */
6
6
  // Core clients
7
7
  export { uiApiClient } from "./clients.js";
8
- // Data SDK
9
- export { getDataSDK, gql } from "./graphql.js";
10
8
  // Utility functions
11
9
  export { getHighRevenueAccounts } from "./utils/accounts.js";
12
10
  export { getRecord, createRecord, updateRecord, deleteRecord } from "./utils/records.js";
@@ -12,7 +12,7 @@
12
12
  * 3. Use getDataSDK() then data.graphql?.() with proper typing
13
13
  * 4. Extract and return the relevant data from the response
14
14
  */
15
- import { getDataSDK } from "../graphql.js";
15
+ import { getDataSDK } from "@salesforce/sdk-data";
16
16
  const HIGH_REVENUE_ACCOUNTS_QUERY = /* GraphQL */ `
17
17
  query GetHighRevenueAccounts($minRevenue: Currency) {
18
18
  uiapi {
@@ -3,8 +3,8 @@
3
3
  * All rights reserved.
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
+ import { getDataSDK } from "@salesforce/sdk-data";
6
7
  import { API_VERSION } from "../clients.js";
7
- import { getDataSDK } from "../graphql.js";
8
8
  /**
9
9
  * Fetch current user information from Salesforce
10
10
  * Uses Chatter API to get current user details
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-experimental",
3
3
  "description": "[experimental] Core package for Salesforce Web Applications",
4
- "version": "1.58.0",
4
+ "version": "1.58.2",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@salesforce/core": "^8.23.4",
48
- "@salesforce/sdk-data": "^1.58.0",
48
+ "@salesforce/sdk-data": "^1.58.2",
49
49
  "axios": "^1.7.7",
50
50
  "micromatch": "^4.0.8",
51
51
  "path-to-regexp": "^8.3.0"
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "444ed5b9e2ae4154064d316b06ce9a8be6831b0c"
64
+ "gitHead": "0dda7fdd05f5b8fd9870e57cc796663555166a90"
65
65
  }
@@ -1,19 +0,0 @@
1
- /**
2
- * Copyright (c) 2026, Salesforce, Inc.,
3
- * All rights reserved.
4
- * For full license text, see the LICENSE.txt file
5
- */
6
- import { type DataSDK } from "@salesforce/sdk-data";
7
- /**
8
- * Get a lazily-initialized DataSDK singleton.
9
- *
10
- * @returns The shared DataSDK instance
11
- */
12
- export declare function getDataSDK(): Promise<DataSDK>;
13
- export type NodeOfConnection<T> = T extends {
14
- edges?: (infer E)[] | null;
15
- } | null ? E extends {
16
- node?: infer N;
17
- } | null ? N : never : never;
18
- export { gql } from "@salesforce/sdk-data";
19
- //# sourceMappingURL=graphql.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../src/api/graphql.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAiB,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAInE;;;;GAIG;AACH,wBAAsB,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC,CAKnD;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,CAAC,SAAS;IAC3C,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC;CAC3B,GAAG,IAAI,GACL,CAAC,SAAS;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,IAAI,GAClC,CAAC,GACD,KAAK,GACN,KAAK,CAAC;AAET,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,19 +0,0 @@
1
- /**
2
- * Copyright (c) 2026, Salesforce, Inc.,
3
- * All rights reserved.
4
- * For full license text, see the LICENSE.txt file
5
- */
6
- import { createDataSDK } from "@salesforce/sdk-data";
7
- let sdkInstance = null;
8
- /**
9
- * Get a lazily-initialized DataSDK singleton.
10
- *
11
- * @returns The shared DataSDK instance
12
- */
13
- export async function getDataSDK() {
14
- if (!sdkInstance) {
15
- sdkInstance = await createDataSDK();
16
- }
17
- return sdkInstance;
18
- }
19
- export { gql } from "@salesforce/sdk-data";
@@ -1,7 +0,0 @@
1
- /**
2
- * Copyright (c) 2026, Salesforce, Inc.,
3
- * All rights reserved.
4
- * For full license text, see the LICENSE.txt file
5
- */
6
- export {};
7
- //# sourceMappingURL=graphql.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graphql.test.d.ts","sourceRoot":"","sources":["../../src/api/graphql.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -1,30 +0,0 @@
1
- /**
2
- * Copyright (c) 2026, Salesforce, Inc.,
3
- * All rights reserved.
4
- * For full license text, see the LICENSE.txt file
5
- */
6
- import { describe, it, expect, vi, beforeEach } from "vitest";
7
- import { getDataSDK } from "./graphql.js";
8
- const mockGraphQLFn = vi.fn();
9
- const mockFetchFn = vi.fn();
10
- vi.mock("@salesforce/sdk-data", () => ({
11
- createDataSDK: vi.fn(() => Promise.resolve({
12
- graphql: mockGraphQLFn,
13
- fetch: mockFetchFn,
14
- })),
15
- }));
16
- describe("getDataSDK", () => {
17
- beforeEach(() => {
18
- vi.clearAllMocks();
19
- });
20
- it("should return a DataSDK instance", async () => {
21
- const sdk = await getDataSDK();
22
- expect(sdk).toBeDefined();
23
- expect(sdk.graphql).toBeDefined();
24
- });
25
- it("should return the same instance on subsequent calls", async () => {
26
- const sdk1 = await getDataSDK();
27
- const sdk2 = await getDataSDK();
28
- expect(sdk1).toBe(sdk2);
29
- });
30
- });