eslint-plugin-use-agnostic 1.6.8 → 1.6.10

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.
@@ -11,6 +11,11 @@ import {
11
11
  USE_AGNOSTIC_CONDITIONS as COMMONS_USE_AGNOSTIC_CONDITIONS,
12
12
  USE_AGNOSTIC_STRATEGIES as COMMONS_USE_AGNOSTIC_STRATEGIES,
13
13
  } from "../../../_commons/constants/bases.js";
14
+ import {
15
+ USE_SERVER,
16
+ USE_CLIENT,
17
+ USE_AGNOSTIC,
18
+ } from "../../../agnostic20/_commons/constants/bases.js";
14
19
 
15
20
  import { makeIntroForSpecificViolationMessage } from "../../../_commons/utilities/helpers.js";
16
21
 
@@ -129,6 +134,10 @@ export const importedFileCommentedDirective = "importedFileCommentedDirective";
129
134
  export const commentedDirectiveMessage = "commentedDirectiveMessage";
130
135
  export const specificViolationMessage = "specificViolationMessage";
131
136
  export const specificFailure = "specificFailure";
137
+ export const verifiedCommentedDirective = "verifiedCommentedDirective";
138
+ export const expectedReactDirectiveAsText = "expectedReactDirectiveAsText";
139
+ export const currentFileEnvironment = "currentFileEnvironment";
140
+ export const importedFileEnvironment = "importedFileEnvironment";
132
141
 
133
142
  /* commentedDirectives_verificationReports */
134
143
 
