@cfp-studio/plugin-react 17.3.4 → 17.3.6
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/index.d.mts +45 -43
- package/dist/index.mjs +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -15,8 +15,6 @@ import * as stream from "node:stream";
|
|
|
15
15
|
import { Duplex, DuplexOptions } from "node:stream";
|
|
16
16
|
import { SecureContextOptions } from "node:tls";
|
|
17
17
|
import { ZlibOptions } from "node:zlib";
|
|
18
|
-
import Lightningcss from "lightningcss";
|
|
19
|
-
import DartSass from "sass";
|
|
20
18
|
import SassEmbedded from "sass-embedded";
|
|
21
19
|
import Less from "less";
|
|
22
20
|
import Stylus from "stylus";
|
|
@@ -36,7 +34,7 @@ type FrameworkPluginInfo = {
|
|
|
36
34
|
* @returns 实现了 Api 接口的 AxiosApi 实例
|
|
37
35
|
*/
|
|
38
36
|
//#endregion
|
|
39
|
-
//#region ../../../../node_modules/.pnpm/@types+estree@1.0.
|
|
37
|
+
//#region ../../../../node_modules/.pnpm/@types+estree@1.0.8/node_modules/@types/estree/index.d.ts
|
|
40
38
|
// This definition file follows a somewhat unusual format. ESTree allows
|
|
41
39
|
// runtime type checks based on the `type` parameter. In order to explain this
|
|
42
40
|
// to typescript we want to use discriminated union types:
|
|
@@ -286,7 +284,7 @@ interface PrivateIdentifier extends BaseNode {
|
|
|
286
284
|
}
|
|
287
285
|
interface Property extends BaseNode {
|
|
288
286
|
type: "Property";
|
|
289
|
-
key: Expression;
|
|
287
|
+
key: Expression | PrivateIdentifier;
|
|
290
288
|
value: Expression | Pattern; // Could be an AssignmentProperty
|
|
291
289
|
kind: "init" | "get" | "set";
|
|
292
290
|
method: boolean;
|
|
@@ -560,7 +558,7 @@ interface AwaitExpression extends BaseExpression {
|
|
|
560
558
|
argument: Expression;
|
|
561
559
|
}
|
|
562
560
|
//#endregion
|
|
563
|
-
//#region ../../../../node_modules/.pnpm/rollup@4.
|
|
561
|
+
//#region ../../../../node_modules/.pnpm/rollup@4.52.0/node_modules/rollup/dist/rollup.d.ts
|
|
564
562
|
declare module 'estree' {
|
|
565
563
|
export interface Decorator extends BaseNode {
|
|
566
564
|
type: 'Decorator';
|
|
@@ -640,11 +638,11 @@ type DecodedSourceMapOrMissing = {
|
|
|
640
638
|
missing?: false | undefined;
|
|
641
639
|
});
|
|
642
640
|
interface SourceMap$1 {
|
|
643
|
-
file
|
|
641
|
+
file: string;
|
|
644
642
|
mappings: string;
|
|
645
643
|
names: string[];
|
|
646
644
|
sources: string[];
|
|
647
|
-
sourcesContent?:
|
|
645
|
+
sourcesContent?: string[] | undefined;
|
|
648
646
|
version: number;
|
|
649
647
|
debugId?: string | undefined;
|
|
650
648
|
toString(): string;
|
|
@@ -666,8 +664,7 @@ interface SourceDescription extends Partial<PartialNull<ModuleOptions>> {
|
|
|
666
664
|
}
|
|
667
665
|
interface TransformModuleJSON {
|
|
668
666
|
ast?: ProgramNode | undefined;
|
|
669
|
-
code: string;
|
|
670
|
-
safeVariableNames: Record<string, string> | null; // note if plugins use new this.cache to opt-out auto transform cache
|
|
667
|
+
code: string; // note if plugins use new this.cache to opt-out auto transform cache
|
|
671
668
|
customTransformCache: boolean;
|
|
672
669
|
originalCode: string;
|
|
673
670
|
originalSourcemap: ExistingDecodedSourceMap | null;
|
|
@@ -675,7 +672,6 @@ interface TransformModuleJSON {
|
|
|
675
672
|
transformDependencies: string[];
|
|
676
673
|
}
|
|
677
674
|
interface ModuleJSON extends TransformModuleJSON, ModuleOptions {
|
|
678
|
-
safeVariableNames: Record<string, string> | null;
|
|
679
675
|
ast: ProgramNode;
|
|
680
676
|
dependencies: string[];
|
|
681
677
|
id: string;
|
|
@@ -731,7 +727,6 @@ interface ModuleInfo extends ModuleOptions {
|
|
|
731
727
|
dynamicallyImportedIds: readonly string[];
|
|
732
728
|
exportedBindings: Record<string, string[]> | null;
|
|
733
729
|
exports: string[] | null;
|
|
734
|
-
safeVariableNames: Record<string, string> | null;
|
|
735
730
|
hasDefaultExport: boolean | null;
|
|
736
731
|
id: string;
|
|
737
732
|
implicitlyLoadedAfterOneOf: readonly string[];
|
|
@@ -779,7 +774,6 @@ interface PluginContext extends MinimalPluginContext$1 {
|
|
|
779
774
|
} & Partial<PartialNull<ModuleOptions>>) => Promise<ModuleInfo>;
|
|
780
775
|
parse: ParseAst;
|
|
781
776
|
resolve: (source: string, importer?: string, options?: {
|
|
782
|
-
importerAttributes?: Record<string, string>;
|
|
783
777
|
attributes?: Record<string, string>;
|
|
784
778
|
custom?: CustomPluginOptions;
|
|
785
779
|
isEntry?: boolean;
|
|
@@ -816,12 +810,10 @@ type ResolveIdResult = string | NullValue | false | PartialResolvedId;
|
|
|
816
810
|
type ResolveIdHook = (this: PluginContext, source: string, importer: string | undefined, options: {
|
|
817
811
|
attributes: Record<string, string>;
|
|
818
812
|
custom?: CustomPluginOptions;
|
|
819
|
-
importerAttributes?: Record<string, string> | undefined;
|
|
820
813
|
isEntry: boolean;
|
|
821
814
|
}) => ResolveIdResult;
|
|
822
815
|
type ShouldTransformCachedModuleHook = (this: PluginContext, options: {
|
|
823
816
|
ast: ProgramNode;
|
|
824
|
-
attributes: Record<string, string>;
|
|
825
817
|
code: string;
|
|
826
818
|
id: string;
|
|
827
819
|
meta: CustomPluginOptions;
|
|
@@ -832,12 +824,7 @@ type ShouldTransformCachedModuleHook = (this: PluginContext, options: {
|
|
|
832
824
|
type IsExternal = (source: string, importer: string | undefined, isResolved: boolean) => boolean;
|
|
833
825
|
type HasModuleSideEffects = (id: string, external: boolean) => boolean;
|
|
834
826
|
type LoadResult = SourceDescription | string | NullValue;
|
|
835
|
-
type LoadHook = (this: PluginContext, id: string
|
|
836
|
-
options?: {
|
|
837
|
-
// unused, temporarily added for better Vite type-compatibility
|
|
838
|
-
ssr?: boolean | undefined; // temporarily marked as optional for better Vite type-compatibility
|
|
839
|
-
attributes?: Record<string, string>;
|
|
840
|
-
} | undefined) => LoadResult;
|
|
827
|
+
type LoadHook = (this: PluginContext, id: string) => LoadResult;
|
|
841
828
|
interface TransformPluginContext extends PluginContext {
|
|
842
829
|
debug: LoggingFunctionWithPosition;
|
|
843
830
|
error: (error: RollupError | string, pos?: number | {
|
|
@@ -849,12 +836,7 @@ interface TransformPluginContext extends PluginContext {
|
|
|
849
836
|
warn: LoggingFunctionWithPosition;
|
|
850
837
|
}
|
|
851
838
|
type TransformResult$2 = string | NullValue | Partial<SourceDescription>;
|
|
852
|
-
type TransformHook = (this: TransformPluginContext, code: string, id: string
|
|
853
|
-
options?: {
|
|
854
|
-
// unused, temporarily added for better Vite type-compatibility
|
|
855
|
-
ssr?: boolean | undefined; // temporarily marked as optional for better Vite type-compatibility
|
|
856
|
-
attributes?: Record<string, string>;
|
|
857
|
-
} | undefined) => TransformResult$2;
|
|
839
|
+
type TransformHook = (this: TransformPluginContext, code: string, id: string) => TransformResult$2;
|
|
858
840
|
type ModuleParsedHook = (this: PluginContext, info: ModuleInfo) => void;
|
|
859
841
|
type RenderChunkHook = (this: PluginContext, code: string, chunk: RenderedChunk, options: NormalizedOutputOptions, meta: {
|
|
860
842
|
chunks: Record<string, RenderedChunk>;
|
|
@@ -864,16 +846,13 @@ type RenderChunkHook = (this: PluginContext, code: string, chunk: RenderedChunk,
|
|
|
864
846
|
} | string | NullValue;
|
|
865
847
|
type ResolveDynamicImportHook = (this: PluginContext, specifier: string | AstNode, importer: string, options: {
|
|
866
848
|
attributes: Record<string, string>;
|
|
867
|
-
importerAttributes: Record<string, string>;
|
|
868
849
|
}) => ResolveIdResult;
|
|
869
850
|
type ResolveImportMetaHook = (this: PluginContext, property: string | null, options: {
|
|
870
|
-
attributes: Record<string, string>;
|
|
871
851
|
chunkId: string;
|
|
872
852
|
format: InternalModuleFormat;
|
|
873
853
|
moduleId: string;
|
|
874
854
|
}) => string | NullValue;
|
|
875
855
|
type ResolveFileUrlHook = (this: PluginContext, options: {
|
|
876
|
-
attributes: Record<string, string>;
|
|
877
856
|
chunkId: string;
|
|
878
857
|
fileName: string;
|
|
879
858
|
format: InternalModuleFormat;
|
|
@@ -924,7 +903,6 @@ interface FunctionPluginHooks {
|
|
|
924
903
|
chunk: PreRenderedChunkWithFileName;
|
|
925
904
|
targetChunk: PreRenderedChunkWithFileName | null;
|
|
926
905
|
getTargetChunkImports: () => DynamicImportTargetChunk[] | null;
|
|
927
|
-
targetModuleAttributes: Record<string, string>;
|
|
928
906
|
}) => {
|
|
929
907
|
left: string;
|
|
930
908
|
right: string;
|
|
@@ -1340,14 +1318,16 @@ interface AwaitingEventEmitter<T extends Record<string, (...parameters: any) =>
|
|
|
1340
1318
|
off<K extends keyof T>(event: K, listener: AwaitedEventListener<T, K>): this;
|
|
1341
1319
|
/**
|
|
1342
1320
|
* Registers an event listener that will be awaited before Rollup continues.
|
|
1343
|
-
* All listeners
|
|
1344
|
-
*
|
|
1321
|
+
* All listeners will be awaited in parallel while rejections are tracked via
|
|
1322
|
+
* Promise.all.
|
|
1345
1323
|
*/
|
|
1346
1324
|
on<K extends keyof T>(event: K, listener: AwaitedEventListener<T, K>): this;
|
|
1347
1325
|
/**
|
|
1348
|
-
* Registers an event listener
|
|
1349
|
-
*
|
|
1350
|
-
*
|
|
1326
|
+
* Registers an event listener that will be awaited before Rollup continues.
|
|
1327
|
+
* All listeners will be awaited in parallel while rejections are tracked via
|
|
1328
|
+
* Promise.all.
|
|
1329
|
+
* Listeners are removed automatically when removeListenersForCurrentRun is
|
|
1330
|
+
* called, which happens automatically after each run.
|
|
1351
1331
|
*/
|
|
1352
1332
|
onCurrentRun<K extends keyof T>(event: K, listener: (...parameters: Parameters<T[K]>) => Promise<ReturnType<T[K]>>): this;
|
|
1353
1333
|
removeAllListeners(): this;
|
|
@@ -1448,7 +1428,7 @@ interface RollupFileStats {
|
|
|
1448
1428
|
birthtime: Date;
|
|
1449
1429
|
}
|
|
1450
1430
|
//#endregion
|
|
1451
|
-
//#region ../../../../node_modules/.pnpm/vite@6.4.5_@types+node@24.
|
|
1431
|
+
//#region ../../../../node_modules/.pnpm/vite@6.4.5_@types+node@24.19.2_jiti@2.7.0_less@4.2.2_lightningcss@1.30.2_sass@1.85.1_terser@5.40.0_tsx@4.19.3_yaml@2.7.0/node_modules/vite/types/hmrPayload.d.ts
|
|
1452
1432
|
type HotPayload = ConnectedPayload | PingPayload | UpdatePayload | FullReloadPayload | CustomPayload | ErrorPayload | PrunePayload;
|
|
1453
1433
|
interface ConnectedPayload {
|
|
1454
1434
|
type: 'connected';
|
|
@@ -1507,7 +1487,7 @@ interface ErrorPayload {
|
|
|
1507
1487
|
};
|
|
1508
1488
|
}
|
|
1509
1489
|
//#endregion
|
|
1510
|
-
//#region ../../../../node_modules/.pnpm/vite@6.4.5_@types+node@24.
|
|
1490
|
+
//#region ../../../../node_modules/.pnpm/vite@6.4.5_@types+node@24.19.2_jiti@2.7.0_less@4.2.2_lightningcss@1.30.2_sass@1.85.1_terser@5.40.0_tsx@4.19.3_yaml@2.7.0/node_modules/vite/types/customEvent.d.ts
|
|
1511
1491
|
interface CustomEventMap {
|
|
1512
1492
|
'vite:beforeUpdate': UpdatePayload;
|
|
1513
1493
|
'vite:afterUpdate': UpdatePayload;
|
|
@@ -1538,7 +1518,7 @@ interface InvalidatePayload {
|
|
|
1538
1518
|
*/
|
|
1539
1519
|
type InferCustomEventPayload<T extends string> = T extends keyof CustomEventMap ? CustomEventMap[T] : any;
|
|
1540
1520
|
//#endregion
|
|
1541
|
-
//#region ../../../../node_modules/.pnpm/vite@6.4.5_@types+node@24.
|
|
1521
|
+
//#region ../../../../node_modules/.pnpm/vite@6.4.5_@types+node@24.19.2_jiti@2.7.0_less@4.2.2_lightningcss@1.30.2_sass@1.85.1_terser@5.40.0_tsx@4.19.3_yaml@2.7.0/node_modules/vite/dist/node/moduleRunnerTransport.d-DJ_mE5sf.d.ts
|
|
1542
1522
|
interface FetchFunctionOptions {
|
|
1543
1523
|
cached?: boolean;
|
|
1544
1524
|
startOffset?: number;
|
|
@@ -2201,12 +2181,12 @@ declare global {
|
|
|
2201
2181
|
interface URL {}
|
|
2202
2182
|
}
|
|
2203
2183
|
//#endregion
|
|
2204
|
-
//#region ../../../../node_modules/.pnpm/vite@6.4.5_@types+node@24.
|
|
2184
|
+
//#region ../../../../node_modules/.pnpm/vite@6.4.5_@types+node@24.19.2_jiti@2.7.0_less@4.2.2_lightningcss@1.30.2_sass@1.85.1_terser@5.40.0_tsx@4.19.3_yaml@2.7.0/node_modules/vite/types/internal/lightningcssOptions.d.ts
|
|
2205
2185
|
/* eslint-enable @typescript-eslint/ban-ts-comment */
|
|
2206
2186
|
type LightningCSSOptions = Omit<Lightningcss.BundleAsyncOptions<Lightningcss.CustomAtRules>, 'filename' | 'resolver' | 'minify' | 'sourceMap' | 'analyzeDependencies' // properties not overridden by Vite, but does not make sense to set by end users
|
|
2207
2187
|
| 'inputSourceMap' | 'projectRoot'>;
|
|
2208
2188
|
//#endregion
|
|
2209
|
-
//#region ../../../../node_modules/.pnpm/vite@6.4.5_@types+node@24.
|
|
2189
|
+
//#region ../../../../node_modules/.pnpm/vite@6.4.5_@types+node@24.19.2_jiti@2.7.0_less@4.2.2_lightningcss@1.30.2_sass@1.85.1_terser@5.40.0_tsx@4.19.3_yaml@2.7.0/node_modules/vite/types/internal/cssPreprocessorOptions.d.ts
|
|
2210
2190
|
/* eslint-enable @typescript-eslint/ban-ts-comment */
|
|
2211
2191
|
// https://github.com/type-challenges/type-challenges/issues/29285
|
|
2212
2192
|
type IsAny<T> = boolean extends (T extends never ? true : false) ? true : false;
|
|
@@ -2229,7 +2209,7 @@ declare global {
|
|
|
2229
2209
|
interface HTMLLinkElement {}
|
|
2230
2210
|
}
|
|
2231
2211
|
//#endregion
|
|
2232
|
-
//#region ../../../../node_modules/.pnpm/vite@6.4.5_@types+node@24.
|
|
2212
|
+
//#region ../../../../node_modules/.pnpm/vite@6.4.5_@types+node@24.19.2_jiti@2.7.0_less@4.2.2_lightningcss@1.30.2_sass@1.85.1_terser@5.40.0_tsx@4.19.3_yaml@2.7.0/node_modules/vite/types/metadata.d.ts
|
|
2233
2213
|
interface ChunkMetadata {
|
|
2234
2214
|
importedAssets: Set<string>;
|
|
2235
2215
|
importedCss: Set<string>;
|
|
@@ -2262,7 +2242,7 @@ declare module 'rollup' {
|
|
|
2262
2242
|
}
|
|
2263
2243
|
}
|
|
2264
2244
|
//#endregion
|
|
2265
|
-
//#region ../../../../node_modules/.pnpm/vite@6.4.5_@types+node@24.
|
|
2245
|
+
//#region ../../../../node_modules/.pnpm/vite@6.4.5_@types+node@24.19.2_jiti@2.7.0_less@4.2.2_lightningcss@1.30.2_sass@1.85.1_terser@5.40.0_tsx@4.19.3_yaml@2.7.0/node_modules/vite/dist/node/index.d.ts
|
|
2266
2246
|
interface Alias {
|
|
2267
2247
|
find: string | RegExp;
|
|
2268
2248
|
replacement: string;
|
|
@@ -5808,10 +5788,32 @@ interface FrameworkPlugin extends Analyzer {
|
|
|
5808
5788
|
* 那会改变所有依赖的构建目标。
|
|
5809
5789
|
*/
|
|
5810
5790
|
declare const UMI_NATIVE_MODULES_TO_EXCLUDE: string[];
|
|
5791
|
+
/**
|
|
5792
|
+
* 从工程根解析某个包的**已安装版本**(支持传递依赖)。
|
|
5793
|
+
*
|
|
5794
|
+
* `extractPackageDependencies` 只遍历工程 `package.json` 里显式声明的包,
|
|
5795
|
+
* 而 Umi 4 这类框架不会声明 `react` —— 它作为传递依赖被带入。
|
|
5796
|
+
*
|
|
5797
|
+
* ## 为什么不能只用 `require.resolve(name, { paths: [rootDir] })`
|
|
5798
|
+
*
|
|
5799
|
+
* 本模块的 `require` 是 `createRequire(import.meta.url)`,即**从插件自己所在目录**
|
|
5800
|
+
* 出发解析。开发时(monorepo)这碰巧能work:`plugin-react/node_modules/react`
|
|
5801
|
+
* 有 workspace 链接,向上查找就命中了。但**安装态下没有那个链接**,
|
|
5802
|
+
* 于是 pnpm 严格模式(react 只在 `.pnpm/react@x` 里、顶层无链接)的工程
|
|
5803
|
+
* 一律解析失败。2026-11-05 实测:`~/Code/umi4-demo` 在扩展里永远被判定
|
|
5804
|
+
* 不兼容,预览完全不可用;而同一份代码在 workspace 里跑测试是绿的。
|
|
5805
|
+
*
|
|
5806
|
+
* 所以先直解(工程显式声明时这一步就够),直解不到时再从**传递依赖的携带者**
|
|
5807
|
+
* (`umi` / `@umijs/max`)的入口出发解析 —— 那个 `require` 的基准路径在用户的
|
|
5808
|
+
* `node_modules` 里,能看到框架自己依赖的 `react`。
|
|
5809
|
+
*
|
|
5810
|
+
* 解析失败返回 `null`(由调用方决定如何处理),不抛错。
|
|
5811
|
+
*/
|
|
5812
|
+
declare function resolveInstalledVersion(name: string, rootDir: string, via?: readonly string[]): string | null;
|
|
5811
5813
|
declare const UMI_GENERATED_DIR_GLOBS: string[];
|
|
5812
5814
|
declare const reactFrameworkPlugin: FrameworkPluginFactory;
|
|
5813
5815
|
/**
|
|
5814
5816
|
* 导出默认的 reactFrameworkPlugin 对象
|
|
5815
5817
|
*/
|
|
5816
5818
|
//#endregion
|
|
5817
|
-
export { UMI_GENERATED_DIR_GLOBS, UMI_NATIVE_MODULES_TO_EXCLUDE, reactFrameworkPlugin as default };
|
|
5819
|
+
export { UMI_GENERATED_DIR_GLOBS, UMI_NATIVE_MODULES_TO_EXCLUDE, reactFrameworkPlugin as default, resolveInstalledVersion };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as e}from"node:module";import t from"node:fs";import n from"node:path";import r from"node:url";import i from"@vitejs/plugin-react";import{polyfillNode as a}from"esbuild-plugin-polyfill-node";import{createAnalyzer as o}from"@cfp-studio/analyzer-api/analyzer";import{createFileSystemReader as s,createStackedReader as c}from"@cfp-studio/vfs";import l from"typescript";import{decodePreviewableId as u,defineSpecialTypes as d,generatePreviewableId as f}from"@cfp-studio/analyzer-api";import{parseSerializableValue as p}from"@cfp-studio/serializable-values";import{extractArgs as m,extractCsf3Stories as h,extractStoriesInfo as g,resolvePreviewableId as _}from"@cfp-studio/storybook-helpers";import{EMPTY_OBJECT_TYPE as v,NODE_TYPE as y,UNKNOWN_TYPE as b,arrayType as x,dereferenceType as S,functionType as C,helpers as w,maybeOptionalType as T,objectType as E,stripUnusedTypes as D}from"@cfp-studio/type-analyzer";function O(e,t){for(let n of e.statements)if(l.isExpressionStatement(n)&&l.isBinaryExpression(n.expression)&&n.expression.operatorToken.kind===l.SyntaxKind.EqualsToken&&l.isPropertyAccessExpression(n.expression.left)&&l.isIdentifier(n.expression.left.expression)){if(n.expression.left.expression.text!==t)continue;if(n.expression.left.name.text===`propTypes`)return n.expression.right}else if(l.isClassDeclaration(n)&&n.name){if(n.name.text!==t)continue;for(let e of n.members)if(l.isPropertyDeclaration(e)&&e.initializer&&e.name.getText()===`propTypes`)return e.initializer}return null}function k(e,t,n,r,i){let a=t.sourceFile(n),o=null;a&&(o=O(a,r));let s=null;return s=o?j(t,o):A(e,t,i),{props:s.type,types:{...s.collected}}}function A(e,t,n){let r=n.getParameters()[0];if(!r)return{type:v,collected:{}};if(!r.valueDeclaration)return{type:b,collected:{}};let i=t.checker.getTypeOfSymbolAtLocation(r,r.valueDeclaration);try{let{type:e,collected:n}=t.resolveType(i);if([e]=S(e,n,[]),e.kind===`object`&&l.isParameter(r.valueDeclaration)&&l.isObjectBindingPattern(r.valueDeclaration.name)){let t=r.valueDeclaration.name,n=new Set,i=new Set,a=!1;for(let e of t.elements){if(e.dotDotDotToken){a=!0;break}let t=e.propertyName||e.name;if(!l.isIdentifier(t)){a=!0;break}n.add(t.text),e.initializer&&i.add(t.text)}a||(e=E(Object.fromEntries(Object.entries(e.fields).filter(([e])=>n.has(e)).map(([e,t])=>[e,T(t,i.has(e))]))))}return{type:e,collected:n}}catch(n){e.warn(`Unable to resolve props type for ${t.checker.typeToString(i)}`),e.error(n.toString())}return{type:b,collected:{}}}function j(e,t){let n=e.checker.getTypeAtLocation(t),r={},i={};for(let t of n.getProperties())r[t.name]=(()=>{if(!t.valueDeclaration)return b;let n=e.checker.getTypeAtLocation(t.valueDeclaration),r=e.resolveTypeArguments(n),a=r.types[0];return a?(i={...i,...r.collected},T(a,n.symbol.name===`Requireable`)):b})();let a=E(r);return{type:a,collected:D(i,[a])}}async function M(e,t,r,i){let a=t.sourceFile(i);if(!a)return[];let o=[];for(let e of a.statements)if(l.isExportAssignment(e)){if(l.isIdentifier(e.expression))continue;o.push([`default`,e,e.expression])}else if(l.isVariableStatement(e))for(let t of e.declarationList.declarations)!l.isIdentifier(t.name)||!t.initializer||o.push([t.name.text,e,t.initializer]);else if(l.isFunctionDeclaration(e)){let t=!!e.modifiers?.find(e=>e.kind===l.SyntaxKind.ExportKeyword)&&!!e.modifiers?.find(e=>e.kind===l.SyntaxKind.DefaultKeyword),n=e.name?.text;(t||n)&&o.push([n||`default`,e,e])}else l.isClassDeclaration(e)&&e.name&&o.push([e.name.text,e,e]);let s=g(a);e.debug(`**storiresInfo: ${s}`);let c=[],d=m(a),_=w.extractExportedNames(a);async function v(n,a,o){if(o===`default`&&s)return null;let c=d[o],l=o===`default`||!!_[o],u=P(t.checker,a);if(s&&l&&(c||u?.parameters.length===0)){let i=N(e,t,r,s.component);return{...n,analyze:async()=>({args:c?{sourcePosition:{start:c.getStart(),end:c.getEnd()},value:await p(c)}:null}),associatedComponent:i}}return u?{...n,exported:l,analyze:async()=>k(e,t,i,o,u)}:null}for(let[e,t,a]of o){let o=await v({id:f({filePath:n.relative(r,i),name:e}),sourcePosition:{start:t.getStart(),end:t.getEnd()}},a,e);o&&c.push(o)}return[...c,...await h(r,t,a,async i=>{let{filePath:a}=u(i),o=(await M(e,t,r,n.join(r,a))).find(e=>e.id===i);return!o||!(`exported`in o)?{props:b,types:{}}:o.analyze()})]}function N(e,t,r,i){let a=_(r,t.checker,i);return i&&a?{id:a,analyze:async()=>{let o=P(t.checker,i);if(!o)return{props:b,types:{}};let{filePath:s,name:c}=u(a);return k(e,t,n.join(r,s),c,o)}}:null}function P(e,t){let n=e.getTypeAtLocation(t);if(n.flags===l.TypeFlags.Any&&l.isCallExpression(t)&&l.isPropertyAccessExpression(t.expression)&&l.isIdentifier(t.expression.name)&&t.expression.name.text===`bind`){let r=e.getSymbolAtLocation(t.expression.expression);r?.valueDeclaration&&l.isVariableDeclaration(r.valueDeclaration)&&r.valueDeclaration.initializer&&(n=e.getTypeAtLocation(r.valueDeclaration.initializer))}for(let e of n.getCallSignatures())if(F(e.getReturnType()))return e;if(n.symbol){let r=e.getTypeOfSymbolAtLocation(n.symbol,t);for(let e of r.getConstructSignatures())if(e.getReturnType().getProperty(`render`))return e}return null}function F(e){return!!L(e)}const I=new Set([`Element`,`ReactElement`]);function L(e){if(e.isUnion()){for(let t of e.types)if(L(t))return!0}return I.has(e.symbol?.getEscapedName().toString())}const R=d({Component:y,ComponentClass:C(y),FunctionComponent:C(y),ReactElement:y,ReactNode:y,ReactNodeArray:x(y),ReactPortal:y}),z=o({typeAnalyzerOptions:({reader:e,rootDir:i})=>{let a=r.fileURLToPath(new URL(`.`,import.meta.url)),o=n.join(a,`..`,`types`),u=n.join(a,`..`,`node_modules`),d=t.existsSync(o)?o:u;return{reader:c([e,s({mapping:{from:d,to:n.join(i,`node_modules`)},watch:!1}),...d===o?[s({mapping:{from:o,to:n.join(i,`node_modules`,`@types`)},watch:!1})]:[]]),specialTypes:R,tsCompilerOptions:{jsx:l.JsxEmit.ReactJSX,jsxImportSource:`react`}}},crawlFile:({logger:e,resolver:t,rootDir:n,absoluteFilePath:r})=>M(e,t,n,r)}),B={line:`data-inspector-line`,column:`data-inspector-column`,relativePath:`data-inspector-relative-path`};function V(e){return e.includes(B.relativePath)}function H(e,t){if(!e.includes(`<`)||V(e))return;let n=l.createSourceFile(t.relativePath,e,l.ScriptTarget.Latest,!0,l.ScriptKind.TSX),r=[],i=e=>{if(l.isJsxElement(e)||l.isJsxSelfClosingElement(e)){let i=l.isJsxElement(e)?e.openingElement:e,a=i.tagName.getStart(n),{line:o,character:s}=n.getLineAndCharacterOfPosition(a),c=i.tagName.getEnd(),u=` ${B.line}="${o+1}" ${B.column}="${s+1}" ${B.relativePath}="${U(t.relativePath)}"`;r.push({at:c,text:u})}l.forEachChild(e,i)};if(i(n),r.length===0)return;r.sort((e,t)=>t.at-e.at);let a=e;for(let{at:e,text:t}of r)a=a.slice(0,e)+t+a.slice(e);return a}function U(e){return e.replace(/&/g,`&`).replace(/"/g,`"`)}const W=/import (\* as )?React[ ,]/;function G(){return{name:`previewjs:react-js-imports`,async transform(e,t){return t.includes(`node_modules`)||n.extname(t)!==`.js`||W.test(e)?e:`import React from 'react';${e}`}}}const K=e(import.meta.url),q=[`fsevents`];function J(e,t){if(t.react)return{};let r={};for(let t of[`react`,`react-dom`])try{let i=K.resolve(`${t}/package.json`,{paths:[e]});r[t]=n.dirname(i)}catch{}return r}function Y(e,r){try{let i=K.resolve(e,{paths:[r]}),a=n.dirname(i);for(;a!==n.dirname(a);){let e=n.join(a,`package.json`);if(t.existsSync(e)){let n=JSON.parse(t.readFileSync(e,`utf8`));return typeof n.version==`string`?n.version:null}a=n.dirname(a)}return null}catch{return null}}const X=[`src/.umi/**`,`src/.umi-production/**`,`src/.umi-test/**`,`src/.umi-tmp/**`];function Z(){let e=``;return{name:`previewjs:inspector-attrs`,enforce:`pre`,configResolved(t){e=t.root},transform(t,r){let i=r.split(`?`)[0]??r;if(!/\.[jt]sx$/.test(i)||i.includes(`node_modules`)||i.includes(`__previewjs__`)||i.includes(`__previewjs_internal__`))return;let a=H(t,{relativePath:n.relative(e,i).split(n.sep).join(`/`)});if(a!==void 0)return{code:a,map:null}}}}const Q={info:{apiVersion:5,name:`@cfp-studio/plugin-react`},isCompatible:async(e,t)=>{let n=await e.react?.readInstalledVersion();if(!n&&t&&(n=Y(`react`,t)),!n)return!1;let[r,i]=n.split(`.`).map(e=>Number.parseInt(e));return Number.isNaN(r)||Number.isNaN(i)?!1:r>=17||r===16&&i>=14},async create({rootDir:e,reader:o,logger:s,dependencies:c}){let l=r.fileURLToPath(new URL(`.`,import.meta.url)),u=await c.umi?.readInstalledVersion()??await c[`@umijs/max`]?.readInstalledVersion(),d=u?Number.parseInt(u.split(`.`)[0]??`0`)>=4:!1,f=z({rootDir:e,reader:o,logger:s}),p=n.join(l,`..`,`preview`),m=J(e,c),h=`/__previewjs_internal__/renderer/shims/umi.tsx`,g=n.join(e,`src`),_={};if(d){t.existsSync(g)&&(_[`@`]=g);let r=n.join(g,`.umi`);t.existsSync(r)?_[`@@`]=r:s.debug(`umi: 跳过 @@ 别名,src/.umi 不存在(dev server 未启动)`);let i=(()=>{try{return n.dirname(K.resolve(`umi`,{paths:[e]}))}catch{try{return n.dirname(K.resolve(`@umijs/max`,{paths:[e]}))}catch{return e}}})();for(let e of[`react-router`,`react-router-dom`])try{let t=K.resolve(`${e}/package.json`,{paths:[i]});_[e]=n.dirname(t)}catch{s.debug(`umi: 跳过 ${e} 别名,解析不到实际安装位置`)}}return{defaultWrapperPath:`__previewjs__/Wrapper.tsx`,previewDirPath:p,ignoredPaths:d?X:[],...f,viteConfig:e=>{let t=e.find(e=>e.name.startsWith(`vite:react-`));return{optimizeDeps:{...d?{exclude:q}:{},esbuildOptions:{plugins:c.next?[a()]:[]}},resolve:{alias:{"react-native":`react-native-web`,...m,...d?{umi:h,"@umijs/max":h,..._}:{}}},plugins:[Z(),G(),...e,...t?[]:[i()],{name:`previewjs:update-react-import`,async transform(e,t){if(!t.endsWith(`__previewjs_internal__/renderer/index.tsx`))return;let n=Number.parseInt(await c.react?.readInstalledVersion()||`0`);return e.replace(/__PREVIEWJS_PLUGIN_REACT_IMPORT_PATH__/g,n>=18?`./render-18`:`./render-16`)}}]}}}}};export{X as UMI_GENERATED_DIR_GLOBS,q as UMI_NATIVE_MODULES_TO_EXCLUDE,Q as default};
|
|
1
|
+
import{createRequire as e}from"node:module";import t from"node:fs";import n from"node:path";import r from"node:url";import i from"@vitejs/plugin-react";import{polyfillNode as a}from"esbuild-plugin-polyfill-node";import{createAnalyzer as o}from"@cfp-studio/analyzer-api/analyzer";import{createFileSystemReader as s,createStackedReader as c}from"@cfp-studio/vfs";import l from"typescript";import{decodePreviewableId as u,defineSpecialTypes as d,generatePreviewableId as f}from"@cfp-studio/analyzer-api";import{parseSerializableValue as p}from"@cfp-studio/serializable-values";import{extractArgs as m,extractCsf3Stories as h,extractStoriesInfo as g,resolvePreviewableId as _}from"@cfp-studio/storybook-helpers";import{EMPTY_OBJECT_TYPE as v,NODE_TYPE as y,UNKNOWN_TYPE as b,arrayType as x,dereferenceType as S,functionType as C,helpers as w,maybeOptionalType as T,objectType as E,stripUnusedTypes as D}from"@cfp-studio/type-analyzer";function O(e,t){for(let n of e.statements)if(l.isExpressionStatement(n)&&l.isBinaryExpression(n.expression)&&n.expression.operatorToken.kind===l.SyntaxKind.EqualsToken&&l.isPropertyAccessExpression(n.expression.left)&&l.isIdentifier(n.expression.left.expression)){if(n.expression.left.expression.text!==t)continue;if(n.expression.left.name.text===`propTypes`)return n.expression.right}else if(l.isClassDeclaration(n)&&n.name){if(n.name.text!==t)continue;for(let e of n.members)if(l.isPropertyDeclaration(e)&&e.initializer&&e.name.getText()===`propTypes`)return e.initializer}return null}function k(e,t,n,r,i){let a=t.sourceFile(n),o=null;a&&(o=O(a,r));let s=null;return s=o?j(t,o):A(e,t,i),{props:s.type,types:{...s.collected}}}function A(e,t,n){let r=n.getParameters()[0];if(!r)return{type:v,collected:{}};if(!r.valueDeclaration)return{type:b,collected:{}};let i=t.checker.getTypeOfSymbolAtLocation(r,r.valueDeclaration);try{let{type:e,collected:n}=t.resolveType(i);if([e]=S(e,n,[]),e.kind===`object`&&l.isParameter(r.valueDeclaration)&&l.isObjectBindingPattern(r.valueDeclaration.name)){let t=r.valueDeclaration.name,n=new Set,i=new Set,a=!1;for(let e of t.elements){if(e.dotDotDotToken){a=!0;break}let t=e.propertyName||e.name;if(!l.isIdentifier(t)){a=!0;break}n.add(t.text),e.initializer&&i.add(t.text)}a||(e=E(Object.fromEntries(Object.entries(e.fields).filter(([e])=>n.has(e)).map(([e,t])=>[e,T(t,i.has(e))]))))}return{type:e,collected:n}}catch(n){e.warn(`Unable to resolve props type for ${t.checker.typeToString(i)}`),e.error(n.toString())}return{type:b,collected:{}}}function j(e,t){let n=e.checker.getTypeAtLocation(t),r={},i={};for(let t of n.getProperties())r[t.name]=(()=>{if(!t.valueDeclaration)return b;let n=e.checker.getTypeAtLocation(t.valueDeclaration),r=e.resolveTypeArguments(n),a=r.types[0];return a?(i={...i,...r.collected},T(a,n.symbol.name===`Requireable`)):b})();let a=E(r);return{type:a,collected:D(i,[a])}}async function M(e,t,r,i){let a=t.sourceFile(i);if(!a)return[];let o=[];for(let e of a.statements)if(l.isExportAssignment(e)){if(l.isIdentifier(e.expression))continue;o.push([`default`,e,e.expression])}else if(l.isVariableStatement(e))for(let t of e.declarationList.declarations)!l.isIdentifier(t.name)||!t.initializer||o.push([t.name.text,e,t.initializer]);else if(l.isFunctionDeclaration(e)){let t=!!e.modifiers?.find(e=>e.kind===l.SyntaxKind.ExportKeyword)&&!!e.modifiers?.find(e=>e.kind===l.SyntaxKind.DefaultKeyword),n=e.name?.text;(t||n)&&o.push([n||`default`,e,e])}else l.isClassDeclaration(e)&&e.name&&o.push([e.name.text,e,e]);let s=g(a);e.debug(`**storiresInfo: ${s}`);let c=[],d=m(a),_=w.extractExportedNames(a);async function v(n,a,o){if(o===`default`&&s)return null;let c=d[o],l=o===`default`||!!_[o],u=P(t.checker,a);if(s&&l&&(c||u?.parameters.length===0)){let i=N(e,t,r,s.component);return{...n,analyze:async()=>({args:c?{sourcePosition:{start:c.getStart(),end:c.getEnd()},value:await p(c)}:null}),associatedComponent:i}}return u?{...n,exported:l,analyze:async()=>k(e,t,i,o,u)}:null}for(let[e,t,a]of o){let o=await v({id:f({filePath:n.relative(r,i),name:e}),sourcePosition:{start:t.getStart(),end:t.getEnd()}},a,e);o&&c.push(o)}return[...c,...await h(r,t,a,async i=>{let{filePath:a}=u(i),o=(await M(e,t,r,n.join(r,a))).find(e=>e.id===i);return!o||!(`exported`in o)?{props:b,types:{}}:o.analyze()})]}function N(e,t,r,i){let a=_(r,t.checker,i);return i&&a?{id:a,analyze:async()=>{let o=P(t.checker,i);if(!o)return{props:b,types:{}};let{filePath:s,name:c}=u(a);return k(e,t,n.join(r,s),c,o)}}:null}function P(e,t){let n=e.getTypeAtLocation(t);if(n.flags===l.TypeFlags.Any&&l.isCallExpression(t)&&l.isPropertyAccessExpression(t.expression)&&l.isIdentifier(t.expression.name)&&t.expression.name.text===`bind`){let r=e.getSymbolAtLocation(t.expression.expression);r?.valueDeclaration&&l.isVariableDeclaration(r.valueDeclaration)&&r.valueDeclaration.initializer&&(n=e.getTypeAtLocation(r.valueDeclaration.initializer))}for(let e of n.getCallSignatures())if(F(e.getReturnType()))return e;if(n.symbol){let r=e.getTypeOfSymbolAtLocation(n.symbol,t);for(let e of r.getConstructSignatures())if(e.getReturnType().getProperty(`render`))return e}return null}function F(e){return!!L(e)}const I=new Set([`Element`,`ReactElement`]);function L(e){if(e.isUnion()){for(let t of e.types)if(L(t))return!0}return I.has(e.symbol?.getEscapedName().toString())}const R=d({Component:y,ComponentClass:C(y),FunctionComponent:C(y),ReactElement:y,ReactNode:y,ReactNodeArray:x(y),ReactPortal:y}),z=o({typeAnalyzerOptions:({reader:e,rootDir:i})=>{let a=r.fileURLToPath(new URL(`.`,import.meta.url)),o=n.join(a,`..`,`types`),u=n.join(a,`..`,`node_modules`),d=t.existsSync(o)?o:u;return{reader:c([e,s({mapping:{from:d,to:n.join(i,`node_modules`)},watch:!1}),...d===o?[s({mapping:{from:o,to:n.join(i,`node_modules`,`@types`)},watch:!1})]:[]]),specialTypes:R,tsCompilerOptions:{jsx:l.JsxEmit.ReactJSX,jsxImportSource:`react`}}},crawlFile:({logger:e,resolver:t,rootDir:n,absoluteFilePath:r})=>M(e,t,n,r)}),B={line:`data-inspector-line`,column:`data-inspector-column`,relativePath:`data-inspector-relative-path`};function V(e){return e.includes(B.relativePath)}function H(e,t){if(!e.includes(`<`)||V(e))return;let n=l.createSourceFile(t.relativePath,e,l.ScriptTarget.Latest,!0,l.ScriptKind.TSX),r=[],i=e=>{if(l.isJsxElement(e)||l.isJsxSelfClosingElement(e)){let i=l.isJsxElement(e)?e.openingElement:e,a=i.tagName.getStart(n),{line:o,character:s}=n.getLineAndCharacterOfPosition(a),c=i.tagName.getEnd(),u=` ${B.line}="${o+1}" ${B.column}="${s+1}" ${B.relativePath}="${U(t.relativePath)}"`;r.push({at:c,text:u})}l.forEachChild(e,i)};if(i(n),r.length===0)return;r.sort((e,t)=>t.at-e.at);let a=e;for(let{at:e,text:t}of r)a=a.slice(0,e)+t+a.slice(e);return a}function U(e){return e.replace(/&/g,`&`).replace(/"/g,`"`)}const W=/import (\* as )?React[ ,]/;function G(){return{name:`previewjs:react-js-imports`,async transform(e,t){return t.includes(`node_modules`)||n.extname(t)!==`.js`||W.test(e)?e:`import React from 'react';${e}`}}}const K=e(import.meta.url),q=[`fsevents`];function J(e,t){if(t.react)return{};let r={};for(let t of[`react`,`react-dom`]){let i=Y(t,e,$);i&&(r[t]=n.dirname(i))}return r}function Y(t,n,r){let i=`${t}/package.json`;try{return K.resolve(i,{paths:[n]})}catch{}for(let t of r)try{return e(K.resolve(t,{paths:[n]})).resolve(i)}catch{}return null}function X(t,n,r=[]){let i=Z(()=>K.resolve(t,{paths:[n]}));if(i)return i;for(let i of r){let r=Z(()=>e(K.resolve(i,{paths:[n]})).resolve(t));if(r)return r}return null}function Z(e){try{let r=e();if(!r)return null;let i=n.dirname(r);for(;i!==n.dirname(i);){let e=n.join(i,`package.json`);if(t.existsSync(e)){let n=JSON.parse(t.readFileSync(e,`utf8`));return typeof n.version==`string`?n.version:null}i=n.dirname(i)}return null}catch{return null}}const Q=[`src/.umi/**`,`src/.umi-production/**`,`src/.umi-test/**`,`src/.umi-tmp/**`],$=[`umi`,`@umijs/max`];function ee(){let e=``;return{name:`previewjs:inspector-attrs`,enforce:`pre`,configResolved(t){e=t.root},transform(t,r){let i=r.split(`?`)[0]??r;if(!/\.[jt]sx$/.test(i)||i.includes(`node_modules`)||i.includes(`__previewjs__`)||i.includes(`__previewjs_internal__`))return;let a=H(t,{relativePath:n.relative(e,i).split(n.sep).join(`/`)});if(a!==void 0)return{code:a,map:null}}}}const te={info:{apiVersion:5,name:`@cfp-studio/plugin-react`},isCompatible:async(e,t)=>{let n=await e.react?.readInstalledVersion();if(!n&&t&&(n=X(`react`,t,$)),!n)return!1;let[r,i]=n.split(`.`).map(e=>Number.parseInt(e));return Number.isNaN(r)||Number.isNaN(i)?!1:r>=17||r===16&&i>=14},async create({rootDir:e,reader:o,logger:s,dependencies:c}){let l=r.fileURLToPath(new URL(`.`,import.meta.url)),u=await c.umi?.readInstalledVersion()??await c[`@umijs/max`]?.readInstalledVersion(),d=u?Number.parseInt(u.split(`.`)[0]??`0`)>=4:!1,f=z({rootDir:e,reader:o,logger:s}),p=n.join(l,`..`,`preview`),m=J(e,c),h=`/__previewjs_internal__/renderer/shims/umi.tsx`,g=n.join(e,`src`),_={};if(d){t.existsSync(g)&&(_[`@`]=g);let r=n.join(g,`.umi`);t.existsSync(r)?_[`@@`]=r:s.debug(`umi: 跳过 @@ 别名,src/.umi 不存在(dev server 未启动)`);let i=(()=>{try{return n.dirname(K.resolve(`umi`,{paths:[e]}))}catch{try{return n.dirname(K.resolve(`@umijs/max`,{paths:[e]}))}catch{return e}}})();for(let e of[`react-router`,`react-router-dom`])try{let t=K.resolve(`${e}/package.json`,{paths:[i]});_[e]=n.dirname(t)}catch{s.debug(`umi: 跳过 ${e} 别名,解析不到实际安装位置`)}}return{defaultWrapperPath:`__previewjs__/Wrapper.tsx`,previewDirPath:p,ignoredPaths:d?Q:[],...f,viteConfig:e=>{let t=e.find(e=>e.name.startsWith(`vite:react-`));return{optimizeDeps:{...d?{exclude:q}:{},esbuildOptions:{plugins:c.next?[a()]:[]}},resolve:{alias:{"react-native":`react-native-web`,...m,...d?{umi:h,"@umijs/max":h,..._}:{}}},plugins:[ee(),G(),...e,...t?[]:[i()],{name:`previewjs:update-react-import`,async transform(e,t){if(!t.endsWith(`__previewjs_internal__/renderer/index.tsx`))return;let n=Number.parseInt(await c.react?.readInstalledVersion()||`0`);return e.replace(/__PREVIEWJS_PLUGIN_REACT_IMPORT_PATH__/g,n>=18?`./render-18`:`./render-16`)}}]}}}}};export{Q as UMI_GENERATED_DIR_GLOBS,q as UMI_NATIVE_MODULES_TO_EXCLUDE,te as default,X as resolveInstalledVersion};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cfp-studio/plugin-react",
|
|
3
|
-
"version": "17.3.
|
|
3
|
+
"version": "17.3.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"@vitejs/plugin-react": "4.3.4",
|
|
16
16
|
"esbuild-plugin-polyfill-node": "0.3.0",
|
|
17
17
|
"typescript": "5.9.3",
|
|
18
|
-
"@cfp-studio/
|
|
18
|
+
"@cfp-studio/analyzer-api": "0.1.15",
|
|
19
19
|
"@cfp-studio/storybook-helpers": "6.0.2",
|
|
20
|
+
"@cfp-studio/type-analyzer": "10.1.8",
|
|
20
21
|
"@cfp-studio/vfs": "2.1.8",
|
|
21
|
-
"@cfp-studio/
|
|
22
|
-
"@cfp-studio/type-analyzer": "10.1.8"
|
|
22
|
+
"@cfp-studio/serializable-values": "9.0.8"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@playwright/test": "1.64.1",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"react-dom": "18.3.1",
|
|
34
34
|
"vite": "6.4.5",
|
|
35
35
|
"vitest": "5.0.5",
|
|
36
|
-
"@cfp-studio/core": "1.0.
|
|
36
|
+
"@cfp-studio/core": "1.0.12",
|
|
37
37
|
"@cfp-studio/iframe": "18.4.5",
|
|
38
38
|
"@cfp-studio/testing": "14.0.1"
|
|
39
39
|
},
|