@beinformed/codemod 1.0.0-beta.1 → 1.0.0-beta.3

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.
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // src/transforms/migrate-imports.ts
@@ -33,12 +23,722 @@ __export(migrate_imports_exports, {
33
23
  default: () => transformer
34
24
  });
35
25
  module.exports = __toCommonJS(migrate_imports_exports);
36
- var import_node_fs = __toESM(require("fs"));
37
- var import_node_path = __toESM(require("path"));
38
- var mappingPath = import_node_path.default.join(__dirname, "..", "static", "mapping.json");
39
- var rawMapping = JSON.parse(import_node_fs.default.readFileSync(mappingPath, "utf8"));
40
- var symbolMappings = rawMapping || {};
41
- var renames = {};
26
+
27
+ // src/transforms/mapping.json
28
+ var mapping_default = {
29
+ ALL_CONTENT_IN_DATA_SETTING: "@beinformed/ui/settings",
30
+ ATTRIBUTE_TYPE: "@beinformed/ui/models",
31
+ ATTRIBUTE_WIDTH: "@beinformed/ui/constants",
32
+ AUTOSAVE_STATUS: "@beinformed/react/redux",
33
+ AVATAR: "@beinformed/ui/layouthints",
34
+ AVATAR_IN_TITLE: "@beinformed/ui/layouthints",
35
+ ActionCollection: "@beinformed/ui/models",
36
+ ActionContributions: "@beinformed/ui/models",
37
+ ActionData: "@beinformed/ui/models",
38
+ ActionFieldData: "@beinformed/ui/models",
39
+ ActionModel: "@beinformed/ui/models",
40
+ AnchorElementData: "@beinformed/ui/models",
41
+ AnonymousDynamicSchema: "@beinformed/ui/models",
42
+ ApplicationContributions: "@beinformed/ui/models",
43
+ ApplicationData: "@beinformed/ui/models",
44
+ ApplicationLinksContributions: "@beinformed/ui/models",
45
+ ApplicationLinksData: "@beinformed/ui/models",
46
+ ApplicationModel: "@beinformed/ui/models",
47
+ AssignmentFilterContribution: "@beinformed/ui/models",
48
+ AssignmentFilterData: "@beinformed/ui/models",
49
+ AssignmentFilterModel: "@beinformed/ui/models",
50
+ AttributeCollection: "@beinformed/ui/models",
51
+ AttributeCollectionContributions: "@beinformed/ui/models",
52
+ AttributeContent: "@beinformed/ui/models",
53
+ AttributeContentElement: "@beinformed/ui/models",
54
+ AttributeContributions: "@beinformed/ui/models",
55
+ AttributeData: "@beinformed/ui/models",
56
+ AttributeDataMapper: "@beinformed/ui/models",
57
+ AttributeFactory: "@beinformed/ui/models",
58
+ AttributeModel: "@beinformed/ui/models",
59
+ AttributeModularUIData: "@beinformed/ui/models",
60
+ AttributePropertyElement: "@beinformed/ui/models",
61
+ AttributeRequestData: "@beinformed/ui/models",
62
+ AttributeSetContributions: "@beinformed/ui/models",
63
+ AttributeSetModel: "@beinformed/ui/models",
64
+ AttributeTextFragmentElement: "@beinformed/ui/models",
65
+ AttributeValue: "@beinformed/ui/models",
66
+ AuthState: "@beinformed/react/redux",
67
+ Authenticate: "@beinformed/ui/modularui",
68
+ AuthenticationType: "@beinformed/ui/modularui",
69
+ BEIDispatch: "@beinformed/react/redux",
70
+ BEIStore: "@beinformed/react/redux",
71
+ BSNConstraint: "@beinformed/ui/models",
72
+ BaseAttributeContributions: "@beinformed/ui/models",
73
+ BaseAttributeModel: "@beinformed/ui/models",
74
+ BaseCollection: "@beinformed/ui/models",
75
+ BaseDateTimeUtil: "@beinformed/ui/utils",
76
+ BaseDetailContributions: "@beinformed/ui/models",
77
+ BaseDetailData: "@beinformed/ui/models",
78
+ BaseLayoutHintRule: "@beinformed/ui/models",
79
+ BaseModel: "@beinformed/ui/models",
80
+ BaseStringAttributeContributions: "@beinformed/ui/models",
81
+ BeforeRenderHook: "@beinformed/react/redux",
82
+ BeforeRenderHookProps: "@beinformed/react/redux",
83
+ BinaryAttributeContributions: "@beinformed/ui/models",
84
+ BooleanAttributeContributions: "@beinformed/ui/models",
85
+ BooleanAttributeModel: "@beinformed/ui/models",
86
+ CAPTCHA_PATH: "@beinformed/ui/constants",
87
+ CASEVIEW_LINK: "@beinformed/ui/layouthints",
88
+ CHANGEPASSWORD_PATH: "@beinformed/ui/constants",
89
+ CHOICETYPE: "@beinformed/ui/models",
90
+ CONFIRM_PASSWORD: "@beinformed/ui/layouthints",
91
+ CONTENT_PATH: "@beinformed/ui/constants",
92
+ CREATE_ACTION: "@beinformed/ui/layouthints",
93
+ Cache: "@beinformed/ui/utils",
94
+ CacheType: "@beinformed/ui/utils",
95
+ CaptchaAttributeContributions: "@beinformed/ui/models",
96
+ CaptchaAttributeModel: "@beinformed/ui/models",
97
+ CaptchaRequest: "@beinformed/ui/modularui",
98
+ CaseSearchModel: "@beinformed/ui/models",
99
+ CaseViewContributions: "@beinformed/ui/models",
100
+ CaseViewData: "@beinformed/ui/models",
101
+ CaseViewLinksContributions: "@beinformed/ui/models",
102
+ CaseViewModel: "@beinformed/ui/models",
103
+ ChildrenKey: "@beinformed/ui/models",
104
+ ChoiceAttributeContributions: "@beinformed/ui/models",
105
+ ChoiceAttributeModel: "@beinformed/ui/models",
106
+ ChoiceAttributeOptionCollection: "@beinformed/ui/models",
107
+ ChoiceAttributeOptionContributions: "@beinformed/ui/models",
108
+ ChoiceAttributeOptionModel: "@beinformed/ui/models",
109
+ ChoiceAttributeOptionModelOptions: "@beinformed/ui/models",
110
+ ChoiceFilterContribution: "@beinformed/ui/models",
111
+ ChoiceFilterData: "@beinformed/ui/models",
112
+ CompositeAttributeChildCollection: "@beinformed/ui/models",
113
+ CompositeAttributeContributions: "@beinformed/ui/models",
114
+ CompositeAttributeModel: "@beinformed/ui/models",
115
+ CompositeDynamicSchema: "@beinformed/ui/models",
116
+ ConceptDetailData: "@beinformed/ui/models",
117
+ ConceptDetailModel: "@beinformed/ui/models",
118
+ ConceptIndexContributions: "@beinformed/ui/models",
119
+ ConceptIndexData: "@beinformed/ui/models",
120
+ ConceptIndexFilterModel: "@beinformed/ui/models",
121
+ ConceptIndexModel: "@beinformed/ui/models",
122
+ ConceptLinkCollection: "@beinformed/ui/models",
123
+ ConceptLinkData: "@beinformed/ui/models",
124
+ ConceptLinkModel: "@beinformed/ui/models",
125
+ ConceptRelationCollection: "@beinformed/ui/models",
126
+ ConceptRelationModel: "@beinformed/ui/models",
127
+ ConceptTypeDetailData: "@beinformed/ui/models",
128
+ ConceptTypeDetailModel: "@beinformed/ui/models",
129
+ ConfigurationElements: "@beinformed/ui/models",
130
+ ConfigurationException: "@beinformed/ui/exceptions",
131
+ ConstraintCollection: "@beinformed/ui/models",
132
+ ConstraintModel: "@beinformed/ui/models",
133
+ ContentConfiguration: "@beinformed/ui/models",
134
+ ContentConfigurationContributions: "@beinformed/ui/models",
135
+ ContentConfigurationElements: "@beinformed/ui/models",
136
+ ContentConfigurationEndResults: "@beinformed/ui/models",
137
+ ContentConfigurationQuestions: "@beinformed/ui/models",
138
+ ContentConfigurationResults: "@beinformed/ui/models",
139
+ ContentContributions: "@beinformed/ui/models",
140
+ ContentData: "@beinformed/ui/models",
141
+ ContentDataItem: "@beinformed/ui/models",
142
+ ContentDataSection: "@beinformed/ui/models",
143
+ ContentDetailContributions: "@beinformed/ui/models",
144
+ ContentDetailData: "@beinformed/ui/models",
145
+ ContentElement: "@beinformed/ui/models",
146
+ ContentIndexContributions: "@beinformed/ui/models",
147
+ ContentIndexData: "@beinformed/ui/models",
148
+ ContentIndexModel: "@beinformed/ui/models",
149
+ ContentLinkCollection: "@beinformed/ui/models",
150
+ ContentLinkData: "@beinformed/ui/models",
151
+ ContentLinkModel: "@beinformed/ui/models",
152
+ ContentModel: "@beinformed/ui/models",
153
+ ContentTOCData: "@beinformed/ui/models",
154
+ ContentTOCModel: "@beinformed/ui/models",
155
+ ContentTypeContributions: "@beinformed/ui/models",
156
+ ContentTypeData: "@beinformed/ui/models",
157
+ ContentTypeModel: "@beinformed/ui/models",
158
+ Contributions: "@beinformed/ui/types",
159
+ ContributionsForFilterCollection: "@beinformed/ui/models",
160
+ DATETIME_OFFSET_FORMAT: "@beinformed/ui/constants",
161
+ DEFAULT_AUTHENTICATION_TYPE: "@beinformed/ui/constants",
162
+ DEFAULT_FIRST_WEEK_CONTAINS_DATE: "@beinformed/ui/constants",
163
+ DEFAULT_WEEK_STARTS_ON: "@beinformed/ui/constants",
164
+ DELETE_ACTION: "@beinformed/ui/layouthints",
165
+ DEPENDENT_ATTRIBUTE: "@beinformed/ui/layouthints",
166
+ DEPENDENT_ATTRIBUTE_CONTROL: "@beinformed/ui/layouthints",
167
+ DISABLED: "@beinformed/ui/layouthints",
168
+ Data: "@beinformed/ui/types",
169
+ DateBoundaryConstraint: "@beinformed/ui/models",
170
+ DateFilterContribution: "@beinformed/ui/models",
171
+ DateFilterData: "@beinformed/ui/models",
172
+ DateRangeFilterContribution: "@beinformed/ui/models",
173
+ DateRangeFilterData: "@beinformed/ui/models",
174
+ DateTimeDateFormatConstraint: "@beinformed/ui/models",
175
+ DateTimeTimeFormatConstraint: "@beinformed/ui/models",
176
+ DateTimeUtil: "@beinformed/ui/utils",
177
+ DateUtil: "@beinformed/ui/utils",
178
+ DatetimeAttributeContributions: "@beinformed/ui/models",
179
+ DatetimeAttributeModel: "@beinformed/ui/models",
180
+ DatetimeFormatConstraint: "@beinformed/ui/models",
181
+ DecimalFormat: "@beinformed/ui/utils",
182
+ DefaultLinksData: "@beinformed/ui/types",
183
+ DependentAttribute: "@beinformed/ui/models",
184
+ DetailData: "@beinformed/ui/models",
185
+ DetailModel: "@beinformed/ui/models",
186
+ DetailPanelContributions: "@beinformed/ui/models",
187
+ DynamicSchema: "@beinformed/ui/models",
188
+ EndResultsConfiguration: "@beinformed/ui/models",
189
+ ErrorBoundary: "@beinformed/react/components",
190
+ ErrorBoundaryFallback: "@beinformed/react/components",
191
+ ErrorBoundaryFallbackProps: "@beinformed/react/components",
192
+ ErrorBoundaryProps: "@beinformed/react/components",
193
+ ErrorCollection: "@beinformed/ui/models",
194
+ ErrorCollectionType: "@beinformed/ui/models",
195
+ ErrorMessage: "@beinformed/ui/types",
196
+ ErrorModel: "@beinformed/ui/models",
197
+ ErrorObjectData: "@beinformed/ui/models",
198
+ ErrorResponse: "@beinformed/ui/models",
199
+ ErrorState: "@beinformed/react/redux",
200
+ FILTER_TYPE: "@beinformed/ui/models",
201
+ FetchException: "@beinformed/ui/exceptions",
202
+ FetchModelPayload: "@beinformed/react/redux",
203
+ FetchModelResult: "@beinformed/react/redux",
204
+ FileEntryType: "@beinformed/ui/models",
205
+ FileExtensionConstraint: "@beinformed/ui/models",
206
+ FileSizeConstraint: "@beinformed/ui/models",
207
+ FilesType: "@beinformed/ui/models",
208
+ FilesizeConstraintsType: "@beinformed/ui/models",
209
+ FiletypeConstraintsType: "@beinformed/ui/models",
210
+ FilterCollection: "@beinformed/ui/models",
211
+ FilterCollectionContributions: "@beinformed/ui/models",
212
+ FilterCollectionData: "@beinformed/ui/models",
213
+ FilterContribution: "@beinformed/ui/models",
214
+ FilterData: "@beinformed/ui/models",
215
+ FilterFactory: "@beinformed/ui/models",
216
+ FilterModel: "@beinformed/ui/models",
217
+ FormContributions: "@beinformed/ui/models",
218
+ FormData: "@beinformed/ui/models",
219
+ FormModel: "@beinformed/ui/models",
220
+ FormObjectContributions: "@beinformed/ui/models",
221
+ FormObjectData: "@beinformed/ui/models",
222
+ FormObjectModel: "@beinformed/ui/models",
223
+ GenericConstraintModel: "@beinformed/ui/models",
224
+ GroupData: "@beinformed/ui/models",
225
+ GroupModel: "@beinformed/ui/models",
226
+ GroupingContributions: "@beinformed/ui/models",
227
+ GroupingData: "@beinformed/ui/models",
228
+ GroupingModel: "@beinformed/ui/models",
229
+ GroupingPanelContributions: "@beinformed/ui/models",
230
+ GroupingPanelData: "@beinformed/ui/models",
231
+ GroupingPanelModel: "@beinformed/ui/models",
232
+ HIDE_IN_USER_INTERFACE: "@beinformed/ui/layouthints",
233
+ HIDE_WHEN_EMPTY: "@beinformed/ui/layouthints",
234
+ HTTP_METHODS: "@beinformed/ui/constants",
235
+ HelptextAttributeModel: "@beinformed/ui/models",
236
+ HistoryLocation: "@beinformed/ui/types",
237
+ HookOptions: "@beinformed/react/hooks",
238
+ Href: "@beinformed/ui/models",
239
+ HrefState: "@beinformed/ui/types",
240
+ HttpServletRequestJava: "@beinformed/react/server",
241
+ I18nState: "@beinformed/react/redux",
242
+ IBANConstraint: "@beinformed/ui/models",
243
+ IFilter: "@beinformed/ui/models",
244
+ INCLUDE_TIME_OFFSET: "@beinformed/ui/settings",
245
+ INITIAL_FILTER: "@beinformed/ui/layouthints",
246
+ INITIAL_TOTAL_FILESIZE: "@beinformed/ui/layouthints",
247
+ INTERNAL_LOGIN_TYPE: "@beinformed/ui/constants",
248
+ ISO_DATE: "@beinformed/ui/types",
249
+ ISO_DATETIME_FORMAT: "@beinformed/ui/constants",
250
+ ISO_DATE_FORMAT: "@beinformed/ui/constants",
251
+ ISO_TIMESTAMP_FORMAT: "@beinformed/ui/constants",
252
+ ISO_TIME_FORMAT: "@beinformed/ui/constants",
253
+ IS_DEV: "@beinformed/ui/utils",
254
+ IS_GRAALJS: "@beinformed/ui/constants",
255
+ IS_SERVER: "@beinformed/ui/constants",
256
+ IllegalArgumentException: "@beinformed/ui/exceptions",
257
+ IllegalReturnException: "@beinformed/ui/exceptions",
258
+ IllegalStateException: "@beinformed/ui/exceptions",
259
+ Init: "@beinformed/react/client",
260
+ JsonParseException: "@beinformed/ui/exceptions",
261
+ LOGIN_PASSWORD_SETTING: "@beinformed/ui/constants",
262
+ LOGIN_PATH: "@beinformed/ui/settings",
263
+ LOGIN_PATH_SETTING: "@beinformed/ui/constants",
264
+ LOGIN_TYPE: "@beinformed/ui/constants",
265
+ LOGIN_USERNAME_SETTING: "@beinformed/ui/constants",
266
+ LOGOUT_PATH: "@beinformed/ui/settings",
267
+ LOGOUT_PATH_SETTING: "@beinformed/ui/constants",
268
+ LabelAttributeModel: "@beinformed/ui/models",
269
+ LabelData: "@beinformed/ui/models",
270
+ LabelType: "@beinformed/ui/models",
271
+ LayoutHintCollection: "@beinformed/ui/models",
272
+ LayoutHintConfiguration: "@beinformed/ui/layouthints",
273
+ LayoutHintProcessor: "@beinformed/ui/layouthints",
274
+ LayoutHintRule: "@beinformed/ui/models",
275
+ LayoutHintRuleCollection: "@beinformed/ui/models",
276
+ LayoutHintRulesUpdater: "@beinformed/ui/models",
277
+ LinkCollection: "@beinformed/ui/models",
278
+ LinkContributions: "@beinformed/ui/models",
279
+ LinkData: "@beinformed/ui/models",
280
+ LinkModel: "@beinformed/ui/models",
281
+ Links: "@beinformed/ui/models",
282
+ ListContributions: "@beinformed/ui/models",
283
+ ListData: "@beinformed/ui/models",
284
+ ListDetailAttributeData: "@beinformed/ui/models",
285
+ ListDetailContributions: "@beinformed/ui/models",
286
+ ListDetailData: "@beinformed/ui/models",
287
+ ListDetailModel: "@beinformed/ui/models",
288
+ ListHeaderModel: "@beinformed/ui/models",
289
+ ListHref: "@beinformed/ui/models",
290
+ ListItemCollection: "@beinformed/ui/models",
291
+ ListItemData: "@beinformed/ui/models",
292
+ ListItemModel: "@beinformed/ui/models",
293
+ ListModel: "@beinformed/ui/models",
294
+ Locale: "@beinformed/react/i18n",
295
+ LocaleConfiguration: "@beinformed/react/i18n",
296
+ Locales: "@beinformed/react/i18n",
297
+ LookupOptionCollection: "@beinformed/ui/models",
298
+ LookupOptionData: "@beinformed/ui/models",
299
+ LookupOptionsContributions: "@beinformed/ui/models",
300
+ LookupOptionsData: "@beinformed/ui/models",
301
+ LookupOptionsModel: "@beinformed/ui/models",
302
+ MANDATORY: "@beinformed/ui/layouthints",
303
+ MAX_TOTAL_FILESIZE: "@beinformed/ui/layouthints",
304
+ MODULARUI_STATUS: "@beinformed/react/redux",
305
+ MandatoryConstraint: "@beinformed/ui/models",
306
+ MandatoryRangeConstraint: "@beinformed/ui/models",
307
+ MaybeAttributeValue: "@beinformed/ui/models",
308
+ MemoAttributeContributions: "@beinformed/ui/models",
309
+ MemoAttributeModel: "@beinformed/ui/models",
310
+ Message: "@beinformed/react/i18n",
311
+ MessageObject: "@beinformed/react/i18n",
312
+ MessageParameters: "@beinformed/ui/types",
313
+ MissingObjectData: "@beinformed/ui/models",
314
+ MissingPropertyException: "@beinformed/ui/exceptions",
315
+ ModalState: "@beinformed/react/redux",
316
+ ModalsState: "@beinformed/react/redux",
317
+ ModelCatalogContributions: "@beinformed/ui/models",
318
+ ModelCatalogData: "@beinformed/ui/models",
319
+ ModelCatalogModel: "@beinformed/ui/models",
320
+ ModelCatalogState: "@beinformed/react/redux",
321
+ ModelCategory: "@beinformed/ui/models",
322
+ ModelCategoryCollection: "@beinformed/ui/models",
323
+ ModelCategoryModel: "@beinformed/ui/models",
324
+ ModelConfig: "@beinformed/ui/modularui",
325
+ ModelEntry: "@beinformed/react/redux",
326
+ ModelOptions: "@beinformed/ui/models",
327
+ ModelResolver: "@beinformed/ui/modularui",
328
+ ModelWithChildModels: "@beinformed/ui/models",
329
+ ModularUIError: "@beinformed/ui/modularui",
330
+ ModularUIErrorJSON: "@beinformed/ui/exceptions",
331
+ ModularUIErrorResponse: "@beinformed/ui/models",
332
+ ModularUIModel: "@beinformed/ui/models",
333
+ ModularUIModelWithChildModels: "@beinformed/ui/models",
334
+ ModularUIRequest: "@beinformed/ui/modularui",
335
+ ModularUIRequestOptions: "@beinformed/ui/utils",
336
+ ModularUIResponse: "@beinformed/ui/modularui",
337
+ ModularUISpecificErrorResponse: "@beinformed/ui/modularui",
338
+ ModularUIState: "@beinformed/react/redux",
339
+ MoneyAttributeContributions: "@beinformed/ui/models",
340
+ MoneyAttributeModel: "@beinformed/ui/models",
341
+ NOTIFICATION_TYPES: "@beinformed/react/redux",
342
+ NamedDynamicSchema: "@beinformed/ui/models",
343
+ NetworkException: "@beinformed/ui/exceptions",
344
+ NormalizedLinkContributions: "@beinformed/ui/models",
345
+ NormalizedLinkData: "@beinformed/ui/models",
346
+ NotAllowedUriException: "@beinformed/ui/exceptions",
347
+ NotFoundException: "@beinformed/ui/exceptions",
348
+ NotificationState: "@beinformed/react/redux",
349
+ NumberAttributeContributions: "@beinformed/ui/models",
350
+ NumberAttributeModel: "@beinformed/ui/models",
351
+ NumberBoundaryConstraint: "@beinformed/ui/models",
352
+ NumberFilterContributions: "@beinformed/ui/models",
353
+ NumberFilterData: "@beinformed/ui/models",
354
+ NumberFormatConstraint: "@beinformed/ui/models",
355
+ NumberGroupingConstraint: "@beinformed/ui/models",
356
+ NumberRangeFilterContribution: "@beinformed/ui/models",
357
+ NumberRangeFilterData: "@beinformed/ui/models",
358
+ NumberUtil: "@beinformed/ui/utils",
359
+ OPTION_MODE: "@beinformed/ui/models",
360
+ OffsetInfo: "@beinformed/ui/utils",
361
+ PARAMETER_SEPARATOR: "@beinformed/ui/constants",
362
+ PARAMETER_TYPES: "@beinformed/ui/constants",
363
+ PagesizeModel: "@beinformed/ui/models",
364
+ PagingContributions: "@beinformed/ui/models",
365
+ PagingData: "@beinformed/ui/models",
366
+ PagingModel: "@beinformed/ui/models",
367
+ Parameter: "@beinformed/ui/models",
368
+ ParameterCollection: "@beinformed/ui/models",
369
+ PasswordAttributeContributions: "@beinformed/ui/models",
370
+ PasswordAttributeModel: "@beinformed/ui/models",
371
+ PasswordConfirmConstraint: "@beinformed/ui/models",
372
+ PasswordLowerAndUpperCaseConstraint: "@beinformed/ui/models",
373
+ PasswordMinNumericCharactersConstraint: "@beinformed/ui/models",
374
+ PasswordMinSpecialCharactersConstraint: "@beinformed/ui/models",
375
+ PasswordThreeConsecutiveCharactersNotAllowedConstraint: "@beinformed/ui/models",
376
+ PreferenceValue: "@beinformed/react/redux",
377
+ PreferencesState: "@beinformed/react/redux",
378
+ ProcessStatusSettingsContributions: "@beinformed/ui/models",
379
+ ProcessStatusSettingsData: "@beinformed/ui/models",
380
+ ProcessStatusSettingsModel: "@beinformed/ui/models",
381
+ ProgressHandler: "@beinformed/ui/utils",
382
+ ProgressIndicatorState: "@beinformed/react/redux",
383
+ PropertyData: "@beinformed/ui/models",
384
+ PropertyElement: "@beinformed/ui/models",
385
+ PropertyType: "@beinformed/ui/models",
386
+ Props: "@beinformed/react/theme",
387
+ QuestionConfiguration: "@beinformed/ui/models",
388
+ RENDER_SECTION_LABEL: "@beinformed/ui/layouthints",
389
+ RESOURCE_PATH: "@beinformed/ui/constants",
390
+ RangeAttributeContributions: "@beinformed/ui/models",
391
+ RangeAttributeModel: "@beinformed/ui/models",
392
+ RangeConstraint: "@beinformed/ui/models",
393
+ RangeFilterModel: "@beinformed/ui/models",
394
+ RedirectObject: "@beinformed/ui/models",
395
+ RedirectTextObject: "@beinformed/ui/models",
396
+ RegexConstraint: "@beinformed/ui/models",
397
+ RegexObject: "@beinformed/ui/models",
398
+ RelatedConceptContributions: "@beinformed/ui/models",
399
+ RelatedConceptsData: "@beinformed/ui/models",
400
+ RelationData: "@beinformed/ui/models",
401
+ RelationDirection: "@beinformed/ui/models",
402
+ RelationTypeType: "@beinformed/ui/models",
403
+ RemainingTotalUploadSize: "@beinformed/ui/models",
404
+ RequestBaseOptions: "@beinformed/ui/utils",
405
+ RequestOptions: "@beinformed/ui/utils",
406
+ RequestURLOptions: "@beinformed/ui/utils",
407
+ ResourceCollection: "@beinformed/ui/models",
408
+ ResourceData: "@beinformed/ui/types",
409
+ ResourceModel: "@beinformed/ui/models",
410
+ ResultsConfiguration: "@beinformed/ui/models",
411
+ ResultsData: "@beinformed/ui/models",
412
+ RootState: "@beinformed/react/redux",
413
+ RouterLocation: "@beinformed/react/redux",
414
+ RouterState: "@beinformed/react/redux",
415
+ SHOW_ONE_RESULT_AS_DETAIL: "@beinformed/ui/layouthints",
416
+ SORT_OPTIONS: "@beinformed/ui/layouthints",
417
+ SORT_ORDER: "@beinformed/ui/models",
418
+ SearchFilter: "@beinformed/react/hooks",
419
+ SectionData: "@beinformed/ui/models",
420
+ SectionFragment: "@beinformed/ui/models",
421
+ SectionModel: "@beinformed/ui/models",
422
+ SectionReferenceType: "@beinformed/ui/models",
423
+ ServerPreferenceValue: "@beinformed/react/server",
424
+ ServerRequestException: "@beinformed/ui/exceptions",
425
+ Setting: "@beinformed/ui/settings",
426
+ ShowNotificationArguments: "@beinformed/react/redux",
427
+ SortOptionModel: "@beinformed/ui/models",
428
+ SortingModel: "@beinformed/ui/models",
429
+ SourceReferenceCollection: "@beinformed/ui/models",
430
+ SourceReferenceData: "@beinformed/ui/models",
431
+ SourceReferenceModel: "@beinformed/ui/models",
432
+ StringAttributeContributions: "@beinformed/ui/models",
433
+ StringAttributeModel: "@beinformed/ui/models",
434
+ StringFilterContributions: "@beinformed/ui/models",
435
+ StringFilterData: "@beinformed/ui/models",
436
+ StringFilterModel: "@beinformed/ui/models",
437
+ StringLengthConstraint: "@beinformed/ui/models",
438
+ SubSectionData: "@beinformed/ui/models",
439
+ SubSectionModel: "@beinformed/ui/models",
440
+ SuccessData: "@beinformed/ui/models",
441
+ TIMEVERSION_FILTER_NAME: "@beinformed/ui/constants",
442
+ TITLE: "@beinformed/ui/layouthints",
443
+ TabContributions: "@beinformed/ui/models",
444
+ TabData: "@beinformed/ui/models",
445
+ TabLinksContributions: "@beinformed/ui/models",
446
+ TabLinksData: "@beinformed/ui/models",
447
+ TabModel: "@beinformed/ui/models",
448
+ TargetModel: "@beinformed/ui/modularui",
449
+ TaskGroupCollection: "@beinformed/ui/models",
450
+ TaskGroupContributions: "@beinformed/ui/models",
451
+ TaskGroupData: "@beinformed/ui/models",
452
+ TaskGroupModel: "@beinformed/ui/models",
453
+ TaxonomyType: "@beinformed/ui/models",
454
+ TemplateProps: "@beinformed/react/server",
455
+ TextFragmentData: "@beinformed/ui/models",
456
+ TextFragmentElement: "@beinformed/ui/models",
457
+ TextFragmentType: "@beinformed/ui/models",
458
+ TextWithPlaceholders: "@beinformed/ui/types",
459
+ Theme: "@beinformed/react/theme",
460
+ ThemePropValue: "@beinformed/react/theme",
461
+ ThemePropertyException: "@beinformed/ui/exceptions",
462
+ ThemeProvider: "@beinformed/react/theme",
463
+ TimeUtil: "@beinformed/ui/utils",
464
+ TimeoutException: "@beinformed/ui/exceptions",
465
+ TimestampUtil: "@beinformed/ui/utils",
466
+ TitleObject: "@beinformed/ui/models",
467
+ UPDATE_ACTION: "@beinformed/ui/layouthints",
468
+ UPLOAD_PATH: "@beinformed/ui/constants",
469
+ USERPROFILE_PATH: "@beinformed/ui/constants",
470
+ UnauthorizedException: "@beinformed/ui/exceptions",
471
+ UnsupportedOperationException: "@beinformed/ui/exceptions",
472
+ UpdateFormOptions: "@beinformed/react/hooks",
473
+ UpdateHandler: "@beinformed/ui/utils",
474
+ UploadAttributeModel: "@beinformed/ui/models",
475
+ UploadRequest: "@beinformed/ui/modularui",
476
+ UseModularUIBasicOptions: "@beinformed/react/hooks",
477
+ UserContributions: "@beinformed/ui/models",
478
+ UserData: "@beinformed/ui/models",
479
+ UserModel: "@beinformed/ui/models",
480
+ UserProfileModel: "@beinformed/ui/models",
481
+ UserServicesContributions: "@beinformed/ui/models",
482
+ UserServicesData: "@beinformed/ui/models",
483
+ UserServicesModel: "@beinformed/ui/models",
484
+ UtilThemeProps: "@beinformed/react/theme",
485
+ WindowWithContext: "@beinformed/react/client",
486
+ XMLAttributeModel: "@beinformed/ui/models",
487
+ XMLConstraint: "@beinformed/ui/models",
488
+ addContentLoadedEvent: "@beinformed/react/client",
489
+ addLayoutHintRule: "@beinformed/ui/models",
490
+ addRepeatableAttributeSet: "@beinformed/react/redux",
491
+ allKeysByHref: "@beinformed/react/redux",
492
+ allSettings: "@beinformed/ui/settings",
493
+ authReducer: "@beinformed/react/redux",
494
+ autosaveFormObject: "@beinformed/react/redux",
495
+ autosubmitFormObject: "@beinformed/react/redux",
496
+ autoupdateFormObject: "@beinformed/react/redux",
497
+ availableLocales: "@beinformed/react/i18n",
498
+ cacheContributions: "@beinformed/ui/settings",
499
+ cancelForm: "@beinformed/react/redux",
500
+ cancelRepeatableAttributeSet: "@beinformed/react/redux",
501
+ changeHSL: "@beinformed/react/theme",
502
+ changePassword: "@beinformed/react/redux",
503
+ clearCookie: "@beinformed/ui/utils",
504
+ client: "@beinformed/react/client",
505
+ closeModal: "@beinformed/react/redux",
506
+ createHash: "@beinformed/ui/utils",
507
+ createHashFromHref: "@beinformed/ui/utils",
508
+ createHead: "@beinformed/react/server",
509
+ createHref: "@beinformed/ui/utils",
510
+ createLocalesWithConfiguredErrors: "@beinformed/react/i18n",
511
+ createTheme: "@beinformed/react/theme",
512
+ createUUID: "@beinformed/ui/utils",
513
+ darkenColor: "@beinformed/react/theme",
514
+ dehydrate: "@beinformed/react/server",
515
+ dismissNotification: "@beinformed/react/redux",
516
+ errorReducer: "@beinformed/react/redux",
517
+ fetchModel: "@beinformed/react/redux",
518
+ filterParameters: "@beinformed/ui/utils",
519
+ getActiveModelByInstance: "@beinformed/react/redux",
520
+ getActiveModels: "@beinformed/react/redux",
521
+ getAllFinishedModels: "@beinformed/react/redux",
522
+ getAllModelsByInstance: "@beinformed/react/redux",
523
+ getApplication: "@beinformed/react/redux",
524
+ getBooleanSetting: "@beinformed/ui/settings",
525
+ getBrowserHistory: "@beinformed/react/redux",
526
+ getCaptchaPath: "@beinformed/ui/settings",
527
+ getColorContrast: "@beinformed/react/theme",
528
+ getContentPath: "@beinformed/ui/settings",
529
+ getContextPath: "@beinformed/ui/settings",
530
+ setContextPath: "@beinformed/ui/settings",
531
+ getContextPathModularUI: "@beinformed/ui/settings",
532
+ getContextPathServer: "@beinformed/ui/settings",
533
+ getContrastYIQ: "@beinformed/react/theme",
534
+ getCookie: "@beinformed/ui/utils",
535
+ getCookieFromRequest: "@beinformed/react/server",
536
+ getDataFromServer: "@beinformed/react/redux",
537
+ getDisplayName: "@beinformed/react/utils",
538
+ getSwimLaneDiagramConfiguration: "@beinformed/react/utils",
539
+ getEnabledLocales: "@beinformed/ui/settings",
540
+ getEntryDate: "@beinformed/react/redux",
541
+ getFirstModelByInstance: "@beinformed/react/redux",
542
+ getFullRequestLocation: "@beinformed/react/server",
543
+ getFullRequestUrl: "@beinformed/react/server",
544
+ getHint: "@beinformed/ui/layouthints",
545
+ getLayoutHintConfiguration: "@beinformed/ui/layouthints",
546
+ getLocale: "@beinformed/react/redux",
547
+ getLocales: "@beinformed/react/redux",
548
+ getNumberSetting: "@beinformed/ui/settings",
549
+ getPreferredLocale: "@beinformed/react/server",
550
+ getProp: "@beinformed/react/theme",
551
+ getRepositoryResourceUrl: "@beinformed/ui/utils",
552
+ getRequestLocale: "@beinformed/react/redux",
553
+ getSetting: "@beinformed/ui/settings",
554
+ getStringSetting: "@beinformed/ui/settings",
555
+ getThemeNumberProp: "@beinformed/react/theme",
556
+ getThemeProp: "@beinformed/react/theme",
557
+ getThemeStringProp: "@beinformed/react/theme",
558
+ getUploadPath: "@beinformed/ui/settings",
559
+ getYIQ: "@beinformed/react/theme",
560
+ go: "@beinformed/react/redux",
561
+ goBack: "@beinformed/react/redux",
562
+ goForward: "@beinformed/react/redux",
563
+ graalFetch: "@beinformed/ui/utils",
564
+ gutter: "@beinformed/react/theme",
565
+ handleBeforeRenderHooks: "@beinformed/react/redux",
566
+ handleError: "@beinformed/react/redux",
567
+ handleUnauthorized: "@beinformed/react/redux",
568
+ hasAllContentInData: "@beinformed/ui/settings",
569
+ htmlpage: "@beinformed/react/server",
570
+ i18nReducer: "@beinformed/react/redux",
571
+ initModels: "@beinformed/react/redux",
572
+ isIncludeTimeOffsetInDateTimes: "@beinformed/ui/settings",
573
+ keyByHref: "@beinformed/react/redux",
574
+ languages: "@beinformed/react/i18n",
575
+ lightenColor: "@beinformed/react/theme",
576
+ locationChange: "@beinformed/react/redux",
577
+ login: "@beinformed/react/redux",
578
+ loginFailed: "@beinformed/react/redux",
579
+ loginPasswordField: "@beinformed/ui/settings",
580
+ loginPath: "@beinformed/ui/settings",
581
+ loginSuccess: "@beinformed/react/redux",
582
+ loginType: "@beinformed/ui/settings",
583
+ loginUsernameField: "@beinformed/ui/settings",
584
+ logout: "@beinformed/react/redux",
585
+ logoutPath: "@beinformed/ui/settings",
586
+ logoutSuccess: "@beinformed/react/redux",
587
+ mergeLayoutHintConfigurations: "@beinformed/builder",
588
+ mergeRefs: "@beinformed/react/utils",
589
+ modalsReducer: "@beinformed/react/redux",
590
+ modelByHref: "@beinformed/react/redux",
591
+ modelCatalogReducer: "@beinformed/react/redux",
592
+ modularUIReducer: "@beinformed/react/redux",
593
+ noAction: "@beinformed/react/redux",
594
+ normalizeLinkJSON: "@beinformed/ui/models",
595
+ notificationReducer: "@beinformed/react/redux",
596
+ parseUrl: "@beinformed/ui/utils",
597
+ preferencesReducer: "@beinformed/react/redux",
598
+ previousObject: "@beinformed/react/redux",
599
+ progressIndicatorReducer: "@beinformed/react/redux",
600
+ push: "@beinformed/react/redux",
601
+ receiveLocale: "@beinformed/react/redux",
602
+ rehydrate: "@beinformed/react/client",
603
+ reloadApplication: "@beinformed/react/redux",
604
+ reloadModel: "@beinformed/react/redux",
605
+ removeModelByKey: "@beinformed/react/redux",
606
+ removeRepeatableAttributeSet: "@beinformed/react/redux",
607
+ removeUnwantedHtml: "@beinformed/ui/utils",
608
+ renderBackground: "@beinformed/react/theme",
609
+ renderContrastColor: "@beinformed/react/theme",
610
+ renderSSRMinimal: "@beinformed/react/server",
611
+ replace: "@beinformed/react/redux",
612
+ resetAuthErrors: "@beinformed/react/redux",
613
+ resetModularUI: "@beinformed/react/redux",
614
+ resourceExists: "@beinformed/ui/utils",
615
+ resourceRedirectsToSecureLogin: "@beinformed/ui/utils",
616
+ retrieveText: "@beinformed/ui/utils",
617
+ roundedCorners: "@beinformed/react/theme",
618
+ routerMiddleware: "@beinformed/react/redux",
619
+ routerReducer: "@beinformed/react/redux",
620
+ saveChangePassword: "@beinformed/react/redux",
621
+ saveError: "@beinformed/react/redux",
622
+ sendAuthenticationError: "@beinformed/react/redux",
623
+ serverNoSSR: "@beinformed/react/server",
624
+ setAllContentInDataSetting: "@beinformed/react/redux",
625
+ setApplication: "@beinformed/react/server",
626
+ setConfigurationTheme: "@beinformed/react/theme",
627
+ setCookie: "@beinformed/ui/utils",
628
+ setCustomErrorResponseHandler: "@beinformed/react/redux",
629
+ setDateTimeSettings: "@beinformed/react/redux",
630
+ setI18n: "@beinformed/react/i18n",
631
+ setLocales: "@beinformed/react/redux",
632
+ setLoginPreferences: "@beinformed/react/redux",
633
+ setModel: "@beinformed/react/redux",
634
+ setModelCatalogEntryDate: "@beinformed/react/client",
635
+ setPreference: "@beinformed/react/redux",
636
+ setPreferences: "@beinformed/react/redux",
637
+ setServerPreference: "@beinformed/react/redux",
638
+ setServerPreferences: "@beinformed/react/server",
639
+ setServerPreferencesFromArray: "@beinformed/react/server",
640
+ setSetting: "@beinformed/ui/settings",
641
+ setSettings: "@beinformed/ui/settings",
642
+ setThemePreference: "@beinformed/react/redux",
643
+ setUnhandledRejectionEvent: "@beinformed/react/client",
644
+ setupClient: "@beinformed/react/client",
645
+ setupStore: "@beinformed/react/redux",
646
+ showFormNotification: "@beinformed/react/redux",
647
+ showModal: "@beinformed/react/redux",
648
+ showNotification: "@beinformed/react/redux",
649
+ showXHRErrorNotification: "@beinformed/react/redux",
650
+ spacer: "@beinformed/react/theme",
651
+ spacers: "@beinformed/react/theme",
652
+ themeProp: "@beinformed/react/theme",
653
+ universalFetch: "@beinformed/ui/utils",
654
+ updateEntryDate: "@beinformed/react/redux",
655
+ updateErrorStatus: "@beinformed/react/redux",
656
+ updateForm: "@beinformed/react/redux",
657
+ updateFormAttribute: "@beinformed/react/redux",
658
+ updateLayoutHintRules: "@beinformed/ui/models",
659
+ updateLocale: "@beinformed/react/redux",
660
+ updateModel: "@beinformed/react/redux",
661
+ useApplication: "@beinformed/react/hooks",
662
+ useAttributeUpdate: "@beinformed/react/hooks",
663
+ useBEIDispatch: "@beinformed/react/redux",
664
+ useBEISelector: "@beinformed/react/redux",
665
+ useBEIStore: "@beinformed/react/redux",
666
+ useCaseView: "@beinformed/react/hooks",
667
+ useCompleteSource: "@beinformed/react/hooks",
668
+ useConceptDetail: "@beinformed/react/hooks",
669
+ useConceptIndex: "@beinformed/react/hooks",
670
+ useConceptSearch: "@beinformed/react/hooks",
671
+ useContent: "@beinformed/react/hooks",
672
+ useContentFromSourceReferences: "@beinformed/react/hooks",
673
+ useContentIndex: "@beinformed/react/hooks",
674
+ useContentSearch: "@beinformed/react/hooks",
675
+ useContentTOC: "@beinformed/react/hooks",
676
+ useContentType: "@beinformed/react/hooks",
677
+ useDeepCompareEffect: "@beinformed/react/hooks",
678
+ useDetailPanel: "@beinformed/react/hooks",
679
+ useEntryDate: "@beinformed/react/hooks",
680
+ useErrorNotification: "@beinformed/react/hooks",
681
+ useForm: "@beinformed/react/hooks",
682
+ useFormNavigation: "@beinformed/react/hooks",
683
+ useGroupingPanel: "@beinformed/react/hooks",
684
+ useList: "@beinformed/react/hooks",
685
+ useListDetail: "@beinformed/react/hooks",
686
+ useListNavigation: "@beinformed/react/hooks",
687
+ useListOrDetail: "@beinformed/react/hooks",
688
+ useLocale: "@beinformed/react/hooks",
689
+ useLocaleCodes: "@beinformed/react/hooks",
690
+ useLocation: "@beinformed/react/hooks",
691
+ useLocationKey: "@beinformed/react/hooks",
692
+ useLogin: "@beinformed/react/hooks",
693
+ useLogout: "@beinformed/react/hooks",
694
+ useLookup: "@beinformed/react/hooks",
695
+ useMessage: "@beinformed/react/hooks",
696
+ useModal: "@beinformed/react/hooks",
697
+ useModelCatalog: "@beinformed/react/hooks",
698
+ useModels: "@beinformed/react/hooks",
699
+ useModelSelectors: "@beinformed/react/hooks",
700
+ useModularUI: "@beinformed/react/hooks",
701
+ useModularUIBasic: "@beinformed/react/hooks",
702
+ useModularUIKey: "@beinformed/react/hooks",
703
+ useModularUIRequest: "@beinformed/react/hooks",
704
+ useNavigation: "@beinformed/react/hooks",
705
+ useNotification: "@beinformed/react/hooks",
706
+ usePanel: "@beinformed/react/hooks",
707
+ usePathname: "@beinformed/react/hooks",
708
+ usePreference: "@beinformed/react/hooks",
709
+ useProgressIndicator: "@beinformed/react/hooks",
710
+ useProgressIndicatorState: "@beinformed/react/hooks",
711
+ useQuerystring: "@beinformed/react/hooks",
712
+ useRelatedConcepts: "@beinformed/react/hooks",
713
+ useReload: "@beinformed/react/hooks",
714
+ useRepeatableAttributeSet: "@beinformed/react/hooks",
715
+ useRetrieveFormsOnModel: "@beinformed/react/hooks",
716
+ useSearch: "@beinformed/react/hooks",
717
+ useTab: "@beinformed/react/hooks",
718
+ useTheme: "@beinformed/react/theme",
719
+ useTranslate: "@beinformed/react/hooks",
720
+ useUserProfile: "@beinformed/react/hooks",
721
+ validateFormObject: "@beinformed/react/redux",
722
+ xhr: "@beinformed/ui/utils",
723
+ get: "lodash",
724
+ has: "lodash",
725
+ isPlainObject: "lodash",
726
+ KEYCODES: "@beinformed/ui/constants"
727
+ };
728
+
729
+ // src/transforms/migrate-imports.ts
730
+ var symbolMappings = mapping_default;
731
+ var renames = {
732
+ IS_SYNC: "IS_GRAALJS",
733
+ getBasePath: "getContextPath",
734
+ getBasePathModularUI: "getContextPathModularUI",
735
+ getBasePathServer: "getContextPathServer",
736
+ resolveModel: "ModelResolver.resolve",
737
+ serverFetch: "graalFetch",
738
+ formatValue: "NumberUtil.formatValue",
739
+ parseToNumber: "NumberUtil.parseToNumber",
740
+ parseNumberToString: "NumberUtil.parseNumberToString"
741
+ };
42
742
  function transformer(fileInfo, api, options) {
43
743
  const isFlow = fileInfo.source.includes("@flow") || fileInfo.path.endsWith(".js");
44
744
  const j = api.jscodeshift.withParser(isFlow ? "flow" : "tsx");
@@ -93,30 +793,49 @@ function transformer(fileInfo, api, options) {
93
793
  specTarget = getTargetModuleForSymbol(originalModule);
94
794
  }
95
795
  return specTarget === module2;
96
- }).map((spec) => {
796
+ }).flatMap((spec) => {
97
797
  const clonedSpec = { ...spec };
98
798
  if (clonedSpec.type === "ImportSpecifier") {
99
799
  const currentImportedName = clonedSpec.imported.name;
100
800
  if (currentImportedName && renames[currentImportedName]) {
101
801
  const newName = renames[currentImportedName];
102
- clonedSpec.imported = {
103
- ...clonedSpec.imported,
104
- name: newName
105
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
106
- };
107
- if (!clonedSpec.local || clonedSpec.local.name === currentImportedName) {
802
+ if (newName.includes(".")) {
803
+ const parts = newName.split(".");
804
+ const rootSymbol = parts[0];
805
+ const isAliased = clonedSpec.local && clonedSpec.local.name !== currentImportedName;
806
+ if (isAliased) {
807
+ return [clonedSpec];
808
+ }
809
+ clonedSpec.imported = {
810
+ ...clonedSpec.imported,
811
+ name: rootSymbol
812
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
813
+ };
108
814
  clonedSpec.local = {
109
815
  ...clonedSpec.local,
816
+ name: rootSymbol
817
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
818
+ };
819
+ } else {
820
+ clonedSpec.imported = {
821
+ ...clonedSpec.imported,
110
822
  name: newName
111
823
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
112
824
  };
825
+ if (!clonedSpec.local || clonedSpec.local.name === currentImportedName) {
826
+ clonedSpec.local = {
827
+ ...clonedSpec.local,
828
+ name: newName
829
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
830
+ };
831
+ }
113
832
  }
114
833
  }
115
834
  }
116
835
  if (node.importKind && !clonedSpec.importKind) {
117
836
  clonedSpec.importKind = node.importKind;
118
837
  }
119
- return clonedSpec;
838
+ return [clonedSpec];
120
839
  });
121
840
  const newImport = j.importDeclaration(specifiers, j.literal(module2));
122
841
  const firstKind = specifiers[0]?.importKind;
@@ -148,6 +867,39 @@ function transformer(fileInfo, api, options) {
148
867
  }
149
868
  }
