@metamask-previews/core-backend 12.3.0-preview-e4c191e3a → 12.3.0-preview-a583980c5

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/CHANGELOG.md CHANGED
@@ -9,8 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ### Changed
11
11
 
12
- - Bump `@metamask/account-tree-controller` from `^11.0.1` to `^11.1.0` ([#10891](https://github.com/MetaMask/core/pull/10891))
13
- - Bump `@metamask/profile-sync-controller` from `^34.0.3` to `^34.1.0` ([#10905](https://github.com/MetaMask/core/pull/10905))
12
+ - Bump `@metamask/account-tree-controller` from `^11.0.1` to `^11.1.1` ([#10891](https://github.com/MetaMask/core/pull/10891), [#10925](https://github.com/MetaMask/core/pull/10925))
13
+ - Bump `@metamask/profile-sync-controller` from `^34.0.3` to `^35.0.0` ([#10905](https://github.com/MetaMask/core/pull/10905), [#10925](https://github.com/MetaMask/core/pull/10925))
14
14
 
15
15
  ## [12.3.0]
16
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/core-backend",
3
- "version": "12.3.0-preview-e4c191e3a",
3
+ "version": "12.3.0-preview-a583980c5",
4
4
  "description": "Core backend services for MetaMask",
5
5
  "keywords": [
6
6
  "Ethereum",
@@ -50,11 +50,11 @@
50
50
  "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
51
51
  },
52
52
  "dependencies": {
53
- "@metamask/account-tree-controller": "^11.1.0",
53
+ "@metamask/account-tree-controller": "^11.1.1",
54
54
  "@metamask/controller-utils": "^13.0.0",
55
55
  "@metamask/keyring-controller": "^28.2.0",
56
56
  "@metamask/messenger": "^3.0.0",
57
- "@metamask/profile-sync-controller": "^34.1.0",
57
+ "@metamask/profile-sync-controller": "^35.0.0",
58
58
  "@metamask/remote-feature-flag-controller": "^7.0.0",
59
59
  "@metamask/utils": "^12.0.0",
60
60
  "@tanstack/query-core": "^5.103.2",
@@ -1,29 +0,0 @@
1
- /**
2
- * Shared test utilities for API client tests.
3
- */
4
- import { ApiPlatformClient } from './ApiPlatformClient.js';
5
- export declare const mockFetch: jest.Mock<any, any, any>;
6
- /**
7
- * Helper to create a mock Response.
8
- *
9
- * @param data - The response data to return from json().
10
- * @param status - HTTP status code.
11
- * @param statusText - HTTP status text.
12
- * @returns A mocked Response object.
13
- */
14
- export declare const createMockResponse: <ResponseData>(data: ResponseData, status?: number, statusText?: string) => Response;
15
- /**
16
- * Creates a fresh ApiPlatformClient for testing with disabled caching/retry.
17
- *
18
- * @returns A new ApiPlatformClient instance configured for testing.
19
- */
20
- export declare function createTestClient(): ApiPlatformClient;
21
- /**
22
- * Setup function to be called in beforeEach.
23
- *
24
- * @returns An object containing a fresh test client.
25
- */
26
- export declare function setupTestEnvironment(): {
27
- client: ApiPlatformClient;
28
- };
29
- //# sourceMappingURL=test-utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../src/api/test-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAG3D,eAAO,MAAM,SAAS,0BAAY,CAAC;AAGnC;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAI,YAAY,QACvC,YAAY,2CAGjB,QAiBwB,CAAC;AAE5B;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,iBAAiB,CAcpD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI;IAAE,MAAM,EAAE,iBAAiB,CAAA;CAAE,CAIpE"}
@@ -1,64 +0,0 @@
1
- /**
2
- * Shared test utilities for API client tests.
3
- */
4
- import { QueryClient } from '@tanstack/query-core';
5
- import { ApiPlatformClient } from './ApiPlatformClient.js';
6
- // Mock fetch globally
7
- export const mockFetch = jest.fn();
8
- globalThis.fetch = mockFetch;
9
- /**
10
- * Helper to create a mock Response.
11
- *
12
- * @param data - The response data to return from json().
13
- * @param status - HTTP status code.
14
- * @param statusText - HTTP status text.
15
- * @returns A mocked Response object.
16
- */
17
- export const createMockResponse = (data, status = 200, statusText = 'OK') => ({
18
- ok: status >= 200 && status < 300,
19
- status,
20
- statusText,
21
- json: jest.fn().mockResolvedValue(data),
22
- headers: { get: jest.fn() },
23
- redirected: false,
24
- type: 'basic',
25
- url: '',
26
- clone: jest.fn(),
27
- body: null,
28
- bodyUsed: false,
29
- arrayBuffer: jest.fn(),
30
- blob: jest.fn(),
31
- formData: jest.fn(),
32
- text: jest.fn(),
33
- });
34
- /**
35
- * Creates a fresh ApiPlatformClient for testing with disabled caching/retry.
36
- *
37
- * @returns A new ApiPlatformClient instance configured for testing.
38
- */
39
- export function createTestClient() {
40
- return new ApiPlatformClient({
41
- clientProduct: 'test-client',
42
- clientVersion: '1.0.0',
43
- queryClient: new QueryClient({
44
- defaultOptions: {
45
- queries: {
46
- retry: false,
47
- gcTime: 0,
48
- staleTime: 0,
49
- },
50
- },
51
- }),
52
- });
53
- }
54
- /**
55
- * Setup function to be called in beforeEach.
56
- *
57
- * @returns An object containing a fresh test client.
58
- */
59
- export function setupTestEnvironment() {
60
- jest.clearAllMocks();
61
- mockFetch.mockReset();
62
- return { client: createTestClient() };
63
- }
64
- //# sourceMappingURL=test-utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-utils.js","sourceRoot":"","sources":["../../src/api/test-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,sBAAsB;AACtB,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAClC,UAAuD,CAAC,KAAK,GAAG,SAAS,CAAC;AAE3E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,IAAkB,EAClB,MAAM,GAAG,GAAG,EACZ,UAAU,GAAG,IAAI,EACP,EAAE,CACZ,CAAC;IACC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,MAAM,GAAG,GAAG;IACjC,MAAM;IACN,UAAU;IACV,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC;IACvC,OAAO,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE;IAC3B,UAAU,EAAE,KAAK;IACjB,IAAI,EAAE,OAAO;IACb,GAAG,EAAE,EAAE;IACP,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE;IAChB,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,KAAK;IACf,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE;IACtB,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE;IACf,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE;IACnB,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE;CAChB,CAAwB,CAAC;AAE5B;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,IAAI,iBAAiB,CAAC;QAC3B,aAAa,EAAE,aAAa;QAC5B,aAAa,EAAE,OAAO;QACtB,WAAW,EAAE,IAAI,WAAW,CAAC;YAC3B,cAAc,EAAE;gBACd,OAAO,EAAE;oBACP,KAAK,EAAE,KAAK;oBACZ,MAAM,EAAE,CAAC;oBACT,SAAS,EAAE,CAAC;iBACb;aACF;SACF,CAAC;KACH,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB;IAClC,IAAI,CAAC,aAAa,EAAE,CAAC;IACrB,SAAS,CAAC,SAAS,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAAE,CAAC;AACxC,CAAC","sourcesContent":["/**\n * Shared test utilities for API client tests.\n */\n\nimport { QueryClient } from '@tanstack/query-core';\n\nimport { ApiPlatformClient } from './ApiPlatformClient.js';\n\n// Mock fetch globally\nexport const mockFetch = jest.fn();\n(globalThis as typeof globalThis & { fetch: jest.Mock }).fetch = mockFetch;\n\n/**\n * Helper to create a mock Response.\n *\n * @param data - The response data to return from json().\n * @param status - HTTP status code.\n * @param statusText - HTTP status text.\n * @returns A mocked Response object.\n */\nexport const createMockResponse = <ResponseData>(\n data: ResponseData,\n status = 200,\n statusText = 'OK',\n): Response =>\n ({\n ok: status >= 200 && status < 300,\n status,\n statusText,\n json: jest.fn().mockResolvedValue(data),\n headers: { get: jest.fn() },\n redirected: false,\n type: 'basic',\n url: '',\n clone: jest.fn(),\n body: null,\n bodyUsed: false,\n arrayBuffer: jest.fn(),\n blob: jest.fn(),\n formData: jest.fn(),\n text: jest.fn(),\n }) as unknown as Response;\n\n/**\n * Creates a fresh ApiPlatformClient for testing with disabled caching/retry.\n *\n * @returns A new ApiPlatformClient instance configured for testing.\n */\nexport function createTestClient(): ApiPlatformClient {\n return new ApiPlatformClient({\n clientProduct: 'test-client',\n clientVersion: '1.0.0',\n queryClient: new QueryClient({\n defaultOptions: {\n queries: {\n retry: false,\n gcTime: 0,\n staleTime: 0,\n },\n },\n }),\n });\n}\n\n/**\n * Setup function to be called in beforeEach.\n *\n * @returns An object containing a fresh test client.\n */\nexport function setupTestEnvironment(): { client: ApiPlatformClient } {\n jest.clearAllMocks();\n mockFetch.mockReset();\n return { client: createTestClient() };\n}\n"]}