@@ -155,12 +164,12 @@ export const commentedDirectives_verificationReports = Object.freeze({
155
164
  /* commentedDirectives_blockedImports */
156
165
 
157
166
  /**
158
- * Makes a blockedImport object for the identified blocked import at hand.
167
+ * $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#MAKEBLOCKEDIMPORT
159
168
  * @template {CommentedDirectiveWithoutUseAgnosticStrategies} T
160
169
  * @template {CommentedDirectiveWithoutUseAgnosticStrategies} U
161
- * @param {T} currentFileCommentedDirective The current file's commented directive.
162
- * @param {U} importedFileCommentedDirective The imported file's commented directive.
163
- * @returns The blockedImport object for the identified blocked import at hand.
170
+ * @param {T} currentFileCommentedDirective $COMMENT#JSDOC#PARAMS#DIRECTIVE21#CURRENTFILECOMMENTEDDIRECTIVE
171
+ * @param {U} importedFileCommentedDirective $COMMENT#JSDOC#PARAMS#DIRECTIVE21#IMPORTEDFILECOMMENTEDDIRECTIVE
172
+ * @returns $COMMENT#JSDOC#RETURNS#AGNOSTIC20#MAKEBLOCKEDIMPORT
164
173
  */
165
174
  export const makeBlockedImport = (
166
175
  currentFileCommentedDirective,
@@ -181,189 +190,229 @@ export const makeBlockedImport = (
181
190
 
182
191
  export const commentedDirectives_blockedImports = Object.freeze({
183
192
  [USE_SERVER_LOGICS]: Object.freeze([
184
- // USE_SERVER_LOGICS allowed, because Prime Server Logics can compose with one another.
193
+ // USE_SERVER_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_SERVER_LOGICS
185
194
  makeBlockedImport(
186
195
  USE_SERVER_LOGICS,
187
196
  USE_CLIENT_LOGICS
188
- ) /* Prime Client Logics should never leak to the server. */,
189
- // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics can run safely on the server just like they can on the client.
190
- // USE_SERVER_COMPONENTS allowed, because Lineal Server Components are OK to be composed with Prime Server Logics as long as the Prime Server Logics Module, by convention, does not export React components.
197
+ ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#CLIENTNEVERSERVER */,
198
+ // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCANSERVERCLIENT
199
+ // USE_SERVER_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_SERVER_COMPONENTS
191
200
  makeBlockedImport(
192
201
  USE_SERVER_LOGICS,
193
202
  USE_CLIENT_COMPONENTS
194
- ) /* Lineal Client Components, like any Client Components, cannot be tinkered with on the server. */,
195
- // USE_AGNOSTIC_COMPONENTS allowed, because Lineal Agnostic Components can be composed with any Prime Environment Logics agnostically, as long as the Prime Environment Logics Module, by convention, does not export React components.
196
- // USE_SERVER_FUNCTIONS allowed, because (Special) Server Functions, being able to import one another, can compose and do so via Prime Server Logics, despite this method seeming superfluous at first glance. (Perhaps a preferrable use case for this has been found or could be found either today or in the future.)
203
+ ) /* $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_CLIENT_COMPONENTS */,
204
+ // USE_AGNOSTIC_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCOMPONENTSCANANY
205
+ // USE_SERVER_FUNCTIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_SERVER_FUNCTIONS
197
206
  makeBlockedImport(
198
207
  USE_SERVER_LOGICS,
199
208
  USE_CLIENT_CONTEXTS
200
- ) /* (Special) Client Contexts Components, like any Client Components, cannot be tinkered with on the server. */,
201
- // USE_AGNOSTIC_CONDITIONS allowed, because (Special) Agnostic Conditions Components are able to safely render on the server, guaranteeing that only their `ComponentForServer` will be effectively involved in Prime Server Logics Modules.
209
+ ) /* $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_CLIENT_CONTEXTS */,
210
+ // USE_AGNOSTIC_CONDITIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_AGNOSTIC_CONDITIONS
202
211
  ]),
203
212
  [USE_CLIENT_LOGICS]: Object.freeze([
204
213
  makeBlockedImport(
205
214
  USE_CLIENT_LOGICS,
206
215
  USE_SERVER_LOGICS
207
- ) /* Prime Server Logics should never leak to the client. */,
208
- // USE_CLIENT_LOGICS allowed, because Prime Client Logics can compose with one another.
209
- // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics can run safely on the client just like they can on the server.
216
+ ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#SERVERNEVERCLIENT */,
217
+ // USE_CLIENT_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#USE_CLIENT_LOGICS
218
+ // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCANCLIENTSERVER
210
219
  makeBlockedImport(
211
220
  USE_CLIENT_LOGICS,
212
221
  USE_SERVER_COMPONENTS
213
- ) /* Lineal Server Components cannot be tinkered with on the client. */,
214
- // USE_CLIENT_COMPONENTS allowed, because Prime Client Logics, like any Client Components, are OK to be composed with Prime Client Logics as long as the Prime Client Logics Module, by convention, does not export React components.
215
- // USE_AGNOSTIC_COMPONENTS allowed, because Lineal Agnostic Components can be composed with any Prime Environment Logics agnostically, as long as the Prime Environment Logics Module, by convention, does not export React components.
216
- // USE_SERVER_FUNCTIONS allowed, because (Special) Server Functions can technically be attached to any Client Components that are being tinkered with within Client Logics Modules.
217
- // USE_CLIENT_CONTEXTS allowed, because (Special) Client Contexts Components, like any Client Components, are OK to be composed with Prime Client Logics as long as the Prime Client Logics Module, by convention, does not export React components.
218
- // USE_AGNOSTIC_CONDITIONS allowed, because (Special) Agnostic Conditions Components are able to safely render on the client, guaranteeing that only their `ComponentForClient` will be effectively involved in Prime Client Logics Modules.
222
+ ) /* $COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#USE_SERVER_COMPONENTS */,
223
+ // USE_CLIENT_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#USE_CLIENT_COMPONENTS
224
+ // USE_AGNOSTIC_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCOMPONENTSCANANY
225
+ // USE_SERVER_FUNCTIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#USE_SERVER_FUNCTIONS
226
+ // USE_CLIENT_CONTEXTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#USE_CLIENT_CONTEXTS
227
+ // USE_AGNOSTIC_CONDITIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#USE_AGNOSTIC_CONDITIONS
219
228
  ]),
220
229
  [USE_AGNOSTIC_LOGICS]: Object.freeze([
221
230
  makeBlockedImport(
222
231
  USE_AGNOSTIC_LOGICS,
223
232
  USE_SERVER_LOGICS
224
- ) /* Prime Server Logics cannot run on both the server and the client. */,
233
+ ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#SERVERLOGICSCANTBOTH */,
225
234
  makeBlockedImport(
226
235
  USE_AGNOSTIC_LOGICS,
227
236
  USE_CLIENT_LOGICS
228
- ) /* Prime Client Logics cannot run on both the server and the client. */,
229
- // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics can compose with one another.
237
+ ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#CLIENTLOGICSCANTBOTH */,
238
+ // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_LOGICS#USE_AGNOSTIC_LOGICS
230
239
  makeBlockedImport(
231
240
  USE_AGNOSTIC_LOGICS,
232
241
  USE_SERVER_COMPONENTS
233
- ) /* Lineal Server Components cannot be tinkered with on both the server and the client. */,
242
+ ) /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_LOGICS#USE_SERVER_COMPONENTS */,
234
243
  makeBlockedImport(
235
244
  USE_AGNOSTIC_LOGICS,
236
245
  USE_CLIENT_COMPONENTS
237
- ) /* Lineal Client Components, like any Client Components, cannot be tinkered with on both the server and the client. */,
238
- // USE_AGNOSTIC_COMPONENTS allowed, because Lineal Agnostic Components can be composed with any Prime Environment Logics agnostically, as long as the Prime Environment Logics Module, by convention, does not export React components.
246
+ ) /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_LOGICS#USE_CLIENT_COMPONENTS */,
247
+ // USE_AGNOSTIC_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCOMPONENTSCANANY
239
248
  makeBlockedImport(
240
249
  USE_AGNOSTIC_LOGICS,
241
250
  USE_SERVER_FUNCTIONS
242
- ) /* (Special) Server Functions can be modified on the server and on the client, but their use cases on both environments are not one-to-one compatible, since they're being addressed as they are on the server and addressed as references on the client. */,
251
+ ) /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_LOGICS#USE_SERVER_FUNCTIONS */,
243
252
  makeBlockedImport(
244
253
  USE_AGNOSTIC_LOGICS,
245
254
  USE_CLIENT_CONTEXTS
246
- ) /* (Special) Client Contexts Components, like any Client Components, cannot be tinkered with on both the server and the client. */,
247
- // USE_AGNOSTIC_CONDITIONS allowed, because (Special) Agnostic Conditions Components, as if they were Lineal Agnostic Components themselves, can be composed with any Prime Environment Logics agnostically, as long as the Prime Environment Logics Module, by convention, does not export React components.
255
+ ) /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_LOGICS#USE_CLIENT_CONTEXTS */,
256
+ // USE_AGNOSTIC_CONDITIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_LOGICS#USE_AGNOSTIC_CONDITIONS
248
257
  ]),
