@sitecore-content-sdk/cli 0.2.0-beta.1 → 0.2.0-beta.11
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/README.md +1 -1
- package/dist/cjs/bin/sitecore-tools.js +6 -4
- package/dist/cjs/cli.js +8 -4
- package/dist/cjs/scripts/auth/index.js +26 -0
- package/dist/cjs/scripts/auth/list.js +36 -0
- package/dist/cjs/scripts/auth/login.js +112 -0
- package/dist/cjs/scripts/auth/logout.js +28 -0
- package/dist/cjs/scripts/auth/models.js +2 -0
- package/dist/cjs/scripts/auth/status.js +34 -0
- package/dist/cjs/scripts/index.js +5 -5
- package/dist/cjs/scripts/{build.js → project/build.js} +2 -2
- package/dist/cjs/scripts/project/component/index.js +55 -0
- package/dist/cjs/scripts/{scaffold.js → project/component/scaffold.js} +2 -2
- package/dist/cjs/scripts/project/index.js +56 -0
- package/dist/cjs/utils/auth/flow.js +72 -0
- package/dist/cjs/utils/auth/renewal.js +95 -0
- package/dist/cjs/utils/auth/tenant-state.js +91 -0
- package/dist/cjs/utils/auth/tenant-store.js +212 -0
- package/dist/esm/cli.js +8 -4
- package/dist/esm/scripts/auth/index.js +23 -0
- package/dist/esm/scripts/auth/list.js +33 -0
- package/dist/esm/scripts/auth/login.js +109 -0
- package/dist/esm/scripts/auth/logout.js +25 -0
- package/dist/esm/scripts/auth/models.js +1 -0
- package/dist/esm/scripts/auth/status.js +31 -0
- package/dist/esm/scripts/index.js +4 -3
- package/dist/esm/scripts/{build.js → project/build.js} +2 -2
- package/dist/esm/scripts/project/component/index.js +19 -0
- package/dist/esm/scripts/{scaffold.js → project/component/scaffold.js} +2 -2
- package/dist/esm/scripts/project/index.js +20 -0
- package/dist/esm/utils/auth/flow.js +68 -0
- package/dist/esm/utils/auth/renewal.js +90 -0
- package/dist/esm/utils/auth/tenant-state.js +53 -0
- package/dist/esm/utils/auth/tenant-store.js +170 -0
- package/package.json +14 -15
- package/types/scripts/auth/index.d.ts +7 -0
- package/types/scripts/auth/list.d.ts +2 -0
- package/types/scripts/auth/login.d.ts +3 -0
- package/types/scripts/auth/logout.d.ts +2 -0
- package/types/scripts/auth/models.d.ts +94 -0
- package/types/scripts/auth/status.d.ts +2 -0
- package/types/scripts/index.d.ts +4 -3
- package/types/scripts/{build.d.ts → project/build.d.ts} +1 -1
- package/types/scripts/project/component/index.d.ts +5 -0
- package/types/scripts/project/index.d.ts +5 -0
- package/types/utils/auth/flow.d.ts +24 -0
- package/types/utils/auth/renewal.d.ts +22 -0
- package/types/utils/auth/tenant-state.d.ts +14 -0
- package/types/utils/auth/tenant-store.d.ts +40 -0
- /package/types/scripts/{scaffold.d.ts → project/component/scaffold.d.ts} +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { TenantAuth, TenantInfo } from './../../scripts/auth/models';
|
|
2
|
+
/**
|
|
3
|
+
* Write the authentication configuration for a tenant.
|
|
4
|
+
* @param {string} tenantId - The tenant ID.
|
|
5
|
+
* @param {TenantAuth} authInfo - The tenant's auth data.
|
|
6
|
+
*/
|
|
7
|
+
export declare function writeTenantAuthInfo(tenantId: string, authInfo: TenantAuth): Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* Read the authentication configuration for a tenant.
|
|
10
|
+
* @param {string} tenantId - The tenant ID.
|
|
11
|
+
* @returns Parsed auth config or null if not found or failed to read.
|
|
12
|
+
*/
|
|
13
|
+
export declare function readTenantAuthInfo(tenantId: string): Promise<TenantAuth | null>;
|
|
14
|
+
/**
|
|
15
|
+
* Write the public metadata information for a tenant.
|
|
16
|
+
* @param {TenantInfo} info - The tenant info object.
|
|
17
|
+
*/
|
|
18
|
+
export declare function writeTenantInfo(info: TenantInfo): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Read the public metadata information for a tenant.
|
|
21
|
+
* @param {string} tenantId - The tenant ID.
|
|
22
|
+
* @returns Parsed tenant info or null if not found or failed to read.
|
|
23
|
+
*/
|
|
24
|
+
export declare function readTenantInfo(tenantId: string): Promise<TenantInfo | null>;
|
|
25
|
+
/**
|
|
26
|
+
* Deletes the stored auth.json file for the given tenant.
|
|
27
|
+
* @param {string} tenantId - The tenant ID.
|
|
28
|
+
*/
|
|
29
|
+
export declare function deleteTenantAuthInfo(tenantId: string): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Scans the CLI root directory and returns all valid tenant infos.
|
|
32
|
+
* @returns A list of TenantInfo objects found in {tenant-id}/info.json files.
|
|
33
|
+
*/
|
|
34
|
+
export declare function getAllTenantsInfo(): TenantInfo[];
|
|
35
|
+
/**
|
|
36
|
+
* Decodes a JWT without verifying its signature.
|
|
37
|
+
* @param {string} token - The access token string.
|
|
38
|
+
* @returns Decoded payload object or null if invalid.
|
|
39
|
+
*/
|
|
40
|
+
export declare function decodeJwtPayload(token: string): Record<string, any> | null;
|
|
File without changes
|