cli
cli copied to clipboard
Explore mock identity
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
Unused exports (1)
| Filename | exports |
|---|---|
| packages/cli-kit/src/private/node/session/mock-auth.ts | buildMockIdentityToken |
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
mainyou might see odd diffs, rebasemaininto 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
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