249
258
  [USE_SERVER_COMPONENTS]: Object.freeze([
250
- // USE_SERVER_LOGICS allowed, because Prime Server Logics, being logic from the server, can safely support Lineal Server Components.
259
+ // USE_SERVER_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_COMPONENTS#USE_SERVER_LOGICS
251
260
  makeBlockedImport(
252
261
  USE_SERVER_COMPONENTS,
253
262
  USE_CLIENT_LOGICS
254
- ) /* Prime Client Logics should never leak to the server. */,
255
- // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics can run safely on the server just like they can on the client.
256
- // USE_SERVER_COMPONENTS allowed, because Lineal Server Components can compose with one another, now that thanks to the inclusion of Agnostic Components they are actual Server Components.
257
- // USE_CLIENT_COMPONENTS allowed, because Lineal Client Components can be nested inside Lineal Server Components to create client boundaries when the root of the application is planted on the server.
258
- // USE_AGNOSTIC_COMPONENTS allowed, because Lineal Agnostic Components can render safely on the server just like they can on the client.
259
- // USE_SERVER_FUNCTIONS allowed, because (Special) Server Functions can be passed to imported Client Components within Lineal Server Components Modules, even though indeed Lineal Server Components Modules and Lineal Server Components can make their own Server Functions through inline `'use server'` directives.
260
- // USE_CLIENT_CONTEXTS allowed, because (Special) Client Contexts Components can be nested inside Lineal Server Components to wrap some of the tree with client state accessible through child Client Components, and to pass through Server Components when the root of the application is planted on the server.
261
- // USE_AGNOSTIC_CONDITIONS allowed, because (Special) Agnostic Conditions Components, as if they were Lineal Agnostic Components themselves, can render safely on the server just like they can on the client.
263
+ ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#CLIENTNEVERSERVER */,
264
+ // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCANSERVERCLIENT
265
+ // USE_SERVER_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_COMPONENTS#USE_SERVER_COMPONENTS
266
+ // USE_CLIENT_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_COMPONENTS#USE_CLIENT_COMPONENTS
267
+ // USE_AGNOSTIC_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_COMPONENTS#USE_AGNOSTIC_COMPONENTS
268
+ // USE_SERVER_FUNCTIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_COMPONENTS#USE_SERVER_FUNCTIONS
269
+ // USE_CLIENT_CONTEXTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_COMPONENTS#USE_CLIENT_CONTEXTS
270
+ // USE_AGNOSTIC_CONDITIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_COMPONENTS#USE_AGNOSTIC_CONDITIONS
262
271
  ]),