150
869
  });
870
+ if (node.specifiers) {
871
+ node.specifiers.forEach((spec) => {
872
+ if (spec.type === "ImportSpecifier") {
873
+ const importedName = spec.imported.name;
874
+ const localName = spec.local.name;
875
+ if (importedName && localName && renames[importedName] && importedName === localName) {
876
+ const newName = renames[importedName];
877
+ root.find(j.Identifier, { name: localName }).filter((path) => {
878
+ const parent = path.parent.node;
879
+ if (j.ImportSpecifier.check(parent) || j.ImportDefaultSpecifier.check(parent) || j.ImportNamespaceSpecifier.check(parent)) {
880
+ return false;
881
+ }
882
+ if (j.MemberExpression.check(parent) && parent.property === path.node && !parent.computed) {
883
+ return false;
884
+ }
885
+ if (j.Property.check(parent) && parent.key === path.node && !parent.shorthand && !parent.computed) {
886
+ return false;
887
+ }
888
+ return true;
889
+ }).replaceWith(() => {
890
+ if (newName.includes(".")) {
891
+ const [object, property] = newName.split(".");
892
+ return j.memberExpression(
893
+ j.identifier(object),
894
+ j.identifier(property)
895
+ );
896
+ }
897
+ return j.identifier(newName);
898
+ });
899
+ }
900
+ }
901
+ });
902
+ }
151
903
  });
152
904
  const mergedImports = /* @__PURE__ */ new Map();
153
905
  const firstOccurrence = /* @__PURE__ */ new Map();