@prismicio/e2e-tests-utils 1.17.1-alpha.0 → 1.18.0-canary.933a809
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 +24 -27
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/clients/apiClient.cjs +38 -38
- package/dist/clients/apiClient.cjs.map +1 -1
- package/dist/clients/apiClient.d.cts +30 -0
- package/dist/clients/apiClient.d.cts.map +1 -0
- package/dist/clients/apiClient.d.ts +23 -23
- package/dist/clients/apiClient.d.ts.map +1 -0
- package/dist/clients/apiClient.js +38 -38
- package/dist/clients/apiClient.js.map +1 -1
- package/dist/clients/assetApi.cjs +81 -93
- package/dist/clients/assetApi.cjs.map +1 -1
- package/dist/clients/assetApi.d.cts +105 -0
- package/dist/clients/assetApi.d.cts.map +1 -0
- package/dist/clients/assetApi.d.ts +96 -97
- package/dist/clients/assetApi.d.ts.map +1 -0
- package/dist/clients/assetApi.js +79 -91
- package/dist/clients/assetApi.js.map +1 -1
- package/dist/clients/authenticationApi.cjs +52 -73
- package/dist/clients/authenticationApi.cjs.map +1 -1
- package/dist/clients/authenticationApi.d.cts +20 -0
- package/dist/clients/authenticationApi.d.cts.map +1 -0
- package/dist/clients/authenticationApi.d.ts +18 -13
- package/dist/clients/authenticationApi.d.ts.map +1 -0
- package/dist/clients/authenticationApi.js +52 -73
- package/dist/clients/authenticationApi.js.map +1 -1
- package/dist/clients/contentApi.cjs +94 -103
- package/dist/clients/contentApi.cjs.map +1 -1
- package/dist/clients/contentApi.d.cts +116 -0
- package/dist/clients/contentApi.d.cts.map +1 -0
- package/dist/clients/contentApi.d.ts +102 -98
- package/dist/clients/contentApi.d.ts.map +1 -0
- package/dist/clients/contentApi.js +94 -103
- package/dist/clients/contentApi.js.map +1 -1
- package/dist/clients/coreApi.cjs +123 -145
- package/dist/clients/coreApi.cjs.map +1 -1
- package/dist/clients/coreApi.d.cts +122 -0
- package/dist/clients/coreApi.d.cts.map +1 -0
- package/dist/clients/coreApi.d.ts +111 -109
- package/dist/clients/coreApi.d.ts.map +1 -0
- package/dist/clients/coreApi.js +122 -144
- package/dist/clients/coreApi.js.map +1 -1
- package/dist/clients/customTypesApi.cjs +90 -99
- package/dist/clients/customTypesApi.cjs.map +1 -1
- package/dist/clients/customTypesApi.d.cts +46 -0
- package/dist/clients/customTypesApi.d.cts.map +1 -0
- package/dist/clients/customTypesApi.d.ts +45 -45
- package/dist/clients/customTypesApi.d.ts.map +1 -0
- package/dist/clients/customTypesApi.js +87 -98
- package/dist/clients/customTypesApi.js.map +1 -1
- package/dist/clients/integrationFields.cjs +96 -87
- package/dist/clients/integrationFields.cjs.map +1 -1
- package/dist/clients/integrationFields.d.cts +30 -0
- package/dist/clients/integrationFields.d.cts.map +1 -0
- package/dist/clients/integrationFields.d.ts +27 -22
- package/dist/clients/integrationFields.d.ts.map +1 -0
- package/dist/clients/integrationFields.js +93 -86
- package/dist/clients/integrationFields.js.map +1 -1
- package/dist/clients/manageV2.cjs +154 -171
- package/dist/clients/manageV2.cjs.map +1 -1
- package/dist/clients/manageV2.d.cts +105 -0
- package/dist/clients/manageV2.d.cts.map +1 -0
- package/dist/clients/manageV2.d.ts +103 -111
- package/dist/clients/manageV2.d.ts.map +1 -0
- package/dist/clients/manageV2.js +149 -169
- package/dist/clients/manageV2.js.map +1 -1
- package/dist/clients/migrationApi.cjs +37 -36
- package/dist/clients/migrationApi.cjs.map +1 -1
- package/dist/clients/migrationApi.d.cts +48 -0
- package/dist/clients/migrationApi.d.cts.map +1 -0
- package/dist/clients/migrationApi.d.ts +45 -39
- package/dist/clients/migrationApi.d.ts.map +1 -0
- package/dist/clients/migrationApi.js +35 -34
- package/dist/clients/migrationApi.js.map +1 -1
- package/dist/clients/wroom.cjs +101 -122
- package/dist/clients/wroom.cjs.map +1 -1
- package/dist/clients/wroom.d.cts +48 -0
- package/dist/clients/wroom.d.cts.map +1 -0
- package/dist/clients/wroom.d.ts +46 -47
- package/dist/clients/wroom.d.ts.map +1 -0
- package/dist/clients/wroom.js +99 -122
- package/dist/clients/wroom.js.map +1 -1
- package/dist/index.cjs +13 -15
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -7
- package/dist/index.js +5 -14
- package/dist/managers/repositories.cjs +159 -169
- package/dist/managers/repositories.cjs.map +1 -1
- package/dist/managers/repositories.d.cts +67 -0
- package/dist/managers/repositories.d.cts.map +1 -0
- package/dist/managers/repositories.d.ts +56 -63
- package/dist/managers/repositories.d.ts.map +1 -0
- package/dist/managers/repositories.js +148 -159
- package/dist/managers/repositories.js.map +1 -1
- package/dist/managers/repository.cjs +529 -616
- package/dist/managers/repository.cjs.map +1 -1
- package/dist/managers/repository.d.cts +308 -0
- package/dist/managers/repository.d.cts.map +1 -0
- package/dist/managers/repository.d.ts +303 -307
- package/dist/managers/repository.d.ts.map +1 -0
- package/dist/managers/repository.js +529 -616
- package/dist/managers/repository.js.map +1 -1
- package/dist/types.d.cts +41 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.ts +35 -37
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/cookies.cjs +19 -17
- package/dist/utils/cookies.cjs.map +1 -1
- package/dist/utils/cookies.js +20 -18
- package/dist/utils/cookies.js.map +1 -1
- package/dist/utils/envVariableManager.cjs +33 -34
- package/dist/utils/envVariableManager.cjs.map +1 -1
- package/dist/utils/envVariableManager.js +34 -35
- package/dist/utils/envVariableManager.js.map +1 -1
- package/dist/utils/log.cjs +18 -19
- package/dist/utils/log.cjs.map +1 -1
- package/dist/utils/log.js +18 -21
- package/dist/utils/log.js.map +1 -1
- package/dist/utils/random.cjs +13 -6
- package/dist/utils/random.cjs.map +1 -1
- package/dist/utils/random.js +13 -6
- package/dist/utils/random.js.map +1 -1
- package/dist/utils/strings.cjs +13 -7
- package/dist/utils/strings.cjs.map +1 -1
- package/dist/utils/strings.js +14 -8
- package/dist/utils/strings.js.map +1 -1
- package/dist/utils/urls.cjs +21 -10
- package/dist/utils/urls.cjs.map +1 -1
- package/dist/utils/urls.js +22 -12
- package/dist/utils/urls.js.map +1 -1
- package/package.json +42 -67
- package/src/clients/apiClient.ts +16 -21
- package/src/clients/assetApi.ts +75 -82
- package/src/clients/authenticationApi.ts +25 -27
- package/src/clients/contentApi.ts +109 -129
- package/src/clients/coreApi.ts +113 -117
- package/src/clients/customTypesApi.ts +54 -76
- package/src/clients/integrationFields.ts +59 -74
- package/src/clients/manageV2.ts +72 -96
- package/src/clients/migrationApi.ts +35 -39
- package/src/clients/wroom.ts +42 -56
- package/src/index.ts +7 -7
- package/src/managers/repositories.ts +85 -108
- package/src/managers/repository.ts +303 -368
- package/src/types.ts +31 -31
- package/src/utils/cookies.ts +8 -8
- package/src/utils/envVariableManager.ts +15 -15
- package/src/utils/log.ts +17 -21
- package/src/utils/random.ts +5 -6
- package/src/utils/strings.ts +7 -9
- package/src/utils/urls.ts +10 -12
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/utils/cookies.d.ts +0 -8
- package/dist/utils/envVariableManager.d.ts +0 -16
- package/dist/utils/log.d.ts +0 -5
- package/dist/utils/random.d.ts +0 -8
- package/dist/utils/strings.d.ts +0 -11
- package/dist/utils/urls.d.ts +0 -16
|
@@ -1,100 +1,91 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
async getTypeById(customTypeId) {
|
|
90
|
-
const context = await this.getContext();
|
|
91
|
-
const result = await context.get(`customtypes/${customTypeId}`);
|
|
92
|
-
if (!result.ok()) {
|
|
93
|
-
log.logPlaywrightApiResponse(result);
|
|
94
|
-
throw new Error(`Could not get ${customTypeId} type from the Custom Type api.`);
|
|
95
|
-
}
|
|
96
|
-
return result.json();
|
|
97
|
-
}
|
|
98
|
-
}
|
|
1
|
+
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_log = require("../utils/log.cjs");
|
|
3
|
+
const require_apiClient = require("./apiClient.cjs");
|
|
4
|
+
let lodash_isequal = require("lodash.isequal");
|
|
5
|
+
lodash_isequal = require_runtime.__toESM(lodash_isequal, 1);
|
|
6
|
+
//#region src/clients/customTypesApi.ts
|
|
7
|
+
/** Client for interacting with the Custom Types API to create/update custom types and slices. */
|
|
8
|
+
var CustomTypesApiClient = class extends require_apiClient.AuthenticatedApiClient {
|
|
9
|
+
constructor(baseURL, config) {
|
|
10
|
+
super(baseURL, config.authToken, { repository: config.repository });
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Create or update a custom type or slice.
|
|
14
|
+
*
|
|
15
|
+
* @param endpoint - - The API endpoint for custom types or slices ('customtypes' or 'slices').
|
|
16
|
+
* @param data - - The data representing the custom type or slice.
|
|
17
|
+
* @throws Error if the item status cannot be retrieved or the item cannot be
|
|
18
|
+
* created/updated.
|
|
19
|
+
*/
|
|
20
|
+
async upsert(endpoint, operation, data) {
|
|
21
|
+
const profiler = require_log.logger.startTimer();
|
|
22
|
+
const path = `${endpoint}/${operation}`;
|
|
23
|
+
const result = await (await this.getContext()).post(path, { data });
|
|
24
|
+
if (!result.ok()) {
|
|
25
|
+
require_log.logPlaywrightApiResponse(result);
|
|
26
|
+
throw new Error(`Could not ${operation} item`);
|
|
27
|
+
}
|
|
28
|
+
profiler.done({ message: `called customtypes api /${path} for item with id '${data.id}'` });
|
|
29
|
+
}
|
|
30
|
+
async getRemoteItems(endpoint) {
|
|
31
|
+
const result = await (await this.getContext()).get(endpoint);
|
|
32
|
+
if (!result.ok()) {
|
|
33
|
+
require_log.logPlaywrightApiResponse(result);
|
|
34
|
+
throw new Error("Could not get items status from the Custom Type api.");
|
|
35
|
+
}
|
|
36
|
+
return result.json();
|
|
37
|
+
}
|
|
38
|
+
async getDifference(remoteItems, local) {
|
|
39
|
+
const remoteItem = remoteItems.find((remote) => remote.id === local.id);
|
|
40
|
+
if (!remoteItem) return "insert";
|
|
41
|
+
if (!(0, lodash_isequal.default)(local, remoteItem)) return "update";
|
|
42
|
+
}
|
|
43
|
+
/** Create items only if they have changed compared to their remote status */
|
|
44
|
+
async upsertIfChanged(itemType, localItems = []) {
|
|
45
|
+
const remoteItems = await this.getRemoteItems(itemType);
|
|
46
|
+
await Promise.all(localItems.map(async (localItem) => {
|
|
47
|
+
const operation = await this.getDifference(remoteItems, localItem);
|
|
48
|
+
return operation && this.upsert(itemType, operation, localItem);
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Create Custom Types using the Custom types api.
|
|
53
|
+
*
|
|
54
|
+
* @param customTypes
|
|
55
|
+
*/
|
|
56
|
+
async createCustomTypes(customTypes = []) {
|
|
57
|
+
await this.upsertIfChanged("customtypes", customTypes);
|
|
58
|
+
}
|
|
59
|
+
async deleteCustomType(customTypeId) {
|
|
60
|
+
const result = await (await this.getContext()).delete(`customtypes/${customTypeId}`);
|
|
61
|
+
if (!result.ok()) {
|
|
62
|
+
require_log.logPlaywrightApiResponse(result);
|
|
63
|
+
throw new Error(`Could not delete ${customTypeId} from the Custom Type api.`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Create slices using the Custom types api.
|
|
68
|
+
*
|
|
69
|
+
* @param slices
|
|
70
|
+
*/
|
|
71
|
+
async createSlices(slices = []) {
|
|
72
|
+
await this.upsertIfChanged("slices", slices);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Get a custom type by its id.
|
|
76
|
+
*
|
|
77
|
+
* @param customTypeId - The id of the custom type to get.
|
|
78
|
+
*/
|
|
79
|
+
async getTypeById(customTypeId) {
|
|
80
|
+
const result = await (await this.getContext()).get(`customtypes/${customTypeId}`);
|
|
81
|
+
if (!result.ok()) {
|
|
82
|
+
require_log.logPlaywrightApiResponse(result);
|
|
83
|
+
throw new Error(`Could not get ${customTypeId} type from the Custom Type api.`);
|
|
84
|
+
}
|
|
85
|
+
return result.json();
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
//#endregion
|
|
99
89
|
exports.CustomTypesApiClient = CustomTypesApiClient;
|
|
100
|
-
|
|
90
|
+
|
|
91
|
+
//# sourceMappingURL=customTypesApi.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customTypesApi.cjs","sources":["
|
|
1
|
+
{"version":3,"file":"customTypesApi.cjs","names":["AuthenticatedApiClient","logger"],"sources":["../../src/clients/customTypesApi.ts"],"sourcesContent":["import type { StaticCustomTypeModel, SharedSliceModel } from \"@prismicio/types-internal\"\nimport isEqual from \"lodash.isequal\"\n\nimport { logPlaywrightApiResponse, logger } from \"../utils/log\"\nimport type { AuthServerToken } from \"./apiClient\"\nimport { AuthenticatedApiClient } from \"./apiClient\"\n\ntype ItemType = StaticCustomTypeModel | SharedSliceModel\ntype ItemTypePath = \"customtypes\" | \"slices\"\ntype ItemOperation = \"insert\" | \"update\"\n\n/** Client for interacting with the Custom Types API to create/update custom types and slices. */\nexport class CustomTypesApiClient extends AuthenticatedApiClient {\n\tconstructor(baseURL: string, config: { authToken: AuthServerToken; repository: string }) {\n\t\tsuper(baseURL, config.authToken, { repository: config.repository })\n\t}\n\n\t/**\n\t * Create or update a custom type or slice.\n\t *\n\t * @param endpoint - - The API endpoint for custom types or slices ('customtypes' or 'slices').\n\t * @param data - - The data representing the custom type or slice.\n\t * @throws Error if the item status cannot be retrieved or the item cannot be\n\t * created/updated.\n\t */\n\tprivate async upsert(endpoint: ItemTypePath, operation: ItemOperation, data: ItemType) {\n\t\tconst profiler = logger.startTimer()\n\t\tconst path = `${endpoint}/${operation}`\n\n\t\tconst context = await this.getContext()\n\t\tconst result = await context.post(path, { data })\n\t\tif (!result.ok()) {\n\t\t\tlogPlaywrightApiResponse(result)\n\t\t\tthrow new Error(`Could not ${operation} item`)\n\t\t}\n\t\tprofiler.done({\n\t\t\tmessage: `called customtypes api /${path} for item with id '${data.id}'`,\n\t\t})\n\t}\n\n\tprivate async getRemoteItems(endpoint: ItemTypePath): Promise<StaticCustomTypeModel[] | SharedSliceModel[]> {\n\t\tconst context = await this.getContext()\n\t\tconst result = await context.get(endpoint)\n\n\t\tif (!result.ok()) {\n\t\t\tlogPlaywrightApiResponse(result)\n\t\t\tthrow new Error(\"Could not get items status from the Custom Type api.\")\n\t\t}\n\n\t\treturn result.json()\n\t}\n\n\tprivate async getDifference(\n\t\tremoteItems: StaticCustomTypeModel[] | SharedSliceModel[],\n\t\tlocal: ItemType,\n\t): Promise<ItemOperation | undefined> {\n\t\tconst remoteItem = remoteItems.find(\n\t\t\t(remote: StaticCustomTypeModel | SharedSliceModel) => remote.id === local.id,\n\t\t)\n\t\tif (!remoteItem) {\n\t\t\treturn \"insert\"\n\t\t}\n\t\tif (!isEqual(local, remoteItem)) {\n\t\t\treturn \"update\"\n\t\t}\n\n\t\treturn\n\t}\n\n\t/** Create items only if they have changed compared to their remote status */\n\tprivate async upsertIfChanged(\n\t\titemType: ItemTypePath,\n\t\tlocalItems: ItemType[] = [],\n\t): Promise<void> {\n\t\tconst remoteItems = await this.getRemoteItems(itemType)\n\t\tawait Promise.all(\n\t\t\tlocalItems.map(async (localItem) => {\n\t\t\t\tconst operation = await this.getDifference(remoteItems, localItem)\n\n\t\t\t\treturn operation && this.upsert(itemType, operation, localItem)\n\t\t\t}),\n\t\t)\n\t}\n\n\t/**\n\t * Create Custom Types using the Custom types api.\n\t *\n\t * @param customTypes\n\t */\n\tasync createCustomTypes(customTypes: StaticCustomTypeModel[] = []): Promise<void> {\n\t\tawait this.upsertIfChanged(\"customtypes\", customTypes)\n\t}\n\n\tasync deleteCustomType(customTypeId: string): Promise<void> {\n\t\tconst context = await this.getContext()\n\t\tconst result = await context.delete(`customtypes/${customTypeId}`)\n\n\t\tif (!result.ok()) {\n\t\t\tlogPlaywrightApiResponse(result)\n\t\t\tthrow new Error(`Could not delete ${customTypeId} from the Custom Type api.`)\n\t\t}\n\t}\n\n\t/**\n\t * Create slices using the Custom types api.\n\t *\n\t * @param slices\n\t */\n\tasync createSlices(slices: SharedSliceModel[] = []): Promise<void> {\n\t\tawait this.upsertIfChanged(\"slices\", slices)\n\t}\n\n\t/**\n\t * Get a custom type by its id.\n\t *\n\t * @param customTypeId - The id of the custom type to get.\n\t */\n\tasync getTypeById(customTypeId: string): Promise<StaticCustomTypeModel> {\n\t\tconst context = await this.getContext()\n\t\tconst result = await context.get(`customtypes/${customTypeId}`)\n\n\t\tif (!result.ok()) {\n\t\t\tlogPlaywrightApiResponse(result)\n\t\t\tthrow new Error(`Could not get ${customTypeId} type from the Custom Type api.`)\n\t\t}\n\n\t\treturn result.json()\n\t}\n}\n"],"mappings":";;;;;;;AAYA,IAAa,uBAAb,cAA0CA,kBAAAA,uBAAuB;CAChE,YAAY,SAAiB,QAA4D;EACxF,MAAM,SAAS,OAAO,WAAW,EAAE,YAAY,OAAO,WAAW,CAAC;CACnE;;;;;;;;;CAUA,MAAc,OAAO,UAAwB,WAA0B,MAAgB;EACtF,MAAM,WAAWC,YAAAA,OAAO,WAAW;EACnC,MAAM,OAAO,GAAG,SAAS,GAAG;EAG5B,MAAM,SAAS,OAAM,MADC,KAAK,WAAW,EAAA,CACT,KAAK,MAAM,EAAE,KAAK,CAAC;EAChD,IAAI,CAAC,OAAO,GAAG,GAAG;GACjB,YAAA,yBAAyB,MAAM;GAC/B,MAAM,IAAI,MAAM,aAAa,UAAU,MAAM;EAC9C;EACA,SAAS,KAAK,EACb,SAAS,2BAA2B,KAAK,qBAAqB,KAAK,GAAG,GACvE,CAAC;CACF;CAEA,MAAc,eAAe,UAA+E;EAE3G,MAAM,SAAS,OAAM,MADC,KAAK,WAAW,EAAA,CACT,IAAI,QAAQ;EAEzC,IAAI,CAAC,OAAO,GAAG,GAAG;GACjB,YAAA,yBAAyB,MAAM;GAC/B,MAAM,IAAI,MAAM,sDAAsD;EACvE;EAEA,OAAO,OAAO,KAAK;CACpB;CAEA,MAAc,cACb,aACA,OACqC;EACrC,MAAM,aAAa,YAAY,MAC7B,WAAqD,OAAO,OAAO,MAAM,EAC3E;EACA,IAAI,CAAC,YACJ,OAAO;EAER,IAAI,EAAA,GAAA,eAAA,QAAA,CAAS,OAAO,UAAU,GAC7B,OAAO;CAIT;;CAGA,MAAc,gBACb,UACA,aAAyB,CAAC,GACV;EAChB,MAAM,cAAc,MAAM,KAAK,eAAe,QAAQ;EACtD,MAAM,QAAQ,IACb,WAAW,IAAI,OAAO,cAAc;GACnC,MAAM,YAAY,MAAM,KAAK,cAAc,aAAa,SAAS;GAEjE,OAAO,aAAa,KAAK,OAAO,UAAU,WAAW,SAAS;EAC/D,CAAC,CACF;CACD;;;;;;CAOA,MAAM,kBAAkB,cAAuC,CAAC,GAAkB;EACjF,MAAM,KAAK,gBAAgB,eAAe,WAAW;CACtD;CAEA,MAAM,iBAAiB,cAAqC;EAE3D,MAAM,SAAS,OAAM,MADC,KAAK,WAAW,EAAA,CACT,OAAO,eAAe,cAAc;EAEjE,IAAI,CAAC,OAAO,GAAG,GAAG;GACjB,YAAA,yBAAyB,MAAM;GAC/B,MAAM,IAAI,MAAM,oBAAoB,aAAa,2BAA2B;EAC7E;CACD;;;;;;CAOA,MAAM,aAAa,SAA6B,CAAC,GAAkB;EAClE,MAAM,KAAK,gBAAgB,UAAU,MAAM;CAC5C;;;;;;CAOA,MAAM,YAAY,cAAsD;EAEvE,MAAM,SAAS,OAAM,MADC,KAAK,WAAW,EAAA,CACT,IAAI,eAAe,cAAc;EAE9D,IAAI,CAAC,OAAO,GAAG,GAAG;GACjB,YAAA,yBAAyB,MAAM;GAC/B,MAAM,IAAI,MAAM,iBAAiB,aAAa,gCAAgC;EAC/E;EAEA,OAAO,OAAO,KAAK;CACpB;AACD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AuthServerToken, AuthenticatedApiClient } from "./apiClient.cjs";
|
|
2
|
+
import { SharedSliceModel, StaticCustomTypeModel } from "@prismicio/types-internal";
|
|
3
|
+
|
|
4
|
+
//#region src/clients/customTypesApi.d.ts
|
|
5
|
+
/** Client for interacting with the Custom Types API to create/update custom types and slices. */
|
|
6
|
+
declare class CustomTypesApiClient extends AuthenticatedApiClient {
|
|
7
|
+
constructor(baseURL: string, config: {
|
|
8
|
+
authToken: AuthServerToken;
|
|
9
|
+
repository: string;
|
|
10
|
+
});
|
|
11
|
+
/**
|
|
12
|
+
* Create or update a custom type or slice.
|
|
13
|
+
*
|
|
14
|
+
* @param endpoint - - The API endpoint for custom types or slices ('customtypes' or 'slices').
|
|
15
|
+
* @param data - - The data representing the custom type or slice.
|
|
16
|
+
* @throws Error if the item status cannot be retrieved or the item cannot be
|
|
17
|
+
* created/updated.
|
|
18
|
+
*/
|
|
19
|
+
private upsert;
|
|
20
|
+
private getRemoteItems;
|
|
21
|
+
private getDifference;
|
|
22
|
+
/** Create items only if they have changed compared to their remote status */
|
|
23
|
+
private upsertIfChanged;
|
|
24
|
+
/**
|
|
25
|
+
* Create Custom Types using the Custom types api.
|
|
26
|
+
*
|
|
27
|
+
* @param customTypes
|
|
28
|
+
*/
|
|
29
|
+
createCustomTypes(customTypes?: StaticCustomTypeModel[]): Promise<void>;
|
|
30
|
+
deleteCustomType(customTypeId: string): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Create slices using the Custom types api.
|
|
33
|
+
*
|
|
34
|
+
* @param slices
|
|
35
|
+
*/
|
|
36
|
+
createSlices(slices?: SharedSliceModel[]): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Get a custom type by its id.
|
|
39
|
+
*
|
|
40
|
+
* @param customTypeId - The id of the custom type to get.
|
|
41
|
+
*/
|
|
42
|
+
getTypeById(customTypeId: string): Promise<StaticCustomTypeModel>;
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { CustomTypesApiClient };
|
|
46
|
+
//# sourceMappingURL=customTypesApi.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customTypesApi.d.cts","names":[],"sources":["../../src/clients/customTypesApi.ts"],"mappings":";;;;;cAYa,oBAAA,SAA6B,sBAAA;cAC7B,OAAA,UAAiB,MAAA;IAAU,SAAA,EAAW,eAAA;IAAiB,UAAA;EAAA;EA4EC;;;;;;;;EAAA,QAhEtD,MAAA;EAAA,QAeA,cAAA;EAAA,QAYA,aAAA;EAvCF;EAAA,QAyDE,eAAA;EAzDoC;;;;;EA4E5C,iBAAA,CAAkB,WAAA,GAAa,qBAAA,KAA+B,OAAA;EAI9D,gBAAA,CAAiB,YAAA,WAAuB,OAAA;EAJxC;;;;;EAmBA,YAAA,CAAa,MAAA,GAAQ,gBAAA,KAA0B,OAAA;EAfP;;;;;EAwBxC,WAAA,CAAY,YAAA,WAAuB,OAAA,CAAQ,qBAAA;AAAA"}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
* @param customTypeId - The id of the custom type to get.
|
|
44
|
-
*/
|
|
45
|
-
getTypeById(customTypeId: string): Promise<CustomType>;
|
|
1
|
+
import { AuthServerToken, AuthenticatedApiClient } from "./apiClient.js";
|
|
2
|
+
import { SharedSliceModel, StaticCustomTypeModel } from "@prismicio/types-internal";
|
|
3
|
+
|
|
4
|
+
//#region src/clients/customTypesApi.d.ts
|
|
5
|
+
/** Client for interacting with the Custom Types API to create/update custom types and slices. */
|
|
6
|
+
declare class CustomTypesApiClient extends AuthenticatedApiClient {
|
|
7
|
+
constructor(baseURL: string, config: {
|
|
8
|
+
authToken: AuthServerToken;
|
|
9
|
+
repository: string;
|
|
10
|
+
});
|
|
11
|
+
/**
|
|
12
|
+
* Create or update a custom type or slice.
|
|
13
|
+
*
|
|
14
|
+
* @param endpoint - - The API endpoint for custom types or slices ('customtypes' or 'slices').
|
|
15
|
+
* @param data - - The data representing the custom type or slice.
|
|
16
|
+
* @throws Error if the item status cannot be retrieved or the item cannot be
|
|
17
|
+
* created/updated.
|
|
18
|
+
*/
|
|
19
|
+
private upsert;
|
|
20
|
+
private getRemoteItems;
|
|
21
|
+
private getDifference;
|
|
22
|
+
/** Create items only if they have changed compared to their remote status */
|
|
23
|
+
private upsertIfChanged;
|
|
24
|
+
/**
|
|
25
|
+
* Create Custom Types using the Custom types api.
|
|
26
|
+
*
|
|
27
|
+
* @param customTypes
|
|
28
|
+
*/
|
|
29
|
+
createCustomTypes(customTypes?: StaticCustomTypeModel[]): Promise<void>;
|
|
30
|
+
deleteCustomType(customTypeId: string): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Create slices using the Custom types api.
|
|
33
|
+
*
|
|
34
|
+
* @param slices
|
|
35
|
+
*/
|
|
36
|
+
createSlices(slices?: SharedSliceModel[]): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Get a custom type by its id.
|
|
39
|
+
*
|
|
40
|
+
* @param customTypeId - The id of the custom type to get.
|
|
41
|
+
*/
|
|
42
|
+
getTypeById(customTypeId: string): Promise<StaticCustomTypeModel>;
|
|
46
43
|
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { CustomTypesApiClient };
|
|
46
|
+
//# sourceMappingURL=customTypesApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customTypesApi.d.ts","names":[],"sources":["../../src/clients/customTypesApi.ts"],"mappings":";;;;;cAYa,oBAAA,SAA6B,sBAAA;cAC7B,OAAA,UAAiB,MAAA;IAAU,SAAA,EAAW,eAAA;IAAiB,UAAA;EAAA;EA4EC;;;;;;;;EAAA,QAhEtD,MAAA;EAAA,QAeA,cAAA;EAAA,QAYA,aAAA;EAvCF;EAAA,QAyDE,eAAA;EAzDoC;;;;;EA4E5C,iBAAA,CAAkB,WAAA,GAAa,qBAAA,KAA+B,OAAA;EAI9D,gBAAA,CAAiB,YAAA,WAAuB,OAAA;EAJxC;;;;;EAmBA,YAAA,CAAa,MAAA,GAAQ,gBAAA,KAA0B,OAAA;EAfP;;;;;EAwBxC,WAAA,CAAY,YAAA,WAAuB,OAAA,CAAQ,qBAAA;AAAA"}
|
|
@@ -1,100 +1,89 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { logger, logPlaywrightApiResponse } from "../utils/log.js";
|
|
1
|
+
import { logPlaywrightApiResponse, logger } from "../utils/log.js";
|
|
3
2
|
import { AuthenticatedApiClient } from "./apiClient.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
*/
|
|
87
|
-
async getTypeById(customTypeId) {
|
|
88
|
-
const context = await this.getContext();
|
|
89
|
-
const result = await context.get(`customtypes/${customTypeId}`);
|
|
90
|
-
if (!result.ok()) {
|
|
91
|
-
logPlaywrightApiResponse(result);
|
|
92
|
-
throw new Error(`Could not get ${customTypeId} type from the Custom Type api.`);
|
|
93
|
-
}
|
|
94
|
-
return result.json();
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
export {
|
|
98
|
-
CustomTypesApiClient
|
|
3
|
+
import isEqual from "lodash.isequal";
|
|
4
|
+
//#region src/clients/customTypesApi.ts
|
|
5
|
+
/** Client for interacting with the Custom Types API to create/update custom types and slices. */
|
|
6
|
+
var CustomTypesApiClient = class extends AuthenticatedApiClient {
|
|
7
|
+
constructor(baseURL, config) {
|
|
8
|
+
super(baseURL, config.authToken, { repository: config.repository });
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Create or update a custom type or slice.
|
|
12
|
+
*
|
|
13
|
+
* @param endpoint - - The API endpoint for custom types or slices ('customtypes' or 'slices').
|
|
14
|
+
* @param data - - The data representing the custom type or slice.
|
|
15
|
+
* @throws Error if the item status cannot be retrieved or the item cannot be
|
|
16
|
+
* created/updated.
|
|
17
|
+
*/
|
|
18
|
+
async upsert(endpoint, operation, data) {
|
|
19
|
+
const profiler = logger.startTimer();
|
|
20
|
+
const path = `${endpoint}/${operation}`;
|
|
21
|
+
const result = await (await this.getContext()).post(path, { data });
|
|
22
|
+
if (!result.ok()) {
|
|
23
|
+
logPlaywrightApiResponse(result);
|
|
24
|
+
throw new Error(`Could not ${operation} item`);
|
|
25
|
+
}
|
|
26
|
+
profiler.done({ message: `called customtypes api /${path} for item with id '${data.id}'` });
|
|
27
|
+
}
|
|
28
|
+
async getRemoteItems(endpoint) {
|
|
29
|
+
const result = await (await this.getContext()).get(endpoint);
|
|
30
|
+
if (!result.ok()) {
|
|
31
|
+
logPlaywrightApiResponse(result);
|
|
32
|
+
throw new Error("Could not get items status from the Custom Type api.");
|
|
33
|
+
}
|
|
34
|
+
return result.json();
|
|
35
|
+
}
|
|
36
|
+
async getDifference(remoteItems, local) {
|
|
37
|
+
const remoteItem = remoteItems.find((remote) => remote.id === local.id);
|
|
38
|
+
if (!remoteItem) return "insert";
|
|
39
|
+
if (!isEqual(local, remoteItem)) return "update";
|
|
40
|
+
}
|
|
41
|
+
/** Create items only if they have changed compared to their remote status */
|
|
42
|
+
async upsertIfChanged(itemType, localItems = []) {
|
|
43
|
+
const remoteItems = await this.getRemoteItems(itemType);
|
|
44
|
+
await Promise.all(localItems.map(async (localItem) => {
|
|
45
|
+
const operation = await this.getDifference(remoteItems, localItem);
|
|
46
|
+
return operation && this.upsert(itemType, operation, localItem);
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Create Custom Types using the Custom types api.
|
|
51
|
+
*
|
|
52
|
+
* @param customTypes
|
|
53
|
+
*/
|
|
54
|
+
async createCustomTypes(customTypes = []) {
|
|
55
|
+
await this.upsertIfChanged("customtypes", customTypes);
|
|
56
|
+
}
|
|
57
|
+
async deleteCustomType(customTypeId) {
|
|
58
|
+
const result = await (await this.getContext()).delete(`customtypes/${customTypeId}`);
|
|
59
|
+
if (!result.ok()) {
|
|
60
|
+
logPlaywrightApiResponse(result);
|
|
61
|
+
throw new Error(`Could not delete ${customTypeId} from the Custom Type api.`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Create slices using the Custom types api.
|
|
66
|
+
*
|
|
67
|
+
* @param slices
|
|
68
|
+
*/
|
|
69
|
+
async createSlices(slices = []) {
|
|
70
|
+
await this.upsertIfChanged("slices", slices);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Get a custom type by its id.
|
|
74
|
+
*
|
|
75
|
+
* @param customTypeId - The id of the custom type to get.
|
|
76
|
+
*/
|
|
77
|
+
async getTypeById(customTypeId) {
|
|
78
|
+
const result = await (await this.getContext()).get(`customtypes/${customTypeId}`);
|
|
79
|
+
if (!result.ok()) {
|
|
80
|
+
logPlaywrightApiResponse(result);
|
|
81
|
+
throw new Error(`Could not get ${customTypeId} type from the Custom Type api.`);
|
|
82
|
+
}
|
|
83
|
+
return result.json();
|
|
84
|
+
}
|
|
99
85
|
};
|
|
100
|
-
//#
|
|
86
|
+
//#endregion
|
|
87
|
+
export { CustomTypesApiClient };
|
|
88
|
+
|
|
89
|
+
//# sourceMappingURL=customTypesApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customTypesApi.js","sources":["
|
|
1
|
+
{"version":3,"file":"customTypesApi.js","names":[],"sources":["../../src/clients/customTypesApi.ts"],"sourcesContent":["import type { StaticCustomTypeModel, SharedSliceModel } from \"@prismicio/types-internal\"\nimport isEqual from \"lodash.isequal\"\n\nimport { logPlaywrightApiResponse, logger } from \"../utils/log\"\nimport type { AuthServerToken } from \"./apiClient\"\nimport { AuthenticatedApiClient } from \"./apiClient\"\n\ntype ItemType = StaticCustomTypeModel | SharedSliceModel\ntype ItemTypePath = \"customtypes\" | \"slices\"\ntype ItemOperation = \"insert\" | \"update\"\n\n/** Client for interacting with the Custom Types API to create/update custom types and slices. */\nexport class CustomTypesApiClient extends AuthenticatedApiClient {\n\tconstructor(baseURL: string, config: { authToken: AuthServerToken; repository: string }) {\n\t\tsuper(baseURL, config.authToken, { repository: config.repository })\n\t}\n\n\t/**\n\t * Create or update a custom type or slice.\n\t *\n\t * @param endpoint - - The API endpoint for custom types or slices ('customtypes' or 'slices').\n\t * @param data - - The data representing the custom type or slice.\n\t * @throws Error if the item status cannot be retrieved or the item cannot be\n\t * created/updated.\n\t */\n\tprivate async upsert(endpoint: ItemTypePath, operation: ItemOperation, data: ItemType) {\n\t\tconst profiler = logger.startTimer()\n\t\tconst path = `${endpoint}/${operation}`\n\n\t\tconst context = await this.getContext()\n\t\tconst result = await context.post(path, { data })\n\t\tif (!result.ok()) {\n\t\t\tlogPlaywrightApiResponse(result)\n\t\t\tthrow new Error(`Could not ${operation} item`)\n\t\t}\n\t\tprofiler.done({\n\t\t\tmessage: `called customtypes api /${path} for item with id '${data.id}'`,\n\t\t})\n\t}\n\n\tprivate async getRemoteItems(endpoint: ItemTypePath): Promise<StaticCustomTypeModel[] | SharedSliceModel[]> {\n\t\tconst context = await this.getContext()\n\t\tconst result = await context.get(endpoint)\n\n\t\tif (!result.ok()) {\n\t\t\tlogPlaywrightApiResponse(result)\n\t\t\tthrow new Error(\"Could not get items status from the Custom Type api.\")\n\t\t}\n\n\t\treturn result.json()\n\t}\n\n\tprivate async getDifference(\n\t\tremoteItems: StaticCustomTypeModel[] | SharedSliceModel[],\n\t\tlocal: ItemType,\n\t): Promise<ItemOperation | undefined> {\n\t\tconst remoteItem = remoteItems.find(\n\t\t\t(remote: StaticCustomTypeModel | SharedSliceModel) => remote.id === local.id,\n\t\t)\n\t\tif (!remoteItem) {\n\t\t\treturn \"insert\"\n\t\t}\n\t\tif (!isEqual(local, remoteItem)) {\n\t\t\treturn \"update\"\n\t\t}\n\n\t\treturn\n\t}\n\n\t/** Create items only if they have changed compared to their remote status */\n\tprivate async upsertIfChanged(\n\t\titemType: ItemTypePath,\n\t\tlocalItems: ItemType[] = [],\n\t): Promise<void> {\n\t\tconst remoteItems = await this.getRemoteItems(itemType)\n\t\tawait Promise.all(\n\t\t\tlocalItems.map(async (localItem) => {\n\t\t\t\tconst operation = await this.getDifference(remoteItems, localItem)\n\n\t\t\t\treturn operation && this.upsert(itemType, operation, localItem)\n\t\t\t}),\n\t\t)\n\t}\n\n\t/**\n\t * Create Custom Types using the Custom types api.\n\t *\n\t * @param customTypes\n\t */\n\tasync createCustomTypes(customTypes: StaticCustomTypeModel[] = []): Promise<void> {\n\t\tawait this.upsertIfChanged(\"customtypes\", customTypes)\n\t}\n\n\tasync deleteCustomType(customTypeId: string): Promise<void> {\n\t\tconst context = await this.getContext()\n\t\tconst result = await context.delete(`customtypes/${customTypeId}`)\n\n\t\tif (!result.ok()) {\n\t\t\tlogPlaywrightApiResponse(result)\n\t\t\tthrow new Error(`Could not delete ${customTypeId} from the Custom Type api.`)\n\t\t}\n\t}\n\n\t/**\n\t * Create slices using the Custom types api.\n\t *\n\t * @param slices\n\t */\n\tasync createSlices(slices: SharedSliceModel[] = []): Promise<void> {\n\t\tawait this.upsertIfChanged(\"slices\", slices)\n\t}\n\n\t/**\n\t * Get a custom type by its id.\n\t *\n\t * @param customTypeId - The id of the custom type to get.\n\t */\n\tasync getTypeById(customTypeId: string): Promise<StaticCustomTypeModel> {\n\t\tconst context = await this.getContext()\n\t\tconst result = await context.get(`customtypes/${customTypeId}`)\n\n\t\tif (!result.ok()) {\n\t\t\tlogPlaywrightApiResponse(result)\n\t\t\tthrow new Error(`Could not get ${customTypeId} type from the Custom Type api.`)\n\t\t}\n\n\t\treturn result.json()\n\t}\n}\n"],"mappings":";;;;;AAYA,IAAa,uBAAb,cAA0C,uBAAuB;CAChE,YAAY,SAAiB,QAA4D;EACxF,MAAM,SAAS,OAAO,WAAW,EAAE,YAAY,OAAO,WAAW,CAAC;CACnE;;;;;;;;;CAUA,MAAc,OAAO,UAAwB,WAA0B,MAAgB;EACtF,MAAM,WAAW,OAAO,WAAW;EACnC,MAAM,OAAO,GAAG,SAAS,GAAG;EAG5B,MAAM,SAAS,OAAM,MADC,KAAK,WAAW,EAAA,CACT,KAAK,MAAM,EAAE,KAAK,CAAC;EAChD,IAAI,CAAC,OAAO,GAAG,GAAG;GACjB,yBAAyB,MAAM;GAC/B,MAAM,IAAI,MAAM,aAAa,UAAU,MAAM;EAC9C;EACA,SAAS,KAAK,EACb,SAAS,2BAA2B,KAAK,qBAAqB,KAAK,GAAG,GACvE,CAAC;CACF;CAEA,MAAc,eAAe,UAA+E;EAE3G,MAAM,SAAS,OAAM,MADC,KAAK,WAAW,EAAA,CACT,IAAI,QAAQ;EAEzC,IAAI,CAAC,OAAO,GAAG,GAAG;GACjB,yBAAyB,MAAM;GAC/B,MAAM,IAAI,MAAM,sDAAsD;EACvE;EAEA,OAAO,OAAO,KAAK;CACpB;CAEA,MAAc,cACb,aACA,OACqC;EACrC,MAAM,aAAa,YAAY,MAC7B,WAAqD,OAAO,OAAO,MAAM,EAC3E;EACA,IAAI,CAAC,YACJ,OAAO;EAER,IAAI,CAAC,QAAQ,OAAO,UAAU,GAC7B,OAAO;CAIT;;CAGA,MAAc,gBACb,UACA,aAAyB,CAAC,GACV;EAChB,MAAM,cAAc,MAAM,KAAK,eAAe,QAAQ;EACtD,MAAM,QAAQ,IACb,WAAW,IAAI,OAAO,cAAc;GACnC,MAAM,YAAY,MAAM,KAAK,cAAc,aAAa,SAAS;GAEjE,OAAO,aAAa,KAAK,OAAO,UAAU,WAAW,SAAS;EAC/D,CAAC,CACF;CACD;;;;;;CAOA,MAAM,kBAAkB,cAAuC,CAAC,GAAkB;EACjF,MAAM,KAAK,gBAAgB,eAAe,WAAW;CACtD;CAEA,MAAM,iBAAiB,cAAqC;EAE3D,MAAM,SAAS,OAAM,MADC,KAAK,WAAW,EAAA,CACT,OAAO,eAAe,cAAc;EAEjE,IAAI,CAAC,OAAO,GAAG,GAAG;GACjB,yBAAyB,MAAM;GAC/B,MAAM,IAAI,MAAM,oBAAoB,aAAa,2BAA2B;EAC7E;CACD;;;;;;CAOA,MAAM,aAAa,SAA6B,CAAC,GAAkB;EAClE,MAAM,KAAK,gBAAgB,UAAU,MAAM;CAC5C;;;;;;CAOA,MAAM,YAAY,cAAsD;EAEvE,MAAM,SAAS,OAAM,MADC,KAAK,WAAW,EAAA,CACT,IAAI,eAAe,cAAc;EAE9D,IAAI,CAAC,OAAO,GAAG,GAAG;GACjB,yBAAyB,MAAM;GAC/B,MAAM,IAAI,MAAM,iBAAiB,aAAa,gCAAgC;EAC/E;EAEA,OAAO,OAAO,KAAK;CACpB;AACD"}
|