263
272
  [USE_CLIENT_COMPONENTS]: Object.freeze([
264
273
  makeBlockedImport(
265
274
  USE_CLIENT_COMPONENTS,
266
275
  USE_SERVER_LOGICS
267
- ) /* Prime Server Logics should never leak to the client. */,
268
- // USE_CLIENT_LOGICS allowed, because Prime Client Logics, being logic from the client, can safely support Lineal Client Components, like any Client Components.
269
- // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics can run safely on the client just like they can on the server.
276
+ ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#SERVERNEVERCLIENT */,
277
+ // USE_CLIENT_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_COMPONENTS#USE_CLIENT_LOGICS
278
+ // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCANCLIENTSERVER
270
279
  makeBlockedImport(
271
280
  USE_CLIENT_COMPONENTS,
272
281
  USE_SERVER_COMPONENTS
273
- ) /* Lineal Server Components cannot be the children of Lineal Client Components. */,
274
- // USE_CLIENT_COMPONENTS allowed, because Lineal Client Components can compose with one another.
275
- // USE_AGNOSTIC_COMPONENTS allowed, because Lineal Agnostic Components can render safely on the client just like they can on the server.
276
- // USE_SERVER_FUNCTIONS allowed, because (Special) Server Functions can be specifically triggered by Client Components.
277
- // USE_CLIENT_CONTEXTS allowed, because (Special) Client Contexts Components can effectively become Lineal and only render their children on the client via this mechanism since, by a Client Contexts Component being the child of a Lineal Client Component, the Client Contexts Component's children become the grandchildren of an ancestor Lineal Client Component, enforcing them to render exclusively on the client.
278
- // USE_AGNOSTIC_CONDITIONS allowed, because (Special) Agnostic Conditions Components, as if they were Lineal Agnostic Components themselves, can render safely on the client just like they can on the server.
282
+ ) /* $COMMENT#DIRECTIVE21#USE_CLIENT_COMPONENTS#USE_SERVER_COMPONENTS */,
283
+ // USE_CLIENT_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_COMPONENTS#USE_CLIENT_COMPONENTS
284
+ // USE_AGNOSTIC_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCOMPONENTSRENDERANY
285
+ // USE_SERVER_FUNCTIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#SERVERFUNCTIONSCLIENT
286
+ // USE_CLIENT_CONTEXTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_COMPONENTS#USE_CLIENT_CONTEXTS
287
+ // USE_AGNOSTIC_CONDITIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_COMPONENTS#USE_AGNOSTIC_CONDITIONS
279
288
  ]),
280
289
  [USE_AGNOSTIC_COMPONENTS]: Object.freeze([
281
290
  makeBlockedImport(
282
291
  USE_AGNOSTIC_COMPONENTS,
283
292
  USE_SERVER_LOGICS
284
- ) /* Prime Server Logics cannot run on both the server and the client. */,
293
+ ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#SERVERLOGICSCANTBOTH */,
285
294
  makeBlockedImport(
286
295
  USE_AGNOSTIC_COMPONENTS,
287
296
  USE_CLIENT_LOGICS
288
- ) /* Prime Client Logics cannot run on both the server and the client. */,
289
- // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics, being environment-agnostic logic, can safely support any Agnostic Components.
297
+ ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#CLIENTLOGICSCANTBOTH */,
298
+ // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_COMPONENTS#USE_AGNOSTIC_LOGICS
290
299
  makeBlockedImport(
291
300
  USE_AGNOSTIC_COMPONENTS,
292
301
  USE_SERVER_COMPONENTS
293
- ) /* Lineal Server Components, unlike Lineal Client Components, cannot make silos of their own once on the opposing environment (the client in this case), and therefore cannot be executed from the client, making them unable to execute agnostically from both the server and the client. */,
294
- // USE_CLIENT_COMPONENTS allowed, because Lineal Client Components can be nested inside Lineal Agnostic Components to create client boundaries when the root of the application is planted on the server.
295
- // USE_AGNOSTIC_COMPONENTS allowed, because Lineal Agnostic Components can compose with one another.
296
- // USE_SERVER_FUNCTIONS allowed, because (Special) Server Functions can be passed to Client Components as props when Client Components are also legally imported into Agnostic Components Modules.
297
- // USE_CLIENT_CONTEXTS allowed, because (Special) Client Contexts Components can be nested inside Lineal Agnostic Components to wrap some of the tree with client state accessible through child Client Components, and to pass through Server Components — if still on the Server Tree — when the root of the application is planted on the server.
298
- // USE_AGNOSTIC_CONDITIONS allowed, because (Special) Agnostic Conditions Components can compose with Lineal Agnostic Components as if they were Lineal Agnostic Components themselves, making them a necessary mechanism for Lineal Server Components to be nested in any Agnostic Components.
302
+ ) /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_COMPONENTS#USE_SERVER_COMPONENTS */,
303
+ // USE_CLIENT_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_COMPONENTS#USE_CLIENT_COMPONENTS
304
+ // USE_AGNOSTIC_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_COMPONENTS#USE_AGNOSTIC_COMPONENTS
305
+ // USE_SERVER_FUNCTIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_COMPONENTS#USE_SERVER_FUNCTIONS
306
+ // USE_CLIENT_CONTEXTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_COMPONENTS#USE_CLIENT_CONTEXTS
307
+ // USE_AGNOSTIC_CONDITIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_COMPONENTS#USE_AGNOSTIC_CONDITIONS
299
308
  ]),
