@minecraft/api-docs-generator 1.0.0
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/CHANGELOG.json +20 -0
- package/CHANGELOG.md +13 -0
- package/README.md +92 -0
- package/lib/ChangelogStrategy.d.ts +39 -0
- package/lib/ChangelogStrategy.js +114 -0
- package/lib/ChangelogStrategy.js.map +1 -0
- package/lib/Config.d.ts +76 -0
- package/lib/Config.js +68 -0
- package/lib/Config.js.map +1 -0
- package/lib/Context.d.ts +28 -0
- package/lib/Context.js +323 -0
- package/lib/Context.js.map +1 -0
- package/lib/FileLoader.d.ts +13 -0
- package/lib/FileLoader.js +91 -0
- package/lib/FileLoader.js.map +1 -0
- package/lib/Logger.d.ts +65 -0
- package/lib/Logger.js +179 -0
- package/lib/Logger.js.map +1 -0
- package/lib/MinecraftRelease.d.ts +37 -0
- package/lib/MinecraftRelease.js +157 -0
- package/lib/MinecraftRelease.js.map +1 -0
- package/lib/PrettierConfiguration.d.ts +2 -0
- package/lib/PrettierConfiguration.js +17 -0
- package/lib/PrettierConfiguration.js.map +1 -0
- package/lib/changelog.d.ts +11 -0
- package/lib/changelog.js +459 -0
- package/lib/changelog.js.map +1 -0
- package/lib/cli.d.ts +2 -0
- package/lib/cli.js +172 -0
- package/lib/cli.js.map +1 -0
- package/lib/filters/CommandFilters.d.ts +2 -0
- package/lib/filters/CommandFilters.js +171 -0
- package/lib/filters/CommandFilters.js.map +1 -0
- package/lib/filters/CommonFilters.d.ts +2 -0
- package/lib/filters/CommonFilters.js +2518 -0
- package/lib/filters/CommonFilters.js.map +1 -0
- package/lib/filters/Filters.d.ts +17 -0
- package/lib/filters/Filters.js +5 -0
- package/lib/filters/Filters.js.map +1 -0
- package/lib/filters/MarkdownFilters.d.ts +2 -0
- package/lib/filters/MarkdownFilters.js +63 -0
- package/lib/filters/MarkdownFilters.js.map +1 -0
- package/lib/filters/TypeScriptFilters.d.ts +2 -0
- package/lib/filters/TypeScriptFilters.js +387 -0
- package/lib/filters/TypeScriptFilters.js.map +1 -0
- package/lib/filters/index.d.ts +4 -0
- package/lib/filters/index.js +23 -0
- package/lib/filters/index.js.map +1 -0
- package/lib/generator.d.ts +8 -0
- package/lib/generator.js +511 -0
- package/lib/generator.js.map +1 -0
- package/lib/index.d.ts +16 -0
- package/lib/index.js +50 -0
- package/lib/index.js.map +1 -0
- package/lib/modules/IMinecraftModule.d.ts +123 -0
- package/lib/modules/IMinecraftModule.js +71 -0
- package/lib/modules/IMinecraftModule.js.map +1 -0
- package/lib/modules/KeyToTypeMapping.d.ts +77 -0
- package/lib/modules/KeyToTypeMapping.js +5 -0
- package/lib/modules/KeyToTypeMapping.js.map +1 -0
- package/lib/modules/MinecraftAfterEventsOrderModule.d.ts +57 -0
- package/lib/modules/MinecraftAfterEventsOrderModule.js +28 -0
- package/lib/modules/MinecraftAfterEventsOrderModule.js.map +1 -0
- package/lib/modules/MinecraftBlockModule.d.ts +139 -0
- package/lib/modules/MinecraftBlockModule.js +37 -0
- package/lib/modules/MinecraftBlockModule.js.map +1 -0
- package/lib/modules/MinecraftChangelogTypes.d.ts +60 -0
- package/lib/modules/MinecraftChangelogTypes.js +17 -0
- package/lib/modules/MinecraftChangelogTypes.js.map +1 -0
- package/lib/modules/MinecraftCommandModule.d.ts +270 -0
- package/lib/modules/MinecraftCommandModule.js +87 -0
- package/lib/modules/MinecraftCommandModule.js.map +1 -0
- package/lib/modules/MinecraftDimensionsModule.d.ts +44 -0
- package/lib/modules/MinecraftDimensionsModule.js +11 -0
- package/lib/modules/MinecraftDimensionsModule.js.map +1 -0
- package/lib/modules/MinecraftDocsTypes.d.ts +475 -0
- package/lib/modules/MinecraftDocsTypes.js +77 -0
- package/lib/modules/MinecraftDocsTypes.js.map +1 -0
- package/lib/modules/MinecraftEffectsModule.d.ts +44 -0
- package/lib/modules/MinecraftEffectsModule.js +11 -0
- package/lib/modules/MinecraftEffectsModule.js.map +1 -0
- package/lib/modules/MinecraftEnchantmentsModule.d.ts +44 -0
- package/lib/modules/MinecraftEnchantmentsModule.js +11 -0
- package/lib/modules/MinecraftEnchantmentsModule.js.map +1 -0
- package/lib/modules/MinecraftEngineDataModules.d.ts +2 -0
- package/lib/modules/MinecraftEngineDataModules.js +5 -0
- package/lib/modules/MinecraftEngineDataModules.js.map +1 -0
- package/lib/modules/MinecraftEntitiesModule.d.ts +44 -0
- package/lib/modules/MinecraftEntitiesModule.js +11 -0
- package/lib/modules/MinecraftEntitiesModule.js.map +1 -0
- package/lib/modules/MinecraftItemsModule.d.ts +44 -0
- package/lib/modules/MinecraftItemsModule.js +11 -0
- package/lib/modules/MinecraftItemsModule.js.map +1 -0
- package/lib/modules/MinecraftSchemaObject.d.ts +16 -0
- package/lib/modules/MinecraftSchemaObject.js +5 -0
- package/lib/modules/MinecraftSchemaObject.js.map +1 -0
- package/lib/modules/MinecraftScriptModule.d.ts +3677 -0
- package/lib/modules/MinecraftScriptModule.js +374 -0
- package/lib/modules/MinecraftScriptModule.js.map +1 -0
- package/lib/modules/MinecraftVanillaDataModules.d.ts +4 -0
- package/lib/modules/MinecraftVanillaDataModules.js +9 -0
- package/lib/modules/MinecraftVanillaDataModules.js.map +1 -0
- package/lib/modules/index.d.ts +15 -0
- package/lib/modules/index.js +34 -0
- package/lib/modules/index.js.map +1 -0
- package/lib/plugins/MarkupGenerator.d.ts +28 -0
- package/lib/plugins/MarkupGenerator.js +5 -0
- package/lib/plugins/MarkupGenerator.js.map +1 -0
- package/lib/plugins/Plugin.d.ts +16 -0
- package/lib/plugins/Plugin.js +5 -0
- package/lib/plugins/Plugin.js.map +1 -0
- package/lib/plugins/index.d.ts +2 -0
- package/lib/plugins/index.js +21 -0
- package/lib/plugins/index.js.map +1 -0
- package/lib/test/commonFilterUnitTests.spec.d.ts +1 -0
- package/lib/test/commonFilterUnitTests.spec.js +85 -0
- package/lib/test/commonFilterUnitTests.spec.js.map +1 -0
- package/lib/test/diffingUnitTests.test.d.ts +1 -0
- package/lib/test/diffingUnitTests.test.js +238 -0
- package/lib/test/diffingUnitTests.test.js.map +1 -0
- package/lib/test/scanObjectUnitTests.test.d.ts +1 -0
- package/lib/test/scanObjectUnitTests.test.js +162 -0
- package/lib/test/scanObjectUnitTests.test.js.map +1 -0
- package/lib/test/versionParsing.test.d.ts +1 -0
- package/lib/test/versionParsing.test.js +147 -0
- package/lib/test/versionParsing.test.js.map +1 -0
- package/lib/utilities/AppendVersion.d.ts +8 -0
- package/lib/utilities/AppendVersion.js +46 -0
- package/lib/utilities/AppendVersion.js.map +1 -0
- package/lib/utilities/Complete.d.ts +7 -0
- package/lib/utilities/Complete.js +5 -0
- package/lib/utilities/Complete.js.map +1 -0
- package/lib/utilities/DeepCopyJson.d.ts +4 -0
- package/lib/utilities/DeepCopyJson.js +46 -0
- package/lib/utilities/DeepCopyJson.js.map +1 -0
- package/lib/utilities/GetFiles.d.ts +3 -0
- package/lib/utilities/GetFiles.js +44 -0
- package/lib/utilities/GetFiles.js.map +1 -0
- package/lib/utilities/LongestCommonSubsequence.d.ts +3 -0
- package/lib/utilities/LongestCommonSubsequence.js +123 -0
- package/lib/utilities/LongestCommonSubsequence.js.map +1 -0
- package/lib/utilities/MergeArrays.d.ts +1 -0
- package/lib/utilities/MergeArrays.js +15 -0
- package/lib/utilities/MergeArrays.js.map +1 -0
- package/lib/utilities/RemoveProperty.d.ts +1 -0
- package/lib/utilities/RemoveProperty.js +16 -0
- package/lib/utilities/RemoveProperty.js.map +1 -0
- package/lib/utilities/ScanObject.d.ts +13 -0
- package/lib/utilities/ScanObject.js +101 -0
- package/lib/utilities/ScanObject.js.map +1 -0
- package/lib/utilities/SortComparers.d.ts +3 -0
- package/lib/utilities/SortComparers.js +21 -0
- package/lib/utilities/SortComparers.js.map +1 -0
- package/lib/utilities/index.d.ts +9 -0
- package/lib/utilities/index.js +28 -0
- package/lib/utilities/index.js.map +1 -0
- package/package.json +72 -0
package/lib/changelog.js
ADDED
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
28
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.ChangelogGenerator = void 0;
|
|
32
|
+
const deep_equal_1 = __importDefault(require("deep-equal"));
|
|
33
|
+
const utils = __importStar(require("./utilities"));
|
|
34
|
+
const TypeDataLayout = {
|
|
35
|
+
type: 'value',
|
|
36
|
+
ignoredSubmembers: ['from_module'],
|
|
37
|
+
};
|
|
38
|
+
const VersionDataLayout = {
|
|
39
|
+
type: 'array',
|
|
40
|
+
key: 'version',
|
|
41
|
+
};
|
|
42
|
+
const ModuleDependenciesDataLayout = {
|
|
43
|
+
type: 'array',
|
|
44
|
+
key: 'name',
|
|
45
|
+
submembers: {
|
|
46
|
+
versions: VersionDataLayout,
|
|
47
|
+
types_only: { type: 'value' },
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
const scriptingDataLayout = {
|
|
51
|
+
type: 'object',
|
|
52
|
+
key: 'name',
|
|
53
|
+
submembers: {
|
|
54
|
+
dependencies: ModuleDependenciesDataLayout,
|
|
55
|
+
peer_dependencies: ModuleDependenciesDataLayout,
|
|
56
|
+
classes: {
|
|
57
|
+
type: 'array',
|
|
58
|
+
key: 'name',
|
|
59
|
+
submembers: {
|
|
60
|
+
properties: {
|
|
61
|
+
type: 'array',
|
|
62
|
+
key: 'name',
|
|
63
|
+
submembers: {
|
|
64
|
+
is_read_only: { type: 'value' },
|
|
65
|
+
get_privilege: { type: 'array', key: 'name' },
|
|
66
|
+
set_privilege: { type: 'array', key: 'name' },
|
|
67
|
+
type: TypeDataLayout,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
functions: {
|
|
71
|
+
type: 'array',
|
|
72
|
+
key: 'name',
|
|
73
|
+
submembers: {
|
|
74
|
+
arguments: {
|
|
75
|
+
type: 'array',
|
|
76
|
+
key: 'name',
|
|
77
|
+
submembers: {
|
|
78
|
+
type: TypeDataLayout,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
call_privilege: { type: 'array', key: 'name' },
|
|
82
|
+
return_type: TypeDataLayout,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
constants: {
|
|
86
|
+
type: 'array',
|
|
87
|
+
key: 'name',
|
|
88
|
+
submembers: { value: { type: 'value' } },
|
|
89
|
+
},
|
|
90
|
+
base_types: { type: 'array', key: 'name' },
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
interfaces: {
|
|
94
|
+
type: 'array',
|
|
95
|
+
key: 'name',
|
|
96
|
+
submembers: {
|
|
97
|
+
properties: {
|
|
98
|
+
type: 'array',
|
|
99
|
+
key: 'name',
|
|
100
|
+
submembers: { is_read_only: { type: 'value' }, type: TypeDataLayout },
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
errors: {
|
|
105
|
+
type: 'array',
|
|
106
|
+
key: 'name',
|
|
107
|
+
submembers: {
|
|
108
|
+
properties: {
|
|
109
|
+
type: 'array',
|
|
110
|
+
key: 'name',
|
|
111
|
+
submembers: {
|
|
112
|
+
is_read_only: { type: 'value' },
|
|
113
|
+
type: TypeDataLayout,
|
|
114
|
+
get_privilege: { type: 'array', key: 'name' },
|
|
115
|
+
set_privilege: { type: 'array', key: 'name' },
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
objects: {
|
|
121
|
+
type: 'array',
|
|
122
|
+
key: 'name',
|
|
123
|
+
submembers: { is_read_only: { type: 'value' }, type: TypeDataLayout },
|
|
124
|
+
},
|
|
125
|
+
functions: {
|
|
126
|
+
type: 'array',
|
|
127
|
+
key: 'name',
|
|
128
|
+
submembers: {
|
|
129
|
+
arguments: {
|
|
130
|
+
type: 'array',
|
|
131
|
+
key: 'name',
|
|
132
|
+
submembers: {
|
|
133
|
+
type: TypeDataLayout,
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
return_type: TypeDataLayout,
|
|
137
|
+
call_privilege: { type: 'array', key: 'name' },
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
constants: {
|
|
141
|
+
type: 'array',
|
|
142
|
+
key: 'name',
|
|
143
|
+
submembers: { value: { type: 'value' } },
|
|
144
|
+
},
|
|
145
|
+
enums: {
|
|
146
|
+
type: 'array',
|
|
147
|
+
key: 'name',
|
|
148
|
+
submembers: {
|
|
149
|
+
constants: {
|
|
150
|
+
type: 'array',
|
|
151
|
+
key: 'name',
|
|
152
|
+
submembers: { value: { type: 'value' } },
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
type_aliases: {
|
|
157
|
+
type: 'array',
|
|
158
|
+
key: 'name',
|
|
159
|
+
submembers: {
|
|
160
|
+
type: TypeDataLayout,
|
|
161
|
+
mappings: {
|
|
162
|
+
type: 'array',
|
|
163
|
+
key: 'name',
|
|
164
|
+
submembers: { value: { type: 'value' } },
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
const commandsDataLayout = {
|
|
171
|
+
type: 'object',
|
|
172
|
+
key: 'name',
|
|
173
|
+
submembers: {
|
|
174
|
+
commands: {
|
|
175
|
+
type: 'array',
|
|
176
|
+
key: 'name',
|
|
177
|
+
submembers: {
|
|
178
|
+
aliases: {
|
|
179
|
+
type: 'array',
|
|
180
|
+
key: 'name',
|
|
181
|
+
submembers: { name: { type: 'value' } },
|
|
182
|
+
},
|
|
183
|
+
permission_level: { type: 'value' },
|
|
184
|
+
requires_cheats: { type: 'value' },
|
|
185
|
+
overloads: {
|
|
186
|
+
type: 'array',
|
|
187
|
+
key: 'name',
|
|
188
|
+
submembers: {
|
|
189
|
+
params: {
|
|
190
|
+
type: 'array_deep_copy',
|
|
191
|
+
key: 'name',
|
|
192
|
+
submembers: {
|
|
193
|
+
type: { type: 'value' },
|
|
194
|
+
is_optional: { type: 'value' },
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
const afterEventsOrderingDataLayout = {
|
|
204
|
+
type: 'object',
|
|
205
|
+
key: 'name',
|
|
206
|
+
submembers: {
|
|
207
|
+
name: { type: 'value' },
|
|
208
|
+
after_events_order_by_version: {
|
|
209
|
+
type: 'array',
|
|
210
|
+
key: 'name',
|
|
211
|
+
submembers: {
|
|
212
|
+
version: { type: 'value' },
|
|
213
|
+
version_is_prerelease: { type: 'value' },
|
|
214
|
+
event_order: {
|
|
215
|
+
type: 'simple_ordered_array',
|
|
216
|
+
key: 'name',
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
};
|
|
222
|
+
const vanillaDataDataLayout = {
|
|
223
|
+
type: 'object',
|
|
224
|
+
key: 'name',
|
|
225
|
+
submembers: {
|
|
226
|
+
data_items: {
|
|
227
|
+
type: 'array',
|
|
228
|
+
key: 'name',
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
};
|
|
232
|
+
const blockVanillaDataDataLayout = {
|
|
233
|
+
type: 'object',
|
|
234
|
+
key: 'name',
|
|
235
|
+
submembers: {
|
|
236
|
+
block_properties: {
|
|
237
|
+
type: 'array',
|
|
238
|
+
key: 'name',
|
|
239
|
+
submembers: {
|
|
240
|
+
type: { type: 'value' },
|
|
241
|
+
values: {
|
|
242
|
+
type: 'array_deep_copy',
|
|
243
|
+
key: 'name',
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
data_items: {
|
|
248
|
+
type: 'array',
|
|
249
|
+
key: 'name',
|
|
250
|
+
submembers: {
|
|
251
|
+
properties: {
|
|
252
|
+
type: 'array_deep_copy',
|
|
253
|
+
key: 'name',
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
};
|
|
259
|
+
const modulesHaveVersionKey = (moduleList, key) => {
|
|
260
|
+
return moduleList.length !== 0 && key in moduleList[0];
|
|
261
|
+
};
|
|
262
|
+
class ChangelogGenerator {
|
|
263
|
+
constructor(_config) {
|
|
264
|
+
this.config = _config;
|
|
265
|
+
}
|
|
266
|
+
config;
|
|
267
|
+
getChangelogForVersion(changelog, version) {
|
|
268
|
+
const versionKey = this.config.getVersionKey();
|
|
269
|
+
let changelogVersionIndex = changelog.map(objectData => objectData[versionKey]).indexOf(version);
|
|
270
|
+
if (changelogVersionIndex === -1) {
|
|
271
|
+
changelogVersionIndex =
|
|
272
|
+
changelog.push({
|
|
273
|
+
[versionKey]: version,
|
|
274
|
+
}) - 1;
|
|
275
|
+
}
|
|
276
|
+
return changelog[changelogVersionIndex];
|
|
277
|
+
}
|
|
278
|
+
compareArray(arrayChangelog, changeLogList, dataLayout, subObjectKey, currentSubobjects, nextSubobjects) {
|
|
279
|
+
currentSubobjects.forEach(currentSubObjectPropertyData => {
|
|
280
|
+
const subObjectDataLayout = dataLayout.submembers[subObjectKey];
|
|
281
|
+
const subObjectDataLayoutAsArray = dataLayout.submembers[subObjectKey];
|
|
282
|
+
const nextObjectPropertyIndex = nextSubobjects
|
|
283
|
+
.map(objectData => objectData[subObjectDataLayoutAsArray.key])
|
|
284
|
+
.indexOf(currentSubObjectPropertyData[subObjectDataLayoutAsArray.key]);
|
|
285
|
+
if (nextObjectPropertyIndex === -1) {
|
|
286
|
+
const objectChange = {
|
|
287
|
+
[subObjectDataLayoutAsArray.key]: utils.deepCopyJson(currentSubObjectPropertyData[subObjectDataLayoutAsArray.key]),
|
|
288
|
+
[changeLogList]: true,
|
|
289
|
+
...currentSubObjectPropertyData,
|
|
290
|
+
};
|
|
291
|
+
arrayChangelog.push(objectChange);
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
const nextObjectData = nextSubobjects[nextObjectPropertyIndex];
|
|
295
|
+
switch (subObjectDataLayout.type) {
|
|
296
|
+
case 'array':
|
|
297
|
+
case 'array_deep_copy':
|
|
298
|
+
case 'simple_ordered_array':
|
|
299
|
+
case 'object': {
|
|
300
|
+
let changelogIndex = arrayChangelog
|
|
301
|
+
.map(objectData => objectData[subObjectDataLayout.key])
|
|
302
|
+
.indexOf(currentSubObjectPropertyData[subObjectDataLayout.key]);
|
|
303
|
+
if (changelogIndex === -1) {
|
|
304
|
+
const currentObjPropData = {
|
|
305
|
+
[subObjectDataLayout.key]: currentSubObjectPropertyData[subObjectDataLayout.key],
|
|
306
|
+
};
|
|
307
|
+
changelogIndex = arrayChangelog.push(currentObjPropData) - 1;
|
|
308
|
+
}
|
|
309
|
+
const subChangelog = arrayChangelog[changelogIndex];
|
|
310
|
+
this.generate(subChangelog, changeLogList, subObjectDataLayout, currentSubObjectPropertyData, nextObjectData);
|
|
311
|
+
const propertyNames = Object.getOwnPropertyNames(subChangelog);
|
|
312
|
+
if (propertyNames.length === 1 && propertyNames[0] === subObjectDataLayout.key) {
|
|
313
|
+
arrayChangelog.splice(changelogIndex, 1);
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
arrayChangelog[changelogIndex] = {
|
|
317
|
+
...currentSubObjectPropertyData,
|
|
318
|
+
...arrayChangelog[changelogIndex],
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
default:
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
generate(parentObjectChangelog, changeLogList, dataLayout, currentObjectData, nextObjectData) {
|
|
330
|
+
for (const subObjectKey in dataLayout.submembers) {
|
|
331
|
+
const subObjectDataLayout = dataLayout.submembers[subObjectKey];
|
|
332
|
+
switch (subObjectDataLayout.type) {
|
|
333
|
+
case 'value': {
|
|
334
|
+
const currentObjectValue = currentObjectData[subObjectKey];
|
|
335
|
+
const nextObjectValue = nextObjectData[subObjectKey];
|
|
336
|
+
const currentObjectValueCopy = utils.deepCopyJson(currentObjectValue);
|
|
337
|
+
const nextObjectValueCopy = utils.deepCopyJson(nextObjectValue);
|
|
338
|
+
subObjectDataLayout.ignoredSubmembers?.forEach(ignoredSubmember => {
|
|
339
|
+
utils.removePropertyRecursive(currentObjectValueCopy, ignoredSubmember);
|
|
340
|
+
utils.removePropertyRecursive(nextObjectValueCopy, ignoredSubmember);
|
|
341
|
+
});
|
|
342
|
+
if (!(0, deep_equal_1.default)(currentObjectValueCopy, nextObjectValueCopy)) {
|
|
343
|
+
parentObjectChangelog[subObjectKey] = {
|
|
344
|
+
$old: utils.deepCopyJson(currentObjectValue),
|
|
345
|
+
$new: utils.deepCopyJson(nextObjectValue),
|
|
346
|
+
$changed: true,
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
break;
|
|
350
|
+
}
|
|
351
|
+
case 'object':
|
|
352
|
+
case 'array': {
|
|
353
|
+
if (parentObjectChangelog[subObjectKey] === undefined) {
|
|
354
|
+
parentObjectChangelog[subObjectKey] = [];
|
|
355
|
+
}
|
|
356
|
+
const currentSubobjects = currentObjectData[subObjectKey] ?? [];
|
|
357
|
+
const nextSubobjects = nextObjectData[subObjectKey] ?? [];
|
|
358
|
+
this.compareArray(parentObjectChangelog[subObjectKey], changeLogList, dataLayout, subObjectKey, currentSubobjects, nextSubobjects);
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
case 'array_deep_copy': {
|
|
362
|
+
if (parentObjectChangelog[subObjectKey] === undefined) {
|
|
363
|
+
parentObjectChangelog[subObjectKey] = [];
|
|
364
|
+
}
|
|
365
|
+
const currentSubobjects = currentObjectData[subObjectKey] ?? [];
|
|
366
|
+
const nextSubobjects = nextObjectData[subObjectKey] ?? [];
|
|
367
|
+
if (!(0, deep_equal_1.default)(currentSubobjects, nextSubobjects)) {
|
|
368
|
+
const objectCopyKey = `$${subObjectKey}_copy`;
|
|
369
|
+
parentObjectChangelog[objectCopyKey] = {
|
|
370
|
+
$old: utils.deepCopyJson(currentSubobjects),
|
|
371
|
+
$new: utils.deepCopyJson(nextSubobjects),
|
|
372
|
+
$changed: true,
|
|
373
|
+
};
|
|
374
|
+
this.compareArray(parentObjectChangelog[subObjectKey], changeLogList, dataLayout, subObjectKey, currentSubobjects, nextSubobjects);
|
|
375
|
+
}
|
|
376
|
+
break;
|
|
377
|
+
}
|
|
378
|
+
case 'simple_ordered_array': {
|
|
379
|
+
if (parentObjectChangelog[subObjectKey] === undefined) {
|
|
380
|
+
parentObjectChangelog[subObjectKey] = [];
|
|
381
|
+
}
|
|
382
|
+
const currentSubobjects = currentObjectData[subObjectKey] ?? [];
|
|
383
|
+
const nextSubobjects = nextObjectData[subObjectKey] ?? [];
|
|
384
|
+
if (!(0, deep_equal_1.default)(currentSubobjects, nextSubobjects)) {
|
|
385
|
+
parentObjectChangelog[subObjectKey] = {
|
|
386
|
+
$old: utils.deepCopyJson(currentSubobjects),
|
|
387
|
+
$new: utils.deepCopyJson(nextSubobjects),
|
|
388
|
+
$changed: true,
|
|
389
|
+
$key: subObjectDataLayout.key,
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
generateModuleChangeLog(changelog, modulesJson, dataLayout, changeLogList, versionKey, sortComparer, applyToCurrentModule) {
|
|
398
|
+
const modulesJsonSorted = modulesJson.sort(sortComparer(versionKey));
|
|
399
|
+
for (let currentModuleIndex = modulesJsonSorted.length - 1; currentModuleIndex > 0; currentModuleIndex--) {
|
|
400
|
+
const nextModuleIndex = currentModuleIndex - 1;
|
|
401
|
+
const currentModule = modulesJsonSorted[currentModuleIndex];
|
|
402
|
+
const nextModule = modulesJsonSorted[nextModuleIndex];
|
|
403
|
+
const dataChangedVersion = applyToCurrentModule ? currentModule[versionKey] : nextModule[versionKey];
|
|
404
|
+
const versionChangelog = this.getChangelogForVersion(changelog, dataChangedVersion);
|
|
405
|
+
this.generate(versionChangelog, changeLogList, dataLayout, currentModule, nextModule);
|
|
406
|
+
}
|
|
407
|
+
return changelog;
|
|
408
|
+
}
|
|
409
|
+
generateChangelogs(releases) {
|
|
410
|
+
const moduleGroups = this.config.generateModuleGroups(releases);
|
|
411
|
+
for (const currentModuleList of moduleGroups) {
|
|
412
|
+
if (modulesHaveVersionKey(currentModuleList, this.config.getVersionKey())) {
|
|
413
|
+
const moduleType = currentModuleList[0].module_type;
|
|
414
|
+
let correctDataLayout;
|
|
415
|
+
switch (moduleType) {
|
|
416
|
+
case 'script': {
|
|
417
|
+
correctDataLayout = scriptingDataLayout;
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
420
|
+
case 'commands': {
|
|
421
|
+
correctDataLayout = commandsDataLayout;
|
|
422
|
+
break;
|
|
423
|
+
}
|
|
424
|
+
case 'after_events_ordering': {
|
|
425
|
+
correctDataLayout = afterEventsOrderingDataLayout;
|
|
426
|
+
break;
|
|
427
|
+
}
|
|
428
|
+
case 'vanilla_data': {
|
|
429
|
+
correctDataLayout =
|
|
430
|
+
currentModuleList[0].name === 'mojang-block'
|
|
431
|
+
? blockVanillaDataDataLayout
|
|
432
|
+
: vanillaDataDataLayout;
|
|
433
|
+
break;
|
|
434
|
+
}
|
|
435
|
+
default: {
|
|
436
|
+
continue;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
const modulesJsonSorted = currentModuleList.sort(utils.semVerSortComparer(this.config.getVersionKey()));
|
|
440
|
+
const changelogs = [
|
|
441
|
+
{
|
|
442
|
+
[this.config.getVersionKey()]: modulesJsonSorted[0][this.config.getVersionKey()],
|
|
443
|
+
$added: true,
|
|
444
|
+
...utils.deepCopyJson(modulesJsonSorted[0]), // Hacky deep copy
|
|
445
|
+
},
|
|
446
|
+
];
|
|
447
|
+
this.generateModuleChangeLog(changelogs, currentModuleList, correctDataLayout, '$added', this.config.getVersionKey(), utils.semVerSortComparer, true);
|
|
448
|
+
this.generateModuleChangeLog(changelogs, currentModuleList, correctDataLayout, '$removed', this.config.getVersionKey(), utils.reverseSemVerSortComparer, false);
|
|
449
|
+
const sortedChangelogs = changelogs.sort(utils.reverseSemVerSortComparer(this.config.getVersionKey()));
|
|
450
|
+
for (const moduleJson of currentModuleList) {
|
|
451
|
+
const moduleWithChangelog = moduleJson;
|
|
452
|
+
moduleWithChangelog.changelog = utils.deepCopyJson(sortedChangelogs);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
exports.ChangelogGenerator = ChangelogGenerator;
|
|
459
|
+
//# sourceMappingURL=changelog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../src/changelog.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElC,4DAAmC;AAUnC,mDAAqC;AA4CrC,MAAM,cAAc,GAAuB;IACvC,IAAI,EAAE,OAAO;IACb,iBAAiB,EAAE,CAAC,aAAa,CAAC;CACrC,CAAC;AAEF,MAAM,iBAAiB,GAAuB;IAC1C,IAAI,EAAE,OAAO;IACb,GAAG,EAAE,SAAS;CACjB,CAAC;AAEF,MAAM,4BAA4B,GAAuB;IACrD,IAAI,EAAE,OAAO;IACb,GAAG,EAAE,MAAM;IACX,UAAU,EAAE;QACR,QAAQ,EAAE,iBAAiB;QAC3B,UAAU,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;KAChC;CACJ,CAAC;AAEF,MAAM,mBAAmB,GAAsB;IAC3C,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,MAAM;IACX,UAAU,EAAE;QACR,YAAY,EAAE,4BAA4B;QAC1C,iBAAiB,EAAE,4BAA4B;QAC/C,OAAO,EAAE;YACL,IAAI,EAAE,OAAO;YACb,GAAG,EAAE,MAAM;YACX,UAAU,EAAE;gBACR,UAAU,EAAE;oBACR,IAAI,EAAE,OAAO;oBACb,GAAG,EAAE,MAAM;oBACX,UAAU,EAAE;wBACR,YAAY,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;wBAC/B,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE;wBAC7C,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE;wBAC7C,IAAI,EAAE,cAAc;qBACvB;iBACJ;gBACD,SAAS,EAAE;oBACP,IAAI,EAAE,OAAO;oBACb,GAAG,EAAE,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AAC,YAAY,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,kBAAkB;qBAClE;iBACJ,CAAC;gBAEF,IAAI,CAAC,uBAAuB,CACxB,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,EAC3B,KAAK,CAAC,kBAAkB,EACxB,IAAI,CACP,CAAC;gBAEF,IAAI,CAAC,uBAAuB,CACxB,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,EAC3B,KAAK,CAAC,yBAAyB,EAC/B,KAAK,CACR,CAAC;gBAEF,MAAM,gBAAgB,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;gBAEvG,KAAK,MAAM,UAAU,IAAI,iBAAiB,EAAE,CAAC;oBACzC,MAAM,mBAAmB,GAAG,UAE3B,CAAC;oBACF,mBAAmB,CAAC,SAAS,GAAG,KAAK,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;gBACzE,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;CACJ;AAtSD,gDAsSC"}
|
package/lib/cli.d.ts
ADDED
package/lib/cli.js
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
// Copyright (c) Microsoft Corporation.
|
|
4
|
+
// Licensed under the MIT License.
|
|
5
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const fs_1 = __importDefault(require("fs"));
|
|
10
|
+
const path_1 = __importDefault(require("path"));
|
|
11
|
+
const semver_1 = __importDefault(require("semver"));
|
|
12
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
13
|
+
const helpers_1 = require("yargs/helpers");
|
|
14
|
+
const Config_1 = require("./Config");
|
|
15
|
+
const Logger_1 = require("./Logger");
|
|
16
|
+
const generator_1 = require("./generator");
|
|
17
|
+
const argv = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))
|
|
18
|
+
.parserConfiguration({
|
|
19
|
+
'boolean-negation': false,
|
|
20
|
+
})
|
|
21
|
+
.usage('Usage: minecraft-api-docs-generator [options]')
|
|
22
|
+
.option('input-directory', {
|
|
23
|
+
alias: 'i',
|
|
24
|
+
type: 'string',
|
|
25
|
+
nargs: 1,
|
|
26
|
+
desc: 'Directory of the API metadata JSON input files.',
|
|
27
|
+
})
|
|
28
|
+
.option('output-directory', {
|
|
29
|
+
alias: 'o',
|
|
30
|
+
type: 'string',
|
|
31
|
+
nargs: 1,
|
|
32
|
+
desc: 'Directory to output generated types and documentation to.',
|
|
33
|
+
})
|
|
34
|
+
.option('docs-directory', {
|
|
35
|
+
alias: 'd',
|
|
36
|
+
type: 'string',
|
|
37
|
+
nargs: 1,
|
|
38
|
+
desc: 'Directory of the documentation info.JSON files that provide description strings for API modules.',
|
|
39
|
+
})
|
|
40
|
+
.option('run-generators', {
|
|
41
|
+
alias: 'g',
|
|
42
|
+
type: 'array',
|
|
43
|
+
string: true,
|
|
44
|
+
desc: `IDs of markup generators to render output files with. Supports multiple arguments. Examples: '-g ts' or '-g msdocs typedoc'`,
|
|
45
|
+
})
|
|
46
|
+
.option('changelog-strategy', {
|
|
47
|
+
type: 'string',
|
|
48
|
+
nargs: 1,
|
|
49
|
+
desc: `String ID of the changelog strategy to use when comparing modules. Default: 'module_version'`,
|
|
50
|
+
})
|
|
51
|
+
.option('minecraft-version', {
|
|
52
|
+
alias: 'mcv',
|
|
53
|
+
type: 'string',
|
|
54
|
+
nargs: 1,
|
|
55
|
+
desc: `Semantic version string for which version of Minecraft to use for versioning. Examples: '--mcv 1.2.3' or '--mcv 1.2.3-beta.5'`,
|
|
56
|
+
coerce: (version) => {
|
|
57
|
+
if (semver_1.default.valid(version)) {
|
|
58
|
+
return version;
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
throw new Error(`Provided Minecraft release version '${version}' is not a valid semver string.`);
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
})
|
|
65
|
+
.option('preexisting-release-versions', {
|
|
66
|
+
alias: 'prv',
|
|
67
|
+
type: 'string',
|
|
68
|
+
nargs: 1,
|
|
69
|
+
desc: `Path to a JSON file that is a map of module names to arrays of semantic version strings which have been released on NPM. Example JSON: '{"@minecraft/server": ["1.2.3"], "@minecraft/common": ["1.2.3-beta.5"]}'`,
|
|
70
|
+
coerce: (filePath) => {
|
|
71
|
+
const preexistingReleasesPath = path_1.default.resolve(filePath);
|
|
72
|
+
if (fs_1.default.existsSync(preexistingReleasesPath)) {
|
|
73
|
+
const fileContent = fs_1.default.readFileSync(preexistingReleasesPath);
|
|
74
|
+
return Config_1.PreexistingModuleReleasesRecord.check(JSON.parse(fileContent.toString()));
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
throw new Error(`No preexisting releases file found at '${preexistingReleasesPath}'.`);
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
})
|
|
81
|
+
.option('include-modules', {
|
|
82
|
+
alias: 'm',
|
|
83
|
+
type: 'string',
|
|
84
|
+
nargs: 1,
|
|
85
|
+
desc: `Mode which determines which input modules should be included in generation. Options: ${Config_1.IncludeModulesModeUnion.alternatives.map(m => m.value).join(',')}. Example: '--include-modules latest'. Default: 'all'`,
|
|
86
|
+
coerce: (mode) => {
|
|
87
|
+
return Config_1.IncludeModulesModeUnion.check(mode);
|
|
88
|
+
},
|
|
89
|
+
})
|
|
90
|
+
.option('include-base', {
|
|
91
|
+
alias: 'b',
|
|
92
|
+
type: 'boolean',
|
|
93
|
+
desc: 'If set, will include base modules in generation for metadata that would be merged to a parent module. By default, only the merged module will generate output.',
|
|
94
|
+
})
|
|
95
|
+
.option('skip-merging', {
|
|
96
|
+
type: 'boolean',
|
|
97
|
+
desc: 'If set to true, skip module merging so parented modules are not merged with their child modules.',
|
|
98
|
+
conflicts: ['include-base'],
|
|
99
|
+
})
|
|
100
|
+
.option('plugin', {
|
|
101
|
+
alias: 'p',
|
|
102
|
+
type: 'array',
|
|
103
|
+
string: true,
|
|
104
|
+
desc: `Plugin packages to import generators and templates from. Supports multiple arguments. Example: '--plugin @minecraft/markup-generators-plugin'`,
|
|
105
|
+
})
|
|
106
|
+
.option('config', {
|
|
107
|
+
alias: 'c',
|
|
108
|
+
type: 'string',
|
|
109
|
+
nargs: 1,
|
|
110
|
+
desc: 'Path to a config file with options.',
|
|
111
|
+
conflicts: 'no-config',
|
|
112
|
+
coerce: (filePath) => {
|
|
113
|
+
const resolvedConfigPath = path_1.default.resolve(filePath);
|
|
114
|
+
if (fs_1.default.existsSync(resolvedConfigPath)) {
|
|
115
|
+
return resolvedConfigPath;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
throw new Error(`No config file found at ${resolvedConfigPath}`);
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
})
|
|
122
|
+
.option('no-config', {
|
|
123
|
+
type: 'boolean',
|
|
124
|
+
desc: 'If set, will not look for any config files.',
|
|
125
|
+
conflicts: 'config',
|
|
126
|
+
})
|
|
127
|
+
.option('log', {
|
|
128
|
+
alias: 'l',
|
|
129
|
+
desc: `Logging options. Options: ${Object.keys(Logger_1.LogOptionsRecord.fields).join(', ')}. Usage: '--log.<option> <value>'. Example: '--log.level debug'`,
|
|
130
|
+
conflicts: 'suppress',
|
|
131
|
+
coerce: (opts) => {
|
|
132
|
+
if (!opts || typeof opts !== 'object') {
|
|
133
|
+
throw new Error(`Expected to receive options for --log. Usage: '--log.<option> <value>'`);
|
|
134
|
+
}
|
|
135
|
+
for (const key in opts) {
|
|
136
|
+
opts[key] = opts[key] === 'true' ? true : opts[key] === 'false' ? false : opts[key];
|
|
137
|
+
}
|
|
138
|
+
return Logger_1.LogOptionsRecord.check(opts);
|
|
139
|
+
},
|
|
140
|
+
})
|
|
141
|
+
.option('suppress', {
|
|
142
|
+
alias: 's',
|
|
143
|
+
type: 'boolean',
|
|
144
|
+
desc: `If set, will suppress verbose logging and only output errors. Default: false`,
|
|
145
|
+
conflicts: 'log',
|
|
146
|
+
})
|
|
147
|
+
.help('help')
|
|
148
|
+
.alias('help', 'h')
|
|
149
|
+
.parseSync();
|
|
150
|
+
module.exports = (async () => {
|
|
151
|
+
if ((!argv.inputDirectory || !argv.outputDirectory) && (!argv.config || argv.noConfig)) {
|
|
152
|
+
throw new Error(`Must specify both '--input-directory' and '--output-directory' or a config file path with '--config'`);
|
|
153
|
+
}
|
|
154
|
+
const logOptions = argv.log ? argv.log : argv.suppress ? { level: 'error' } : undefined;
|
|
155
|
+
await (0, generator_1.generate)({
|
|
156
|
+
inputDirectory: argv.inputDirectory,
|
|
157
|
+
outputDirectory: argv.outputDirectory,
|
|
158
|
+
documentationDirectory: argv.docsDirectory,
|
|
159
|
+
generatorsToRun: argv.runGenerators,
|
|
160
|
+
changelogStrategy: argv.changelogStrategy,
|
|
161
|
+
minecraftReleaseVersion: argv.minecraftVersion,
|
|
162
|
+
preexistingModuleReleases: argv.preexistingReleaseVersions,
|
|
163
|
+
includeModulesMode: argv.includeModules,
|
|
164
|
+
includeBaseModules: argv.includeBase,
|
|
165
|
+
plugins: argv.plugin,
|
|
166
|
+
configPath: argv.config,
|
|
167
|
+
ignoreConfig: argv.noConfig,
|
|
168
|
+
log: logOptions,
|
|
169
|
+
skipMerging: argv.skipMerging,
|
|
170
|
+
});
|
|
171
|
+
})();
|
|
172
|
+
//# sourceMappingURL=cli.js.map
|
package/lib/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;AACA,uCAAuC;AACvC,kCAAkC;;;;;AAElC,4CAAoB;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