cli icon indicating copy to clipboard operation
cli copied to clipboard

Explore mock identity

Open alexanderMontague opened this issue 1 month ago β€’ 3 comments

WHY are these changes introduced?

Fixes #0000

WHAT is this pull request doing?

How to test your changes?

Post-release steps

Measuring impact

How do we know this change was effective? Please choose one:

  • [ ] n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • [ ] Existing analytics will cater for this addition
  • [ ] PR includes analytics changes to measure impact

Checklist

  • [ ] I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • [ ] I've considered possible documentation changes

alexanderMontague avatar Nov 11 '25 16:11 alexanderMontague

Unused exports (1)

Filename exports
packages/cli-kit/src/private/node/session/mock-auth.ts buildMockIdentityToken

github-actions[bot] avatar Nov 11 '25 16:11 github-actions[bot]

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

packages/cli-kit/dist/private/node/session/mock-auth.d.ts
import { IdentityToken, Session } from './schema.js';
interface MockUserResponse {
    uuid: string;
    expires_at: string;
    id_token: string;
    access_token: string;
    refresh_token: string;
    last_login: string;
    scope: string;
    userinfo: {
        email: string;
        email_verified: boolean;
        given_name: string;
        family_name: string;
        name: string;
        picture: string;
        zoneinfo: string;
        locale: string;
        permissions: string[];
        okta_id: string | null;
        updated_at: string;
        created_at: string;
    };
}
export declare function shouldUseMockAuth(): boolean;
export declare function fetchMockUser(scopes: string[]): Promise<MockUserResponse>;
export declare function buildMockIdentityToken(mockUser: MockUserResponse, scopes: string[]): IdentityToken;
export declare function buildMockSession(mockUser: MockUserResponse, scopes: string[]): Session;
export {};

Existing type declarations

packages/cli-kit/dist/public/node/vendor/dev_server/network/host.d.ts
@@ -1,2 +1 @@
-export declare function getIpFromHosts(hostname: string): string;
-export declare function TEST_ClearCache(): void;
\ No newline at end of file
+export declare function getIpFromHosts(hostname: string): string;
\ No newline at end of file

packages/cli-kit/dist/public/node/vendor/dev_server/network/index.d.ts
@@ -5,5 +5,4 @@ export interface ConnectionArguments {
     port: number;
     timeout?: number;
 }
-export declare function assertConnectable(options: ConnectionArguments): void;
-export declare function TEST_testResetCheckPort(): void;
\ No newline at end of file
+export declare function assertConnectable(options: ConnectionArguments): void;
\ No newline at end of file

github-actions[bot] avatar Nov 11 '25 16:11 github-actions[bot]

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
79.1% (-0.13% πŸ”»)
13587/17178
🟑 Branches
73.09% (-0.02% πŸ”»)
6632/9074
🟑 Functions
79.3% (-0.07% πŸ”»)
3506/4421
🟑 Lines
79.45% (-0.14% πŸ”»)
12832/16152
Show new covered files 🐣
St.:grey_question:
File Statements Branches Functions Lines
πŸ”΄
... / mock-auth.ts
7.41% 25% 25% 7.41%
Show files with reduced coverage πŸ”»
St.:grey_question:
File Statements Branches Functions Lines
🟒
... / loader.ts
93.86%
86.7% (-0.13% πŸ”»)
97.06% 94.67%
🟒
... / session.ts
87.94% (-3.17% πŸ”»)
78.43% (-0.57% πŸ”»)
92.31%
87.22% (-3.33% πŸ”»)
🟒
... / fqdn.ts
93.62% (-1.94% πŸ”»)
91.3%
90.91% (-9.09% πŸ”»)
95.65% (+0.1% πŸ”Ό)

Test suite run success

3355 tests passing in 1372 suites.

Report generated by πŸ§ͺjest coverage report action from 7f09479a59a2e58946d8cf389168cf4562f6b2cd

github-actions[bot] avatar Nov 11 '25 16:11 github-actions[bot]