300
309
  [USE_SERVER_FUNCTIONS]: Object.freeze([
301
- // USE_SERVER_LOGICS allowed, because Prime Server Logics, being logic from the server, can safely support (Special) Server Functions.
310
+ // USE_SERVER_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_FUNCTIONS#USE_SERVER_LOGICS
302
311
  makeBlockedImport(
303
312
  USE_SERVER_FUNCTIONS,
304
313
  USE_CLIENT_LOGICS
305
- ) /* Prime Client Logics should never leak to the server. */,
306
- // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics can run safely on the server just like they can on the client.
314
+ ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#CLIENTNEVERSERVER */,
315
+ // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCANSERVERCLIENT
307
316
  makeBlockedImport(
308
317
  USE_SERVER_FUNCTIONS,
309
318
  USE_SERVER_COMPONENTS
310
- ) /* Lineal Server Components aren't allowed because (Special) Server Functions have no business working with React Components. */,
319
+ ) /* $COMMENT#DIRECTIVE21#USE_SERVER_FUNCTIONS#USE_SERVER_COMPONENTS */,
311
320
  makeBlockedImport(
312
321
  USE_SERVER_FUNCTIONS,
313
322
  USE_CLIENT_COMPONENTS
314
- ) /* Lineal Client Components aren't allowed because (Special) Server Functions have no business working with React Components. */,
323
+ ) /* $COMMENT#DIRECTIVE21#USE_SERVER_FUNCTIONS#USE_CLIENT_COMPONENTS */,
315
324
  makeBlockedImport(
316
325
  USE_SERVER_FUNCTIONS,
317
326
  USE_AGNOSTIC_COMPONENTS
318
- ) /* Lineal Agnostic Components aren't allowed because (Special) Server Functions have no business working with React Components. */,
319
- // USE_SERVER_FUNCTIONS allowed, because (Special) Server Functions, even though they don't need to import one another and the same results can be generated via Prime Server Logics for the outcome of a single Server Function, can still compose with one another. (Perhaps a preferrable use case for this has been found or could be found either today or in the future.)
327
+ ) /* $COMMENT#DIRECTIVE21#USE_SERVER_FUNCTIONS#USE_AGNOSTIC_COMPONENTS */,
328
+ // USE_SERVER_FUNCTIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_FUNCTIONS#USE_SERVER_FUNCTIONS
320
329
  makeBlockedImport(
321
330
  USE_SERVER_FUNCTIONS,
322
331
  USE_CLIENT_CONTEXTS
323
- ) /* (Special) Client Contexts Components aren't allowed because (Special) Server Functions have no business working with React Components. */,
332
+ ) /* $COMMENT#DIRECTIVE21#USE_SERVER_FUNCTIONS#USE_CLIENT_CONTEXTS */,
324
333
  makeBlockedImport(
325
334
  USE_SERVER_FUNCTIONS,
326
335
  USE_AGNOSTIC_CONDITIONS
327
- ) /* (Special) Agnostic Conditions Components aren't allowed because (Special) Server Functions have no business working with React Components. */,
336
+ ) /* $COMMENT#DIRECTIVE21#USE_SERVER_FUNCTIONS#USE_AGNOSTIC_CONDITIONS */,
328
337
  ]),
329
338
  [USE_CLIENT_CONTEXTS]: Object.freeze([
330
339
  makeBlockedImport(
331
340
  USE_CLIENT_CONTEXTS,
332
341
  USE_SERVER_LOGICS
333
- ) /* Prime Server Logics should never leak to the client. */,
334
- // USE_CLIENT_LOGICS allowed, because Prime Client Logics, being logic from the client, can safely support (Special) Client Contexts Components, like any Client Components.
335
- // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics can run safely on the client just like they can on the server.
342
+ ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#SERVERNEVERCLIENT */,
343
+ // USE_CLIENT_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_CONTEXTS#USE_CLIENT_LOGICS
344
+ // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCANCLIENTSERVER
336
345
  makeBlockedImport(
337
346
  USE_CLIENT_CONTEXTS,
338
347
  USE_SERVER_COMPONENTS
339
- ) /* Lineal Server Components may only pass through (Special) Client Contexts Components via the children prop within Server Components Modules. */,
340
- // USE_CLIENT_COMPONENTS allowed, because Lineal Client Components can create client boundaries within (Special) Client Contexts Components.
341
- // USE_AGNOSTIC_COMPONENTS allowed, because Lineal Agnostic Components can render safely on the client just like they can on the server.
342
- // USE_SERVER_FUNCTIONS allowed, because (Special) Server Functions can be specifically triggered by Client Components.
343
- // USE_CLIENT_CONTEXTS allowed, because (Special) Client Contexts Components can compose with one another.
344
- // USE_AGNOSTIC_CONDITIONS allowed, because (Special) Agnostic Conditions Components, as if they were Lineal Agnostic Components themselves, can render safely on the client just like they can on the server, in a mechanism that allows Client Contexts Components to safely and indirectly compose with child Server Components within Client Contexts Modules.
348
+ ) /* $COMMENT#DIRECTIVE21#USE_CLIENT_CONTEXTS#USE_SERVER_COMPONENTS */,
349
+ // USE_CLIENT_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_CONTEXTS#USE_CLIENT_COMPONENTS
350
+ // USE_AGNOSTIC_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCOMPONENTSRENDERANY
351
+ // USE_SERVER_FUNCTIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#SERVERFUNCTIONSCLIENT
352
+ // USE_CLIENT_CONTEXTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_CONTEXTS#USE_CLIENT_CONTEXTS
353
+ // USE_AGNOSTIC_CONDITIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_CONTEXTS#USE_AGNOSTIC_CONDITIONS
345
354
  ]),
