@openrewrite/rewrite 0.32.0 → 0.33.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/dist/src/core/execution.d.ts +22 -1
- package/dist/src/core/execution.d.ts.map +1 -1
- package/dist/src/core/execution.js +61 -1
- package/dist/src/core/execution.js.map +1 -1
- package/dist/src/core/index.d.ts +1 -0
- package/dist/src/core/index.d.ts.map +1 -1
- package/dist/src/core/index.js +1 -0
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/core/style.d.ts +20 -0
- package/dist/src/core/style.d.ts.map +1 -0
- package/dist/src/core/style.js +48 -0
- package/dist/src/core/style.js.map +1 -0
- package/dist/src/core/tree.d.ts +2 -0
- package/dist/src/core/tree.d.ts.map +1 -1
- package/dist/src/core/tree.js +13 -0
- package/dist/src/core/tree.js.map +1 -1
- package/dist/src/javascript/format/blankLines.d.ts +13 -0
- package/dist/src/javascript/format/blankLines.d.ts.map +1 -0
- package/dist/src/javascript/format/blankLines.js +165 -0
- package/dist/src/javascript/format/blankLines.js.map +1 -0
- package/dist/src/javascript/format/normalizeSpaces.d.ts +9 -0
- package/dist/src/javascript/format/normalizeSpaces.d.ts.map +1 -0
- package/dist/src/javascript/format/normalizeSpaces.js +59 -0
- package/dist/src/javascript/format/normalizeSpaces.js.map +1 -0
- package/dist/src/javascript/parser.d.ts.map +1 -1
- package/dist/src/javascript/parser.js +19 -17
- package/dist/src/javascript/parser.js.map +1 -1
- package/dist/src/javascript/parserUtils.d.ts +3 -0
- package/dist/src/javascript/parserUtils.d.ts.map +1 -1
- package/dist/src/javascript/parserUtils.js +152 -0
- package/dist/src/javascript/parserUtils.js.map +1 -1
- package/dist/src/javascript/style.d.ts +203 -0
- package/dist/src/javascript/style.d.ts.map +1 -0
- package/dist/src/javascript/style.js +296 -0
- package/dist/src/javascript/style.js.map +1 -0
- package/dist/src/json/extensions.d.ts +1 -1
- package/dist/src/json/extensions.d.ts.map +1 -1
- package/dist/src/json/index.d.ts +0 -1
- package/dist/src/json/index.d.ts.map +1 -1
- package/dist/src/json/index.js +0 -1
- package/dist/src/json/index.js.map +1 -1
- package/dist/src/json/tree/extensions.d.ts +2 -0
- package/dist/src/json/tree/extensions.d.ts.map +1 -0
- package/dist/src/json/tree/extensions.js +3 -0
- package/dist/src/json/tree/extensions.js.map +1 -0
- package/dist/src/json/tree/index.d.ts +3 -0
- package/dist/src/json/tree/index.d.ts.map +1 -0
- package/dist/src/json/tree/index.js +19 -0
- package/dist/src/json/tree/index.js.map +1 -0
- package/dist/src/json/tree/support_types.d.ts +55 -0
- package/dist/src/json/tree/support_types.d.ts.map +1 -0
- package/dist/src/json/{support_types.js → tree/support_types.js} +23 -1
- package/dist/src/json/tree/support_types.js.map +1 -0
- package/dist/src/json/tree/tree.d.ts +322 -0
- package/dist/src/json/tree/tree.d.ts.map +1 -0
- package/dist/src/json/tree/tree.js +378 -0
- package/dist/src/json/tree/tree.js.map +1 -0
- package/dist/src/json/visitor.d.ts +9 -9
- package/dist/src/json/visitor.d.ts.map +1 -1
- package/dist/src/json/visitor.js +1 -1
- package/dist/src/json/visitor.js.map +1 -1
- package/dist/src/yaml/extensions.d.ts +2 -0
- package/dist/src/yaml/extensions.d.ts.map +1 -0
- package/dist/src/yaml/extensions.js +3 -0
- package/dist/src/yaml/extensions.js.map +1 -0
- package/dist/src/yaml/remote/receiver.d.ts.map +1 -1
- package/dist/src/yaml/remote/receiver.js +20 -5
- package/dist/src/yaml/remote/receiver.js.map +1 -1
- package/dist/src/yaml/remote/sender.d.ts.map +1 -1
- package/dist/src/yaml/remote/sender.js +14 -2
- package/dist/src/yaml/remote/sender.js.map +1 -1
- package/dist/src/yaml/tree/tree.d.ts +60 -3
- package/dist/src/yaml/tree/tree.d.ts.map +1 -1
- package/dist/src/yaml/tree/tree.js +106 -23
- package/dist/src/yaml/tree/tree.js.map +1 -1
- package/dist/src/yaml/visitor.d.ts +3 -1
- package/dist/src/yaml/visitor.d.ts.map +1 -1
- package/dist/src/yaml/visitor.js +7 -0
- package/dist/src/yaml/visitor.js.map +1 -1
- package/package.json +1 -1
- package/dist/src/json/support_types.d.ts +0 -19
- package/dist/src/json/support_types.d.ts.map +0 -1
- package/dist/src/json/support_types.js.map +0 -1
- package/dist/src/json/tree.d.ts +0 -187
- package/dist/src/json/tree.d.ts.map +0 -1
- package/dist/src/json/tree.js +0 -393
- package/dist/src/json/tree.js.map +0 -1
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IntelliJ = exports.PunctuationStyle = exports.ImportsStyle = exports.BlankLinesStyle = exports.TabsAndIndentsStyle = exports.WrappingAndBraces = exports.SpacesStyle = exports.JavaScriptStyle = void 0;
|
|
4
|
+
const core_1 = require("../core");
|
|
5
|
+
class JavaScriptStyle extends core_1.Style {
|
|
6
|
+
}
|
|
7
|
+
exports.JavaScriptStyle = JavaScriptStyle;
|
|
8
|
+
class SpacesStyle extends JavaScriptStyle {
|
|
9
|
+
constructor(beforeParentheses, aroundOperators, beforeLeftBrace, beforeKeywords, within, ternaryOperator, other) {
|
|
10
|
+
super();
|
|
11
|
+
this.beforeParentheses = beforeParentheses;
|
|
12
|
+
this.aroundOperators = aroundOperators;
|
|
13
|
+
this.beforeLeftBrace = beforeLeftBrace;
|
|
14
|
+
this.beforeKeywords = beforeKeywords;
|
|
15
|
+
this.within = within;
|
|
16
|
+
this.ternaryOperator = ternaryOperator;
|
|
17
|
+
this.other = other;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.SpacesStyle = SpacesStyle;
|
|
21
|
+
(function (SpacesStyle) {
|
|
22
|
+
class BeforeParentheses {
|
|
23
|
+
constructor(functionDeclarationParentheses, functionCallParentheses, ifParentheses, forParentheses, whileParentheses, switchParentheses, catchParentheses, inFunctionCallExpression, inAsyncArrowFunction) {
|
|
24
|
+
this.functionDeclarationParentheses = functionDeclarationParentheses;
|
|
25
|
+
this.functionCallParentheses = functionCallParentheses;
|
|
26
|
+
this.ifParentheses = ifParentheses;
|
|
27
|
+
this.forParentheses = forParentheses;
|
|
28
|
+
this.whileParentheses = whileParentheses;
|
|
29
|
+
this.switchParentheses = switchParentheses;
|
|
30
|
+
this.catchParentheses = catchParentheses;
|
|
31
|
+
this.inFunctionCallExpression = inFunctionCallExpression;
|
|
32
|
+
this.inAsyncArrowFunction = inAsyncArrowFunction;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
SpacesStyle.BeforeParentheses = BeforeParentheses;
|
|
36
|
+
class AroundOperators {
|
|
37
|
+
constructor(assignment, logical, equality, relational, bitwise, additive, multiplicative, shift, unary, arrowFunction, beforeUnaryNotAndNotNull, afterUnaryNotAndNotNull) {
|
|
38
|
+
this.assignment = assignment;
|
|
39
|
+
this.logical = logical;
|
|
40
|
+
this.equality = equality;
|
|
41
|
+
this.relational = relational;
|
|
42
|
+
this.bitwise = bitwise;
|
|
43
|
+
this.additive = additive;
|
|
44
|
+
this.multiplicative = multiplicative;
|
|
45
|
+
this.shift = shift;
|
|
46
|
+
this.unary = unary;
|
|
47
|
+
this.arrowFunction = arrowFunction;
|
|
48
|
+
this.beforeUnaryNotAndNotNull = beforeUnaryNotAndNotNull;
|
|
49
|
+
this.afterUnaryNotAndNotNull = afterUnaryNotAndNotNull;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
SpacesStyle.AroundOperators = AroundOperators;
|
|
53
|
+
class BeforeLeftBrace {
|
|
54
|
+
constructor(functionLeftBrace, ifLeftBrace, elseLeftBrace, forLeftBrace, whileLeftBrace, doLeftBrace, switchLeftBrace, tryLeftBrace, catchLeftBrace, finallyLeftBrace, classInterfaceModuleLeftBrace) {
|
|
55
|
+
this.functionLeftBrace = functionLeftBrace;
|
|
56
|
+
this.ifLeftBrace = ifLeftBrace;
|
|
57
|
+
this.elseLeftBrace = elseLeftBrace;
|
|
58
|
+
this.forLeftBrace = forLeftBrace;
|
|
59
|
+
this.whileLeftBrace = whileLeftBrace;
|
|
60
|
+
this.doLeftBrace = doLeftBrace;
|
|
61
|
+
this.switchLeftBrace = switchLeftBrace;
|
|
62
|
+
this.tryLeftBrace = tryLeftBrace;
|
|
63
|
+
this.catchLeftBrace = catchLeftBrace;
|
|
64
|
+
this.finallyLeftBrace = finallyLeftBrace;
|
|
65
|
+
this.classInterfaceModuleLeftBrace = classInterfaceModuleLeftBrace;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
SpacesStyle.BeforeLeftBrace = BeforeLeftBrace;
|
|
69
|
+
class BeforeKeywords {
|
|
70
|
+
constructor(elseKeyword, whileKeyword, catchKeyword, finallyKeyword) {
|
|
71
|
+
this.elseKeyword = elseKeyword;
|
|
72
|
+
this.whileKeyword = whileKeyword;
|
|
73
|
+
this.catchKeyword = catchKeyword;
|
|
74
|
+
this.finallyKeyword = finallyKeyword;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
SpacesStyle.BeforeKeywords = BeforeKeywords;
|
|
78
|
+
class Within {
|
|
79
|
+
constructor(indexAccessBrackets, groupingParentheses, functionDeclarationParentheses, functionCallParentheses, ifParentheses, forParentheses, whileParentheses, switchParentheses, catchParentheses, objectLiteralBraces, es6ImportExportBraces, arrayBrackets, interpolationExpressions, objectLiteralTypeBraces, unionAndIntersectionTypes, typeAssertions) {
|
|
80
|
+
this.indexAccessBrackets = indexAccessBrackets;
|
|
81
|
+
this.groupingParentheses = groupingParentheses;
|
|
82
|
+
this.functionDeclarationParentheses = functionDeclarationParentheses;
|
|
83
|
+
this.functionCallParentheses = functionCallParentheses;
|
|
84
|
+
this.ifParentheses = ifParentheses;
|
|
85
|
+
this.forParentheses = forParentheses;
|
|
86
|
+
this.whileParentheses = whileParentheses;
|
|
87
|
+
this.switchParentheses = switchParentheses;
|
|
88
|
+
this.catchParentheses = catchParentheses;
|
|
89
|
+
this.objectLiteralBraces = objectLiteralBraces;
|
|
90
|
+
this.es6ImportExportBraces = es6ImportExportBraces;
|
|
91
|
+
this.arrayBrackets = arrayBrackets;
|
|
92
|
+
this.interpolationExpressions = interpolationExpressions;
|
|
93
|
+
this.objectLiteralTypeBraces = objectLiteralTypeBraces;
|
|
94
|
+
this.unionAndIntersectionTypes = unionAndIntersectionTypes;
|
|
95
|
+
this.typeAssertions = typeAssertions;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
SpacesStyle.Within = Within;
|
|
99
|
+
class TernaryOperator {
|
|
100
|
+
constructor(beforeQuestionMark, afterQuestionMark, beforeColon, afterColon) {
|
|
101
|
+
this.beforeQuestionMark = beforeQuestionMark;
|
|
102
|
+
this.afterQuestionMark = afterQuestionMark;
|
|
103
|
+
this.beforeColon = beforeColon;
|
|
104
|
+
this.afterColon = afterColon;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
SpacesStyle.TernaryOperator = TernaryOperator;
|
|
108
|
+
class Other {
|
|
109
|
+
constructor(beforeComma, afterComma, beforeForSemicolon, beforePropertyNameValueSeparator, afterPropertyNameValueSeparator, afterVarArgInRestOrSpread, beforeAsteriskInGenerator, afterAsteriskInGenerator, beforeTypeReferenceColon, afterTypeReferenceColon) {
|
|
110
|
+
this.beforeComma = beforeComma;
|
|
111
|
+
this.afterComma = afterComma;
|
|
112
|
+
this.beforeForSemicolon = beforeForSemicolon;
|
|
113
|
+
this.beforePropertyNameValueSeparator = beforePropertyNameValueSeparator;
|
|
114
|
+
this.afterPropertyNameValueSeparator = afterPropertyNameValueSeparator;
|
|
115
|
+
this.afterVarArgInRestOrSpread = afterVarArgInRestOrSpread;
|
|
116
|
+
this.beforeAsteriskInGenerator = beforeAsteriskInGenerator;
|
|
117
|
+
this.afterAsteriskInGenerator = afterAsteriskInGenerator;
|
|
118
|
+
this.beforeTypeReferenceColon = beforeTypeReferenceColon;
|
|
119
|
+
this.afterTypeReferenceColon = afterTypeReferenceColon;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
SpacesStyle.Other = Other;
|
|
123
|
+
})(SpacesStyle || (exports.SpacesStyle = SpacesStyle = {}));
|
|
124
|
+
class WrappingAndBraces extends JavaScriptStyle {
|
|
125
|
+
}
|
|
126
|
+
exports.WrappingAndBraces = WrappingAndBraces;
|
|
127
|
+
class TabsAndIndentsStyle extends JavaScriptStyle {
|
|
128
|
+
constructor(useTabCharacter, tabSize, indentSize, continuationIndent, keepIndentsOnEmptyLines, indentChainedMethods, indentAllChainedCallsInAGroup) {
|
|
129
|
+
super();
|
|
130
|
+
this.useTabCharacter = useTabCharacter;
|
|
131
|
+
this.tabSize = tabSize;
|
|
132
|
+
this.indentSize = indentSize;
|
|
133
|
+
this.continuationIndent = continuationIndent;
|
|
134
|
+
this.keepIndentsOnEmptyLines = keepIndentsOnEmptyLines;
|
|
135
|
+
this.indentChainedMethods = indentChainedMethods;
|
|
136
|
+
this.indentAllChainedCallsInAGroup = indentAllChainedCallsInAGroup;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
exports.TabsAndIndentsStyle = TabsAndIndentsStyle;
|
|
140
|
+
class BlankLinesStyle extends JavaScriptStyle {
|
|
141
|
+
constructor(keepMaximum, minimum) {
|
|
142
|
+
super();
|
|
143
|
+
this.keepMaximum = keepMaximum;
|
|
144
|
+
this.minimum = minimum;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
exports.BlankLinesStyle = BlankLinesStyle;
|
|
148
|
+
(function (BlankLinesStyle) {
|
|
149
|
+
class KeepMaximum {
|
|
150
|
+
constructor(inCode) {
|
|
151
|
+
this.inCode = inCode;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
BlankLinesStyle.KeepMaximum = KeepMaximum;
|
|
155
|
+
class Minimum {
|
|
156
|
+
constructor(afterImports, aroundClass, aroundFieldInInterface, aroundField, aroundMethodInInterface, aroundMethod, aroundFunction) {
|
|
157
|
+
this.afterImports = afterImports;
|
|
158
|
+
this.aroundClass = aroundClass;
|
|
159
|
+
this.aroundFieldInInterface = aroundFieldInInterface;
|
|
160
|
+
this.aroundField = aroundField;
|
|
161
|
+
this.aroundMethodInInterface = aroundMethodInInterface;
|
|
162
|
+
this.aroundMethod = aroundMethod;
|
|
163
|
+
this.aroundFunction = aroundFunction;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
BlankLinesStyle.Minimum = Minimum;
|
|
167
|
+
})(BlankLinesStyle || (exports.BlankLinesStyle = BlankLinesStyle = {}));
|
|
168
|
+
class ImportsStyle extends JavaScriptStyle {
|
|
169
|
+
constructor(mergeImportsForMembersFromTheSameModule, usePathRelativeToTheProjectOrResourceOrSourcesRootsOrTsconfigJson, useDirectoryImportsWhenIndexJsIsAvailable, useFileExtensions, useTypeModifiersInImports, usePathMappingsFromTSConfigJson, usePathAliases, doNotImportExactlyFrom, sortImportedMembers, sortImportsByModules) {
|
|
170
|
+
super();
|
|
171
|
+
this.mergeImportsForMembersFromTheSameModule = mergeImportsForMembersFromTheSameModule;
|
|
172
|
+
this.usePathRelativeToTheProjectOrResourceOrSourcesRootsOrTsconfigJson = usePathRelativeToTheProjectOrResourceOrSourcesRootsOrTsconfigJson;
|
|
173
|
+
this.useDirectoryImportsWhenIndexJsIsAvailable = useDirectoryImportsWhenIndexJsIsAvailable;
|
|
174
|
+
this.useFileExtensions = useFileExtensions;
|
|
175
|
+
this.useTypeModifiersInImports = useTypeModifiersInImports;
|
|
176
|
+
this.usePathMappingsFromTSConfigJson = usePathMappingsFromTSConfigJson;
|
|
177
|
+
this.usePathAliases = usePathAliases;
|
|
178
|
+
this.doNotImportExactlyFrom = doNotImportExactlyFrom;
|
|
179
|
+
this.sortImportedMembers = sortImportedMembers;
|
|
180
|
+
this.sortImportsByModules = sortImportsByModules;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
exports.ImportsStyle = ImportsStyle;
|
|
184
|
+
(function (ImportsStyle) {
|
|
185
|
+
let UseFileExtensions;
|
|
186
|
+
(function (UseFileExtensions) {
|
|
187
|
+
UseFileExtensions[UseFileExtensions["Auto"] = 0] = "Auto";
|
|
188
|
+
UseFileExtensions[UseFileExtensions["AlwaysJs"] = 1] = "AlwaysJs";
|
|
189
|
+
UseFileExtensions[UseFileExtensions["Never"] = 2] = "Never";
|
|
190
|
+
})(UseFileExtensions = ImportsStyle.UseFileExtensions || (ImportsStyle.UseFileExtensions = {}));
|
|
191
|
+
let UsePathAliases;
|
|
192
|
+
(function (UsePathAliases) {
|
|
193
|
+
UsePathAliases[UsePathAliases["Always"] = 0] = "Always";
|
|
194
|
+
UsePathAliases[UsePathAliases["OnlyInFilesOutsideSpecifiedPath"] = 1] = "OnlyInFilesOutsideSpecifiedPath";
|
|
195
|
+
UsePathAliases[UsePathAliases["Never"] = 2] = "Never";
|
|
196
|
+
})(UsePathAliases = ImportsStyle.UsePathAliases || (ImportsStyle.UsePathAliases = {}));
|
|
197
|
+
let UsePathMappingsFromTSConfigJson;
|
|
198
|
+
(function (UsePathMappingsFromTSConfigJson) {
|
|
199
|
+
UsePathMappingsFromTSConfigJson[UsePathMappingsFromTSConfigJson["Always"] = 0] = "Always";
|
|
200
|
+
UsePathMappingsFromTSConfigJson[UsePathMappingsFromTSConfigJson["OnlyInFilesOutsideSpecifiedPath"] = 1] = "OnlyInFilesOutsideSpecifiedPath";
|
|
201
|
+
UsePathMappingsFromTSConfigJson[UsePathMappingsFromTSConfigJson["Never"] = 2] = "Never";
|
|
202
|
+
})(UsePathMappingsFromTSConfigJson = ImportsStyle.UsePathMappingsFromTSConfigJson || (ImportsStyle.UsePathMappingsFromTSConfigJson = {}));
|
|
203
|
+
let UseTypeModifiersInImports;
|
|
204
|
+
(function (UseTypeModifiersInImports) {
|
|
205
|
+
UseTypeModifiersInImports[UseTypeModifiersInImports["Auto"] = 0] = "Auto";
|
|
206
|
+
UseTypeModifiersInImports[UseTypeModifiersInImports["AlwaysWithType"] = 1] = "AlwaysWithType";
|
|
207
|
+
UseTypeModifiersInImports[UseTypeModifiersInImports["Never"] = 2] = "Never";
|
|
208
|
+
})(UseTypeModifiersInImports = ImportsStyle.UseTypeModifiersInImports || (ImportsStyle.UseTypeModifiersInImports = {}));
|
|
209
|
+
})(ImportsStyle || (exports.ImportsStyle = ImportsStyle = {}));
|
|
210
|
+
class PunctuationStyle extends JavaScriptStyle {
|
|
211
|
+
constructor(trailingComma) {
|
|
212
|
+
super();
|
|
213
|
+
this.trailingComma = trailingComma;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
exports.PunctuationStyle = PunctuationStyle;
|
|
217
|
+
(function (PunctuationStyle) {
|
|
218
|
+
let TrailingComma;
|
|
219
|
+
(function (TrailingComma) {
|
|
220
|
+
TrailingComma[TrailingComma["Keep"] = 0] = "Keep";
|
|
221
|
+
TrailingComma[TrailingComma["Remove"] = 1] = "Remove";
|
|
222
|
+
TrailingComma[TrailingComma["AddWhenMultiLine"] = 2] = "AddWhenMultiLine";
|
|
223
|
+
})(TrailingComma = PunctuationStyle.TrailingComma || (PunctuationStyle.TrailingComma = {}));
|
|
224
|
+
})(PunctuationStyle || (exports.PunctuationStyle = PunctuationStyle = {}));
|
|
225
|
+
class IntelliJ extends core_1.NamedStyles {
|
|
226
|
+
constructor() {
|
|
227
|
+
super((0, core_1.randomId)(), "org.openrewrite.javascript.style.IntelliJ", "IntelliJ IDEA", "IntelliJ IDEA default JS/TS style.", new Set(), [
|
|
228
|
+
IntelliJ.JavaScript.spaces(),
|
|
229
|
+
IntelliJ.JavaScript.wrappingAndBraces(),
|
|
230
|
+
IntelliJ.JavaScript.tabsAndIndents(),
|
|
231
|
+
IntelliJ.JavaScript.blankLines(),
|
|
232
|
+
IntelliJ.JavaScript.imports(),
|
|
233
|
+
IntelliJ.JavaScript.punctuation(),
|
|
234
|
+
IntelliJ.TypeScript.spaces(),
|
|
235
|
+
IntelliJ.TypeScript.wrappingAndBraces(),
|
|
236
|
+
IntelliJ.TypeScript.tabsAndIndents(),
|
|
237
|
+
IntelliJ.TypeScript.blankLines(),
|
|
238
|
+
IntelliJ.TypeScript.imports(),
|
|
239
|
+
IntelliJ.TypeScript.punctuation()
|
|
240
|
+
]);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
exports.IntelliJ = IntelliJ;
|
|
244
|
+
IntelliJ.JavaScript = class {
|
|
245
|
+
static tabsAndIndents() {
|
|
246
|
+
return new TabsAndIndentsStyle(false, 4, 4, 4, false, true, false);
|
|
247
|
+
}
|
|
248
|
+
static spaces() {
|
|
249
|
+
return new SpacesStyle(new SpacesStyle.BeforeParentheses(false, false, true, true, true, true, true, true, true), new SpacesStyle.AroundOperators(true, true, true, true, true, true, true, true, false, true, false, false), new SpacesStyle.BeforeLeftBrace(true, true, true, true, true, true, true, true, true, true, true), new SpacesStyle.BeforeKeywords(true, true, true, true), new SpacesStyle.Within(false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false), new SpacesStyle.TernaryOperator(true, true, true, true), new SpacesStyle.Other(false, true, false, false, true, false, false, true, false, false));
|
|
250
|
+
}
|
|
251
|
+
static blankLines() {
|
|
252
|
+
return new BlankLinesStyle(new BlankLinesStyle.KeepMaximum(2), new BlankLinesStyle.Minimum(1, 1, null, 0, null, 1, 1));
|
|
253
|
+
}
|
|
254
|
+
static imports() {
|
|
255
|
+
return new ImportsStyle(true, false, true, ImportsStyle.UseFileExtensions.Auto, null, null, ImportsStyle.UsePathAliases.Always, [
|
|
256
|
+
"rxjs/Rx",
|
|
257
|
+
"node_modules/**",
|
|
258
|
+
"**/node_modules/**",
|
|
259
|
+
"@angular/material",
|
|
260
|
+
"@angular/material/typings/**"
|
|
261
|
+
], true, false);
|
|
262
|
+
}
|
|
263
|
+
static wrappingAndBraces() {
|
|
264
|
+
return new WrappingAndBraces();
|
|
265
|
+
}
|
|
266
|
+
static punctuation() {
|
|
267
|
+
return new PunctuationStyle(PunctuationStyle.TrailingComma.Keep);
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
IntelliJ.TypeScript = class {
|
|
271
|
+
static tabsAndIndents() {
|
|
272
|
+
return new TabsAndIndentsStyle(false, 4, 4, 4, false, true, false);
|
|
273
|
+
}
|
|
274
|
+
static spaces() {
|
|
275
|
+
return new SpacesStyle(new SpacesStyle.BeforeParentheses(false, false, true, true, true, true, true, true, true), new SpacesStyle.AroundOperators(true, true, true, true, true, true, true, true, false, true, false, false), new SpacesStyle.BeforeLeftBrace(true, true, true, true, true, true, true, true, true, true, false), new SpacesStyle.BeforeKeywords(true, true, true, true), new SpacesStyle.Within(false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, false), new SpacesStyle.TernaryOperator(true, true, true, true), new SpacesStyle.Other(false, true, false, false, true, false, false, true, false, true));
|
|
276
|
+
}
|
|
277
|
+
static blankLines() {
|
|
278
|
+
return new BlankLinesStyle(new BlankLinesStyle.KeepMaximum(2), new BlankLinesStyle.Minimum(1, 1, 0, 0, 1, 1, 1));
|
|
279
|
+
}
|
|
280
|
+
static imports() {
|
|
281
|
+
return new ImportsStyle(true, false, true, ImportsStyle.UseFileExtensions.Auto, ImportsStyle.UseTypeModifiersInImports.Auto, ImportsStyle.UsePathMappingsFromTSConfigJson.Always, null, [
|
|
282
|
+
"rxjs/Rx",
|
|
283
|
+
"node_modules/**",
|
|
284
|
+
"**/node_modules/**",
|
|
285
|
+
"@angular/material",
|
|
286
|
+
"@angular/material/typings/**"
|
|
287
|
+
], true, false);
|
|
288
|
+
}
|
|
289
|
+
static wrappingAndBraces() {
|
|
290
|
+
return new WrappingAndBraces();
|
|
291
|
+
}
|
|
292
|
+
static punctuation() {
|
|
293
|
+
return new PunctuationStyle(PunctuationStyle.TrailingComma.Keep);
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/javascript/style.ts"],"names":[],"mappings":";;;AAAA,kCAEiB;AAEjB,MAAsB,eAAgB,SAAQ,YAAK;CAClD;AADD,0CACC;AAED,MAAa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AC1F,CAAC;IACN,CAAC;IAED,MAAM,CAAC,UAAU;QACb,OAAO,IAAI,eAAe,CAAC,IAAI,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACrH,CAAC;IAED,MAAM,CAAC,OAAO;QACV,OAAO,IAAI,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC,iBAAiB,CAAC,IAAI,EAAE,YAAY,CAAC,yBAAyB,CAAC,IAAI,EAAE,YAAY,CAAC,+BAA+B,CAAC,MAAM,EAAE,IAAI,EAAE;YACpL,SAAS;YACT,iBAAiB;YACjB,oBAAoB;YACpB,mBAAmB;YACnB,8BAA8B;SACjC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IACpB,CAAC;IAED,MAAM,CAAC,iBAAiB;QACpB,OAAO,IAAI,iBAAiB,EAAE,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,WAAW;QACd,OAAO,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACrE,CAAC;CACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JsonVisitor } from "./visitor";
|
|
2
|
-
import { JsonRightPadded, Space } from "./
|
|
2
|
+
import { JsonRightPadded, Space } from "./tree";
|
|
3
3
|
import { Tree } from "../core";
|
|
4
4
|
export declare function visitRightPadded<P, T extends Tree>(v: JsonVisitor<P>, right: JsonRightPadded<T> | null, p: P): JsonRightPadded<T>;
|
|
5
5
|
export declare function visitSpace<P>(v: JsonVisitor<P>, space: Space | null, p: P): Space;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../src/json/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AACtC,OAAO,EAAC,eAAe,EAAE,KAAK,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../src/json/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AACtC,OAAO,EAAC,eAAe,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAC,IAAI,EAAC,MAAM,SAAS,CAAC;AAE7B,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,CAAC,SAAS,IAAI,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAEjI;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,CAEjF"}
|
package/dist/src/json/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/json/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/json/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC"}
|
package/dist/src/json/index.js
CHANGED
|
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./markers"), exports);
|
|
18
|
-
__exportStar(require("./support_types"), exports);
|
|
19
18
|
__exportStar(require("./tree"), exports);
|
|
20
19
|
__exportStar(require("./visitor"), exports);
|
|
21
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/json/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/json/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,yCAAuB;AACvB,4CAA0B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../../src/json/tree/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions.js","sourceRoot":"","sources":["../../../../src/json/tree/extensions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/json/tree/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./support_types"), exports);
|
|
18
|
+
__exportStar(require("./tree"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/json/tree/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,yCAAuB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Markers, Tree, TreeVisitor, UUID } from "../../core";
|
|
2
|
+
import { JsonVisitor } from "../visitor";
|
|
3
|
+
export interface Json extends Tree {
|
|
4
|
+
get prefix(): Space;
|
|
5
|
+
withPrefix(prefix: Space): Json;
|
|
6
|
+
get id(): UUID;
|
|
7
|
+
withId(id: UUID): Json;
|
|
8
|
+
get markers(): Markers;
|
|
9
|
+
withMarkers(markers: Markers): Json;
|
|
10
|
+
isAcceptable<P>(v: TreeVisitor<Tree, P>, p: P): boolean;
|
|
11
|
+
accept<R extends Tree, P>(v: TreeVisitor<R, P>, p: P): R | null;
|
|
12
|
+
acceptJson<P>(v: JsonVisitor<P>, p: P): Json | null;
|
|
13
|
+
}
|
|
14
|
+
type Constructor<T = {}> = new (...args: any[]) => T;
|
|
15
|
+
export declare function isJson(tree: any): tree is Json;
|
|
16
|
+
export declare function JsonMixin<TBase extends Constructor<Object>>(Base: TBase): ((abstract new (...args: any[]) => {
|
|
17
|
+
readonly prefix: Space;
|
|
18
|
+
withPrefix(prefix: Space): Json;
|
|
19
|
+
readonly id: UUID;
|
|
20
|
+
withId(id: UUID): Json;
|
|
21
|
+
readonly markers: Markers;
|
|
22
|
+
withMarkers(markers: Markers): Json;
|
|
23
|
+
isAcceptable<P>(v: TreeVisitor<Tree, P>, p: P): boolean;
|
|
24
|
+
accept<R extends Tree, P>(v: TreeVisitor<R, P>, p: P): R | null;
|
|
25
|
+
acceptJson<P>(v: JsonVisitor<P>, p: P): Json | null;
|
|
26
|
+
constructor: Function;
|
|
27
|
+
toString(): string;
|
|
28
|
+
toLocaleString(): string;
|
|
29
|
+
valueOf(): Object;
|
|
30
|
+
hasOwnProperty(v: PropertyKey): boolean;
|
|
31
|
+
isPrototypeOf(v: Object): boolean;
|
|
32
|
+
propertyIsEnumerable(v: PropertyKey): boolean;
|
|
33
|
+
}) & {
|
|
34
|
+
isTree: boolean;
|
|
35
|
+
isJson: boolean;
|
|
36
|
+
}) & TBase;
|
|
37
|
+
export interface JsonKey extends Tree {
|
|
38
|
+
}
|
|
39
|
+
export interface JsonValue extends Tree {
|
|
40
|
+
}
|
|
41
|
+
export declare class Space {
|
|
42
|
+
}
|
|
43
|
+
export declare class Comment {
|
|
44
|
+
}
|
|
45
|
+
export declare class JsonRightPadded<T extends Tree> {
|
|
46
|
+
constructor(element: T);
|
|
47
|
+
private readonly _element;
|
|
48
|
+
get element(): T;
|
|
49
|
+
static getElements<T extends Tree>(padded: JsonRightPadded<T>[]): never[];
|
|
50
|
+
static withElements<T extends Tree>(padded: JsonRightPadded<T>[], elements: T[]): never[];
|
|
51
|
+
static withElement<T extends Tree>(padded: JsonRightPadded<T>, element: T): JsonRightPadded<T>;
|
|
52
|
+
withElement(element: T): JsonRightPadded<T>;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=support_types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"support_types.d.ts","sourceRoot":"","sources":["../../../../src/json/tree/support_types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAC,MAAM,YAAY,CAAC;AACrE,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAC;AAEvC,MAAM,WAAW,IA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AC,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI;eAIpD,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI,GAAG,IAAI;;;;;;;;;;;WAMjE;AAED,MAAM,WAAW,OAAQ,SAAQ,IAAI;CACpC;AAED,MAAM,WAAW,SAAU,SAAQ,IAAI;CACtC;AAED,qBACa,KAAK;CACjB;AAED,qBACa,OAAO;CACnB;AAED,qBACa,eAAe,CAAC,CAAC,SAAS,IAAI;gBAC3B,OAAO,EAAE,CAAC;IAItB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAI;IAE7B,IAAI,OAAO,IAAI,CAAC,CAEf;IAED,MAAM,CAAC,WAAW,CAAC,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE;IAI/D,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE;IAI/E,MAAM,CAAC,WAAW,CAAC,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC;IAI9F,WAAW,CAAC,OAAO,EAAE,CAAC,GAAI,eAAe,CAAC,CAAC,CAAC;CAG/C"}
|
|
@@ -7,7 +7,29 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.JsonRightPadded = exports.Comment = exports.Space = void 0;
|
|
10
|
-
|
|
10
|
+
exports.isJson = isJson;
|
|
11
|
+
exports.JsonMixin = JsonMixin;
|
|
12
|
+
const core_1 = require("../../core");
|
|
13
|
+
const visitor_1 = require("../visitor");
|
|
14
|
+
function isJson(tree) {
|
|
15
|
+
return !!tree.constructor.isJson || !!tree.isJson;
|
|
16
|
+
}
|
|
17
|
+
function JsonMixin(Base) {
|
|
18
|
+
class JsonMixed extends Base {
|
|
19
|
+
isAcceptable(v, p) {
|
|
20
|
+
return v.isAdaptableTo(visitor_1.JsonVisitor);
|
|
21
|
+
}
|
|
22
|
+
accept(v, p) {
|
|
23
|
+
return this.acceptJson(v.adapt(visitor_1.JsonVisitor), p);
|
|
24
|
+
}
|
|
25
|
+
acceptJson(v, p) {
|
|
26
|
+
return v.defaultValue(this, p);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
JsonMixed.isTree = true;
|
|
30
|
+
JsonMixed.isJson = true;
|
|
31
|
+
return JsonMixed;
|
|
32
|
+
}
|
|
11
33
|
let Space = class Space {
|
|
12
34
|
};
|
|
13
35
|
exports.Space = Space;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"support_types.js","sourceRoot":"","sources":["../../../../src/json/tree/support_types.ts"],"names":[],"mappings":";;;;;;;;;AAyBA,wBAEC;AAED,8BA+BC;AA5DD,qCAAqE;AACrE,wCAAuC;AAwBvC,SAAgB,MAAM,CAAC,IAAS;IAC5B,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;AACtD,CAAC;AAED,SAAgB,SAAS,CAAoC,IAAW;IACpE,MAAe,SAAU,SAAQ,IAAI;QAgB1B,YAAY,CAAI,CAAuB,EAAE,CAAI;YAChD,OAAO,CAAC,CAAC,aAAa,CAAC,qBAAW,CAAC,CAAC;QACxC,CAAC;QAEM,MAAM,CAAoB,CAAoB,EAAE,CAAI;YACvD,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,qBAAW,CAAC,EAAE,CAAC,CAAwB,CAAC;QAC3E,CAAC;QAEM,UAAU,CAAI,CAAiB,EAAE,CAAI;YACxC,OAAO,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAgB,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