@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
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { Array, Boolean, Intersect, Literal, Optional, Record, Runtype, Static, String, Union } from 'runtypes';
|
|
2
|
+
/**
|
|
3
|
+
* The supported module types for documentation generation.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ModuleTypesValidator: Union<[Literal<"script">, Literal<"commands">, Literal<"after_events_ordering">, Literal<"vanilla_data">]>;
|
|
6
|
+
export type ModuleTypes = Static<typeof ModuleTypesValidator>;
|
|
7
|
+
/**
|
|
8
|
+
* Most common piece of data for generation, a name field.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ModuleNameDataValidator: Record<{
|
|
11
|
+
name: String;
|
|
12
|
+
}, false>;
|
|
13
|
+
export type ModuleNameData = Static<typeof ModuleNameDataValidator>;
|
|
14
|
+
/**
|
|
15
|
+
* Common module data for all types of modules
|
|
16
|
+
*/
|
|
17
|
+
export declare const CommonModuleDataValidator: Record<{
|
|
18
|
+
name: String;
|
|
19
|
+
minecraft_version: String;
|
|
20
|
+
module_type: Union<[Literal<"script">, Literal<"commands">, Literal<"after_events_ordering">, Literal<"vanilla_data">]>;
|
|
21
|
+
module_name: Optional<String>;
|
|
22
|
+
}, false>;
|
|
23
|
+
export type IMinecraftModule = Static<typeof CommonModuleDataValidator>;
|
|
24
|
+
/**
|
|
25
|
+
* Common data for runtime comment flags
|
|
26
|
+
*/
|
|
27
|
+
export declare const CommonCommentFlagsValidator: Record<{
|
|
28
|
+
has_comments: Optional<Boolean>;
|
|
29
|
+
}, false>;
|
|
30
|
+
/**
|
|
31
|
+
* Standardized Vanilla Name Record and optional states
|
|
32
|
+
*/
|
|
33
|
+
export declare const StandardizedVanillaNameRecord: Record<{
|
|
34
|
+
namespace: Optional<String>;
|
|
35
|
+
no_namespace_name: Optional<String>;
|
|
36
|
+
standardized_name: Optional<String>;
|
|
37
|
+
}, false>;
|
|
38
|
+
/**
|
|
39
|
+
* Additional data that may be associated with data_items
|
|
40
|
+
*/
|
|
41
|
+
export declare const DataStateRecord: Record<{
|
|
42
|
+
properties: Optional<Array<Record<{
|
|
43
|
+
name: String;
|
|
44
|
+
}, false>, false>>;
|
|
45
|
+
state_union: Optional<String>;
|
|
46
|
+
value: Optional<String>;
|
|
47
|
+
}, false>;
|
|
48
|
+
/**
|
|
49
|
+
* Runtime specific fields for module name data in vanilla data modules
|
|
50
|
+
*/
|
|
51
|
+
export declare const VanillaModuleNameDataValidator: Intersect<[Intersect<[Record<{
|
|
52
|
+
name: String;
|
|
53
|
+
}, false>, Record<{
|
|
54
|
+
namespace: Optional<String>;
|
|
55
|
+
no_namespace_name: Optional<String>;
|
|
56
|
+
standardized_name: Optional<String>;
|
|
57
|
+
}, false>]>, Record<{
|
|
58
|
+
properties: Optional<Array<Record<{
|
|
59
|
+
name: String;
|
|
60
|
+
}, false>, false>>;
|
|
61
|
+
state_union: Optional<String>;
|
|
62
|
+
value: Optional<String>;
|
|
63
|
+
}, false>]>;
|
|
64
|
+
export type VanillaModuleNameData = Static<typeof VanillaModuleNameDataValidator>;
|
|
65
|
+
export declare const CoreVanillaDataFieldsRecord: Intersect<[Record<{
|
|
66
|
+
data_items: Array<Intersect<[Intersect<[Record<{
|
|
67
|
+
name: String;
|
|
68
|
+
}, false>, Record<{
|
|
69
|
+
namespace: Optional<String>;
|
|
70
|
+
no_namespace_name: Optional<String>;
|
|
71
|
+
standardized_name: Optional<String>;
|
|
72
|
+
}, false>]>, Record<{
|
|
73
|
+
properties: Optional<Array<Record<{
|
|
74
|
+
name: String;
|
|
75
|
+
}, false>, false>>;
|
|
76
|
+
state_union: Optional<String>;
|
|
77
|
+
value: Optional<String>;
|
|
78
|
+
}, false>]>, false>;
|
|
79
|
+
vanilla_data_type: Optional<String>;
|
|
80
|
+
module_type: Literal<"vanilla_data">;
|
|
81
|
+
display_type: Optional<String>;
|
|
82
|
+
display_name: Optional<String>;
|
|
83
|
+
has_properties: Optional<Boolean>;
|
|
84
|
+
}, false>, Record<{
|
|
85
|
+
name: String;
|
|
86
|
+
minecraft_version: String;
|
|
87
|
+
module_type: Union<[Literal<"script">, Literal<"commands">, Literal<"after_events_ordering">, Literal<"vanilla_data">]>;
|
|
88
|
+
module_name: Optional<String>;
|
|
89
|
+
}, false>]>;
|
|
90
|
+
export type CoreVanillaDataFields = Static<typeof CoreVanillaDataFieldsRecord>;
|
|
91
|
+
/**
|
|
92
|
+
* Common vanilla data fields for all types of modules
|
|
93
|
+
*/
|
|
94
|
+
export declare function getCommonVanillaDataFieldsRecord<T extends Runtype>(base: T, literalType: string): Intersect<[Intersect<[Record<{
|
|
95
|
+
data_items: Array<Intersect<[Intersect<[Record<{
|
|
96
|
+
name: String;
|
|
97
|
+
}, false>, Record<{
|
|
98
|
+
namespace: Optional<String>;
|
|
99
|
+
no_namespace_name: Optional<String>;
|
|
100
|
+
standardized_name: Optional<String>;
|
|
101
|
+
}, false>]>, Record<{
|
|
102
|
+
properties: Optional<Array<Record<{
|
|
103
|
+
name: String;
|
|
104
|
+
}, false>, false>>;
|
|
105
|
+
state_union: Optional<String>;
|
|
106
|
+
value: Optional<String>;
|
|
107
|
+
}, false>]>, false>;
|
|
108
|
+
vanilla_data_type: Optional<String>;
|
|
109
|
+
module_type: Literal<"vanilla_data">;
|
|
110
|
+
display_type: Optional<String>;
|
|
111
|
+
display_name: Optional<String>;
|
|
112
|
+
has_properties: Optional<Boolean>;
|
|
113
|
+
}, false>, Record<{
|
|
114
|
+
name: String;
|
|
115
|
+
minecraft_version: String;
|
|
116
|
+
module_type: Union<[Literal<"script">, Literal<"commands">, Literal<"after_events_ordering">, Literal<"vanilla_data">]>;
|
|
117
|
+
module_name: Optional<String>;
|
|
118
|
+
}, false>]>, Record<{
|
|
119
|
+
data_items: Array<T, false>;
|
|
120
|
+
vanilla_data_type: Optional<Literal<string>>;
|
|
121
|
+
}, false>]>;
|
|
122
|
+
export type CommonVanillaDataFields = Static<ReturnType<typeof getCommonVanillaDataFieldsRecord>>;
|
|
123
|
+
export type RuntimeDataModule<T> = T extends IMinecraftModule ? T : never;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.CoreVanillaDataFieldsRecord = exports.VanillaModuleNameDataValidator = exports.DataStateRecord = exports.StandardizedVanillaNameRecord = exports.CommonCommentFlagsValidator = exports.CommonModuleDataValidator = exports.ModuleNameDataValidator = exports.ModuleTypesValidator = void 0;
|
|
6
|
+
exports.getCommonVanillaDataFieldsRecord = getCommonVanillaDataFieldsRecord;
|
|
7
|
+
const runtypes_1 = require("runtypes");
|
|
8
|
+
/**
|
|
9
|
+
* The supported module types for documentation generation.
|
|
10
|
+
*/
|
|
11
|
+
exports.ModuleTypesValidator = (0, runtypes_1.Union)((0, runtypes_1.Literal)('script'), (0, runtypes_1.Literal)('commands'), (0, runtypes_1.Literal)('after_events_ordering'), (0, runtypes_1.Literal)('vanilla_data'));
|
|
12
|
+
/**
|
|
13
|
+
* Most common piece of data for generation, a name field.
|
|
14
|
+
*/
|
|
15
|
+
exports.ModuleNameDataValidator = (0, runtypes_1.Record)({
|
|
16
|
+
name: runtypes_1.String,
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* Common module data for all types of modules
|
|
20
|
+
*/
|
|
21
|
+
exports.CommonModuleDataValidator = (0, runtypes_1.Record)({
|
|
22
|
+
name: runtypes_1.String,
|
|
23
|
+
minecraft_version: runtypes_1.String,
|
|
24
|
+
module_type: exports.ModuleTypesValidator,
|
|
25
|
+
module_name: (0, runtypes_1.Optional)(runtypes_1.String),
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Common data for runtime comment flags
|
|
29
|
+
*/
|
|
30
|
+
exports.CommonCommentFlagsValidator = (0, runtypes_1.Record)({
|
|
31
|
+
has_comments: (0, runtypes_1.Optional)(runtypes_1.Boolean),
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Standardized Vanilla Name Record and optional states
|
|
35
|
+
*/
|
|
36
|
+
exports.StandardizedVanillaNameRecord = (0, runtypes_1.Record)({
|
|
37
|
+
namespace: (0, runtypes_1.Optional)(runtypes_1.String),
|
|
38
|
+
no_namespace_name: (0, runtypes_1.Optional)(runtypes_1.String),
|
|
39
|
+
standardized_name: (0, runtypes_1.Optional)(runtypes_1.String),
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* Additional data that may be associated with data_items
|
|
43
|
+
*/
|
|
44
|
+
exports.DataStateRecord = (0, runtypes_1.Record)({
|
|
45
|
+
properties: (0, runtypes_1.Optional)((0, runtypes_1.Array)(exports.ModuleNameDataValidator)),
|
|
46
|
+
state_union: (0, runtypes_1.Optional)(runtypes_1.String),
|
|
47
|
+
value: (0, runtypes_1.Optional)(runtypes_1.String),
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* Runtime specific fields for module name data in vanilla data modules
|
|
51
|
+
*/
|
|
52
|
+
exports.VanillaModuleNameDataValidator = exports.ModuleNameDataValidator.And(exports.StandardizedVanillaNameRecord).And(exports.DataStateRecord);
|
|
53
|
+
exports.CoreVanillaDataFieldsRecord = (0, runtypes_1.Intersect)((0, runtypes_1.Record)({
|
|
54
|
+
data_items: (0, runtypes_1.Array)(exports.VanillaModuleNameDataValidator),
|
|
55
|
+
vanilla_data_type: (0, runtypes_1.Optional)(runtypes_1.String),
|
|
56
|
+
module_type: (0, runtypes_1.Literal)('vanilla_data'),
|
|
57
|
+
// Runtime Markup
|
|
58
|
+
display_type: (0, runtypes_1.Optional)(runtypes_1.String),
|
|
59
|
+
display_name: (0, runtypes_1.Optional)(runtypes_1.String),
|
|
60
|
+
has_properties: (0, runtypes_1.Optional)(runtypes_1.Boolean),
|
|
61
|
+
}), exports.CommonModuleDataValidator);
|
|
62
|
+
/**
|
|
63
|
+
* Common vanilla data fields for all types of modules
|
|
64
|
+
*/
|
|
65
|
+
function getCommonVanillaDataFieldsRecord(base, literalType) {
|
|
66
|
+
return (0, runtypes_1.Intersect)(exports.CoreVanillaDataFieldsRecord, (0, runtypes_1.Record)({
|
|
67
|
+
data_items: (0, runtypes_1.Array)(base),
|
|
68
|
+
vanilla_data_type: (0, runtypes_1.Optional)((0, runtypes_1.Literal)(literalType)),
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=IMinecraftModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IMinecraftModule.js","sourceRoot":"","sources":["../../src/modules/IMinecraftModule.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAoFlC,4EAQC;AA1FD,uCAAgH;AAEhH;;GAEG;AACU,QAAA,oBAAoB,GAAG,IAAA,gBAAK,EACrC,IAAA,kBAAO,EAAC,QAAQ,CAAC,EACjB,IAAA,kBAAO,EAAC,UAAU,CAAC,EACnB,IAAA,kBAAO,EAAC,uBAAuB,CAAC,EAChC,IAAA,kBAAO,EAAC,cAAc,CAAC,CAC1B,CAAC;AAGF;;GAEG;AACU,QAAA,uBAAuB,GAAG,IAAA,iBAAM,EAAC;IAC1C,IAAI,EAAE,iBAAM;CACf,CAAC,CAAC;AAGH;;GAEG;AACU,QAAA,yBAAyB,GAAG,IAAA,iBAAM,EAAC;IAC5C,IAAI,EAAE,iBAAM;IACZ,iBAAiB,EAAE,iBAAM;IACzB,WAAW,EAAE,4BAAoB;IACjC,WAAW,EAAE,IAAA,mBAAQ,EAAC,iBAAM,CAAC;CAChC,CAAC,CAAC;AAGH;;GAEG;AACU,QAAA,2BAA2B,GAAG,IAAA,iBAAM,EAAC;IAC9C,YAAY,EAAE,IAAA,mBAAQ,EAAC,kBAAO,CAAC;CAClC,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,6BAA6B,GAAG,IAAA,iBAAM,EAAC;IAChD,SAAS,EAAE,IAAA,mBAAQ,EAAC,iBAAM,CAAC;IAC3B,iBAAiB,EAAE,IAAA,mBAAQ,EAAC,iBAAM,CAAC;IACnC,iBAAiB,EAAE,IAAA,mBAAQ,EAAC,iBAAM,CAAC;CACtC,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,eAAe,GAAG,IAAA,iBAAM,EAAC;IAClC,UAAU,EAAE,IAAA,mBAAQ,EAAC,IAAA,gBAAK,EAAC,+BAAuB,CAAC,CAAC;IACpD,WAAW,EAAE,IAAA,mBAAQ,EAAC,iBAAM,CAAC;IAC7B,KAAK,EAAE,IAAA,mBAAQ,EAAC,iBAAM,CAAC;CAC1B,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,8BAA8B,GACvC,+BAAuB,CAAC,GAAG,CAAC,qCAA6B,CAAC,CAAC,GAAG,CAAC,uBAAe,CAAC,CAAC;AAGvE,QAAA,2BAA2B,GAAG,IAAA,oBAAS,EAChD,IAAA,iBAAM,EAAC;IACH,UAAU,EAAE,IAAA,gBAAK,EAAC,sCAA8B,CAAC;IACjD,iBAAiB,EAAE,IAAA,mBAAQ,EAAC,iBAAM,CAAC;IACnC,WAAW,EAAE,IAAA,kBAAO,EAAC,cAAc,CAAC;IAEpC,iBAAiB;IACjB,YAAY,EAAE,IAAA,mBAAQ,EAAC,iBAAM,CAAC;IAC9B,YAAY,EAAE,IAAA,mBAAQ,EAAC,iBAAM,CAAC;IAC9B,cAAc,EAAE,IAAA,mBAAQ,EAAC,kBAAO,CAAC;CACpC,CAAC,EACF,iCAAyB,CAC5B,CAAC;AAGF;;GAEG;AACH,SAAgB,gCAAgC,CAAoB,IAAO,EAAE,WAAmB;IAC5F,OAAO,IAAA,oBAAS,EACZ,mCAA2B,EAC3B,IAAA,iBAAM,EAAC;QACH,UAAU,EAAE,IAAA,gBAAK,EAAC,IAAI,CAAC;QACvB,iBAAiB,EAAE,IAAA,mBAAQ,EAAC,IAAA,kBAAO,EAAC,WAAW,CAAC,CAAC;KACpD,CAAC,CACL,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ModuleNameData } from './IMinecraftModule';
|
|
2
|
+
import { MinecraftBlockProperty } from './MinecraftBlockModule';
|
|
3
|
+
import { MinecraftClassChangelogEntry, MinecraftConstantChangelogEntry, MinecraftEnumChangelogEntry, MinecraftErrorChangelogEntry, MinecraftFunctionChangelogEntry, MinecraftInterfaceChangelogEntry, MinecraftObjectChangelogEntry, MinecraftPropertyChangelogEntry, MinecraftTypeAliasChangelogEntry } from './MinecraftChangelogTypes';
|
|
4
|
+
import { MinecraftClass, MinecraftClosureType, MinecraftConstant, MinecraftEnum, MinecraftError, MinecraftFunction, MinecraftFunctionArgument, MinecraftFunctionArgumentDetails, MinecraftGeneratorType, MinecraftInterface, MinecraftModuleDescription, MinecraftProperty, MinecraftType, MinecraftTypeAlias, NameMarkupType, VersionMarkupType } from './MinecraftScriptModule';
|
|
5
|
+
/**
|
|
6
|
+
* Object property keys -> The type of the property
|
|
7
|
+
*/
|
|
8
|
+
export type KeyToTypeMapping = {
|
|
9
|
+
name: string;
|
|
10
|
+
version: string;
|
|
11
|
+
minecraft_version: string;
|
|
12
|
+
from_module: MinecraftModuleDescription;
|
|
13
|
+
module: MinecraftModuleDescription;
|
|
14
|
+
classes: MinecraftClass[];
|
|
15
|
+
constants: MinecraftConstant[];
|
|
16
|
+
enums: MinecraftEnum[];
|
|
17
|
+
errors: MinecraftError[];
|
|
18
|
+
functions: MinecraftFunction[];
|
|
19
|
+
interfaces: MinecraftInterface[];
|
|
20
|
+
properties: MinecraftProperty[];
|
|
21
|
+
type_aliases: MinecraftTypeAlias[];
|
|
22
|
+
details: MinecraftFunctionArgumentDetails;
|
|
23
|
+
default_value: unknown;
|
|
24
|
+
supported_values: unknown;
|
|
25
|
+
get_privilege: string[];
|
|
26
|
+
set_privilege: string[];
|
|
27
|
+
call_privilege: string[];
|
|
28
|
+
value: string;
|
|
29
|
+
is_static: boolean;
|
|
30
|
+
runtime_conditions: string[];
|
|
31
|
+
type: MinecraftType;
|
|
32
|
+
argument_types: MinecraftType[];
|
|
33
|
+
base_types: MinecraftType[];
|
|
34
|
+
closure_type: MinecraftClosureType;
|
|
35
|
+
derived_types: MinecraftType[];
|
|
36
|
+
element_type: MinecraftType;
|
|
37
|
+
error_types: MinecraftType[];
|
|
38
|
+
iterator: MinecraftType;
|
|
39
|
+
iterator_type: MinecraftType;
|
|
40
|
+
key_type: MinecraftType;
|
|
41
|
+
optional_type: MinecraftType;
|
|
42
|
+
promise_type: MinecraftType;
|
|
43
|
+
return_type: MinecraftType;
|
|
44
|
+
value_type: MinecraftType;
|
|
45
|
+
variant_types: MinecraftType[];
|
|
46
|
+
generator_type: MinecraftGeneratorType;
|
|
47
|
+
yield_type: MinecraftType;
|
|
48
|
+
next_type: MinecraftType;
|
|
49
|
+
changelog: never;
|
|
50
|
+
class_changelog: MinecraftClassChangelogEntry[];
|
|
51
|
+
interface_changelog: MinecraftInterfaceChangelogEntry[];
|
|
52
|
+
error_changelog: MinecraftErrorChangelogEntry[];
|
|
53
|
+
object_changelog: MinecraftObjectChangelogEntry[];
|
|
54
|
+
function_changelog: MinecraftFunctionChangelogEntry[];
|
|
55
|
+
constant_changelog: MinecraftConstantChangelogEntry[];
|
|
56
|
+
property_changelog: MinecraftPropertyChangelogEntry[];
|
|
57
|
+
enum_changelog: MinecraftEnumChangelogEntry[];
|
|
58
|
+
alias_changelog: MinecraftTypeAliasChangelogEntry[];
|
|
59
|
+
$added: boolean;
|
|
60
|
+
$removed: boolean;
|
|
61
|
+
$changed: boolean;
|
|
62
|
+
data_items: ModuleNameData[];
|
|
63
|
+
block_properties: MinecraftBlockProperty[];
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Object property keys -> The type of the parent containing this property
|
|
67
|
+
*
|
|
68
|
+
* If a key exists in this map, scanObject functions will return this type instead of a Record containing only the property.
|
|
69
|
+
* Useful for when a filter needs to add other properties based on the presence of this key.
|
|
70
|
+
*/
|
|
71
|
+
export type KeyToParentTypeMapping = {
|
|
72
|
+
name: NameMarkupType;
|
|
73
|
+
version: VersionMarkupType;
|
|
74
|
+
iterator: MinecraftClass;
|
|
75
|
+
details: MinecraftFunctionArgument;
|
|
76
|
+
is_static: MinecraftConstant;
|
|
77
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyToTypeMapping.js","sourceRoot":"","sources":["../../src/modules/KeyToTypeMapping.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Array, Boolean, Intersect, Literal, Optional, Record, Static, String, Union } from 'runtypes';
|
|
2
|
+
import { IMinecraftModule, RuntimeDataModule } from './IMinecraftModule';
|
|
3
|
+
import { MinecraftEngineDataModule } from './MinecraftEngineDataModules';
|
|
4
|
+
export declare const afterEventsOrderModuleName = "engine-after_events_ordering";
|
|
5
|
+
export declare function getAfterEventsOrderingModuleFrom(engineModuleArray: RuntimeDataModule<MinecraftEngineDataModule>[]): {
|
|
6
|
+
name: string;
|
|
7
|
+
minecraft_version: string;
|
|
8
|
+
module_type: "script" | "commands" | "after_events_ordering" | "vanilla_data";
|
|
9
|
+
module_name?: string;
|
|
10
|
+
} & {
|
|
11
|
+
module_type: "after_events_ordering";
|
|
12
|
+
after_events_order_by_version: ({
|
|
13
|
+
name: string;
|
|
14
|
+
} & {
|
|
15
|
+
version: string;
|
|
16
|
+
event_order: {
|
|
17
|
+
name: string;
|
|
18
|
+
}[];
|
|
19
|
+
version_is_prerelease?: boolean;
|
|
20
|
+
module_prerelease_tag?: "alpha" | "beta" | "internal" | "preview" | "rc";
|
|
21
|
+
})[];
|
|
22
|
+
};
|
|
23
|
+
export declare const MinecraftAfterEventOrderRecord: Record<{
|
|
24
|
+
name: String;
|
|
25
|
+
}, false>;
|
|
26
|
+
export type MinecraftEventOrder = Static<typeof MinecraftAfterEventOrderRecord>;
|
|
27
|
+
export declare const MinecraftAfterEventsOrderByVersionRecord: Intersect<[Record<{
|
|
28
|
+
name: String;
|
|
29
|
+
}, false>, Record<{
|
|
30
|
+
version_is_prerelease: Optional<Boolean>;
|
|
31
|
+
module_prerelease_tag: Optional<Union<[Literal<"alpha">, Literal<"beta">, Literal<"internal">, Literal<"preview">, Literal<"rc">]>>;
|
|
32
|
+
version: String;
|
|
33
|
+
event_order: Array<Record<{
|
|
34
|
+
name: String;
|
|
35
|
+
}, false>, false>;
|
|
36
|
+
}, false>]>;
|
|
37
|
+
export type MinecraftAfterEventsOrderByVersion = Static<typeof MinecraftAfterEventsOrderByVersionRecord>;
|
|
38
|
+
export declare const MinecraftAfterEventsOrderModuleRecord: Intersect<[Record<{
|
|
39
|
+
name: String;
|
|
40
|
+
minecraft_version: String;
|
|
41
|
+
module_type: Union<[Literal<"script">, Literal<"commands">, Literal<"after_events_ordering">, Literal<"vanilla_data">]>;
|
|
42
|
+
module_name: Optional<String>;
|
|
43
|
+
}, false>, Record<{
|
|
44
|
+
module_type: Literal<"after_events_ordering">;
|
|
45
|
+
after_events_order_by_version: Array<Intersect<[Record<{
|
|
46
|
+
name: String;
|
|
47
|
+
}, false>, Record<{
|
|
48
|
+
version_is_prerelease: Optional<Boolean>;
|
|
49
|
+
module_prerelease_tag: Optional<Union<[Literal<"alpha">, Literal<"beta">, Literal<"internal">, Literal<"preview">, Literal<"rc">]>>;
|
|
50
|
+
version: String;
|
|
51
|
+
event_order: Array<Record<{
|
|
52
|
+
name: String;
|
|
53
|
+
}, false>, false>;
|
|
54
|
+
}, false>]>, false>;
|
|
55
|
+
}, false>]>;
|
|
56
|
+
export type MinecraftAfterEventsOrderModule = Static<typeof MinecraftAfterEventsOrderModuleRecord>;
|
|
57
|
+
export declare function isAfterEventsOrderModule(module: IMinecraftModule): module is MinecraftAfterEventsOrderModule;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.MinecraftAfterEventsOrderModuleRecord = exports.MinecraftAfterEventsOrderByVersionRecord = exports.MinecraftAfterEventOrderRecord = exports.afterEventsOrderModuleName = void 0;
|
|
6
|
+
exports.getAfterEventsOrderingModuleFrom = getAfterEventsOrderingModuleFrom;
|
|
7
|
+
exports.isAfterEventsOrderModule = isAfterEventsOrderModule;
|
|
8
|
+
const runtypes_1 = require("runtypes");
|
|
9
|
+
const IMinecraftModule_1 = require("./IMinecraftModule");
|
|
10
|
+
exports.afterEventsOrderModuleName = 'engine-after_events_ordering';
|
|
11
|
+
function getAfterEventsOrderingModuleFrom(engineModuleArray) {
|
|
12
|
+
return engineModuleArray.find(module => module.name === exports.afterEventsOrderModuleName);
|
|
13
|
+
}
|
|
14
|
+
exports.MinecraftAfterEventOrderRecord = (0, runtypes_1.Record)({ name: runtypes_1.String });
|
|
15
|
+
exports.MinecraftAfterEventsOrderByVersionRecord = (0, runtypes_1.Intersect)(IMinecraftModule_1.ModuleNameDataValidator, (0, runtypes_1.Record)({
|
|
16
|
+
version_is_prerelease: (0, runtypes_1.Optional)(runtypes_1.Boolean),
|
|
17
|
+
module_prerelease_tag: (0, runtypes_1.Optional)((0, runtypes_1.Union)((0, runtypes_1.Literal)('alpha'), (0, runtypes_1.Literal)('beta'), (0, runtypes_1.Literal)('internal'), (0, runtypes_1.Literal)('preview'), (0, runtypes_1.Literal)('rc'))),
|
|
18
|
+
version: runtypes_1.String,
|
|
19
|
+
event_order: (0, runtypes_1.Array)(exports.MinecraftAfterEventOrderRecord),
|
|
20
|
+
}));
|
|
21
|
+
exports.MinecraftAfterEventsOrderModuleRecord = (0, runtypes_1.Intersect)(IMinecraftModule_1.CommonModuleDataValidator, (0, runtypes_1.Record)({
|
|
22
|
+
module_type: (0, runtypes_1.Literal)('after_events_ordering'),
|
|
23
|
+
after_events_order_by_version: (0, runtypes_1.Array)(exports.MinecraftAfterEventsOrderByVersionRecord),
|
|
24
|
+
}));
|
|
25
|
+
function isAfterEventsOrderModule(module) {
|
|
26
|
+
return module !== undefined && module.module_type === 'after_events_ordering';
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=MinecraftAfterEventsOrderModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MinecraftAfterEventsOrderModule.js","sourceRoot":"","sources":["../../src/modules/MinecraftAfterEventsOrderModule.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAalC,4EAEC;AA4BD,4DAEC;AA3CD,uCAAuG;AAEvG,yDAK4B;AAGf,QAAA,0BAA0B,GAAG,8BAA8B,CAAC;AACzE,SAAgB,gCAAgC,CAAC,iBAAiE;IAC9G,OAAO,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,kCAA0B,CAAC,CAAC;AACxF,CAAC;AAEY,QAAA,8BAA8B,GAAG,IAAA,iBAAM,EAAC,EAAE,IAAI,EAAE,iBAAM,EAAE,CAAC,CAAC;AAG1D,QAAA,wCAAwC,GAAG,IAAA,oBAAS,EAC7D,0CAAuB,EACvB,IAAA,iBAAM,EAAC;IACH,qBAAqB,EAAE,IAAA,mBAAQ,EAAC,kBAAO,CAAC;IACxC,qBAAqB,EAAE,IAAA,mBAAQ,EAC3B,IAAA,gBAAK,EAAC,IAAA,kBAAO,EAAC,OAAO,CAAC,EAAE,IAAA,kBAAO,EAAC,MAAM,CAAC,EAAE,IAAA,kBAAO,EAAC,UAAU,CAAC,EAAE,IAAA,kBAAO,EAAC,SAAS,CAAC,EAAE,IAAA,kBAAO,EAAC,IAAI,CAAC,CAAC,CACnG;IACD,OAAO,EAAE,iBAAM;IACf,WAAW,EAAE,IAAA,gBAAK,EAAC,sCAA8B,CAAC;CACrD,CAAC,CACL,CAAC;AAGW,QAAA,qCAAqC,GAAG,IAAA,oBAAS,EAC1D,4CAAyB,EACzB,IAAA,iBAAM,EAAC;IACH,WAAW,EAAE,IAAA,kBAAO,EAAC,uBAAuB,CAAC;IAE7C,6BAA6B,EAAE,IAAA,gBAAK,EAAC,gDAAwC,CAAC;CACjF,CAAC,CACL,CAAC;AAGF,SAAgB,wBAAwB,CAAC,MAAwB;IAC7D,OAAO,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,WAAW,KAAK,uBAAuB,CAAC;AAClF,CAAC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { Array, Boolean, Intersect, Literal, Number, Optional, Record, Static, String, Union } from 'runtypes';
|
|
2
|
+
export declare const MinecraftBlockRecord: Intersect<[Record<{
|
|
3
|
+
name: String;
|
|
4
|
+
}, false>, Record<{
|
|
5
|
+
namespace: Optional<String>;
|
|
6
|
+
no_namespace_name: Optional<String>;
|
|
7
|
+
standardized_name: Optional<String>;
|
|
8
|
+
}, false>, Record<{
|
|
9
|
+
has_comments: Optional<Boolean>;
|
|
10
|
+
}, false>, Record<{
|
|
11
|
+
properties: Array<Intersect<[Record<{
|
|
12
|
+
name: String;
|
|
13
|
+
}, false>, Record<{
|
|
14
|
+
has_comments: Optional<Boolean>;
|
|
15
|
+
}, false>, Record<{
|
|
16
|
+
property_description: Optional<Array<String, false>>;
|
|
17
|
+
}, false>]>, false>;
|
|
18
|
+
namespace: Optional<String>;
|
|
19
|
+
block_name: Optional<String>;
|
|
20
|
+
block_description: Optional<Array<String, false>>;
|
|
21
|
+
state_union: Optional<String>;
|
|
22
|
+
}, false>]>;
|
|
23
|
+
export type MinecraftBlock = Static<typeof MinecraftBlockRecord>;
|
|
24
|
+
export declare const MinecraftBlockPropertyValueRecord: Intersect<[Record<{
|
|
25
|
+
has_comments: Optional<Boolean>;
|
|
26
|
+
}, false>, Record<{
|
|
27
|
+
value: Union<[Number, String, Boolean]>;
|
|
28
|
+
value_description: Optional<Array<String, false>>;
|
|
29
|
+
}, false>]>;
|
|
30
|
+
export type MinecraftBlockPropertyValue = Static<typeof MinecraftBlockPropertyValueRecord>;
|
|
31
|
+
export declare const MinecraftBlockPropertyRecord: Intersect<[Record<{
|
|
32
|
+
name: String;
|
|
33
|
+
}, false>, Record<{
|
|
34
|
+
has_comments: Optional<Boolean>;
|
|
35
|
+
}, false>, Record<{
|
|
36
|
+
type: String;
|
|
37
|
+
values: Array<Intersect<[Record<{
|
|
38
|
+
has_comments: Optional<Boolean>;
|
|
39
|
+
}, false>, Record<{
|
|
40
|
+
value: Union<[Number, String, Boolean]>;
|
|
41
|
+
value_description: Optional<Array<String, false>>;
|
|
42
|
+
}, false>]>, false>;
|
|
43
|
+
min_value: Optional<Number>;
|
|
44
|
+
max_value: Optional<Number>;
|
|
45
|
+
property_name: Optional<String>;
|
|
46
|
+
property_description: Optional<Array<String, false>>;
|
|
47
|
+
property_type: Optional<Union<[Literal<"number">, Union<[Literal<"string">, Literal<"boolean">]>]>>;
|
|
48
|
+
int_value_display_as_range: Optional<Boolean>;
|
|
49
|
+
}, false>]>;
|
|
50
|
+
export type MinecraftBlockProperty = Static<typeof MinecraftBlockPropertyRecord>;
|
|
51
|
+
export declare const MinecraftBlockModuleRecord: Intersect<[Record<{
|
|
52
|
+
module_type: Literal<"vanilla_data">;
|
|
53
|
+
block_properties: Array<Intersect<[Record<{
|
|
54
|
+
name: String;
|
|
55
|
+
}, false>, Record<{
|
|
56
|
+
has_comments: Optional<Boolean>;
|
|
57
|
+
}, false>, Record<{
|
|
58
|
+
type: String;
|
|
59
|
+
values: Array<Intersect<[Record<{
|
|
60
|
+
has_comments: Optional<Boolean>;
|
|
61
|
+
}, false>, Record<{
|
|
62
|
+
value: Union<[Number, String, Boolean]>;
|
|
63
|
+
value_description: Optional<Array<String, false>>;
|
|
64
|
+
}, false>]>, false>;
|
|
65
|
+
min_value: Optional<Number>;
|
|
66
|
+
max_value: Optional<Number>;
|
|
67
|
+
property_name: Optional<String>;
|
|
68
|
+
property_description: Optional<Array<String, false>>;
|
|
69
|
+
property_type: Optional<Union<[Literal<"number">, Union<[Literal<"string">, Literal<"boolean">]>]>>;
|
|
70
|
+
int_value_display_as_range: Optional<Boolean>;
|
|
71
|
+
}, false>]>, false>;
|
|
72
|
+
data_properties: Optional<Array<Intersect<[Record<{
|
|
73
|
+
name: String;
|
|
74
|
+
}, false>, Record<{
|
|
75
|
+
has_comments: Optional<Boolean>;
|
|
76
|
+
}, false>, Record<{
|
|
77
|
+
type: String;
|
|
78
|
+
values: Array<Intersect<[Record<{
|
|
79
|
+
has_comments: Optional<Boolean>;
|
|
80
|
+
}, false>, Record<{
|
|
81
|
+
value: Union<[Number, String, Boolean]>;
|
|
82
|
+
value_description: Optional<Array<String, false>>;
|
|
83
|
+
}, false>]>, false>;
|
|
84
|
+
min_value: Optional<Number>;
|
|
85
|
+
max_value: Optional<Number>;
|
|
86
|
+
property_name: Optional<String>;
|
|
87
|
+
property_description: Optional<Array<String, false>>;
|
|
88
|
+
property_type: Optional<Union<[Literal<"number">, Union<[Literal<"string">, Literal<"boolean">]>]>>;
|
|
89
|
+
int_value_display_as_range: Optional<Boolean>;
|
|
90
|
+
}, false>]>, false>>;
|
|
91
|
+
}, false>, Intersect<[Intersect<[Record<{
|
|
92
|
+
data_items: Array<Intersect<[Intersect<[Record<{
|
|
93
|
+
name: String;
|
|
94
|
+
}, false>, Record<{
|
|
95
|
+
namespace: Optional<String>;
|
|
96
|
+
no_namespace_name: Optional<String>;
|
|
97
|
+
standardized_name: Optional<String>;
|
|
98
|
+
}, false>]>, Record<{
|
|
99
|
+
properties: Optional<Array<Record<{
|
|
100
|
+
name: String;
|
|
101
|
+
}, false>, false>>;
|
|
102
|
+
state_union: Optional<String>;
|
|
103
|
+
value: Optional<String>;
|
|
104
|
+
}, false>]>, false>;
|
|
105
|
+
vanilla_data_type: Optional<String>;
|
|
106
|
+
module_type: Literal<"vanilla_data">;
|
|
107
|
+
display_type: Optional<String>;
|
|
108
|
+
display_name: Optional<String>;
|
|
109
|
+
has_properties: Optional<Boolean>;
|
|
110
|
+
}, false>, Record<{
|
|
111
|
+
name: String;
|
|
112
|
+
minecraft_version: String;
|
|
113
|
+
module_type: Union<[Literal<"script">, Literal<"commands">, Literal<"after_events_ordering">, Literal<"vanilla_data">]>;
|
|
114
|
+
module_name: Optional<String>;
|
|
115
|
+
}, false>]>, Record<{
|
|
116
|
+
data_items: Array<Intersect<[Record<{
|
|
117
|
+
name: String;
|
|
118
|
+
}, false>, Record<{
|
|
119
|
+
namespace: Optional<String>;
|
|
120
|
+
no_namespace_name: Optional<String>;
|
|
121
|
+
standardized_name: Optional<String>;
|
|
122
|
+
}, false>, Record<{
|
|
123
|
+
has_comments: Optional<Boolean>;
|
|
124
|
+
}, false>, Record<{
|
|
125
|
+
properties: Array<Intersect<[Record<{
|
|
126
|
+
name: String;
|
|
127
|
+
}, false>, Record<{
|
|
128
|
+
has_comments: Optional<Boolean>;
|
|
129
|
+
}, false>, Record<{
|
|
130
|
+
property_description: Optional<Array<String, false>>;
|
|
131
|
+
}, false>]>, false>;
|
|
132
|
+
namespace: Optional<String>;
|
|
133
|
+
block_name: Optional<String>;
|
|
134
|
+
block_description: Optional<Array<String, false>>;
|
|
135
|
+
state_union: Optional<String>;
|
|
136
|
+
}, false>]>, false>;
|
|
137
|
+
vanilla_data_type: Optional<Literal<string>>;
|
|
138
|
+
}, false>]>]>;
|
|
139
|
+
export type MinecraftBlockModule = Static<typeof MinecraftBlockModuleRecord>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.MinecraftBlockModuleRecord = exports.MinecraftBlockPropertyRecord = exports.MinecraftBlockPropertyValueRecord = exports.MinecraftBlockRecord = void 0;
|
|
6
|
+
const runtypes_1 = require("runtypes");
|
|
7
|
+
const IMinecraftModule_1 = require("./IMinecraftModule");
|
|
8
|
+
exports.MinecraftBlockRecord = (0, runtypes_1.Intersect)(IMinecraftModule_1.ModuleNameDataValidator, IMinecraftModule_1.StandardizedVanillaNameRecord, IMinecraftModule_1.CommonCommentFlagsValidator, (0, runtypes_1.Record)({
|
|
9
|
+
properties: (0, runtypes_1.Array)((0, runtypes_1.Intersect)(IMinecraftModule_1.ModuleNameDataValidator, IMinecraftModule_1.CommonCommentFlagsValidator, (0, runtypes_1.Record)({ property_description: (0, runtypes_1.Optional)((0, runtypes_1.Array)(runtypes_1.String)) }))),
|
|
10
|
+
// Runtime Markup
|
|
11
|
+
namespace: (0, runtypes_1.Optional)(runtypes_1.String),
|
|
12
|
+
block_name: (0, runtypes_1.Optional)(runtypes_1.String),
|
|
13
|
+
block_description: (0, runtypes_1.Optional)((0, runtypes_1.Array)(runtypes_1.String)),
|
|
14
|
+
state_union: (0, runtypes_1.Optional)(runtypes_1.String),
|
|
15
|
+
}));
|
|
16
|
+
exports.MinecraftBlockPropertyValueRecord = (0, runtypes_1.Intersect)(IMinecraftModule_1.CommonCommentFlagsValidator, (0, runtypes_1.Record)({
|
|
17
|
+
value: (0, runtypes_1.Union)(runtypes_1.Number, runtypes_1.String, runtypes_1.Boolean),
|
|
18
|
+
value_description: (0, runtypes_1.Optional)((0, runtypes_1.Array)(runtypes_1.String)),
|
|
19
|
+
}));
|
|
20
|
+
exports.MinecraftBlockPropertyRecord = (0, runtypes_1.Intersect)(IMinecraftModule_1.ModuleNameDataValidator, IMinecraftModule_1.CommonCommentFlagsValidator, (0, runtypes_1.Record)({
|
|
21
|
+
type: runtypes_1.String,
|
|
22
|
+
values: (0, runtypes_1.Array)(exports.MinecraftBlockPropertyValueRecord),
|
|
23
|
+
min_value: (0, runtypes_1.Optional)(runtypes_1.Number),
|
|
24
|
+
max_value: (0, runtypes_1.Optional)(runtypes_1.Number),
|
|
25
|
+
// Runtime Markup
|
|
26
|
+
property_name: (0, runtypes_1.Optional)(runtypes_1.String),
|
|
27
|
+
property_description: (0, runtypes_1.Optional)((0, runtypes_1.Array)(runtypes_1.String)),
|
|
28
|
+
property_type: (0, runtypes_1.Optional)((0, runtypes_1.Literal)('number').Or((0, runtypes_1.Literal)('string').Or((0, runtypes_1.Literal)('boolean')))),
|
|
29
|
+
int_value_display_as_range: (0, runtypes_1.Optional)(runtypes_1.Boolean),
|
|
30
|
+
}));
|
|
31
|
+
exports.MinecraftBlockModuleRecord = (0, runtypes_1.Intersect)((0, runtypes_1.Record)({
|
|
32
|
+
module_type: (0, runtypes_1.Literal)('vanilla_data'),
|
|
33
|
+
block_properties: (0, runtypes_1.Array)(exports.MinecraftBlockPropertyRecord),
|
|
34
|
+
// Runtime Markup
|
|
35
|
+
data_properties: (0, runtypes_1.Optional)((0, runtypes_1.Array)(exports.MinecraftBlockPropertyRecord)),
|
|
36
|
+
}), (0, IMinecraftModule_1.getCommonVanillaDataFieldsRecord)(exports.MinecraftBlockRecord, 'block'));
|
|
37
|
+
//# sourceMappingURL=MinecraftBlockModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MinecraftBlockModule.js","sourceRoot":"","sources":["../../src/modules/MinecraftBlockModule.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,uCAA+G;AAE/G,yDAK4B;AAEf,QAAA,oBAAoB,GAAG,IAAA,oBAAS,EACzC,0CAAuB,EACvB,gDAA6B,EAC7B,8CAA2B,EAC3B,IAAA,iBAAM,EAAC;IACH,UAAU,EAAE,IAAA,gBAAK,EACb,IAAA,oBAAS,EACL,0CAAuB,EACvB,8CAA2B,EAC3B,IAAA,iBAAM,EAAC,EAAE,oBAAoB,EAAE,IAAA,mBAAQ,EAAC,IAAA,gBAAK,EAAC,iBAAM,CAAC,CAAC,EAAE,CAAC,CAC5D,CACJ;IAED,iBAAiB;IACjB,SAAS,EAAE,IAAA,mBAAQ,EAAC,iBAAM,CAAC;IAC3B,UAAU,EAAE,IAAA,mBAAQ,EAAC,iBAAM,CAAC;IAC5B,iBAAiB,EAAE,IAAA,mBAAQ,EAAC,IAAA,gBAAK,EAAC,iBAAM,CAAC,CAAC;IAC1C,WAAW,EAAE,IAAA,mBAAQ,EAAC,iBAAM,CAAC;CAChC,CAAC,CACL,CAAC;AAGW,QAAA,iCAAiC,GAAG,IAAA,oBAAS,EACtD,8CAA2B,EAC3B,IAAA,iBAAM,EAAC;IACH,KAAK,EAAE,IAAA,gBAAK,EAAC,iBAAM,EAAE,iBAAM,EAAE,kBAAO,CAAC;IACrC,iBAAiB,EAAE,IAAA,mBAAQ,EAAC,IAAA,gBAAK,EAAC,iBAAM,CAAC,CAAC;CAC7C,CAAC,CACL,CAAC;AAGW,QAAA,4BAA4B,GAAG,IAAA,oBAAS,EACjD,0CAAuB,EACvB,8CAA2B,EAC3B,IAAA,iBAAM,EAAC;IACH,IAAI,EAAE,iBAAM;IACZ,MAAM,EAAE,IAAA,gBAAK,EAAC,yCAAiC,CAAC;IAChD,SAAS,EAAE,IAAA,mBAAQ,EAAC,iBAAM,CAAC;IAC3B,SAAS,EAAE,IAAA,mBAAQ,EAAC,iBAAM,CAAC;IAE3B,iBAAiB;IACjB,aAAa,EAAE,IAAA,mBAAQ,EAAC,iBAAM,CAAC;IAC/B,oBAAoB,EAAE,IAAA,mBAAQ,EAAC,IAAA,gBAAK,EAAC,iBAAM,CAAC,CAAC;IAC7C,aAAa,EAAE,IAAA,mBAAQ,EAAC,IAAA,kBAAO,EAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAA,kBAAO,EAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAA,kBAAO,EAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACvF,0BAA0B,EAAE,IAAA,mBAAQ,EAAC,kBAAO,CAAC;CAChD,CAAC,CACL,CAAC;AAGW,QAAA,0BAA0B,GAAG,IAAA,oBAAS,EAC/C,IAAA,iBAAM,EAAC;IACH,WAAW,EAAE,IAAA,kBAAO,EAAC,cAAc,CAAC;IACpC,gBAAgB,EAAE,IAAA,gBAAK,EAAC,oCAA4B,CAAC;IAErD,iBAAiB;IACjB,eAAe,EAAE,IAAA,mBAAQ,EAAC,IAAA,gBAAK,EAAC,oCAA4B,CAAC,CAAC;CACjE,CAAC,EACF,IAAA,mDAAgC,EAAC,4BAAoB,EAAE,OAAO,CAAC,CAClE,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as modules from '.';
|
|
2
|
+
export type ArrayChangelogEntry<T = unknown> = T & {
|
|
3
|
+
$added?: boolean;
|
|
4
|
+
$removed?: boolean;
|
|
5
|
+
version?: string;
|
|
6
|
+
};
|
|
7
|
+
export type ValueChangelogEntry<T = unknown> = {
|
|
8
|
+
$old: T;
|
|
9
|
+
$new: T;
|
|
10
|
+
$changed?: boolean;
|
|
11
|
+
version?: string;
|
|
12
|
+
};
|
|
13
|
+
export type ModuleWithChangelog<T extends modules.IMinecraftModule> = T & {
|
|
14
|
+
changelog: ArrayChangelogEntry<T>[];
|
|
15
|
+
};
|
|
16
|
+
export declare function isArrayChangelogEntry<T>(obj: object): obj is ArrayChangelogEntry<T>;
|
|
17
|
+
export declare function isValueChangelogEntry<T>(obj: object): obj is ValueChangelogEntry<T>;
|
|
18
|
+
export declare function moduleHasChangelog<T extends modules.IMinecraftModule>(module: T): module is ModuleWithChangelog<T>;
|
|
19
|
+
export type IMinecraftModuleChangelogEntry = ArrayChangelogEntry<modules.IMinecraftModule>;
|
|
20
|
+
export type IMinecraftModuleWithChangelog = ModuleWithChangelog<modules.IMinecraftModule>;
|
|
21
|
+
export type ChangelogKey = 'changelog' | 'class_changelog' | 'interface_changelog' | 'error_changelog' | 'object_changelog' | 'function_changelog' | 'constant_changelog' | 'property_changelog' | 'enum_changelog' | 'alias_changelog';
|
|
22
|
+
export type MinecraftDependencyChangelogEntry = ArrayChangelogEntry<modules.MinecraftModuleDescription>;
|
|
23
|
+
export type MinecraftScriptModuleChangelogEntry = ArrayChangelogEntry<modules.MinecraftScriptModule>;
|
|
24
|
+
export type MinecraftScriptModuleWithChangelog = ModuleWithChangelog<modules.MinecraftScriptModule>;
|
|
25
|
+
export type MinecraftClassChangelogEntry = ArrayChangelogEntry<modules.MinecraftClass>;
|
|
26
|
+
export type MinecraftClassWithChangelog = modules.MinecraftClass & {
|
|
27
|
+
class_changelog?: MinecraftClassChangelogEntry[];
|
|
28
|
+
};
|
|
29
|
+
export type MinecraftInterfaceChangelogEntry = ArrayChangelogEntry<modules.MinecraftInterface>;
|
|
30
|
+
export type MinecraftInterfaceWithChangelog = modules.MinecraftInterface & {
|
|
31
|
+
interface_changelog?: MinecraftInterfaceChangelogEntry[];
|
|
32
|
+
};
|
|
33
|
+
export type MinecraftErrorChangelogEntry = ArrayChangelogEntry<modules.MinecraftError>;
|
|
34
|
+
export type MinecraftErrorWithChangelog = modules.MinecraftError & {
|
|
35
|
+
error_changelog?: MinecraftErrorChangelogEntry[];
|
|
36
|
+
};
|
|
37
|
+
export type MinecraftObjectChangelogEntry = ArrayChangelogEntry<modules.MinecraftObject>;
|
|
38
|
+
export type MinecraftObjectWithChangelog = modules.MinecraftObject & {
|
|
39
|
+
object_changelog?: MinecraftObjectChangelogEntry[];
|
|
40
|
+
};
|
|
41
|
+
export type MinecraftFunctionChangelogEntry = ArrayChangelogEntry<modules.MinecraftFunction>;
|
|
42
|
+
export type MinecraftFunctionWithChangelog = modules.MinecraftFunction & {
|
|
43
|
+
function_changelog?: MinecraftFunctionChangelogEntry[];
|
|
44
|
+
};
|
|
45
|
+
export type MinecraftConstantChangelogEntry = ArrayChangelogEntry<modules.MinecraftConstant>;
|
|
46
|
+
export type MinecraftConstantWithChangelog = modules.MinecraftConstant & {
|
|
47
|
+
constant_changelog?: MinecraftConstantChangelogEntry[];
|
|
48
|
+
};
|
|
49
|
+
export type MinecraftPropertyChangelogEntry = ArrayChangelogEntry<modules.MinecraftProperty>;
|
|
50
|
+
export type MinecraftPropertyWithChangelog = modules.MinecraftProperty & {
|
|
51
|
+
property_changelog?: MinecraftPropertyChangelogEntry[];
|
|
52
|
+
};
|
|
53
|
+
export type MinecraftEnumChangelogEntry = ArrayChangelogEntry<modules.MinecraftEnum>;
|
|
54
|
+
export type MinecraftEnumWithChangelog = modules.MinecraftEnum & {
|
|
55
|
+
enum_changelog?: MinecraftEnumChangelogEntry[];
|
|
56
|
+
};
|
|
57
|
+
export type MinecraftTypeAliasChangelogEntry = ArrayChangelogEntry<modules.MinecraftTypeAlias>;
|
|
58
|
+
export type MinecraftTypeAliasWithChangelog = modules.MinecraftTypeAlias & {
|
|
59
|
+
alias_changelog?: MinecraftTypeAliasChangelogEntry[];
|
|
60
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.isArrayChangelogEntry = isArrayChangelogEntry;
|
|
6
|
+
exports.isValueChangelogEntry = isValueChangelogEntry;
|
|
7
|
+
exports.moduleHasChangelog = moduleHasChangelog;
|
|
8
|
+
function isArrayChangelogEntry(obj) {
|
|
9
|
+
return obj !== undefined && ('$added' in obj || '$removed' in obj);
|
|
10
|
+
}
|
|
11
|
+
function isValueChangelogEntry(obj) {
|
|
12
|
+
return obj !== undefined && '$old' in obj && '$new' in obj;
|
|
13
|
+
}
|
|
14
|
+
function moduleHasChangelog(module) {
|
|
15
|
+
return module !== undefined && 'changelog' in module;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=MinecraftChangelogTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MinecraftChangelogTypes.js","sourceRoot":"","sources":["../../src/modules/MinecraftChangelogTypes.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAqBlC,sDAEC;AAED,sDAEC;AAED,gDAEC;AAVD,SAAgB,qBAAqB,CAAI,GAAW;IAChD,OAAO,GAAG,KAAK,SAAS,IAAI,CAAC,QAAQ,IAAI,GAAG,IAAI,UAAU,IAAI,GAAG,CAAC,CAAC;AACvE,CAAC;AAED,SAAgB,qBAAqB,CAAI,GAAW;IAChD,OAAO,GAAG,KAAK,SAAS,IAAI,MAAM,IAAI,GAAG,IAAI,MAAM,IAAI,GAAG,CAAC;AAC/D,CAAC;AAED,SAAgB,kBAAkB,CAAqC,MAAS;IAC5E,OAAO,MAAM,KAAK,SAAS,IAAI,WAAW,IAAI,MAAM,CAAC;AACzD,CAAC"}
|