346
355
  [USE_AGNOSTIC_CONDITIONS]: Object.freeze([
347
356
  makeBlockedImport(
348
357
  USE_AGNOSTIC_CONDITIONS,
349
358
  USE_SERVER_LOGICS
350
- ) /* Prime Server Logics cannot run on both the server and the client. */,
359
+ ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#SERVERLOGICSCANTBOTH */,
351
360
  makeBlockedImport(
352
361
  USE_AGNOSTIC_CONDITIONS,
353
362
  USE_CLIENT_LOGICS
354
- ) /* Prime Client Logics cannot run on both the server and the client. */,
355
- // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics, being environment-agnostic logic, can safely support any Agnostic Components, including (Special) Agnostic Conditions Components. (In this case this is necessary for the import of the `conditionAgnosticComponent` function needed to make Agnostic Conditions Components.)
356
- // USE_SERVER_COMPONENTS allowed, because Lineal Server Components are to be paired as `ComponentForServer` components with `ComponentForClient` components to form (Special) Agnostic Conditions Components.
357
- // USE_CLIENT_COMPONENTS allowed, because Lineal Client Components are to be paired as `ComponentForClient` components with `ComponentForServer` components to form (Special) Agnostic Conditions Components.
358
- // USE_AGNOSTIC_COMPONENTS allowed, because Lineal Agnostic Components can take the place of `ComponentForServer` and/or `ComponentForClient` components to form (Special) Agnostic Conditions Components.
363
+ ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#CLIENTLOGICSCANTBOTH */,
364
+ // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_AGNOSTIC_LOGICS
365
+ // USE_SERVER_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_SERVER_COMPONENTS
366
+ // USE_CLIENT_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_CLIENT_COMPONENTS
367
+ // USE_AGNOSTIC_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_AGNOSTIC_COMPONENTS
359
368
  makeBlockedImport(
360
369
  USE_AGNOSTIC_CONDITIONS,
361
370
  USE_SERVER_FUNCTIONS
362
- ) /* (Special) Server Functions are not accepted because (Special) Agnostic Conditions Components only take finite, imported components as arguments in their making. As such, assigning props to these components, including Server Functions, is not made within Agnostic Conditions Modules. */,
371
+ ) /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_SERVER_FUNCTIONS */,
363
372
  makeBlockedImport(
364
373
  USE_AGNOSTIC_CONDITIONS,
365
374
  USE_CLIENT_CONTEXTS
366
- ) /* (Special) Client Contexts Components cannot be used as component arguments for (Special) Agnostic Conditions Components since they only take Lineal Components as arguments in their making. */,
367
- // USE_AGNOSTIC_CONDITIONS allowed, because (Special) Agnostic Conditions Components, despite not being Lineal Components themselves, output components that can only be Lineal and compatible with their attributed rendering environments, making them acceptable arguments in the making of Agnostic Conditions Components.
375
+ ) /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_CLIENT_CONTEXTS */,
376
+ // USE_AGNOSTIC_CONDITIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_AGNOSTIC_CONDITIONS
368
377
  ]),
369
378
  });
