eslint-plugin-use-agnostic 1.7.0 → 1.7.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.
|
@@ -396,6 +396,7 @@ export const environments_allowedChainImportEnvironments = Object.freeze({
|
|
|
396
396
|
[AGNOSTIC]: agnostic_allowedChainImportEnvironments,
|
|
397
397
|
});
|
|
398
398
|
|
|
399
|
+
// mapped commented directives to their React directives
|
|
399
400
|
export const commentedDirectives_reactDirectives = Object.freeze({
|
|
400
401
|
[USE_SERVER_LOGICS]: null,
|
|
401
402
|
[USE_CLIENT_LOGICS]: "use client",
|
|
@@ -409,6 +410,7 @@ export const commentedDirectives_reactDirectives = Object.freeze({
|
|
|
409
410
|
[USE_AGNOSTIC_STRATEGIES]: null,
|
|
410
411
|
});
|
|
411
412
|
|
|
413
|
+
// mapped React directives to textual needs
|
|
412
414
|
/** @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
415
|
export const reactDirectives_asTexts = new Map([
|
|
414
416
|
[USE_SERVER, `the React "${USE_SERVER}"`],
|
package/library/index.js
CHANGED
|
@@ -113,6 +113,13 @@ export {
|
|
|
113
113
|
commentedStrategiesSet,
|
|
114
114
|
// mapped commented strategies to their commented directives
|
|
115
115
|
commentedStrategies_commentedDirectives,
|
|
116
|
+
// environments
|
|
117
|
+
SERVER,
|
|
118
|
+
CLIENT,
|
|
119
|
+
AGNOSTIC,
|
|
120
|
+
environments_allowedChainImportEnvironments,
|
|
121
|
+
// mapped commented directives to their React directives
|
|
122
|
+
commentedDirectives_reactDirectives,
|
|
116
123
|
} from "./directive21/_commons/constants/bases.js";
|
|
117
124
|
|
|
118
125
|
export {
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -303,6 +303,31 @@ export const commentedStrategies_commentedDirectives: Readonly<{
|
|
|
303
303
|
[AT_AGNOSTIC_CONDITIONS]: "use agnostic conditions";
|
|
304
304
|
}>;
|
|
305
305
|
|
|
306
|
+
// environments
|
|
307
|
+
export const SERVER: "server";
|
|
308
|
+
export const CLIENT: "client";
|
|
309
|
+
export const AGNOSTIC: "agnostic";
|
|
310
|
+
|
|
311
|
+
export const environments_allowedChainImportEnvironments: Readonly<{
|
|
312
|
+
[SERVER]: readonly ["server", "agnostic"];
|
|
313
|
+
[CLIENT]: readonly ["client", "agnostic"];
|
|
314
|
+
[AGNOSTIC]: readonly ["agnostic"];
|
|
315
|
+
}>;
|
|
316
|
+
|
|
317
|
+
// mapped commented directives to their React directives
|
|
318
|
+
export const commentedDirectives_reactDirectives: Readonly<{
|
|
319
|
+
[USE_SERVER_LOGICS]: null;
|
|
320
|
+
[USE_CLIENT_LOGICS]: "use client";
|
|
321
|
+
[USE_AGNOSTIC_LOGICS]: "use agnostic";
|
|
322
|
+
[USE_SERVER_COMPONENTS]: null;
|
|
323
|
+
[USE_CLIENT_COMPONENTS]: "use client";
|
|
324
|
+
[USE_AGNOSTIC_COMPONENTS]: "use agnostic";
|
|
325
|
+
[USE_SERVER_FUNCTIONS]: "use server";
|
|
326
|
+
[USE_CLIENT_CONTEXTS]: "use client";
|
|
327
|
+
[USE_AGNOSTIC_CONDITIONS]: null;
|
|
328
|
+
[USE_AGNOSTIC_STRATEGIES]: null;
|
|
329
|
+
}>;
|
|
330
|
+
|
|
306
331
|
/**
|
|
307
332
|
* Gets the commented directive of a module from its ESLint `SourceCode` object.
|
|
308
333
|
*
|