@firebase/rules-unit-testing 4.0.1-canary.e055e9057 → 4.0.1-canary.e59cd7da1

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.
@@ -36,3 +36,4 @@ export * from './src/exponential_backoff';
36
36
  export * from './src/formatters';
37
37
  export * from './src/compat';
38
38
  export * from './src/global';
39
+ export * from './src/url';
@@ -44,4 +44,11 @@ export type EmulatorMockTokenOptions = ({
44
44
  sub: string;
45
45
  }) & Partial<FirebaseIdToken>;
46
46
  export declare function createMockUserToken(token: EmulatorMockTokenOptions, projectId?: string): string;
47
+ /**
48
+ * Updates Emulator Banner. Primarily used for Firebase Studio
49
+ * @param name
50
+ * @param isRunningEmulator
51
+ * @public
52
+ */
53
+ export declare function updateEmulatorBanner(name: string, isRunningEmulator: boolean): void;
47
54
  export {};
@@ -69,6 +69,8 @@ export declare function isUWP(): boolean;
69
69
  export declare function isNodeSdk(): boolean;
70
70
  /** Returns true if we are running in Safari. */
71
71
  export declare function isSafari(): boolean;
72
+ /** Returns true if we are running in Safari or WebKit */
73
+ export declare function isSafariOrWebkit(): boolean;
72
74
  /**
73
75
  * This method checks if indexedDB is supported by current browser/service worker context
74
76
  * @return true if indexedDB is supported by current browser/service worker context
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Checks whether host is a cloud workstation or not.
19
+ * @public
20
+ */
21
+ export declare function isCloudWorkstation(url: string): boolean;
22
+ /**
23
+ * Makes a fetch request to the given server.
24
+ * Mostly used for forwarding cookies in Firebase Studio.
25
+ * @public
26
+ */
27
+ export declare function pingServer(endpoint: string): Promise<boolean>;
@@ -36,3 +36,4 @@ export * from './src/exponential_backoff';
36
36
  export * from './src/formatters';
37
37
  export * from './src/compat';
38
38
  export * from './src/global';
39
+ export * from './src/url';
@@ -44,4 +44,11 @@ export type EmulatorMockTokenOptions = ({
44
44
  sub: string;
45
45
  }) & Partial<FirebaseIdToken>;
46
46
  export declare function createMockUserToken(token: EmulatorMockTokenOptions, projectId?: string): string;
47
+ /**
48
+ * Updates Emulator Banner. Primarily used for Firebase Studio
49
+ * @param name
50
+ * @param isRunningEmulator
51
+ * @public
52
+ */
53
+ export declare function updateEmulatorBanner(name: string, isRunningEmulator: boolean): void;
47
54
  export {};
@@ -69,6 +69,8 @@ export declare function isUWP(): boolean;
69
69
  export declare function isNodeSdk(): boolean;
70
70
  /** Returns true if we are running in Safari. */
71
71
  export declare function isSafari(): boolean;
72
+ /** Returns true if we are running in Safari or WebKit */
73
+ export declare function isSafariOrWebkit(): boolean;
72
74
  /**
73
75
  * This method checks if indexedDB is supported by current browser/service worker context
74
76
  * @return true if indexedDB is supported by current browser/service worker context
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Checks whether host is a cloud workstation or not.
19
+ * @public
20
+ */
21
+ export declare function isCloudWorkstation(url: string): boolean;
22
+ /**
23
+ * Makes a fetch request to the given server.
24
+ * Mostly used for forwarding cookies in Firebase Studio.
25
+ * @public
26
+ */
27
+ export declare function pingServer(endpoint: string): Promise<boolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firebase/rules-unit-testing",
3
- "version": "4.0.1-canary.e055e9057",
3
+ "version": "4.0.1-canary.e59cd7da1",
4
4
  "description": "",
5
5
  "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
6
  "main": "dist/index.cjs.js",
@@ -43,7 +43,7 @@
43
43
  "rollup-plugin-typescript2": "0.36.0"
44
44
  },
45
45
  "peerDependencies": {
46
- "firebase": "11.6.0-canary.e055e9057"
46
+ "firebase": "11.9.1-canary.e59cd7da1"
47
47
  },
48
48
  "repository": {
49
49
  "directory": "packages/rules-unit-testing",