379
+
380
+ /* environments_allowedChainedImportEnvironments */
381
+
382
+ export const SERVER = "server";
383
+ export const CLIENT = "client";
384
+ export const AGNOSTIC = "agnostic";
385
+
386
+ /** @type {readonly [typeof SERVER, typeof AGNOSTIC]} */
387
+ const server_allowedChainImportEnvironments = Object.freeze([SERVER, AGNOSTIC]);
388
+ /** @type {readonly [typeof CLIENT, typeof AGNOSTIC]} */
389
+ const client_allowedChainImportEnvironments = Object.freeze([CLIENT, AGNOSTIC]);
390
+ /** @type {readonly [typeof AGNOSTIC]} */
391
+ const agnostic_allowedChainImportEnvironments = Object.freeze([AGNOSTIC]);
392
+
393
+ export const environments_allowedChainImportEnvironments = Object.freeze({
394
+ [SERVER]: server_allowedChainImportEnvironments,
395
+ [CLIENT]: client_allowedChainImportEnvironments,
396
+ [AGNOSTIC]: agnostic_allowedChainImportEnvironments,
397
+ });
398
+
399
+ export const commentedDirectives_reactDirectives = Object.freeze({
400
+ [USE_SERVER_LOGICS]: null,
401
+ [USE_CLIENT_LOGICS]: "use client",
402
+ [USE_AGNOSTIC_LOGICS]: "use agnostic",
403
+ [USE_SERVER_COMPONENTS]: null,
404
+ [USE_CLIENT_COMPONENTS]: "use client",
405
+ [USE_AGNOSTIC_COMPONENTS]: "use agnostic",
406
+ [USE_SERVER_FUNCTIONS]: "use server",
407
+ [USE_CLIENT_CONTEXTS]: "use client",
408
+ [USE_AGNOSTIC_CONDITIONS]: null,
409
+ [USE_AGNOSTIC_STRATEGIES]: null,
410
+ });
411
+
412
+ /** @type {Map<typeof USE_SERVER | typeof USE_CLIENT | typeof USE_AGNOSTIC | null, `the React "${typeof USE_SERVER}"` | `the React "${typeof USE_CLIENT}"` | `the React "${typeof USE_AGNOSTIC}"` | "no React" `>} */
413
+ export const reactDirectives_asTexts = new Map([
414
+ [USE_SERVER, `the React "${USE_SERVER}"`],
415
+ [USE_CLIENT, `the React "${USE_CLIENT}"`],
416
+ [USE_AGNOSTIC, `the React "${USE_AGNOSTIC}"`],
417
+ [null, "no React"],
418
+ ]);
@@ -1,10 +1,12 @@
1
1
  import {
2
2
  reExportNotSameMessageId,
3
3
  importBreaksCommentedImportRulesMessageId,
4
- noCommentedDirective,
5
- commentedDirectiveVerificationFailed,
6
- importNotStrategized,
7
- exportNotStrategized,
4
+ noCommentedDirectiveMessageId,
5
+ commentedDirectiveVerificationFailedMessageId,
6
+ commentedDirectiveReactDirectiveFailedMessageId,
7
+ importNotStrategizedMessageId,
8
+ exportNotStrategizedMessageId,
9
+ cantChainImportAcrossEnvironmentsMessageId,
8
10
  } from "../../../_commons/constants/bases.js";
