@openrewrite/rewrite 0.27.0 → 0.28.1
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/java/remote/receiver.d.ts.map +1 -1
- package/dist/src/java/remote/receiver.js +0 -10
- package/dist/src/java/remote/receiver.js.map +1 -1
- package/dist/src/java/remote/sender.d.ts.map +1 -1
- package/dist/src/java/remote/sender.js +0 -7
- package/dist/src/java/remote/sender.js.map +1 -1
- package/dist/src/java/tree/tree.d.ts +0 -39
- package/dist/src/java/tree/tree.d.ts.map +1 -1
- package/dist/src/java/tree/tree.js +2 -48
- package/dist/src/java/tree/tree.js.map +1 -1
- package/dist/src/java/visitor.d.ts +1 -2
- package/dist/src/java/visitor.d.ts.map +1 -1
- package/dist/src/java/visitor.js +0 -15
- package/dist/src/java/visitor.js.map +1 -1
- package/dist/src/javascript/parser.d.ts +10 -9
- package/dist/src/javascript/parser.d.ts.map +1 -1
- package/dist/src/javascript/parser.js +52 -23
- package/dist/src/javascript/parser.js.map +1 -1
- package/dist/src/javascript/remote/receiver.d.ts.map +1 -1
- package/dist/src/javascript/remote/receiver.js +84 -17
- package/dist/src/javascript/remote/receiver.js.map +1 -1
- package/dist/src/javascript/remote/sender.d.ts.map +1 -1
- package/dist/src/javascript/remote/sender.js +62 -13
- package/dist/src/javascript/remote/sender.js.map +1 -1
- package/dist/src/javascript/tree/support_types.d.ts +19 -4
- package/dist/src/javascript/tree/support_types.d.ts.map +1 -1
- package/dist/src/javascript/tree/support_types.js +15 -0
- package/dist/src/javascript/tree/support_types.js.map +1 -1
- package/dist/src/javascript/tree/tree.d.ts +349 -26
- package/dist/src/javascript/tree/tree.d.ts.map +1 -1
- package/dist/src/javascript/tree/tree.js +447 -59
- package/dist/src/javascript/tree/tree.js.map +1 -1
- package/dist/src/javascript/visitor.d.ts +8 -1
- package/dist/src/javascript/visitor.d.ts.map +1 -1
- package/dist/src/javascript/visitor.js +67 -6
- package/dist/src/javascript/visitor.js.map +1 -1
- package/package.json +1 -1
|
@@ -38,10 +38,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
38
38
|
return result;
|
|
39
39
|
};
|
|
40
40
|
})();
|
|
41
|
-
var CompilationUnit_1, Alias_1, ArrowFunction_1, Await_1, ConditionalType_1, DefaultType_1, Delete_1, Export_1, TrailingTokenStatement_1, ExpressionWithTypeArguments_1, FunctionType_1, InferType_1, ImportType_1, JsImport_1, JsImportSpecifier_1, JsBinary_1, LiteralType_1, MappedType_1, ObjectBindingDeclarations_1, PropertyAssignment_1, SatisfiesExpression_1, ScopedVariableDeclarations_1, TaggedTemplateExpression_1, TemplateExpression_1, Tuple_1, TypeDeclaration_1, TypeOf_1, TypeQuery_1, TypeOperator_1, TypePredicate_1, Unary_1, Union_1, Intersection_1, Void_1, Yield_1, TypeInfo_1, JSVariableDeclarations_1, JSMethodDeclaration_1, JSForOfLoop_1, JSForInLoop_1, JSForInOfLoopControl_1, NamespaceDeclaration_1, FunctionDeclaration_1, TypeLiteral_1, IndexSignatureDeclaration_1, ArrayBindingPattern_1, BindingElement_1, ExportDeclaration_1, ExportAssignment_1, NamedExports_1, ExportSpecifier_1, IndexedAccessType_1, JsAssignmentOperation_1, TypeTreeExpression_1;
|
|
41
|
+
var CompilationUnit_1, Alias_1, ArrowFunction_1, Await_1, ConditionalType_1, DefaultType_1, Delete_1, Export_1, TrailingTokenStatement_1, ExpressionWithTypeArguments_1, FunctionType_1, InferType_1, ImportType_1, JsImport_1, JsImportClause_1, NamedImports_1, JsImportSpecifier_1, ImportAttributes_1, ImportAttribute_1, JsBinary_1, LiteralType_1, MappedType_1, ObjectBindingDeclarations_1, PropertyAssignment_1, SatisfiesExpression_1, ScopedVariableDeclarations_1, WithStatement_1, TaggedTemplateExpression_1, TemplateExpression_1, Tuple_1, TypeDeclaration_1, TypeOf_1, TypeQuery_1, TypeOperator_1, TypePredicate_1, Unary_1, Union_1, Intersection_1, Void_1, Yield_1, TypeInfo_1, JSVariableDeclarations_1, JSMethodDeclaration_1, JSForOfLoop_1, JSForInLoop_1, JSForInOfLoopControl_1, JSTry_1, NamespaceDeclaration_1, FunctionDeclaration_1, TypeLiteral_1, IndexSignatureDeclaration_1, ArrayBindingPattern_1, BindingElement_1, ExportDeclaration_1, ExportAssignment_1, NamedExports_1, ExportSpecifier_1, IndexedAccessType_1, JsAssignmentOperation_1, TypeTreeExpression_1;
|
|
42
42
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
-
exports.
|
|
44
|
-
exports.TypeTreeExpression = exports.JsAssignmentOperation = exports.IndexedAccessType = exports.ExportSpecifier = void 0;
|
|
43
|
+
exports.TypeLiteral = exports.FunctionDeclaration = exports.NamespaceDeclaration = exports.JSTry = exports.JSForInOfLoopControl = exports.JSForInLoop = exports.JSForOfLoop = exports.JSMethodDeclaration = exports.JSVariableDeclarations = exports.TypeInfo = exports.Yield = exports.Void = exports.Intersection = exports.Union = exports.Unary = exports.TypePredicate = exports.TypeOperator = exports.TypeQuery = exports.TypeOf = exports.TypeDeclaration = exports.Tuple = exports.TemplateExpression = exports.TaggedTemplateExpression = exports.WithStatement = exports.ScopedVariableDeclarations = exports.SatisfiesExpression = exports.PropertyAssignment = exports.ObjectBindingDeclarations = exports.MappedType = exports.LiteralType = exports.JsBinary = exports.ImportAttribute = exports.ImportAttributes = exports.JsImportSpecifier = exports.NamedImports = exports.JsImportClause = exports.JsImport = exports.ImportType = exports.InferType = exports.FunctionType = exports.ExpressionWithTypeArguments = exports.TrailingTokenStatement = exports.Export = exports.Delete = exports.DefaultType = exports.ConditionalType = exports.Await = exports.ArrowFunction = exports.Alias = exports.CompilationUnit = void 0;
|
|
44
|
+
exports.TypeTreeExpression = exports.JsAssignmentOperation = exports.IndexedAccessType = exports.ExportSpecifier = exports.NamedExports = exports.ExportAssignment = exports.ExportDeclaration = exports.BindingElement = exports.ArrayBindingPattern = exports.IndexSignatureDeclaration = void 0;
|
|
45
45
|
const extensions = __importStar(require("./extensions"));
|
|
46
46
|
const support_types_1 = require("./support_types");
|
|
47
47
|
const core_1 = require("../../core");
|
|
@@ -982,74 +982,125 @@ exports.ImportType = ImportType = ImportType_1 = __decorate([
|
|
|
982
982
|
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$ImportType")
|
|
983
983
|
], ImportType);
|
|
984
984
|
let JsImport = JsImport_1 = class JsImport extends (0, support_types_1.JSMixin)(Object) {
|
|
985
|
-
constructor(id, prefix, markers,
|
|
985
|
+
constructor(id, prefix, markers, modifiers, importClause, moduleSpecifier, attributes) {
|
|
986
986
|
super();
|
|
987
987
|
this._id = id;
|
|
988
988
|
this._prefix = prefix;
|
|
989
989
|
this._markers = markers;
|
|
990
|
-
this.
|
|
991
|
-
this.
|
|
992
|
-
this.
|
|
993
|
-
this.
|
|
994
|
-
this._target = target;
|
|
995
|
-
this._initializer = initializer;
|
|
990
|
+
this._modifiers = modifiers;
|
|
991
|
+
this._importClause = importClause;
|
|
992
|
+
this._moduleSpecifier = moduleSpecifier;
|
|
993
|
+
this._attributes = attributes;
|
|
996
994
|
}
|
|
997
995
|
get id() {
|
|
998
996
|
return this._id;
|
|
999
997
|
}
|
|
1000
998
|
withId(id) {
|
|
1001
|
-
return id === this._id ? this : new JsImport_1(id, this._prefix, this._markers, this.
|
|
999
|
+
return id === this._id ? this : new JsImport_1(id, this._prefix, this._markers, this._modifiers, this._importClause, this._moduleSpecifier, this._attributes);
|
|
1002
1000
|
}
|
|
1003
1001
|
get prefix() {
|
|
1004
1002
|
return this._prefix;
|
|
1005
1003
|
}
|
|
1006
1004
|
withPrefix(prefix) {
|
|
1007
|
-
return prefix === this._prefix ? this : new JsImport_1(this._id, prefix, this._markers, this.
|
|
1005
|
+
return prefix === this._prefix ? this : new JsImport_1(this._id, prefix, this._markers, this._modifiers, this._importClause, this._moduleSpecifier, this._attributes);
|
|
1008
1006
|
}
|
|
1009
1007
|
get markers() {
|
|
1010
1008
|
return this._markers;
|
|
1011
1009
|
}
|
|
1012
1010
|
withMarkers(markers) {
|
|
1013
|
-
return markers === this._markers ? this : new JsImport_1(this._id, this._prefix, markers, this.
|
|
1011
|
+
return markers === this._markers ? this : new JsImport_1(this._id, this._prefix, markers, this._modifiers, this._importClause, this._moduleSpecifier, this._attributes);
|
|
1014
1012
|
}
|
|
1015
|
-
get
|
|
1016
|
-
return this.
|
|
1013
|
+
get modifiers() {
|
|
1014
|
+
return this._modifiers;
|
|
1017
1015
|
}
|
|
1018
|
-
|
|
1019
|
-
return this.
|
|
1016
|
+
withModifiers(modifiers) {
|
|
1017
|
+
return modifiers === this._modifiers ? this : new JsImport_1(this._id, this._prefix, this._markers, modifiers, this._importClause, this._moduleSpecifier, this._attributes);
|
|
1020
1018
|
}
|
|
1021
|
-
get
|
|
1022
|
-
return this.
|
|
1019
|
+
get importClause() {
|
|
1020
|
+
return this._importClause;
|
|
1023
1021
|
}
|
|
1024
|
-
|
|
1025
|
-
return this.
|
|
1022
|
+
withImportClause(importClause) {
|
|
1023
|
+
return importClause === this._importClause ? this : new JsImport_1(this._id, this._prefix, this._markers, this._modifiers, importClause, this._moduleSpecifier, this._attributes);
|
|
1026
1024
|
}
|
|
1027
|
-
get
|
|
1028
|
-
return this.
|
|
1025
|
+
get moduleSpecifier() {
|
|
1026
|
+
return this._moduleSpecifier.element;
|
|
1029
1027
|
}
|
|
1030
|
-
|
|
1031
|
-
return this.padding.
|
|
1028
|
+
withModuleSpecifier(moduleSpecifier) {
|
|
1029
|
+
return this.padding.withModuleSpecifier(this._moduleSpecifier.withElement(moduleSpecifier));
|
|
1032
1030
|
}
|
|
1033
|
-
get
|
|
1034
|
-
return this.
|
|
1031
|
+
get attributes() {
|
|
1032
|
+
return this._attributes;
|
|
1035
1033
|
}
|
|
1036
|
-
|
|
1037
|
-
return
|
|
1034
|
+
withAttributes(attributes) {
|
|
1035
|
+
return attributes === this._attributes ? this : new JsImport_1(this._id, this._prefix, this._markers, this._modifiers, this._importClause, this._moduleSpecifier, attributes);
|
|
1038
1036
|
}
|
|
1039
|
-
|
|
1040
|
-
return this
|
|
1037
|
+
acceptJavaScript(v, p) {
|
|
1038
|
+
return v.visitJsImport(this, p);
|
|
1041
1039
|
}
|
|
1042
|
-
|
|
1043
|
-
|
|
1040
|
+
get padding() {
|
|
1041
|
+
const t = this;
|
|
1042
|
+
return new class {
|
|
1043
|
+
get moduleSpecifier() {
|
|
1044
|
+
return t._moduleSpecifier;
|
|
1045
|
+
}
|
|
1046
|
+
withModuleSpecifier(moduleSpecifier) {
|
|
1047
|
+
return t._moduleSpecifier === moduleSpecifier ? t : new JsImport_1(t._id, t._prefix, t._markers, t._modifiers, t._importClause, moduleSpecifier, t._attributes);
|
|
1048
|
+
}
|
|
1049
|
+
};
|
|
1044
1050
|
}
|
|
1045
|
-
|
|
1046
|
-
|
|
1051
|
+
};
|
|
1052
|
+
exports.JsImport = JsImport;
|
|
1053
|
+
exports.JsImport = JsImport = JsImport_1 = __decorate([
|
|
1054
|
+
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$JsImport")
|
|
1055
|
+
], JsImport);
|
|
1056
|
+
let JsImportClause = JsImportClause_1 = class JsImportClause extends (0, support_types_1.JSMixin)(Object) {
|
|
1057
|
+
constructor(id, prefix, markers, typeOnly, name, namedBindings) {
|
|
1058
|
+
super();
|
|
1059
|
+
this._id = id;
|
|
1060
|
+
this._prefix = prefix;
|
|
1061
|
+
this._markers = markers;
|
|
1062
|
+
this._typeOnly = typeOnly;
|
|
1063
|
+
this._name = name;
|
|
1064
|
+
this._namedBindings = namedBindings;
|
|
1047
1065
|
}
|
|
1048
|
-
|
|
1049
|
-
return this.
|
|
1066
|
+
get id() {
|
|
1067
|
+
return this._id;
|
|
1068
|
+
}
|
|
1069
|
+
withId(id) {
|
|
1070
|
+
return id === this._id ? this : new JsImportClause_1(id, this._prefix, this._markers, this._typeOnly, this._name, this._namedBindings);
|
|
1071
|
+
}
|
|
1072
|
+
get prefix() {
|
|
1073
|
+
return this._prefix;
|
|
1074
|
+
}
|
|
1075
|
+
withPrefix(prefix) {
|
|
1076
|
+
return prefix === this._prefix ? this : new JsImportClause_1(this._id, prefix, this._markers, this._typeOnly, this._name, this._namedBindings);
|
|
1077
|
+
}
|
|
1078
|
+
get markers() {
|
|
1079
|
+
return this._markers;
|
|
1080
|
+
}
|
|
1081
|
+
withMarkers(markers) {
|
|
1082
|
+
return markers === this._markers ? this : new JsImportClause_1(this._id, this._prefix, markers, this._typeOnly, this._name, this._namedBindings);
|
|
1083
|
+
}
|
|
1084
|
+
get typeOnly() {
|
|
1085
|
+
return this._typeOnly;
|
|
1086
|
+
}
|
|
1087
|
+
withTypeOnly(typeOnly) {
|
|
1088
|
+
return typeOnly === this._typeOnly ? this : new JsImportClause_1(this._id, this._prefix, this._markers, typeOnly, this._name, this._namedBindings);
|
|
1089
|
+
}
|
|
1090
|
+
get name() {
|
|
1091
|
+
return this._name === null ? null : this._name.element;
|
|
1092
|
+
}
|
|
1093
|
+
withName(name) {
|
|
1094
|
+
return this.padding.withName(tree_1.JRightPadded.withElement(this._name, name));
|
|
1095
|
+
}
|
|
1096
|
+
get namedBindings() {
|
|
1097
|
+
return this._namedBindings;
|
|
1098
|
+
}
|
|
1099
|
+
withNamedBindings(namedBindings) {
|
|
1100
|
+
return namedBindings === this._namedBindings ? this : new JsImportClause_1(this._id, this._prefix, this._markers, this._typeOnly, this._name, namedBindings);
|
|
1050
1101
|
}
|
|
1051
1102
|
acceptJavaScript(v, p) {
|
|
1052
|
-
return v.
|
|
1103
|
+
return v.visitJsImportClause(this, p);
|
|
1053
1104
|
}
|
|
1054
1105
|
get padding() {
|
|
1055
1106
|
const t = this;
|
|
@@ -1058,33 +1109,73 @@ let JsImport = JsImport_1 = class JsImport extends (0, support_types_1.JSMixin)(
|
|
|
1058
1109
|
return t._name;
|
|
1059
1110
|
}
|
|
1060
1111
|
withName(name) {
|
|
1061
|
-
return t._name === name ? t : new
|
|
1062
|
-
}
|
|
1063
|
-
get importType() {
|
|
1064
|
-
return t._importType;
|
|
1112
|
+
return t._name === name ? t : new JsImportClause_1(t._id, t._prefix, t._markers, t._typeOnly, name, t._namedBindings);
|
|
1065
1113
|
}
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1116
|
+
};
|
|
1117
|
+
exports.JsImportClause = JsImportClause;
|
|
1118
|
+
exports.JsImportClause = JsImportClause = JsImportClause_1 = __decorate([
|
|
1119
|
+
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$JsImportClause")
|
|
1120
|
+
], JsImportClause);
|
|
1121
|
+
let NamedImports = NamedImports_1 = class NamedImports extends (0, support_types_1.JSMixin)(Object) {
|
|
1122
|
+
constructor(id, prefix, markers, elements, _type) {
|
|
1123
|
+
super();
|
|
1124
|
+
this._id = id;
|
|
1125
|
+
this._prefix = prefix;
|
|
1126
|
+
this._markers = markers;
|
|
1127
|
+
this._elements = elements;
|
|
1128
|
+
this._type = _type;
|
|
1129
|
+
}
|
|
1130
|
+
get id() {
|
|
1131
|
+
return this._id;
|
|
1132
|
+
}
|
|
1133
|
+
withId(id) {
|
|
1134
|
+
return id === this._id ? this : new NamedImports_1(id, this._prefix, this._markers, this._elements, this._type);
|
|
1135
|
+
}
|
|
1136
|
+
get prefix() {
|
|
1137
|
+
return this._prefix;
|
|
1138
|
+
}
|
|
1139
|
+
withPrefix(prefix) {
|
|
1140
|
+
return prefix === this._prefix ? this : new NamedImports_1(this._id, prefix, this._markers, this._elements, this._type);
|
|
1141
|
+
}
|
|
1142
|
+
get markers() {
|
|
1143
|
+
return this._markers;
|
|
1144
|
+
}
|
|
1145
|
+
withMarkers(markers) {
|
|
1146
|
+
return markers === this._markers ? this : new NamedImports_1(this._id, this._prefix, markers, this._elements, this._type);
|
|
1147
|
+
}
|
|
1148
|
+
get elements() {
|
|
1149
|
+
return this._elements.elements;
|
|
1150
|
+
}
|
|
1151
|
+
withElements(elements) {
|
|
1152
|
+
return this.padding.withElements(tree_1.JContainer.withElements(this._elements, elements));
|
|
1153
|
+
}
|
|
1154
|
+
get type() {
|
|
1155
|
+
return this._type;
|
|
1156
|
+
}
|
|
1157
|
+
withType(_type) {
|
|
1158
|
+
return _type === this._type ? this : new NamedImports_1(this._id, this._prefix, this._markers, this._elements, _type);
|
|
1159
|
+
}
|
|
1160
|
+
acceptJavaScript(v, p) {
|
|
1161
|
+
return v.visitNamedImports(this, p);
|
|
1162
|
+
}
|
|
1163
|
+
get padding() {
|
|
1164
|
+
const t = this;
|
|
1165
|
+
return new class {
|
|
1166
|
+
get elements() {
|
|
1167
|
+
return t._elements;
|
|
1077
1168
|
}
|
|
1078
|
-
|
|
1079
|
-
return t.
|
|
1169
|
+
withElements(elements) {
|
|
1170
|
+
return t._elements === elements ? t : new NamedImports_1(t._id, t._prefix, t._markers, elements, t._type);
|
|
1080
1171
|
}
|
|
1081
1172
|
};
|
|
1082
1173
|
}
|
|
1083
1174
|
};
|
|
1084
|
-
exports.
|
|
1085
|
-
exports.
|
|
1086
|
-
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$
|
|
1087
|
-
],
|
|
1175
|
+
exports.NamedImports = NamedImports;
|
|
1176
|
+
exports.NamedImports = NamedImports = NamedImports_1 = __decorate([
|
|
1177
|
+
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$NamedImports")
|
|
1178
|
+
], NamedImports);
|
|
1088
1179
|
let JsImportSpecifier = JsImportSpecifier_1 = class JsImportSpecifier extends (0, support_types_1.JSMixin)(Object) {
|
|
1089
1180
|
constructor(id, prefix, markers, importType, specifier, _type) {
|
|
1090
1181
|
super();
|
|
@@ -1150,6 +1241,129 @@ exports.JsImportSpecifier = JsImportSpecifier;
|
|
|
1150
1241
|
exports.JsImportSpecifier = JsImportSpecifier = JsImportSpecifier_1 = __decorate([
|
|
1151
1242
|
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$JsImportSpecifier")
|
|
1152
1243
|
], JsImportSpecifier);
|
|
1244
|
+
let ImportAttributes = ImportAttributes_1 = class ImportAttributes extends (0, support_types_1.JSMixin)(Object) {
|
|
1245
|
+
constructor(id, prefix, markers, token, elements) {
|
|
1246
|
+
super();
|
|
1247
|
+
this._id = id;
|
|
1248
|
+
this._prefix = prefix;
|
|
1249
|
+
this._markers = markers;
|
|
1250
|
+
this._token = token;
|
|
1251
|
+
this._elements = elements;
|
|
1252
|
+
}
|
|
1253
|
+
get id() {
|
|
1254
|
+
return this._id;
|
|
1255
|
+
}
|
|
1256
|
+
withId(id) {
|
|
1257
|
+
return id === this._id ? this : new ImportAttributes_1(id, this._prefix, this._markers, this._token, this._elements);
|
|
1258
|
+
}
|
|
1259
|
+
get prefix() {
|
|
1260
|
+
return this._prefix;
|
|
1261
|
+
}
|
|
1262
|
+
withPrefix(prefix) {
|
|
1263
|
+
return prefix === this._prefix ? this : new ImportAttributes_1(this._id, prefix, this._markers, this._token, this._elements);
|
|
1264
|
+
}
|
|
1265
|
+
get markers() {
|
|
1266
|
+
return this._markers;
|
|
1267
|
+
}
|
|
1268
|
+
withMarkers(markers) {
|
|
1269
|
+
return markers === this._markers ? this : new ImportAttributes_1(this._id, this._prefix, markers, this._token, this._elements);
|
|
1270
|
+
}
|
|
1271
|
+
get token() {
|
|
1272
|
+
return this._token;
|
|
1273
|
+
}
|
|
1274
|
+
withToken(token) {
|
|
1275
|
+
return token === this._token ? this : new ImportAttributes_1(this._id, this._prefix, this._markers, token, this._elements);
|
|
1276
|
+
}
|
|
1277
|
+
get elements() {
|
|
1278
|
+
return this._elements.elements;
|
|
1279
|
+
}
|
|
1280
|
+
withElements(elements) {
|
|
1281
|
+
return this.padding.withElements(tree_1.JContainer.withElements(this._elements, elements));
|
|
1282
|
+
}
|
|
1283
|
+
acceptJavaScript(v, p) {
|
|
1284
|
+
return v.visitImportAttributes(this, p);
|
|
1285
|
+
}
|
|
1286
|
+
get padding() {
|
|
1287
|
+
const t = this;
|
|
1288
|
+
return new class {
|
|
1289
|
+
get elements() {
|
|
1290
|
+
return t._elements;
|
|
1291
|
+
}
|
|
1292
|
+
withElements(elements) {
|
|
1293
|
+
return t._elements === elements ? t : new ImportAttributes_1(t._id, t._prefix, t._markers, t._token, elements);
|
|
1294
|
+
}
|
|
1295
|
+
};
|
|
1296
|
+
}
|
|
1297
|
+
};
|
|
1298
|
+
exports.ImportAttributes = ImportAttributes;
|
|
1299
|
+
exports.ImportAttributes = ImportAttributes = ImportAttributes_1 = __decorate([
|
|
1300
|
+
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$ImportAttributes")
|
|
1301
|
+
], ImportAttributes);
|
|
1302
|
+
(function (ImportAttributes) {
|
|
1303
|
+
let Token;
|
|
1304
|
+
(function (Token) {
|
|
1305
|
+
Token[Token["With"] = 0] = "With";
|
|
1306
|
+
Token[Token["Assert"] = 1] = "Assert";
|
|
1307
|
+
})(Token = ImportAttributes.Token || (ImportAttributes.Token = {}));
|
|
1308
|
+
})(ImportAttributes || (exports.ImportAttributes = ImportAttributes = {}));
|
|
1309
|
+
let ImportAttribute = ImportAttribute_1 = class ImportAttribute extends (0, support_types_1.JSMixin)(Object) {
|
|
1310
|
+
constructor(id, prefix, markers, name, value) {
|
|
1311
|
+
super();
|
|
1312
|
+
this._id = id;
|
|
1313
|
+
this._prefix = prefix;
|
|
1314
|
+
this._markers = markers;
|
|
1315
|
+
this._name = name;
|
|
1316
|
+
this._value = value;
|
|
1317
|
+
}
|
|
1318
|
+
get id() {
|
|
1319
|
+
return this._id;
|
|
1320
|
+
}
|
|
1321
|
+
withId(id) {
|
|
1322
|
+
return id === this._id ? this : new ImportAttribute_1(id, this._prefix, this._markers, this._name, this._value);
|
|
1323
|
+
}
|
|
1324
|
+
get prefix() {
|
|
1325
|
+
return this._prefix;
|
|
1326
|
+
}
|
|
1327
|
+
withPrefix(prefix) {
|
|
1328
|
+
return prefix === this._prefix ? this : new ImportAttribute_1(this._id, prefix, this._markers, this._name, this._value);
|
|
1329
|
+
}
|
|
1330
|
+
get markers() {
|
|
1331
|
+
return this._markers;
|
|
1332
|
+
}
|
|
1333
|
+
withMarkers(markers) {
|
|
1334
|
+
return markers === this._markers ? this : new ImportAttribute_1(this._id, this._prefix, markers, this._name, this._value);
|
|
1335
|
+
}
|
|
1336
|
+
get name() {
|
|
1337
|
+
return this._name;
|
|
1338
|
+
}
|
|
1339
|
+
withName(name) {
|
|
1340
|
+
return name === this._name ? this : new ImportAttribute_1(this._id, this._prefix, this._markers, name, this._value);
|
|
1341
|
+
}
|
|
1342
|
+
get value() {
|
|
1343
|
+
return this._value.element;
|
|
1344
|
+
}
|
|
1345
|
+
withValue(value) {
|
|
1346
|
+
return this.padding.withValue(this._value.withElement(value));
|
|
1347
|
+
}
|
|
1348
|
+
acceptJavaScript(v, p) {
|
|
1349
|
+
return v.visitImportAttribute(this, p);
|
|
1350
|
+
}
|
|
1351
|
+
get padding() {
|
|
1352
|
+
const t = this;
|
|
1353
|
+
return new class {
|
|
1354
|
+
get value() {
|
|
1355
|
+
return t._value;
|
|
1356
|
+
}
|
|
1357
|
+
withValue(value) {
|
|
1358
|
+
return t._value === value ? t : new ImportAttribute_1(t._id, t._prefix, t._markers, t._name, value);
|
|
1359
|
+
}
|
|
1360
|
+
};
|
|
1361
|
+
}
|
|
1362
|
+
};
|
|
1363
|
+
exports.ImportAttribute = ImportAttribute;
|
|
1364
|
+
exports.ImportAttribute = ImportAttribute = ImportAttribute_1 = __decorate([
|
|
1365
|
+
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$ImportAttribute")
|
|
1366
|
+
], ImportAttribute);
|
|
1153
1367
|
let JsBinary = JsBinary_1 = class JsBinary extends (0, support_types_1.JSMixin)(Object) {
|
|
1154
1368
|
constructor(id, prefix, markers, left, operator, right, _type) {
|
|
1155
1369
|
super();
|
|
@@ -1834,8 +2048,67 @@ exports.ScopedVariableDeclarations = ScopedVariableDeclarations = ScopedVariable
|
|
|
1834
2048
|
Scope[Scope["Let"] = 1] = "Let";
|
|
1835
2049
|
Scope[Scope["Var"] = 2] = "Var";
|
|
1836
2050
|
Scope[Scope["Using"] = 3] = "Using";
|
|
2051
|
+
Scope[Scope["Import"] = 4] = "Import";
|
|
1837
2052
|
})(Scope = ScopedVariableDeclarations.Scope || (ScopedVariableDeclarations.Scope = {}));
|
|
1838
2053
|
})(ScopedVariableDeclarations || (exports.ScopedVariableDeclarations = ScopedVariableDeclarations = {}));
|
|
2054
|
+
let WithStatement = WithStatement_1 = class WithStatement extends (0, support_types_1.JSMixin)(Object) {
|
|
2055
|
+
constructor(id, prefix, markers, expression, body) {
|
|
2056
|
+
super();
|
|
2057
|
+
this._id = id;
|
|
2058
|
+
this._prefix = prefix;
|
|
2059
|
+
this._markers = markers;
|
|
2060
|
+
this._expression = expression;
|
|
2061
|
+
this._body = body;
|
|
2062
|
+
}
|
|
2063
|
+
get id() {
|
|
2064
|
+
return this._id;
|
|
2065
|
+
}
|
|
2066
|
+
withId(id) {
|
|
2067
|
+
return id === this._id ? this : new WithStatement_1(id, this._prefix, this._markers, this._expression, this._body);
|
|
2068
|
+
}
|
|
2069
|
+
get prefix() {
|
|
2070
|
+
return this._prefix;
|
|
2071
|
+
}
|
|
2072
|
+
withPrefix(prefix) {
|
|
2073
|
+
return prefix === this._prefix ? this : new WithStatement_1(this._id, prefix, this._markers, this._expression, this._body);
|
|
2074
|
+
}
|
|
2075
|
+
get markers() {
|
|
2076
|
+
return this._markers;
|
|
2077
|
+
}
|
|
2078
|
+
withMarkers(markers) {
|
|
2079
|
+
return markers === this._markers ? this : new WithStatement_1(this._id, this._prefix, markers, this._expression, this._body);
|
|
2080
|
+
}
|
|
2081
|
+
get expression() {
|
|
2082
|
+
return this._expression;
|
|
2083
|
+
}
|
|
2084
|
+
withExpression(expression) {
|
|
2085
|
+
return expression === this._expression ? this : new WithStatement_1(this._id, this._prefix, this._markers, expression, this._body);
|
|
2086
|
+
}
|
|
2087
|
+
get body() {
|
|
2088
|
+
return this._body.element;
|
|
2089
|
+
}
|
|
2090
|
+
withBody(body) {
|
|
2091
|
+
return this.padding.withBody(this._body.withElement(body));
|
|
2092
|
+
}
|
|
2093
|
+
acceptJavaScript(v, p) {
|
|
2094
|
+
return v.visitWithStatement(this, p);
|
|
2095
|
+
}
|
|
2096
|
+
get padding() {
|
|
2097
|
+
const t = this;
|
|
2098
|
+
return new class {
|
|
2099
|
+
get body() {
|
|
2100
|
+
return t._body;
|
|
2101
|
+
}
|
|
2102
|
+
withBody(body) {
|
|
2103
|
+
return t._body === body ? t : new WithStatement_1(t._id, t._prefix, t._markers, t._expression, body);
|
|
2104
|
+
}
|
|
2105
|
+
};
|
|
2106
|
+
}
|
|
2107
|
+
};
|
|
2108
|
+
exports.WithStatement = WithStatement;
|
|
2109
|
+
exports.WithStatement = WithStatement = WithStatement_1 = __decorate([
|
|
2110
|
+
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$WithStatement")
|
|
2111
|
+
], WithStatement);
|
|
1839
2112
|
let TaggedTemplateExpression = TaggedTemplateExpression_1 = class TaggedTemplateExpression extends (0, support_types_1.JSMixin)(Object) {
|
|
1840
2113
|
constructor(id, prefix, markers, tag, typeArguments, templateExpression, _type) {
|
|
1841
2114
|
super();
|
|
@@ -3278,6 +3551,120 @@ exports.JSForInOfLoopControl = JSForInOfLoopControl;
|
|
|
3278
3551
|
exports.JSForInOfLoopControl = JSForInOfLoopControl = JSForInOfLoopControl_1 = __decorate([
|
|
3279
3552
|
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$JSForInOfLoopControl")
|
|
3280
3553
|
], JSForInOfLoopControl);
|
|
3554
|
+
let JSTry = JSTry_1 = class JSTry extends (0, support_types_1.JSMixin)(Object) {
|
|
3555
|
+
constructor(id, prefix, markers, body, catches, finallie) {
|
|
3556
|
+
super();
|
|
3557
|
+
this._id = id;
|
|
3558
|
+
this._prefix = prefix;
|
|
3559
|
+
this._markers = markers;
|
|
3560
|
+
this._body = body;
|
|
3561
|
+
this._catches = catches;
|
|
3562
|
+
this._finallie = finallie;
|
|
3563
|
+
}
|
|
3564
|
+
get id() {
|
|
3565
|
+
return this._id;
|
|
3566
|
+
}
|
|
3567
|
+
withId(id) {
|
|
3568
|
+
return id === this._id ? this : new JSTry_1(id, this._prefix, this._markers, this._body, this._catches, this._finallie);
|
|
3569
|
+
}
|
|
3570
|
+
get prefix() {
|
|
3571
|
+
return this._prefix;
|
|
3572
|
+
}
|
|
3573
|
+
withPrefix(prefix) {
|
|
3574
|
+
return prefix === this._prefix ? this : new JSTry_1(this._id, prefix, this._markers, this._body, this._catches, this._finallie);
|
|
3575
|
+
}
|
|
3576
|
+
get markers() {
|
|
3577
|
+
return this._markers;
|
|
3578
|
+
}
|
|
3579
|
+
withMarkers(markers) {
|
|
3580
|
+
return markers === this._markers ? this : new JSTry_1(this._id, this._prefix, markers, this._body, this._catches, this._finallie);
|
|
3581
|
+
}
|
|
3582
|
+
get body() {
|
|
3583
|
+
return this._body;
|
|
3584
|
+
}
|
|
3585
|
+
withBody(body) {
|
|
3586
|
+
return body === this._body ? this : new JSTry_1(this._id, this._prefix, this._markers, body, this._catches, this._finallie);
|
|
3587
|
+
}
|
|
3588
|
+
get catches() {
|
|
3589
|
+
return this._catches;
|
|
3590
|
+
}
|
|
3591
|
+
withCatches(catches) {
|
|
3592
|
+
return catches === this._catches ? this : new JSTry_1(this._id, this._prefix, this._markers, this._body, catches, this._finallie);
|
|
3593
|
+
}
|
|
3594
|
+
get finallie() {
|
|
3595
|
+
return this._finallie === null ? null : this._finallie.element;
|
|
3596
|
+
}
|
|
3597
|
+
withFinallie(finallie) {
|
|
3598
|
+
return this.padding.withFinallie(tree_1.JLeftPadded.withElement(this._finallie, finallie));
|
|
3599
|
+
}
|
|
3600
|
+
acceptJavaScript(v, p) {
|
|
3601
|
+
return v.visitJSTry(this, p);
|
|
3602
|
+
}
|
|
3603
|
+
get padding() {
|
|
3604
|
+
const t = this;
|
|
3605
|
+
return new class {
|
|
3606
|
+
get finallie() {
|
|
3607
|
+
return t._finallie;
|
|
3608
|
+
}
|
|
3609
|
+
withFinallie(finallie) {
|
|
3610
|
+
return t._finallie === finallie ? t : new JSTry_1(t._id, t._prefix, t._markers, t._body, t._catches, finallie);
|
|
3611
|
+
}
|
|
3612
|
+
};
|
|
3613
|
+
}
|
|
3614
|
+
};
|
|
3615
|
+
exports.JSTry = JSTry;
|
|
3616
|
+
exports.JSTry = JSTry = JSTry_1 = __decorate([
|
|
3617
|
+
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$JSTry")
|
|
3618
|
+
], JSTry);
|
|
3619
|
+
(function (JSTry) {
|
|
3620
|
+
let JSCatch = class JSCatch extends (0, support_types_1.JSMixin)(Object) {
|
|
3621
|
+
constructor(id, prefix, markers, parameter, body) {
|
|
3622
|
+
super();
|
|
3623
|
+
this._id = id;
|
|
3624
|
+
this._prefix = prefix;
|
|
3625
|
+
this._markers = markers;
|
|
3626
|
+
this._parameter = parameter;
|
|
3627
|
+
this._body = body;
|
|
3628
|
+
}
|
|
3629
|
+
get id() {
|
|
3630
|
+
return this._id;
|
|
3631
|
+
}
|
|
3632
|
+
withId(id) {
|
|
3633
|
+
return id === this._id ? this : new JSTry.JSCatch(id, this._prefix, this._markers, this._parameter, this._body);
|
|
3634
|
+
}
|
|
3635
|
+
get prefix() {
|
|
3636
|
+
return this._prefix;
|
|
3637
|
+
}
|
|
3638
|
+
withPrefix(prefix) {
|
|
3639
|
+
return prefix === this._prefix ? this : new JSTry.JSCatch(this._id, prefix, this._markers, this._parameter, this._body);
|
|
3640
|
+
}
|
|
3641
|
+
get markers() {
|
|
3642
|
+
return this._markers;
|
|
3643
|
+
}
|
|
3644
|
+
withMarkers(markers) {
|
|
3645
|
+
return markers === this._markers ? this : new JSTry.JSCatch(this._id, this._prefix, markers, this._parameter, this._body);
|
|
3646
|
+
}
|
|
3647
|
+
get parameter() {
|
|
3648
|
+
return this._parameter;
|
|
3649
|
+
}
|
|
3650
|
+
withParameter(parameter) {
|
|
3651
|
+
return parameter === this._parameter ? this : new JSTry.JSCatch(this._id, this._prefix, this._markers, parameter, this._body);
|
|
3652
|
+
}
|
|
3653
|
+
get body() {
|
|
3654
|
+
return this._body;
|
|
3655
|
+
}
|
|
3656
|
+
withBody(body) {
|
|
3657
|
+
return body === this._body ? this : new JSTry.JSCatch(this._id, this._prefix, this._markers, this._parameter, body);
|
|
3658
|
+
}
|
|
3659
|
+
acceptJavaScript(v, p) {
|
|
3660
|
+
return v.visitJSTryJSCatch(this, p);
|
|
3661
|
+
}
|
|
3662
|
+
};
|
|
3663
|
+
JSCatch = __decorate([
|
|
3664
|
+
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$JSTry$JSCatch")
|
|
3665
|
+
], JSCatch);
|
|
3666
|
+
JSTry.JSCatch = JSCatch;
|
|
3667
|
+
})(JSTry || (exports.JSTry = JSTry = {}));
|
|
3281
3668
|
let NamespaceDeclaration = NamespaceDeclaration_1 = class NamespaceDeclaration extends (0, support_types_1.JSMixin)(Object) {
|
|
3282
3669
|
constructor(id, prefix, markers, modifiers, keywordType, name, body) {
|
|
3283
3670
|
super();
|
|
@@ -4202,6 +4589,7 @@ exports.JsAssignmentOperation = JsAssignmentOperation = JsAssignmentOperation_1
|
|
|
4202
4589
|
Type[Type["And"] = 1] = "And";
|
|
4203
4590
|
Type[Type["Or"] = 2] = "Or";
|
|
4204
4591
|
Type[Type["Power"] = 3] = "Power";
|
|
4592
|
+
Type[Type["Exp"] = 4] = "Exp";
|
|
4205
4593
|
})(Type = JsAssignmentOperation.Type || (JsAssignmentOperation.Type = {}));
|
|
4206
4594
|
})(JsAssignmentOperation || (exports.JsAssignmentOperation = JsAssignmentOperation = {}));
|
|
4207
4595
|
let TypeTreeExpression = TypeTreeExpression_1 = class TypeTreeExpression extends (0, support_types_1.JSMixin)(Object) {
|