9
11
  import {
10
12
  currentFileCommentedDirective,
@@ -12,6 +14,10 @@ import {
12
14
  commentedDirectiveMessage,
13
15
  specificViolationMessage,
14
16
  specificFailure,
17
+ verifiedCommentedDirective,
18
+ expectedReactDirectiveAsText,
19
+ currentFileEnvironment,
20
+ importedFileEnvironment,
15
21
  } from "../constants/bases.js";
16
22
 
17
23
  import {
@@ -38,14 +44,16 @@ const rule = {
38
44
  Here, "{{ ${currentFileCommentedDirective} }}" and "{{ ${importedFileCommentedDirective} }}" are not the same. Please re-export only from modules that have the same commented directive as the current module. `,
39
45
  [importBreaksCommentedImportRulesMessageId]: `{{ ${commentedDirectiveMessage} }}
40
46
  In this case, {{ ${specificViolationMessage} }} `,
41
- [noCommentedDirective]: `No commented directive detected.
47
+ [noCommentedDirectiveMessageId]: `No commented directive detected.
42
48
  All targeted modules need to be marked with their respective directives (\`// "use server logics"\`, etc.) for the purpose of this linting rule, evaluated from the first JavaScript comment starting on the first column within the first three lines of a module. `,
43
- [commentedDirectiveVerificationFailed]: `The commented directive could not pass verification due to an incompatible combination with its file extension.
49
+ [commentedDirectiveVerificationFailedMessageId]: `The commented directive could not pass verification due to an incompatible combination with its file extension.
44
50
  In this context, {{ ${specificFailure} }} `,
45
- [importNotStrategized]: `Imports from Agnostic Strategies Modules must be strategized (\`/* @serverLogics */\`, etc.).
51
+ [commentedDirectiveReactDirectiveFailedMessageId]: `Commented directive "{{ ${verifiedCommentedDirective} }}" requires {{ ${expectedReactDirectiveAsText} }} directive in order to communicate accordingly with the React architecture at hand. `,
52
+ [importNotStrategizedMessageId]: `Imports from Agnostic Strategies Modules must be strategized (\`/* @serverLogics */\`, etc.).
46
53
  Please include a Strategy that corresponds to the kind of module this import would be mapped to. `,
47
- [exportNotStrategized]: `Exports from Agnostic Strategies Modules must be strategized (\`/* @serverLogics */\`, etc.).
54
+ [exportNotStrategizedMessageId]: `Exports from Agnostic Strategies Modules must be strategized (\`/* @serverLogics */\`, etc.).
48
55
  Please include a Strategy that corresponds to the kind of module this export would be mapped to. `,
56
+ [cantChainImportAcrossEnvironmentsMessageId]: `Because imports are actually references instead of modules across environments, it is not possible to chain-import between the {{ ${currentFileEnvironment} }} environment and the {{ ${importedFileEnvironment} }} environment. In these cases, only direct imports apply. `,
49
57
  },
50
58
  },
51
59
  create: (context) => {
@@ -0,0 +1,100 @@
1
+ /**
2
+ * @typedef {import("../../../../types/_commons/typedefs.js").SourceCode} SourceCode
3
+ * @typedef {import("../../../../types/_commons/typedefs.js").ImportDeclaration} ImportDeclaration
4
+ * @typedef {import("../../../../types/_commons/typedefs.js").ExportAllDeclaration} ExportAllDeclaration
5
+ * @typedef {import("../../../../types/_commons/typedefs.js").ExportNamedDeclarationWithSource} ExportNamedDeclarationWithSource
6
+ * @typedef {import("../../../../types/_commons/typedefs.js").ExportNamedDeclarationWithoutSourceWithMultiple} ExportNamedDeclarationWithoutSourceWithMultiple
7
+ * @typedef {import("../../../../types/_commons/typedefs.js").ExportNamedDeclarationWithoutSourceWithSingle} ExportNamedDeclarationWithoutSourceWithSingle
8
+ * @typedef {import("../../../../types/_commons/typedefs.js").ExportDefaultDeclaration} ExportDefaultDeclaration
9
+ */
10
+
11
+ import { walkAST } from "../../../_commons/utilities/walk-ast.js";
12
+
13
+ /**
14
+ * Analyzes a source code exports to detect re-exports.
15
+ * @param {SourceCode} sourceCode
16
+ * @returns
17
+ */
18
+ export const analyzeExportsForReExports = (sourceCode) => {
19
+ /** @type {Map<string, {source: string, importNode: ImportDeclaration}>} */
20
+ const importMap = new Map();
21
+
22
+ /** @type {{node: ExportAllDeclaration | ExportNamedDeclarationWithSource, source: string}[]} */
23
+ const reExportsWithSource = [];
24
+
25
+ /** @type {{identifier: string, node: ExportNamedDeclarationWithoutSourceWithMultiple | ExportNamedDeclarationWithoutSourceWithSingle | ExportDefaultDeclaration, importNode: ImportDeclaration, source: string}[]} */
26
+ const reExportsViaLocal = [];
27
+
28
+ walkAST(sourceCode, (node) => {
29
+ if (node.type === "ImportDeclaration") {
30
+ const moduleName = node.source?.value;
31
+ if (moduleName) {
32
+ for (const spec of node.specifiers) {
33
+ importMap.set(spec.local.name, {
34
+ source: moduleName,
35
+ importNode: node,
36
+ });
37
+ }
38
+ }
39
+ }
40
+
41
+ // works
42
+ if (
43
+ node.type === "ExportAllDeclaration" &&
44
+ node.exportKind === "value" &&
45
+ node.source
46
+ ) {
47
+ reExportsWithSource.push({ node, source: node.source.value });
48
+ }
49
+
50
+ // works
51
+ if (
52
+ node.type === "ExportNamedDeclaration" &&
53
+ node.exportKind === "value" &&
54
+ node.source
55
+ ) {
56
+ reExportsWithSource.push({ node, source: node.source.value });
57
+ }
58
+
59
+ // works
60
+ if (
61
+ node.type === "ExportNamedDeclaration" &&
62
+ node.exportKind === "value" &&
63
+ node.source === null &&
64
+ node.specifiers?.length
65
+ ) {
66
+ for (const spec of node.specifiers) {
67
+ const local = spec.local?.name;
68
+ if (importMap.has(local)) {
69
+ const info = importMap.get(local);
70
+ reExportsViaLocal.push({
71
+ identifier: local,
72
+ exportNode: node,
73
+ importNode: info.importNode,
74
+ source: info.source,
75
+ });
76
+ }
77
+ }
78
+ }
79
+
80
+ // works
81
+ if (
82
+ node.type === "ExportDefaultDeclaration" &&
83
+ node.exportKind === "value" &&
84
+ node.declaration.type === "Identifier"
85
+ ) {
86
+ const name = node.declaration.name;
87
+ if (importMap.has(name)) {
88
+ const info = importMap.get(name);
89
+ reExportsViaLocal.push({
90
+ identifier: name,
91
+ exportNode: node,
92
+ importNode: info.importNode,
93
+ source: info.source,
94
+ });
95
+ }
96
+ }
97
+ });
98
+
99
+ return { reExportsWithSource, reExportsViaLocal };
100
+ };