Full Code of arco-design/arco-cli for AI

main fb99d70e256c cached
700 files
864.2 KB
237.5k tokens
1891 symbols
1 requests
Download .txt
Showing preview only (1,038K chars total). Download the full file or copy to clipboard to get everything.
Repository: arco-design/arco-cli
Branch: main
Commit: fb99d70e256c
Files: 700
Total size: 864.2 KB

Directory structure:
gitextract_i8dph4m1/

├── .eslintignore
├── .eslintrc.json
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   └── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .husky/
│   └── pre-commit
├── .prettierrc.json
├── .scripts/
│   ├── build-esm.sh
│   ├── build-type.sh
│   ├── build.sh
│   ├── flatPackages.js
│   ├── getLocalPackages.js
│   ├── linkLocalPackages.js
│   └── linkTsPaths.js
├── .stylelintignore
├── .stylelintrc
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CONTRIBUTING.zh-CN.md
├── LICENSE
├── README.md
├── babel.config.js
├── jest.config.ts
├── lerna.json
├── package.json
├── packages/
│   ├── arco/
│   │   ├── bin/
│   │   │   └── arco
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── app.ts
│   │   │   ├── arco.aspect.ts
│   │   │   ├── arco.main.runtime.ts
│   │   │   ├── index.ts
│   │   │   ├── loadCli.ts
│   │   │   ├── manifest.ts
│   │   │   └── types.ts
│   │   └── tsconfig.json
│   ├── aspect/
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── bundler/
│   │   │   │   ├── browserRuntime.ts
│   │   │   │   ├── bundler.aspect.ts
│   │   │   │   ├── bundler.main.runtime.ts
│   │   │   │   ├── bundler.ts
│   │   │   │   ├── bundlerContext.ts
│   │   │   │   ├── componentServer.ts
│   │   │   │   ├── dedupEnvs.ts
│   │   │   │   ├── devServer.graphql.ts
│   │   │   │   ├── devServer.service.ts
│   │   │   │   ├── devServer.ts
│   │   │   │   ├── devServerContext.ts
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── bindError.ts
│   │   │   │   │   └── index.ts
│   │   │   │   ├── getEntry.ts
│   │   │   │   └── index.ts
│   │   │   ├── component/
│   │   │   │   ├── component.aspect.ts
│   │   │   │   ├── component.graphql.ts
│   │   │   │   ├── component.main.runtime.ts
│   │   │   │   ├── component.ts
│   │   │   │   ├── componentFactory.ts
│   │   │   │   ├── componentMap.ts
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── hostNotFoundError.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── invalidNameError.ts
│   │   │   │   │   └── invalidVersionError.ts
│   │   │   │   ├── extensionData.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── type/
│   │   │   │   │   └── custom.d.ts
│   │   │   │   ├── uiRuntime/
│   │   │   │   │   ├── component.module.scss
│   │   │   │   │   ├── component.tsx
│   │   │   │   │   ├── component.ui.runtime.tsx
│   │   │   │   │   ├── componentContext.tsx
│   │   │   │   │   ├── componentError.tsx
│   │   │   │   │   ├── componentMeta/
│   │   │   │   │   │   ├── componentMeta.module.scss
│   │   │   │   │   │   ├── componentMeta.tsx
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   ├── componentModel.ts
│   │   │   │   │   ├── hooks/
│   │   │   │   │   │   └── useComponentQuery.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── utils/
│   │   │   │   │       └── getIdFromLocation.ts
│   │   │   │   └── version/
│   │   │   │       ├── index.ts
│   │   │   │       ├── version.ts
│   │   │   │       └── versionParser.ts
│   │   │   ├── docs/
│   │   │   │   ├── doc/
│   │   │   │   │   ├── doc.ts
│   │   │   │   │   ├── docProp.ts
│   │   │   │   │   ├── docPropList.ts
│   │   │   │   │   └── index.ts
│   │   │   │   ├── docs.aspect.ts
│   │   │   │   ├── docs.graphql.ts
│   │   │   │   ├── docs.main.runtime.ts
│   │   │   │   ├── docs.previewDefinition.ts
│   │   │   │   ├── docs.task.ts
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── fileExtensionNotSupportedError.ts
│   │   │   │   │   └── index.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── previewRuntime/
│   │   │   │   │   ├── docs.preview.runtime.tsx
│   │   │   │   │   └── index.ts
│   │   │   │   ├── type/
│   │   │   │   │   ├── custom.d.ts
│   │   │   │   │   ├── docOutline.ts
│   │   │   │   │   ├── docReader.ts
│   │   │   │   │   ├── docSnippet.ts
│   │   │   │   │   └── index.ts
│   │   │   │   └── uiRuntime/
│   │   │   │       ├── docs.ui.runtime.tsx
│   │   │   │       ├── index.tsx
│   │   │   │       ├── overview.module.scss
│   │   │   │       └── overview.tsx
│   │   │   ├── envs/
│   │   │   │   ├── envDefinition.ts
│   │   │   │   ├── envService.ts
│   │   │   │   ├── environment.ts
│   │   │   │   ├── envs.aspect.ts
│   │   │   │   ├── envs.main.runtime.ts
│   │   │   │   ├── exceptions/
│   │   │   │   │   └── envNotFoundError.ts
│   │   │   │   ├── executionContext.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── runtime/
│   │   │   │   │   ├── envRuntime.ts
│   │   │   │   │   ├── envsExecutionResult.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── runtime.ts
│   │   │   │   └── types.ts
│   │   │   ├── index.ts
│   │   │   ├── jest/
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── jestError.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── jest.aspect.ts
│   │   │   │   ├── jest.main.runtime.ts
│   │   │   │   └── jest.tester.ts
│   │   │   ├── less/
│   │   │   │   ├── compilerOptions.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── less.aspect.ts
│   │   │   │   ├── less.compiler.ts
│   │   │   │   └── less.main.runtime.ts
│   │   │   ├── mdx/
│   │   │   │   ├── index.ts
│   │   │   │   ├── loader/
│   │   │   │   │   ├── compileOutput.ts
│   │   │   │   │   ├── importSpecifier.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── mdxCompiler.ts
│   │   │   │   │   ├── mdxLoader.ts
│   │   │   │   │   └── remarkPlugins/
│   │   │   │   │       ├── extractComponentDemos.ts
│   │   │   │   │       ├── extractHeadings.ts
│   │   │   │   │       ├── extractImports.ts
│   │   │   │   │       ├── extractMetadata.ts
│   │   │   │   │       └── index.ts
│   │   │   │   ├── mdx.aspect.ts
│   │   │   │   ├── mdx.docReader.ts
│   │   │   │   └── mdx.main.runtime.ts
│   │   │   ├── multi-compiler/
│   │   │   │   ├── index.ts
│   │   │   │   ├── multiCompiler.aspect.ts
│   │   │   │   ├── multiCompiler.compiler.ts
│   │   │   │   └── multiCompiler.main.runtime.ts
│   │   │   ├── pubsub/
│   │   │   │   ├── events/
│   │   │   │   │   ├── activeTabEvent.ts
│   │   │   │   │   ├── arcoBaseEvent.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── locationHashEvent.ts
│   │   │   │   │   └── sizeEvent.ts
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── noParentError.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── previewRuntime/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── pubsub.preview.runtime.ts
│   │   │   │   │   └── pubsub.ts
│   │   │   │   ├── pubsub.aspect.ts
│   │   │   │   ├── pubsub.main.runtime.ts
│   │   │   │   ├── pubsub.ui.runtime.ts
│   │   │   │   └── pubsubContext.tsx
│   │   │   ├── react-router/
│   │   │   │   ├── index.ts
│   │   │   │   ├── reactRouter.aspect.ts
│   │   │   │   └── uiRuntime/
│   │   │   │       ├── hooks/
│   │   │   │       │   └── useQuery.ts
│   │   │   │       ├── index.ts
│   │   │   │       ├── reactRouter.ui.runtime.tsx
│   │   │   │       └── slotRouter.tsx
│   │   │   ├── sass/
│   │   │   │   ├── compilerOptions.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── sass.aspect.ts
│   │   │   │   ├── sass.compiler.ts
│   │   │   │   └── sass.main.runtime.ts
│   │   │   ├── typescript/
│   │   │   │   ├── compilerOptions.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── typescript.aspect.ts
│   │   │   │   ├── typescript.compiler.ts
│   │   │   │   ├── typescript.main.runtime.ts
│   │   │   │   ├── typescriptConfigMutator.ts
│   │   │   │   └── utils/
│   │   │   │       └── flatTSConfig.ts
│   │   │   ├── webpack/
│   │   │   │   ├── config/
│   │   │   │   │   ├── html.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── webpack.config.ts
│   │   │   │   │   ├── webpack.dev.config.ts
│   │   │   │   │   ├── webpackFallbacks.ts
│   │   │   │   │   ├── webpackFallbacksAliases.ts
│   │   │   │   │   └── webpackFallbacksProvidePluginConfig.ts
│   │   │   │   ├── events/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── webpackCompilationDoneEvent.ts
│   │   │   │   │   └── webpackCompilationStartedEvent.ts
│   │   │   │   ├── generateStyleLoader.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── webpack.aspect.ts
│   │   │   │   ├── webpack.bundler.ts
│   │   │   │   ├── webpack.devServer.ts
│   │   │   │   ├── webpack.main.runtime.ts
│   │   │   │   └── webpackConfigMutator.ts
│   │   │   └── workspace/
│   │   │       ├── events/
│   │   │       │   ├── index.ts
│   │   │       │   ├── onComponentAddEvent.ts
│   │   │       │   ├── onComponentChangeEvent.ts
│   │   │       │   └── onComponentRemovedEvent.ts
│   │   │       ├── exceptions/
│   │   │       │   ├── index.ts
│   │   │       │   ├── noIdMatchPatternError.ts
│   │   │       │   └── workspaceNotFoundError.ts
│   │   │       ├── index.ts
│   │   │       ├── type/
│   │   │       │   ├── custom.d.ts
│   │   │       │   ├── index.ts
│   │   │       │   ├── onComponentEvents.ts
│   │   │       │   └── workspaceConfig.ts
│   │   │       ├── uiRuntime/
│   │   │       │   ├── graphqlProvider.tsx
│   │   │       │   ├── hooks/
│   │   │       │   │   └── useWorkspace.ts
│   │   │       │   ├── index.ts
│   │   │       │   ├── style/
│   │   │       │   │   └── workspace.module.scss
│   │   │       │   ├── workspace.tsx
│   │   │       │   ├── workspace.ui.runtime.tsx
│   │   │       │   └── workspaceModel.ts
│   │   │       ├── watch/
│   │   │       │   ├── watchQueue.ts
│   │   │       │   └── watcher.ts
│   │   │       ├── workspace.aspect.ts
│   │   │       ├── workspace.graphql.ts
│   │   │       ├── workspace.main.runtime.ts
│   │   │       ├── workspace.ts
│   │   │       └── workspace.uiRoot.ts
│   │   └── tsconfig.json
│   ├── core/
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── aspect-loader/
│   │   │   │   ├── aspectDefinition.ts
│   │   │   │   ├── aspectLoader.aspect.ts
│   │   │   │   ├── aspectLoader.main.runtime.ts
│   │   │   │   ├── coreAspect.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── pluginDefinition.ts
│   │   │   ├── cli/
│   │   │   │   ├── cli.aspect.ts
│   │   │   │   ├── cli.main.runtime.ts
│   │   │   │   ├── cliParser.ts
│   │   │   │   ├── commandRunner.ts
│   │   │   │   ├── commands/
│   │   │   │   │   └── help.ts
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── alreadyExistsError.ts
│   │   │   │   │   ├── commandNotFoundError.ts
│   │   │   │   │   └── index.ts
│   │   │   │   ├── getCommandId.ts
│   │   │   │   ├── help.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── legacyCommandAdapter.ts
│   │   │   │   ├── utils.ts
│   │   │   │   └── yargsAdapter.ts
│   │   │   ├── express/
│   │   │   │   ├── express.aspect.ts
│   │   │   │   ├── express.main.runtime.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── middlewares/
│   │   │   │   │   ├── error.ts
│   │   │   │   │   └── index.ts
│   │   │   │   └── types/
│   │   │   │       ├── index.ts
│   │   │   │       ├── middlewareManifest.ts
│   │   │   │       ├── next.ts
│   │   │   │       ├── request.ts
│   │   │   │       ├── response.ts
│   │   │   │       └── route.ts
│   │   │   ├── graphql/
│   │   │   │   ├── graphql.aspect.ts
│   │   │   │   ├── graphql.main.runtime.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── schema.ts
│   │   │   ├── index.ts
│   │   │   └── logger/
│   │   │       ├── index.ts
│   │   │       ├── logger.aspect.ts
│   │   │       ├── logger.main.runtime.ts
│   │   │       ├── logger.ts
│   │   │       └── longProcessLogger.ts
│   │   └── tsconfig.json
│   ├── generator/
│   │   ├── .gitignore
│   │   ├── bin/
│   │   │   └── arco-generate
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── app.ts
│   │   │   ├── forker.ts
│   │   │   ├── generator.ts
│   │   │   ├── index.ts
│   │   │   ├── templates/
│   │   │   │   ├── react-component/
│   │   │   │   │   ├── __arco.tpl.desc.json
│   │   │   │   │   ├── __docs__/
│   │   │   │   │   │   ├── basic.tpl.tsx
│   │   │   │   │   │   └── index.tpl.ts
│   │   │   │   │   ├── __test__/
│   │   │   │   │   │   └── index.test.tpl.tsx
│   │   │   │   │   ├── component.tpl.tsx
│   │   │   │   │   ├── index.tpl.tsx
│   │   │   │   │   ├── interface.tpl.ts
│   │   │   │   │   └── style/
│   │   │   │   │       ├── index.less
│   │   │   │   │       └── index.ts
│   │   │   │   ├── react-package/
│   │   │   │   │   ├── __arco.tpl.desc.json
│   │   │   │   │   ├── gitignore.tpl.ts
│   │   │   │   │   ├── package.json.tpl.ts
│   │   │   │   │   ├── src/
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   └── tsconfig.json
│   │   │   │   └── react-workspace/
│   │   │   │       ├── .husky/
│   │   │   │       │   └── pre-commit
│   │   │   │       ├── .scripts/
│   │   │   │       │   └── workspaceHooks/
│   │   │   │       │       └── afterComponentCreated.js
│   │   │   │       ├── __arco.tpl.desc.json
│   │   │   │       ├── arco.env.config.js
│   │   │   │       ├── arco.workspace.jsonc.tpl.ts
│   │   │   │       ├── eslintignore.tpl.ts
│   │   │   │       ├── eslintrc.tpl.ts
│   │   │   │       ├── gitignore.tpl.ts
│   │   │   │       ├── jest.config.js
│   │   │   │       ├── package.json.tpl.ts
│   │   │   │       ├── packages/
│   │   │   │       │   └── __arco.dir.desc.ts
│   │   │   │       ├── prettierrc.tpl.ts
│   │   │   │       ├── src/
│   │   │   │       │   ├── __arco.dir.desc.ts
│   │   │   │       │   └── index.ts
│   │   │   │       ├── stylelintignore.tpl.ts
│   │   │   │       ├── stylelintrc.tpl.ts
│   │   │   │       └── tsconfig.json.tpl.ts
│   │   │   ├── types.ts
│   │   │   └── utils/
│   │   │       ├── execQuick.ts
│   │   │       ├── installDependencies.ts
│   │   │       ├── isGitStatusClean.ts
│   │   │       ├── isInGitRepository.ts
│   │   │       ├── toFsCompatible.ts
│   │   │       └── wgetAsync.ts
│   │   └── tsconfig.json
│   ├── legacy/
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── analytics/
│   │   │   │   ├── analytics.ts
│   │   │   │   └── analyticsSender.ts
│   │   │   ├── bootstrap.ts
│   │   │   ├── cli/
│   │   │   │   ├── command.ts
│   │   │   │   ├── commandGroups.ts
│   │   │   │   ├── commandRegistry.ts
│   │   │   │   ├── commands/
│   │   │   │   │   ├── host/
│   │   │   │   │   │   ├── host.ts
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   ├── login/
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   ├── login.ts
│   │   │   │   │   │   └── loginSuccessPage.ts
│   │   │   │   │   └── logout/
│   │   │   │   │       ├── index.ts
│   │   │   │   │       └── logout.ts
│   │   │   │   ├── defaultErrorHandler.ts
│   │   │   │   ├── globalFlags.ts
│   │   │   │   ├── handleErrors.ts
│   │   │   │   ├── legacyCommand.ts
│   │   │   │   ├── loader/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── loader.ts
│   │   │   │   ├── registerCommands.ts
│   │   │   │   ├── request.ts
│   │   │   │   ├── uploadFile.ts
│   │   │   │   └── user/
│   │   │   │       ├── checkUserLogin.ts
│   │   │   │       ├── getUserInfoFromAPI.ts
│   │   │   │       └── index.ts
│   │   │   ├── constants.ts
│   │   │   ├── error/
│   │   │   │   ├── abstractError.ts
│   │   │   │   ├── arcoError.ts
│   │   │   │   ├── cloneErrorObject.ts
│   │   │   │   ├── generalError.ts
│   │   │   │   └── hashErrorObject.ts
│   │   │   ├── globalConfig/
│   │   │   │   ├── config.ts
│   │   │   │   └── index.ts
│   │   │   ├── logger/
│   │   │   │   ├── getPinoLogger.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── interface.ts
│   │   │   │   ├── logger.ts
│   │   │   │   ├── printWarning.ts
│   │   │   │   └── profiler.ts
│   │   │   ├── prompts/
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── promptCanceled.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── prompt.ts
│   │   │   │   └── schemas/
│   │   │   │       ├── analyticsReporting.ts
│   │   │   │       └── errorReporting.ts
│   │   │   ├── types.ts
│   │   │   ├── utils/
│   │   │   │   ├── buildCommandMessage.ts
│   │   │   │   ├── cliVersion.ts
│   │   │   │   ├── concurrency.ts
│   │   │   │   ├── encryption/
│   │   │   │   │   └── sha1.ts
│   │   │   │   ├── eol.ts
│   │   │   │   ├── fs/
│   │   │   │   │   ├── isDirEmpty.ts
│   │   │   │   │   ├── readDirIgnoreDsStore.ts
│   │   │   │   │   ├── removeEmptyDir.ts
│   │   │   │   │   ├── removeFilesAndEmptyDirsRecursively.ts
│   │   │   │   │   └── zipFiles.ts
│   │   │   │   ├── ignore.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── map/
│   │   │   │   │   └── toObject.ts
│   │   │   │   ├── mapToObject.ts
│   │   │   │   ├── network/
│   │   │   │   │   └── port.ts
│   │   │   │   ├── number/
│   │   │   │   │   └── isNumeric.ts
│   │   │   │   ├── packCommand.ts
│   │   │   │   ├── path.ts
│   │   │   │   ├── regexp/
│   │   │   │   │   └── style.ts
│   │   │   │   ├── string/
│   │   │   │   │   ├── toBase64.ts
│   │   │   │   │   └── toFsCompatible.ts
│   │   │   │   ├── taskManager.ts
│   │   │   │   └── timer/
│   │   │   │       ├── exceptions/
│   │   │   │       │   ├── index.ts
│   │   │   │       │   ├── timerAlreadyRunningError.ts
│   │   │   │       │   └── timerNotStartedError.ts
│   │   │   │       ├── index.ts
│   │   │   │       ├── response.ts
│   │   │   │       └── timer.ts
│   │   │   └── workspace/
│   │   │       ├── component/
│   │   │       │   ├── dependencies/
│   │   │       │   │   ├── detectives/
│   │   │       │   │   │   ├── detectiveEs6.ts
│   │   │       │   │   │   ├── index.ts
│   │   │       │   │   │   └── parserHelper.ts
│   │   │       │   │   └── types/
│   │   │       │   │       └── dependencyTreeType.ts
│   │   │       │   ├── exceptions/
│   │   │       │   │   ├── componentNotFoundInPathError.ts
│   │   │       │   │   ├── fileSourceNotFoundError.ts
│   │   │       │   │   └── index.ts
│   │   │       │   └── sources/
│   │   │       │       ├── abstractVinyl.ts
│   │   │       │       ├── dataToPersist.ts
│   │   │       │       ├── dist.ts
│   │   │       │       ├── index.ts
│   │   │       │       ├── removePath.ts
│   │   │       │       ├── sourceFile.ts
│   │   │       │       └── vinylTypes.ts
│   │   │       ├── componentIdTo.ts
│   │   │       ├── componentInfo.ts
│   │   │       ├── componentOps/
│   │   │       │   └── addComponents/
│   │   │       │       ├── addComponents.ts
│   │   │       │       ├── exceptions/
│   │   │       │       │   ├── ignoredDirectoryError.ts
│   │   │       │       │   └── index.ts
│   │   │       │       └── index.ts
│   │   │       ├── componentResult.ts
│   │   │       └── workspaceLocator.ts
│   │   └── tsconfig.json
│   ├── migrator/
│   │   ├── bin/
│   │   │   └── arco-migrate
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── adapters/
│   │   │   │   ├── componentAdapter.ts
│   │   │   │   ├── packageAdapter.ts
│   │   │   │   └── workspaceAdapter.ts
│   │   │   ├── app.ts
│   │   │   ├── constant.ts
│   │   │   ├── index.ts
│   │   │   ├── migrator.ts
│   │   │   ├── types.ts
│   │   │   └── utils.ts
│   │   └── tsconfig.json
│   ├── react/
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   ├── jest/
│   │   │   │   ├── index.ts
│   │   │   │   ├── jest.base.config.js
│   │   │   │   ├── jest.cjs.config.js
│   │   │   │   ├── jest.esm.config.js
│   │   │   │   ├── setupTests.js
│   │   │   │   └── transformers/
│   │   │   │       ├── base-transformer-plugins.js
│   │   │   │       ├── base-transformer-presets.js
│   │   │   │       ├── base-transformer-process.js
│   │   │   │       ├── cjs-transformer.js
│   │   │   │       ├── esm-transformer.js
│   │   │   │       ├── file-transformer.js
│   │   │   │       └── style-transformer.js
│   │   │   ├── react.aspect.ts
│   │   │   ├── react.env.ts
│   │   │   ├── react.main.runtime.ts
│   │   │   ├── tsdoc/
│   │   │   │   ├── index.ts
│   │   │   │   └── parser.ts
│   │   │   ├── types/
│   │   │   │   └── reactConfig.ts
│   │   │   ├── typescript/
│   │   │   │   ├── asset.d.ts
│   │   │   │   ├── style.d.ts
│   │   │   │   └── tsconfig.json
│   │   │   └── webpack/
│   │   │       ├── overlay/
│   │   │       │   ├── formatWebpackMessages.js
│   │   │       │   ├── launchEditorEndpoint.js
│   │   │       │   ├── refreshOverlayInterop.js
│   │   │       │   └── webpackHotDevClient.js
│   │   │       ├── webpack.config.base.ts
│   │   │       ├── webpack.config.component.dev.ts
│   │   │       └── webpack.config.component.prod.ts
│   │   └── tsconfig.json
│   ├── service/
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── builder/
│   │   │   │   ├── build.cmd.ts
│   │   │   │   ├── buildPipe.ts
│   │   │   │   ├── buildPipelineOrder.ts
│   │   │   │   ├── buildTask.ts
│   │   │   │   ├── builder.aspect.ts
│   │   │   │   ├── builder.main.runtime.ts
│   │   │   │   ├── builder.service.tsx
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── artifactDefinitionError.ts
│   │   │   │   │   ├── artifactStorageError.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── invalidTaskError.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── mergeComponentResults.ts
│   │   │   │   ├── taskResultsList.ts
│   │   │   │   └── tasksQueue.ts
│   │   │   ├── compiler/
│   │   │   │   ├── compiler.aspect.ts
│   │   │   │   ├── compiler.main.runtime.ts
│   │   │   │   ├── compiler.task.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── types.ts
│   │   │   │   └── utils/
│   │   │   │       ├── compileStyle.ts
│   │   │   │       └── sortPackageBuildOrders.ts
│   │   │   ├── fork/
│   │   │   │   ├── fork.aspect.ts
│   │   │   │   ├── fork.cmd.ts
│   │   │   │   ├── fork.main.runtime.ts
│   │   │   │   └── index.ts
│   │   │   ├── generator/
│   │   │   │   ├── create.cmd.ts
│   │   │   │   ├── generator.aspect.ts
│   │   │   │   ├── generator.main.runtime.ts
│   │   │   │   └── index.ts
│   │   │   ├── index.ts
│   │   │   ├── preview/
│   │   │   │   ├── bundlingStrategy.ts
│   │   │   │   ├── cli/
│   │   │   │   │   └── previewServerStatus/
│   │   │   │   │       ├── index.ts
│   │   │   │   │       ├── previewServerHeader.tsx
│   │   │   │   │       ├── previewServerRow.tsx
│   │   │   │   │       ├── previewServerStatus.tsx
│   │   │   │   │       └── webpackError.tsx
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── bundlingStrategyNotFoundError.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── previewNotFoundError.ts
│   │   │   │   │   └── previewOutputFileNotFoundError.ts
│   │   │   │   ├── executionRef.ts
│   │   │   │   ├── generateLink.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── preview.aspect.ts
│   │   │   │   ├── preview.main.runtime.ts
│   │   │   │   ├── preview.startPlugin.tsx
│   │   │   │   ├── preview.task.ts
│   │   │   │   ├── previewRuntime/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── preview.preview.runtime.tsx
│   │   │   │   │   └── previewModules.tsx
│   │   │   │   ├── strategies/
│   │   │   │   │   ├── componentStrategy.ts
│   │   │   │   │   ├── generatePreviewBundleEntry.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── strategiesNames.ts
│   │   │   │   ├── types/
│   │   │   │   │   ├── custom.d.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── previewDefinition.ts
│   │   │   │   │   ├── previewModule.ts
│   │   │   │   │   ├── previewType.ts
│   │   │   │   │   └── renderingContext.ts
│   │   │   │   ├── uiRuntime/
│   │   │   │   │   ├── componentPreview.tsx
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── urls.ts
│   │   │   │   └── webpackEventsListener.ts
│   │   │   ├── syncer/
│   │   │   │   ├── index.ts
│   │   │   │   ├── sync.cmd.ts
│   │   │   │   ├── syncer.aspect.ts
│   │   │   │   ├── syncer.main.runtime.ts
│   │   │   │   └── type/
│   │   │   │       └── syncParams.ts
│   │   │   ├── tester/
│   │   │   │   ├── index.ts
│   │   │   │   ├── test.cmd.tsx
│   │   │   │   ├── tester.aspect.ts
│   │   │   │   ├── tester.main.runtime.ts
│   │   │   │   ├── tester.service.tsx
│   │   │   │   └── tester.ts
│   │   │   └── ui/
│   │   │       ├── cli/
│   │   │       │   ├── time.tsx
│   │   │       │   ├── uiServerConsole.tsx
│   │   │       │   └── uiServerLoader.tsx
│   │   │       ├── createRoot.ts
│   │   │       ├── exceptions/
│   │   │       │   ├── index.ts
│   │   │       │   └── unknownUIError.ts
│   │   │       ├── index.ts
│   │   │       ├── start.cmd.tsx
│   │   │       ├── startPlugin.ts
│   │   │       ├── ui.aspect.ts
│   │   │       ├── ui.main.runtime.ts
│   │   │       ├── uiRoot.ts
│   │   │       ├── uiRuntime/
│   │   │       │   ├── index.ts
│   │   │       │   ├── ui.ui.runtime.tsx
│   │   │       │   └── uiRoot.ui.ts
│   │   │       ├── uiServer.ts
│   │   │       └── webpack/
│   │   │           ├── html.ts
│   │   │           └── webpack.dev.config.ts
│   │   └── tsconfig.json
│   ├── stone/
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── aspect/
│   │   │   │   ├── aspect.ts
│   │   │   │   ├── aspectManifest.ts
│   │   │   │   └── index.ts
│   │   │   ├── config/
│   │   │   │   ├── config.ts
│   │   │   │   └── index.ts
│   │   │   ├── exception/
│   │   │   │   ├── extensionInitError.ts
│   │   │   │   ├── extensionLoadError.ts
│   │   │   │   ├── extensionPotentialCircularError.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── readConfigError.ts
│   │   │   │   ├── runtimeModuleError.ts
│   │   │   │   └── runtimeNotDefinedError.ts
│   │   │   ├── extension/
│   │   │   │   ├── extension.ts
│   │   │   │   ├── extensionManifest.ts
│   │   │   │   └── index.ts
│   │   │   ├── extensionGraph/
│   │   │   │   ├── extensionGraph.ts
│   │   │   │   ├── fromExtension.ts
│   │   │   │   └── index.ts
│   │   │   ├── index.ts
│   │   │   ├── runtimes/
│   │   │   │   ├── index.ts
│   │   │   │   ├── runtimeDefinition.ts
│   │   │   │   ├── runtimeManifest.ts
│   │   │   │   └── runtimes.ts
│   │   │   ├── slot/
│   │   │   │   ├── index.ts
│   │   │   │   ├── registry.ts
│   │   │   │   └── slot.ts
│   │   │   ├── stone.ts
│   │   │   ├── stoneConfig/
│   │   │   │   ├── configReader.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── stoneConfig.ts
│   │   │   ├── types.ts
│   │   │   └── utils/
│   │   │       └── asyncForEach.ts
│   │   └── tsconfig.json
│   └── ui-foundation-react/
│       ├── package.json
│       ├── src/
│       │   ├── backTop/
│       │   │   └── index.ts
│       │   ├── baseUI/
│       │   │   ├── grid/
│       │   │   │   ├── grid.module.scss
│       │   │   │   ├── grid.tsx
│       │   │   │   ├── gridTemplate/
│       │   │   │   │   ├── gridTemplate.module.scss
│       │   │   │   │   └── index.ts
│       │   │   │   └── index.tsx
│       │   │   ├── highlighter/
│       │   │   │   ├── codeHighlighter.tsx
│       │   │   │   ├── index.ts
│       │   │   │   └── syntaxHighlighter.tsx
│       │   │   ├── index.ts
│       │   │   └── table/
│       │   │       ├── index.ts
│       │   │       ├── table.module.scss
│       │   │       ├── table.tsx
│       │   │       ├── tableColumn.module.scss
│       │   │       ├── tableColumn.tsx
│       │   │       ├── tableHeadingColumn.module.scss
│       │   │       ├── tableHeadingColumn.tsx
│       │   │       ├── tableHeadingRow.module.scss
│       │   │       ├── tableHeadingRow.tsx
│       │   │       ├── tableRow.module.scss
│       │   │       └── tableRow.tsx
│       │   ├── constants.ts
│       │   ├── globalLoader/
│       │   │   ├── index.ts
│       │   │   ├── loaderContext.tsx
│       │   │   ├── useLoader.ts
│       │   │   └── useLoaderApi.ts
│       │   ├── hooks/
│       │   │   └── useDataQuery.ts
│       │   ├── index.ts
│       │   ├── markdown/
│       │   │   ├── components/
│       │   │   │   ├── anchor/
│       │   │   │   │   ├── anchor.module.scss
│       │   │   │   │   ├── anchor.tsx
│       │   │   │   │   └── index.ts
│       │   │   │   ├── demoView/
│       │   │   │   │   ├── demoView.module.scss
│       │   │   │   │   ├── demoView.tsx
│       │   │   │   │   └── index.ts
│       │   │   │   ├── docAnchor/
│       │   │   │   │   ├── docAnchor.module.scss
│       │   │   │   │   ├── docAnchor.tsx
│       │   │   │   │   └── index.ts
│       │   │   │   ├── heading/
│       │   │   │   │   ├── heading.tsx
│       │   │   │   │   ├── index.ts
│       │   │   │   │   └── utils.ts
│       │   │   │   ├── index.tsx
│       │   │   │   ├── snippet/
│       │   │   │   │   ├── codeSnippet.module.scss
│       │   │   │   │   ├── codeSnippet.tsx
│       │   │   │   │   └── index.tsx
│       │   │   │   └── tabs/
│       │   │   │       ├── index.tsx
│       │   │   │       ├── tabs.module.scss
│       │   │   │       └── tabs.tsx
│       │   │   ├── live/
│       │   │   │   ├── index.ts
│       │   │   │   ├── markdownLive.module.scss
│       │   │   │   └── markdownLive.tsx
│       │   │   ├── mdxLayout/
│       │   │   │   ├── index.ts
│       │   │   │   ├── mdxLayout.module.scss
│       │   │   │   └── mdxLayout.tsx
│       │   │   └── style/
│       │   │       ├── markdown-limit.css
│       │   │       ├── markdown.css
│       │   │       └── variable.scss
│       │   ├── navbar/
│       │   │   ├── index.ts
│       │   │   ├── navbar.module.scss
│       │   │   └── navbar.tsx
│       │   ├── pages/
│       │   │   ├── contactFooter.tsx
│       │   │   ├── errorPage.tsx
│       │   │   ├── index.ts
│       │   │   ├── notFoundPage.tsx
│       │   │   └── style/
│       │   │       ├── contactFooter.module.scss
│       │   │       └── errorPage.module.scss
│       │   ├── preview/
│       │   │   ├── SlotRegister.ts
│       │   │   ├── app.module.scss
│       │   │   ├── app.tsx
│       │   │   ├── doc/
│       │   │   │   ├── content.module.scss
│       │   │   │   ├── content.tsx
│       │   │   │   ├── propertiesTable.module.scss
│       │   │   │   └── propertiesTable.tsx
│       │   │   ├── index.tsx
│       │   │   ├── previewContext/
│       │   │   │   └── index.tsx
│       │   │   └── theme.tsx
│       │   ├── sideBar/
│       │   │   ├── componentMenu/
│       │   │   │   ├── componentMenu.module.scss
│       │   │   │   ├── componentMenu.tsx
│       │   │   │   └── index.ts
│       │   │   ├── index.ts
│       │   │   ├── sideBar.module.scss
│       │   │   └── sideBar.tsx
│       │   ├── spin/
│       │   │   └── index.ts
│       │   ├── style/
│       │   │   ├── colors.scss
│       │   │   ├── global.scss
│       │   │   └── z-indexes.scss
│       │   ├── tabs/
│       │   │   └── index.ts
│       │   ├── type/
│       │   │   └── custom.d.ts
│       │   ├── workspaceContext/
│       │   │   ├── index.ts
│       │   │   ├── workspaceContext.module.scss
│       │   │   └── workspaceContext.tsx
│       │   └── workspaceOverview/
│       │       ├── index.ts
│       │       ├── workspaceOverview.module.scss
│       │       └── workspaceOverview.tsx
│       └── tsconfig.json
├── pnpm-workspace.yaml
├── tsconfig.json
└── ui/
    ├── .gitignore
    ├── .scripts/
    │   └── workspaceHooks/
    │       └── afterComponentCreated.js
    ├── arco.env.config.js
    ├── arco.workspace.jsonc
    ├── jest.config.js
    ├── package.json
    ├── src/
    │   ├── Overview/
    │   │   ├── Overview.tsx
    │   │   ├── __docs__/
    │   │   │   ├── basic.tsx
    │   │   │   └── index.mdx
    │   │   ├── __test__/
    │   │   │   └── index.test.tsx
    │   │   ├── index.ts
    │   │   ├── interface.ts
    │   │   └── style/
    │   │       └── index.module.less
    │   ├── index.ts
    │   ├── type/
    │   │   └── custom.d.ts
    │   └── utils/
    │       ├── constant.ts
    │       ├── dom.ts
    │       ├── findNode.ts
    │       └── useConnectIframe.ts
    └── tsconfig.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .eslintignore
================================================
**/node_modules/**
**/dist/**
*.json
**/template/**
packages/*/lib/*
fixtures


================================================
FILE: .eslintrc.json
================================================
{
  "extends": ["plugin:@typescript-eslint/recommended", "airbnb", "plugin:prettier/recommended"],
  "env": {
    "browser": true,
    "commonjs": true,
    "es6": true,
    "node": true
  },
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "sourceType": "module",
    "ecmaFeatures": {
      "jsx": true,
      "experimentalObjectRestSpread": true
    }
  },
  "globals": {
    "describe": "readonly",
    "it": "readonly",
    "expect": "readonly",
    "jest": "readonly",
    "$": "readonly",
    "afterEach": "readonly",
    "beforeEach": "readonly",
    "NodeJS": "writable"
  },
  "rules": {
    "prettier/prettier": [
      "error",
      {
        "trailingComma": "es5",
        "printWidth": 100
      }
    ],
    "linebreak-style": ["error", "unix"],
    "max-classes-per-file": 0,
    "no-case-declarations": 0,
    "no-continue": 0,
    "no-empty": 0,
    "no-empty-function": 0,
    "no-param-reassign": 0,
    "no-prototype-builtins": 0,
    "no-shadow": 0,
    "no-restricted-syntax": 0,
    "no-underscore-dangle": 0,
    "no-useless-constructor": 0,
    "no-useless-escape": 0,
    "no-use-before-define": ["error", {"functions": false, "classes": false}],
    "no-unused-vars": 0,
    "no-unused-expressions": ["error", {"allowShortCircuit": true, "allowTernary": true}],
    "no-plusplus": 0,
    "no-nested-ternary": 0,
    "one-var": 0,
    "prefer-promise-reject-errors": 0,
    "prefer-regex-literals": 0,
    "prefer-destructuring": 0,
    "global-require": 0,
    "guard-for-in": 0,
    "func-names": 0,
    "strict": 0,
    "radix": 0,
    "class-methods-use-this": 0,
    "import/no-extraneous-dependencies": 1,
    "import/no-dynamic-require": 0,
    "import/no-mutable-exports": 0,
    "import/no-unresolved": 0,
    "import/extensions": 0,
    "import/prefer-default-export": 0,
    "react/jsx-filename-extension": [1, {"extensions": [".js", ".jsx", "ts", "tsx"]}],
    "react/sort-comp": 0,
    "react/prefer-stateless-function": 0,
    "react/no-array-index-key": 0,
    "react/no-children-prop": 0,
    "react/jsx-props-no-spreading": 0,
    "react/jsx-one-expression-per-line": 0,
    "react/no-multi-comp": 0,
    "react/destructuring-assignment": 0,
    "react/button-has-type": 0,
    "react/require-default-props": 0,
    "jsx-a11y/click-events-have-key-events": 0,
    "jsx-a11y/no-static-element-interactions": 0,
    "jsx-a11y/no-noninteractive-element-interactions": 0,
    "@typescript-eslint/ban-ts-comment": 0,
    "@typescript-eslint/explicit-function-return-type": 0,
    "@typescript-eslint/explicit-module-boundary-types": 0,
    "@typescript-eslint/no-empty-function": 0,
    "@typescript-eslint/no-unused-vars": [2, {"vars": "all", "args": "none"}]
  }
}


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
 - OS: [e.g. MacOS]
 - node version [e.g. v16.13.1]

**Additional context**
Add any other context about the problem here.


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.


================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
<!--
  Thanks so much for your PR and contribution.
  
  Before submitting, please make sure to follow the Pull Request Guidelines: https://github.com/arco-design/arco-cli/blob/master/CONTRIBUTING.md
-->

<!-- Put an `x` in "[ ]" to check a box) -->

## Types of changes

<!-- What types of changes does this PR introduce -->
- [ ] New feature
- [ ] Bug fix
- [ ] Documentation change
- [ ] Coding style change
- [ ] Refactoring
- [ ] Performance improvement
- [ ] Test cases
- [ ] Continuous integration
- [ ] Typescript definition change
- [ ] Breaking change

## Background and context

<!-- Explain what problem does the PR solve -->
<!-- Link to related open issues if applicable -->

## Solution

<!-- Describe how the problem is fixed in detail -->

## How is the change tested?

<!-- Unit tests should be added/updated for bug fixes and new features, if applicable -->
<!-- Please describe how you tested the change. E.g. Creating/updating unit tests or attaching a screenshot of how it works with your change -->

## Changelog

| Changelog(CN) | Changelog(EN) | Related issues | 
| ------------- | ------------- | -------------- |

## Checklist:

- [ ] Provide changelog for relevant changes (e.g. bug fixes and new features) if applicable.
- [ ] Changes are submitted to the appropriate branch (e.g. features should be submitted to `feature` branch and others should be submitted to `master` branch)

## Other information

<!-- Please describe what other information that should be taken care of. E.g. describe the impact if introduce a breaking change -->


================================================
FILE: .gitignore
================================================
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock
.npmrc

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint/stylelint cache
.eslintcache
.stylelintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next

**/__test__/fixtures/es
**/__test__/fixtures/lib
**/__test__/fixtures/dist

.idea

**/.DS_Store

package-lock.json
fixtures/**/dist
packages/**/dist


================================================
FILE: .husky/pre-commit
================================================
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run eslint
npm run stylelint


================================================
FILE: .prettierrc.json
================================================
{
  "arrowParens": "always",
  "jsxBracketSameLine": false,
  "jsxSingleQuote": false,
  "printWidth": 100,
  "semi": true,
  "singleQuote": true,
  "tabWidth": 2,
  "trailingComma": "es5",
  "useTabs": false
}


================================================
FILE: .scripts/build-esm.sh
================================================
root=`git rev-parse --show-toplevel`
babel_config_path="${root}/babel.config.js"

babel_options=""

if [[ $1 == dev ]]; then
  babel_options="--watch --source-maps"
fi

# Compile .ts with babel and copy tsc un-support files
babel src -d dist -x ".ts,.tsx,.js" --copy-files --verbose --config-file $babel_config_path $babel_options


================================================
FILE: .scripts/build-type.sh
================================================
# disable this command for now
# tsc --emitDeclarationOnly


================================================
FILE: .scripts/build.sh
================================================
root=`git rev-parse --show-toplevel`
babel_config_path="${root}/babel.config.js"

flag_no_source_maps="no-source-maps"
babel_options="--plugins=@babel/plugin-transform-modules-commonjs"

if [[ $1 == dev ]]; then
  babel_options="$babel_options --watch"
fi

if [[ "$*" != *"$flag_no_source_maps"* ]]; then
  babel_options="$babel_options --source-maps"
fi

# Compile .ts with babel and copy tsc un-support files
babel src -d dist -x ".ts,.tsx,.js" --copy-files --verbose --config-file $babel_config_path $babel_options


================================================
FILE: .scripts/flatPackages.js
================================================
/* eslint-disable */
const path = require('path');
const fs = require('fs-extra');
const gulp = require('gulp');
const gulpReplace = require('gulp-replace');
const getLocalPackages = require('./getLocalPackages');

const NEW_PACKAGES_DIR = path.resolve(__dirname, '../_packages');
const PATH_IGNORE_PATTERN = /ui-foundation|app|stone|legacy/;

const DEFAULT_PACKAGE_JSON = {
  version: '0.1.0',
  scripts: {
    dev: 'sh ../../.scripts/build.sh dev',
    build: 'sh ../../.scripts/build.sh',
    'build-type': 'sh ../../.scripts/build-type.sh',
    clean: 'rm -rf dist',
    'clean-type': 'find dist -name *.d.ts |xargs rm -rf',
    prepublishOnly: 'npm run build',
  },
  files: ['dist'],
  license: 'MIT',
};

async function flatPackages() {
  const originPackages = await getLocalPackages();
  const newPackages = {};

  originPackages.forEach(({ name, location }) => {
    if (location.match(PATH_IGNORE_PATTERN)) {
      return;
    }

    const parentDir = path.dirname(location);
    const dirname = parentDir.split('/').pop();
    newPackages[parentDir] ||= {
      dirname,
      name: `@arco-cli/${dirname}`,
      path: path.resolve(NEW_PACKAGES_DIR, dirname),
      packages: [],
      children: [],
    };
    newPackages[parentDir].packages.push(name);
    newPackages[parentDir].children.push(location);
  });

  Object.values(newPackages).forEach(({ path: newPackagePath, name, children }) => {
    const newPackageJson = {
      name,
      ...DEFAULT_PACKAGE_JSON,
    };
    const childrenDeps = {
      peerDependencies: {},
      dependencies: {},
      devDependencies: {},
    };

    children.forEach((location) => {
      const packageJson = fs.readJsonSync(path.resolve(location, 'package.json'));
      Object.assign(childrenDeps.peerDependencies, packageJson.peerDependencies);
      Object.assign(childrenDeps.dependencies, packageJson.dependencies);
      Object.assign(childrenDeps.devDependencies, packageJson.devDependencies);
    });

    Object.entries(childrenDeps).forEach(([depType, deps]) => {
      Object.entries(deps)
        .sort(([keyA], [keyB]) => {
          return keyB.startsWith('@') && !keyA.startsWith('@') ? 1 : keyA > keyB ? 1 : -1;
        })
        .map(([key, value]) => {
          if (key.startsWith('@arco-cli/')) {
            const newPackagesInfo = Object.values(newPackages);
            for (const { name, packages } of newPackagesInfo) {
              if (packages.indexOf(key) > -1) {
                return [name, value];
              }
            }
          }

          return [key, value];
        })
        .forEach(([key, value]) => {
          if (key !== newPackageJson.name) {
            newPackageJson[depType] ||= {};
            newPackageJson[depType][key] = value;
          }
        });
    });

    // write new packageJson
    fs.ensureDirSync(`${newPackagePath}/src`);
    fs.writeJsonSync(path.join(newPackagePath, 'package.json'), newPackageJson, { spaces: 2 });

    // copy children's source file
    for (const childLocation of children) {
      fs.copySync(
        `${childLocation}/src`,
        `${newPackagePath}/src/${childLocation.split('/').pop()}`
      );
    }
  });

  return Promise.all(
    Object.values(newPackages).map(({ name, path: newPackagePath, packages }) => {
      return new Promise((resolve, reject) => {
        gulp
          .src(`${newPackagePath}/src/**/*.*`)
          .pipe(
            gulpReplace(/'@arco-cli\/[^']+'/g, function doReplace(match) {
              if (PATH_IGNORE_PATTERN.test(match)) {
                return match;
              }

              const fileRelativePath = this.file.relative;
              const splitPaths = match.replace(/'/g, '').split('/');
              const originPackage = splitPaths.slice(0, 2).join('/');
              const originImportFrom = splitPaths.slice(2).join('/');

              let newPackage = Object.values(newPackages).find(({ packages }) => {
                return packages.indexOf(originPackage) > -1;
              })?.name;

              if (!newPackage) {
                return 'NO_MATCH';
              }

              const newImportFrom = `${
                newPackage === name
                  ? `@self`
                  : `${newPackage}/dist`
              }/${originPackage.split('/').pop()}`;

              if (originImportFrom) {
                return `'${newImportFrom}/${originImportFrom.replace('dist/', '')}'`;
              } else {
                return `'${newImportFrom}'`;
              }
            })
          )
          .pipe(gulp.dest(`${newPackagePath}/src`))
          .on('end', () => {
            console.log(`_________ ${newPackagePath}`);
            resolve();
          })
          .on('error', (error) => {
            reject(error);
            console.error(error);
          });
      });
    })
  );
}

flatPackages()
  .then()
  .catch((err) => {
    console.log(err);
  });


================================================
FILE: .scripts/getLocalPackages.js
================================================
/* eslint-disable */
const path = require('path');
const { exec } = require('child_process');

const DIR_PACKAGES = path.resolve(__dirname, '../packages');

/**
 * @returns {Promise<Array<{ name: string; location: string }>>}
 */
module.exports = function () {
  return new Promise((resolve, reject) => {
    exec('lerna list --json', (error, stdout, stderr) => {
      const errMsg = 'Failed to collect packages info via [lerna list]';

      if (error) {
        reject({
          error,
          msg: errMsg,
        });
      }

      try {
        const infoList = JSON.parse(stdout).filter(({ location }) =>
          location.startsWith(DIR_PACKAGES)
        );
        resolve(infoList);
      } catch (error) {
        reject({
          error,
          msg: stderr || errMsg,
        });
      }
    });
  });
};


================================================
FILE: .scripts/linkLocalPackages.js
================================================
/* eslint-disable */
const path = require('path');
const fs = require('fs-extra');
const chalk = require('chalk');
const getLocalPackages = require('./getLocalPackages');

const DIR_NODE_MODULES = path.resolve(__dirname, '../node_modules');

async function linkLocalPackages() {
  try {
    const packages = await getLocalPackages();
    const packagesDone = [];
    packages.forEach(({ name, location }) => {
      const from = location;
      const to = `${DIR_NODE_MODULES}/${name}`;
      const nodeModulesEntryDir = path.resolve(
        DIR_NODE_MODULES,
        name.split('/').slice(0, -1).join('')
      );

      try {
        if (!fs.existsSync(to)) {
          fs.ensureDirSync(nodeModulesEntryDir);
          fs.symlinkSync(from, to, 'dir');
        }

        packagesDone.push(name);
      } catch (error) {
        console.error(chalk.red(`Failed to link ${to} from ${from}\n`), error);
      }
    });

    console.log(
      chalk.green(
        'Link workspace packages successfully. Following packages are linked to node_modules:\n'
      ),
      packagesDone
    );
    process.exit(0);
  } catch ({ error, msg }) {
    console.error(chalk.red(`${msg}\n`), error);
    process.exit(1);
  }
}

linkLocalPackages().finally(() => {});


================================================
FILE: .scripts/linkTsPaths.js
================================================
/* eslint-disable */
const path = require('path');
const fs = require('fs-extra');
const chalk = require('chalk');
const getLocalPackages = require('./getLocalPackages');

const ROOT_PATH = path.resolve(__dirname, '..');
const FILE_TSCONFIG = path.resolve(ROOT_PATH, 'tsconfig.paths.json');

async function linkLocalPackages() {
  try {
    const packages = await getLocalPackages();
    const tsconfig = fs.readJsonSync(FILE_TSCONFIG);
    const paths = {};

    packages.forEach(({ name, location }) => {
      location = `./node_modules/${name}`;
      paths[name] = [`${location}/src/index.ts`];
      paths[`${name}/dist/*`] = [`${location}/src/*`];
    });
    tsconfig.compilerOptions.paths = paths;
    fs.writeFileSync(FILE_TSCONFIG, JSON.stringify(tsconfig, null, 2));

    console.error(chalk.green('Generate tsconfig paths successfully.'));
  } catch ({ error, msg }) {
    console.error(chalk.red(`${msg}\n`), error);
    process.exit(1);
  }
}

linkLocalPackages().finally(() => {});


================================================
FILE: .stylelintignore
================================================
**/node_modules/**
**/dist/**


================================================
FILE: .stylelintrc
================================================
{
  "extends": "stylelint-config-standard-scss",
  "rules": {
    "block-no-empty": null,
    "block-opening-brace-space-before": "always",
    "declaration-block-trailing-semicolon": "always",
    "font-family-no-missing-generic-family-keyword": null,
    "import-notation": null,
    "no-invalid-double-slash-comments": null,
    "no-duplicate-selectors": null,
    "selector-class-pattern": null,
    "selector-pseudo-class-no-unknown": [
      true,
      {
        "ignorePseudoClasses": ["global"]
      }
    ],
    "string-quotes": "single",
    "scss/no-global-function-names": null
  }
}


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at pengjiyuan@bytendance.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

================================================
FILE: CONTRIBUTING.md
================================================

> English | [简体中文](./CONTRIBUTING.zh-CN.md)
# Contributing

Thank you for taking your time to contribute and make this project better! Here are some guidelines to help you get started. Please make sure to take a moment and read through them before submitting your contributions.

## Code of Conduct

This project is governed by the [Contributor Covenant Code of Conduct](./CODE_OF_CONDUCT.md). By participating, you are expected to adhere to it.

## Open Development

All work happens directly on GitHub. Both core team members and external contributors send pull requests which go through the same review process.

## Semantic Versioning

This project follows semantic versioning. We release patch versions for bug fixes or other changes that do not change the behavior of the API, minor versions for new features that are backward-compatible, and major versions for any breaking changes.

Every significant change is documented in the changelog file.

## Reporting Issues

We use [Github issues](https://github.com/arco-design/arco-cli/issues) for bug reports and feature requests. Before reporting an issue, please make sure you have searched for similar [issues](https://github.com/arco-design/arco-cli/issues) as they may have been already answered or being fixed. A new issue should be submitted via [issue helper](https://arco-design/issue-helper?repo=arco-cli). For bug reporting, please include the minimum code that can be used to reproduce the problem. For feature request, please specify what changes you want and what behavior you expect.

## Sending a pull request

1. Fork [the repository](https://github.com/arco-design/arco-cli) and create your branch from `master`. For new feature, please submit your changes directly to the `feature` branch. Other changes should go against `master` branch.
1. Run `npm run init` in the repository root.
1. Make changes to the codebase. Please add tests if applicable.
1. Commit your changes, adhering to the [Commit Guidelines](#commit-guidelines)
1. Open a new pull request, [referencing corresponding issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) if available.


## Commit Guidelines

Commit messages are required to follow the [conventional-changelog standard](https://www.conventionalcommits.org/en/v1.0.0/):

```bash
<type>[optional scope]: <description>

[optional body]

[optional footer(s)]
```

### Commit types

The following is a list of commit types:

- feat: A new feature or functionality
- fix: A bug fix
- docs: Documentation only changes
- style: Code formatting
- refactor: Code changes that neither fixes a bug nor adds a feature.
- perf: Improve performance.
- test: Add missing or correct existing tests.
- chore: Other commits that don’t modify src or test files.

## License

By contributing your code to the repository, you agree to license your contribution under the [MIT license](./LICENSE).

================================================
FILE: CONTRIBUTING.zh-CN.md
================================================

> [English](./CONTRIBUTING.md) | 简体中文

# 贡献指南

感谢你的宝贵时间。你的贡献将使这个项目变得更好!在提交贡献之前,请务必花点时间阅读下面的入门指南。

## 行为准则

该项目有一份 [行为准则](./CODE_OF_CONDUCT.md),希望参与项目的贡献者都能严格遵守。

## 透明的开发

所有工作都直接透明地在 GitHub 上进行。核心团队成员和外部贡献者的 pull requests 都需要经过相同的 review 流程。

## 语义化版本

该项目遵循语义化版本。我们对重要的漏洞修复发布修订号,对新特性或不重要的变更发布次版本号,对重大且不兼容的变更发布主版本号。

每个重大更改都将记录在 changelog 中。

## 报告 Issues

我们使用 [Github issues](https://github.com/arco-design/arco-cli/issues) 进行 bug 报告和新 feature 建议。在报告 bug 之前,请确保已经搜索过类似的 [问题](https://github.com/arco-design/arco-cli/issues?repo=arco-cli),因为它们可能已经得到解答或正在被修复。新问题应通过 [问题助手](https://arco-design/issue-helper) 提交。对于 bug 报告,请包含可用于重现问题的代码。对于新 feature 建议,请指出你想要的更改以及期望的行为。

## 提交 Pull Request

1. Fork [此仓库](https://github.com/arco-design/arco-cli),从 `master` 创建分支。新功能实现请发 pull request 到 `feature` 分支。其他更改发到 `master` 分支。
1. 在仓库根目录下执行 `npm run init`。
1. 对代码库进行更改。如果适用的话,请确保写了相应的测试。
1. 提交 git commit, 请同时遵守 [Commit 规范](#commit-guidelines)。
1. 提交 pull request, 如果有对应的 issue,请进行[关联](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)。

## Commit 指南

Commit messages 请遵循[conventional-changelog 标准](https://www.conventionalcommits.org/en/v1.0.0/):

```bash
<类型>[可选 范围]: <描述>

[可选 正文]

[可选 脚注]
```

### Commit 类型

以下是 commit 类型列表:

- feat: 新特性或功能
- fix: 缺陷修复
- docs: 文档更新
- style: 代码风格更新
- refactor: 代码重构,不引入新功能和缺陷修复
- perf: 性能优化
- test: 单元测试
- chore: 其他不修改 src 或测试文件的提交

## License

[MIT 协议](./LICENSE).

================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2021 Bytedance, Inc. and its affiliates.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

================================================
FILE: README.md
================================================
# Arco CLI

A command-line interface tool for creating, developing and managing Arco materials.

## How to start

`npm run init` to set up environment.

`lerna run dev` to enter dev mode.


================================================
FILE: babel.config.js
================================================
// eslint-disable-next-line @typescript-eslint/no-var-requires
const createResolvePath = require('babel-plugin-tsconfig-paths-module-resolver/create-resolve');

const defaultResolvePath = createResolvePath();

module.exports = function (api) {
  api.cache(true);

  const presets = ['@babel/preset-react', '@babel/typescript'];

  const plugins = [
    'babel-plugin-transform-typescript-metadata',
    '@babel/plugin-transform-runtime',
    ['@babel/plugin-proposal-decorators', { legacy: true }],
    '@babel/plugin-proposal-export-namespace-from',
    '@babel/plugin-proposal-object-rest-spread',
    '@babel/plugin-proposal-optional-chaining',
    '@babel/plugin-proposal-class-properties',
    '@babel/plugin-proposal-logical-assignment-operators',
    [
      'tsconfig-paths-module-resolver',
      {
        resolvePath: function customResolvePath(sourceFile, currentFile, opts) {
          // alias for @arco-cli/packages is only for IDE ts-hint
          // we don't need to transform it while compiling
          if (sourceFile.startsWith('@arco-cli/')) {
            return null;
          }

          return defaultResolvePath(sourceFile, currentFile, opts);
        },
      },
    ],
  ];

  return {
    presets,
    plugins,
    only: ['**/*.ts', '**/*.tsx'],
    //  in generator/src/templates, babel should only compile files NOT ends with tpl.ts
    ignore: [/generator\/src\/templates\/([^/]+\/)*.+(?<!(tpl|desc).)tsx?$/],
  };
};


================================================
FILE: jest.config.ts
================================================
import type { Config } from 'jest';

const config: Config = {
  preset: 'ts-jest',
  testEnvironment: 'node',
  collectCoverage: true,
  collectCoverageFrom: ['packages/*/src/*.{j,t}s'],
  testRegex: '.*\\.test\\.(j|t)sx?$',
  testPathIgnorePatterns: ['/node_modules/'],
  transformIgnorePatterns: ['node_modules/[^/]+?/(?!(es|node_modules)/)'],
};

export default config;


================================================
FILE: lerna.json
================================================
{
  "version": "independent",
  "useWorkspaces": true,
  "npmClient": "pnpm",
  "ignoreChanges": ["**/ui/**"]
}


================================================
FILE: package.json
================================================
{
  "name": "@arco-design/arco-cli",
  "description": "Arco CLI & Arco Scripts",
  "private": true,
  "scripts": {
    "prepare": "husky install",
    "init": "pnpm i && npm run build",
    "clean": "lerna run clean --parallel --ignore=\"@arco-cli/workspace-materials\"",
    "build": "lerna run build --parallel --ignore=\"@arco-cli/workspace-materials\" && npm run build:materials",
    "build:materials": "lerna run build --scope=\"@arco-cli/workspace-materials\"",
    "link": "node ./scripts/linkLocalPackages.js",
    "format": "prettier --config --write \"packages/**/*.{js,jsx,ts,tsx}\"",
    "eslint": "eslint packages/ --fix --cache --quiet --ext .js,.jsx,.ts,.tsx",
    "stylelint": "stylelint 'packages/**/*.scss' --fix --cache"
  },
  "dependencies": {
    "@babel/cli": "^7.19.3",
    "@babel/core": "^7.20.5",
    "@babel/plugin-proposal-class-properties": "^7.18.6",
    "@babel/plugin-proposal-decorators": "^7.20.5",
    "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
    "@babel/plugin-proposal-logical-assignment-operators": "^7.20.7",
    "@babel/plugin-proposal-object-rest-spread": "^7.20.2",
    "@babel/plugin-proposal-optional-chaining": "^7.21.0",
    "@babel/plugin-transform-modules-commonjs": "^7.19.6",
    "@babel/plugin-transform-runtime": "^7.19.6",
    "@babel/preset-env": "^7.20.2",
    "@babel/preset-react": "^7.18.6",
    "@babel/preset-typescript": "^7.18.6",
    "@babel/runtime": "^7.20.6",
    "@mdx-js/react": "^1.6.22",
    "babel-plugin-tsconfig-paths-module-resolver": "^1.0.4",
    "chalk": "^4.1.2",
    "fs-extra": "^10.1.0",
    "lodash": "^4.17.21",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-router-dom": "^6.5.0",
    "ts-jest": "^29.0.3",
    "ts-node": "^10.9.1",
    "typescript": "^4.9.3"
  },
  "devDependencies": {
    "@types/fs-extra": "^9.0.11",
    "@types/gulp": "^4.0.8",
    "@types/gulp-if": "^0.0.33",
    "@types/gulp-plumber": "^0.0.32",
    "@types/jest": "^29.2.5",
    "@types/lodash": "^4.14.191",
    "@types/merge-stream": "^1.1.2",
    "@types/node": "^15.6.0",
    "@types/react": "^17.0.39",
    "@types/through2": "^2.0.36",
    "@typescript-eslint/eslint-plugin": "^5.42.0",
    "@typescript-eslint/parser": "^5.42.0",
    "eslint": "^8.26.0",
    "eslint-config-airbnb": "^19.0.4",
    "eslint-config-prettier": "^8.5.0",
    "eslint-plugin-import": "^2.26.0",
    "eslint-plugin-jsx-a11y": "^6.6.1",
    "eslint-plugin-prettier": "^4.2.1",
    "eslint-plugin-react": "^7.31.10",
    "eslint-plugin-react-hooks": "^4.6.0",
    "husky": "^8.0.3",
    "jest": "^29.2.2",
    "lerna": "^6.0.3",
    "lint-staged": "^13.1.1",
    "prettier": "^2.7.1",
    "stylelint": "^14.14.0",
    "stylelint-config-standard-scss": "^6.1.0"
  }
}


================================================
FILE: packages/arco/bin/arco
================================================
#!/usr/bin/env node
require('../dist/app');


================================================
FILE: packages/arco/package.json
================================================
{
  "name": "@arco-cli/arco",
  "version": "2.4.5",
  "description": "Main entry for arco cli",
  "homepage": "https://github.com/arco-design/arco-cli",
  "repository": "https://github.com/arco-design/arco-cli",
  "main": "./dist/index.js",
  "bin": {
    "arco": "bin/arco"
  },
  "scripts": {
    "dev": "sh ../../.scripts/build.sh dev",
    "build": "sh ../../.scripts/build.sh",
    "build-type": "sh ../../.scripts/build-type.sh",
    "clean": "rm -rf dist",
    "clean-type": "find dist -name *.d.ts |xargs rm -rf",
    "prepublishOnly": "npm run build"
  },
  "dependencies": {
    "@arco-cli/aspect": "^2.4.5",
    "@arco-cli/core": "^2.3.2",
    "@arco-cli/legacy": "^2.3.2",
    "@arco-cli/react": "^2.4.5",
    "@arco-cli/service": "^2.4.5",
    "@arco-cli/stone": "^2.0.0-beta.0",
    "fs-extra": "^10.1.0"
  },
  "files": [
    "dist",
    "bin"
  ],
  "license": "MIT"
}


================================================
FILE: packages/arco/src/app.ts
================================================
/* eslint-disable import/first */
process.on('uncaughtException', (error) => {
  console.error('uncaughtException', error);
  process.exit(1);
});

import { bootstrap } from '@arco-cli/legacy/dist/bootstrap';
import { handleErrorAndExit } from '@arco-cli/legacy/dist/cli/handleErrors';
import { setCliVersion } from '@arco-cli/legacy/dist/utils';
import { runCLI } from './loadCli';
import packageJson from '../package.json';

(async function initApp() {
  try {
    setCliVersion(packageJson.version);
    await bootstrap();
    await runCLI();
  } catch (err: any) {
    const originalError = err.originalError || err;
    await handleErrorAndExit(originalError, process.argv[2]);
  }
})();


================================================
FILE: packages/arco/src/arco.aspect.ts
================================================
import { Aspect } from '@arco-cli/stone';
import { CORE_ASPECT_ID_MAP } from '@arco-cli/legacy/dist/constants';

export const ArcoAspect = Aspect.create({
  id: CORE_ASPECT_ID_MAP.APP_ARCO,
});

export default ArcoAspect;


================================================
FILE: packages/arco/src/arco.main.runtime.ts
================================================
import { MainRuntime } from '@arco-cli/core/dist/cli';

import { manifestMap } from './manifest';

const manifests = Object.values(manifestMap);

export const ArcoMain = {
  name: 'arco',
  runtime: MainRuntime,
  dependencies: manifests,
  provider: () => {},
};


================================================
FILE: packages/arco/src/index.ts
================================================


================================================
FILE: packages/arco/src/loadCli.ts
================================================
import path from 'path';
import logger from '@arco-cli/legacy/dist/logger';
import { Stone, Extension, RuntimeDefinition } from '@arco-cli/stone';
import { ConfigOptions, StoneConfig as Config } from '@arco-cli/stone/dist/stoneConfig';
import {
  AspectLoaderAspect,
  AspectLoaderMain,
  getAspectDef,
} from '@arco-cli/core/dist/aspect-loader';
import { CLIAspect, MainRuntime, CLIMain } from '@arco-cli/core/dist/cli';
import { getWorkspaceInfo } from '@arco-cli/legacy/dist/workspace/workspaceLocator';

import { ArcoAspect } from './arco.aspect';
import { ArcoMain } from './arco.main.runtime';
import { manifestMap } from './manifest';

// add ArcoMain here to make sure every aspect in manifest is loaded
ArcoAspect.addRuntime(ArcoMain);

export async function requireAspects(aspect: Extension, runtime: RuntimeDefinition) {
  const id = aspect.name;
  if (!id) throw new Error('could not retrieve aspect id');

  // resolve aspect packages from the dir where @arco-cli/arco located
  // otherwise resolve.resolve can't find these packages
  const resolveModuleFrom = path.resolve(__dirname, '../../..');
  const { runtimePath } = await getAspectDef(id, runtime.name, resolveModuleFrom);

  // eslint-disable-next-line
  return runtimePath ? require(runtimePath) : null;
}

async function getConfig(cwd = process.cwd()): Promise<Config> {
  const workspaceInfo = await getWorkspaceInfo(cwd);
  if (workspaceInfo) {
    const configOpts: ConfigOptions = {
      shouldThrow: false,
      cwd: workspaceInfo?.path,
    };
    return Config.load(workspaceInfo.configFilename, configOpts);
  }
  return null;
}

async function loadArco(path = process.cwd()) {
  logger.info(`*** Loading arco *** argv:\n${process.argv.join('\n')}`);

  const config = await getConfig();
  const configMap = config ? config.toObject() : {};
  configMap[ArcoAspect.id] ||= {};
  configMap[ArcoAspect.id].cwd = path;

  const stone = await Stone.load([CLIAspect, ArcoAspect], MainRuntime.name, configMap);
  await stone.run(async (aspect: Extension, runtime: RuntimeDefinition) =>
    requireAspects(aspect, runtime)
  );

  const aspectLoader = stone.get<AspectLoaderMain>(AspectLoaderAspect.id);
  aspectLoader.setCoreAspects(Object.values(manifestMap));

  return stone;
}

export async function runCLI() {
  const stone = await loadArco();
  const cli = stone.get<CLIMain>(CLIAspect.id);
  cli.run(false);
}


================================================
FILE: packages/arco/src/manifest.ts
================================================
import { AspectLoaderAspect } from '@arco-cli/core/dist/aspect-loader';
import { LoggerAspect } from '@arco-cli/core/dist/logger';
import { PubsubAspect } from '@arco-cli/aspect/dist/pubsub';
import { ExpressAspect } from '@arco-cli/core/dist/express';
import { GraphqlAspect } from '@arco-cli/core/dist/graphql';
import { ComponentAspect } from '@arco-cli/aspect/dist/component';
import { EnvsAspect } from '@arco-cli/aspect/dist/envs';
import { ReactAspect } from '@arco-cli/react';
import { ReactRouterAspect } from '@arco-cli/aspect/dist/react-router';
import { BundlerAspect } from '@arco-cli/aspect/dist/bundler';
import { JestAspect } from '@arco-cli/aspect/dist/jest';
import { DocsAspect } from '@arco-cli/aspect/dist/docs';
import { WorkspaceAspect } from '@arco-cli/aspect/dist/workspace';
import { LessAspect } from '@arco-cli/aspect/dist/less';
import { SassAspect } from '@arco-cli/aspect/dist/sass';
import { MDXAspect } from '@arco-cli/aspect/dist/mdx';
import { UIAspect } from '@arco-cli/service/dist/ui';
import { PreviewAspect } from '@arco-cli/service/dist/preview';
import { TesterAspect } from '@arco-cli/service/dist/tester';
import { CompilerAspect } from '@arco-cli/service/dist/compiler';
import { BuilderAspect } from '@arco-cli/service/dist/builder';
import { SyncerAspect } from '@arco-cli/service/dist/syncer';
import { ForkAspect } from '@arco-cli/service/dist/fork';
import { GeneratorAspect } from '@arco-cli/service/dist/generator';
import { ArcoAspect } from './arco.aspect';

export const manifestMap = {
  [AspectLoaderAspect.id]: AspectLoaderAspect,
  [LoggerAspect.id]: LoggerAspect,
  [PubsubAspect.id]: PubsubAspect,
  [ExpressAspect.id]: ExpressAspect,
  [GraphqlAspect.id]: GraphqlAspect,
  [ComponentAspect.id]: ComponentAspect,
  [EnvsAspect.id]: EnvsAspect,
  [ReactAspect.id]: ReactAspect,
  [ReactRouterAspect.id]: ReactRouterAspect,
  [BundlerAspect.id]: BundlerAspect,
  [JestAspect.id]: JestAspect,
  [DocsAspect.id]: DocsAspect,
  [LessAspect.id]: LessAspect,
  [SassAspect.id]: SassAspect,
  [WorkspaceAspect.id]: WorkspaceAspect,
  [MDXAspect.id]: MDXAspect,
  [UIAspect.id]: UIAspect,
  [PreviewAspect.id]: PreviewAspect,
  [CompilerAspect.id]: CompilerAspect,
  [TesterAspect.id]: TesterAspect,
  [BuilderAspect.id]: BuilderAspect,
  [SyncerAspect.id]: SyncerAspect,
  [ForkAspect.id]: ForkAspect,
  [GeneratorAspect.id]: GeneratorAspect,
};

export function isCoreAspect(id: string) {
  const _reserved = [ArcoAspect.id];
  if (_reserved.includes(id)) return true;
  return !!manifestMap[id];
}

export function getAllCoreAspectsIds(): string[] {
  const _reserved = [ArcoAspect.id];
  return [...Object.keys(manifestMap), ..._reserved];
}


================================================
FILE: packages/arco/src/types.ts
================================================
import type { WorkspaceConfig } from '@arco-cli/aspect/dist/workspace';
import type { CompilerAspectConfig } from '@arco-cli/service/dist/compiler';
import type { GeneratorConfig } from '@arco-cli/service/dist/generator';

/**
 * type of arco.workspace.json config
 */
export type ArcoWorkspaceFile = {
  'arco.aspect/workspace'?: WorkspaceConfig;
  'arco.service/compiler'?: CompilerAspectConfig;
  'arco.service/generator'?: GeneratorConfig;
};

/**
 * type of arco.env.js config
 */
export type { ArcoEnvConfig } from '@arco-cli/aspect/dist/envs/types';


================================================
FILE: packages/arco/tsconfig.json
================================================
{
  "extends": "../../tsconfig.json",
  "include": ["src"],
  "compilerOptions": {
    "baseUrl": ".",
    "outDir": "dist",
    "paths": {
      "@arco-cli/stone": ["../stone/src"],
      "@arco-cli/stone/dist/*": ["../stone/src/*"],
      "@arco-cli/react": ["../react/src"],
      "@arco-cli/legacy/dist/*": ["../legacy/src/*"],
      "@arco-cli/core/dist/*": ["../core/src/*"],
      "@arco-cli/aspect/dist/*": ["../aspect/src/*"],
      "@arco-cli/service/dist*": ["../service/src/*"],
      "@arco-cli/ui-foundation-react": ["../ui-foundation-react/src"],
      "@arco-cli/ui-foundation-react/dist/*": ["../ui-foundation-react/src/*"]
    }
  }
}


================================================
FILE: packages/aspect/package.json
================================================
{
  "name": "@arco-cli/aspect",
  "version": "2.4.5",
  "homepage": "https://github.com/arco-design/arco-cli",
  "repository": "https://github.com/arco-design/arco-cli",
  "main": "./dist/index.js",
  "scripts": {
    "dev": "sh ../../.scripts/build.sh dev",
    "build": "sh ../../.scripts/build.sh",
    "build-type": "sh ../../.scripts/build-type.sh",
    "clean": "rm -rf dist",
    "clean-type": "find dist -name *.d.ts |xargs rm -rf",
    "prepublishOnly": "npm run build"
  },
  "files": [
    "dist"
  ],
  "license": "MIT",
  "dependencies": {
    "@apollo/client": "^3.7.2",
    "@arco-cli/core": "^2.3.2",
    "@arco-cli/legacy": "^2.3.2",
    "@arco-cli/service": "^2.4.5",
    "@arco-cli/stone": "^2.0.0-beta.0",
    "@arco-cli/ui-foundation-react": "^2.4.5",
    "@arco-design/web-react": "^2.42.2",
    "@babel/runtime": "^7.20.6",
    "@jest/test-result": "^29.5.0",
    "@mdx-js/mdx": "^1.6.22",
    "assert": "^2.0.0",
    "browserify-zlib": "^0.2.0",
    "buffer": "^6.0.3",
    "chalk": "^4.1.2",
    "chokidar": "^3.5.3",
    "comment-json": "^4.2.3",
    "compression-webpack-plugin": "^10.0.0",
    "constants-browserify": "^1.0.0",
    "crypto-browserify": "^3.12.0",
    "domain-browser": "^4.22.0",
    "enhanced-resolve": "^4.5.0",
    "eventemitter2": "^6.4.9",
    "fs-extra": "^10.1.0",
    "glob": "^8.0.3",
    "graphql-tag": "^2.12.6",
    "html-webpack-plugin": "^5.5.0",
    "https-browserify": "^1.0.0",
    "less": "^4.1.3",
    "loader-utils": "^3.2.1",
    "lodash": "^4.17.21",
    "lodash-es": "^4.17.21",
    "minimatch": "^6.1.6",
    "os-browserify": "^0.3.0",
    "p-map-series": "^2.1.0",
    "p-queue": "^6.6.2",
    "path-browserify": "^1.0.1",
    "penpal": "^6.2.2",
    "process": "^0.11.10",
    "punycode": "^2.1.1",
    "querystring-es3": "^0.2.1",
    "react-dev-utils": "^12.0.1",
    "remark-admonitions": "^1.2.1",
    "remark-frontmatter": "^2.0.0",
    "reset-css": "^5.0.1",
    "sass": "^1.57.0",
    "semver": "^7.3.8",
    "speed-measure-webpack-plugin": "^1.5.0",
    "stream-browserify": "^3.0.0",
    "stream-http": "^3.2.0",
    "string_decoder": "^1.3.0",
    "timers-browserify": "^2.0.12",
    "tty-browserify": "^0.0.1",
    "typescript": "^4.9.3",
    "unist-util-remove": "^2.1.0",
    "unist-util-visit": "^2.0.3",
    "url": "^0.11.0",
    "util": "^0.12.5",
    "vfile": "^4.2.1",
    "vm-browserify": "^1.1.2",
    "webpack": "^5.75.0",
    "webpack-assets-manifest": "^5.1.0",
    "webpack-dev-server": "^4.11.1",
    "webpack-merge": "^5.8.0",
    "yaml": "^1.10.2"
  },
  "devDependencies": {
    "@types/glob": "^8.0.1",
    "@types/less": "^3.0.3"
  }
}


================================================
FILE: packages/aspect/src/bundler/browserRuntime.ts
================================================
import { ExecutionContext } from '@aspect/envs';

export type BrowserRuntime = {
  entry: (context: ExecutionContext) => Promise<string[]>;
};


================================================
FILE: packages/aspect/src/bundler/bundler.aspect.ts
================================================
import { Aspect } from '@arco-cli/stone';

export const BundlerAspect = Aspect.create({
  id: 'arco.aspect/bundler',
});

export default BundlerAspect;


================================================
FILE: packages/aspect/src/bundler/bundler.main.runtime.ts
================================================
import { MainRuntime } from '@arco-cli/core/dist/cli';
import { Slot, SlotRegistry } from '@arco-cli/stone';
import { GraphqlAspect, GraphqlMain } from '@arco-cli/core/dist/graphql';

import { EnvsAspect, EnvsMain } from '@aspect/envs';
import { ComponentAspect, Component } from '@aspect/component';

import { BundlerAspect } from './bundler.aspect';
import { BrowserRuntime } from './browserRuntime';
import { DevServerService } from './devServer.service';
import { ComponentServer } from './componentServer';
import getDevServerSchema from './devServer.graphql';

export type BrowserRuntimeSlot = SlotRegistry<BrowserRuntime>;

export class BundlerMain {
  static runtime = MainRuntime;

  static dependencies = [EnvsAspect, GraphqlAspect, ComponentAspect];

  static slots = [Slot.withType<BrowserRuntime>()];

  static async provider(
    [envs, graphql]: [EnvsMain, GraphqlMain],
    _config,
    [runtimeSlot]: [BrowserRuntimeSlot]
  ) {
    const devServerService = new DevServerService(runtimeSlot);
    const bundler = new BundlerMain(envs, runtimeSlot, devServerService);
    graphql.register(getDevServerSchema(bundler));
    return bundler;
  }

  constructor(
    private envs: EnvsMain,
    private runtimeSlot: BrowserRuntimeSlot,
    private devService: DevServerService
  ) {}

  private componentServers: ComponentServer[] = [];

  /**
   * register a new browser runtime environment.
   */
  registerTarget(runtime: BrowserRuntime) {
    this.runtimeSlot.register(runtime);
    return this;
  }

  async devServer(components: Component[]): Promise<ComponentServer[]> {
    const envRuntime = await this.envs.createEnvironment(components);
    const servers: ComponentServer[] = await envRuntime.runOnce<ComponentServer[]>(this.devService);
    this.componentServers = servers;
    return servers;
  }

  /**
   * get a dev server instance containing a component.
   * @param component
   */
  getComponentServer(component: Component): undefined | ComponentServer {
    const envId = component.env;
    const server = this.componentServers.find(
      (componentServer) =>
        componentServer.context.relatedContexts.includes(envId) ||
        componentServer.context.id === envId
    );
    return server;
  }
}

BundlerAspect.addRuntime(BundlerMain);


================================================
FILE: packages/aspect/src/bundler/bundler.ts
================================================
import { Component } from '@aspect/component';

export type Asset = {
  /**
   * name of the asset.
   */
  name: string;

  /**
   * size of the asset in bytes.
   */
  size: number;

  /**
   * size of the compressed asset in bytes.
   */
  compressedSize?: number;
};

export type Chunk = {
  runtime: string[];
  files: string[];
  auxiliaryFiles: string[];
};

export type ChunksAssetsMap = {
  [assetName: string]: string[];
};

export type EntryAssets = {
  assets: Asset[];
  auxiliaryAssets: Asset[];
  assetsSize: number;
  compressedAssetsSize?: number;
  auxiliaryAssetsSize: number;
  compressedAuxiliaryAssetsSize: number;
};

export type EntriesAssetsMap = {
  [entryId: string]: EntryAssets;
};

export type BundlerResult = {
  /**
   * list of generated assets.
   */
  assets: Asset[];

  /**
   * A map of assets names for each chunk
   */
  assetsByChunkName?: ChunksAssetsMap;

  /**
   * A map of assets for each entry point
   */
  entriesAssetsMap?: EntriesAssetsMap;

  /**
   * Chunks info for built assets
   */
  chunks?: Chunk[];

  /**
   * errors thrown during the bundling process.
   */
  errors: Error[];

  /**
   * warnings thrown during the bundling process.
   */
  warnings: string[];

  /**
   * components included in the bundling process.
   */
  components: Component[];

  /**
   * timestamp in milliseconds when the task started
   */
  startTime?: number;

  /**
   * timestamp in milliseconds when the task ended
   */
  endTime?: number;

  /**
   * out put path of the Bundler Result
   */
  outputPath?: string;
};

export interface Bundler {
  run(): Promise<BundlerResult[]>;
}

export type BundlerMode = 'dev' | 'prod';


================================================
FILE: packages/aspect/src/bundler/bundlerContext.ts
================================================
import { BuildContext } from '@arco-cli/service/dist/builder';

import { Component } from '@aspect/component';

export type LibraryOptions = {
  /**
   * Specify a name for the library
   */
  name: string;

  /**
   * Configure how the library will be exposed
   * could be values like: 'umd', 'umd2', 'amd', 'commonjs',
   */
  type?: string;
};

export type Chunking = {
  /**
   * include all types of chunks (async / non-async) in splitting
   */
  splitChunks: boolean;
};

export type MetaData = {
  /**
   * Who initiate the bundling process
   */
  initiator?: string;
  /**
   * Env id (used usually to calculate the config)
   */
  envId?: string;
};

export type HtmlConfig = {
  /**
   * The title to use for the generated HTML document
   */
  title: string;
  /**
   * The file to write the HTML to. Defaults to index.html
   */
  filename?: string;
  /**
   * Allows you to add only some chunks (e.g only the unit-test chunk)
   */
  chunks?: string[];
  /**
   * Load chunks according to their order in the `chunks` array
   * @default auto
   */
  chunkOrder?: 'auto' | 'manual';
  /**
   * provide an inline template
   */
  templateContent: string;
  /**
   * Controls if and in what ways the output should be minified
   */
  minify?: boolean;

  /**
   * The favicon for the html page
   */
  favicon?: string;
};

export type Entry = {
  /**
   * Specifies the name of each output file on disk
   */
  filename: string;
  /**
   * Module(s) that are loaded upon startup
   */
  import: string | string[];

  /**
   * Specify library options to bundle a library from current entry
   */
  library?: LibraryOptions;
};

export type EntryMap = {
  [entryName: string]: Entry;
};

export type ModuleTarget = {
  /**
   * name of the module.
   */
  name: string;

  /**
   * module exposes.
   */
  exposes: {
    [internalPath: string]: string;
  };

  shared: {
    [key: string]: any;
  };
};

export type Target = {
  /**
   * entries of the target.
   */
  entries: string[] | EntryMap;

  /**
   * array of components included in the target.
   */
  components: Component[];

  /**
   * output path of the target
   */
  outputPath: string;

  /**
   * This option determines the name of each output bundle
   */
  filename?: string;

  /**
   * This option determines the name of non-initial chunk files
   */
  chunkFilename?: string;

  /**
   * Whether to run compression by the bundler
   */
  compress?: boolean;

  /**
   * List of peer dependencies
   */
  peers?: string[];

  /**
   * config for html generation
   */
  html?: HtmlConfig[];

  /**
   * module targets to expose.
   */
  modules?: ModuleTarget[];

  /**
   * Name for the runtime chunk
   */
  runtimeChunkName?: string;

  /**
   * Different configuration related to chunking
   */
  chunking?: Chunking;

  /**
   * A path for the host root dir
   * Host root dir is usually the env root dir
   * This can be used in different bundle options which run require.resolve
   * for example when configuring webpack aliases or webpack expose loader on the peers deps
   */
  hostRootDir?: string;
};

export interface BundlerContext extends BuildContext {
  /**
   * all components about to be build
   */
  components: Component[];

  /**
   * targets for bundling.
   */
  targets: Target[];

  /**
   * determines whether it is a production build, default is `true`.
   * in development, expect the bundler to favour debugging on the expanse of optimization.
   */
  development?: boolean;

  /**
   * public path output of the bundle.
   */
  publicPath?: string;

  /**
   * root path
   */
  rootPath?: string;

  /**
   * Whether to run compression by the bundler
   */
  compress?: boolean;

  /**
   * config for html generation for all targets
   */
  html?: HtmlConfig[];

  /**
   * modules for bundle to expose. used by module federation at webpack, or with different methods applied by various bundlers.
   */
  modules?: {
    name: string;
    fileName: string;
    exposes: { [key: string]: string };
  };

  /**
   * Additional info that can be used by the bundler for different stuff like logging info
   */
  metaData?: MetaData;
}


================================================
FILE: packages/aspect/src/bundler/componentServer.ts
================================================
import { AddressInfo } from 'net';
import { Port } from '@arco-cli/legacy/dist/utils/network/port';
import { ExecutionContext } from '@aspect/envs';
import { DevServer } from './devServer';
import { BindError } from './exceptions';

export class ComponentServer {
  errors?: Error[];

  private _port: number;

  constructor(
    /**
     * components contained in the existing component server.
     */
    readonly context: ExecutionContext,

    /**
     * port range of the component server.
     */
    readonly portRange: number[],

    /**
     * env dev server.
     */
    readonly devServer: DevServer
  ) {}

  hostname: string | undefined;

  private async selectPort(portRange?: number[] | number) {
    return Port.getPortFromRange(portRange || [3100, 3200]);
  }

  private getHostname(address: string | AddressInfo | null) {
    if (address === null) throw new BindError();
    if (typeof address === 'string') return address;

    let hostname = address.address;
    if (hostname === '::') {
      hostname = 'localhost';
    }

    return hostname;
  }

  get port() {
    return this._port;
  }

  /**
   * get the url of the component server.
   */
  get url() {
    // tailing `/` is required!
    return `/preview/${this.context.envRuntime.id}/`;
  }

  async listen() {
    const port = await this.selectPort(this.portRange);
    this._port = port;
    const server = await this.devServer.listen(port);
    const address = server.address();
    const hostname = this.getHostname(address);
    if (!address) throw new BindError();
    this.hostname = hostname;
  }
}


================================================
FILE: packages/aspect/src/bundler/dedupEnvs.ts
================================================
import type { ExecutionContext } from '@aspect/envs';

type GroupIdContextMap = Record<string, ExecutionContext[]>;

/**
 * de-duping dev servers by the amount of type the dev server configuration was overridden by envs.
 * This will split the dev server to groups of dev server that share the same webpack config
 */
export function dedupEnvs(contexts: ExecutionContext[]) {
  const groupedEnvs: GroupIdContextMap = {};

  contexts.forEach((context) => {
    const envId = context.env?.getDevEnvId(context);
    if (!envId) return;
    if (!(envId in groupedEnvs)) groupedEnvs[envId] = [];
    groupedEnvs[envId].push(context);
  });

  return groupedEnvs;
}


================================================
FILE: packages/aspect/src/bundler/devServer.graphql.ts
================================================
import gql from 'graphql-tag';

import { Component } from '@aspect/component';

import { BundlerMain } from './bundler.main.runtime';

export default function (bundler: BundlerMain) {
  return {
    typeDefs: gql`
      extend type Component {
        server: ComponentServer
      }

      type ComponentServer {
        env: String
        url: String
      }
    `,
    resolvers: {
      Component: {
        server: (component: Component) => {
          const componentServer = bundler.getComponentServer(component);
          return componentServer
            ? {
                env: componentServer.context.envRuntime.id,
                url: componentServer.url,
              }
            : {};
        },
      },
    },
  };
}


================================================
FILE: packages/aspect/src/bundler/devServer.service.ts
================================================
import { sep } from 'path';
import { flatten } from 'lodash';

import { EnvService, ExecutionContext, EnvDefinition } from '@aspect/envs';

import { BrowserRuntimeSlot } from './bundler.main.runtime';
import { ComponentServer } from './componentServer';
import { dedupEnvs } from './dedupEnvs';
import { DevServer } from './devServer';
import { DevServerContext } from './devServerContext';
import { getEntry } from './getEntry';

export type DevServerDescriptor = {
  /**
   * id of the dev server (e.g. jest/mocha)
   */
  id: string;

  /**
   * display name of the dev server (e.g. Jest / Mocha)
   */
  displayName: string;

  /**
   * string containing the config for display.
   */
  config: string;

  version?: string;
};

export class DevServerService implements EnvService<ComponentServer, DevServerDescriptor> {
  name = 'dev server';

  constructor(
    /**
     * browser runtime slot
     */
    private runtimeSlot: BrowserRuntimeSlot
  ) {}

  private getComponentsFromContexts(contexts: ExecutionContext[]) {
    return flatten(
      contexts.map((context) => {
        return context.components;
      })
    );
  }

  /**
   * builds the execution context for the dev server.
   */
  private async buildContext(
    context: ExecutionContext,
    additionalContexts: ExecutionContext[] = []
  ): Promise<DevServerContext> {
    context.relatedContexts = additionalContexts.map((ctx) => ctx.envDefinition.id);
    context.components = context.components.concat(
      this.getComponentsFromContexts(additionalContexts)
    );

    return Object.assign(context, {
      entry: await getEntry(context, this.runtimeSlot),
      // don't start with a leading "/" because it generates errors on Windows
      rootPath: `preview/${context.envRuntime.id}`,
      publicPath: `${sep}public`,
    });
  }

  async getDescriptor(
    environment: EnvDefinition,
    context?: ExecutionContext[]
  ): Promise<DevServerDescriptor | undefined> {
    if (!environment.env.getDevServer || !context) return undefined;
    const mergedContext = await this.buildContext(context[0], []);
    const devServer: DevServer = environment.env.getDevServer(mergedContext);

    return {
      id: devServer.id || '',
      displayName: devServer.displayName || '',
      config: devServer.displayConfig ? devServer.displayConfig() : '',
      version: devServer.version ? devServer.version() : '?',
    };
  }

  async runOnce(contexts: ExecutionContext[]): Promise<ComponentServer[]> {
    const groupedEnvs = await dedupEnvs(contexts);

    const servers = await Promise.all(
      Object.entries(groupedEnvs).map(async ([id, contextList]) => {
        const mainContext =
          contextList.find((context) => context.envDefinition.id === id) || contextList[0];
        const additionalContexts = contextList.filter((context) => context.envDefinition.id !== id);

        const devServerContext = await this.buildContext(mainContext, additionalContexts);
        const devServer: DevServer = await devServerContext.envRuntime.env.getDevServer(
          devServerContext
        );

        return new ComponentServer(devServerContext, [3300, 3400], devServer);
      })
    );

    return servers;
  }
}


================================================
FILE: packages/aspect/src/bundler/devServer.ts
================================================
import { Server } from 'http';

/**
 * interface for implementing dev servers.
 */
export interface DevServer {
  /**
   * attach to given port and start an http server
   */
  listen(port: number): Server | Promise<Server>;

  /**
   * display name of the dev-server.
   */
  displayName?: string;

  /**
   * icon of the dev-server.
   */
  icon?: string;

  /**
   * serialized config of the dev-server.
   */
  displayConfig?(): string;

  /**
   * path to the config in the filesystem.
   */
  configPath?: string;

  /**
   * id of the dev-server.
   */
  id: string;

  /**
   * return the dev-server version.
   */
  version?(): string;
}


================================================
FILE: packages/aspect/src/bundler/devServerContext.ts
================================================
import { ExecutionContext } from '@aspect/envs';

export interface DevServerContext extends ExecutionContext {
  /**
   * array of files to include.
   */
  entry: string[];

  /**
   * public path.
   */
  publicPath: string;

  /**
   * root path of the workspace.
   */
  rootPath: string;

  /**
   * title of the page.
   */
  title?: string;

  /**
   * favicon of the page.
   */
  favicon?: string;
}


================================================
FILE: packages/aspect/src/bundler/exceptions/bindError.ts
================================================
export class BindError extends Error {}


================================================
FILE: packages/aspect/src/bundler/exceptions/index.ts
================================================
export { BindError } from './bindError';


================================================
FILE: packages/aspect/src/bundler/getEntry.ts
================================================
import { ExecutionContext } from '@aspect/envs';

import { BrowserRuntimeSlot } from './bundler.main.runtime';

/**
 * computes the bundler entry.
 */
export async function getEntry(
  context: ExecutionContext,
  runtimeSlot: BrowserRuntimeSlot
): Promise<string[]> {
  const slotEntries = await Promise.all(
    runtimeSlot.values().map(async (browserRuntime) => browserRuntime.entry(context))
  );

  const slotPaths = slotEntries.reduce((acc, current) => {
    acc = acc.concat(current);
    return acc;
  });

  return slotPaths;
}


================================================
FILE: packages/aspect/src/bundler/index.ts
================================================
import { BundlerAspect } from './bundler.aspect';

export default BundlerAspect;
export { BundlerAspect };
export { DevServer } from './devServer';
export type { BundlerMain } from './bundler.main.runtime';
export type { DevServerContext } from './devServerContext';
export { ComponentServer } from './componentServer';

export {
  Bundler,
  BundlerResult,
  BundlerMode,
  Asset,
  Chunk,
  ChunksAssetsMap,
  EntriesAssetsMap,
  EntryAssets,
} from './bundler';

export {
  BundlerContext,
  Target,
  ModuleTarget,
  HtmlConfig as BundlerHtmlConfig,
  EntryMap as BundlerEntryMap,
  Entry as BundlerEntry,
  MetaData as BundlerContextMetaData,
} from './bundlerContext';


================================================
FILE: packages/aspect/src/component/component.aspect.ts
================================================
import { Aspect } from '@arco-cli/stone';

export const ComponentAspect = Aspect.create({
  id: 'arco.aspect/component',
});

export default ComponentAspect;


================================================
FILE: packages/aspect/src/component/component.graphql.ts
================================================
import gql from 'graphql-tag';
import type { Component } from './component';
import { ComponentMain } from './component.main.runtime';
import { ComponentFactory } from './componentFactory';

export default function (componentExtension: ComponentMain) {
  return {
    typeDefs: gql`
      type Component {
        # id of the component.
        id: String!

        # display name of the component
        name: String!

        # labels of the component
        labels: [String]!

        # package name of the component
        packageName: String!

        # version of the component
        version: String!

        # author of the component
        author: String!

        # additional styles of the component
        extraStyles: [ComponentExtraStyles]!
      }

      type ComponentExtraStyles {
        title: String
        href: String
      }

      type ComponentHost {
        id: String!
        name: String!

        # load a component.
        get(id: String!): Component

        # list components
        list(offset: Int, limit: Int): [Component]!
      }

      type Query {
        getHost(id: String): ComponentHost
      }
    `,
    resolvers: {
      Component: {
        id: (component: Component) => component.id,
        name: (component: Component) => component.name,
        labels: (component: Component) => component.labels,
        version: (component: Component) => component.version,
        packageName: (component: Component) => component.packageName,
        author: (component: Component) => component.author,
      },
      ComponentHost: {
        id: async (host: ComponentFactory) => {
          return host.name;
        },
        name: async (host: ComponentFactory) => {
          return host.name;
        },
        list: async (host: ComponentFactory) => {
          return host.list();
        },
        get: async (host: ComponentFactory, { id }: { id: string }) => {
          try {
            const component = await host.get(id);
            return component;
          } catch (error: any) {
            return null;
          }
        },
      },
      Query: {
        getHost: () => {
          return componentExtension.getHost();
        },
      },
    },
  };
}


================================================
FILE: packages/aspect/src/component/component.main.runtime.ts
================================================
import { Slot, SlotRegistry } from '@arco-cli/stone';
import { MainRuntime } from '@arco-cli/core/dist/cli';
import { GraphqlAspect, GraphqlMain } from '@arco-cli/core/dist/graphql';

import ComponentAspect from './component.aspect';
import { ComponentFactory } from './componentFactory';
import { HostNotFoundError } from './exceptions';
import getComponentSchema from './component.graphql';

export type ComponentHostSlot = SlotRegistry<ComponentFactory>;

export class ComponentMain {
  static runtime = MainRuntime;

  static slots = [Slot.withType<ComponentFactory>()];

  static dependencies = [GraphqlAspect];

  static provider([graphql]: [GraphqlMain], _config, [hostSlot]: [ComponentHostSlot]) {
    const componentMain = new ComponentMain(hostSlot);
    graphql.register(getComponentSchema(componentMain));
    return componentMain;
  }

  private _priorHost: ComponentFactory | undefined;

  constructor(private hostSlot: ComponentHostSlot) {}

  private getPriorHost() {
    if (this._priorHost) return this._priorHost;
    const hosts = this.hostSlot.values();
    return hosts[0];
  }

  registerHost(host: ComponentFactory) {
    this.hostSlot.register(host);
    return this;
  }

  getHost(id?: string): ComponentFactory {
    if (id) {
      const host = this.hostSlot.get(id);
      if (!host) throw new HostNotFoundError(id);
      return host;
    }

    return this.getPriorHost();
  }
}

ComponentAspect.addRuntime(ComponentMain);


================================================
FILE: packages/aspect/src/component/component.ts
================================================
import fs from 'fs-extra';
import path from 'path';
import { SourceFile } from '@arco-cli/legacy/dist/workspace/component/sources';
import { ComponentInfo } from '@arco-cli/legacy/dist/workspace/componentInfo';
import { DEFAULT_ENV } from '@arco-cli/legacy/dist/constants';
import { ComponentNotFoundInPathError } from '@arco-cli/legacy/dist/workspace/component/exceptions';

import { ExtensionDataEntry, ExtensionDataList } from './extensionData';

export class Component {
  public extensions: ExtensionDataList = new ExtensionDataList();

  constructor(private info: ComponentInfo, public files: SourceFile[] = []) {}

  get id() {
    return this.info.id;
  }

  get name() {
    return this.info.name;
  }

  get group() {
    return this.info.group;
  }

  get author() {
    return this.info.author;
  }

  get labels() {
    return this.info.labels;
  }

  get env() {
    return DEFAULT_ENV;
  }

  get language() {
    return 'javascript';
  }

  get version() {
    return this.info.version;
  }

  get packageName() {
    return this.info.packageName;
  }

  get dependencies() {
    return this.info.dependencies;
  }

  get devDependencies() {
    return this.info.devDependencies;
  }

  get peerDependencies() {
    return this.info.peerDependencies;
  }

  get rootDir() {
    return this.info.rootDir;
  }

  get componentDir() {
    return path.join(this.info.rootDir, this.entries.base);
  }

  get packageDir() {
    return this.info.packageDir;
  }

  get packageDirAbs() {
    return this.info.packageDirAbs;
  }

  get entries() {
    return this.info.entries;
  }

  get repository() {
    return this.info.repository;
  }

  get uiResource() {
    return this.info.uiResource;
  }

  get extraStyles() {
    return this.info.extraStyles;
  }

  get forkable() {
    return this.info.forkable;
  }

  get rawConfig() {
    return this.info.rawConfig;
  }

  async upsertExtensionData(extension: string, data: Record<string, any>) {
    if (!data) return;
    const existingExtension = this.extensions.findExtension(extension);
    if (existingExtension) {
      // Only merge top level of extension data
      Object.assign(existingExtension.data, data);
    } else {
      this.extensions.push(await new ExtensionDataEntry(extension, undefined, data));
    }
  }

  static async loadFromFileSystem(info: ComponentInfo, projectPath: string) {
    const rootDirAbs = path.join(projectPath, info.rootDir);
    if (!fs.existsSync(rootDirAbs)) throw new ComponentNotFoundInPathError(rootDirAbs);

    const files = info.files.map((file) => {
      const filePath = path.join(rootDirAbs, file.relativePath);
      return SourceFile.load(filePath, rootDirAbs, projectPath, {
        test: file.test,
      });
    });

    return new Component(info, files);
  }
}


================================================
FILE: packages/aspect/src/component/componentFactory.ts
================================================
import { AspectDefinition } from '@arco-cli/core/dist/aspect-loader';
import { Component } from './component';

export interface ComponentFactory {
  /**
   * name of the component host.
   */
  name: string;

  /**
   * path to the component host.
   */
  path: string;

  /**
   * returns a component by id.
   */
  get(id: string): Promise<Component | undefined>;

  /**
   * returns many components by ids.
   */
  getMany(ids: string[]): Promise<Component[]>;

  /**
   * get component-ids matching the given pattern. a pattern can have multiple patterns separated by a comma.
   * it uses multimatch (https://www.npmjs.com/package/multimatch) package for the matching algorithm, which supports
   * (among others) negate character "!" to exclude ids. See the package page for more supported characters.
   */
  getManyByPattern(pattern: string, throwForNoMatch?: boolean): Promise<Component[]>;

  /**
   * list all components in the host.
   */
  list(): Promise<Component[]>;

  /**
   * resolve dirs for aspects
   */
  resolveAspects: (runtimeName?: string) => Promise<AspectDefinition[]>;
}


================================================
FILE: packages/aspect/src/component/componentMap.ts
================================================
import { Component } from './component';

/**
 * allows to index components -> values.
 */
export class ComponentMap<T> {
  constructor(readonly hashMap: Map<string, [Component, T]>) {}

  get components() {
    return this.toArray().map(([component]) => component);
  }

  /**
   * get a value for a component.
   */
  get(component: Component) {
    return this.hashMap.get(component.id);
  }

  /**
   * get a value by the component-id
   */
  getValueByComponentId(componentId: string): T | null {
    const tuple = this.hashMap.get(componentId);
    if (!tuple) return null;
    return tuple[1];
  }

  /**
   * returns an array.
   */
  toArray() {
    return Array.from(this.hashMap.values());
  }

  /**
   * map entries and return a new component map.
   */
  map<NewType>(predicate: (value: T, component: Component) => NewType): ComponentMap<NewType> {
    const tuples: [string, [Component, NewType]][] = this.toArray().map(([component, value]) => {
      const newValue = predicate(value, component);
      return [component.id, [component, newValue]];
    });

    return new ComponentMap(new Map(tuples));
  }

  /**
   * similar to Array.forEach, but here you get both, the value and the component.
   */
  forEach(predicate: (value: T, component: Component) => void): void {
    this.toArray().forEach(([component, value]) => {
      predicate(value, component);
    });
  }

  /**
   * flatten values of all components into a single array.
   */
  flattenValue(): T[] {
    return this.toArray().reduce((acc: T[], [, value]) => {
      acc = acc.concat(value);
      return acc;
    }, []);
  }

  /**
   * filter all components with empty values and return a new map.
   */
  filter(predicate: (value: T) => boolean): ComponentMap<T> {
    const tuples = this.toArray().filter(([, value]) => {
      return predicate(value);
    });

    const asMap: [string, [Component, T]][] = tuples.map(([component, value]) => {
      return [component.id, [component, value]];
    });

    return new ComponentMap(new Map(asMap));
  }

  /**
   * get all component ids.
   */
  keys() {
    return this.hashMap.keys();
  }

  static create<U>(rawMap: [Component, U][]) {
    const newMap: [string, [Component, U]][] = rawMap.map(([component, data]) => {
      return [component.id, [component, data]];
    });
    return new ComponentMap(new Map(newMap));
  }

  /**
   * create a component map from components and a value predicate.
   * @param components components to zip into the map.
   * @param predicate predicate for returning desired value.
   */
  static as<U>(components: Component[], predicate: (component: Component) => U): ComponentMap<U> {
    const tuples: [string, [Component, U]][] = components.map((component) => {
      return [component.id, [component, predicate(component)]];
    });

    return new ComponentMap(new Map(tuples));
  }
}


================================================
FILE: packages/aspect/src/component/exceptions/hostNotFoundError.ts
================================================
export class HostNotFoundError extends Error {
  constructor(private hostName: string) {
    super();
  }

  toString() {
    return `[component] error: host '${this.hostName}' was not found`;
  }
}


================================================
FILE: packages/aspect/src/component/exceptions/index.ts
================================================
export { HostNotFoundError } from './hostNotFoundError';
export { InvalidNameError } from './invalidNameError';
export { InvalidVersionError } from './invalidVersionError';


================================================
FILE: packages/aspect/src/component/exceptions/invalidNameError.ts
================================================
export class InvalidNameError extends Error {
  componentName: string;

  constructor(componentName: string) {
    super(
      `error: "${componentName}" is invalid, component names can only contain alphanumeric, lowercase characters, and the following ["-", "_", "$", "!", "/"]`
    );
  }
}


================================================
FILE: packages/aspect/src/component/exceptions/invalidVersionError.ts
================================================
export class InvalidVersionError extends Error {
  version: string | null | undefined;

  constructor(version?: string | null) {
    super(
      `error: version ${
        version || '(empty)'
      } is not a valid semantic version. learn more: https://semver.org`
    );
  }
}


================================================
FILE: packages/aspect/src/component/extensionData.ts
================================================
import { cloneDeep, compact, isEmpty } from 'lodash';

type RemoveExtensionSpecialSign = '-';

type ExtensionConfig = { [extName: string]: any } | RemoveExtensionSpecialSign;

type ConfigOnlyEntry = {
  id: string;
  config: ExtensionConfig;
};

export const REMOVE_EXTENSION_SPECIAL_SIGN = '-';

export class ExtensionDataEntry {
  constructor(
    public extensionId?: string,
    public rawConfig: ExtensionConfig = {},
    public data: { [key: string]: any } = {}
  ) {}

  get config(): { [key: string]: any } {
    if (this.rawConfig === REMOVE_EXTENSION_SPECIAL_SIGN) return {};
    return this.rawConfig;
  }

  set config(val: { [key: string]: any }) {
    this.rawConfig = val;
  }

  get isRemoved(): boolean {
    return this.rawConfig === REMOVE_EXTENSION_SPECIAL_SIGN;
  }

  toObject() {
    return {
      extensionId: this.extensionId,
      // Do not use raw config here
      config: this.config,
      data: this.data,
    };
  }

  clone(): ExtensionDataEntry {
    return new ExtensionDataEntry(
      this.extensionId,
      cloneDeep(this.rawConfig),
      cloneDeep(this.data)
    );
  }
}

export class ExtensionDataList extends Array<ExtensionDataEntry> {
  static coreExtensionsNames: Map<string, string> = new Map();

  static registerCoreExtensionName(name: string) {
    ExtensionDataList.coreExtensionsNames.set(name, '');
  }

  static registerManyCoreExtensionNames(names: string[]) {
    names.forEach((name) => {
      ExtensionDataList.coreExtensionsNames.set(name, '');
    });
  }

  get ids(): string[] {
    return this.map((entry) => entry.extensionId);
  }

  findExtension(extensionId: string): ExtensionDataEntry | undefined {
    return this.find((extEntry) => extEntry.extensionId === extensionId);
  }

  remove(id) {
    return ExtensionDataList.fromArray(
      this.filter((entry) => {
        return entry.extensionId !== id;
      })
    );
  }

  toConfigObject() {
    const res = {};
    this.forEach((entry) => {
      if (entry.rawConfig && !isEmpty(entry.rawConfig)) {
        res[entry.extensionId] = entry.rawConfig;
      }
    });
    return res;
  }

  toConfigArray(): ConfigOnlyEntry[] {
    const arr = this.map((entry) => {
      // Remove extensions without config
      const clonedEntry = entry.clone();
      if (clonedEntry.rawConfig && !isEmpty(clonedEntry.rawConfig)) {
        return isEmpty(clonedEntry.rawConfig)
          ? null
          : { id: clonedEntry.extensionId, config: clonedEntry.config };
      }
      return null;
    });
    return compact(arr);
  }

  clone(): ExtensionDataList {
    const extensionDataEntries = this.map((extensionData) => extensionData.clone());
    return new ExtensionDataList(...extensionDataEntries);
  }

  static fromConfigObject(obj: { [extensionId: string]: any } = {}): ExtensionDataList {
    const arr = Object.keys(obj).map((extensionId) => {
      return new ExtensionDataEntry(extensionId, obj[extensionId]);
    });
    return this.fromArray(arr);
  }

  static fromArray(entries: ExtensionDataEntry[]): ExtensionDataList {
    if (!entries || !entries.length) {
      return new ExtensionDataList();
    }
    return new ExtensionDataList(...entries);
  }
}


================================================
FILE: packages/aspect/src/component/index.ts
================================================
import { ComponentAspect } from './component.aspect';

export default ComponentAspect;
export { ComponentAspect };
export { Component } from './component';
export type { ComponentMain } from './component.main.runtime';
export type { ComponentFactory } from './componentFactory';
export { ComponentMap } from './componentMap';


================================================
FILE: packages/aspect/src/component/type/custom.d.ts
================================================
declare module '*.module.css' {
  const classes: { readonly [key: string]: string };
  export default classes;
}
declare module '*.module.scss' {
  const classes: { readonly [key: string]: string };
  export default classes;
}
declare module '*.module.sass' {
  const classes: { readonly [key: string]: string };
  export default classes;
}

declare module '*.module.less' {
  const classes: { readonly [key: string]: string };
  export default classes;
}

declare module '*.less' {
  const classes: { readonly [key: string]: string };
  export default classes;
}

declare module '*.css' {
  const classes: { readonly [key: string]: string };
  export default classes;
}

declare module '*.sass' {
  const classes: { readonly [key: string]: string };
  export default classes;
}

declare module '*.scss' {
  const classes: { readonly [key: string]: string };
  export default classes;
}

declare module '*.mdx' {
  const component: any;
  export default component;
}


================================================
FILE: packages/aspect/src/component/uiRuntime/component.module.scss
================================================
.container {
}


================================================
FILE: packages/aspect/src/component/uiRuntime/component.tsx
================================================
import React, { useMemo, ReactNode, useEffect } from 'react';
// eslint-disable-next-line import/no-extraneous-dependencies
import { RouteProps } from 'react-router-dom';
import { flatten } from 'lodash';
import { SlotRegistry } from '@arco-cli/stone';

import { SlotRouter } from '@aspect/react-router/uiRuntime';

import { ComponentProvider } from './componentContext';
import { ComponentModel } from './componentModel';
import { useComponentQuery } from './hooks/useComponentQuery';
import { getIdFromLocation } from './utils/getIdFromLocation';

import styles from './component.module.scss';

export type ComponentPageElement = {
  type: 'before' | 'after';
  content: ReactNode;
};

export type ComponentPageSlot = SlotRegistry<ComponentPageElement[]>;

export type ComponentProps = {
  host: string;
  path?: string;
  componentId: string;
  routes: RouteProps[];
  containerSlot?: ComponentPageSlot;
  onComponentChange?: (activeComponent?: ComponentModel) => void;
};

export function Component({
  host,
  path,
  containerSlot,
  routes,
  componentId,
  onComponentChange,
}: ComponentProps) {
  const idFromLocation = getIdFromLocation();
  const resolvedComponentIdStr = path || idFromLocation;
  const { component, error } = useComponentQuery(componentId || idFromLocation, host);

  useEffect(() => onComponentChange?.(component), [component]);
  // cleanup when unmounting component
  useEffect(() => () => onComponentChange?.(undefined), []);

  const pageItems = useMemo(() => flatten(containerSlot?.values()), [containerSlot]);
  const before = useMemo(
    () => pageItems.filter((x) => x.type === 'before').map((x) => x.content),
    [pageItems]
  );
  const after = useMemo(
    () => pageItems.filter((x) => x.type === 'after').map((x) => x.content),
    [pageItems]
  );

  if (error) {
    return error.renderError();
  }

  if (!component) {
    return null;
  }

  return (
    <ComponentProvider component={component}>
      {before}
      <div className={styles.container}>
        {routes ? <SlotRouter parentPath={`${resolvedComponentIdStr}/*`} routes={routes} /> : null}
      </div>
      {after}
    </ComponentProvider>
  );
}


================================================
FILE: packages/aspect/src/component/uiRuntime/component.ui.runtime.tsx
================================================
import React from 'react';
import type { RouteProps } from 'react-router-dom';
import { UIRuntime } from '@arco-cli/service/dist/ui/ui.aspect';
import { Slot, SlotRegistry } from '@arco-cli/stone';

import ComponentAspect from '../component.aspect';
import { Component, ComponentPageElement, ComponentPageSlot } from './component';

type RouteSlot = SlotRegistry<RouteProps>;

export class ComponentUI {
  static runtime = UIRuntime;

  static dependencies = [];

  static slots = [Slot.withType<RouteProps>(), Slot.withType<ComponentPageElement[]>()];

  static provider(_deps, _config, [routeSlot, pageItemSlot]: [RouteSlot, ComponentPageSlot]) {
    const componentUI = new ComponentUI(routeSlot, pageItemSlot);
    return componentUI;
  }

  constructor(private routeSlot: RouteSlot, private pageItemSlot: ComponentPageSlot) {}

  readonly routePath = '/*';

  registerRoute(routes: RouteProps) {
    this.routeSlot.register(routes);
    return this;
  }

  registerPageItem = (...items: ComponentPageElement[]) => {
    this.pageItemSlot.register(items);
    return this;
  };

  getComponentUI(host: string, componentId?: string) {
    return (
      <Component
        host={host}
        componentId={componentId}
        routes={this.routeSlot.values()}
        containerSlot={this.pageItemSlot}
      />
    );
  }
}

ComponentAspect.addRuntime(ComponentUI);


================================================
FILE: packages/aspect/src/component/uiRuntime/componentContext.tsx
================================================
import React, { createContext, PropsWithChildren } from 'react';
import { ComponentModel } from './componentModel';

export const ComponentContext: React.Context<ComponentModel> = createContext<ComponentModel>(
  ComponentModel.empty()
);

export function ComponentProvider({
  component,
  children,
}: PropsWithChildren<{ component: ComponentModel }>) {
  return <ComponentContext.Provider value={component}>{children}</ComponentContext.Provider>;
}


================================================
FILE: packages/aspect/src/component/uiRuntime/componentError.tsx
================================================
import React from 'react';
import { NotFoundPage } from '@arco-cli/ui-foundation-react';

export class ComponentError {
  constructor(
    /**
     * http status code of error
     */
    public readonly code: number,

    /**
     * error message of the error
     */
    public readonly message?: string
  ) {}

  renderError() {
    return <NotFoundPage />;
  }
}


================================================
FILE: packages/aspect/src/component/uiRuntime/componentMeta/componentMeta.module.scss
================================================
.metadata {
  .flexBetween {
    display: flex;
    justify-content: space-between;
  }

  .title {
    margin: 0 0 12px;
    padding: 0;
    font-size: var(--preview-font-size-display-1);
    font-weight: 600;
    line-height: 1.3;
    color: var(--preview-color-text-1);
  }

  .descriptions {
    margin: 0 0 2px;
    font-size: var(--preview-font-size-body-3);
    line-height: 1.5;
    color: var(--preview-color-text-2);
  }

  .bottomWrapper {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
  }

  .labels {
    display: flex;
    align-items: center;
    font-size: var(--preview-font-size-body-3);
    color: var(--preview-color-text-3);

    :global(.arco-icon) {
      margin-right: 8px;
    }
  }

  .rightWrapper {
    display: flex;
    justify-content: center;

    > * {
      margin-left: 12px;
    }

    .extraStyleSelect {
      display: inline-flex;
      width: auto;

      :global(.arco-select-prefix) {
        margin-right: 8px;
      }

      :global(.arco-select-suffix) {
        margin-left: 8px;
      }
    }

    .usage {
      display: inline-flex;
      align-items: center;
      height: 32px;
      padding: 0 12px;
      border-radius: 2px;
      background: var(--color-fill-2);
      color: var(--color-text-1);
    }
  }
}


================================================
FILE: packages/aspect/src/component/uiRuntime/componentMeta/componentMeta.tsx
================================================
import React, { useEffect } from 'react';
import { Typography, Select } from '@arco-design/web-react';
import { IconTag, IconSkin } from '@arco-design/web-react/icon';
import { ComponentModel } from '../componentModel';

import styles from './componentMeta.module.scss';

export interface ComponentMetaProps {
  component: ComponentModel;
  onComponentExtraStyleChange?: (href: string) => void;
}

export function ComponentMeta({ component, onComponentExtraStyleChange }: ComponentMetaProps) {
  const defaultExtraStyle = component.extraStyles?.[0]?.href;

  useEffect(() => {
    defaultExtraStyle && onComponentExtraStyleChange?.(defaultExtraStyle);
  }, []);

  return (
    <div className={styles.metadata}>
      <h1 className={styles.title}>{component.name}</h1>
      <p className={styles.descriptions}>{component.description}</p>
      <div className={styles.bottomWrapper}>
        <div className={styles.labels}>
          <IconTag />
          {component.labels.join(' / ')}
        </div>

        <div className={styles.rightWrapper}>
          {component.extraStyles?.length ? (
            <Select
              className={styles.extraStyleSelect}
              allowClear
              prefix={<IconSkin />}
              placeholder="Choose a style"
              defaultValue={defaultExtraStyle}
              options={component.extraStyles.map(({ title, href }) => ({
                label: title,
                value: href,
              }))}
              onChange={onComponentExtraStyleChange}
            />
          ) : null}

          <div className={styles.usage}>
            <Typography.Text copyable>npm install {component.packageName}</Typography.Text>
          </div>
        </div>
      </div>
    </div>
  );
}


================================================
FILE: packages/aspect/src/component/uiRuntime/componentMeta/index.ts
================================================
export { ComponentMeta } from './componentMeta';


================================================
FILE: packages/aspect/src/component/uiRuntime/componentModel.ts
================================================
export type ComponentServer = {
  env: string;
  url: string;
};

export type ComponentOutline = {
  text: string;
  depth: number;
};

export type ComponentExtraDoc = {
  title: string;
  content: string;
  type?: 'md';
};

export type ComponentExtraStyle = {
  title: string;
  href: string;
};

export type ComponentModelProps = {
  id: string;
  name: string;
  packageName: string;
  version: string;
  author?: string;
  description?: string;
  labels?: string[];
  host?: string;
  server?: ComponentServer;
  outline?: ComponentOutline[];
  extraDocs?: ComponentExtraDoc[];
  extraStyles?: ComponentExtraStyle[];
};

export class ComponentModel {
  constructor(
    readonly id: string,
    readonly name: string,
    readonly packageName: string,
    readonly version: string,
    readonly author: string,
    readonly host: string,
    readonly server: ComponentServer | undefined,
    readonly description = '',
    readonly labels: string[] = [],
    readonly outline: ComponentOutline[] = [],
    readonly extraDocs: ComponentExtraDoc[] = [],
    readonly extraStyles: ComponentExtraStyle[] = []
  ) {}

  static from({
    id,
    name,
    packageName,
    version,
    author,
    host,
    server,
    description,
    labels,
    outline,
    extraDocs,
    extraStyles,
  }: ComponentModelProps) {
    return new ComponentModel(
      id,
      name,
      packageName,
      version,
      author,
      host,
      server,
      description,
      labels,
      outline,
      extraDocs,
      extraStyles
    );
  }

  static fromArray(componentsProps: ComponentModelProps[]) {
    return componentsProps.map((rawComponent) => ComponentModel.from(rawComponent));
  }

  static empty() {
    return new ComponentModel('', '', '', '', '', '', { env: '', url: '' });
  }
}


================================================
FILE: packages/aspect/src/component/uiRuntime/hooks/useComponentQuery.ts
================================================
// eslint-disable-next-line import/no-extraneous-dependencies
import { useMemo, useRef } from 'react';
import gql from 'graphql-tag';
import { useDataQuery } from '@arco-cli/ui-foundation-react';

import { ComponentModel } from '../componentModel';
import { ComponentError } from '../componentError';

const componentOverviewFields = gql`
  fragment componentOverviewFields on Component {
    id
    name
    description
    labels
    outline {
      depth
      text
    }
    server {
      env
      url
    }
    extraDocs {
      title
      content
    }
    extraStyles {
      title
      href
    }
  }
`;

const componentFields = gql`
  fragment componentFields on Component {
    id
    packageName
    ...componentOverviewFields
  }
  ${componentOverviewFields}
`;

const GET_COMPONENT = gql`
  query Component($id: String!, $extensionId: String!) {
    getHost(id: $extensionId) {
      # used for GQL caching
      id
      get(id: $id) {
        ...componentFields
      }
    }
  }
  ${componentFields}
`;

/**
 * provides data to component ui page, making sure both variables and return value are safely typed and memoized
 */
export function useComponentQuery(componentId: string, host: string, skip?: boolean) {
  const refId = useRef(componentId);
  refId.current = componentId;

  const { data, error, loading } = useDataQuery(GET_COMPONENT, {
    variables: { id: componentId, extensionId: host },
    skip,
  });
  const rawComponent = data?.getHost?.get;

  return useMemo(() => {
    return {
      component: rawComponent ? ComponentModel.from({ ...rawComponent, host }) : undefined,
      error: error
        ? new ComponentError(500, error.message)
        : !rawComponent && !loading
        ? new ComponentError(404)
        : undefined,
      loading,
    };
  }, [error, loading, rawComponent, host]);
}


================================================
FILE: packages/aspect/src/component/uiRuntime/index.ts
================================================
export { ComponentAspect } from '../component.aspect';
export type { ComponentUI } from './component.ui.runtime';
export { ComponentModel, ComponentModelProps } from './componentModel';
export { ComponentContext } from './componentContext';
export { ComponentMeta } from './componentMeta';


================================================
FILE: packages/aspect/src/component/uiRuntime/utils/getIdFromLocation.ts
================================================
/**
 * this can match component is like package-name/component-name
 * or @scope/package-name/component-name
 */
const componentRegex = /^(@([^/]+)\/)?([^/]+)\/([^/]+)/;

export function getIdFromLocation(): string | undefined {
  const splat = window.location.pathname.replace(/^\//, '');
  const match = componentRegex.exec(splat);
  return match?.[0];
}


================================================
FILE: packages/aspect/src/component/version/index.ts
================================================
export { Version, LATEST_VERSION, VERSION_DELIMITER } from './version';
export { versionParser } from './versionParser';


================================================
FILE: packages/aspect/src/component/version/version.ts
================================================
import semver from 'semver';
import { InvalidVersionError } from '../exceptions';

export const LATEST_VERSION = 'latest';

export const VERSION_DELIMITER = '@';

export class Version {
  latest: boolean;

  versionNum: string | null | undefined;

  constructor(versionNum: string | null | undefined, latest: boolean) {
    this.versionNum = versionNum;
    this.latest = latest;
  }

  toString() {
    if (!this.versionNum && this.latest) return 'latest';
    if (this.versionNum && this.latest) return `*${this.versionNum}`;
    if (this.versionNum && !this.latest) return this.versionNum.toString();
    throw new InvalidVersionError(this.versionNum);
  }

  isLaterThan(otherVersion: Version): boolean {
    if (!this.versionNum || this.versionNum === LATEST_VERSION) {
      return true;
    }
    if (!otherVersion.versionNum || otherVersion.versionNum === LATEST_VERSION) {
      return false;
    }
    return semver.gt(this.versionNum, otherVersion.versionNum);
  }
}


================================================
FILE: packages/aspect/src/component/version/versionParser.ts
================================================
import semver from 'semver';
import { InvalidVersionError } from '../exceptions';
import { Version, LATEST_VERSION } from './version';

export const LATEST_TESTED_MARK = '*';

function isLatest(versionStr: string): boolean {
  return versionStr === LATEST_VERSION;
}

function isLatestTested(versionStr: string) {
  if (!versionStr.includes(LATEST_TESTED_MARK)) return false;
  const splited = versionStr.split(LATEST_TESTED_MARK);
  if (splited.length !== 2) return false;
  const [, numberStr] = splited;
  const version = isRegular(numberStr);
  if (!version) return false;
  return true;
}

function isRegular(versionStr: string) {
  return semver.valid(versionStr);
}

function returnRegular(versionStr: string): Version {
  return new Version(versionStr, false);
}

function returnLatestTestedVersion(versionStr: string): Version {
  const [, numberStr] = versionStr.split(LATEST_TESTED_MARK);
  return new Version(numberStr, true);
}

function returnLatest(): Version {
  return new Version(null, true);
}

function convertToSemVer(versionStr: number) {
  return returnRegular(`0.0.${versionStr}`);
}

export function versionParser(versionStr: string | number | null | undefined): Version {
  const isVersionStr = typeof versionStr === 'string';
  if (!versionStr) return returnLatest();
  if (isVersionStr && isLatest(versionStr)) return returnLatest();
  if (isVersionStr && isLatestTested(versionStr)) return returnLatestTestedVersion(versionStr);
  if (isVersionStr && isRegular(versionStr)) return returnRegular(versionStr);
  if (!isVersionStr && Number.isInteger(versionStr)) return convertToSemVer(versionStr);
  throw new InvalidVersionError(versionStr.toString());
}


================================================
FILE: packages/aspect/src/docs/doc/doc.ts
================================================
import { DocPropList } from './docPropList';
import { SerializableMap } from './docProp';
import { DocOutline, DocSnippet } from '../type';

export class Doc {
  constructor(readonly filePath: string, readonly props: DocPropList) {}

  toObject() {
    return {
      filePath: this.filePath,
      props: this.props.docProps,
    };
  }

  get title(): string {
    const value = this.props.get('title')?.value;
    return (value as string) || '';
  }

  get description(): string {
    const value = this.props.get('description')?.value;
    return (value as string) || '';
  }

  get labels(): string[] {
    const value = this.props.get('labels')?.value;
    return (value as string[]) || [];
  }

  get outline(): DocOutline {
    return this.props.get('outline')?.value as [];
  }

  get snippets(): DocSnippet[] {
    return this.props.get('snippets')?.value as [];
  }

  static from(path: string, propObject: SerializableMap) {
    return new Doc(path, DocPropList.from(propObject));
  }

  static mergeDocProperty(docProp, extendProp): typeof docProp {
    if (Array.isArray(docProp) || Array.isArray(extendProp)) {
      return [
        ...(Array.isArray(docProp) ? docProp : []),
        ...(Array.isArray(extendProp) ? extendProp : []),
      ];
    }

    return extendProp || docProp;
  }
}


================================================
FILE: packages/aspect/src/docs/doc/docProp.ts
================================================
export type Serializable =
  | string
  | {
      /**
       * serialize the object into a string.
       */
      toString(): string;
    };

export type SerializableMap = {
  [key: string]: Serializable;
};

export class DocProp {
  constructor(
    /**
     * name of the doc property.
     */
    readonly name: string,

    /**
     * value of the doc property.
     */
    readonly value: Serializable
  ) {}

  getAs<T>() {
    return this.value as T;
  }
}


================================================
FILE: packages/aspect/src/docs/doc/docPropList.ts
================================================
import { DocProp } from './docProp';

export class DocPropList {
  constructor(readonly docProps: DocProp[]) {}

  get(name: string) {
    return this.docProps.find((docProp) => docProp.name === name);
  }

  static from(object: any): DocPropList {
    const props = Object.keys(object)
      .map((key) => {
        if (!object[key]) return undefined;
        return new DocProp(key, object[key]);
      })
      .filter((prop) => !!prop) as DocProp[];

    return new DocPropList(props);
  }
}


================================================
FILE: packages/aspect/src/docs/doc/index.ts
================================================
export { Doc } from './doc';
export { DocProp } from './docProp';
export { DocPropList } from './docPropList';


================================================
FILE: packages/aspect/src/docs/docs.aspect.ts
================================================
import { Aspect } from '@arco-cli/stone';

export const DocsAspect = Aspect.create({
  id: 'arco.aspect/docs',
});

export default DocsAspect;


================================================
FILE: packages/aspect/src/docs/docs.graphql.ts
================================================
import path from 'path';
import gql from 'graphql-tag';

import { Component } from '@aspect/component';
import { ComponentModel } from '@aspect/component/uiRuntime';

import { Doc } from './doc';
import { DocsMain } from './docs.main.runtime';

export default function (docs: DocsMain) {
  return {
    typeDefs: gql`
      extend type Component {
        description: String
        labels: [String]
        outline: [ComponentOutline]
        extraDocs: [ExtraDocItem]
      }

      type ExtraDocItem {
        title: String
        content: String
      }

      type ComponentOutline {
        depth: Int
        text: String
      }
    `,
    resolvers: {
      Component: {
        description: (component: Component): ComponentModel['description'] => {
          const doc = docs.getDoc(component);
          return doc?.description || '';
        },

        labels: (component: Component): ComponentModel['labels'] => {
          const doc = docs.getDoc(component);
          return Doc.mergeDocProperty(doc?.labels || [], component.labels);
        },

        outline: (component: Component): ComponentModel['outline'] => {
          const doc = docs.getDoc(component);
          return doc?.outline || [];
        },

        extraDocs: (component: Component): ComponentModel['extraDocs'] => {
          const results = [];
          component.entries.extraDocs.forEach(({ title, entry }) => {
            const file = component.files.find(
              (file) => file.relative === path.join(component.entries.base, entry)
            );
            if (file) {
              results.push({ title, content: file.contents.toString() });
            }
          });
          return results;
        },
      },
    },
  };
}


================================================
FILE: packages/aspect/src/docs/docs.main.runtime.ts
================================================
import path from 'path';
import fs from 'fs-extra';
import { MainRuntime } from '@arco-cli/core/dist/cli';
import { LoggerAspect, LoggerMain, Logger } from '@arco-cli/core/dist/logger';
import { Slot, SlotRegistry } from '@arco-cli/stone';
import { PreviewAspect, PreviewMain } from '@arco-cli/service/dist/preview';
import { BuilderAspect, BuilderMain } from '@arco-cli/service/dist/builder';
import { GraphqlAspect, GraphqlMain } from '@arco-cli/core/dist/graphql';
import { AbstractVinyl } from '@arco-cli/legacy/dist/workspace/component/sources';
import { Doclet } from '@arco-cli/legacy/dist/types';
import { DIR_ARTIFACTS_DOCS } from '@arco-cli/legacy/dist/constants';
import { toComponentManifestFilename } from '@arco-cli/legacy/dist/workspace/componentIdTo';

import { Environment } from '@aspect/envs';
import { WorkspaceAspect, Workspace } from '@aspect/workspace';
import { Component, ComponentMap } from '@aspect/component';

import DocsAspect from './docs.aspect';
import getDocsSchema from './docs.graphql';
import { DocsPreviewDefinition } from './docs.previewDefinition';
import { DocReader } from './type';
import { FileExtensionNotSupportedError } from './exceptions';
import { Doc, DocPropList } from './doc';
import { ComponentManifest, DocsTask } from './docs.task';

type DocReaderSlot = SlotRegistry<DocReader>;

export class DocsMain {
  static runtime = MainRuntime;

  static dependencies = [
    PreviewAspect,
    GraphqlAspect,
    WorkspaceAspect,
    LoggerAspect,
    BuilderAspect,
  ];

  static slots = [Slot.withType<DocReader>()];

  static provider(
    [preview, graphql, workspace, loggerMain, builder]: [
      PreviewMain,
      GraphqlMain,
      Workspace,
      LoggerMain,
      BuilderMain
    ],
    _config,
    [docReaderSlot]: [DocReaderSlot]
  ) {
    const logger = loggerMain.createLogger(DocsAspect.id);
    const docsMain = new DocsMain(logger, docReaderSlot);

    preview.registerDefinition(new DocsPreviewDefinition(docsMain));
    graphql.register(getDocsSchema(docsMain));

    if (workspace) {
      workspace.registerOnComponentLoad(async (component) => {
        const doc = await docsMain.computeDoc(component);
        return {
          doc: doc?.toObject(),
        };
      });
    }

    builder.registerBuildTasks([new DocsTask(docsMain)]);

    return docsMain;
  }

  constructor(private logger: Logger, private docReaderSlot: DocReaderSlot) {}

  private getDocFiles({ entries, files }: Component): {
    previews: AbstractVinyl[];
    previewContextProvider: AbstractVinyl | null;
  } {
    const previewEntry = path.join(entries.base, entries.preview);
    const previewContextProviderEntry = path.join(entries.base, entries.previewContextProvider);
    return {
      previews: files.filter((file) => previewEntry === file.relative),
      previewContextProvider:
        files.find((file) => previewContextProviderEntry === file.relative) || null,
    };
  }

  private getDocReader(extension: string) {
    return this.docReaderSlot.values().find((docReader) => docReader.isFormatSupported(extension));
  }

  /**
   * register a new doc reader. this allows to support further
   * documentation file formats.
   */
  registerDocReader(docReader: DocReader) {
    this.docReaderSlot.register(docReader);
    return this;
  }

  async getTemplate(env: Environment): Promise<string> {
    return env.getDocsTemplate?.();
  }

  /**
   * returns an array of doc file paths for a set of components.
   */
  getDocsMap(components: Component[]) {
    return ComponentMap.as(components, (component) => this.getDocFiles(component));
  }

  /**
   * return any component metadata generate by env
   * like component property tables
   */
  getMetadata(components: Component[], env: Environment) {
    return ComponentMap.as<{ doclets: Doclet[]; apiPlaceholderElementId?: string }>(
      components,
      (component) => {
        let jsdocEntryFiles = [];

        if (component.entries.jsdoc) {
          jsdocEntryFiles = (
            Array.isArray(component.entries.jsdoc)
              ? component.entries.jsdoc
              : [component.entries.jsdoc]
          )
            .map((jsdocEntry) => {
              return jsdocEntry
                ? component.files.find(
                    (file) => file.relative === path.join(component.entries.base, jsdocEntry)
                  )
                : null;
            })
            .filter(Boolean);
        }

        const doc = this.getDoc(component);

        return {
          doclets: env.getDocsMetadata?.(jsdocEntryFiles),
          apiPlaceholderElementId:
            doc.props.get('apiPlaceholderElementId')?.value?.toString() || '',
        };
      }
    );
  }

  /**
   * return the doc properties parsed from raw document file
   * like description / labels
   */
  getDoc(component: Component) {
    const docData = component.extensions.findExtension(DocsAspect.id)?.data?.doc || {
      filePath: '',
      props: [],
    };
    return new Doc(docData.filePath, new DocPropList(docData.props));
  }

  /**
   * compute a doc for a component.
   */
  async computeDoc(component: Component) {
    const docFiles = this.getDocFiles(component).previews;
    if (docFiles.length) {
      // currently taking the first docs file found with an abstract. (we support only one)
      const docFile = docFiles[0];

      try {
        const docReader = this.getDocReader(docFile.extname);
        if (!docReader) throw new FileExtensionNotSupportedError(docFile.relative, docFile.extname);
        const doc = await docReader.read(docFile.path, docFile.contents, component);
        return doc;
      } catch (err: any) {
        // it's ok to fail here.
        this.logger.debug(`docs.main.runtime.computeDoc caught an error: ${err.message}`);
        return null;
      }
    }

    return null;
  }

  /**
   * get manifest info from doc artifact
   */
  async getDocsManifestFromArtifact(component: Component): Promise<ComponentManifest> {
    const artifactManifestPathAbs = path.join(
      component.packageDirAbs,
      DIR_ARTIFACTS_DOCS,
      toComponentManifestFilename(component.id)
    );
    const emptyResult: ComponentManifest = { doclets: [], snippets: [], extraDocs: [] };

    if (fs.existsSync(artifactManifestPathAbs)) {
      try {
        const manifest: ComponentManifest = await fs.readJSON(artifactManifestPathAbs);
        return manifest || emptyResult;
      } catch (err) {}
    }

    return emptyResult;
  }
}

DocsAspect.addRuntime(DocsMain);


================================================
FILE: packages/aspect/src/docs/docs.previewDefinition.ts
================================================
import type { PreviewDefinition } from '@arco-cli/service/dist/preview';

import type { Component } from '@aspect/component';
import type { Environment } from '@aspect/envs';

import { DocsMain } from './docs.main.runtime';

export class DocsPreviewDefinition implements PreviewDefinition {
  readonly prefix = 'overview';

  readonly include = ['compositions'];

  readonly includePeers = true;

  constructor(
    /**
     * docs extension.
     */
    private docs: DocsMain
  ) {}

  /**
   * application root
   */
  async renderTemplatePath(env: Environment): Promise<string> {
    return this.docs.getTemplate(env);
  }

  /**
   * files to load.
   */
  async getModuleMap(components: Component[]) {
    return this.docs.getDocsMap(components);
  }

  /**
   * metadata to collect
   */
  async getMetadataMap(components: Component[], env: Environment) {
    return this.docs.getMetadata(components, env);
  }
}


================================================
FILE: packages/aspect/src/docs/docs.task.ts
================================================
import path from 'path';
import fs from 'fs-extra';
import { toFsCompatible } from '@arco-cli/legacy/dist/utils';
import { BuildContext, BuildTask, BuildTaskResult } from '@arco-cli/service/dist/builder';
import { BUILD_TASK_NAME_DOCS, DIR_ARTIFACTS_DOCS } from '@arco-cli/legacy/dist/constants';
import { toComponentManifestFilename } from '@arco-cli/legacy/dist/workspace/componentIdTo';
import { ComponentResult } from '@arco-cli/legacy/dist/workspace/componentResult';
import type { Doclet } from '@arco-cli/legacy/dist/types';

import { Component } from '@aspect/component';

import DocsAspect from './docs.aspect';
import type { DocsMain } from './docs.main.runtime';
import type { DocSnippet } from '../docs/type';

export type ComponentManifest = {
  doclets: Doclet[];
  snippets: DocSnippet[];
  extraDocs: Component['entries']['extraDocs'];
};

export class DocsTask implements BuildTask {
  readonly aspectId = DocsAspect.id;

  readonly name = BUILD_TASK_NAME_DOCS;

  constructor(
    /**
     * docs extension.
     */
    private docsMain: DocsMain
  ) {}

  async execute(context: BuildContext): Promise<BuildTaskResult> {
    const results: ComponentResult[] = [];
    // { artifactDirPath: { componentId: { ... } } }
    const packageManifestMap: Map<Component, ComponentManifest> = new Map();

    // remove docs artifacts dir at first
    await Promise.all(
      [...new Set(context.components.map(({ packageDirAbs }) => packageDirAbs))].map(
        async (packagePathAbs) => {
          await fs.remove(path.join(packagePathAbs, DIR_ARTIFACTS_DOCS));
        }
      )
    );

    // collect component doclets and snippets
    const componentMetadataMap = this.docsMain.getMetadata(
      context.components,
      context.envRuntime.env
    );

    // 从 context.env 获取 component metadata
    await Promise.all(
      context.components.map(async (component) => {
        const componentResult: ComponentResult = { id: component.id, errors: [] };
        let manifest: ComponentManifest = packageManifestMap.get(component);
        if (!manifest) {
          manifest = { doclets: [], snippets: [], extraDocs: [] };
          packageManifestMap.set(component, manifest);
        }

        // handle snippets/doclets bellow
        try {
          const doclets = componentMetadataMap.getValueByComponentId(component.id).doclets;
          const doc = this.docsMain.getDoc(component);
          manifest.doclets.push(...doclets);
          manifest.snippets.push(...doc.snippets);
        } catch (err) {
          componentResult.errors.push(err);
        }

        // handle extraDocs bellow
        await Promise.all(
          component.entries.extraDocs.map(async ({ title, entry }) => {
            const extraDoc = component.files.find(
              (file) =>
                file.relative === path.relative('./', path.join(component.entries.base, entry))
            );
            if (extraDoc) {
              const targetFilename = `${toFsCompatible(component.id)}-${extraDoc.path
                .split(path.sep)
                .pop()}`;

              try {
                const targetDirAbs = path.join(component.packageDirAbs, DIR_ARTIFACTS_DOCS);
                await fs.ensureDir(targetDirAbs);
                await fs.copyFile(extraDoc.path, path.join(targetDirAbs, targetFilename));
                const targetFileRelativePath = path.join(DIR_ARTIFACTS_DOCS, targetFilename);
                manifest.extraDocs.push({
                  title,
                  entry: targetFileRelativePath,
                });
              } catch (err) {
                componentResult.errors.push(err);
              }
            }
          })
        );
      })
    );

    await Promise.all(
      [...packageManifestMap.entries()].map(async ([component, manifest]) => {
        const targetDir = path.join(component.packageDirAbs, DIR_ARTIFACTS_DOCS);
        const manifestFilename = toComponentManifestFilename(component.id);
        await fs.ensureDir(targetDir);
        await fs.writeJSON(path.join(targetDir, manifestFilename), manifest, { spaces: 2 });
      })
    );

    return { componentsResults: results };
  }
}


================================================
FILE: packages/aspect/src/docs/exceptions/fileExtensionNotSupportedError.ts
================================================
export class FileExtensionNotSupportedError extends Error {
  constructor(filePath: string, extension: string) {
    super(
      `failed reading doc file: ${filePath} as file extension ${extension} is not supported by any of registered component doc readers.`
    );
  }
}


================================================
FILE: packages/aspect/src/docs/exceptions/index.ts
================================================
export { FileExtensionNotSupportedError } from './fileExtensionNotSupportedError';


================================================
FILE: packages/aspect/src/docs/index.ts
================================================
import { DocsAspect } from './docs.aspect';

export default DocsAspect;
export { DocsAspect };
export type { DocsMain } from './docs.main.runtime';
export { Doc } from './doc';
export type { DocReader, DocOutline, DocSnippet } from './type';


================================================
FILE: packages/aspect/src/docs/previewRuntime/docs.preview.runtime.tsx
================================================
// eslint-disable-next-line import/no-extraneous-dependencies
import { ComponentType } from 'react';
import type { Doclet } from '@arco-cli/legacy/dist/types';
import type { RenderingContext, PreviewModule } from '@arco-cli/service/dist/preview';
import {
  PreviewAspect,
  PreviewPreview,
  PreviewRuntime,
} from '@arco-cli/service/dist/preview/previewRuntime';

import { DocsAspect } from '../docs.aspect';

export type DocsRootProps = {
  componentId: string;
  doc: ComponentType | undefined;
  docContextProvider: ComponentType | undefined;
  context: RenderingContext;
  metadata: {
    doclets: Doclet[];
    apiPlaceholderElementId?: string;
  };
};

export class DocsPreview {
  static runtime = PreviewRuntime;

  static dependencies = [PreviewAspect];

  static async provider([preview]: [PreviewPreview]) {
    const docsPreview = new DocsPreview();

    preview.registerPreview({
      name: 'overview',
      render: docsPreview.render.bind(docsPreview),
      selectPreviewModel: docsPreview.selectPreviewModel.bind(docsPreview),
    });

    return docsPreview;
  }

  constructor() {}

  selectPreviewModel(componentId: string, modules: PreviewModule) {
    const relevant = modules.componentMap[componentId];
    // only one doc file is supported.
    return relevant?.[0];
  }

  render = async (
    componentId: string,
    modules: PreviewModule,
    _include,
    context: RenderingContext
  ) => {
    let doc = null;
    let docContextProvider = null;

    // import document preview module
    const dynamicImportModule = this.selectPreviewModel(componentId, modules);
    if (typeof dynamicImportModule === 'function') {
      doc = (await dynamicImportModule()).default;
    }

    // import context-provider for component preview
    const dynamicImportContextProvider = modules.componentContextProviderMap[componentId];
    if (typeof dynamicImportContextProvider === 'function') {
      docContextProvider = (await dynamicImportContextProvider()).default;
    }

    const metadata: any = modules.componentMetadataMap[componentId] || {};
    const docsProps: DocsRootProps = {
      context,
      componentId,
      doc,
      metadata,
      docContextProvider,
    };

    modules.mainModule.default(docsProps);
  };
}

DocsAspect.addRuntime(DocsPreview);


================================================
FILE: packages/aspect/src/docs/previewRuntime/index.ts
================================================
export { DocsRootProps } from './docs.preview.runtime';


================================================
FILE: packages/aspect/src/docs/type/custom.d.ts
================================================
declare module '*.module.css' {
  const classes: { readonly [key: string]: string };
  export default classes;
}
declare module '*.module.scss' {
  const classes: { readonly [key: string]: string };
  export default classes;
}
declare module '*.module.sass' {
  const classes: { readonly [key: string]: string };
  export default classes;
}

declare module '*.module.less' {
  const classes: { readonly [key: string]: string };
  export default classes;
}

declare module '*.less' {
  const classes: { readonly [key: string]: string };
  export default classes;
}

declare module '*.css' {
  const classes: { readonly [key: string]: string };
  export default classes;
}

declare module '*.sass' {
  const classes: { readonly [key: string]: string };
  export default classes;
}

declare module '*.scss' {
  const classes: { readonly [key: string]: string };
  export default classes;
}

declare module '*.mdx' {
  const component: any;
  export default component;
}


================================================
FILE: packages/aspect/src/docs/type/docOutline.ts
================================================
export type DocOutline = Array<{ depth: number; text: string }>;


================================================
FILE: packages/aspect/src/docs/type/docReader.ts
================================================
import type { Component } from '@aspect/component';

export interface DocReader {
  /**
   * read a component doc.
   */
  read(path: string, contents: Buffer, component: Component): Promise<any>;

  /**
   * determine which file formats are supported by the doc reader.
   */
  isFormatSupported(ext: string): boolean;
}


================================================
FILE: packages/aspect/src/docs/type/docSnippet.ts
================================================
export type DocSnippet = { language: string; code: string };


================================================
FILE: packages/aspect/src/docs/type/index.ts
================================================
export { DocReader } from './docReader';
export { DocOutline } from './docOutline';
export { DocSnippet } from './docSnippet';


================================================
FILE: packages/aspect/src/docs/uiRuntime/docs.ui.runtime.tsx
================================================
import React from 'react';
import { UIRuntime } from '@arco-cli/service/dist/ui/uiRuntime';

import { ComponentAspect, ComponentUI } from '@aspect/component/uiRuntime';

import DocsAspect from '../docs.aspect';
import { Overview } from './overview';

export class DocsUI {
  static runtime = UIRuntime;

  static dependencies = [ComponentAspect];

  static slots = [];

  static provider([component]: [ComponentUI]) {
    component.registerRoute({
      index: true,
      element: <Overview />,
    });
    const docUI = new DocsUI();
    return docUI;
  }

  constructor() {}
}

DocsAspect.addRuntime(DocsUI);


================================================
FILE: packages/aspect/src/docs/uiRuntime/index.tsx
================================================
export { DocsAspect } from '../docs.aspect';
export type { DocsUI } from './docs.ui.runtime';


================================================
FILE: packages/aspect/src/docs/uiRuntime/overview.module.scss
================================================
.overview {
  padding: 0 20px;

  .divider {
    margin: 40px 0 24px;
    border: none;
    border-bottom: 1px solid var(--preview-color-border);
  }

  :global(.arco-tabs-header-nav-rounded .arco-tabs-header-title) {
    margin: 12px 0;

    &:not(:first-child) {
      margin-left: 12px;
    }
  }
}


================================================
FILE: packages/aspect/src/docs/uiRuntime/overview.tsx
================================================
import React, { useContext, useState } from 'react';
import { WorkspaceContext } from '@arco-cli/ui-foundation-react';
import { ComponentPreview } from '@arco-cli/service/dist/preview/uiRuntime';
import { Tabs } from '@arco-cli/ui-foundation-react/dist/tabs';
import { MarkdownLive } from '@arco-cli/ui-foundation-react/dist/markdown/live';

import { ComponentContext, ComponentMeta } from '@aspect/component/uiRuntime';

import '@arco-cli/ui-foundation-react/dist/markdown/style/markdown.css';
import styles from './overview.module.scss';

export function Overview() {
  const { darkMode } = useContext(WorkspaceContext);
  const component = useContext(ComponentContext);
  const [extraStyle, setExtraStyle] = useState<string>(null);

  const titleComponentPreview = 'Preview';
  const eleComponentPreview = (
    <ComponentPreview
      component={component}
      previewName="overview"
      viewport={null}
      extraStyle={extraStyle}
      darkMode={darkMode}
    />
  );

  return (
    <div className={styles.overview}>
      <ComponentMeta component={component} onComponentExtraStyleChange={setExtraStyle} />

      <hr className={styles.divider} />

      {component.extraDocs?.length ? (
        <Tabs type="rounded">
          <Tabs.TabPane key={titleComponentPreview} title={titleComponentPreview}>
            {eleComponentPreview}
          </Tabs.TabPane>

          {component.extraDocs.map(({ title, content }) => {
            return (
              <Tabs.TabPane key={title} title={title}>
                <MarkdownLive children={content} />
              </Tabs.TabPane>
            );
          })}
        </Tabs>
      ) : (
        eleComponentPreview
      )}
    </div>
  );
}


================================================
FILE: packages/aspect/src/envs/envDefinition.ts
================================================
import { Environment } from './environment';

/**
 * API for component development environment.
 */
export class EnvDefinition {
  constructor(readonly id: string, readonly env: Environment) {}

  get name() {
    return this.env.name;
  }

  get description() {
    return this.env.description;
  }

  toObject() {
    return {
      id: this.id,
      description: this.description,
      name: this.name,
    };
  }
}


================================================
FILE: packages/aspect/src/envs/envService.ts
================================================
import type { ReactElement } from 'react';
import { Environment } from './environment';
import { ExecutionContext } from './executionContext';

export interface EnvServiceExecutionResult {
  errors?: Error[];
}

/**
 * services allows to reuse and standardize services for development environments.
 * examples for services can be: `linting`, `compilation`, `build`, and others which offer
 * standard services to environments such as `react`, `angular` and `vue` and different compositions of each for
 * more concrete needs.
 *
 * `TData` - type of data returned by the service handler.
 * `TOpts` is the type of options passed to the environment through execution.
 * `TExecResponse` is the execution result of the service.
 */
export interface EnvService<
  TExecResponse extends EnvServiceExecutionResult,
  TData = Record<string, any>,
  TOpts = Record<string, any>
> {
  /**
   * name of the service. (e.g. `compile`, `test`, etc.)
   */
  name?: string;

  /**
   * description of the env.
   */
  description?: string;

  /**
   * create a string to describe to service in the env cli.
   */
  render?(env: Environment): ReactElement | Promise<ReactElement>;

  /**
   * get service data from an environment.
   */
  getDescriptor?(env: Environment): TData | undefined | Promise<TData | undefined>;

  /**
   * executes a service on a subset of components.
   */
  run?(context: ExecutionContext, options?: TOpts): Promise<TExecResponse>;

  /**
   * run the service only once.
   */
  runOnce?(context: ExecutionContext[], options?: TOpts): Promise<any>;
}


================================================
FILE: packages/aspect/src/envs/environment.ts
================================================
import { EnvPreviewConfig } from '@arco-cli/service/dist/preview';
import type { SourceFile } from '@arco-cli/legacy/dist/workspace/component/sources';

import { Bundler, BundlerContext } from '@aspect/bundler';

/**
 * add a custom type and include all properties from within the environment.
 */
export interface Environment {
  // :TODO need to define an abstract type for service handlers (now using any)
  [key: string]: any;

  /**
   * name of the environment.
   */
  name?: string;

  /**
   * description of the environment.
   */
  description?: string;

  /**
   * Returns the Environment descriptor
   * Required for any task
   */
  __getDescriptor?: () => Promise<{ type: string }>;

  /**
   * Returns the dev patterns to match doc files
   */
  getDocsDevPatterns?: () => string[];

  /**
   * Returns additional dev patterns for the component.
   * Patterns that were provided by getDocsDevPatterns, getTestsDevPatterns will be considered as dev files as well, without need to add them here.
   */
  getDevPatterns?: () => string[];
}

export interface TesterEnv<T = any> extends Environment {
  /**
   * Returns a tester
   */
  getTester?: (path: string, tester: any) => T;

  /**
   * Returns the dev patterns to match test files
   */
  getTestsDevPatterns?: () => string[];
}

export interface PreviewEnv extends Environment {
  /**
   * Returns a path to a docs template.
   * Required for `arco start` & `arco build`
   */
  getDocsTemplate?: () => string;

  /**
   * Return metadata of current component document, like properties info
   */
  getDocsMetadata?: (files: SourceFile[]) => unknown;

  /**
   * Returns a bundler for the preview.
   */
  getBundler?: (context: BundlerContext, transformers: any[]) => Promise<Bundler>;

  /**
   * Returns preview config like the strategy name to use when bundling the components for the preview
   */
  getPreviewConfig?: () => EnvPreviewConfig;
}


================================================
FILE: packages/aspect/src/envs/envs.aspect.ts
================================================
import { Aspect } from '@arco-cli/stone';

export const EnvsAspect = Aspect.create({
  id: 'arco.aspect/envs',
});

export default EnvsAspect;


================================================
FILE: packages/aspect/src/envs/envs.main.runtime.ts
================================================
import { Slot, SlotRegistry } from '@arco-cli/stone';
import { MainRuntime } from '@arco-cli/core/dist/cli';
import { Logger, LoggerAspect, LoggerMain } from '@arco-cli/core/dist/logger';
import { DEFAULT_ENV } from '@arco-cli/legacy/dist/constants';

import { Component } from '@aspect/component';

import { EnvRuntime, Runtime } from './runtime';
import { EnvsAspect } from './envs.aspect';
import { Environment } from './environment';
import { EnvDefinition } from './envDefinition';
import { EnvNotFoundError } from './exceptions/envNotFoundError';
import { EnvService } from './envService';

type EnvsSlot = SlotRegistry<Environment>;
type ServiceSlot = SlotRegistry<EnvService<any>>;

export type EnvTransformer = (env: Environment) => Environment;

export class EnvsMain {
  static runtime = MainRuntime;

  static dependencies = [LoggerAspect];

  static slots = [Slot.withType<Environment>(), Slot.withType<EnvService<any>>()];

  static provider(
    [loggerMain]: [LoggerMain],
    _config,
    [envSlot, serviceSlot]: [EnvsSlot, ServiceSlot]
  ) {
    const logger = loggerMain.createLogger(EnvsAspect.id);
    return new EnvsMain(logger, envSlot, serviceSlot);
  }

  constructor(
    private logger: Logger,
    private envSlot: EnvsSlot,
    private serviceSlot: ServiceSlot
  ) {}

  private async aggregateByDefs(components: Component[]): Promise<EnvRuntime[]> {
    const envsMap = {};
    components.forEach((component: Component) => {
      const envDef = this.getEnv(component);
      const envId = envDef.id;
      const env = envDef.env;
      // handle config as well when aggregating envs.
      if (envsMap[envId]) {
        envsMap[envId].components.push(component);
      } else
        envsMap[envId] = {
          components: [component],
          env,
        };
    });

    return Promise.all(
      Object.keys(envsMap).map(async (key) => {
        return new EnvRuntime(key, envsMap[key].env, envsMap[key].components);
      })
    );
  }

  /**
   * compose a new environment from a list of environment transformers.
   */
  compose(targetEnv: Environment, envTransformers: EnvTransformer[]) {
    return envTransformers.reduce((acc, transformer) => {
      acc = transformer(acc);
      return acc;
    }, targetEnv);
  }

  /**
   * create an env transformer which overrides specific env properties.
   */
  override(propsToOverride: Environment): EnvTransformer {
    return (env: Environment) => {
      return this.merge(propsToOverride, env);
    };
  }

  /**
   * compose two environments into one.
   */
  merge<T extends Environment, S extends Environment>(
    targetEnv: Environment,
    sourceEnv: Environment
  ): T & S {
    const allNames = new Set<string>();
    const keys = ['name', 'description'];

    for (let o = sourceEnv; o !== Object.prototype; o = Object.getPrototypeOf(o)) {
      for (const name of Object.getOwnPropertyNames(o)) {
        allNames.add(name);
      }
    }

    allNames.forEach((key: string) => {
      const sourceFn = sourceEnv[key];
      if (targetEnv[key]) return;

      if (keys.includes(key)) {
        targetEnv[key] = sourceFn;
      } else if (sourceFn?.bind) {
        targetEnv[key] = sourceFn.bind(sourceEnv);
      }
    });

    return targetEnv as T & S;
  }

  getEnv(component: Component): EnvDefinition {
    const envId = component.env;
    const env = this.envSlot.get(component.env);
    if (env) {
      return new EnvDefinition(envId, env as Environment);
    }
    throw new EnvNotFoundError(envId);
  }

  getDefaultEnv(): EnvDefinition {
    const defaultEnv = this.envSlot.get(DEFAULT_ENV);
    if (!defaultEnv) throw new Error('default env must be set.');
    return new EnvDefinition(DEFAULT_ENV, defaultEnv);
  }

  registerEnv(env: Environment) {
    return this.envSlot.register(env);
  }

  registerService(envService: EnvService<any>) {
    this.serviceSlot.register(envService);
    return this;
  }

  isEnvRegistered(id: string) {
    return Boolean(this.envSlot.get(id));
  }

  getAllRegisteredEnvs(): string[] {
    return this.envSlot.toArray().map((envData) => envData[0]);
  }

  async createEnvironment(components: Component[]): Promise<Runtime> {
    const envRuntimes = await this.aggregateByDefs(components);
    return new Runtime(envRuntimes, this.logger);
  }
}

EnvsAspect.addRuntime(EnvsMain);


================================================
FILE: packages/aspect/src/envs/exceptions/envNotFoundError.ts
================================================
import ArcoError from '@arco-cli/legacy/dist/error/arcoError';

export class EnvNotFoundError extends ArcoError {
  constructor(id: string) {
    super(`environment with ID: ${id} was not found`);
  }
}


================================================
FILE: packages/aspect/src/envs/executionContext.ts
================================================
import { EnvDefinition } from './envDefinition';
import { Environment } from './environment';
import { EnvRuntime, Runtime } from './runtime';

export class ExecutionContext {
  constructor(
    /**
     * upper scope of all environment contexts.
     */
    readonly upper: Runtime,

    /**
     * runtime instance of the environment.
     */
    readonly envRuntime: EnvRuntime,

    /**
     * components applied in the execution context.
     */
    public components = envRuntime.components
  ) {}

  relatedContexts: string[] = [];

  /**
   * extension ID of the environment
   */
  get id() {
    return this.envRuntime.id;
  }

  /**
   * environment instance.
   */
  get env(): Environment {
    return this.envRuntime.env;
  }

  get envDefinition(): EnvDefinition {
    return new EnvDefinition(this.id, this.env);
  }

  apply<T>(name: string, args: any[]): T {
    if (!this.env[name]) {
      throw new Error(`method ${name} not implemented`);
    }

    return this.env[name].apply(this.env, ...args);
  }
}


================================================
FILE: packages/aspect/src/envs/index.ts
================================================
import { EnvsAspect } from './envs.aspect';

export default EnvsAspect;
export { EnvsAspect };
export type { EnvsMain, EnvTransformer } from './envs.main.runtime';
export { EnvService } from './envService';
export { EnvDefinition } from './envDefinition';
export { ExecutionContext } from './executionContext';
export { EnvsExecutionResult } from './runtime';
export * from './environment';


================================================
FILE: packages/aspect/src/envs/runtime/envRuntime.ts
================================================
import { Component } from '@aspect/component';

import { Environment } from '../environment';

export class EnvRuntime {
  constructor(
    /**
     * ID of the wrapping extension.
     */
    readonly id: string,

    /**
     * Environment
     */
    readonly env: Environment,

    /**
     * components to be loaded in the environment
     */
    readonly components: Component[]
  ) {}
}


================================================
FILE: packages/aspect/src/envs/runtime/envsExecutionResult.ts
================================================
import { flatten } from 'lodash';
import { EnvResult } from './runtime';
import { EnvServiceExecutionResult } from '../envService';

export class EnvsExecutionResult<T extends EnvServiceExecutionResult> {
  constructor(readonly results: EnvResult<T>[]) {}

  hasErrors() {
    return Boolean(this.errors.length);
  }

  get errors(): Error[] {
    return flatten(this.results.map((envResult) => this.getErrorsOfEnv(envResult)));
  }

  getErrorsOfEnv(envResult: EnvResult<T>): Error[] {
    const execError = envResult.error;
    const errors = envResult.data ? envResult.data.errors || [] : [];
    if (execError) errors.push(execError);
    return errors;
  }

  /**
   * if only one error is found, throw it. otherwise, summarize the errors per env and throw the
   * output
   */
  throwErrorsIfExist() {
    if (!this.errors || !this.errors.length) return;
    if (this.errors.length === 1 && this.errors[0] instanceof Error) throw this.errors[0];
    const errorsPerEnvs = this.results.map((envResult) => this.getEnvErrorsAsString(envResult));
    const errorOutput = errorsPerEnvs.join('\n\n');
    throw new Error(errorOutput);
  }

  getEnvErrorsAsString(envResult: EnvResult<T>): string {
    const errors = this.getErrorsOfEnv(envResult);
    if (!errors.length) return '';
    const title = `found ${errors.length} error(s) for ${envResult.env.id}`;
    const errorsStr = errors.map((error) => `${error.message}\n${error.stack}`).join('\n');
    return `${title}\n${errorsStr}`;
  }
}


================================================
FILE: packages/aspect/src/envs/runtime/index.ts
================================================
export { Runtime } from './runtime';
export { EnvRuntime } from './envRuntime';
export { EnvsExecutionResult } from './envsExecutionResult';


================================================
FILE: packages/aspect/src/envs/runtime/runtime.ts
================================================
import { Logger } from '@arco-cli/core/dist/logger';
import mapSeries from 'p-map-series';
import { ExecutionContext } from '../executionContext';
import { EnvService, EnvServiceExecutionResult } from '../envService';
import { EnvRuntime } from './envRuntime';
import { EnvsExecutionResult } from './envsExecutionResult';

export interface EnvResult<T extends EnvServiceExecutionResult> {
  env: EnvRuntime;
  data?: T;
  error?: Error;
}

export class Runtime {
  constructor(
    /**
     * runtime instances of the environments.
     */
    readonly runtimeEnvs: EnvRuntime[],

    private logger: Logger
  ) {}

  getEnvExecutionContext(): ExecutionContext[] {
    return this.runtimeEnvs.map((env) => new ExecutionContext(this, env));
  }

  /**
   * execute a service once for all environments.
   */
  async runOnce<T>(service: EnvService<T>, options?: { [key: string]: any }): Promise<any> {
    if (!service.runOnce)
      throw new Error('a service must implement `runOnce()` in order to be executed');
    const envsExecutionContext = this.getEnvExecutionContext();
    const serviceResult = await service.runOnce(envsExecutionContext, options);
    return serviceResult;
  }

  /**
   * execute a service on each one of the environments.
   */
  async run<T>(
    /**
     * environment service to execute.
     */
    service: EnvService<T>,

    /**
     * options to proxy to the service upon execution.
     */
    options?: { [key: string]: any }
  ): Promise<EnvsExecutionResult<T>> {
    if (!service.run) throw new Error('a service must implement `run()` in order to be executed');

    const contexts: EnvResult<T>[] = await mapSeries(this.runtimeEnvs, async (env) => {
      try {
        const serviceResult = await service.run(new ExecutionContext(this, env), options);
        return {
          env,
          data: serviceResult,
        };
      } catch (err) {
        this.logger.error(err.message, err);
        this.logger.consoleFailure(
          `service "${service.name}" of env "${env.id}" has failed. error: ${err.message}`
        );
        return {
          env,
          error: err,
        };
      }
    });

    return new EnvsExecutionResult(contexts);
  }
}


================================================
FILE: packages/aspect/src/envs/types.ts
================================================
import type { StyleCompilerOptions } from '@arco-cli/service/dist/compiler';

import type { WebpackConfigTransformer } from '../webpack';
import type { TsConfigTransformer } from '../typescript';

/**
 * env config transformers allow user to extend
 */
export type ArcoEnvConfig = {
  /**
   * extend config of Jest
   */
  jest?: {
    /**
     * specify the path of Jest config file
     */
    jestConfigPath?: string;
    /**
     * specify the path Jest module for testing
     */
    jestModulePath?: string;
  };
  /**
   * extend config of Webpack bundler
   */
  webpack?: {
    /**
     * extend the webpack config for component preview product
     */
    previewConfig?: WebpackConfigTransformer[];
    /**
     * extend the webpack config for component development
     */
    devServerConfig?: WebpackConfigTransformer[];
  };
  /**
   * extend config of TypeScript compiler
   */
  typescript?: {
    /**
     * specify the module of TypeScript for building
     */
    tsModule?: any;
    /**
     * extend build config for TypeScript
     */
    buildConfig?: TsConfigTransformer[];
  };
  /**
   * extend config of Less compiler
   */
  less?: {
    /**
     * option for less.render function. visit https://lesscss.org/usage/#programmatic-usage
     */
    lessOptions?: Record<string, any>;
    /**
     * whether to combine all raw style files to one
     */
    combine?: StyleCompilerOptions['combine'];
    /**
     * compile
     */
    compile?: StyleCompilerOptions['compile'];
  };
  /**
   * extend config of Sass compiler
   */
  sass?: {
    /**
     * option for sass.compile function. visit https://sass-lang.com/documentation/js-api/modules#compile
     */
    sassOptions?: Record<string, any>;
    /**
     * whether to combine all raw style files to one
     */
    combine?: StyleCompilerOptions['combine'];
    /**
     * compile
     */
    compile?: StyleCompilerOptions['compile'];
  };
  /**
   * extend config for ts-document, which parse API docs from TypeScript declaration
   */
  tsDocument?: {
    /**
     * Receive all generation configs for ts-document. visit https://www.npmjs.com/package/ts-document
     */
    tsDocumentOptions?: Record<string, any>;
  };
};


================================================
FILE: packages/aspect/src/index.ts
================================================
// don't write any content here
// we create this file to make require.resolve() can find path of this package


================================================
FILE: packages/aspect/src/jest/exceptions/index.ts
================================================
export { JestError } from './jestError';


================================================
FILE: packages/aspect/src/jest/exceptions/jestError.ts
================================================
export class JestError extends Error {
  constructor(
    message: string,
    private _stack?: string | null,
    public readonly code?: unknown,
    public readonly type?: string
  ) {
    super(message);
  }

  get stack() {
    return this._stack;
  }
}


================================================
FILE: packages/aspect/src/jest/index.ts
================================================
import { JestAspect } from './jest.aspect';

export default JestAspect;
export { JestAspect };
export type { JestMain } from './jest.main.runtime';


================================================
FILE: packages/aspect/src/jest/jest.aspect.ts
================================================
import { Aspect } from '@arco-cli/stone';

export const JestAspect = Aspect.create({
  id: 'arco.aspect/jest',
});

export default JestAspect;


================================================
FILE: packages/aspect/src/jest/jest.main.runtime.ts
================================================
import { MainRuntime } from '@arco-cli/core/dist/cli';
import { JestAspect } from './jest.aspect';
import { JestTester, JestTesterOptions } from './jest.tester';

export class JestMain {
  static runtime = MainRuntime;

  static dependencies = [];

  static slots = [];

  static provider() {
    return new JestMain();
  }

  constructor() {}

  createTester(jestConfig: any, jestModulePath?: string, opts?: JestTesterOptions) {
    jestModulePath = jestModulePath || require.resolve('jest');
    return new JestTester(JestAspect.id, jestConfig, jestModulePath, opts);
  }
}

JestAspect.addRuntime(JestMain);


================================================
FILE: packages/aspect/src/jest/jest.tester.ts
================================================
import path from 'path';
import type jest from 'jest';
import { readFileSync } from 'fs-extra';
import { TestResult as JestTestResult } from '@jest/test-result';
import { Tester, TesterContext, Tests } from '@arco-cli/service/dist/tester';
import { parseCliRawArgs } from '@arco-cli/core/dist/cli/utils';
import { ComponentResult } from '@arco-cli/legacy/dist/workspace/componentResult';
import { ComponentMap } from '@aspect/component';

import { JestError } from './exceptions';

export type JestTesterOptions = {
  /**
   * add more root paths to look for tests.
   */
  roots?: string[];
};

export class JestTester implements Tester {
  displayName = 'Jest';

  private readonly jestModule: typeof jest;

  constructor(
    readonly id: string,
    readonly jestConfigPath: string,
    private jestModulePath: string,
    _opts: JestTesterOptions = {}
  ) {
    this.jestModule = require(this.jestModulePath);
  }

  private convertJestCliOptions(option): typeof option {
    // jest cli options with alias
    // https://jestjs.io/docs/29.3/cli
    const jestOptionAliasMap = {
      b: 'bail',
      c: 'config',
      collectCoverage: 'coverage',
      e: 'expand',
      w: 'maxWorkers',
      o: 'onlyChanged',
      i: 'runInBand',
      t: 'testNamePattern',
      u: 'updateSnapshot',
      v: 'version',
    };

    const { _: args, ...optionsWithAlias } = option;
    const result = { ...optionsWithAlias };

    if (args?.length) {
      const regexForTestFiles = args[0];
      if (/\.(js|jsx|ts|tsx)$/.test(regexForTestFiles)) {
        result.testMatch = [regexForTestFiles];
      } else {
        result.testNamePattern = regexForTestFiles;
      }
    }

    // convert 'true' | 'false' to boolean
    Object.entries(result).forEach(([key, value]) => {
      if (value === 'true') {
        result[key] = true;
      } else if (value === 'false') {
        result[key] = false;
      }
    });

    Object.entries(jestOptionAliasMap).forEach(([alias, optionName]) => {
      if (alias in result) {
        result[optionName] = result[alias];
        delete result[alias];
      }
    });

    return result;
  }

  displayConfig(): string {
    return readFileSync(this.jestConfigPath, 'utf8');
  }

  version(): string {
    return this.jestModule.getVersion();
  }

  private getErrors(testResult: JestTestResult[]): JestError[] {
    return testResult.reduce((errors: JestError[], test) => {
      if (test.testExecError) {
        const { message, stack, code, type } = test.testExecError;
        errors.push(new JestError(message, stack, code, type));
      } else if (test.failureMessage) {
        errors.push(new JestError(test.failureMessage));
      }
      return errors;
    }, []);
  }

  private attachTestsToComponent(testerContext: TesterContext, testResults: JestTestResult[]) {
    return ComponentMap.as(testerContext.components, (component) => {
      return testResults.filter((test) => {
        const componentDirAbs = path.join(testerContext.rootPath, component.componentDir);
        return test.testFilePath.startsWith(componentDirAbs);
      });
    });
  }

  private buildTestsObj(
    componentTestMap: ComponentMap<JestTestResult[] | undefined>
  ): ComponentResult[] {
    return componentTestMap
      .toArray()
      .map(([component, testsFiles]) => {
        return testsFiles?.length
          ? {
              id: component.id,
              errors: this.getErrors(testsFiles),
            }
          : null;
      })
      .filter(Boolean);
  }

  async test(context: TesterContext): Promise<Tests> {
    const config: jest.Config = {
      rootDir: context.rootPath,
      roots: [context.rootPath],
    };

    if (context.watch) {
      config.watchAll = true;
      config.cache = false;
    }

    if (context.components) {
      const testMatch: string[] = [];
      const collectCoverageFrom: string[] = [];

      context.components.forEach(({ rootDir, componentDir, entries }) => {
        // rootDir is the entry of package source files
        // find test files from rootDir if no component pattern is specified
        const includeDir = context.pattern ? componentDir : rootDir;
        testMatch.push(
          ...entries.testFilePatterns.map((testFilePattern) =>
            path.join('**', includeDir, testFilePattern)
          )
        );
        collectCoverageFrom.push(
          ...[
            path.join('**', includeDir, '**/*.[jt]s?(x)'),
            path.join('!**', includeDir, '**/{style,__docs__}/*'),
          ]
        );
      });

      // unique pattern strings
      config.testMatch = [...new Set(testMatch)];
      config.collectCoverageFrom = [...new Set(collectCoverageFrom)];
    }

    // eslint-disable-next-line @typescript-eslint/no-var-requires
    const jestConfig = require(this.jestConfigPath);
    const jestConfigWithSpecs = Object.assign(jestConfig, config);
    const { parsed: jestCliOptions } = parseCliRawArgs('jest', context.rawTesterArgs);
    const testsOutput = await this.jestModule.runCLI(
      { ...jestConfigWithSpecs, ...this.convertJestCliOptions(jestCliOptions) },
      [this.jestConfigPath]
    );

    const testResults = testsOutput.results.testResults;
    const componentsWithTests = this.attachTestsToComponent(context, testResults);
    const componentTestResults = this.buildTestsObj(componentsWithTests);

    return new Tests(componentTestResults);
  }
}


================================================
FILE: packages/aspect/src/less/compilerOptions.ts
================================================
import type { CompilerOptions, StyleCompilerOptions } from '@arco-cli/service/dist/compiler';

export type LessCompilerOptions = {
  /**
   * option for less.render function
   */
  lessOptions?: Record<string, any>;
} & StyleCompilerOptions &
  Partial<CompilerOptions>;


================================================
FILE: packages/aspect/src/less/index.ts
================================================
import { LessAspect } from './less.aspect';

export default LessAspect;
export { LessAspect };
export type { LessMain } from './less.main.runtime';
export type { LessCompilerOptions } from './compilerOptions';


================================================
FILE: packages/aspect/src/less/less.aspect.ts
================================================
import { Aspect } from '@arco-cli/stone';

export const LessAspect = Aspect.create({
  id: 'arco.aspect/less',
});

export default LessAspect;


================================================
FILE: packages/aspect/src/less/less.compiler.ts
================================================
import path from 'path';
import minimatch from 'minimatch';
import { render, version } from 'less';
import type { ComponentResult } from '@arco-cli/legacy/dist/workspace/componentResult';
import type { BuildContext, BuildTaskResult } from '@arco-cli/service/dist/builder';
import type { Compiler } from '@arco-cli/service/dist/compiler';
import { compileStyle } from '@arco-cli/service/dist/compiler/utils/compileStyle';
import {
  DEFAULT_DIST_DIRNAME,
  DEFAULT_BUILD_IGNORE_PATTERNS,
} from '@arco-cli/legacy/dist/constants';

import type { LessCompilerOptions } from './compilerOptions';

export class LessCompiler implements Compiler {
  readonly displayName = 'Less';

  distDir: string;

  shouldCopySourceFiles = true;

  ignorePatterns = DEFAULT_BUILD_IGNORE_PATTERNS;

  lessOptions: LessCompilerOptions['lessOptions'];

  combine: LessCompilerOptions['combine'];

  userCustomCompileFn: LessCompilerOptions['compile'];

  constructor(readonly id: string, options: LessCompilerOptions) {
    this.distDir = options.distDir || DEFAULT_DIST_DIRNAME;
    this.lessOptions = options.lessOptions || {};
    this.combine = options.combine || false;
    this.userCustomCompileFn = options.compile;
  }

  getDistPathBySrcPath(srcPath: string): string {
    return srcPath.replace('.less', '.css');
  }

  isFileSupported(filePath: string): boolean {
    return filePath.endsWith('.less');
  }

  version(): string {
    return version.join('.');
  }

  getDistDir() {
    return this.distDir;
  }

  async build(context: BuildContext): Promise<BuildTaskResult> {
    const workspaceNodeModulePath = path.resolve(context.workspace.path, 'node_modules');
    const results: ComponentResult[] = [];

    for (const component of context.components) {
      const packageNodeModulePath = path.resolve(component.packageDirAbs, 'node_modules');
      // eslint-disable-next-line no-await-in-loop
      const componentResult = await compileStyle({
        component,
        distDir: this.distDir,
        shouldCopySourceFiles: this.shouldCopySourceFiles,
        rawFileExt: 'less',
        combine: this.combine,
        compile: async ({ pathSource, getContents }) => {
          const { css } = await render(getContents(), {
            javascriptEnabled: true,
            ...this.lessOptions,
            paths: [
              path.dirname(pathSource),
              packageNodeModulePath,
              workspaceNodeModulePath,
              ...(this.lessOptions?.paths || []),
            ],
          });
          return css;
        },
        userCustomCompileFn: this.userCustomCompileFn,
        filter: (file) => {
          for (const pattern of this.ignorePatterns) {
            if (minimatch(file.path, pattern)) {
              return false;
            }
          }
          return this.isFileSupported(file.path);
        },
      });

      results.push(componentResult);
    }

    return {
      componentsResults: results,
    };
  }
}


================================================
FILE: packages/aspect/src/less/less.main.runtime.ts
================================================
import { MainRuntime } from '@arco-cli/core/dist/cli';

import { LessAspect } from './less.aspect';
import { LessCompiler } from './less.compiler';
import type { LessCompilerOptions } from './compilerOptions';

export class LessMain {
  static runtime = MainRuntime;

  static dependencies = [];

  static slots = [];

  static async provider() {
    return new LessMain();
  }

  constructor() {}

  createCompiler(options: LessCompilerOptions = {}) {
    return new LessCompiler(LessAspect.id, options);
  }
}

LessAspect.addRuntime(LessMain);


================================================
FILE: packages/aspect/src/mdx/index.ts
================================================
import { MDXAspect } from './mdx.aspect';

export default MDXAspect;
export { MDXAspect };
export type { MDXMain } from './mdx.main.runtime';


================================================
FILE: packages/aspect/src/mdx/loader/compileOutput.ts
================================================
import { VFile } from 'vfile';

import type { DocOutline, DocSnippet } from '@aspect/docs';

import { ImportSpecifier } from './importSpecifier';

export class CompileOutput {
  constructor(readonly file: VFile, private _renderer: string) {}

  get renderer() {
    return this._renderer;
  }

  changeRenderer(renderer: string) {
    this._renderer = renderer;
  }

  /**
   * get the mdx file metadata.
   */
  getMetadata(): Record<string, any> {
    return (this.file.data as any).frontmatter;
  }

  /**
   * get headings of markdown.
   */
  getOutline(): DocOutline {
    return (this.file.data as any).headings;
  }

  /**
   * get all snippets of doc
   */
  getSnippets(): DocSnippet[] {
    return (this.file.data as any).snippets || [];
  }

  /**
   * get all import specifiers.
   */
  getImportSpecifiers(): ImportSpecifier[] {
    const data: any = this.file.data;
    return data.imports;
  }

  /**
   * get the mdx file contents. including the renderer.
   */
  get contents() {
    return `${this.renderer}\n${this.file.contents}`;
  }
}


================================================
FILE: packages/aspect/src/mdx/loader/importSpecifier.ts
================================================
export type ImportSpecifier = {
  /**
   * relative/absolute or module name. e.g. the `y` in the example of `import x from 'y';`
   */
  fromModule: string;

  /**
   * is default import (e.g. `import x from 'y';`)
   */
  isDefault?: boolean;

  /**
   * the name used to identify the module, e.g. the `x` in the example of `import x from 'y';`
   */
  identifier?: string;
};


================================================
FILE: packages/aspect/src/mdx/loader/index.ts
================================================
import { mdxLoader } from './mdxLoader';
import { compile, compileSync } from './mdxCompiler';

export default mdxLoader;
export { mdxLoader };
export { compile, compileSync };


================================================
FILE: packages/aspect/src/mdx/loader/mdxCompiler.ts
================================================
import vfile from 'vfile';
import mdx from '@mdx-js/mdx';
import detectFrontmatter from 'remark-frontmatter';
import remarkNotes from 'remark-admonitions';

import {
  extractComponentDemos,
  extractHeadings,
  extractImports,
  extractMetadata,
} from './remarkPlugins';
import { CompileOutput } from './compileOutput';

export type MDXCompilerOptions = {
  remarkPlugins: any[];
  rehypePlugins: any[];
  compilers: any[];
  filePath?: string;
  renderer: string;
  arcoFlavour: boolean;
  extractSnippets?: boolean;
};

// these components name come from @arco-cli/ui-foundation-react/dist/markdown/components
// can not import from package above, because that's a pure ESM package
const COMPONENT_NAME_DEMO_VIEW = 'ArcoDemoView';

const DEFAULT_RENDERER = `
// @ts-nocheck
import React from 'react'
import { mdx } from '@mdx-js/react'

/* @jsxRuntime classic */
/* @jsx mdx */
`;

const DEFAULT_OPTIONS: Partial<MDXCompilerOptions> = {
  remarkPlugins: [remarkNotes],
  compilers: [],
  renderer: DEFAULT_RENDERER,
  arcoFlavour: true,
  extractSnippets: false,
};

/**
 * compile a mdx file with frontmatter formatted (yaml) metadata.
 * example:
 * ```
 * ---
 * title: Something
 * labels: ['some', 'labels']
 * ---
 * ```
 */
export function compile(
  content: string,
  options: Partial<MDXCompilerOptions> = {}
): Promise<CompileOutput> {
  const contentFile = getFile(content, options.filePath);
  return new Promise((resolve, reject) => {
    const mdxCompiler = createCompiler(options);
    mdxCompiler.process(contentFile, (err: Error | undefined, file: any) => {
      if (err) return reject(err);
      const output = new CompileOutput(file, DEFAULT_RENDERER);
      return resolve(output);
    });
  });
}

/**
 * sync compilation of mdx content.
 */
export function compileSync(
  mdxContent: string,
  options: Partial<MDXCompilerOptions> = {}
): CompileOutput {
  const contentFile = getFile(mdxContent, options.filePath);
  const mdxCompiler = createCompiler(options);
  const file = mdxCompiler.processSync(contentFile);
  return new CompileOutput(file, DEFAULT_RENDERER);
}

function getFile(contents: string, path?: string) {
  return path ? vfile({ contents, path }) : vfile(contents);
}

function createCompiler(opts: Partial<MDXCompilerOptions>) {
  const options = {
    ...DEFAULT_OPTIONS,
    ...opts,
  };
  const mustPlugins = options.arcoFlavour
    ? [
        [detectFrontmatter, ['yaml']],
        extractMetadata,
        extractImports,
        extractHeadings.bind(null),
        extractComponentDemos.bind(null, COMPONENT_NAME_DEMO_VIEW, options.extractSnippets),
      ]
    : [extractImports];
  const mustRehypePlugins = [];

  const compilerOpts = Object.assign(options, {
    remarkPlugins: options.remarkPlugins ? mustPlugins.concat(options.remarkPlugins) : mustPlugins,
    rehypePlugins: options.rehypePlugins
      ? mustRehypePlugins.concat(options.rehypePlugins)
      : mustRehypePlugins,
  });

  return mdx.createCompiler(compilerOpts);
}


================================================
FILE: packages/aspect/src/mdx/loader/mdxLoader.ts
================================================
import { compile, MDXCompilerOptions } from './mdxCompiler';

export type MDXLoaderOptions = {
  preProcessFile?: (file: { content: string; path: string }) => string;
} & Partial<MDXCompilerOptions>;

/**
 * arco mdx webpack loader.
 * this loader allows compilation of Arco flavoured MDX in webpack.
 */
export async function mdxLoader(content: string) {
  const callback = this.async();
  const filePath = this.resourcePath;
  const { preProcessFile, ...compileOptions }: MDXLoaderOptions = {
    ...this.getOptions(),
  };

  if (typeof preProcessFile === 'function') {
    content = preProcessFile({ content, path: filePath }) ?? content;
  }

  try {
    const output = await compile(content, { ...compileOptions, filePath });
    return callback(null, output.contents);
  } catch (err: any) {
    return callback(err, null);
  }
}


================================================
FILE: packages/aspect/src/mdx/loader/remarkPlugins/extractComponentDemos.ts
================================================
// TODO try to solve it: demo file content updating won't trigger mdx compiling, then code-text won't update
import visit from 'unist-util-visit';
import path from 'path';
import glob from 'glob';
import fs from 'fs-extra';

import type { DocSnippet } from '@aspect/docs/type';

export function extractComponentDemos(demoViewComponentName: string, extractSnippets = false) {
  return function transformer(tree, file) {
    const imports = file.data.imports || [];
    const snippets: DocSnippet[] = [];

    if (!demoViewComponentName) return;

    // this will visit div like below
    // <div data-arco-demo="BasicDemo">...anything from user</div>
    visit(tree, 'jsx', (node: any) => {
      if (/^<div/i.test(node.value)) {
        const [, attribute] = node.value.match(/^<div([^>]*)>/i) || [];
        const metadata: { demo?: string } = {};

        (attribute || '').replace(/data-arco-(\w+)="([^"]+)"/i, (_, key, value) => {
          metadata[key] = value;
          return '';
        });

        let demoCode = '';
        let demoExtname = '';
        for (const { identifier, fromModule } of imports) {
          if (identifier === metadata.demo) {
            let demoPath = path.join(file.dirname, fromModule);
            if (!/\.[jt]sx?$/.test(demoPath)) {
              const [globPath] = glob.sync(`${demoPath}{.*,/index.*}`);
              demoPath = globPath || demoPath;
            }

            demoExtname = demoPath.split('.').pop();

            try {
              demoCode = fs.readFileSync(demoPath).toString();
            } catch (e) {}

            break;
          }
        }

        if (metadata.demo) {
          if (extractSnippets) {
            snippets.push({
              code: demoCode,
              language: demoExtname,
            });
          }

          const encoder = new TextEncoder();
          node.value = `<${demoViewComponentName} children={${
            node.value
          }}  code={{ needDecode: true, value: '${encoder.encode(
            demoCode
          )}' }} language="${demoExtname}" />`;
        }

        file.data.snippets = snippets;
      }
    });
  };
}


================================================
FILE: packages/aspect/src/mdx/loader/remarkPlugins/extractHeadings.ts
================================================
import visit from 'unist-util-visit';

export function extractHeadings() {
  const headings = [];
  const getHeadingText = (node, text = '') => {
    const nodeTypeHasTextValue = ['inlineCode', 'text'];
    if (Array.isArray(node.children)) {
      for (const c of node.children) {
        text += getHeadingText(c);
      }
    } else if (nodeTypeHasTextValue.indexOf(node.type) > -1) {
      text += node.value;
    }
    return text;
  };

  return function transformer(tree, file) {
    visit(tree, 'heading', (node: any) => {
      const text = getHeadingText(node);
      const heading = {
        text,
        depth: node.depth,
      };
      headings.push(heading);
    });

    file.data.headings = headings;
  };
}


================================================
FILE: packages/aspect/src/mdx/loader/remarkPlugins/extractImports.ts
================================================
import visit from 'unist-util-visit';
import { detectiveEs6 } from '@arco-cli/legacy/dist/workspace/component/dependencies/detectives';

import type { ImportSpecifier } from '../importSpecifier';

export function extractImports() {
  return function transformer(tree, file) {
    visit(tree, 'import', (node: any) => {
      const es6Import = detectiveEs6(node.value);
      const imports: ImportSpecifier[] = Object.keys(es6Import).flatMap((dep) => {
        if (!es6Import[dep].importSpecifiers) {
          return {
            fromModule: dep,
          };
        }
        return es6Import[dep].importSpecifiers.map((importSpecifier) => ({
          fromModule: dep,
          identifier: importSpecifier.name,
          isDefault: importSpecifier.isDefault,
        }));
      });
      (file.data.imports ||= []).push(...imports);
    });
  };
}


================================================
FILE: packages/aspect/src/mdx/loader/remarkPlugins/extractMetadata.ts
================================================
import yaml from 'yaml';
import visit from 'unist-util-visit';
import remove from 'unist-util-remove';

export function extractMetadata() {
  return function transformer(tree, file) {
    visit(tree, 'yaml', (node: any) => {
      try {
        file.data.frontmatter = yaml.parse(node.value, { prettyErrors: true });
      } catch (err: any) {
        throw new Error(
          `failed extracting metadata/front-matter using Yaml lib, due to an error (please disregard the line/column): ${err.message}`
        );
      }
    });

    remove(tree, 'yaml');
  };
}


================================================
FILE: packages/aspect/src/mdx/loader/remarkPlugins/index.ts
================================================
export { extractComponentDemos } from './extractComponentDemos';
export { extractHeadings } from './extractHeadings';
export { extractImports } from './extractImports';
export { extractMetadata } from './extractMetadata';


================================================
FILE: packages/aspect/src/mdx/mdx.aspect.ts
================================================
import { Aspect } from '@arco-cli/stone';

export const MDXAspect = Aspect.create({
  id: 'arco.aspect/mdx',
});

export default MDXAspect;


================================================
FILE: packages/aspect/src/mdx/mdx.docReader.ts
================================================
import { DocReader, Doc } from '@aspect/docs';

import { compile } from './loader';

export class MDXDocReader implements DocReader {
  constructor(private extensions: string[]) {}

  async read(path: string, contents: Buffer) {
    const output = await compile(contents.toString('utf-8'), {
      filePath: path,
      extractSnippets: true,
    });
    const metadata = output.getMetadata();
    const outline = output.getOutline();
    const snippets = output.getSnippets();

    return Doc.from(path, { ...metadata, outline, snippets });
  }

  isFormatSupported(format: string) {
    return this.extensions.includes(format);
  }
}


================================================
FILE: packages/aspect/src/mdx/mdx.main.runtime.ts
================================================
import { MainRuntime } from '@arco-cli/core/dist/cli';

import { DocsAspect, DocsMain } from '@aspect/docs';

import MDXAspect from './mdx.aspect';
import { MDXDocReader } from './mdx.docReader';

export type MDXConfig = {
  /**
   * list of file extensions to consider as MDX files.
   */
  extensions: string[];
};

export class MDXMain {
  static runtime = MainRuntime;

  static dependencies = [DocsAspect];

  static slots = [];

  static defaultConfig = {
    extensions: ['.md', '.mdx'],
  };

  static provider([docs]: [DocsMain], config: MDXConfig) {
    const mdxMain = new MDXMain();
    docs.registerDocReader(new MDXDocReader(config.extensions));
    return mdxMain;
  }

  constructor() {}
}

MDXAspect.addRuntime(MDXMain);


================================================
FILE: packages/aspect/src/multi-compiler/index.ts
================================================
import { MultiCompilerAspect } from './multiCompiler.aspect';

export default MultiCompilerAspect;
export { MultiCompilerAspect };
export type { MultiCompilerMain } from './multiCompiler.main.runtime';
export type { MultiCompiler } from './multiCompiler.compiler';


================================================
FILE: packages/aspect/src/multi-compiler/multiCompiler.aspect.ts
================================================
import { Aspect } from '@arco-cli/stone';

export const MultiCompilerAspect = Aspect.create({
  id: 'arco.aspect/multi-compiler',
});

export default MultiCompilerAspect;


================================================
FILE: packages/aspect/src/multi-compiler/multiCompiler.compiler.ts
================================================
import { join } from 'path';
import pMapSeries from 'p-map-series';
import { Component } from '@arco-cli/aspect/dist/component';
import {
  DEFAULT_DIST_DIRNAME,
  DEFAULT_BUILD_IGNORE_PATTERNS,
} from '@arco-cli/legacy/dist/constants';
import {
  BuildContext,
  BuildTaskResult,
  mergeComponentResults,
  TaskResultsList,
} from '@arco-cli/service/dist/builder';
import { Compiler, CompilerOptions } from '@arco-cli/service/dist/compiler';

export class MultiCompiler implements Compiler {
  displayName = 'Multi compiler';

  distDir: string;

  ignorePatterns = DEFAULT_BUILD_IGNORE_PATTERNS;

  constructor(
    readonly id: string,
    readonly compilers: Compiler[],
    readonly compilerOptions: Partial<CompilerOptions> = {}
  ) {
    this.distDir = compilerOptions.distDir || DEFAULT_DIST_DIRNAME;
  }

  private firstMatchedCompiler(filePath: string): Compiler | undefined {
    return this.compilers.find((compiler) => compiler.isFileSupported(filePath));
  }

  version(): string {
    return this.compilers
      .map((compiler) => {
        return `${compiler.displayName}@${compiler.version()}`;
      })
      .join('\n');
  }

  displayConfig() {
    return this.compilers
      .map((compiler) => {
        return `${compiler.displayName}\n${compiler.displayConfig}\n`;
      })
      .join('\n');
  }

  isFileSupported(filePath: string): boolean {
    return !!this.firstMatchedCompiler(filePath);
  }

  getDistDir() {
    return this.distDir;
  }

  getPreviewComponentRootPath(component: Component): string {
    const matchedCompiler = this.compilers.find(
      (compiler) => typeof compiler.getPreviewComponentRootPath !== 'undefined'
    );
    return matchedCompiler?.getPreviewComponentRootPath?.(component) || '';
  }

  /**
   * given a source file, return its parallel in the dists. e.g. "index.ts" => "dist/index.js"
   * both, the return path and the given path are relative paths.
   */
  getDistPathBySrcPath(srcPath: string): string {
    const matchedCompiler = this.firstMatchedCompiler(srcPath);
    if (!matchedCompiler) {
      return join(this.distDir, srcPath);
    }

    return matchedCompiler.getDistPathBySrcPath(srcPath);
  }

  async preBuild(context: BuildContext) {
    await Promise.all(
      this.compilers.map(async (compiler) => {
        if (!compiler.preBuild) return;
        await compiler.preBuild(context);
      })
    );
  }

  async postBuild(context: BuildContext, taskResults: TaskResultsList) {
    await Promise.all(
      this.compilers.map(async (compiler) => {
        if (!compiler.postBuild) return;
        await compiler.postBuild(context, taskResults);
      })
    );
  }

  async build(context: BuildContext): Promise<BuildTaskResult> {
    const builds = await pMapSeries(this.compilers, async (compiler) => {
      const buildResult = await compiler.build(context);
      return buildResult.componentsResults;
    });

    return {
      componentsResults: mergeComponentResults(builds),
    };
  }
}


================================================
FILE: packages/aspect/src/multi-compiler/multiCompiler.main.runtime.ts
================================================
import { MainRuntime } from '@arco-cli/core/dist/cli';
import { Compiler, CompilerOptions } from '@arco-cli/service/dist/compiler';

import { MultiCompilerAspect } from './multiCompiler.aspect';
import { MultiCompiler } from './multiCompiler.compiler';

export class MultiCompilerMain {
  static runtime = MainRuntime;

  static async provider() {
    return new MultiCompilerMain();
  }

  /**
   * create a multi-compiler `Compiler` instance.
   */
  createCompiler(compilers: Compiler[], options: Partial<CompilerOptions> = {}) {
    compilers.forEach((compiler) => {
      if (options.distDir) {
        compiler.distDir = options.distDir;
      }
    });
    return new MultiCompiler(MultiCompilerAspect.id, compilers, options);
  }
}

MultiCompilerAspect.addRuntime(MultiCompilerMain);


================================================
FILE: packages/aspect/src/pubsub/events/activeTabEvent.ts
================================================
import { ArcoBaseEvent } from './arcoBaseEvent';

export type ActiveTabEventType = {
  activeTab: string;
};

export class ActiveTabEvent extends ArcoBaseEvent<ActiveTabEventType> {
  static readonly TYPE = 'preview-active-tab';

  constructor(event: ActiveTabEventType) {
    super(ActiveTabEvent.TYPE, '0.0.1', new Date().getTime(), event);
  }
}


================================================
FILE: packages/aspect/src/pubsub/events/arcoBaseEvent.ts
================================================
export class ArcoBaseEvent<T> {
  constructor(
    readonly type: string,
    readonly version: string,
    readonly timestamp: number,
    readonly data: T
  ) {}
}


================================================
FILE: packages/aspect/src/pubsub/events/index.ts
================================================
export { ArcoBaseEvent } from './arcoBaseEvent';
export { SizeEvent, SizeEventType } from './sizeEvent';
export { LocationHashEvent, LocationHashEventType } from './locationHashEvent';
export { ActiveTabEvent, ActiveTabEventType } from './activeTabEvent';


================================================
FILE: packages/aspect/src/pubsub/events/locationHashEvent.ts
================================================
import { ArcoBaseEvent } from './arcoBaseEvent';

export type LocationHashEventType = {
  hash: string;
};

export class LocationHashEvent extends ArcoBaseEvent<LocationHashEventType> {
  static readonly TYPE = 'preview-location-hash';

  constructor(event: LocationHashEventType) {
    super(LocationHashEvent.TYPE, '0.0.1', new Date().getTime(), event);
  }
}


================================================
FILE: packages/aspect/src/pubsub/events/sizeEvent.ts
================================================
import { ArcoBaseEvent } from './arcoBaseEvent';

export type SizeEventType = {
  height: number;
  width: number;
};

export class SizeEvent extends ArcoBaseEvent<SizeEventType> {
  static readonly TYPE = 'preview-size';

  constructor(sizeEvent: SizeEventType) {
    super(SizeEvent.TYPE, '0.0.1', new Date().getTime(), sizeEvent);
  }
}


================================================
FILE: packages/aspect/src/pubsub/exceptions/index.ts
================================================
export { PubsubNoParentError } from './noParentError';


================================================
FILE: packages/aspect/src/pubsub/exceptions/noParentError.ts
================================================
export class PubsubNoParentError extends Error {
  constructor() {
    super('could not connect to parent window');
    this.name = 'PubsubNoParentError';
  }
}


================================================
FILE: packages/aspect/src/pubsub/index.ts
================================================
import { PubsubAspect } from './pubsub.aspect';

export default PubsubAspect;
export { PubsubAspect };
export type { PubsubMain } from './pubsub.main.runtime';
export type { PubsubUI } from './pubsub.ui.runtime';
export { ArcoBaseEvent, SizeEvent } from './events';
export { usePubsub, PubsubRegistry, usePubsubIframe } from './pubsubContext';


================================================
FILE: packages/aspect/src/pubsub/previewRuntime/index.ts
================================================
import { PubsubAspect } from '../pubsub.aspect';

export default PubsubAspect;
export { PubsubAspect };
export { Pubsub } from './pubsub';
export { PubsubPreview } from './pubsub.preview.runtime';
export { ArcoBaseEvent, SizeEvent } from '../events';


================================================
FILE: packages/aspect/src/pubsub/previewRuntime/pubsub.preview.runtime.ts
================================================
/**
 * Please Notice: This file will run in the preview iframe.
 */

import { PreviewRuntime } from '@arco-cli/service/dist/preview/previewRuntime';

import { Pubsub } from './pubsub';
import { PubsubAspect } from '../pubsub.aspect';

export class PubsubPreview extends Pubsub {
  static runtime = PreviewRuntime;

  static async provider(): Promise<PubsubPreview> {
    return new PubsubPreview();
  }
}

PubsubAspect.addRuntime(PubsubPreview);


================================================
FILE: packages/aspect/src/pubsub/previewRuntime/pubsub.ts
================================================
import { EventEmitter2 } from 'eventemitter2';
import { connectToParent, ErrorCode } from 'penpal';

import { PubsubNoParentError } from '../exceptions';
import {
  ArcoBaseEvent,
  SizeEvent,
  LocationHashEvent,
  SizeEventType,
  LocationHashEventType,
  ActiveTabEventType,
  ActiveTabEvent,
} from '../events';

type Callback = (event: ArcoBaseEvent<any>) => void;

type ParentMethods = {
  pub: (topic: string, event: ArcoBaseEvent<any>) => Promise<any>;
};

export class Pubsub {
  private events = new EventEmitter2();

  private parentPubsub?: ParentMethods;

  constructor() {
    if (this.inIframe()) {
      this.connectToParentPubSub().catch((err) => {
        // parent window is not required to accept connections
        if (err instanceof PubsubNoParentError) return;
        console.error('[Pubsub]', err);
      });
    }
  }

  private inIframe() {
    try {
      return typeof window !== 'undefined' && window.self !== window.top;
    } catch (e) {
      return false;
    }
  }

  private handleMessageFromParent = (topic: string, message: ArcoBaseEvent<any>) => {
    this.events.emit(topic, message);
  };

  private async connectToParentPubSub(retries = 10): Promise<ParentMethods | undefined> {
    if (retries <= 0) throw new PubsubNoParentError();

    try {
      this.parentPubsub = await connectToParent<ParentMethods>({
        timeout: 300,
        methods: {
          pub: this.handleMessageFromParent,
        },
      }).promise;

      return this.parentPubsub;
    } catch (e) {
      if (e.code !== ErrorCode.ConnectionTimeout) throw e;
      return this.connectToParentPubSub(retries - 1);
    }
  }

  sub(topic: string, callback: Callback) {
    const emitter = this.events;
    emitter.on(topic, callback);

    const unSub = () => {
      emitter.off(topic, callback);
    };
    return unSub;
  }

  pub(topic: string, event: ArcoBaseEvent<any>) {
    this.events.emit(topic, event);
    this.parentPubsub?.pub(topic, event).catch((err) => {
      console.error('[Pubsub.preview]', err);
    });
  }

  reportSize(topic: string, data: SizeEventType) {
    this.pub(topic, new SizeEvent(data));
  }

  reportLocationHash(topic: string, data: LocationHashEventType) {
    this.pub(topic, new LocationHashEvent(data));
  }

  reportActiveTab(topic: string, data: ActiveTabEventType) {
    this.pub(topic, new ActiveTabEvent(data));
  }
}


================================================
FILE: packages/aspect/src/pubsub/pubsub.aspect.ts
================================================
import { Aspect } from '@arco-cli/stone';

export const PubsubAspect = Aspect.create({
  id: 'arco.aspect/pubsub',
});

export default PubsubAspect;


================================================
FILE: packages/aspect/src/pubsub/pubsub.main.runtime.ts
================================================
import { MainRuntime } from '@arco-cli/core/dist/cli';

import { ArcoBaseEvent } from './events';
import { PubsubAspect } from './pubsub.aspect';

export class PubsubMain {
  private topicMap = {};

  private createOrGetTopic = (topicUUID) => {
    this.topicMap[topicUUID] = this.topicMap[topicUUID] || [];
  };

  public sub(topicUUID, callback) {
    this.createOrGetTopic(topicUUID);
    this.topicMap[topicUUID].push(callback);
  }

  public pub(topicUUID, event: ArcoBaseEvent<any>) {
    this.createOrGetTopic(topicUUID);
    this.topicMap[topicUUID].forEach((callback) => callback(event));
  }

  unsubscribeAll(topicId: string) {
    delete this.topicMap[topicId];
  }

  static runtime = MainRuntime;

  static async provider() {
    return new PubsubMain();
  }
}

PubsubAspect.addRuntime(PubsubMain);


================================================
FILE: packages/aspect/src/pubsub/pubsub.ui.runtime.ts
================================================
import { EventEmitter2 } from 'eventemitter2';
import { connectToChild } from 'penpal';
import type { AsyncMethodReturns } from 'penpal/lib/types';
import { UIRuntime } from '@arco-cli/service/dist/ui/ui.aspect';

import { ArcoBaseEvent } from './events';
import { PubsubAspect } from './pubsub.aspect';
import { createProvider } from './pubsubContext';

type Callback = (event: ArcoBaseEvent<any>) => void;

type PubOptions = {
  /** forward the event to adjacent windows (including the preview iframe)  */
  propagate?: boolean;
};

type ChildMethods = {
  pub: (topic: string, event: ArcoBaseEvent<any>) => any;
};

export class PubsubUI {
  static runtime = UIRuntime;

  static dependencies = [];

  static async provider() {
    const pubsubUI = new PubsubUI();
    return pubsubUI;
  }

  constructor() {}

  private childApi?: AsyncMethodReturns<ChildMethods>;

  private events = new EventEmitter2();

  /**
   * publish event to all subscribers in this window
   */
  private emitEvent = (topic: string, event: ArcoBaseEvent<any>) => {
    this.events.emit(topic, event);
  };

  /**
   * publish event to nested iframes
   */
  private pubToChild = (topic: string, event: ArcoBaseEvent<any>) => {
    return this.childApi?.pub(topic, event);
  };

  private connectToIframe = (iframe: HTMLIFrameElement) => {
    const connection = connectToChild<ChildMethods>({
      iframe,
      methods: {
        pub: this.emitEvent,
      },
    });

    connection.promise
      .then((childConnection) => {
        this.childApi = childConnection;
      })
      .catch((err) => {
        console.error('[Pubsub.ui]', 'failed connecting to child iframe:', err);
      });

    const destroy = () => {
      connection && connection.destroy();
    };
    return destroy;
  };

  sub = (topic: string, callback: Callback) => {
    const events = this.events;
    events.on(topic, callback);

    const unSub = () => {
      events.off(topic, callback);
    };

    return unSub;
  };

  /**
   * publish event to all subscribers, including nested iframes.
   */
  pub = (topic: string, event: ArcoBaseEvent<any>, { propagate }: PubOptions = {}) => {
    this.emitEvent(topic, event);

    // opt-in to forward to iframe, as we would not want 'private' messages automatically passing to iframe
    if (propagate) {
      this.pubToChild(topic, event);
    }
  };

  getPubsubContext() {
    return createProvider({
      connect: this.connectToIframe,
    });
  }
}

PubsubAspect.addRuntime(PubsubUI);


================================================
FILE: packages/aspect/src/pubsub/pubsubContext.tsx
================================================
import React, { createContext, useContext, useEffect, RefObject, ReactNode } from 'react';

export interface PubsubRegistry {
  /**
   * starts a connection to an iframe child.
   * Returns a destroy function that will break the connection.
   */
  connect(ref: HTMLIFrameElement): () => void;
}

export const PubsubContext = createContext<PubsubRegistry | undefined>(undefined);

export function createProvider(pubSubContext: PubsubRegistry) {
  return function PubsubProvider({ children }: { children: ReactNode }) {
    return <PubsubContext.Provider value={pubSubContext}>{children}</PubsubContext.Provider>;
  };
}

export function usePubsub() {
  return useContext(PubsubContext);
}

export function usePubsubIframe(ref?: RefObject<HTMLIFrameElement>) {
  const pubSub = usePubsub();

  useEffect(() => {
    if (!ref?.current || !pubSub) return () => {};

    const destroyConnection = pubSub.connect(ref.current);
    return () => destroyConnection();
  }, [ref?.current, pubSub]);
}


================================================
FILE: packages/aspect/src/react-router/index.ts
================================================
import { ReactRouterAspect } from './reactRouter.aspect';

export { ReactRouterAspect };
export default ReactRouterAspect;


================================================
FILE: packages/aspect/src/react-router/reactRouter.aspect.ts
================================================
import { Aspect } from '@arco-cli/stone';

export const ReactRouterAspect = Aspect.create({
  id: 'arco.aspect/react-router',
});

export default ReactRouterAspect;


================================================
FILE: packages/aspect/src/react-router/uiRuntime/hooks/useQuery.ts
================================================
// eslint-disable-next-line import/no-extraneous-dependencies
import { useLocation } from 'react-router-dom';

/**
 * hook for using a query string.
 */
export function useQuery() {
  const { search } = useLocation() || { search: '/' };
  return new URLSearchParams(search);
}


================================================
FILE: packages/aspect/src/react-router/uiRuntime/index.ts
================================================
export { ReactRouterAspect } from '../reactRouter.aspect';
export { useQuery } from './hooks/useQuery';
export { SlotRouter, SlotRouterProps } from './slotRouter';
export type { ReactRouterUI, RouteSlot } from './reactRouter.ui.runtime';


================================================
FILE: packages/aspect/src/react-router/uiRuntime/reactRouter.ui.runtime.tsx
================================================
import React from 'react';
// eslint-disable-next-line import/no-extraneous-dependencies
import { NavigateFunction } from 'react-router-dom';
import type { Location, NavigationType, RouteProps } from 'react-router-dom';
import { Slot, SlotRegistry } from '@arco-cli/stone';
import { UIRuntime } from '@arco-cli/service/dist/ui/ui.aspect';

import { SlotRouter } from './slotRouter';
import { ReactRouterAspect } from '../reactRouter.aspect';

export type RouteSlot = SlotRegistry<RouteProps>;

export class ReactRouterUI {
  static runtime = UIRuntime;

  static slots = [Slot.withType<RouteProps>()];

  static async provider(_deps, _config, [routeSlot]: [RouteSlot]) {
    return new ReactRouterUI(routeSlot);
  }

  constructor(
    /**
     * route slot.
     */
    private routeSlot: RouteSlot
  ) {}

  private navigate?: NavigateFunction = undefined;

  renderRoutes(routes: RouteProps[]) {
    return <SlotRouter routes={this.routeSlot.values()} rootRoutes={routes} />;
  }

  /**
   * register a new route.
   */
  register(route: RouteProps) {
    this.routeSlot.register(route);
    return this;
  }

  navigateTo = (
    /** destination */
    path: Location | string,
    /** history action to execute (pop / push / replace) */
    action?: NavigationType
  ) => {
    const state = typeof path !== 'string' ? path.state : undefined;

    switch (action) {
      case 'POP':
        return; // TBD;
      case 'REPLACE':
        this.navigate?.(path, { replace: true, state });
        return;
      case 'PUSH':
      default:
        this.navigate?.(path, { state });
    }
  };
}

ReactRouterAspect.addRuntime(ReactRouterUI);


================================================
FILE: packages/aspect/src/react-router/uiRuntime/slotRouter.tsx
================================================
import React, { PropsWithChildren } from 'react';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Routes, Route, RouteProps } from 'react-router-dom';

export type SlotRouterProps = PropsWithChildren<{
  routes?: RouteProps[];
  rootRoutes?: RouteProps[];
  parentPath?: string;
}>;

function toKey(route: RouteProps) {
  if (route.path) return route.path;
  if (route.index) return '/';
  return '.';
}

export function SlotRouter({
  routes: routesFromProps,
  rootRoutes,
  children,
  parentPath,
}: SlotRouterProps) {
  const routes = routesFromProps || [];
  const withRoot = routes.concat(rootRoutes || []);
  const jsxRoutes = withRoot.map((route) => <Route key={toKey(route)} {...route} />);

  if (parentPath) {
    return (
      <Routes>
        <Route path={parentPath}>
          {jsxRoutes}
          {children}
        </Route>
      </Routes>
    );
  }

  return (
    <Routes>
      {jsxRoutes}
      {children}
    </Routes>
  );
}


================================================
FILE: packages/aspect/src/sass/compilerOptions.ts
================================================
import { CompilerOptions, StyleCompilerOptions } from '@arco-cli/service/dist/compiler';

export type SassCompilerOptions = {
  /**
   * option for sass.compile function
   */
  sassOptions?: Record<string, any>;
} & StyleCompilerOptions &
  Partial<CompilerOptions>;


================================================
FILE: packages/aspect/src/sass/index.ts
================================================
import { SassAspect } from './sass.aspect';

export default SassAspect;
export { SassAspect };
export type { SassMain } from './sass.main.runtime';
export type { SassCompilerOptions } from './compilerOptions';


================================================
FILE: packages/aspect/src/sass/sass.aspect.ts
================================================
import { Aspect } from '@arco-cli/stone';

export const SassAspect = Aspect.create({
  id: 'arco.aspect/sass',
});

export default SassAspect;


================================================
FILE: packages/aspect/src/sass/sass.compiler.ts
================================================
import path from 'path';
import minimatch from 'minimatch';
import { compile } from 'sass';
import type { Compiler } from '@arco-cli/service/dist/compiler';
import type { BuildContext, BuildTaskResult } from '@arco-cli/service/dist/builder';
import type { ComponentResult } from '@arco-cli/legacy/dist/workspace/componentResult';
import {
  DEFAULT_BUILD_IGNORE_PATTERNS,
  DEFAULT_DIST_DIRNAME,
} from '@arco-cli/legacy/dist/constants';
import { compileStyle } from '@arco-cli/service/dist/compiler/utils/compileStyle';

import type { SassCompilerOptions } from './compilerOptions';

export class SassCompiler implements Compiler {
  readonly displayName = 'Sass';

  distDir: string;

  shouldCopySourceFiles = true;

  ignorePatterns = DEFAULT_BUILD_IGNORE_PATTERNS;

  sassOptions: SassCompilerOptions['sassOptions'];

  combine: SassCompilerOptions['combine'];

  userCustomCompileFn: SassCompilerOptions['compile'];

  constructor(readonly id: string, options: SassCompilerOptions) {
    this.distDir = options.distDir || DEFAULT_DIST_DIRNAME;
    this.sassOptions = options.sassOptions || {};
    this.combine = options.combine || false;
    this.userCustomCompileFn = options.compile;
  }

  getDistPathBySrcPath(srcPath: string): string {
    return srcPath.replace('.scss', '.css');
  }

  isFileSupported(filePath: string): boolean {
    return filePath.endsWith('.scss');
  }

  version(): string {
    return '';
  }

  getDistDir() {
    return this.distDir;
  }

  async build(context: BuildContext): Promise<BuildTaskResult> {
    const workspaceNodeModulePath = path.resolve(context.workspace.path, 'node_modules');
    const results: ComponentResult[] = [];

    for (const component of context.components) {
      const packageNodeModulePath = path.resolve(component.packageDirAbs, 'node_modules');
      // eslint-disable-next-line no-await-in-loop
      const componentResult = await compileStyle({
        component,
        distDir: this.distDir,
        shouldCopySourceFiles: this.shouldCopySourceFiles,
        rawFileExt: 'sass',
        combine: this.combine,
        compile: async ({ pathSource }) => {
          return compile(pathSource, {
            ...this.sassOptions,
            loadPaths: [
              path.dirname(pathSource),
              packageNodeModulePath,
              workspaceNodeModulePath,
              ...(this.sassOptions?.loadPaths || []),
            ],
          }).css;
        },
        userCustomCompileFn: this.userCustomCompileFn,
        filter: (file) => {
          for (const pattern of this.ignorePatterns) {
            if (minimatch(file.path, pattern)) {
              return false;
            }
          }
          return this.isFileSupported(file.path);
        },
      });

      results.push(componentResult);
    }

    return {
      componentsResults: results,
    };
  }
}


================================================
FILE: packages/aspect/src/sass/sass.main.runtime.ts
================================================
import { MainRuntime } from '@arco-cli/core/dist/cli';

import { SassAspect } from './sass.aspect';
import { SassCompiler } from './sass.compiler';
import { SassCompilerOptions } from './compilerOptions';

export class SassMain {
  static runtime = MainRuntime;

  static dependencies = [];

  static slots = [];

  static async provider() {
    return new SassMain();
  }

  constructor() {}

  createCompiler(option: SassCompilerOptions = {}) {
    return new SassCompiler(SassAspect.id, option);
  }
}

SassAspect.addRuntime(SassMain);


================================================
FILE: packages/aspect/src/typescript/compilerOptions.ts
================================================
import type { CompilerOptions } from '@arco-cli/service/dist/compiler';

export type TypescriptCompilerOptions = {
  /**
   * tsconfig to use during compilation.
   */
  tsconfig: Record<string, any>;

  /**
   * path for .d.ts files to include during build.
   */
  types: string[];

  /**
   * Run the compiler for .js files. this will only affect whether to run the compiler on the files
   * or not. It won't change the tsconfig to support or not support js files.
   */
  compileJs?: boolean;

  /**
   * Run the compiler for .jsx files. this will only affect whether to run the compiler on the files
   * or not. It won't change the tsconfig to support or not support jsx files.
   */
  compileJsx?: boolean;

  /**
   * extend compile function
   */
  compile?: (
    project: { configFilePath: string; compilerOptions: Record<string, any> },
    originCompileFn: () => void
  ) => void | Promise<void>;
} & Partial<CompilerOptions>;


================================================
FILE: packages/aspect/src/typescript/index.ts
================================================
import { TypescriptAspect } from './typescript.aspect';

export default TypescriptAspect;
export { TypescriptAspect };
export { TypescriptConfigMutator } from './typescriptConfigMutator';
export type { TypescriptCompilerOptions } from './compilerOptions';
export type {
  TypescriptMain,
  TsConfigTransformer,
  TsConfigTransformContext,
} from './typescript.main.runtime';


================================================
FILE: packages/aspect/src/typescript/typescript.aspect.ts
================================================
import { Aspect } from '@arco-cli/stone';

export const TypescriptAspect = Aspect.create({
  id: 'arco.aspect/typescript',
});

export default TypescriptAspect;


================================================
FILE: packages/aspect/src/typescript/typescript.compiler.ts
================================================
import path from 'path';
import fs from 'fs-extra';
import ts from 'typescript';
import { mergeWith, cloneDeep, get, set } from 'lodash';
import { Logger } from '@arco-cli/core/dist/logger';
Download .txt
gitextract_i8dph4m1/

├── .eslintignore
├── .eslintrc.json
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   └── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .husky/
│   └── pre-commit
├── .prettierrc.json
├── .scripts/
│   ├── build-esm.sh
│   ├── build-type.sh
│   ├── build.sh
│   ├── flatPackages.js
│   ├── getLocalPackages.js
│   ├── linkLocalPackages.js
│   └── linkTsPaths.js
├── .stylelintignore
├── .stylelintrc
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CONTRIBUTING.zh-CN.md
├── LICENSE
├── README.md
├── babel.config.js
├── jest.config.ts
├── lerna.json
├── package.json
├── packages/
│   ├── arco/
│   │   ├── bin/
│   │   │   └── arco
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── app.ts
│   │   │   ├── arco.aspect.ts
│   │   │   ├── arco.main.runtime.ts
│   │   │   ├── index.ts
│   │   │   ├── loadCli.ts
│   │   │   ├── manifest.ts
│   │   │   └── types.ts
│   │   └── tsconfig.json
│   ├── aspect/
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── bundler/
│   │   │   │   ├── browserRuntime.ts
│   │   │   │   ├── bundler.aspect.ts
│   │   │   │   ├── bundler.main.runtime.ts
│   │   │   │   ├── bundler.ts
│   │   │   │   ├── bundlerContext.ts
│   │   │   │   ├── componentServer.ts
│   │   │   │   ├── dedupEnvs.ts
│   │   │   │   ├── devServer.graphql.ts
│   │   │   │   ├── devServer.service.ts
│   │   │   │   ├── devServer.ts
│   │   │   │   ├── devServerContext.ts
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── bindError.ts
│   │   │   │   │   └── index.ts
│   │   │   │   ├── getEntry.ts
│   │   │   │   └── index.ts
│   │   │   ├── component/
│   │   │   │   ├── component.aspect.ts
│   │   │   │   ├── component.graphql.ts
│   │   │   │   ├── component.main.runtime.ts
│   │   │   │   ├── component.ts
│   │   │   │   ├── componentFactory.ts
│   │   │   │   ├── componentMap.ts
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── hostNotFoundError.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── invalidNameError.ts
│   │   │   │   │   └── invalidVersionError.ts
│   │   │   │   ├── extensionData.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── type/
│   │   │   │   │   └── custom.d.ts
│   │   │   │   ├── uiRuntime/
│   │   │   │   │   ├── component.module.scss
│   │   │   │   │   ├── component.tsx
│   │   │   │   │   ├── component.ui.runtime.tsx
│   │   │   │   │   ├── componentContext.tsx
│   │   │   │   │   ├── componentError.tsx
│   │   │   │   │   ├── componentMeta/
│   │   │   │   │   │   ├── componentMeta.module.scss
│   │   │   │   │   │   ├── componentMeta.tsx
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   ├── componentModel.ts
│   │   │   │   │   ├── hooks/
│   │   │   │   │   │   └── useComponentQuery.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── utils/
│   │   │   │   │       └── getIdFromLocation.ts
│   │   │   │   └── version/
│   │   │   │       ├── index.ts
│   │   │   │       ├── version.ts
│   │   │   │       └── versionParser.ts
│   │   │   ├── docs/
│   │   │   │   ├── doc/
│   │   │   │   │   ├── doc.ts
│   │   │   │   │   ├── docProp.ts
│   │   │   │   │   ├── docPropList.ts
│   │   │   │   │   └── index.ts
│   │   │   │   ├── docs.aspect.ts
│   │   │   │   ├── docs.graphql.ts
│   │   │   │   ├── docs.main.runtime.ts
│   │   │   │   ├── docs.previewDefinition.ts
│   │   │   │   ├── docs.task.ts
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── fileExtensionNotSupportedError.ts
│   │   │   │   │   └── index.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── previewRuntime/
│   │   │   │   │   ├── docs.preview.runtime.tsx
│   │   │   │   │   └── index.ts
│   │   │   │   ├── type/
│   │   │   │   │   ├── custom.d.ts
│   │   │   │   │   ├── docOutline.ts
│   │   │   │   │   ├── docReader.ts
│   │   │   │   │   ├── docSnippet.ts
│   │   │   │   │   └── index.ts
│   │   │   │   └── uiRuntime/
│   │   │   │       ├── docs.ui.runtime.tsx
│   │   │   │       ├── index.tsx
│   │   │   │       ├── overview.module.scss
│   │   │   │       └── overview.tsx
│   │   │   ├── envs/
│   │   │   │   ├── envDefinition.ts
│   │   │   │   ├── envService.ts
│   │   │   │   ├── environment.ts
│   │   │   │   ├── envs.aspect.ts
│   │   │   │   ├── envs.main.runtime.ts
│   │   │   │   ├── exceptions/
│   │   │   │   │   └── envNotFoundError.ts
│   │   │   │   ├── executionContext.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── runtime/
│   │   │   │   │   ├── envRuntime.ts
│   │   │   │   │   ├── envsExecutionResult.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── runtime.ts
│   │   │   │   └── types.ts
│   │   │   ├── index.ts
│   │   │   ├── jest/
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── jestError.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── jest.aspect.ts
│   │   │   │   ├── jest.main.runtime.ts
│   │   │   │   └── jest.tester.ts
│   │   │   ├── less/
│   │   │   │   ├── compilerOptions.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── less.aspect.ts
│   │   │   │   ├── less.compiler.ts
│   │   │   │   └── less.main.runtime.ts
│   │   │   ├── mdx/
│   │   │   │   ├── index.ts
│   │   │   │   ├── loader/
│   │   │   │   │   ├── compileOutput.ts
│   │   │   │   │   ├── importSpecifier.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── mdxCompiler.ts
│   │   │   │   │   ├── mdxLoader.ts
│   │   │   │   │   └── remarkPlugins/
│   │   │   │   │       ├── extractComponentDemos.ts
│   │   │   │   │       ├── extractHeadings.ts
│   │   │   │   │       ├── extractImports.ts
│   │   │   │   │       ├── extractMetadata.ts
│   │   │   │   │       └── index.ts
│   │   │   │   ├── mdx.aspect.ts
│   │   │   │   ├── mdx.docReader.ts
│   │   │   │   └── mdx.main.runtime.ts
│   │   │   ├── multi-compiler/
│   │   │   │   ├── index.ts
│   │   │   │   ├── multiCompiler.aspect.ts
│   │   │   │   ├── multiCompiler.compiler.ts
│   │   │   │   └── multiCompiler.main.runtime.ts
│   │   │   ├── pubsub/
│   │   │   │   ├── events/
│   │   │   │   │   ├── activeTabEvent.ts
│   │   │   │   │   ├── arcoBaseEvent.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── locationHashEvent.ts
│   │   │   │   │   └── sizeEvent.ts
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── noParentError.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── previewRuntime/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── pubsub.preview.runtime.ts
│   │   │   │   │   └── pubsub.ts
│   │   │   │   ├── pubsub.aspect.ts
│   │   │   │   ├── pubsub.main.runtime.ts
│   │   │   │   ├── pubsub.ui.runtime.ts
│   │   │   │   └── pubsubContext.tsx
│   │   │   ├── react-router/
│   │   │   │   ├── index.ts
│   │   │   │   ├── reactRouter.aspect.ts
│   │   │   │   └── uiRuntime/
│   │   │   │       ├── hooks/
│   │   │   │       │   └── useQuery.ts
│   │   │   │       ├── index.ts
│   │   │   │       ├── reactRouter.ui.runtime.tsx
│   │   │   │       └── slotRouter.tsx
│   │   │   ├── sass/
│   │   │   │   ├── compilerOptions.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── sass.aspect.ts
│   │   │   │   ├── sass.compiler.ts
│   │   │   │   └── sass.main.runtime.ts
│   │   │   ├── typescript/
│   │   │   │   ├── compilerOptions.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── typescript.aspect.ts
│   │   │   │   ├── typescript.compiler.ts
│   │   │   │   ├── typescript.main.runtime.ts
│   │   │   │   ├── typescriptConfigMutator.ts
│   │   │   │   └── utils/
│   │   │   │       └── flatTSConfig.ts
│   │   │   ├── webpack/
│   │   │   │   ├── config/
│   │   │   │   │   ├── html.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── webpack.config.ts
│   │   │   │   │   ├── webpack.dev.config.ts
│   │   │   │   │   ├── webpackFallbacks.ts
│   │   │   │   │   ├── webpackFallbacksAliases.ts
│   │   │   │   │   └── webpackFallbacksProvidePluginConfig.ts
│   │   │   │   ├── events/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── webpackCompilationDoneEvent.ts
│   │   │   │   │   └── webpackCompilationStartedEvent.ts
│   │   │   │   ├── generateStyleLoader.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── webpack.aspect.ts
│   │   │   │   ├── webpack.bundler.ts
│   │   │   │   ├── webpack.devServer.ts
│   │   │   │   ├── webpack.main.runtime.ts
│   │   │   │   └── webpackConfigMutator.ts
│   │   │   └── workspace/
│   │   │       ├── events/
│   │   │       │   ├── index.ts
│   │   │       │   ├── onComponentAddEvent.ts
│   │   │       │   ├── onComponentChangeEvent.ts
│   │   │       │   └── onComponentRemovedEvent.ts
│   │   │       ├── exceptions/
│   │   │       │   ├── index.ts
│   │   │       │   ├── noIdMatchPatternError.ts
│   │   │       │   └── workspaceNotFoundError.ts
│   │   │       ├── index.ts
│   │   │       ├── type/
│   │   │       │   ├── custom.d.ts
│   │   │       │   ├── index.ts
│   │   │       │   ├── onComponentEvents.ts
│   │   │       │   └── workspaceConfig.ts
│   │   │       ├── uiRuntime/
│   │   │       │   ├── graphqlProvider.tsx
│   │   │       │   ├── hooks/
│   │   │       │   │   └── useWorkspace.ts
│   │   │       │   ├── index.ts
│   │   │       │   ├── style/
│   │   │       │   │   └── workspace.module.scss
│   │   │       │   ├── workspace.tsx
│   │   │       │   ├── workspace.ui.runtime.tsx
│   │   │       │   └── workspaceModel.ts
│   │   │       ├── watch/
│   │   │       │   ├── watchQueue.ts
│   │   │       │   └── watcher.ts
│   │   │       ├── workspace.aspect.ts
│   │   │       ├── workspace.graphql.ts
│   │   │       ├── workspace.main.runtime.ts
│   │   │       ├── workspace.ts
│   │   │       └── workspace.uiRoot.ts
│   │   └── tsconfig.json
│   ├── core/
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── aspect-loader/
│   │   │   │   ├── aspectDefinition.ts
│   │   │   │   ├── aspectLoader.aspect.ts
│   │   │   │   ├── aspectLoader.main.runtime.ts
│   │   │   │   ├── coreAspect.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── pluginDefinition.ts
│   │   │   ├── cli/
│   │   │   │   ├── cli.aspect.ts
│   │   │   │   ├── cli.main.runtime.ts
│   │   │   │   ├── cliParser.ts
│   │   │   │   ├── commandRunner.ts
│   │   │   │   ├── commands/
│   │   │   │   │   └── help.ts
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── alreadyExistsError.ts
│   │   │   │   │   ├── commandNotFoundError.ts
│   │   │   │   │   └── index.ts
│   │   │   │   ├── getCommandId.ts
│   │   │   │   ├── help.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── legacyCommandAdapter.ts
│   │   │   │   ├── utils.ts
│   │   │   │   └── yargsAdapter.ts
│   │   │   ├── express/
│   │   │   │   ├── express.aspect.ts
│   │   │   │   ├── express.main.runtime.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── middlewares/
│   │   │   │   │   ├── error.ts
│   │   │   │   │   └── index.ts
│   │   │   │   └── types/
│   │   │   │       ├── index.ts
│   │   │   │       ├── middlewareManifest.ts
│   │   │   │       ├── next.ts
│   │   │   │       ├── request.ts
│   │   │   │       ├── response.ts
│   │   │   │       └── route.ts
│   │   │   ├── graphql/
│   │   │   │   ├── graphql.aspect.ts
│   │   │   │   ├── graphql.main.runtime.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── schema.ts
│   │   │   ├── index.ts
│   │   │   └── logger/
│   │   │       ├── index.ts
│   │   │       ├── logger.aspect.ts
│   │   │       ├── logger.main.runtime.ts
│   │   │       ├── logger.ts
│   │   │       └── longProcessLogger.ts
│   │   └── tsconfig.json
│   ├── generator/
│   │   ├── .gitignore
│   │   ├── bin/
│   │   │   └── arco-generate
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── app.ts
│   │   │   ├── forker.ts
│   │   │   ├── generator.ts
│   │   │   ├── index.ts
│   │   │   ├── templates/
│   │   │   │   ├── react-component/
│   │   │   │   │   ├── __arco.tpl.desc.json
│   │   │   │   │   ├── __docs__/
│   │   │   │   │   │   ├── basic.tpl.tsx
│   │   │   │   │   │   └── index.tpl.ts
│   │   │   │   │   ├── __test__/
│   │   │   │   │   │   └── index.test.tpl.tsx
│   │   │   │   │   ├── component.tpl.tsx
│   │   │   │   │   ├── index.tpl.tsx
│   │   │   │   │   ├── interface.tpl.ts
│   │   │   │   │   └── style/
│   │   │   │   │       ├── index.less
│   │   │   │   │       └── index.ts
│   │   │   │   ├── react-package/
│   │   │   │   │   ├── __arco.tpl.desc.json
│   │   │   │   │   ├── gitignore.tpl.ts
│   │   │   │   │   ├── package.json.tpl.ts
│   │   │   │   │   ├── src/
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   └── tsconfig.json
│   │   │   │   └── react-workspace/
│   │   │   │       ├── .husky/
│   │   │   │       │   └── pre-commit
│   │   │   │       ├── .scripts/
│   │   │   │       │   └── workspaceHooks/
│   │   │   │       │       └── afterComponentCreated.js
│   │   │   │       ├── __arco.tpl.desc.json
│   │   │   │       ├── arco.env.config.js
│   │   │   │       ├── arco.workspace.jsonc.tpl.ts
│   │   │   │       ├── eslintignore.tpl.ts
│   │   │   │       ├── eslintrc.tpl.ts
│   │   │   │       ├── gitignore.tpl.ts
│   │   │   │       ├── jest.config.js
│   │   │   │       ├── package.json.tpl.ts
│   │   │   │       ├── packages/
│   │   │   │       │   └── __arco.dir.desc.ts
│   │   │   │       ├── prettierrc.tpl.ts
│   │   │   │       ├── src/
│   │   │   │       │   ├── __arco.dir.desc.ts
│   │   │   │       │   └── index.ts
│   │   │   │       ├── stylelintignore.tpl.ts
│   │   │   │       ├── stylelintrc.tpl.ts
│   │   │   │       └── tsconfig.json.tpl.ts
│   │   │   ├── types.ts
│   │   │   └── utils/
│   │   │       ├── execQuick.ts
│   │   │       ├── installDependencies.ts
│   │   │       ├── isGitStatusClean.ts
│   │   │       ├── isInGitRepository.ts
│   │   │       ├── toFsCompatible.ts
│   │   │       └── wgetAsync.ts
│   │   └── tsconfig.json
│   ├── legacy/
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── analytics/
│   │   │   │   ├── analytics.ts
│   │   │   │   └── analyticsSender.ts
│   │   │   ├── bootstrap.ts
│   │   │   ├── cli/
│   │   │   │   ├── command.ts
│   │   │   │   ├── commandGroups.ts
│   │   │   │   ├── commandRegistry.ts
│   │   │   │   ├── commands/
│   │   │   │   │   ├── host/
│   │   │   │   │   │   ├── host.ts
│   │   │   │   │   │   └── index.ts
│   │   │   │   │   ├── login/
│   │   │   │   │   │   ├── index.ts
│   │   │   │   │   │   ├── login.ts
│   │   │   │   │   │   └── loginSuccessPage.ts
│   │   │   │   │   └── logout/
│   │   │   │   │       ├── index.ts
│   │   │   │   │       └── logout.ts
│   │   │   │   ├── defaultErrorHandler.ts
│   │   │   │   ├── globalFlags.ts
│   │   │   │   ├── handleErrors.ts
│   │   │   │   ├── legacyCommand.ts
│   │   │   │   ├── loader/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── loader.ts
│   │   │   │   ├── registerCommands.ts
│   │   │   │   ├── request.ts
│   │   │   │   ├── uploadFile.ts
│   │   │   │   └── user/
│   │   │   │       ├── checkUserLogin.ts
│   │   │   │       ├── getUserInfoFromAPI.ts
│   │   │   │       └── index.ts
│   │   │   ├── constants.ts
│   │   │   ├── error/
│   │   │   │   ├── abstractError.ts
│   │   │   │   ├── arcoError.ts
│   │   │   │   ├── cloneErrorObject.ts
│   │   │   │   ├── generalError.ts
│   │   │   │   └── hashErrorObject.ts
│   │   │   ├── globalConfig/
│   │   │   │   ├── config.ts
│   │   │   │   └── index.ts
│   │   │   ├── logger/
│   │   │   │   ├── getPinoLogger.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── interface.ts
│   │   │   │   ├── logger.ts
│   │   │   │   ├── printWarning.ts
│   │   │   │   └── profiler.ts
│   │   │   ├── prompts/
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── promptCanceled.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── prompt.ts
│   │   │   │   └── schemas/
│   │   │   │       ├── analyticsReporting.ts
│   │   │   │       └── errorReporting.ts
│   │   │   ├── types.ts
│   │   │   ├── utils/
│   │   │   │   ├── buildCommandMessage.ts
│   │   │   │   ├── cliVersion.ts
│   │   │   │   ├── concurrency.ts
│   │   │   │   ├── encryption/
│   │   │   │   │   └── sha1.ts
│   │   │   │   ├── eol.ts
│   │   │   │   ├── fs/
│   │   │   │   │   ├── isDirEmpty.ts
│   │   │   │   │   ├── readDirIgnoreDsStore.ts
│   │   │   │   │   ├── removeEmptyDir.ts
│   │   │   │   │   ├── removeFilesAndEmptyDirsRecursively.ts
│   │   │   │   │   └── zipFiles.ts
│   │   │   │   ├── ignore.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── map/
│   │   │   │   │   └── toObject.ts
│   │   │   │   ├── mapToObject.ts
│   │   │   │   ├── network/
│   │   │   │   │   └── port.ts
│   │   │   │   ├── number/
│   │   │   │   │   └── isNumeric.ts
│   │   │   │   ├── packCommand.ts
│   │   │   │   ├── path.ts
│   │   │   │   ├── regexp/
│   │   │   │   │   └── style.ts
│   │   │   │   ├── string/
│   │   │   │   │   ├── toBase64.ts
│   │   │   │   │   └── toFsCompatible.ts
│   │   │   │   ├── taskManager.ts
│   │   │   │   └── timer/
│   │   │   │       ├── exceptions/
│   │   │   │       │   ├── index.ts
│   │   │   │       │   ├── timerAlreadyRunningError.ts
│   │   │   │       │   └── timerNotStartedError.ts
│   │   │   │       ├── index.ts
│   │   │   │       ├── response.ts
│   │   │   │       └── timer.ts
│   │   │   └── workspace/
│   │   │       ├── component/
│   │   │       │   ├── dependencies/
│   │   │       │   │   ├── detectives/
│   │   │       │   │   │   ├── detectiveEs6.ts
│   │   │       │   │   │   ├── index.ts
│   │   │       │   │   │   └── parserHelper.ts
│   │   │       │   │   └── types/
│   │   │       │   │       └── dependencyTreeType.ts
│   │   │       │   ├── exceptions/
│   │   │       │   │   ├── componentNotFoundInPathError.ts
│   │   │       │   │   ├── fileSourceNotFoundError.ts
│   │   │       │   │   └── index.ts
│   │   │       │   └── sources/
│   │   │       │       ├── abstractVinyl.ts
│   │   │       │       ├── dataToPersist.ts
│   │   │       │       ├── dist.ts
│   │   │       │       ├── index.ts
│   │   │       │       ├── removePath.ts
│   │   │       │       ├── sourceFile.ts
│   │   │       │       └── vinylTypes.ts
│   │   │       ├── componentIdTo.ts
│   │   │       ├── componentInfo.ts
│   │   │       ├── componentOps/
│   │   │       │   └── addComponents/
│   │   │       │       ├── addComponents.ts
│   │   │       │       ├── exceptions/
│   │   │       │       │   ├── ignoredDirectoryError.ts
│   │   │       │       │   └── index.ts
│   │   │       │       └── index.ts
│   │   │       ├── componentResult.ts
│   │   │       └── workspaceLocator.ts
│   │   └── tsconfig.json
│   ├── migrator/
│   │   ├── bin/
│   │   │   └── arco-migrate
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── adapters/
│   │   │   │   ├── componentAdapter.ts
│   │   │   │   ├── packageAdapter.ts
│   │   │   │   └── workspaceAdapter.ts
│   │   │   ├── app.ts
│   │   │   ├── constant.ts
│   │   │   ├── index.ts
│   │   │   ├── migrator.ts
│   │   │   ├── types.ts
│   │   │   └── utils.ts
│   │   └── tsconfig.json
│   ├── react/
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   ├── jest/
│   │   │   │   ├── index.ts
│   │   │   │   ├── jest.base.config.js
│   │   │   │   ├── jest.cjs.config.js
│   │   │   │   ├── jest.esm.config.js
│   │   │   │   ├── setupTests.js
│   │   │   │   └── transformers/
│   │   │   │       ├── base-transformer-plugins.js
│   │   │   │       ├── base-transformer-presets.js
│   │   │   │       ├── base-transformer-process.js
│   │   │   │       ├── cjs-transformer.js
│   │   │   │       ├── esm-transformer.js
│   │   │   │       ├── file-transformer.js
│   │   │   │       └── style-transformer.js
│   │   │   ├── react.aspect.ts
│   │   │   ├── react.env.ts
│   │   │   ├── react.main.runtime.ts
│   │   │   ├── tsdoc/
│   │   │   │   ├── index.ts
│   │   │   │   └── parser.ts
│   │   │   ├── types/
│   │   │   │   └── reactConfig.ts
│   │   │   ├── typescript/
│   │   │   │   ├── asset.d.ts
│   │   │   │   ├── style.d.ts
│   │   │   │   └── tsconfig.json
│   │   │   └── webpack/
│   │   │       ├── overlay/
│   │   │       │   ├── formatWebpackMessages.js
│   │   │       │   ├── launchEditorEndpoint.js
│   │   │       │   ├── refreshOverlayInterop.js
│   │   │       │   └── webpackHotDevClient.js
│   │   │       ├── webpack.config.base.ts
│   │   │       ├── webpack.config.component.dev.ts
│   │   │       └── webpack.config.component.prod.ts
│   │   └── tsconfig.json
│   ├── service/
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── builder/
│   │   │   │   ├── build.cmd.ts
│   │   │   │   ├── buildPipe.ts
│   │   │   │   ├── buildPipelineOrder.ts
│   │   │   │   ├── buildTask.ts
│   │   │   │   ├── builder.aspect.ts
│   │   │   │   ├── builder.main.runtime.ts
│   │   │   │   ├── builder.service.tsx
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── artifactDefinitionError.ts
│   │   │   │   │   ├── artifactStorageError.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── invalidTaskError.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── mergeComponentResults.ts
│   │   │   │   ├── taskResultsList.ts
│   │   │   │   └── tasksQueue.ts
│   │   │   ├── compiler/
│   │   │   │   ├── compiler.aspect.ts
│   │   │   │   ├── compiler.main.runtime.ts
│   │   │   │   ├── compiler.task.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── types.ts
│   │   │   │   └── utils/
│   │   │   │       ├── compileStyle.ts
│   │   │   │       └── sortPackageBuildOrders.ts
│   │   │   ├── fork/
│   │   │   │   ├── fork.aspect.ts
│   │   │   │   ├── fork.cmd.ts
│   │   │   │   ├── fork.main.runtime.ts
│   │   │   │   └── index.ts
│   │   │   ├── generator/
│   │   │   │   ├── create.cmd.ts
│   │   │   │   ├── generator.aspect.ts
│   │   │   │   ├── generator.main.runtime.ts
│   │   │   │   └── index.ts
│   │   │   ├── index.ts
│   │   │   ├── preview/
│   │   │   │   ├── bundlingStrategy.ts
│   │   │   │   ├── cli/
│   │   │   │   │   └── previewServerStatus/
│   │   │   │   │       ├── index.ts
│   │   │   │   │       ├── previewServerHeader.tsx
│   │   │   │   │       ├── previewServerRow.tsx
│   │   │   │   │       ├── previewServerStatus.tsx
│   │   │   │   │       └── webpackError.tsx
│   │   │   │   ├── exceptions/
│   │   │   │   │   ├── bundlingStrategyNotFoundError.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── previewNotFoundError.ts
│   │   │   │   │   └── previewOutputFileNotFoundError.ts
│   │   │   │   ├── executionRef.ts
│   │   │   │   ├── generateLink.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── preview.aspect.ts
│   │   │   │   ├── preview.main.runtime.ts
│   │   │   │   ├── preview.startPlugin.tsx
│   │   │   │   ├── preview.task.ts
│   │   │   │   ├── previewRuntime/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── preview.preview.runtime.tsx
│   │   │   │   │   └── previewModules.tsx
│   │   │   │   ├── strategies/
│   │   │   │   │   ├── componentStrategy.ts
│   │   │   │   │   ├── generatePreviewBundleEntry.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── strategiesNames.ts
│   │   │   │   ├── types/
│   │   │   │   │   ├── custom.d.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── previewDefinition.ts
│   │   │   │   │   ├── previewModule.ts
│   │   │   │   │   ├── previewType.ts
│   │   │   │   │   └── renderingContext.ts
│   │   │   │   ├── uiRuntime/
│   │   │   │   │   ├── componentPreview.tsx
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── urls.ts
│   │   │   │   └── webpackEventsListener.ts
│   │   │   ├── syncer/
│   │   │   │   ├── index.ts
│   │   │   │   ├── sync.cmd.ts
│   │   │   │   ├── syncer.aspect.ts
│   │   │   │   ├── syncer.main.runtime.ts
│   │   │   │   └── type/
│   │   │   │       └── syncParams.ts
│   │   │   ├── tester/
│   │   │   │   ├── index.ts
│   │   │   │   ├── test.cmd.tsx
│   │   │   │   ├── tester.aspect.ts
│   │   │   │   ├── tester.main.runtime.ts
│   │   │   │   ├── tester.service.tsx
│   │   │   │   └── tester.ts
│   │   │   └── ui/
│   │   │       ├── cli/
│   │   │       │   ├── time.tsx
│   │   │       │   ├── uiServerConsole.tsx
│   │   │       │   └── uiServerLoader.tsx
│   │   │       ├── createRoot.ts
│   │   │       ├── exceptions/
│   │   │       │   ├── index.ts
│   │   │       │   └── unknownUIError.ts
│   │   │       ├── index.ts
│   │   │       ├── start.cmd.tsx
│   │   │       ├── startPlugin.ts
│   │   │       ├── ui.aspect.ts
│   │   │       ├── ui.main.runtime.ts
│   │   │       ├── uiRoot.ts
│   │   │       ├── uiRuntime/
│   │   │       │   ├── index.ts
│   │   │       │   ├── ui.ui.runtime.tsx
│   │   │       │   └── uiRoot.ui.ts
│   │   │       ├── uiServer.ts
│   │   │       └── webpack/
│   │   │           ├── html.ts
│   │   │           └── webpack.dev.config.ts
│   │   └── tsconfig.json
│   ├── stone/
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── aspect/
│   │   │   │   ├── aspect.ts
│   │   │   │   ├── aspectManifest.ts
│   │   │   │   └── index.ts
│   │   │   ├── config/
│   │   │   │   ├── config.ts
│   │   │   │   └── index.ts
│   │   │   ├── exception/
│   │   │   │   ├── extensionInitError.ts
│   │   │   │   ├── extensionLoadError.ts
│   │   │   │   ├── extensionPotentialCircularError.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── readConfigError.ts
│   │   │   │   ├── runtimeModuleError.ts
│   │   │   │   └── runtimeNotDefinedError.ts
│   │   │   ├── extension/
│   │   │   │   ├── extension.ts
│   │   │   │   ├── extensionManifest.ts
│   │   │   │   └── index.ts
│   │   │   ├── extensionGraph/
│   │   │   │   ├── extensionGraph.ts
│   │   │   │   ├── fromExtension.ts
│   │   │   │   └── index.ts
│   │   │   ├── index.ts
│   │   │   ├── runtimes/
│   │   │   │   ├── index.ts
│   │   │   │   ├── runtimeDefinition.ts
│   │   │   │   ├── runtimeManifest.ts
│   │   │   │   └── runtimes.ts
│   │   │   ├── slot/
│   │   │   │   ├── index.ts
│   │   │   │   ├── registry.ts
│   │   │   │   └── slot.ts
│   │   │   ├── stone.ts
│   │   │   ├── stoneConfig/
│   │   │   │   ├── configReader.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── stoneConfig.ts
│   │   │   ├── types.ts
│   │   │   └── utils/
│   │   │       └── asyncForEach.ts
│   │   └── tsconfig.json
│   └── ui-foundation-react/
│       ├── package.json
│       ├── src/
│       │   ├── backTop/
│       │   │   └── index.ts
│       │   ├── baseUI/
│       │   │   ├── grid/
│       │   │   │   ├── grid.module.scss
│       │   │   │   ├── grid.tsx
│       │   │   │   ├── gridTemplate/
│       │   │   │   │   ├── gridTemplate.module.scss
│       │   │   │   │   └── index.ts
│       │   │   │   └── index.tsx
│       │   │   ├── highlighter/
│       │   │   │   ├── codeHighlighter.tsx
│       │   │   │   ├── index.ts
│       │   │   │   └── syntaxHighlighter.tsx
│       │   │   ├── index.ts
│       │   │   └── table/
│       │   │       ├── index.ts
│       │   │       ├── table.module.scss
│       │   │       ├── table.tsx
│       │   │       ├── tableColumn.module.scss
│       │   │       ├── tableColumn.tsx
│       │   │       ├── tableHeadingColumn.module.scss
│       │   │       ├── tableHeadingColumn.tsx
│       │   │       ├── tableHeadingRow.module.scss
│       │   │       ├── tableHeadingRow.tsx
│       │   │       ├── tableRow.module.scss
│       │   │       └── tableRow.tsx
│       │   ├── constants.ts
│       │   ├── globalLoader/
│       │   │   ├── index.ts
│       │   │   ├── loaderContext.tsx
│       │   │   ├── useLoader.ts
│       │   │   └── useLoaderApi.ts
│       │   ├── hooks/
│       │   │   └── useDataQuery.ts
│       │   ├── index.ts
│       │   ├── markdown/
│       │   │   ├── components/
│       │   │   │   ├── anchor/
│       │   │   │   │   ├── anchor.module.scss
│       │   │   │   │   ├── anchor.tsx
│       │   │   │   │   └── index.ts
│       │   │   │   ├── demoView/
│       │   │   │   │   ├── demoView.module.scss
│       │   │   │   │   ├── demoView.tsx
│       │   │   │   │   └── index.ts
│       │   │   │   ├── docAnchor/
│       │   │   │   │   ├── docAnchor.module.scss
│       │   │   │   │   ├── docAnchor.tsx
│       │   │   │   │   └── index.ts
│       │   │   │   ├── heading/
│       │   │   │   │   ├── heading.tsx
│       │   │   │   │   ├── index.ts
│       │   │   │   │   └── utils.ts
│       │   │   │   ├── index.tsx
│       │   │   │   ├── snippet/
│       │   │   │   │   ├── codeSnippet.module.scss
│       │   │   │   │   ├── codeSnippet.tsx
│       │   │   │   │   └── index.tsx
│       │   │   │   └── tabs/
│       │   │   │       ├── index.tsx
│       │   │   │       ├── tabs.module.scss
│       │   │   │       └── tabs.tsx
│       │   │   ├── live/
│       │   │   │   ├── index.ts
│       │   │   │   ├── markdownLive.module.scss
│       │   │   │   └── markdownLive.tsx
│       │   │   ├── mdxLayout/
│       │   │   │   ├── index.ts
│       │   │   │   ├── mdxLayout.module.scss
│       │   │   │   └── mdxLayout.tsx
│       │   │   └── style/
│       │   │       ├── markdown-limit.css
│       │   │       ├── markdown.css
│       │   │       └── variable.scss
│       │   ├── navbar/
│       │   │   ├── index.ts
│       │   │   ├── navbar.module.scss
│       │   │   └── navbar.tsx
│       │   ├── pages/
│       │   │   ├── contactFooter.tsx
│       │   │   ├── errorPage.tsx
│       │   │   ├── index.ts
│       │   │   ├── notFoundPage.tsx
│       │   │   └── style/
│       │   │       ├── contactFooter.module.scss
│       │   │       └── errorPage.module.scss
│       │   ├── preview/
│       │   │   ├── SlotRegister.ts
│       │   │   ├── app.module.scss
│       │   │   ├── app.tsx
│       │   │   ├── doc/
│       │   │   │   ├── content.module.scss
│       │   │   │   ├── content.tsx
│       │   │   │   ├── propertiesTable.module.scss
│       │   │   │   └── propertiesTable.tsx
│       │   │   ├── index.tsx
│       │   │   ├── previewContext/
│       │   │   │   └── index.tsx
│       │   │   └── theme.tsx
│       │   ├── sideBar/
│       │   │   ├── componentMenu/
│       │   │   │   ├── componentMenu.module.scss
│       │   │   │   ├── componentMenu.tsx
│       │   │   │   └── index.ts
│       │   │   ├── index.ts
│       │   │   ├── sideBar.module.scss
│       │   │   └── sideBar.tsx
│       │   ├── spin/
│       │   │   └── index.ts
│       │   ├── style/
│       │   │   ├── colors.scss
│       │   │   ├── global.scss
│       │   │   └── z-indexes.scss
│       │   ├── tabs/
│       │   │   └── index.ts
│       │   ├── type/
│       │   │   └── custom.d.ts
│       │   ├── workspaceContext/
│       │   │   ├── index.ts
│       │   │   ├── workspaceContext.module.scss
│       │   │   └── workspaceContext.tsx
│       │   └── workspaceOverview/
│       │       ├── index.ts
│       │       ├── workspaceOverview.module.scss
│       │       └── workspaceOverview.tsx
│       └── tsconfig.json
├── pnpm-workspace.yaml
├── tsconfig.json
└── ui/
    ├── .gitignore
    ├── .scripts/
    │   └── workspaceHooks/
    │       └── afterComponentCreated.js
    ├── arco.env.config.js
    ├── arco.workspace.jsonc
    ├── jest.config.js
    ├── package.json
    ├── src/
    │   ├── Overview/
    │   │   ├── Overview.tsx
    │   │   ├── __docs__/
    │   │   │   ├── basic.tsx
    │   │   │   └── index.mdx
    │   │   ├── __test__/
    │   │   │   └── index.test.tsx
    │   │   ├── index.ts
    │   │   ├── interface.ts
    │   │   └── style/
    │   │       └── index.module.less
    │   ├── index.ts
    │   ├── type/
    │   │   └── custom.d.ts
    │   └── utils/
    │       ├── constant.ts
    │       ├── dom.ts
    │       ├── findNode.ts
    │       └── useConnectIframe.ts
    └── tsconfig.json
Download .txt
SYMBOL INDEX (1891 symbols across 389 files)

FILE: .scripts/flatPackages.js
  constant NEW_PACKAGES_DIR (line 8) | const NEW_PACKAGES_DIR = path.resolve(__dirname, '../_packages');
  constant PATH_IGNORE_PATTERN (line 9) | const PATH_IGNORE_PATTERN = /ui-foundation|app|stone|legacy/;
  constant DEFAULT_PACKAGE_JSON (line 11) | const DEFAULT_PACKAGE_JSON = {
  function flatPackages (line 25) | async function flatPackages() {

FILE: .scripts/getLocalPackages.js
  constant DIR_PACKAGES (line 5) | const DIR_PACKAGES = path.resolve(__dirname, '../packages');

FILE: .scripts/linkLocalPackages.js
  constant DIR_NODE_MODULES (line 7) | const DIR_NODE_MODULES = path.resolve(__dirname, '../node_modules');
  function linkLocalPackages (line 9) | async function linkLocalPackages() {

FILE: .scripts/linkTsPaths.js
  constant ROOT_PATH (line 7) | const ROOT_PATH = path.resolve(__dirname, '..');
  constant FILE_TSCONFIG (line 8) | const FILE_TSCONFIG = path.resolve(ROOT_PATH, 'tsconfig.paths.json');
  function linkLocalPackages (line 10) | async function linkLocalPackages() {

FILE: packages/arco/src/loadCli.ts
  function requireAspects (line 20) | async function requireAspects(aspect: Extension, runtime: RuntimeDefinit...
  function getConfig (line 33) | async function getConfig(cwd = process.cwd()): Promise<Config> {
  function loadArco (line 45) | async function loadArco(path = process.cwd()) {
  function runCLI (line 64) | async function runCLI() {

FILE: packages/arco/src/manifest.ts
  function isCoreAspect (line 54) | function isCoreAspect(id: string) {
  function getAllCoreAspectsIds (line 60) | function getAllCoreAspectsIds(): string[] {

FILE: packages/arco/src/types.ts
  type ArcoWorkspaceFile (line 8) | type ArcoWorkspaceFile = {

FILE: packages/aspect/src/bundler/browserRuntime.ts
  type BrowserRuntime (line 3) | type BrowserRuntime = {

FILE: packages/aspect/src/bundler/bundler.main.runtime.ts
  type BrowserRuntimeSlot (line 14) | type BrowserRuntimeSlot = SlotRegistry<BrowserRuntime>;
  class BundlerMain (line 16) | class BundlerMain {
    method provider (line 23) | static async provider(
    method constructor (line 34) | constructor(
    method registerTarget (line 45) | registerTarget(runtime: BrowserRuntime) {
    method devServer (line 50) | async devServer(components: Component[]): Promise<ComponentServer[]> {
    method getComponentServer (line 61) | getComponentServer(component: Component): undefined | ComponentServer {

FILE: packages/aspect/src/bundler/bundler.ts
  type Asset (line 3) | type Asset = {
  type Chunk (line 20) | type Chunk = {
  type ChunksAssetsMap (line 26) | type ChunksAssetsMap = {
  type EntryAssets (line 30) | type EntryAssets = {
  type EntriesAssetsMap (line 39) | type EntriesAssetsMap = {
  type BundlerResult (line 43) | type BundlerResult = {
  type Bundler (line 95) | interface Bundler {
  type BundlerMode (line 99) | type BundlerMode = 'dev' | 'prod';

FILE: packages/aspect/src/bundler/bundlerContext.ts
  type LibraryOptions (line 5) | type LibraryOptions = {
  type Chunking (line 18) | type Chunking = {
  type MetaData (line 25) | type MetaData = {
  type HtmlConfig (line 36) | type HtmlConfig = {
  type Entry (line 69) | type Entry = {
  type EntryMap (line 85) | type EntryMap = {
  type ModuleTarget (line 89) | type ModuleTarget = {
  type Target (line 107) | type Target = {
  type BundlerContext (line 172) | interface BundlerContext extends BuildContext {

FILE: packages/aspect/src/bundler/componentServer.ts
  class ComponentServer (line 7) | class ComponentServer {
    method constructor (line 12) | constructor(
    method selectPort (line 31) | private async selectPort(portRange?: number[] | number) {
    method getHostname (line 35) | private getHostname(address: string | AddressInfo | null) {
    method port (line 47) | get port() {
    method url (line 54) | get url() {
    method listen (line 59) | async listen() {

FILE: packages/aspect/src/bundler/dedupEnvs.ts
  type GroupIdContextMap (line 3) | type GroupIdContextMap = Record<string, ExecutionContext[]>;
  function dedupEnvs (line 9) | function dedupEnvs(contexts: ExecutionContext[]) {

FILE: packages/aspect/src/bundler/devServer.service.ts
  type DevServerDescriptor (line 13) | type DevServerDescriptor = {
  class DevServerService (line 32) | class DevServerService implements EnvService<ComponentServer, DevServerD...
    method constructor (line 35) | constructor(
    method getComponentsFromContexts (line 42) | private getComponentsFromContexts(contexts: ExecutionContext[]) {
    method buildContext (line 53) | private async buildContext(
    method getDescriptor (line 70) | async getDescriptor(
    method runOnce (line 86) | async runOnce(contexts: ExecutionContext[]): Promise<ComponentServer[]> {

FILE: packages/aspect/src/bundler/devServer.ts
  type DevServer (line 6) | interface DevServer {

FILE: packages/aspect/src/bundler/devServerContext.ts
  type DevServerContext (line 3) | interface DevServerContext extends ExecutionContext {

FILE: packages/aspect/src/bundler/exceptions/bindError.ts
  class BindError (line 1) | class BindError extends Error {}

FILE: packages/aspect/src/bundler/getEntry.ts
  function getEntry (line 8) | async function getEntry(

FILE: packages/aspect/src/component/component.main.runtime.ts
  type ComponentHostSlot (line 10) | type ComponentHostSlot = SlotRegistry<ComponentFactory>;
  class ComponentMain (line 12) | class ComponentMain {
    method provider (line 19) | static provider([graphql]: [GraphqlMain], _config, [hostSlot]: [Compon...
    method constructor (line 27) | constructor(private hostSlot: ComponentHostSlot) {}
    method getPriorHost (line 29) | private getPriorHost() {
    method registerHost (line 35) | registerHost(host: ComponentFactory) {
    method getHost (line 40) | getHost(id?: string): ComponentFactory {

FILE: packages/aspect/src/component/component.ts
  class Component (line 10) | class Component {
    method constructor (line 13) | constructor(private info: ComponentInfo, public files: SourceFile[] = ...
    method id (line 15) | get id() {
    method name (line 19) | get name() {
    method group (line 23) | get group() {
    method author (line 27) | get author() {
    method labels (line 31) | get labels() {
    method env (line 35) | get env() {
    method language (line 39) | get language() {
    method version (line 43) | get version() {
    method packageName (line 47) | get packageName() {
    method dependencies (line 51) | get dependencies() {
    method devDependencies (line 55) | get devDependencies() {
    method peerDependencies (line 59) | get peerDependencies() {
    method rootDir (line 63) | get rootDir() {
    method componentDir (line 67) | get componentDir() {
    method packageDir (line 71) | get packageDir() {
    method packageDirAbs (line 75) | get packageDirAbs() {
    method entries (line 79) | get entries() {
    method repository (line 83) | get repository() {
    method uiResource (line 87) | get uiResource() {
    method extraStyles (line 91) | get extraStyles() {
    method forkable (line 95) | get forkable() {
    method rawConfig (line 99) | get rawConfig() {
    method upsertExtensionData (line 103) | async upsertExtensionData(extension: string, data: Record<string, any>) {
    method loadFromFileSystem (line 114) | static async loadFromFileSystem(info: ComponentInfo, projectPath: stri...

FILE: packages/aspect/src/component/componentFactory.ts
  type ComponentFactory (line 4) | interface ComponentFactory {

FILE: packages/aspect/src/component/componentMap.ts
  class ComponentMap (line 6) | class ComponentMap<T> {
    method constructor (line 7) | constructor(readonly hashMap: Map<string, [Component, T]>) {}
    method components (line 9) | get components() {
    method get (line 16) | get(component: Component) {
    method getValueByComponentId (line 23) | getValueByComponentId(componentId: string): T | null {
    method toArray (line 32) | toArray() {
    method map (line 39) | map<NewType>(predicate: (value: T, component: Component) => NewType): ...
    method forEach (line 51) | forEach(predicate: (value: T, component: Component) => void): void {
    method flattenValue (line 60) | flattenValue(): T[] {
    method filter (line 70) | filter(predicate: (value: T) => boolean): ComponentMap<T> {
    method keys (line 85) | keys() {
    method create (line 89) | static create<U>(rawMap: [Component, U][]) {
    method as (line 101) | static as<U>(components: Component[], predicate: (component: Component...

FILE: packages/aspect/src/component/exceptions/hostNotFoundError.ts
  class HostNotFoundError (line 1) | class HostNotFoundError extends Error {
    method constructor (line 2) | constructor(private hostName: string) {
    method toString (line 6) | toString() {

FILE: packages/aspect/src/component/exceptions/invalidNameError.ts
  class InvalidNameError (line 1) | class InvalidNameError extends Error {
    method constructor (line 4) | constructor(componentName: string) {

FILE: packages/aspect/src/component/exceptions/invalidVersionError.ts
  class InvalidVersionError (line 1) | class InvalidVersionError extends Error {
    method constructor (line 4) | constructor(version?: string | null) {

FILE: packages/aspect/src/component/extensionData.ts
  type RemoveExtensionSpecialSign (line 3) | type RemoveExtensionSpecialSign = '-';
  type ExtensionConfig (line 5) | type ExtensionConfig = { [extName: string]: any } | RemoveExtensionSpeci...
  type ConfigOnlyEntry (line 7) | type ConfigOnlyEntry = {
  constant REMOVE_EXTENSION_SPECIAL_SIGN (line 12) | const REMOVE_EXTENSION_SPECIAL_SIGN = '-';
  class ExtensionDataEntry (line 14) | class ExtensionDataEntry {
    method constructor (line 15) | constructor(
    method config (line 21) | get config(): { [key: string]: any } {
    method config (line 26) | set config(val: { [key: string]: any }) {
    method isRemoved (line 30) | get isRemoved(): boolean {
    method toObject (line 34) | toObject() {
    method clone (line 43) | clone(): ExtensionDataEntry {
  class ExtensionDataList (line 52) | class ExtensionDataList extends Array<ExtensionDataEntry> {
    method registerCoreExtensionName (line 55) | static registerCoreExtensionName(name: string) {
    method registerManyCoreExtensionNames (line 59) | static registerManyCoreExtensionNames(names: string[]) {
    method ids (line 65) | get ids(): string[] {
    method findExtension (line 69) | findExtension(extensionId: string): ExtensionDataEntry | undefined {
    method remove (line 73) | remove(id) {
    method toConfigObject (line 81) | toConfigObject() {
    method toConfigArray (line 91) | toConfigArray(): ConfigOnlyEntry[] {
    method clone (line 105) | clone(): ExtensionDataList {
    method fromConfigObject (line 110) | static fromConfigObject(obj: { [extensionId: string]: any } = {}): Ext...
    method fromArray (line 117) | static fromArray(entries: ExtensionDataEntry[]): ExtensionDataList {

FILE: packages/aspect/src/component/uiRuntime/component.tsx
  type ComponentPageElement (line 16) | type ComponentPageElement = {
  type ComponentPageSlot (line 21) | type ComponentPageSlot = SlotRegistry<ComponentPageElement[]>;
  type ComponentProps (line 23) | type ComponentProps = {
  function Component (line 32) | function Component({

FILE: packages/aspect/src/component/uiRuntime/component.ui.runtime.tsx
  type RouteSlot (line 9) | type RouteSlot = SlotRegistry<RouteProps>;
  class ComponentUI (line 11) | class ComponentUI {
    method provider (line 18) | static provider(_deps, _config, [routeSlot, pageItemSlot]: [RouteSlot,...
    method constructor (line 23) | constructor(private routeSlot: RouteSlot, private pageItemSlot: Compon...
    method registerRoute (line 27) | registerRoute(routes: RouteProps) {
    method getComponentUI (line 37) | getComponentUI(host: string, componentId?: string) {

FILE: packages/aspect/src/component/uiRuntime/componentContext.tsx
  function ComponentProvider (line 8) | function ComponentProvider({

FILE: packages/aspect/src/component/uiRuntime/componentError.tsx
  class ComponentError (line 4) | class ComponentError {
    method constructor (line 5) | constructor(
    method renderError (line 17) | renderError() {

FILE: packages/aspect/src/component/uiRuntime/componentMeta/componentMeta.tsx
  type ComponentMetaProps (line 8) | interface ComponentMetaProps {
  function ComponentMeta (line 13) | function ComponentMeta({ component, onComponentExtraStyleChange }: Compo...

FILE: packages/aspect/src/component/uiRuntime/componentModel.ts
  type ComponentServer (line 1) | type ComponentServer = {
  type ComponentOutline (line 6) | type ComponentOutline = {
  type ComponentExtraDoc (line 11) | type ComponentExtraDoc = {
  type ComponentExtraStyle (line 17) | type ComponentExtraStyle = {
  type ComponentModelProps (line 22) | type ComponentModelProps = {
  class ComponentModel (line 37) | class ComponentModel {
    method constructor (line 38) | constructor(
    method from (line 53) | static from({
    method fromArray (line 83) | static fromArray(componentsProps: ComponentModelProps[]) {
    method empty (line 87) | static empty() {

FILE: packages/aspect/src/component/uiRuntime/hooks/useComponentQuery.ts
  constant GET_COMPONENT (line 43) | const GET_COMPONENT = gql`
  function useComponentQuery (line 59) | function useComponentQuery(componentId: string, host: string, skip?: boo...

FILE: packages/aspect/src/component/uiRuntime/utils/getIdFromLocation.ts
  function getIdFromLocation (line 7) | function getIdFromLocation(): string | undefined {

FILE: packages/aspect/src/component/version/version.ts
  constant LATEST_VERSION (line 4) | const LATEST_VERSION = 'latest';
  constant VERSION_DELIMITER (line 6) | const VERSION_DELIMITER = '@';
  class Version (line 8) | class Version {
    method constructor (line 13) | constructor(versionNum: string | null | undefined, latest: boolean) {
    method toString (line 18) | toString() {
    method isLaterThan (line 25) | isLaterThan(otherVersion: Version): boolean {

FILE: packages/aspect/src/component/version/versionParser.ts
  constant LATEST_TESTED_MARK (line 5) | const LATEST_TESTED_MARK = '*';
  function isLatest (line 7) | function isLatest(versionStr: string): boolean {
  function isLatestTested (line 11) | function isLatestTested(versionStr: string) {
  function isRegular (line 21) | function isRegular(versionStr: string) {
  function returnRegular (line 25) | function returnRegular(versionStr: string): Version {
  function returnLatestTestedVersion (line 29) | function returnLatestTestedVersion(versionStr: string): Version {
  function returnLatest (line 34) | function returnLatest(): Version {
  function convertToSemVer (line 38) | function convertToSemVer(versionStr: number) {
  function versionParser (line 42) | function versionParser(versionStr: string | number | null | undefined): ...

FILE: packages/aspect/src/docs/doc/doc.ts
  class Doc (line 5) | class Doc {
    method constructor (line 6) | constructor(readonly filePath: string, readonly props: DocPropList) {}
    method toObject (line 8) | toObject() {
    method title (line 15) | get title(): string {
    method description (line 20) | get description(): string {
    method labels (line 25) | get labels(): string[] {
    method outline (line 30) | get outline(): DocOutline {
    method snippets (line 34) | get snippets(): DocSnippet[] {
    method from (line 38) | static from(path: string, propObject: SerializableMap) {
    method mergeDocProperty (line 42) | static mergeDocProperty(docProp, extendProp): typeof docProp {

FILE: packages/aspect/src/docs/doc/docProp.ts
  type Serializable (line 1) | type Serializable =
  type SerializableMap (line 10) | type SerializableMap = {
  class DocProp (line 14) | class DocProp {
    method constructor (line 15) | constructor(
    method getAs (line 27) | getAs<T>() {

FILE: packages/aspect/src/docs/doc/docPropList.ts
  class DocPropList (line 3) | class DocPropList {
    method constructor (line 4) | constructor(readonly docProps: DocProp[]) {}
    method get (line 6) | get(name: string) {
    method from (line 10) | static from(object: any): DocPropList {

FILE: packages/aspect/src/docs/docs.main.runtime.ts
  type DocReaderSlot (line 26) | type DocReaderSlot = SlotRegistry<DocReader>;
  class DocsMain (line 28) | class DocsMain {
    method provider (line 41) | static provider(
    method constructor (line 72) | constructor(private logger: Logger, private docReaderSlot: DocReaderSl...
    method getDocFiles (line 74) | private getDocFiles({ entries, files }: Component): {
    method getDocReader (line 87) | private getDocReader(extension: string) {
    method registerDocReader (line 95) | registerDocReader(docReader: DocReader) {
    method getTemplate (line 100) | async getTemplate(env: Environment): Promise<string> {
    method getDocsMap (line 107) | getDocsMap(components: Component[]) {
    method getMetadata (line 115) | getMetadata(components: Component[], env: Environment) {
    method getDoc (line 152) | getDoc(component: Component) {
    method computeDoc (line 163) | async computeDoc(component: Component) {
    method getDocsManifestFromArtifact (line 187) | async getDocsManifestFromArtifact(component: Component): Promise<Compo...

FILE: packages/aspect/src/docs/docs.previewDefinition.ts
  class DocsPreviewDefinition (line 8) | class DocsPreviewDefinition implements PreviewDefinition {
    method constructor (line 15) | constructor(
    method renderTemplatePath (line 25) | async renderTemplatePath(env: Environment): Promise<string> {
    method getModuleMap (line 32) | async getModuleMap(components: Component[]) {
    method getMetadataMap (line 39) | async getMetadataMap(components: Component[], env: Environment) {

FILE: packages/aspect/src/docs/docs.task.ts
  type ComponentManifest (line 16) | type ComponentManifest = {
  class DocsTask (line 22) | class DocsTask implements BuildTask {
    method constructor (line 27) | constructor(
    method execute (line 34) | async execute(context: BuildContext): Promise<BuildTaskResult> {

FILE: packages/aspect/src/docs/exceptions/fileExtensionNotSupportedError.ts
  class FileExtensionNotSupportedError (line 1) | class FileExtensionNotSupportedError extends Error {
    method constructor (line 2) | constructor(filePath: string, extension: string) {

FILE: packages/aspect/src/docs/previewRuntime/docs.preview.runtime.tsx
  type DocsRootProps (line 13) | type DocsRootProps = {
  class DocsPreview (line 24) | class DocsPreview {
    method provider (line 29) | static async provider([preview]: [PreviewPreview]) {
    method constructor (line 41) | constructor() {}
    method selectPreviewModel (line 43) | selectPreviewModel(componentId: string, modules: PreviewModule) {

FILE: packages/aspect/src/docs/type/docOutline.ts
  type DocOutline (line 1) | type DocOutline = Array<{ depth: number; text: string }>;

FILE: packages/aspect/src/docs/type/docReader.ts
  type DocReader (line 3) | interface DocReader {

FILE: packages/aspect/src/docs/type/docSnippet.ts
  type DocSnippet (line 1) | type DocSnippet = { language: string; code: string };

FILE: packages/aspect/src/docs/uiRuntime/docs.ui.runtime.tsx
  class DocsUI (line 9) | class DocsUI {
    method provider (line 16) | static provider([component]: [ComponentUI]) {
    method constructor (line 25) | constructor() {}

FILE: packages/aspect/src/docs/uiRuntime/overview.tsx
  function Overview (line 12) | function Overview() {

FILE: packages/aspect/src/envs/envDefinition.ts
  class EnvDefinition (line 6) | class EnvDefinition {
    method constructor (line 7) | constructor(readonly id: string, readonly env: Environment) {}
    method name (line 9) | get name() {
    method description (line 13) | get description() {
    method toObject (line 17) | toObject() {

FILE: packages/aspect/src/envs/envService.ts
  type EnvServiceExecutionResult (line 5) | interface EnvServiceExecutionResult {
  type EnvService (line 19) | interface EnvService<

FILE: packages/aspect/src/envs/environment.ts
  type Environment (line 9) | interface Environment {
  type TesterEnv (line 41) | interface TesterEnv<T = any> extends Environment {
  type PreviewEnv (line 53) | interface PreviewEnv extends Environment {

FILE: packages/aspect/src/envs/envs.main.runtime.ts
  type EnvsSlot (line 15) | type EnvsSlot = SlotRegistry<Environment>;
  type ServiceSlot (line 16) | type ServiceSlot = SlotRegistry<EnvService<any>>;
  type EnvTransformer (line 18) | type EnvTransformer = (env: Environment) => Environment;
  class EnvsMain (line 20) | class EnvsMain {
    method provider (line 27) | static provider(
    method constructor (line 36) | constructor(
    method aggregateByDefs (line 42) | private async aggregateByDefs(components: Component[]): Promise<EnvRun...
    method compose (line 68) | compose(targetEnv: Environment, envTransformers: EnvTransformer[]) {
    method override (line 78) | override(propsToOverride: Environment): EnvTransformer {
    method merge (line 87) | merge<T extends Environment, S extends Environment>(
    method getEnv (line 114) | getEnv(component: Component): EnvDefinition {
    method getDefaultEnv (line 123) | getDefaultEnv(): EnvDefinition {
    method registerEnv (line 129) | registerEnv(env: Environment) {
    method registerService (line 133) | registerService(envService: EnvService<any>) {
    method isEnvRegistered (line 138) | isEnvRegistered(id: string) {
    method getAllRegisteredEnvs (line 142) | getAllRegisteredEnvs(): string[] {
    method createEnvironment (line 146) | async createEnvironment(components: Component[]): Promise<Runtime> {

FILE: packages/aspect/src/envs/exceptions/envNotFoundError.ts
  class EnvNotFoundError (line 3) | class EnvNotFoundError extends ArcoError {
    method constructor (line 4) | constructor(id: string) {

FILE: packages/aspect/src/envs/executionContext.ts
  class ExecutionContext (line 5) | class ExecutionContext {
    method constructor (line 6) | constructor(
    method id (line 28) | get id() {
    method env (line 35) | get env(): Environment {
    method envDefinition (line 39) | get envDefinition(): EnvDefinition {
    method apply (line 43) | apply<T>(name: string, args: any[]): T {

FILE: packages/aspect/src/envs/runtime/envRuntime.ts
  class EnvRuntime (line 5) | class EnvRuntime {
    method constructor (line 6) | constructor(

FILE: packages/aspect/src/envs/runtime/envsExecutionResult.ts
  class EnvsExecutionResult (line 5) | class EnvsExecutionResult<T extends EnvServiceExecutionResult> {
    method constructor (line 6) | constructor(readonly results: EnvResult<T>[]) {}
    method hasErrors (line 8) | hasErrors() {
    method errors (line 12) | get errors(): Error[] {
    method getErrorsOfEnv (line 16) | getErrorsOfEnv(envResult: EnvResult<T>): Error[] {
    method throwErrorsIfExist (line 27) | throwErrorsIfExist() {
    method getEnvErrorsAsString (line 35) | getEnvErrorsAsString(envResult: EnvResult<T>): string {

FILE: packages/aspect/src/envs/runtime/runtime.ts
  type EnvResult (line 8) | interface EnvResult<T extends EnvServiceExecutionResult> {
  class Runtime (line 14) | class Runtime {
    method constructor (line 15) | constructor(
    method getEnvExecutionContext (line 24) | getEnvExecutionContext(): ExecutionContext[] {
    method runOnce (line 31) | async runOnce<T>(service: EnvService<T>, options?: { [key: string]: an...
    method run (line 42) | async run<T>(

FILE: packages/aspect/src/envs/types.ts
  type ArcoEnvConfig (line 9) | type ArcoEnvConfig = {

FILE: packages/aspect/src/jest/exceptions/jestError.ts
  class JestError (line 1) | class JestError extends Error {
    method constructor (line 2) | constructor(
    method stack (line 11) | get stack() {

FILE: packages/aspect/src/jest/jest.main.runtime.ts
  class JestMain (line 5) | class JestMain {
    method provider (line 12) | static provider() {
    method constructor (line 16) | constructor() {}
    method createTester (line 18) | createTester(jestConfig: any, jestModulePath?: string, opts?: JestTest...

FILE: packages/aspect/src/jest/jest.tester.ts
  type JestTesterOptions (line 12) | type JestTesterOptions = {
  class JestTester (line 19) | class JestTester implements Tester {
    method constructor (line 24) | constructor(
    method convertJestCliOptions (line 33) | private convertJestCliOptions(option): typeof option {
    method displayConfig (line 80) | displayConfig(): string {
    method version (line 84) | version(): string {
    method getErrors (line 88) | private getErrors(testResult: JestTestResult[]): JestError[] {
    method attachTestsToComponent (line 100) | private attachTestsToComponent(testerContext: TesterContext, testResul...
    method buildTestsObj (line 109) | private buildTestsObj(
    method test (line 125) | async test(context: TesterContext): Promise<Tests> {

FILE: packages/aspect/src/less/compilerOptions.ts
  type LessCompilerOptions (line 3) | type LessCompilerOptions = {

FILE: packages/aspect/src/less/less.compiler.ts
  class LessCompiler (line 15) | class LessCompiler implements Compiler {
    method constructor (line 30) | constructor(readonly id: string, options: LessCompilerOptions) {
    method getDistPathBySrcPath (line 37) | getDistPathBySrcPath(srcPath: string): string {
    method isFileSupported (line 41) | isFileSupported(filePath: string): boolean {
    method version (line 45) | version(): string {
    method getDistDir (line 49) | getDistDir() {
    method build (line 53) | async build(context: BuildContext): Promise<BuildTaskResult> {

FILE: packages/aspect/src/less/less.main.runtime.ts
  class LessMain (line 7) | class LessMain {
    method provider (line 14) | static async provider() {
    method constructor (line 18) | constructor() {}
    method createCompiler (line 20) | createCompiler(options: LessCompilerOptions = {}) {

FILE: packages/aspect/src/mdx/loader/compileOutput.ts
  class CompileOutput (line 7) | class CompileOutput {
    method constructor (line 8) | constructor(readonly file: VFile, private _renderer: string) {}
    method renderer (line 10) | get renderer() {
    method changeRenderer (line 14) | changeRenderer(renderer: string) {
    method getMetadata (line 21) | getMetadata(): Record<string, any> {
    method getOutline (line 28) | getOutline(): DocOutline {
    method getSnippets (line 35) | getSnippets(): DocSnippet[] {
    method getImportSpecifiers (line 42) | getImportSpecifiers(): ImportSpecifier[] {
    method contents (line 50) | get contents() {

FILE: packages/aspect/src/mdx/loader/importSpecifier.ts
  type ImportSpecifier (line 1) | type ImportSpecifier = {

FILE: packages/aspect/src/mdx/loader/mdxCompiler.ts
  type MDXCompilerOptions (line 14) | type MDXCompilerOptions = {
  constant COMPONENT_NAME_DEMO_VIEW (line 26) | const COMPONENT_NAME_DEMO_VIEW = 'ArcoDemoView';
  constant DEFAULT_RENDERER (line 28) | const DEFAULT_RENDERER = `
  constant DEFAULT_OPTIONS (line 37) | const DEFAULT_OPTIONS: Partial<MDXCompilerOptions> = {
  function compile (line 55) | function compile(
  function compileSync (line 73) | function compileSync(
  function getFile (line 83) | function getFile(contents: string, path?: string) {
  function createCompiler (line 87) | function createCompiler(opts: Partial<MDXCompilerOptions>) {

FILE: packages/aspect/src/mdx/loader/mdxLoader.ts
  type MDXLoaderOptions (line 3) | type MDXLoaderOptions = {
  function mdxLoader (line 11) | async function mdxLoader(content: string) {

FILE: packages/aspect/src/mdx/loader/remarkPlugins/extractComponentDemos.ts
  function extractComponentDemos (line 9) | function extractComponentDemos(demoViewComponentName: string, extractSni...

FILE: packages/aspect/src/mdx/loader/remarkPlugins/extractHeadings.ts
  function extractHeadings (line 3) | function extractHeadings() {

FILE: packages/aspect/src/mdx/loader/remarkPlugins/extractImports.ts
  function extractImports (line 6) | function extractImports() {

FILE: packages/aspect/src/mdx/loader/remarkPlugins/extractMetadata.ts
  function extractMetadata (line 5) | function extractMetadata() {

FILE: packages/aspect/src/mdx/mdx.docReader.ts
  class MDXDocReader (line 5) | class MDXDocReader implements DocReader {
    method constructor (line 6) | constructor(private extensions: string[]) {}
    method read (line 8) | async read(path: string, contents: Buffer) {
    method isFormatSupported (line 20) | isFormatSupported(format: string) {

FILE: packages/aspect/src/mdx/mdx.main.runtime.ts
  type MDXConfig (line 8) | type MDXConfig = {
  class MDXMain (line 15) | class MDXMain {
    method provider (line 26) | static provider([docs]: [DocsMain], config: MDXConfig) {
    method constructor (line 32) | constructor() {}

FILE: packages/aspect/src/multi-compiler/multiCompiler.compiler.ts
  class MultiCompiler (line 16) | class MultiCompiler implements Compiler {
    method constructor (line 23) | constructor(
    method firstMatchedCompiler (line 31) | private firstMatchedCompiler(filePath: string): Compiler | undefined {
    method version (line 35) | version(): string {
    method displayConfig (line 43) | displayConfig() {
    method isFileSupported (line 51) | isFileSupported(filePath: string): boolean {
    method getDistDir (line 55) | getDistDir() {
    method getPreviewComponentRootPath (line 59) | getPreviewComponentRootPath(component: Component): string {
    method getDistPathBySrcPath (line 70) | getDistPathBySrcPath(srcPath: string): string {
    method preBuild (line 79) | async preBuild(context: BuildContext) {
    method postBuild (line 88) | async postBuild(context: BuildContext, taskResults: TaskResultsList) {
    method build (line 97) | async build(context: BuildContext): Promise<BuildTaskResult> {

FILE: packages/aspect/src/multi-compiler/multiCompiler.main.runtime.ts
  class MultiCompilerMain (line 7) | class MultiCompilerMain {
    method provider (line 10) | static async provider() {
    method createCompiler (line 17) | createCompiler(compilers: Compiler[], options: Partial<CompilerOptions...

FILE: packages/aspect/src/pubsub/events/activeTabEvent.ts
  type ActiveTabEventType (line 3) | type ActiveTabEventType = {
  class ActiveTabEvent (line 7) | class ActiveTabEvent extends ArcoBaseEvent<ActiveTabEventType> {
    method constructor (line 10) | constructor(event: ActiveTabEventType) {

FILE: packages/aspect/src/pubsub/events/arcoBaseEvent.ts
  class ArcoBaseEvent (line 1) | class ArcoBaseEvent<T> {
    method constructor (line 2) | constructor(

FILE: packages/aspect/src/pubsub/events/locationHashEvent.ts
  type LocationHashEventType (line 3) | type LocationHashEventType = {
  class LocationHashEvent (line 7) | class LocationHashEvent extends ArcoBaseEvent<LocationHashEventType> {
    method constructor (line 10) | constructor(event: LocationHashEventType) {

FILE: packages/aspect/src/pubsub/events/sizeEvent.ts
  type SizeEventType (line 3) | type SizeEventType = {
  class SizeEvent (line 8) | class SizeEvent extends ArcoBaseEvent<SizeEventType> {
    method constructor (line 11) | constructor(sizeEvent: SizeEventType) {

FILE: packages/aspect/src/pubsub/exceptions/noParentError.ts
  class PubsubNoParentError (line 1) | class PubsubNoParentError extends Error {
    method constructor (line 2) | constructor() {

FILE: packages/aspect/src/pubsub/previewRuntime/pubsub.preview.runtime.ts
  class PubsubPreview (line 10) | class PubsubPreview extends Pubsub {
    method provider (line 13) | static async provider(): Promise<PubsubPreview> {

FILE: packages/aspect/src/pubsub/previewRuntime/pubsub.ts
  type Callback (line 15) | type Callback = (event: ArcoBaseEvent<any>) => void;
  type ParentMethods (line 17) | type ParentMethods = {
  class Pubsub (line 21) | class Pubsub {
    method constructor (line 26) | constructor() {
    method inIframe (line 36) | private inIframe() {
    method connectToParentPubSub (line 48) | private async connectToParentPubSub(retries = 10): Promise<ParentMetho...
    method sub (line 66) | sub(topic: string, callback: Callback) {
    method pub (line 76) | pub(topic: string, event: ArcoBaseEvent<any>) {
    method reportSize (line 83) | reportSize(topic: string, data: SizeEventType) {
    method reportLocationHash (line 87) | reportLocationHash(topic: string, data: LocationHashEventType) {
    method reportActiveTab (line 91) | reportActiveTab(topic: string, data: ActiveTabEventType) {

FILE: packages/aspect/src/pubsub/pubsub.main.runtime.ts
  class PubsubMain (line 6) | class PubsubMain {
    method sub (line 13) | public sub(topicUUID, callback) {
    method pub (line 18) | public pub(topicUUID, event: ArcoBaseEvent<any>) {
    method unsubscribeAll (line 23) | unsubscribeAll(topicId: string) {
    method provider (line 29) | static async provider() {

FILE: packages/aspect/src/pubsub/pubsub.ui.runtime.ts
  type Callback (line 10) | type Callback = (event: ArcoBaseEvent<any>) => void;
  type PubOptions (line 12) | type PubOptions = {
  type ChildMethods (line 17) | type ChildMethods = {
  class PubsubUI (line 21) | class PubsubUI {
    method provider (line 26) | static async provider() {
    method constructor (line 31) | constructor() {}
    method getPubsubContext (line 96) | getPubsubContext() {

FILE: packages/aspect/src/pubsub/pubsubContext.tsx
  type PubsubRegistry (line 3) | interface PubsubRegistry {
  function createProvider (line 13) | function createProvider(pubSubContext: PubsubRegistry) {
  function usePubsub (line 19) | function usePubsub() {
  function usePubsubIframe (line 23) | function usePubsubIframe(ref?: RefObject<HTMLIFrameElement>) {

FILE: packages/aspect/src/react-router/uiRuntime/hooks/useQuery.ts
  function useQuery (line 7) | function useQuery() {

FILE: packages/aspect/src/react-router/uiRuntime/reactRouter.ui.runtime.tsx
  type RouteSlot (line 11) | type RouteSlot = SlotRegistry<RouteProps>;
  class ReactRouterUI (line 13) | class ReactRouterUI {
    method provider (line 18) | static async provider(_deps, _config, [routeSlot]: [RouteSlot]) {
    method constructor (line 22) | constructor(
    method renderRoutes (line 31) | renderRoutes(routes: RouteProps[]) {
    method register (line 38) | register(route: RouteProps) {

FILE: packages/aspect/src/react-router/uiRuntime/slotRouter.tsx
  type SlotRouterProps (line 5) | type SlotRouterProps = PropsWithChildren<{
  function toKey (line 11) | function toKey(route: RouteProps) {
  function SlotRouter (line 17) | function SlotRouter({

FILE: packages/aspect/src/sass/compilerOptions.ts
  type SassCompilerOptions (line 3) | type SassCompilerOptions = {

FILE: packages/aspect/src/sass/sass.compiler.ts
  class SassCompiler (line 15) | class SassCompiler implements Compiler {
    method constructor (line 30) | constructor(readonly id: string, options: SassCompilerOptions) {
    method getDistPathBySrcPath (line 37) | getDistPathBySrcPath(srcPath: string): string {
    method isFileSupported (line 41) | isFileSupported(filePath: string): boolean {
    method version (line 45) | version(): string {
    method getDistDir (line 49) | getDistDir() {
    method build (line 53) | async build(context: BuildContext): Promise<BuildTaskResult> {

FILE: packages/aspect/src/sass/sass.main.runtime.ts
  class SassMain (line 7) | class SassMain {
    method provider (line 14) | static async provider() {
    method constructor (line 18) | constructor() {}
    method createCompiler (line 20) | createCompiler(option: SassCompilerOptions = {}) {

FILE: packages/aspect/src/typescript/compilerOptions.ts
  type TypescriptCompilerOptions (line 3) | type TypescriptCompilerOptions = {

FILE: packages/aspect/src/typescript/typescript.compiler.ts
  constant FILENAME_TSCONFIG (line 21) | const FILENAME_TSCONFIG = 'tsconfig.json';
  constant FILENAME_TSCONFIG_BUILD (line 22) | const FILENAME_TSCONFIG_BUILD = 'tsconfig.build.json';
  class TypescriptCompiler (line 24) | class TypescriptCompiler implements Compiler {
    method constructor (line 37) | constructor(
    method stringifyTsconfig (line 49) | private stringifyTsconfig(tsconfig) {
    method replaceFileExtToJs (line 53) | private replaceFileExtToJs(filePath: string): string {
    method getCacheDir (line 59) | private getCacheDir(context: BuildContext) {
    method writeComponentTsConfig (line 63) | private async writeComponentTsConfig(context: BuildContext) {
    method writeProjectReferencesTsConfig (line 160) | private async writeProjectReferencesTsConfig(context): Promise<string> {
    method runTscBuild (line 171) | private async runTscBuild(context: BuildContext): Promise<ComponentRes...
    method version (line 264) | version() {
    method displayConfig (line 268) | displayConfig() {
    method getDistDir (line 272) | getDistDir() {
    method getDistPathBySrcPath (line 276) | getDistPathBySrcPath(srcPath: string) {
    method isFileSupported (line 281) | isFileSupported(filePath: string): boolean {
    method preBuild (line 293) | async preBuild(context: BuildContext) {
    method build (line 297) | async build(context: BuildContext): Promise<BuildTaskResult> {

FILE: packages/aspect/src/typescript/typescript.main.runtime.ts
  type TsConfigTransformContext (line 10) | type TsConfigTransformContext = {
  type TsConfigTransformer (line 14) | type TsConfigTransformer = (
  function runTransformersWithContext (line 19) | function runTransformersWithContext(
  class TypescriptMain (line 31) | class TypescriptMain {
    method provider (line 38) | static provider([loggerMain]: [LoggerMain]) {
    method constructor (line 43) | constructor(private logger) {}
    method getCjsTransformer (line 48) | getCjsTransformer(): TsConfigTransformer {
    method getEsmTransformer (line 58) | getEsmTransformer(): TsConfigTransformer {
    method createCompiler (line 68) | createCompiler(
    method createCjsCompiler (line 86) | createCjsCompiler(
    method createEsmCompiler (line 97) | createEsmCompiler(

FILE: packages/aspect/src/typescript/typescriptConfigMutator.ts
  type Target (line 5) | type Target =
  function tsconfigMergeCustomizer (line 17) | function tsconfigMergeCustomizer(objValue, extendValue, key) {
  class TypescriptConfigMutator (line 24) | class TypescriptConfigMutator {
    method constructor (line 25) | constructor(public raw: TypescriptCompilerOptions) {}
    method clone (line 27) | clone(): TypescriptConfigMutator {
    method setName (line 33) | setName(name: string) {
    method setArtifactName (line 38) | setArtifactName(artifactName: string) {
    method addTypes (line 43) | addTypes(typesPaths: string[]): TypescriptConfigMutator {
    method setExperimentalDecorators (line 48) | setExperimentalDecorators(value: boolean): TypescriptConfigMutator {
    method setTarget (line 56) | setTarget(target: Target): TypescriptConfigMutator {
    method setModule (line 64) | setModule(module: string): TypescriptConfigMutator {
    method setDistDir (line 75) | setDistDir(distDir: string): TypescriptConfigMutator {
    method setOutDir (line 82) | setOutDir(outDir: string): TypescriptConfigMutator {
    method setCompilerOptions (line 87) | setCompilerOptions(options: CompilerOptions): TypescriptConfigMutator {
    method setTsConfig (line 92) | setTsConfig(config: Record<string, any>): TypescriptConfigMutator {
    method mergeTsConfig (line 97) | mergeTsConfig(config: Record<string, any>): TypescriptConfigMutator {
    method addExclude (line 102) | addExclude(exclusions: string[]): TypescriptConfigMutator {
    method setCompileJs (line 111) | setCompileJs(compileJs: boolean) {
    method setCompileJsx (line 120) | setCompileJsx(compileJsx: boolean) {

FILE: packages/aspect/src/typescript/utils/flatTSConfig.ts
  type TSConfig (line 5) | type TSConfig = {
  function flatTSConfig (line 15) | function flatTSConfig(filePath: string) {
  function _loadTSConfig (line 20) | function _loadTSConfig(tsconfig: TSConfig, cwd: string, stack: string[] ...

FILE: packages/aspect/src/webpack/config/html.ts
  function html (line 2) | function html(title: string) {

FILE: packages/aspect/src/webpack/config/webpack.config.ts
  function configFactory (line 14) | function configFactory(target: Target, context: BundlerContext): Configu...
  function getAssetManifestPlugin (line 98) | function getAssetManifestPlugin() {
  function generateHtmlPlugins (line 102) | function generateHtmlPlugins(configs: BundlerHtmlConfig[]) {
  function generateHtmlPlugin (line 106) | function generateHtmlPlugin(config: BundlerHtmlConfig) {

FILE: packages/aspect/src/webpack/config/webpack.dev.config.ts
  function configFactory (line 20) | function configFactory(

FILE: packages/aspect/src/webpack/events/webpackCompilationDoneEvent.ts
  class WebpackCompilationDoneEventData (line 4) | class WebpackCompilationDoneEventData {
    method constructor (line 5) | constructor(readonly stats: Stats, readonly devServerID: string) {}
  class WebpackCompilationDoneEvent (line 8) | class WebpackCompilationDoneEvent extends ArcoBaseEvent<WebpackCompilati...
    method constructor (line 11) | constructor(readonly timestamp: number, readonly stats: Stats, readonl...

FILE: packages/aspect/src/webpack/events/webpackCompilationStartedEvent.ts
  type Params (line 3) | type Params = {
  class WebpackCompilationStartedEvent (line 7) | class WebpackCompilationStartedEvent extends ArcoBaseEvent<Params> {
    method constructor (line 10) | constructor(readonly timestamp, readonly params: Params) {

FILE: packages/aspect/src/webpack/generateStyleLoader.ts
  type GenerateStyleLoadersOptions (line 1) | type GenerateStyleLoadersOptions = {
  function generateStyleLoaders (line 10) | function generateStyleLoaders(options: GenerateStyleLoadersOptions) {

FILE: packages/aspect/src/webpack/webpack.bundler.ts
  type AssetsMap (line 17) | type AssetsMap = { [assetId: string]: Asset };
  class WebpackBundler (line 18) | class WebpackBundler implements Bundler {
    method constructor (line 19) | constructor(
    method run (line 37) | async run(): Promise<BundlerResult[]> {
    method getErrors (line 105) | private getErrors(stats: StatsCompilation): Error[] {
    method getAssets (line 120) | private getAssets(stats: StatsCompilation): AssetsMap {
    method getEntriesAssetsMap (line 132) | private getEntriesAssetsMap(stats: StatsCompilation, assetsMap: Assets...
    method getCompressedSize (line 160) | private getCompressedSize(asset: StatsAsset): number | undefined {
    method getComponents (line 169) | private getComponents(outputPath: string) {

FILE: packages/aspect/src/webpack/webpack.devServer.ts
  type WebpackConfigWithDevServer (line 10) | interface WebpackConfigWithDevServer extends Configuration {
  class WebpackDevServer (line 14) | class WebpackDevServer implements DevServer {
    method constructor (line 15) | constructor(
    method getCompiler (line 21) | private getCompiler(): any {
    method displayConfig (line 29) | displayConfig(): string {
    method listen (line 33) | async listen(port: number): Promise<Server> {
    method addSignalListener (line 57) | private addSignalListener() {

FILE: packages/aspect/src/webpack/webpack.main.runtime.ts
  type GlobalWebpackConfigTransformContext (line 18) | type GlobalWebpackConfigTransformContext = {
  type WebpackConfigTransformContext (line 29) | type WebpackConfigTransformContext = GlobalWebpackConfigTransformContext...
  type WebpackConfigDevServerTransformContext (line 33) | type WebpackConfigDevServerTransformContext = GlobalWebpackConfigTransfo...
  type WebpackConfigTransformer (line 36) | type WebpackConfigTransformer = (
  function runTransformersWithContext (line 41) | function runTransformersWithContext(
  class WebpackMain (line 54) | class WebpackMain {
    method provider (line 61) | static provider([workspace, loggerMain]: [Workspace, LoggerMain]) {
    method constructor (line 67) | constructor(private workspace, private logger) {}
    method useSpeedMeasurePlugin (line 69) | private useSpeedMeasurePlugin(config) {
    method createConfigs (line 78) | private createConfigs(
    method createDevServer (line 103) | createDevServer(
    method createBundler (line 130) | createBundler(

FILE: packages/aspect/src/webpack/webpackConfigMutator.ts
  type ConflictPolicy (line 8) | type ConflictPolicy = 'override' | 'error' | 'ignore';
  type ArrayPosition (line 9) | type ArrayPosition = 'append' | 'prepend';
  type AddKeyOpts (line 11) | type AddKeyOpts = {
  type AddToArrayOpts (line 15) | type AddToArrayOpts = {
  type MergeOpts (line 19) | type MergeOpts = {
  type Rules (line 23) | type Rules = {
  constant DEFAULT_ADD_TO_ARRAY_OPTS (line 27) | const DEFAULT_ADD_TO_ARRAY_OPTS: AddToArrayOpts = {
  constant DEFAULT_ADD_KEY_OPTS (line 31) | const DEFAULT_ADD_KEY_OPTS: AddKeyOpts = {
  constant DEFAULT_MERGE_OPTS (line 35) | const DEFAULT_MERGE_OPTS: MergeOpts = {
  class WebpackConfigMutator (line 39) | class WebpackConfigMutator {
    method constructor (line 40) | constructor(public raw: Configuration, public webpack: any) {}
    method clone (line 42) | clone(): WebpackConfigMutator {
    method addTopLevel (line 49) | addTopLevel(key: string, value: any, opts: AddKeyOpts = {}): WebpackCo...
    method removeTopLevel (line 67) | removeTopLevel(key: string): WebpackConfigMutator {
    method addEntry (line 75) | addEntry(entry: string, opts: AddToArrayOpts = {}): WebpackConfigMutat...
    method addModuleRule (line 89) | addModuleRule(rule: RuleSetRule, opts: AddToArrayOpts = {}): WebpackCo...
    method addModuleRules (line 104) | addModuleRules(rules: RuleSetRule[], opts: AddToArrayOpts = {}): Webpa...
    method addRuleToOneOf (line 112) | addRuleToOneOf(rule: RuleSetRule, opts: AddToArrayOpts = {}): WebpackC...
    method addPlugin (line 135) | addPlugin(plugin: any, opts: AddToArrayOpts = {}): WebpackConfigMutator {
    method addPlugins (line 146) | addPlugins(plugins: Array<any>, opts: AddToArrayOpts = {}): WebpackCon...
    method addAliases (line 157) | addAliases(aliases: { [index: string]: string | false | string[] }): W...
    method removeAliases (line 171) | removeAliases(aliases: string[]): WebpackConfigMutator {
    method addResolve (line 187) | addResolve(resolve: ResolveOptions): WebpackConfigMutator {
    method addExternals (line 199) | addExternals(externalDeps: Configuration['externals']): WebpackConfigM...
    method merge (line 227) | merge(config: Configuration | Configuration[], opts?: MergeOpts): Webp...
    method mergeWithCustomize (line 243) | mergeWithCustomize(
    method mergeWithRules (line 262) | mergeWithRules(configs: Configuration[], rules: Rules, opts: MergeOpts...
  function getConfigsToMerge (line 275) | function getConfigsToMerge(
  function addToArray (line 291) | function addToArray(array: Array<any>, val: any, opts: AddToArrayOpts = ...
  function addManyToArray (line 301) | function addManyToArray(

FILE: packages/aspect/src/workspace/events/onComponentAddEvent.ts
  class OnComponentAddEventData (line 3) | class OnComponentAddEventData {
    method constructor (line 4) | constructor(readonly idStr, readonly hook) {}
  class OnComponentAddEvent (line 7) | class OnComponentAddEvent extends ArcoBaseEvent<OnComponentAddEventData> {
    method constructor (line 10) | constructor(readonly timestamp, readonly idStr, readonly hook) {

FILE: packages/aspect/src/workspace/events/onComponentChangeEvent.ts
  class OnComponentChangeEventData (line 3) | class OnComponentChangeEventData {
    method constructor (line 4) | constructor(readonly idStr, readonly hook) {}
  class OnComponentChangeEvent (line 7) | class OnComponentChangeEvent extends ArcoBaseEvent<OnComponentChangeEven...
    method constructor (line 10) | constructor(readonly timestamp, readonly idStr, readonly hook) {

FILE: packages/aspect/src/workspace/events/onComponentRemovedEvent.ts
  class OnComponentRemovedEventData (line 3) | class OnComponentRemovedEventData {
    method constructor (line 4) | constructor(readonly idStr) {}
  class OnComponentRemovedEvent (line 7) | class OnComponentRemovedEvent extends ArcoBaseEvent<OnComponentRemovedEv...
    method constructor (line 10) | constructor(readonly timestamp, readonly idStr) {

FILE: packages/aspect/src/workspace/exceptions/noIdMatchPatternError.ts
  class NoIdMatchPatternError (line 1) | class NoIdMatchPatternError extends Error {
    method constructor (line 4) | constructor(pattern?: string) {

FILE: packages/aspect/src/workspace/exceptions/workspaceNotFoundError.ts
  class WorkspaceNotFoundError (line 3) | class WorkspaceNotFoundError extends AbstractError {

FILE: packages/aspect/src/workspace/type/onComponentEvents.ts
  type SerializableResults (line 3) | type SerializableResults = { results: any; toString: () => string };
  type OnComponentEventResult (line 5) | type OnComponentEventResult = { extensionId: string; results: Serializab...
  type OnComponentLoad (line 7) | type OnComponentLoad = (component: Component) => Promise<Record<string, ...
  type OnComponentAdd (line 9) | type OnComponentAdd = (
  type OnComponentChange (line 14) | type OnComponentChange = (
  type OnComponentRemove (line 19) | type OnComponentRemove = (componentId: string) => Promise<SerializableRe...

FILE: packages/aspect/src/workspace/type/workspaceConfig.ts
  type WorkspaceConfig (line 6) | interface WorkspaceConfig {

FILE: packages/aspect/src/workspace/uiRuntime/graphqlProvider.tsx
  function GraphqlProvider (line 5) | function GraphqlProvider({ children }: PropsWithChildren<any>) {

FILE: packages/aspect/src/workspace/uiRuntime/hooks/useWorkspace.ts
  constant WORKSPACE (line 19) | const WORKSPACE = gql`
  function useWorkspace (line 32) | function useWorkspace() {

FILE: packages/aspect/src/workspace/uiRuntime/workspace.tsx
  type WorkspaceProps (line 19) | interface WorkspaceProps {
  constant OVERVIEW_SCROLL_CONTAINER_ID (line 23) | const OVERVIEW_SCROLL_CONTAINER_ID = 'a-overview-scroll-container';
  function Workspace (line 25) | function Workspace({ routes }: WorkspaceProps) {

FILE: packages/aspect/src/workspace/uiRuntime/workspace.ui.runtime.tsx
  type RouteSlot (line 14) | type RouteSlot = SlotRegistry<RouteProps>;
  class WorkspaceUI (line 16) | class WorkspaceUI {
    method provider (line 24) | static provider([ui, componentUI]: [UIUI, ComponentUI], _config, [rout...
    method constructor (line 34) | constructor(private routeSlot: RouteSlot, private componentUI: Compone...
    method registerRoute (line 36) | registerRoute(route: RouteProps) {
    method uiRoot (line 41) | uiRoot(): UIRoot {

FILE: packages/aspect/src/workspace/uiRuntime/workspaceModel.ts
  type WorkspaceProps (line 3) | type WorkspaceProps = {
  class WorkspaceModel (line 9) | class WorkspaceModel {
    method constructor (line 10) | constructor(
    method getComponent (line 30) | getComponent(id: string) {
    method from (line 34) | static from({ name, path, components }: WorkspaceProps) {
    method empty (line 44) | static empty() {

FILE: packages/aspect/src/workspace/watch/watchQueue.ts
  class WatchQueue (line 3) | class WatchQueue {
    method constructor (line 6) | constructor(concurrency = 1) {
    method getQueue (line 10) | getQueue() {
    method add (line 14) | add<T>(fn: () => T, priority?: number): Promise<T> {
    method onIdle (line 18) | onIdle(): Promise<void> {

FILE: packages/aspect/src/workspace/watch/watcher.ts
  type EventMessages (line 19) | type EventMessages = {
  type WatchOptions (line 41) | type WatchOptions = {
  constant DEBOUNCE_WAIT_MS (line 45) | const DEBOUNCE_WAIT_MS = 100;
  class Watcher (line 47) | class Watcher {
    method constructor (line 56) | constructor(
    method watchAll (line 63) | async watchAll(opts: WatchOptions) {
    method handleChange (line 124) | private async handleChange(filePath: string): Promise<{
    method sleep (line 181) | private async sleep(ms: number) {
    method triggerCompChanges (line 186) | private async triggerCompChanges(
    method handleWorkspaceJsonChanges (line 211) | private async handleWorkspaceJsonChanges(): Promise<OnComponentEventRe...
    method executeWatchOperationsOnRemove (line 239) | private async executeWatchOperationsOnRemove(componentId: string) {
    method executeWatchOperationsOnComponent (line 245) | private async executeWatchOperationsOnComponent(
    method creatOnComponentRemovedEvent (line 278) | private creatOnComponentRemovedEvent(idStr) {
    method creatOnComponentChangeEvent (line 282) | private creatOnComponentChangeEvent(idStr, hook) {
    method creatOnComponentAddEvent (line 286) | private creatOnComponentAddEvent(idStr, hook) {
    method getComponentIdByPath (line 290) | private getComponentIdByPath(filePath: string): string | null {
    method getRelativePathLinux (line 299) | private getRelativePathLinux(filePath: string) {
    method findTrackDirByFilePathRecursively (line 303) | private findTrackDirByFilePathRecursively(filePath: string): string | ...
    method createWatcher (line 310) | private async createWatcher(pathsToWatch: string[]) {
    method setTrackDirs (line 324) | async setTrackDirs() {
    method getPathsToWatch (line 332) | private async getPathsToWatch(): Promise<string[]> {

FILE: packages/aspect/src/workspace/workspace.ts
  type OnComponentAddSlot (line 29) | type OnComponentAddSlot = SlotRegistry<OnComponentAdd>;
  type OnComponentLoadSlot (line 31) | type OnComponentLoadSlot = SlotRegistry<OnComponentLoad>;
  type OnComponentChangeSlot (line 33) | type OnComponentChangeSlot = SlotRegistry<OnComponentChange>;
  type OnComponentRemoveSlot (line 35) | type OnComponentRemoveSlot = SlotRegistry<OnComponentRemove>;
  type WorkspaceProps (line 37) | type WorkspaceProps = {
  class Workspace (line 49) | class Workspace implements ComponentFactory {
    method load (line 50) | static async load({
    method constructor (line 77) | constructor(
    method modulesPath (line 108) | private get modulesPath() {
    method clearComponentCache (line 112) | private clearComponentCache(componentId?: string) {
    method filterComponentInfoList (line 120) | private filterComponentInfoList(pattern = this.componentPattern): Comp...
    method name (line 159) | get name() {
    method setComponentPattern (line 167) | setComponentPattern(pattern: string) {
    method updateWorkspaceConfigFile (line 171) | updateWorkspaceConfigFile(aspectId: string, newConfig: any) {
    method updateComponentInfo (line 181) | async updateComponentInfo(componentId?: string) {
    method registerOnComponentLoad (line 221) | registerOnComponentLoad(loadFn: OnComponentLoad) {
    method registerOnComponentAdd (line 226) | registerOnComponentAdd(onComponentAddFunc: OnComponentAdd) {
    method registerOnComponentChange (line 231) | registerOnComponentChange(onComponentChangeFunc: OnComponentChange) {
    method registerOnComponentRemove (line 236) | registerOnComponentRemove(onComponentRemoveFunc: OnComponentRemove) {
    method getCacheDir (line 245) | getCacheDir(
    method get (line 262) | async get(id: string, componentInfoList = this.componentInfoList) {
    method getMany (line 288) | getMany(ids: string[] = []) {
    method getManyByPattern (line 293) | getManyByPattern(pattern: string, throwForNoMatch?: boolean): Promise<...
    method list (line 313) | list() {
    method resolveAspects (line 318) | async resolveAspects(runtimeName: string) {
    method track (line 335) | async track() {}
    method toAbsolutePath (line 337) | toAbsolutePath(pathStr: string): string {
    method toRelativePath (line 343) | toRelativePath(pathToCheck: string): string {
    method triggerOnComponentAdd (line 348) | async triggerOnComponentAdd(id: string): Promise<OnComponentEventResul...
    method triggerOnComponentChange (line 362) | async triggerOnComponentChange(id: string, files: string[]): Promise<O...
    method triggerOnComponentRemove (line 375) | async triggerOnComponentRemove(id: string): Promise<OnComponentEventRe...

FILE: packages/aspect/src/workspace/workspace.uiRoot.ts
  class WorkspaceUiRoot (line 5) | class WorkspaceUiRoot implements UIRoot {
    method constructor (line 6) | constructor(private workspace: Workspace) {}
    method name (line 10) | get name() {
    method path (line 14) | get path() {
    method getConfig (line 22) | getConfig() {
    method resolveAspects (line 26) | async resolveAspects(runtimeName: string) {

FILE: packages/core/src/aspect-loader/aspectDefinition.ts
  type AspectDefinitionProps (line 1) | type AspectDefinitionProps = {
  class AspectDefinition (line 7) | class AspectDefinition {
    method constructor (line 8) | constructor(
    method from (line 29) | static from({ aspectPath, runtimePath, id }: AspectDefinitionProps) {

FILE: packages/core/src/aspect-loader/aspectLoader.main.runtime.ts
  class AspectLoaderMain (line 9) | class AspectLoaderMain {
    method provider (line 16) | static provider() {
    method constructor (line 20) | constructor() {}
    method coreAspects (line 26) | get coreAspects() {
    method setCoreAspects (line 30) | setCoreAspects(aspects: Aspect[]) {
    method getCoreAspectIds (line 35) | getCoreAspectIds() {
    method loadDefinition (line 40) | loadDefinition(props: AspectDefinitionProps): AspectDefinition {

FILE: packages/core/src/aspect-loader/coreAspect.ts
  constant RESOLVE_MODULE_PATHS (line 6) | const RESOLVE_MODULE_PATHS = [];
  constant CLI_NPM_PACKAGE_SCOPE (line 7) | const CLI_NPM_PACKAGE_SCOPE = '@arco-cli';
  function getCoreAspectName (line 9) | function getCoreAspectName(id: string): string {
  function getCoreAspectPackageName (line 14) | function getCoreAspectPackageName(id: string): string {
  function getAspectDir (line 27) | function getAspectDir(id: string): string {
  function getAspectDef (line 69) | async function getAspectDef(aspectId: string, runtime: string, resolveMo...

FILE: packages/core/src/aspect-loader/pluginDefinition.ts
  type PluginDefinition (line 3) | interface PluginDefinition {

FILE: packages/core/src/cli/cli.main.runtime.ts
  type CommandList (line 16) | type CommandList = Array<Command>;
  type OnStart (line 17) | type OnStart = (hasWorkspace: boolean) => Promise<void>;
  type OnStartSlot (line 19) | type OnStartSlot = SlotRegistry<OnStart>;
  type CommandsSlot (line 20) | type CommandsSlot = SlotRegistry<CommandList>;
  class CLIMain (line 22) | class CLIMain {
    method provider (line 29) | static provider(
    method constructor (line 45) | constructor(
    method invokeOnStart (line 53) | private async invokeOnStart(hasWorkspace: boolean) {
    method setDefaults (line 59) | private setDefaults(command: Command) {
    method register (line 76) | register(...commands: CommandList) {
    method unregister (line 84) | unregister(commandName: string) {
    method registerGroup (line 93) | registerGroup(name: string, description: string) {
    method registerOnStart (line 101) | registerOnStart(onStartFn: OnStart) {
    method commands (line 109) | get commands(): CommandList {
    method getCommand (line 116) | getCommand(name: string): Command | undefined {
    method run (line 120) | async run(hasWorkspace: boolean) {

FILE: packages/core/src/cli/cliParser.ts
  class CLIParser (line 14) | class CLIParser {
    method constructor (line 15) | constructor(
    method parse (line 22) | async parse(args = process.argv.slice(2)) {
    method setHelpMiddleware (line 48) | private setHelpMiddleware() {
    method handleCommandFailure (line 64) | private handleCommandFailure() {
    method configureCompletion (line 80) | private configureCompletion() {
    method printHelp (line 101) | private printHelp() {
    method configureParser (line 106) | private configureParser() {
    method parseCommandWithSubCommands (line 114) | private parseCommandWithSubCommands(command: Command) {
    method getYargsCommand (line 128) | private getYargsCommand(command: Command): YargsAdapter {
    method configureGlobalFlags (line 135) | private configureGlobalFlags() {
    method throwForNonExistsCommand (line 151) | private throwForNonExistsCommand(commandName: string) {
    method logCommandHelp (line 186) | private logCommandHelp(help: string) {
    method findCommandByArgv (line 266) | private findCommandByArgv(): Command | undefined {

FILE: packages/core/src/cli/commandRunner.ts
  class CommandRunner (line 7) | class CommandRunner {
    method constructor (line 8) | constructor(private command: Command, private args: CLIArgs, private f...
    method bootstrapCommand (line 14) | private bootstrapCommand() {
    method shouldRunRender (line 26) | private shouldRunRender() {
    method runJsonHandler (line 35) | private async runJsonHandler() {
    method runRenderHandler (line 46) | private async runRenderHandler() {
    method runReportHandler (line 63) | private async runReportHandler() {
    method determineConsoleWritingDuringCommand (line 78) | private determineConsoleWritingDuringCommand() {
    method writeAndExit (line 94) | private async writeAndExit(data: string, exitCode: number) {
    method runMigrateIfNeeded (line 100) | private async runMigrateIfNeeded(): Promise<any> {
    method runCommand (line 113) | async runCommand(): Promise<void> {
  function toRenderResult (line 137) | function toRenderResult(obj: RenderResult | any) {
  function isRenderResult (line 141) | function isRenderResult(obj: RenderResult | any): obj is RenderResult {

FILE: packages/core/src/cli/commands/help.ts
  class HelpCmd (line 5) | class HelpCmd implements Command {
    method constructor (line 20) | constructor(private cliMain: CLIMain, private docsDomain: string) {}
    method report (line 22) | async report() {

FILE: packages/core/src/cli/exceptions/alreadyExistsError.ts
  class AlreadyExistsError (line 3) | class AlreadyExistsError extends ArcoError {
    method constructor (line 4) | constructor(type: string, name: string) {

FILE: packages/core/src/cli/exceptions/commandNotFoundError.ts
  class CommandNotFoundError (line 4) | class CommandNotFoundError extends ArcoError {
    method constructor (line 9) | constructor(commandName: string, suggestion?: string) {
    method report (line 15) | report() {

FILE: packages/core/src/cli/getCommandId.ts
  function getCommandId (line 1) | function getCommandId(cmdName: string) {

FILE: packages/core/src/cli/help.ts
  constant SPACE (line 8) | const SPACE = ' ';
  constant TITLE_LEFT_SPACES_NUMBER (line 9) | const TITLE_LEFT_SPACES_NUMBER = 2;
  constant COMMAND_LEFT_SPACES_NUMBER (line 10) | const COMMAND_LEFT_SPACES_NUMBER = 4;
  constant NAME_WITH_SPACES_LENGTH (line 11) | const NAME_WITH_SPACES_LENGTH = 15;
  type GroupContent (line 13) | type GroupContent = {
  type HelpProps (line 18) | type HelpProps = {
  function formatHelp (line 22) | function formatHelp(commands: CommandList, groups: GroupsType, docsDomai...
  function groupCommands (line 33) | function groupCommands(commands: CommandList, groups: GroupsType): HelpP...
  function formatCommandsHelp (line 50) | function formatCommandsHelp(helpProps: HelpProps): string {
  function commandsSectionTemplate (line 56) | function commandsSectionTemplate(section: GroupContent): string {
  function commandTemplate (line 66) | function commandTemplate(name: string, description: string): string {
  function getHeader (line 72) | function getHeader(docsDomain: string): string {
  function getFooter (line 78) | function getFooter(): string {

FILE: packages/core/src/cli/legacyCommandAdapter.ts
  type ActionResult (line 5) | type ActionResult = {
  class LegacyCommandAdapter (line 10) | class LegacyCommandAdapter implements Command {
    method constructor (line 39) | constructor(private cmd: LegacyCommand, cliExtension: CLIMain) {
    method action (line 55) | private async action(params: any, options: { [key: string]: any }): Pr...
    method report (line 70) | async report(
    method json (line 78) | async json(params: any, options: { [key: string]: any }): Promise<Gene...

FILE: packages/core/src/cli/utils.ts
  constant ENV_JEST_ARGS (line 3) | const ENV_JEST_ARGS = process.env.JEST_ARGS;
  function parseCliRawArgs (line 8) | function parseCliRawArgs(

FILE: packages/core/src/cli/yargsAdapter.ts
  constant GLOBAL_GROUP (line 6) | const GLOBAL_GROUP = 'Global';
  constant STANDARD_GROUP (line 7) | const STANDARD_GROUP = 'Options';
  class YargsAdapter (line 9) | class YargsAdapter implements CommandModule {
    method constructor (line 16) | constructor(private commanderCommand: Command) {
    method builder (line 22) | builder(yargs: Argv) {
    method handler (line 35) | handler(argv: Arguments) {
    method positional (line 51) | get positional() {
    method optionsToBuilder (line 55) | static optionsToBuilder(command: Command): { [key: string]: Options } {
    method getGlobalOptions (line 72) | static getGlobalOptions(command: Command): Record<string, any> {
  function getArgsFromCommandName (line 90) | function getArgsFromCommandName(commandName: string) {

FILE: packages/core/src/express/express.main.runtime.ts
  type ExpressConfig (line 13) | type ExpressConfig = {
  type MiddlewareSlot (line 19) | type MiddlewareSlot = SlotRegistry<MiddlewareManifest[]>;
  type RouteSlot (line 21) | type RouteSlot = SlotRegistry<Route[]>;
  class ExpressMain (line 23) | class ExpressMain {
    method provider (line 36) | static async provider(
    method constructor (line 45) | constructor(
    method createRootRoutes (line 64) | private createRootRoutes() {
    method createRoutes (line 77) | private createRoutes() {
    method verbValidation (line 95) | private verbValidation(route: Route): Middleware {
    method catchErrorsMiddlewares (line 107) | private catchErrorsMiddlewares(middlewares: Middleware[]) {
    method bodyParser (line 111) | private bodyParser(app: Express) {
    method listen (line 119) | async listen(port?: number) {
    method register (line 129) | register(routes: Route[]) {
    method registerMiddleware (line 137) | registerMiddleware(middlewares: MiddlewareManifest[]) {
    method createApp (line 142) | createApp(expressApp?: Express, options?: { disableBodyParser: true })...

FILE: packages/core/src/express/middlewares/error.ts
  type ResponseError (line 4) | interface ResponseError {
  function handleError (line 9) | function handleError(

FILE: packages/core/src/express/types/middlewareManifest.ts
  type MiddlewareManifest (line 3) | interface MiddlewareManifest {

FILE: packages/core/src/express/types/next.ts
  type NextFunction (line 3) | type NextFunction = express.NextFunction;

FILE: packages/core/src/express/types/response.ts
  type Response (line 3) | type Response = express.Response;

FILE: packages/core/src/express/types/route.ts
  type Middleware (line 8) | type Middleware = (req: Request, res: Response, next: NextFunction) => P...
  type Verb (line 10) | enum Verb {
  type Route (line 20) | interface Route {

FILE: packages/core/src/graphql/graphql.main.runtime.ts
  type Verb (line 15) | enum Verb {
  type GraphQLConfig (line 22) | type GraphQLConfig = {
  type SchemaSlot (line 26) | type SchemaSlot = SlotRegistry<Schema>;
  type PubSubSlot (line 28) | type PubSubSlot = SlotRegistry<PubSubEngine>;
  type GraphQLServerOptions (line 30) | type GraphQLServerOptions = {
  class GraphqlMain (line 36) | class GraphqlMain {
    method constructor (line 37) | constructor(
    method pubsub (line 64) | get pubsub(): PubSubEngine {
    method createServer (line 72) | async createServer(options: GraphQLServerOptions) {
    method registerPubSub (line 115) | registerPubSub(pubsub: PubSubEngine) {
    method register (line 125) | register(schema: Schema) {
    method createRootModule (line 130) | private createRootModule(schemaSlot?: SchemaSlot) {
    method buildModules (line 137) | private buildModules(schemaSlot: SchemaSlot = this.moduleSlot) {
    method getModuleDependencies (line 161) | private getModuleDependencies(extensionId: string): GraphQLModule[] {
    method provider (line 186) | static async provider(

FILE: packages/core/src/graphql/schema.ts
  type Schema (line 7) | type Schema = {

FILE: packages/core/src/logger/logger.main.runtime.ts
  class LoggerMain (line 7) | class LoggerMain {
    method provider (line 12) | static provider() {
    method constructor (line 16) | constructor() {}
    method createLogger (line 18) | createLogger(extensionName: string): Logger {

FILE: packages/core/src/logger/logger.ts
  class Logger (line 7) | class Logger implements IArcoLogger {
    method constructor (line 8) | constructor(private extensionName: string) {}
    method isLoaderStarted (line 10) | get isLoaderStarted() {
    method trace (line 14) | trace(message: string, ...meta: any[]) {
    method debug (line 18) | debug(message: string, ...meta: any[]) {
    method info (line 22) | info(message: string, ...meta: any[]) {
    method warn (line 26) | warn(message: string, ...meta: any[]) {
    method error (line 30) | error(message: string, ...meta: any[]) {
    method fatal (line 34) | fatal(message: string, ...meta: any[]) {
    method createLongProcessLogger (line 38) | createLongProcessLogger(processDescription: string, totalItems?: numbe...
    method setStatusLine (line 46) | setStatusLine(text: string) {
    method clearStatusLine (line 53) | clearStatusLine() {
    method clearConsole (line 57) | clearConsole() {
    method console (line 64) | console(message?: string, ...meta: any[]) {
    method consoleWarn (line 73) | consoleWarn(message?: string, ...meta: any[]) {
    method consoleError (line 82) | consoleError(message?: string, ...meta: any[]) {
    method consoleTitle (line 94) | consoleTitle(message: string) {
    method consoleSuccess (line 102) | consoleSuccess(message?: string) {
    method off (line 110) | off() {
    method on (line 114) | on() {
    method profile (line 118) | profile(id: string, console?: boolean) {
    method consoleFailure (line 125) | consoleFailure(message?: string) {
    method consoleWarning (line 133) | consoleWarning(message?: string) {
    method colorMessage (line 141) | private colorMessage(message: string) {

FILE: packages/core/src/logger/longProcessLogger.ts
  class LongProcessLogger (line 13) | class LongProcessLogger {
    method constructor (line 14) | constructor(
    method logProgress (line 25) | logProgress(itemName = '') {
    method end (line 32) | end() {
    method start (line 38) | private start() {
    method logAndConsole (line 44) | private logAndConsole(message: string) {

FILE: packages/generator/src/app.ts
  function newCommandHandler (line 14) | async function newCommandHandler({
  function forkCommandHandler (line 115) | async function forkCommandHandler({

FILE: packages/generator/src/forker.ts
  constant SOURCE_DIR_NAME (line 11) | const SOURCE_DIR_NAME = 'source';
  constant CONFIG_FILENAME_SUFFIX (line 12) | const CONFIG_FILENAME_SUFFIX = '-config.json';
  class Forker (line 14) | class Forker {
    method constructor (line 19) | constructor(
    method cleanTempDir (line 28) | private async cleanTempDir() {
    method getMaterialZipURL (line 34) | async getMaterialZipURL(
    method downloadAndUnzipFiles (line 60) | private async downloadAndUnzipFiles(zipURL: string): Promise<{
    method fork (line 100) | async fork(): Promise<{ ok: boolean; componentConfig?: Record<string, ...

FILE: packages/generator/src/generator.ts
  constant DEFAULT_TEMPLATE_NAME (line 19) | const DEFAULT_TEMPLATE_NAME = 'react-component';
  constant FILENAME_TEMPLATE_DESCRIPTION (line 20) | const FILENAME_TEMPLATE_DESCRIPTION = '__arco.tpl.desc.json';
  constant FILENAME_TEMPLATE_DIRECTORY_DESCRIPTION (line 21) | const FILENAME_TEMPLATE_DIRECTORY_DESCRIPTION = '__arco.dir.desc.js';
  type GulpFile (line 23) | type GulpFile = { path: string; contents: Buffer };
  class Generator (line 25) | class Generator {
    method parseLocalTemplatePath (line 26) | static parseLocalTemplatePath(template: string): null | { prefix: stri...
    method constructor (line 39) | constructor(private name: string, private options: GenerateOptions = {...
    method getTemplatePath (line 45) | private getTemplatePath() {
    method getTargetPath (line 51) | getTargetPath() {
    method generate (line 55) | async generate(): Promise<null | {

FILE: packages/generator/src/types.ts
  type TemplateType (line 1) | type TemplateType = 'workspace' | 'component' | 'package';
  type GenerateOptions (line 3) | type GenerateOptions = {
  type GeneratorContext (line 12) | type GeneratorContext = {
  type ComponentExports (line 21) | type ComponentExports = {
  type TemplateFunction (line 26) | type TemplateFunction = (
  type TemplateDirectoryDescriptionFunction (line 30) | type TemplateDirectoryDescriptionFunction = (context: GeneratorContext) ...
  type TemplateManifest (line 34) | type TemplateManifest = {

FILE: packages/generator/src/utils/execQuick.ts
  function consoleInfo (line 5) | function consoleInfo(text: string) {
  function consoleError (line 9) | function consoleError(text: string) {
  function execQuick (line 13) | async function execQuick(

FILE: packages/generator/src/utils/installDependencies.ts
  function installDependencies (line 3) | async function installDependencies(workspacePath?: string) {

FILE: packages/generator/src/utils/toFsCompatible.ts
  function toFsCompatible (line 1) | function toFsCompatible(str: string) {

FILE: packages/generator/src/utils/wgetAsync.ts
  function wgetAsync (line 6) | async function wgetAsync(

FILE: packages/legacy/src/analytics/analytics.ts
  constant LEVEL (line 25) | const LEVEL = {
  class Breadcrumb (line 33) | class Breadcrumb {
    method constructor (line 40) | constructor(category: string, message: string, data: Record<string, an...
  class Analytics (line 48) | class Analytics {
    method getID (line 81) | static getID(): string {
    method promptAnalyticsIfNeeded (line 89) | static promptAnalyticsIfNeeded(): Promise<void> {
    method _maskString (line 124) | static _maskString(str: string): string {
    method _hashLightly (line 128) | static _hashLightly(value: any) {
    method _hashFlags (line 145) | static _hashFlags(flags: Record<string, any>) {
    method _hashArgs (line 157) | static _hashArgs(args: CLIArgs): CLIArgs {
    method init (line 162) | static init(command: string, flags: Record<string, any>, args: CLIArgs) {
    method sendData (line 181) | static sendData(): Promise<void> {
    method setError (line 203) | static setError(level: string, err: Error): void {
    method setExtraData (line 212) | static setExtraData(key, value) {
    method incExtraDataKey (line 216) | static incExtraDataKey(key, value) {
    method hashData (line 224) | static hashData(data: any) {
    method addBreadCrumb (line 231) | static addBreadCrumb(category: string, message: string, data?: Record<...
    method toObject (line 235) | static toObject() {

FILE: packages/legacy/src/analytics/analyticsSender.ts
  constant ANALYTICS_DOMAIN (line 5) | const ANALYTICS_DOMAIN = getSync(CFG_ANALYTICS_DOMAIN_KEY) || DEFAULT_AN...

FILE: packages/legacy/src/bootstrap.ts
  function bootstrap (line 16) | async function bootstrap() {
  function ensureDirectories (line 24) | async function ensureDirectories() {
  function verifyNodeVersionCompatibility (line 29) | function verifyNodeVersionCompatibility() {
  function warnIfRunningAsRoot (line 34) | function warnIfRunningAsRoot() {
  function printVersionIfAsked (line 41) | function printVersionIfAsked() {

FILE: packages/legacy/src/cli/command.ts
  type Flags (line 4) | type Flags = { [flagName: string]: string | boolean | undefined | any };
  type CLIArgs (line 5) | type CLIArgs = Array<string[] | string>;
  type GenericObject (line 6) | type GenericObject = { [k: string]: any };
  type Report (line 7) | type Report = { data: string; code: number };
  type RenderResult (line 8) | type RenderResult = { data: ReactElement; code: number };
  type Example (line 9) | type Example = { cmd: string; description: string };
  type CommandArg (line 10) | type CommandArg = { name: string; description?: string };
  type CommandOption (line 11) | type CommandOption = [string, string, string];
  type CommandOptions (line 12) | type CommandOptions = Array<CommandOption>;
  type Command (line 14) | interface Command {

FILE: packages/legacy/src/cli/commandGroups.ts
  type Group (line 14) | type Group = keyof typeof groups;
  type GroupsType (line 16) | type GroupsType = { [groupName: string]: string };

FILE: packages/legacy/src/cli/commandRegistry.ts
  function parseCommandName (line 3) | function parseCommandName(commandName: string): string {
  class CommandRegistry (line 7) | class CommandRegistry {
    method constructor (line 16) | constructor(usage: string, description: string, version: string, comma...

FILE: packages/legacy/src/cli/commands/host/host.ts
  class Host (line 8) | class Host implements LegacyCommand {
    method action (line 28) | async action([hostName]: [string], options: { reset: boolean }) {
    method report (line 41) | report(newHostName: string): string {

FILE: packages/legacy/src/cli/commands/login/login.ts
  type LoginActionResult (line 21) | type LoginActionResult = {
  constant LOCAL_LISTEN_SERVER_PATH (line 27) | const LOCAL_LISTEN_SERVER_PATH = '/login_result';
  constant LOCAL_LISTEN_SERVER_PORT (line 28) | const LOCAL_LISTEN_SERVER_PORT = 3333;
  class Login (line 30) | class Login implements LegacyCommand {
    method action (line 48) | async action(): Promise<LoginActionResult> {
    method report (line 111) | report({ isWaiting, isLoggedIn = false, username }: LoginActionResult)...

FILE: packages/legacy/src/cli/commands/login/loginSuccessPage.ts
  function loginSuccessPage (line 1) | function loginSuccessPage() {

FILE: packages/legacy/src/cli/commands/logout/logout.ts
  type LogoutActionResult (line 7) | type LogoutActionResult = {
  class Logout (line 12) | class Logout implements LegacyCommand {
    method action (line 25) | async action(): Promise<LogoutActionResult> {
    method report (line 34) | report({ isNotLoggedIn = false, username }: LogoutActionResult): string {

FILE: packages/legacy/src/cli/defaultErrorHandler.ts
  function findErrorDefinition (line 8) | function findErrorDefinition(err: Error) {
  function getErrorFunc (line 15) | function getErrorFunc(errorDefinition) {
  function getErrorMessage (line 21) | function getErrorMessage(
  function handleNonArcoCustomErrors (line 44) | function handleNonArcoCustomErrors(err: Error): string {

FILE: packages/legacy/src/cli/globalFlags.ts
  class GlobalFlags (line 1) | class GlobalFlags {
    method token (line 4) | get token(): string | undefined {
    method token (line 8) | set token(token: string | undefined) {

FILE: packages/legacy/src/cli/handleErrors.ts
  function handleErrorAndExit (line 7) | async function handleErrorAndExit(
  function handleUnhandledRejection (line 31) | async function handleUnhandledRejection(
  function logErrAndExit (line 44) | async function logErrAndExit(err: Error | string, commandName: string) {
  function serializeErrAndExit (line 53) | function serializeErrAndExit(err, commandName: string) {

FILE: packages/legacy/src/cli/legacyCommand.ts
  type LegacyCommand (line 4) | interface LegacyCommand {

FILE: packages/legacy/src/cli/loader/loader.ts
  class Loader (line 5) | class Loader {
    method createNewSpinner (line 8) | private createNewSpinner(): Ora {
    method isStarted (line 18) | get isStarted() {
    method on (line 22) | on(): Loader {
    method off (line 29) | off(): Loader {
    method start (line 35) | start(text?: string): Loader {
    method setText (line 42) | setText(text: string): Loader {
    method setTextAndRestart (line 47) | setTextAndRestart(text: string): Loader {
    method get (line 56) | get(): Ora | null {
    method stop (line 60) | stop(): Loader {
    method succeed (line 65) | succeed(text?: string): Loader {
    method fail (line 70) | fail(text?: string): Loader {
    method warn (line 75) | warn(text?: string): Loader {
    method info (line 80) | info(text?: string): Loader {
    method stopAndPersist (line 85) | stopAndPersist(options?: PersistOptions): Loader {

FILE: packages/legacy/src/cli/registerCommands.ts
  function registerCommands (line 8) | function registerCommands(): CommandRegistry {

FILE: packages/legacy/src/cli/request.ts
  constant TIMEOUT_REQUEST (line 6) | const TIMEOUT_REQUEST = 1000 * 60;

FILE: packages/legacy/src/cli/uploadFile.ts
  type FileUploadResult (line 8) | type FileUploadResult = {
  function uploadFile (line 17) | async function uploadFile(options: {

FILE: packages/legacy/src/cli/user/checkUserLogin.ts
  function checkUserLogin (line 5) | async function checkUserLogin(): Promise<{ loggedIn: boolean; user?: Use...

FILE: packages/legacy/src/cli/user/getUserInfoFromAPI.ts
  type UserFromAPI (line 4) | type UserFromAPI = {
  function getUserInfoFromAPI (line 13) | async function getUserInfoFromAPI(): Promise<{

FILE: packages/legacy/src/constants.ts
  function getDirectory (line 7) | function getDirectory(): string {
  constant ENV_GLOBAL_CACHE_DIR (line 14) | const ENV_GLOBAL_CACHE_DIR = 'ARCO_GLOBAL_CACHE_DIR';
  function getCacheDirectory (line 16) | function getCacheDirectory(): string {
  constant ENV_VARIABLE_CONFIG_PREFIX (line 27) | const ENV_VARIABLE_CONFIG_PREFIX = 'ARCO_CONFIG_';
  constant ENV_BUNDLE_SIZE_ANALYZER (line 29) | const ENV_BUNDLE_SIZE_ANALYZER = 'BUNDLE_SIZE_ANALYZER';
  constant ENV_BUNDLE_SPEED_ANALYZER (line 31) | const ENV_BUNDLE_SPEED_ANALYZER = 'BUNDLE_SPEED_ANALYZER';
  constant MATERIAL_GENERATION (line 33) | const MATERIAL_GENERATION = 2;
  constant DIR_CACHE_ROOT (line 38) | const DIR_CACHE_ROOT = getCacheDirectory();
  constant DIR_GLOBAL_CONFIG (line 40) | const DIR_GLOBAL_CONFIG = path.join(DIR_CACHE_ROOT, 'config');
  constant DIR_GLOBAL_LOGS (line 42) | const DIR_GLOBAL_LOGS = path.join(DIR_CACHE_ROOT, 'logs');
  constant DIR_ARTIFACTS (line 48) | const DIR_ARTIFACTS = 'artifacts';
  constant DIR_ARTIFACTS_PREVIEW (line 50) | const DIR_ARTIFACTS_PREVIEW = path.join(DIR_ARTIFACTS, 'preview');
  constant DIR_ARTIFACTS_DOCS (line 52) | const DIR_ARTIFACTS_DOCS = path.join(DIR_ARTIFACTS, 'docs');
  constant DIR_SOURCE (line 54) | const DIR_SOURCE = 'source';
  constant FILE_GLOBAL_CONFIG (line 56) | const FILE_GLOBAL_CONFIG = 'config.json';
  constant FILE_WORKSPACE_JSONC (line 58) | const FILE_WORKSPACE_JSONC = 'arco.workspace.jsonc';
  constant FILE_WORKSPACE_JS (line 60) | const FILE_WORKSPACE_JS = 'arco.workspace.js';
  constant PATH_DEBUG_LOGS (line 62) | const PATH_DEBUG_LOGS = path.join(DIR_CACHE_ROOT, 'debug.log');
  constant CFG_LOG_JSON_FORMAT (line 67) | const CFG_LOG_JSON_FORMAT = 'log_json_format';
  constant CFG_LOG_LEVEL (line 69) | const CFG_LOG_LEVEL = 'log_level';
  constant CFG_NO_WARNINGS (line 71) | const CFG_NO_WARNINGS = 'no_warnings';
  constant CFG_USER_EMAIL_KEY (line 73) | const CFG_USER_EMAIL_KEY = 'user.email';
  constant CFG_USER_TOKEN_KEY (line 75) | const CFG_USER_TOKEN_KEY = 'x-arco-token';
  constant CFG_ACCESS_TOKEN_KEY (line 77) | const CFG_ACCESS_TOKEN_KEY = 'x-arco-access-token';
  constant CFG_USER_NAME_KEY (line 79) | const CFG_USER_NAME_KEY = 'user.name';
  constant CFG_USER_ACCOUNT_TYPE_KET (line 81) | const CFG_USER_ACCOUNT_TYPE_KET = 'user.accountType';
  constant CFG_HOST_NPM_KEY (line 83) | const CFG_HOST_NPM_KEY = 'host.npm';
  constant CFG_HOST_ARCO_KEY (line 85) | const CFG_HOST_ARCO_KEY = 'host.arco';
  constant CFG_ANALYTICS_DOMAIN_KEY (line 87) | const CFG_ANALYTICS_DOMAIN_KEY = 'analytics_domain';
  constant CFG_ANALYTICS_ANONYMOUS_KEY (line 89) | const CFG_ANALYTICS_ANONYMOUS_KEY = 'anonymous_reporting';
  constant CFG_ANALYTICS_REPORTING_KEY (line 91) | const CFG_ANALYTICS_REPORTING_KEY = 'analytics_reporting';
  constant CFG_ANALYTICS_ERROR_REPORTS_KEY (line 93) | const CFG_ANALYTICS_ERROR_REPORTS_KEY = 'error_reporting';
  constant CFG_ANALYTICS_ENVIRONMENT_KEY (line 95) | const CFG_ANALYTICS_ENVIRONMENT_KEY = 'arco_environment';
  constant CFG_ANALYTICS_USERID_KEY (line 97) | const CFG_ANALYTICS_USERID_KEY = 'analytics_id';
  constant CORE_ASPECT_PACKAGE_NAME_MAP (line 102) | const CORE_ASPECT_PACKAGE_NAME_MAP = {
  constant CORE_ASPECT_ID_MAP (line 107) | const CORE_ASPECT_ID_MAP = {
  constant BASE_WEB_DOMAIN (line 115) | const BASE_WEB_DOMAIN = 'arco.design';
  constant BASE_DOCS_DOMAIN (line 117) | const BASE_DOCS_DOMAIN = `${BASE_WEB_DOMAIN}/material`;
  constant DEFAULT_ENV (line 122) | const DEFAULT_ENV = CORE_ASPECT_ID_MAP.ENV_REACT;
  constant DEFAULT_ENV_CONFIG_PATH (line 124) | const DEFAULT_ENV_CONFIG_PATH = 'arco.env.config.js';
  constant DEFAULT_ANALYTICS_DOMAIN (line 126) | const DEFAULT_ANALYTICS_DOMAIN = `TODO: date analytics`;
  constant DEFAULT_DIST_DIRNAME (line 128) | const DEFAULT_DIST_DIRNAME = 'dist';
  constant DEFAULT_BUILD_IGNORE_PATTERNS (line 130) | const DEFAULT_BUILD_IGNORE_PATTERNS = ['**/__test__/**/*', '**/__docs__/...
  constant DEFAULT_LANGUAGE (line 132) | const DEFAULT_LANGUAGE = 'javascript';
  constant DEFAULT_HOST_ARCO (line 134) | const DEFAULT_HOST_ARCO = 'arco.design';
  constant DEFAULT_MATERIAL_GROUP_ID (line 136) | const DEFAULT_MATERIAL_GROUP_ID = 0;
  constant DEFAULT_TEST_FILE_PATTERNS (line 138) | const DEFAULT_TEST_FILE_PATTERNS = ['**/?(*.)+(spec|test).[jt]s?(x)'];
  constant IS_WINDOWS (line 143) | const IS_WINDOWS = os.platform() === 'win32';
  constant SPINNER_TYPE (line 145) | const SPINNER_TYPE = IS_WINDOWS ? cliSpinners.dots : cliSpinners.dots12;
  constant GIT_IGNORE (line 147) | const GIT_IGNORE = '.gitignore';
  constant PACKAGE_JSON (line 149) | const PACKAGE_JSON = 'package.json';
  constant IGNORE_LIST (line 151) | const IGNORE_LIST = [
  constant CLI_DESCRIPTION (line 163) | const CLI_DESCRIPTION = '';
  constant CLI_USAGE (line 165) | const CLI_USAGE = '[--version] [--help] <command> [<args>]';
  constant CLI_COMPONENT_PATTERN_HELP (line 167) | const CLI_COMPONENT_PATTERN_HELP = `component name, package name, or com...
  constant CLI_TASK_NAME_HELP (line 171) | const CLI_TASK_NAME_HELP = `build the specified task(s) only. for multip...
  constant CLI_LOGIN_FIRST_TIP (line 174) | const CLI_LOGIN_FIRST_TIP = `please use 'arco login' to login in first`;
  constant BUILD_TASK_NAME_DOCS (line 179) | const BUILD_TASK_NAME_DOCS = 'HandleDocuments';
  constant BUILD_TASK_NAME_PREVIEW (line 181) | const BUILD_TASK_NAME_PREVIEW = 'GeneratePreview';
  constant BUILD_TASK_NAME_COMPILER_ESM (line 183) | const BUILD_TASK_NAME_COMPILER_ESM = 'TSCompilerESM';
  constant BUILD_TASK_NAME_COMPILER_CJS (line 185) | const BUILD_TASK_NAME_COMPILER_CJS = 'TSCompilerCJS';

FILE: packages/legacy/src/error/abstractError.ts
  class AbstractError (line 1) | class AbstractError extends Error {
    method constructor (line 4) | constructor() {

FILE: packages/legacy/src/error/arcoError.ts
  class ArcoError (line 1) | class ArcoError extends Error {
    method constructor (line 4) | constructor(msg?: string) {
    method report (line 13) | report(): string {

FILE: packages/legacy/src/error/cloneErrorObject.ts
  function cloneErrorObject (line 5) | function cloneErrorObject(error: Error): Error {

FILE: packages/legacy/src/error/generalError.ts
  class GeneralError (line 3) | class GeneralError extends AbstractError {
    method constructor (line 6) | constructor(msg: string) {

FILE: packages/legacy/src/error/hashErrorObject.ts
  function hashErrorIfNeeded (line 9) | function hashErrorIfNeeded(error: Error) {
  function hashValue (line 36) | function hashValue(value: any): string {

FILE: packages/legacy/src/globalConfig/config.ts
  function getPath (line 12) | function getPath() {
  class Config (line 16) | class Config extends Map<string, string | boolean> {
    method toPlainObject (line 17) | toPlainObject() {
    method toJson (line 21) | toJson() {
    method write (line 25) | write() {
    method writeSync (line 29) | writeSync() {
    method get (line 33) | get(key) {
    method loadSync (line 46) | static loadSync(): Config {
    method load (line 57) | static async load(): Promise<Config> {

FILE: packages/legacy/src/globalConfig/index.ts
  function set (line 4) | function set(newConfig: Record<string, string | boolean>): Promise<Confi...
  function setSync (line 13) | function setSync(newConfig: Record<string, string | boolean>): Config {
  function del (line 22) | function del(keys: string | string[]): Promise<Config> {
  function delSync (line 33) | function delSync(keys: string | string[]): Config {
  function get (line 44) | async function get(key: string): Promise<string | undefined> {
  function getSync (line 61) | function getSync(key: string): string | undefined {
  function list (line 78) | function list(): Promise<any> {
  function listSync (line 82) | function listSync(): any {
  function cache (line 87) | function cache() {
  function invalidateCache (line 100) | function invalidateCache() {
  function toEnvVariableName (line 104) | function toEnvVariableName(configName: string): string {

FILE: packages/legacy/src/logger/getPinoLogger.ts
  function getPinoLogger (line 4) | function getPinoLogger(

FILE: packages/legacy/src/logger/interface.ts
  type IArcoLogger (line 3) | interface IArcoLogger {

FILE: packages/legacy/src/logger/logger.ts
  constant LEVELS (line 14) | const LEVELS = ['fatal', 'error', 'warn', 'info', 'debug', 'trace'];
  function isLevel (line 16) | function isLevel(maybeLevel: Level | string): maybeLevel is Level {
  function getLogLevel (line 20) | function getLogLevel(): Level {
  class ArcoLogger (line 60) | class ArcoLogger implements IArcoLogger {
    method constructor (line 77) | constructor(logger: PinoLogger) {
    method trace (line 82) | trace(message: string, ...meta: any[]) {
    method debug (line 86) | debug(message: string, ...meta: any[]) {
    method warn (line 90) | warn(message: string, ...meta: any[]) {
    method info (line 94) | info(message: string, ...meta: any[]) {
    method error (line 98) | error(message: string, ...meta: any[]) {
    method fatal (line 102) | fatal(message: string, ...meta: any[]) {
    method isJsonFormat (line 106) | get isJsonFormat() {
    method console (line 114) | console(msg?: string | Error, level?: Level, color?: string) {
    method clearConsole (line 141) | clearConsole() {
    method profile (line 160) | profile(id: string, console?: boolean) {
    method exitAfterFlush (line 167) | async exitAfterFlush(code, commandName: string, cliOutput = '') {
    method debugAndAddBreadCrumb (line 181) | debugAndAddBreadCrumb(
    method warnAndAddBreadCrumb (line 190) | warnAndAddBreadCrumb(
    method errorAndAddBreadCrumb (line 199) | errorAndAddBreadCrumb(
    method addToLoggerAndToBreadCrumb (line 208) | private addToLoggerAndToBreadCrumb(
    method switchToConsoleLogger (line 222) | switchToConsoleLogger(level?: Level) {
  function writeLogToScreen (line 230) | function writeLogToScreen(levelOrPrefix = '') {

FILE: packages/legacy/src/logger/printWarning.ts
  function printWarning (line 5) | function printWarning(msg: string) {

FILE: packages/legacy/src/logger/profiler.ts
  class Profiler (line 1) | class Profiler {
    method profile (line 4) | profile(id: string): string {

FILE: packages/legacy/src/prompts/exceptions/promptCanceled.ts
  class PromptCanceled (line 3) | class PromptCanceled extends AbstractError {}

FILE: packages/legacy/src/prompts/prompt.ts
  constant DEFAULT_PROMPT_MSG (line 6) | const DEFAULT_PROMPT_MSG = '';
  constant CANCEL_ERROR_MSG (line 7) | const CANCEL_ERROR_MSG = 'canceled';

FILE: packages/legacy/src/prompts/schemas/analyticsReporting.ts
  method conform (line 10) | conform(value: string) {

FILE: packages/legacy/src/prompts/schemas/errorReporting.ts
  method conform (line 13) | conform(value: string) {

FILE: packages/legacy/src/types.ts
  type APIProperty (line 1) | type APIProperty = {
  type Doclet (line 10) | type Doclet = {

FILE: packages/legacy/src/utils/buildCommandMessage.ts
  function buildCommandMessage (line 4) | function buildCommandMessage(

FILE: packages/legacy/src/utils/cliVersion.ts
  function setCliVersion (line 3) | function setCliVersion(version) {
  function getCliVersion (line 7) | function getCliVersion() {

FILE: packages/legacy/src/utils/concurrency.ts
  constant CONCURRENT_IO_LIMIT (line 1) | const CONCURRENT_IO_LIMIT = 100;
  constant CONCURRENT_COMPONENTS_LIMIT (line 2) | const CONCURRENT_COMPONENTS_LIMIT = 50;
  constant CONCURRENT_FETCH_LIMIT (line 3) | const CONCURRENT_FETCH_LIMIT = 15;
  function concurrentIOLimit (line 8) | function concurrentIOLimit(): number {
  function concurrentComponentsLimit (line 15) | function concurrentComponentsLimit(): number {
  function concurrentFetchLimit (line 22) | function concurrentFetchLimit(): number {

FILE: packages/legacy/src/utils/encryption/sha1.ts
  function sha1 (line 10) | function sha1(

FILE: packages/legacy/src/utils/eol.ts
  function converts (line 7) | function converts(text: string | Buffer, to: string) {
  function lf (line 18) | function lf(text: string | Buffer) {
  function auto (line 22) | function auto(text: string | Buffer) {
  function cr (line 26) | function cr(text: string | Buffer) {
  function crlf (line 30) | function crlf(text: string | Buffer) {

FILE: packages/legacy/src/utils/fs/isDirEmpty.ts
  function isDirEmpty (line 3) | async function isDirEmpty(dirPath: string): Promise<boolean> {

FILE: packages/legacy/src/utils/fs/readDirIgnoreDsStore.ts
  function readDirIgnoreDsStore (line 3) | async function readDirIgnoreDsStore(dirPath: string): Promise<string[]> {
  function readDirSyncIgnoreDsStore (line 8) | function readDirSyncIgnoreDsStore(dirPath: string): string[] {

FILE: packages/legacy/src/utils/fs/removeEmptyDir.ts
  function removeEmptyDir (line 5) | async function removeEmptyDir(dirPath: string): Promise<boolean> {

FILE: packages/legacy/src/utils/fs/removeFilesAndEmptyDirsRecursively.ts
  function removeFilesAndEmptyDirsRecursively (line 13) | async function removeFilesAndEmptyDirsRecursively(

FILE: packages/legacy/src/utils/fs/zipFiles.ts
  function zipFiles (line 4) | function zipFiles(options: {

FILE: packages/legacy/src/utils/ignore.ts
  function getIgnoreListForArco (line 7) | function getIgnoreListForArco(consumerPath: string): string[] {
  function getGitIgnoreFile (line 13) | function getGitIgnoreFile(dir: string) {
  function retrieveIgnoreList (line 18) | function retrieveIgnoreList(cwd: string) {
  function getGitIgnoreForArco (line 23) | function getGitIgnoreForArco(consumerPath: string): any {

FILE: packages/legacy/src/utils/map/toObject.ts
  function mapToObject (line 5) | function mapToObject(map: Map<any, any>): Record<string, any> {

FILE: packages/legacy/src/utils/network/port.ts
  class PortLockedError (line 3) | class PortLockedError extends Error {
    method constructor (line 4) | constructor(port: number) {
  class Port (line 9) | class Port {
    method get (line 10) | async get(options: { port: number | Iterable<number>; usedPort?: numbe...
    method getAvailablePort (line 71) | private async getAvailablePort(options: any): Promise<number> {
    method makeRange (line 86) | private makeRange(from: number, to: number) {
    method getPort (line 112) | static getPort(from: number, to: number, usedPort?: number[]) {
    method getPortFromRange (line 118) | static getPortFromRange(range: number[] | number, usedPort?: number[]) {

FILE: packages/legacy/src/utils/number/isNumeric.ts
  function isNumeric (line 4) | function isNumeric(val: any) {

FILE: packages/legacy/src/utils/packCommand.ts
  type PackData (line 4) | type PackData = { payload: any; headers: any };
  function packCommand (line 6) | function packCommand(obj: PackData, base64 = true, compress = true): str...

FILE: packages/legacy/src/utils/path.ts
  function pathNormalizeToLinux (line 4) | function pathNormalizeToLinux(pathToNormalize?: string): string {
  function toWindowsCompatiblePath (line 8) | function toWindowsCompatiblePath(path: string): string {
  function isParentDir (line 12) | function isParentDir(parent: string, child: string) {
  function buildPropagationPaths (line 18) | function buildPropagationPaths(absPath: string, endPath?: string): strin...

FILE: packages/legacy/src/utils/string/toBase64.ts
  function toBase64 (line 9) | function toBase64(val: string | Buffer) {

FILE: packages/legacy/src/utils/string/toFsCompatible.ts
  function toFsCompatible (line 1) | function toFsCompatible(str: string) {

FILE: packages/legacy/src/utils/taskManager.ts
  type TaskType (line 1) | type TaskType = () => Promise<any>;
  class TaskManager (line 3) | class TaskManager {
    method constructor (line 14) | constructor(params: { parallelTaskCount?: number; tasks?: TaskType[] }) {
    method runAll (line 20) | runAll() {
    method next (line 30) | private next() {
    method onTaskDone (line 48) | private onTaskDone() {

FILE: packages/legacy/src/utils/timer/exceptions/timerAlreadyRunningError.ts
  class TimerAlreadyRunningError (line 1) | class TimerAlreadyRunningError extends Error {
    method constructor (line 2) | constructor() {

FILE: packages/legacy/src/utils/timer/exceptions/timerNotStartedError.ts
  class TimerNotStartedError (line 1) | class TimerNotStartedError extends Error {
    method constructor (line 2) | constructor() {

FILE: packages/legacy/src/utils/timer/response.ts
  class TimerResponse (line 1) | class TimerResponse {
    method constructor (line 2) | constructor(
    method seconds (line 12) | get seconds() {

FILE: packages/legacy/src/utils/timer/timer.ts
  class Timer (line 4) | class Timer {
    method start (line 7) | start(): Timer {
    method stop (line 13) | stop(): TimerResponse {
    method calculateElapsed (line 19) | private calculateElapsed(startTime: number, endTime: number) {
    method create (line 23) | static create() {

FILE: packages/legacy/src/workspace/component/dependencies/detectives/parserHelper.ts
  function getDependenciesFromMemberExpression (line 3) | function getDependenciesFromMemberExpression(node) {
  function getDependenciesFromCallExpression (line 16) | function getDependenciesFromCallExpression(node) {
  function getSpecifierValueForImportDeclaration (line 31) | function getSpecifierValueForImportDeclaration(specifier): Specifier {
  function getStringValue (line 41) | function getStringValue(node) {

FILE: packages/legacy/src/workspace/component/dependencies/types/dependencyTreeType.ts
  type Specifier (line 6) | type Specifier = {

FILE: packages/legacy/src/workspace/component/exceptions/componentNotFoundInPathError.ts
  class ComponentNotFoundInPathError (line 4) | class ComponentNotFoundInPathError extends ArcoError {
    method constructor (line 9) | constructor(path: string) {

FILE: packages/legacy/src/workspace/component/exceptions/fileSourceNotFoundError.ts
  class FileSourceNotFoundError (line 3) | class FileSourceNotFoundError extends AbstractError {
    method constructor (line 6) | constructor(path: string) {

FILE: packages/legacy/src/workspace/component/sources/abstractVinyl.ts
  type AbstractVinylProps (line 9) | type AbstractVinylProps = {
  class AbstractVinyl (line 16) | class AbstractVinyl extends (Vinyl as FileConstructor) {
    method fromVinyl (line 21) | static fromVinyl(vinyl: Vinyl): AbstractVinyl {
    method relativeDir (line 26) | get relativeDir() {
    method updatePaths (line 31) | updatePaths({
    method write (line 47) | async write(
    method toReadableString (line 63) | toReadableString() {
    method loadFromParsedStringBase (line 70) | static loadFromParsedStringBase(parsedString: any): AbstractVinylProps {
    method _getStatIfFileExists (line 82) | async _getStatIfFileExists(): Promise<fs.Stats | null | undefined> {
  function _verboseMsg (line 95) | function _verboseMsg(filePath: string, force: boolean) {

FILE: packages/legacy/src/workspace/component/sources/dataToPersist.ts
  class DataToPersist (line 9) | class DataToPersist {
    method constructor (line 14) | constructor() {
    method addFile (line 19) | addFile(file: AbstractVinyl) {
    method addManyFiles (line 41) | addManyFiles(files: AbstractVinyl[] = []) {
    method removePath (line 45) | removePath(pathToRemove: RemovePath) {
    method removeManyPaths (line 52) | removeManyPaths(pathsToRemove: RemovePath[] = []) {
    method merge (line 56) | merge(dataToPersist: DataToPersist | null | undefined) {
    method persistAllToFS (line 62) | async persistAllToFS() {
    method addBasePath (line 70) | addBasePath(basePath: string) {
    method toConsole (line 84) | toConsole() {
    method filterByPath (line 89) | filterByPath(filterFunc: (p: string) => boolean): DataToPersist {
    method persistFilesToFS (line 96) | private async persistFilesToFS() {
    method deletePathsFromFS (line 101) | private async deletePathsFromFS() {
    method validateAbsolute (line 113) | private validateAbsolute() {
    method log (line 129) | private log() {
    method assertRelative (line 140) | private assertRelative(pathToCheck: string) {
    method throwForDirectoryCollision (line 156) | private throwForDirectoryCollision(file: AbstractVinyl) {

FILE: packages/legacy/src/workspace/component/sources/dist.ts
  class Dist (line 3) | class Dist extends AbstractVinyl {
    method loadFromParsedString (line 4) | static loadFromParsedString(parsedString: Record<string, any>): Dist |...
    method loadFromParsedStringArray (line 10) | static loadFromParsedStringArray(arr: Record<string, any>[]): Dist[] |...
    method clone (line 14) | clone(_opts?: { contents?: boolean; deep?: boolean } | boolean): this {

FILE: packages/legacy/src/workspace/component/sources/removePath.ts
  class RemovePath (line 4) | class RemovePath {
    method constructor (line 9) | constructor(path: string, removeItsDirIfEmpty = false) {
    method persistToFS (line 14) | async persistToFS() {

FILE: packages/legacy/src/workspace/component/sources/sourceFile.ts
  class SourceFile (line 6) | class SourceFile extends AbstractVinyl {
    method load (line 7) | static load(
    method loadFromParsedString (line 33) | static loadFromParsedString(parsedString: Record<string, any>): Source...
    method loadFromParsedStringArray (line 39) | static loadFromParsedStringArray(arr: Record<string, any>[]): SourceFi...
    method clone (line 44) | clone(): this {

FILE: packages/legacy/src/workspace/component/sources/vinylTypes.ts
  type File (line 5) | interface File {
  type NullFile (line 268) | interface NullFile extends File {
  type BufferFile (line 279) | interface BufferFile extends File {
  type StreamFile (line 288) | interface StreamFile extends File {
  type DirectoryFile (line 297) | interface DirectoryFile extends NullFile {
  type SymbolicFile (line 302) | interface SymbolicFile extends NullFile {
  type ConstructorOptions (line 307) | interface ConstructorOptions {
  type FileConstructor (line 351) | interface FileConstructor {

FILE: packages/legacy/src/workspace/componentIdTo.ts
  type ComponentChunkType (line 3) | type ComponentChunkType = 'component' | 'preview';
  constant PREVIEW_CHUNK_SUFFIX (line 5) | const PREVIEW_CHUNK_SUFFIX = 'preview';
  constant MANIFEST_FILENAME (line 7) | const MANIFEST_FILENAME = 'manifest.json';
  constant FORK_CONFIG_FILENAME (line 9) | const FORK_CONFIG_FILENAME = 'config.json';
  function toComponentChunkFilename (line 11) | function toComponentChunkFilename(componentId: string, type: ComponentCh...
  function toComponentManifestFilename (line 17) | function toComponentManifestFilename(componentId: string) {
  function toComponentForkConfigFilename (line 22) | function toComponentForkConfigFilename(componentId: string) {
  function toComponentChunkId (line 27) | function toComponentChunkId(componentId: string, type: ComponentChunkTyp...
  function toComponentPackageName (line 31) | function toComponentPackageName(componentId: string) {

FILE: packages/legacy/src/workspace/componentInfo.ts
  type ComponentConfig (line 6) | type ComponentConfig = {
  type ComponentInfoFiles (line 86) | type ComponentInfoFiles = {
  class ComponentInfo (line 92) | class ComponentInfo {
    method constructor (line 123) | constructor(
    method id (line 179) | get id(): string {
    method version (line 183) | get version(): string {
    method packageName (line 187) | get packageName(): string {
    method dependencies (line 191) | get dependencies(): Record<string, string> {
    method devDependencies (line 195) | get devDependencies(): Record<string, string> {
    method peerDependencies (line 199) | get peerDependencies(): Record<string, string> {
    method nameMatchId (line 206) | static nameMatchId(name = '', id = '') {
    method fromJson (line 210) | static fromJson(json: ComponentConfig, workspacePath: string) {

FILE: packages/legacy/src/workspace/componentOps/addComponents/addComponents.ts
  type ComponentMapFile (line 7) | type ComponentMapFile = {
  function getFilesByDir (line 13) | async function getFilesByDir(

FILE: packages/legacy/src/workspace/componentOps/addComponents/exceptions/ignoredDirectoryError.ts
  class IgnoredDirectoryError (line 4) | class IgnoredDirectoryError extends ArcoError {
    method constructor (line 5) | constructor(dir: string) {

FILE: packages/legacy/src/workspace/componentResult.ts
  type Serializable (line 3) | type Serializable = {
  type TaskMetadata (line 7) | type TaskMetadata = { [key: string]: Serializable };
  type ComponentResult (line 9) | type ComponentResult = {
  function formatComponentResultError (line 44) | function formatComponentResultError(componentResults: ComponentResult[])...

FILE: packages/legacy/src/workspace/workspaceLocator.ts
  type WorkspaceInfo (line 6) | type WorkspaceInfo = {
  function getWorkspaceInfo (line 14) | async function getWorkspaceInfo(absPath: string): Promise<WorkspaceInfo ...

FILE: packages/migrator/src/adapters/componentAdapter.ts
  constant DEFAULT_NEW_DEMO_DIR (line 11) | const DEFAULT_NEW_DEMO_DIR = '__docs__';
  type ComponentAdapterOptions (line 13) | interface ComponentAdapterOptions extends AdapterOptions {
  type DemoInfo (line 17) | type DemoInfo = { path: string; moduleName: string; isDefault?: boolean };
  class ComponentAdapter (line 19) | class ComponentAdapter {
    method parseDemoModules (line 20) | static parseDemoModules(entryContent: string): DemoInfo[] {
    method parseRawComment (line 45) | static parseRawComment(fileContent) {
    method parseComponentInfo (line 70) | static parseComponentInfo(workspaceRoot: string, componentDir: string,...
    method constructor (line 148) | constructor(options: ComponentAdapterOptions) {
    method generateNewDocEntry (line 157) | private generateNewDocEntry() {
    method adaptDemos (line 195) | private adaptDemos() {
    method deleteUselessFiles (line 210) | private deleteUselessFiles() {
    method run (line 218) | run() {

FILE: packages/migrator/src/adapters/packageAdapter.ts
  type PackageAdapterOptions (line 8) | type PackageAdapterOptions = AdapterOptions;
  class PackageAdapter (line 10) | class PackageAdapter {
    method constructor (line 15) | constructor(options: PackageAdapterOptions) {
    method adaptPackageJSON (line 20) | private adaptPackageJSON() {
    method adaptTsconfig (line 66) | private adaptTsconfig() {
    method deleteUselessFiles (line 76) | private deleteUselessFiles() {
    method run (line 84) | run() {

FILE: packages/migrator/src/adapters/workspaceAdapter.ts
  type WorkspaceAdapterOptions (line 8) | type WorkspaceAdapterOptions = AdapterOptions;
  class WorkspaceAdapter (line 10) | class WorkspaceAdapter {
    method constructor (line 26) | constructor(options: WorkspaceAdapterOptions) {
    method adaptPackageJSON (line 43) | private adaptPackageJSON() {
    method adaptTsconfig (line 117) | private adaptTsconfig() {
    method adaptGitIgnore (line 131) | private adaptGitIgnore() {
    method generateProjectFileFromTemplate (line 152) | private generateProjectFileFromTemplate(options: { filePath: string; p...
    method ejectConfigFiles (line 183) | private ejectConfigFiles() {
    method deleteUselessFiles (line 208) | private deleteUselessFiles() {
    method run (line 216) | run() {

FILE: packages/migrator/src/app.ts
  function migrate (line 5) | function migrate(options: { noEmit: boolean; include: string }) {

FILE: packages/migrator/src/constant.ts
  constant TIP_CHECK_MIGRATION (line 1) | const TIP_CHECK_MIGRATION = 'TODO: AUTO MIGRATION CHECK';
  constant PACKAGE_JSON (line 3) | const PACKAGE_JSON = 'package.json';
  constant TSCONFIG_JSON (line 5) | const TSCONFIG_JSON = 'tsconfig.json';
  constant WORKSPACE_JSONC (line 7) | const WORKSPACE_JSONC = 'arco.workspace.jsonc';

FILE: packages/migrator/src/migrator.ts
  class Migrator (line 13) | class Migrator {
    method constructor (line 20) | constructor(options: MigratorOptions) {
    method generateWorkspaceComponentsConfig (line 48) | private generateWorkspaceComponentsConfig(extendsRule: Record<string, ...
    method registerWorkspaceComponents (line 83) | private registerWorkspaceComponents() {
    method run (line 100) | run() {

FILE: packages/migrator/src/types.ts
  type AdapterOptions (line 1) | interface AdapterOptions {
  type ComponentInfo (line 8) | type ComponentInfo = {
  type MigratorOptions (line 27) | type MigratorOptions = {

FILE: packages/migrator/src/utils.ts
  function loadConfig (line 6) | function loadConfig(root = process.cwd()) {
  function writeConfig (line 15) | function writeConfig(configExtend: Record<string, any>, root = process.c...
  function isParentDir (line 22) | function isParentDir(parent: string, child: string) {
  function buildPropagationPaths (line 28) | function buildPropagationPaths(absPath: string, endPath?: string): strin...

FILE: packages/react/src/jest/setupTests.js
  method setItem (line 28) | setItem(key, value) {
  method getItem (line 31) | getItem(key) {
  method removeItem (line 34) | removeItem(key) {
  method clear (line 37) | clear() {

FILE: packages/react/src/jest/transformers/file-transformer.js
  method process (line 9) | process(src, filename) {

FILE: packages/react/src/jest/transformers/style-transformer.js
  method process (line 5) | process() {
  method getCacheKey (line 10) | getCacheKey() {

FILE: packages/react/src/react.env.ts
  type CreateCompilerTaskOptions (line 46) | type CreateCompilerTaskOptions = {
  type DocMetadataCache (line 54) | type DocMetadataCache = Record<string, { hash: string; metadata: Doclet[...
  constant DEFAULT_ESM_DIR (line 59) | const DEFAULT_ESM_DIR = 'es';
  constant DEFAULT_CJS_DIR (line 60) | const DEFAULT_CJS_DIR = 'lib';
  class ReactEnv (line 62) | class ReactEnv implements TesterEnv<Tester>, PreviewEnv {
    method constructor (line 63) | constructor(
    method cacheDir (line 74) | get cacheDir(): string {
    method docMetadataCachePath (line 78) | get docMetadataCachePath(): string {
    method getDocMetadataCache (line 82) | private getDocMetadataCache(): DocMetadataCache {
    method cacheDocMetadata (line 89) | private cacheDocMetadata(cache: DocMetadataCache) {
    method createTsCompilerOptions (line 95) | private createTsCompilerOptions(): TypescriptCompilerOptions {
    method createComponentsWebpackBundler (line 111) | private async createComponentsWebpackBundler(
    method createCjsJestTester (line 126) | private createCjsJestTester(jestConfigPath?: string, jestModulePath?: ...
    method createEsmCompiler (line 132) | private createEsmCompiler(transformers: TsConfigTransformer[] = [], ts...
    method createCjsCompiler (line 137) | private createCjsCompiler(transformers: TsConfigTransformer[] = [], ts...
    method createEsmCompilerTask (line 142) | private createEsmCompilerTask({
    method createCjsCompilerTask (line 162) | private createCjsCompilerTask({
    method getDevEnvId (line 185) | getDevEnvId(id?: string) {
    method getTester (line 189) | getTester(jestConfigPath: string, jestModulePath?: string): Tester {
    method getDevServer (line 193) | getDevServer(
    method getDocsTemplate (line 210) | getDocsTemplate() {
    method getDocsMetadata (line 214) | getDocsMetadata(files: SourceFile[], options?: TsDocumentOptions): Doc...
    method getPreviewConfig (line 237) | getPreviewConfig() {
    method getBundler (line 245) | async getBundler(
    method getBuildPipe (line 252) | getBuildPipe(modifiers: CreateCompilerTaskOptions): BuildTask[] {

FILE: packages/react/src/react.main.runtime.ts
  class ReactMain (line 27) | class ReactMain {
    method provider (line 45) | static provider([
    method constructor (line 88) | constructor(
    method extendEnvConfigFromUser (line 95) | private extendEnvConfigFromUser(): Environment {
    method useBuildPipe (line 142) | useBuildPipe(modifiers: Pick<ArcoEnvConfig, 'typescript' | 'less' | 's...
    method useWebpack (line 166) | useWebpack(modifiers: ArcoEnvConfig['webpack'] = {}) {
    method useJest (line 186) | useJest(modifiers: ArcoEnvConfig['jest'] = {}) {
    method useTsDocument (line 193) | useTsDocument(modifiers: ArcoEnvConfig['tsDocument']) {
    method compose (line 204) | compose(transformers: EnvTransformer[]) {

FILE: packages/react/src/tsdoc/parser.ts
  type TsDocumentOptions (line 14) | type TsDocumentOptions = Partial<GenerateConfig>;
  function getDocProp (line 19) | function getDocProp({ name, type, isOptional, tags }: PropertyType): API...
  function parser (line 42) | function parser(file: SourceFile, options?: TsDocumentOptions): Doclet[] {

FILE: packages/react/src/types/reactConfig.ts
  type ReactConfig (line 1) | type ReactConfig = {

FILE: packages/react/src/webpack/overlay/formatWebpackMessages.js
  function isLikelyASyntaxError (line 13) | function isLikelyASyntaxError(message) {
  function formatMessage (line 18) | function formatMessage(message) {
  function formatWebpackMessages (line 111) | function formatWebpackMessages(json) {

FILE: packages/react/src/webpack/overlay/webpackHotDevClient.js
  function clearOutdatedErrors (line 96) | function clearOutdatedErrors() {
  function handleSuccess (line 106) | function handleSuccess() {
  function handleWarnings (line 124) | function handleWarnings(warnings) {
  function handleErrors (line 165) | function handleErrors(errors) {
  function tryDismissErrorOverlay (line 191) | function tryDismissErrorOverlay() {
  function handleAvailableHash (line 198) | function handleAvailableHash(hash) {
  function isUpdateAvailable (line 230) | function isUpdateAvailable() {
  function canApplyUpdates (line 238) | function canApplyUpdates() {
  function canAcceptErrors (line 242) | function canAcceptErrors() {
  function tryApplyUpdates (line 255) | function tryApplyUpdates(onHotUpdateSuccess) {

FILE: packages/react/src/webpack/webpack.config.base.ts
  constant MODULE_FILE_EXTENSIONS (line 10) | const MODULE_FILE_EXTENSIONS = [
  constant IMAGE_INLINE_SIZE_LIMIT (line 27) | const IMAGE_INLINE_SIZE_LIMIT = parseInt(process.env.IMAGE_INLINE_SIZE_L...
  function EmptyPlugin (line 29) | function EmptyPlugin() {

FILE: packages/react/src/webpack/webpack.config.component.prod.ts
  constant BUNDLER_ANALYZER (line 7) | const BUNDLER_ANALYZER = process.env[ENV_BUNDLE_SIZE_ANALYZER] === 'true';

FILE: packages/service/src/builder/build.cmd.ts
  type BuildOpts (line 10) | type BuildOpts = {
  class BuilderCmd (line 15) | class BuilderCmd implements Command {
    method constructor (line 32) | constructor(private builder: BuilderMain, private workspace: Workspace...
    method report (line 34) | async report([pattern]: [string], { skipTests, tasks }: BuildOpts): Pr...

FILE: packages/service/src/builder/buildPipe.ts
  type TaskResults (line 12) | type TaskResults = {
  class BuildPipe (line 39) | class BuildPipe {
    method constructor (line 48) | constructor(
    method allTasksResults (line 58) | get allTasksResults(): TaskResults[] {
    method execute (line 65) | async execute(): Promise<TaskResultsList> {
    method addSignalListener (line 83) | private addSignalListener() {
    method executePreBuild (line 93) | private async executePreBuild() {
    method executeTask (line 101) | private async executeTask(task: BuildTask, env: EnvDefinition): Promis...
    method executePostBuild (line 143) | private async executePostBuild(tasksResults: TaskResultsList) {
    method updateFailedDependencyTask (line 151) | private updateFailedDependencyTask(task: BuildTask) {
    method shouldSkipTask (line 163) | private shouldSkipTask(taskId: string, envId: string): boolean {
    method getBuildContext (line 172) | private getBuildContext(envId: string): BuildContext {

FILE: packages/service/src/builder/buildPipelineOrder.ts
  type TaskDependenciesGraph (line 10) | type TaskDependenciesGraph = Graph<string, string>;
  type Location (line 11) | type Location = 'start' | 'middle' | 'end';
  type TasksLocationGraph (line 12) | type TasksLocationGraph = { location: Location; graph: TaskDependenciesG...
  type PipelineEnv (line 13) | type PipelineEnv = { env: EnvDefinition; pipeline: BuildTask[] };
  type DataPerLocation (line 14) | type DataPerLocation = {
  function calculatePipelineOrder (line 50) | function calculatePipelineOrder({
  function addTasksToGraph (line 104) | function addTasksToGraph(
  function addDependenciesToGraph (line 129) | function addDependenciesToGraph(
  function getLocation (line 174) | function getLocation(task: BuildTask, dependencyTask: BuildTask): Locati...
  function getPipelineForEnv (line 199) | function getPipelineForEnv(

FILE: packages/service/src/builder/buildTask.ts
  type TaskLocation (line 9) | type TaskLocation = 'start' | 'end';
  type BuildTaskResult (line 16) | interface BuildTaskResult {
  type BuildContext (line 23) | interface BuildContext extends ExecutionContext {
  type TaskDescriptor (line 40) | interface TaskDescriptor {
  type BuildTask (line 46) | interface BuildTask {
  class BuildTaskHelper (line 100) | class BuildTaskHelper {
    method serializeId (line 101) | static serializeId({ aspectId, name }: { aspectId: string; name: strin...
    method deserializeId (line 105) | static deserializeId(id: string): { aspectId: string; name: string } {
    method deserializeIdAllowEmptyName (line 117) | static deserializeIdAllowEmptyName(id: string): { aspectId: string; na...

FILE: packages/service/src/builder/builder.main.runtime.ts
  type TaskSlot (line 13) | type TaskSlot = SlotRegistry<BuildTask[]>;
  class BuilderMain (line 15) | class BuilderMain {
    method provider (line 22) | static provider(
    method constructor (line 37) | constructor(
    method registerBuildTasks (line 46) | registerBuildTasks(tasks: BuildTask[]) {
    method build (line 51) | async build(componnets: Component[], options?: BuilderServiceOptions) {

FILE: packages/service/src/builder/builder.service.tsx
  type BuilderServiceOptions (line 14) | type BuilderServiceOptions = {
  type BuildServiceResults (line 21) | type BuildServiceResults = {
  type EnvsBuildContext (line 28) | type EnvsBuildContext = { [envId: string]: BuildContext };
  type BuilderDescriptor (line 30) | type BuilderDescriptor = { tasks: string[] };
  class BuilderService (line 32) | class BuilderService implements EnvService<BuildServiceResults, BuilderD...
    method constructor (line 35) | constructor(private workspace: Workspace, private taskSlot: TaskSlot, ...
    method runOnce (line 37) | async runOnce(envsExecutionContext: ExecutionContext[], options: Build...
    method getDescriptor (line 74) | getDescriptor(env: EnvDefinition) {
    method render (line 81) | render(env: EnvDefinition) {

FILE: packages/service/src/builder/exceptions/artifactDefinitionError.ts
  class ArtifactDefinitionError (line 1) | class ArtifactDefinitionError extends Error {
    method constructor (line 2) | constructor() {

FILE: packages/service/src/builder/exceptions/artifactStorageError.ts
  class ArtifactStorageError (line 3) | class ArtifactStorageError extends Error {
    method constructor (line 4) | constructor(_: Error, component: Component) {

FILE: packages/service/src/builder/exceptions/invalidTaskError.ts
  class InvalidTaskError (line 3) | class InvalidTaskError extends ArcoError {
    method constructor (line 4) | constructor(readonly taskAspectId: string, reason: string) {

FILE: packages/service/src/builder/mergeComponentResults.ts
  type ComponentIndex (line 4) | type ComponentIndex = {
  function mergeComponentResults (line 11) | function mergeComponentResults(resultMatrix: ComponentResult[][]) {

FILE: packages/service/src/builder/taskResultsList.ts
  class TaskResultsList (line 9) | class TaskResultsList {
    method constructor (line 10) | constructor(
    method hasErrors (line 18) | hasErrors(): boolean {
    method throwErrorsIfExist (line 24) | throwErrorsIfExist() {
    method getErrorMessageFormatted (line 34) | private getErrorMessageFormatted(): string | null {
    method aggregateTaskErrorsToOneString (line 67) | private aggregateTaskErrorsToOneString(componentResult: ComponentResul...

FILE: packages/service/src/builder/tasksQueue.ts
  type EnvTask (line 5) | type EnvTask = { env: EnvDefinition; task: BuildTask };
  class TasksQueue (line 7) | class TasksQueue extends Array<EnvTask> {
    method toString (line 8) | toString() {
    method validate (line 17) | validate() {
    method validateTaskName (line 24) | private validateTaskName(task: BuildTask) {
    method validateDuplications (line 35) | private validateDuplications() {

FILE: packages/service/src/compiler/compiler.main.runtime.ts
  class CompilerMain (line 7) | class CompilerMain {
    method provider (line 14) | static provider([loggerMain]: [LoggerMain], config: CompilerAspectConf...
    method constructor (line 19) | constructor(private config: CompilerAspectConfig, private logger: Logg...
    method createTask (line 21) | createTask(name: string, compiler: Compiler): CompilerTask {

FILE: packages/service/src/compiler/compiler.task.ts
  class CompilerTask (line 13) | class CompilerTask implements BuildTask {
    method constructor (line 16) | constructor(
    method sortContextComponents (line 24) | private sortContextComponents(components: Component[]) {
    method clearDistDir (line 54) | private async clearDistDir(component: Component, compiler: Compiler) {
    method copyNonSupportedFiles (line 59) | private async copyNonSupportedFiles(component: Component, compiler: Co...
    method execute (line 79) | async execute(context: BuildContext): Promise<BuildTaskResult> {
    method preBuild (line 98) | async preBuild(context: BuildContext) {
    method postBuild (line 111) | async postBuild?(context: BuildContext, tasksResults: TaskResultsList)...

FILE: packages/service/src/compiler/types.ts
  type CompilerAspectConfig (line 6) | interface CompilerAspectConfig {
  type CompilerOptions (line 25) | interface CompilerOptions {
  type StyleFileToCompile (line 61) | type StyleFileToCompile = {
  type StyleCompilerOptions (line 76) | interface StyleCompilerOptions {
  type Compiler (line 91) | interface Compiler extends CompilerOptions {

FILE: packages/service/src/compiler/utils/compileStyle.ts
  type CompileStyleOptions (line 9) | type CompileStyleOptions = {
  function compileStyle (line 20) | async function compileStyle({

FILE: packages/service/src/compiler/utils/sortPackageBuildOrders.ts
  function sortPackageBuildOrders (line 3) | function sortPackageBuildOrders(

FILE: packages/service/src/fork/fork.cmd.ts
  class ForkCmd (line 7) | class ForkCmd implements Command {
    method constructor (line 20) | constructor(private logger: Logger, private fork: ForkMain, private wo...
    method report (line 22) | async report(): Promise<string> {

FILE: packages/service/src/fork/fork.main.runtime.ts
  class ForkMain (line 8) | class ForkMain {
    method provider (line 13) | static provider([loggerMain, cli, workspace]: [LoggerMain, CLIMain, Wo...
    method constructor (line 23) | constructor() {}

FILE: packages/service/src/generator/create.cmd.ts
  class CreateCmd (line 8) | class CreateCmd implements Command {
    method constructor (line 32) | constructor(private workspace: Workspace, private generator: Generator...
    method report (line 34) | async report(

FILE: packages/service/src/generator/generator.main.runtime.ts
  type GeneratorConfig (line 12) | type GeneratorConfig = {
  type CreateComponentOptions (line 20) | type CreateComponentOptions = {
  class GeneratorMain (line 25) | class GeneratorMain {
    method provider (line 30) | static provider(
    method constructor (line 40) | constructor(
    method updateWorkspaceConfig (line 46) | private updateWorkspaceConfig(name: string, rootDir: string, manifest:...
    method create (line 79) | async create({

FILE: packages/service/src/preview/bundlingStrategy.ts
  type ComputeTargetsContext (line 8) | interface ComputeTargetsContext extends BuildContext {
  type BundlingStrategy (line 12) | interface BundlingStrategy {

FILE: packages/service/src/preview/cli/previewServerStatus/previewServerHeader.tsx
  function PreviewServerHeader (line 4) | function PreviewServerHeader() {

FILE: packages/service/src/preview/cli/previewServerStatus/previewServerRow.tsx
  type PreviewServerRowProps (line 5) | type PreviewServerRowProps = {
  function stringifyIncludedEnvs (line 10) | function stringifyIncludedEnvs(includedEnvs: string[] = [], verbose = fa...
  function PreviewServerRow (line 15) | function PreviewServerRow({ previewServer, verbose }: PreviewServerRowPr...

FILE: packages/service/src/preview/cli/previewServerStatus/previewServerStatus.tsx
  constant IGNORE_WARNINGS (line 10) | const IGNORE_WARNINGS = [
  type PreviewServerStatusProps (line 20) | type PreviewServerStatusProps = {
  function PreviewServerStatus (line 25) | function PreviewServerStatus({

FILE: packages/service/src/preview/cli/previewServerStatus/webpackError.tsx
  type ErrorLevel (line 4) | enum ErrorLevel {
  type ErrorProps (line 11) | type ErrorProps = {
  function Error (line 16) | function Error({ errors, level }: ErrorProps) {

FILE: packages/service/src/preview/exceptions/bundlingStrategyNotFoundError.ts
  class BundlingStrategyNotFoundError (line 1) | class BundlingStrategyNotFoundError extends Error {
    method constructor (line 2) | constructor(strategyName: string) {

FILE: packages/service/src/preview/exceptions/previewNotFoundError.ts
  class PreviewNotFoundError (line 1) | class PreviewNotFoundError extends Error {
    method constructor (line 2) | constructor(name: string | null) {

FILE: packages/service/src/preview/exceptions/previewOutputFileNotFoundError.ts
  class PreviewOutputFileNotFoundError (line 3) | class PreviewOutputFileNotFoundError extends ArcoError {
    method constructor (line 4) | constructor(componentId: string, filePath: string) {

FILE: packages/service/src/preview/executionRef.ts
  class ExecutionRef (line 4) | class ExecutionRef {
    method constructor (line 5) | constructor(public executionCtx: ExecutionContext) {
    method add (line 11) | add(added: Component) {
    method remove (line 15) | remove(removed: string) {
    method update (line 19) | update(next: Component) {
    method get (line 23) | get(id: string) {

FILE: packages/service/src/preview/generateLink.ts
  type GenerateLinkOptions (line 4) | type GenerateLinkOptions = {
  function generateLink (line 11) | function generateLink({
  function moduleVarName (line 82) | function moduleVarName(componentIdx: number, fileIdx: number) {

FILE: packages/service/src/preview/preview.aspect.ts
  constant PREVIEW_ASPECT_ID (line 3) | const PREVIEW_ASPECT_ID = 'arco.service/preview';

FILE: packages/service/src/preview/preview.main.runtime.ts
  constant DEFAULT_CACHE_DIR (line 28) | const DEFAULT_CACHE_DIR = join(DIR_CACHE_ROOT, PreviewAspect.id);
  constant NOOP_RESULT (line 30) | const NOOP_RESULT = {
  type PreviewStrategyName (line 35) | type PreviewStrategyName = 'env' | 'component';
  type EnvPreviewConfig (line 37) | type EnvPreviewConfig = {
  type PreviewConfig (line 42) | type PreviewConfig = {
  type ComponentPreviewSizedFile (line 53) | type ComponentPreviewSizedFile = Asset;
  type ComponentPreviewSize (line 55) | type ComponentPreviewSize = {
  type ComponentPreviewMetaData (line 66) | type ComponentPreviewMetaData = {
  type PreviewDefinitionSlot (line 70) | type PreviewDefinitionSlot = SlotRegistry<PreviewDefinition>;
  class PreviewMain (line 72) | class PreviewMain {
    method provider (line 87) | static provider(
    method constructor (line 124) | constructor(
    method cacheDir (line 133) | get cacheDir(): string {
    method getUi (line 143) | private getUi() {
    method getPreviewTarget (line 149) | private async getPreviewTarget(
    method getDefaultStrategies (line 165) | private getDefaultStrategies() {
    method resolveAspects (line 169) | private async resolveAspects(runtimeName?: string): Promise<AspectDefi...
    method updateLinkFiles (line 176) | private updateLinkFiles(context: ExecutionContext, components: Compone...
    method handleComponentChange (line 217) | private async handleComponentChange(
    method getDefs (line 239) | getDefs(): PreviewDefinition[] {
    method getEnvPreviewConfig (line 243) | getEnvPreviewConfig(env?: PreviewEnv): EnvPreviewConfig {
    method getBundlingStrategy (line 247) | getBundlingStrategy(env?: PreviewEnv): BundlingStrategy {
    method registerDefinition (line 262) | registerDefinition(previewDef: PreviewDefinition) {
    method writePreviewRuntime (line 266) | async writePreviewRuntime() {
    method writeBuildEntry (line 278) | writeBuildEntry(contents: string, targetDir: string, prefix: string) {

FILE: packages/service/src/preview/preview.startPlugin.tsx
  type CompilationServers (line 14) | type CompilationServers = Record<string, CompilationResult>;
  type ServersSetter (line 15) | type ServersSetter = Dispatch<SetStateAction<CompilationServers>>;
  class PreviewStartPlugin (line 17) | class PreviewStartPlugin implements StartPlugin {
    method constructor (line 18) | constructor(
    method listenToDevServers (line 41) | private listenToDevServers() {
    method whenReady (line 59) | get whenReady(): Promise<void> {
    method initiate (line 63) | async initiate(options: StartPluginOptions) {
    method getProxy (line 83) | getProxy(): ProxyEntry[] {

FILE: packages/service/src/preview/preview.task.ts
  class PreviewTask (line 11) | class PreviewTask implements BuildTask {
    method constructor (line 12) | constructor(private preview: PreviewMain) {}
    method execute (line 20) | async execute(context: BuildContext): Promise<BuildTaskResult> {
    method getPreviewDirectory (line 51) | getPreviewDirectory(context: ExecutionContext) {

FILE: packages/service/src/preview/previewRuntime/preview.preview.runtime.tsx
  type PreviewSlot (line 17) | type PreviewSlot = SlotRegistry<PreviewType>;
  class PreviewPreview (line 19) | class PreviewPreview {
    method provider (line 26) | static provider(
    method constructor (line 35) | constructor(
    method getParam (line 40) | private getParam(query: string, param: string) {
    method getQuery (line 45) | private getQuery() {
    method getLocation (line 51) | private getLocation() {
    method getDefault (line 61) | private getDefault() {
    method getPreview (line 67) | private getPreview(previewName: string): undefined | PreviewType {
    method getPreviewModule (line 72) | private async getPreviewModule(previewName: string): Promise<PreviewMo...
    method getRenderingContext (line 78) | private getRenderingContext() {
    method registerPreview (line 82) | registerPreview(preview: PreviewType) {
    method registerRenderContext (line 87) | registerRenderContext(renderContext: RenderingContextProvider) {
    method setViewport (line 92) | setViewport() {
    method render (line 102) | async render() {

FILE: packages/service/src/preview/previewRuntime/previewModules.tsx
  type ModuleId (line 3) | type ModuleId = string;
  class PreviewModules (line 5) | class PreviewModules extends Map<ModuleId, PreviewModule> {
    method set (line 8) | override set(id: ModuleId, preview: PreviewModule) {
    method loadComponentPreviews (line 14) | loadComponentPreviews(compId: string, previews: Record<string, ModuleI...
  constant PREVIEW_MODULES (line 24) | const PREVIEW_MODULES = new PreviewModules();
  function linkModules (line 26) | function linkModules(previewName: string, previewModule: PreviewModule) {

FILE: packages/service/src/preview/strategies/componentStrategy.ts
  constant COMPONENT_STRATEGY_SIZE_KEY_NAME (line 26) | const COMPONENT_STRATEGY_SIZE_KEY_NAME = 'size';
  constant COMPONENT_STRATEGY_ARTIFACT_NAME (line 27) | const COMPONENT_STRATEGY_ARTIFACT_NAME = 'preview-component';
  type ComponentEntry (line 29) | type ComponentEntry = {
  class ComponentBundlingStrategy (line 37) | class ComponentBundlingStrategy implements BundlingStrategy {
    method constructor (line 42) | constructor(private preview: PreviewMain) {}
    method computeTargets (line 44) | async computeTargets(
    method computeResults (line 78) | async computeResults(context: BundlerContext, results: BundlerResult[]) {
    method computeComponentEntry (line 97) | private async computeComponentEntry(
    method getCacheDir (line 132) | private getCacheDir(context: ComputeTargetsContext) {
    method getOutputPath (line 138) | private getOutputPath(context: ComputeTargetsContext) {
    method getAssetAbsolutePath (line 142) | private getAssetAbsolutePath(context: BundlerContext, asset: Asset): s...
    method getAssetFilename (line 147) | private getAssetFilename(asset: Asset): string {
    method copyAssetsToArtifacts (line 153) | private async copyAssetsToArtifacts(context: BundlerContext, result: B...
    method findAssetsForComponent (line 185) | private findAssetsForComponent(
    method computeComponentMetadata (line 225) | private computeComponentMetadata(
    method computeTargetResult (line 274) | private async computeTargetResult(context: BundlerContext, result: Bun...
    method computePaths (line 295) | private async computePaths(

FILE: packages/service/src/preview/strategies/generatePreviewBundleEntry.ts
  type ModuleVar (line 3) | type ModuleVar = {
  function generatePreviewBundleEntry (line 11) | function generatePreviewBundleEntry(modules: ModuleVar[]): string {

FILE: packages/service/src/preview/strategies/strategiesNames.ts
  constant ENV_PREVIEW_STRATEGY_NAME (line 1) | const ENV_PREVIEW_STRATEGY_NAME = 'env';
  constant COMPONENT_PREVIEW_STRATEGY_NAME (line 2) | const COMPONENT_PREVIEW_STRATEGY_NAME = 'component';

FILE: packages/service/src/preview/types/previewDefinition.ts
  type PreviewDefinition (line 5) | interface PreviewDefinition {

FILE: packages/service/src/preview/types/previewModule.ts
  type ModuleImportFunction (line 4) | type ModuleImportFunction<T = any> = () => Promise<Record<string, T>>;
  type PreviewModule (line 9) | type PreviewModule<T = any> = {

FILE: packages/service/src/preview/types/previewType.ts
  type PreviewType (line 4) | interface PreviewType {

FILE: packages/service/src/preview/types/renderingContext.ts
  type RenderingContextOptions (line 3) | type RenderingContextOptions = { aspectsFilter?: string[] };
  type RenderingContextProvider (line 5) | type RenderingContextProvider = (options: RenderingContextOptions) => { ...
  type RenderingContextSlot (line 7) | type RenderingContextSlot = SlotRegistry<RenderingContextProvider>;
  class RenderingContext (line 9) | class RenderingContext {
    method constructor (line 10) | constructor(
    method get (line 18) | get(aspectId: string) {

FILE: packages/service/src/preview/uiRuntime/componentPreview.tsx
  type ComponentPreviewProps (line 10) | interface ComponentPreviewProps

FILE: packages/service/src/preview/uiRuntime/urls.ts
  function affix (line 6) | function affix(prefix = '', str = '', suffix = '') {
  function toPreviewHash (line 14) | function toPreviewHash(
  function toPreviewUrl (line 39) | function toPreviewUrl(

FILE: packages/service/src/preview/webpackEventsListener.ts
  type CompilationResult (line 8) | type CompilationResult = {
  type Handlers (line 14) | type Handlers = {
  function SubscribeToWebpackEvents (line 28) | function SubscribeToWebpackEvents(pubsub: PubsubMain, handlers: Handlers...

FILE: packages/service/src/syncer/sync.cmd.ts
  type SyncOptions (line 13) | type SyncOptions = {
  class SyncCmd (line 18) | class SyncCmd implements Command {
    method constructor (line 38) | constructor(private logger: Logger, private syncer: SyncerMain, privat...
    method report (line 40) | async report(

FILE: packages/service/src/syncer/syncer.main.runtime.ts
  type SyncerConfig (line 29) | type SyncerConfig = {
  class SyncerMain (line 37) | class SyncerMain {
    method provider (line 42) | static provider(
    method constructor (line 52) | constructor(
    method getCacheDir (line 61) | private getCacheDir() {
    method getTempDirToUpload (line 65) | private getTempDirToUpload(component: Component) {
    method copyIfNotExist (line 69) | private async copyIfNotExist(src: string, dest: string) {
    method extendSyncParamsWithDefaultMaterialMeta (line 77) | private extendSyncParamsWithDefaultMaterialMeta(params: SyncParams) {
    method preparePackageFilesToUpload (line 85) | private async preparePackageFilesToUpload(component: Component) {
    method uploadPackageFiles (line 133) | private async uploadPackageFiles(components: Component[], parallelTask...
    method sync (line 211) | async sync({

FILE: packages/service/src/syncer/type/syncParams.ts
  type SyncParams (line 1) | type SyncParams = {

FILE: packages/service/src/tester/test.cmd.tsx
  type TestFlags (line 11) | type TestFlags = Pick<TesterOptions, 'watch' | 'rawTesterArgs'>;
  class TestCmd (line 13) | class TestCmd implements Command {
    method constructor (line 33) | constructor(private tester: TesterMain, private logger: Logger, privat...
    method inkRender (line 35) | inkRender(element: ReactElement) {
    method render (line 39) | async render([pattern]: [string], { watch, rawTesterArgs }: TestFlags) {

FILE: packages/service/src/tester/tester.main.runtime.ts
  class TesterMain (line 11) | class TesterMain {
    method provider (line 18) | static provider([cli, envs, loggerMain, workspace]: [CLIMain, EnvsMain...
    method constructor (line 26) | constructor(private envs: EnvsMain, private service: TesterService) {}
    method getOptions (line 28) | private getOptions(options?: TesterOptions): TesterOptions {
    method test (line 36) | async test(components: Component[], opts?: TesterOptions): Promise<Env...

FILE: packages/service/src/tester/tester.service.tsx
  type TesterDescriptor (line 9) | type TesterDescriptor = {
  class TesterService (line 28) | class TesterService implements EnvService<Tests, TesterDescriptor> {
    method constructor (line 31) | constructor(private logger: Logger, private workspace: Workspace) {}
    method getDescriptor (line 33) | getDescriptor(environment: EnvDefinition) {
    method run (line 44) | async run(context: ExecutionContext, options: TesterOptions) {

FILE: packages/service/src/tester/tester.ts
  class Tests (line 4) | class Tests {
    method constructor (line 5) | constructor(public componentResults: ComponentResult[]) {}
    method errors (line 7) | get errors(): Array<string | Error> {
  type TesterOptions (line 12) | interface TesterOptions {
  type TesterContext (line 29) | interface TesterContext extends ExecutionContext, TesterOptions {
  type Tester (line 39) | interface Tester {

FILE: packages/service/src/ui/cli/time.tsx
  type TimeProps (line 4) | type TimeProps = {
  function Time (line 11) | function Time(props: TimeProps) {

FILE: packages/service/src/ui/cli/uiServerConsole.tsx
  type UIServerConsoleProps (line 6) | type UIServerConsoleProps = {
  function UIServerConsole (line 23) | function UIServerConsole({ appName, futureUiServer, url }: UIServerConso...

FILE: packages/service/src/ui/cli/uiServerLoader.tsx
  type UIServerLoaderProps (line 5) | type UIServerLoaderProps = {
  function UIServerLoader (line 12) | function UIServerLoader({ name }: UIServerLoaderProps) {

FILE: packages/service/src/ui/createRoot.ts
  type CreateRootOptions (line 7) | type CreateRootOptions = {
  function createRoot (line 15) | async function createRoot({
  function createImports (line 58) | function createImports(aspectDefs: AspectDefinition[]) {
  function getImportStatements (line 66) | function getImportStatements(
  function getIdentifiers (line 81) | function getIdentifiers(aspectDefs: AspectDefinition[], suffix: string):...
  function getIdSetters (line 85) | function getIdSetters(defs: AspectDefinition[], suffix: string) {
  function getIdentifier (line 91) | function getIdentifier(aspectDef: AspectDefinition, suffix: string): str...
  function getRegularAspectIdentifier (line 98) | function getRegularAspectIdentifier(aspectDef: AspectDefinition, suffix:...
  function getCoreIdentifier (line 104) | function getCoreIdentifier(path: string, suffix: string): string {

FILE: packages/service/src/ui/exceptions/unknownUIError.ts
  class UnknownUIError (line 1) | class UnknownUIError extends Error {
    method constructor (line 2) | constructor(readonly uiRoot: string = '', readonly available?: string[...
    method toString (line 6) | toString() {

FILE: packages/service/src/ui/start.cmd.tsx
  type StartFlags (line 10) | type StartFlags = {
  class StartCmd (line 15) | class StartCmd implements Command {
    method constructor (line 28) | constructor(
    method inkRender (line 37) | inkRender(element: ReactElement) {
    method render (line 41) | async render([pattern]: [string], { port }: StartFlags): Promise<React...

FILE: packages/service/src/ui/startPlugin.ts
  type StartPluginOptions (line 4) | type StartPluginOptions = {
  type StartPlugin (line 16) | interface StartPlugin {

FILE: packages/service/src/ui/ui.main.runtime.ts
  type UIDeps (line 19) | type UIDeps = [GraphqlMain, ExpressMain, CLIMain, LoggerMain];
  type UIRootSlot (line 21) | type UIRootSlot = SlotRegistry<UIRoot>;
  type StartPluginSlot (line 23) | type StartPluginSlot = SlotRegistry<StartPlugin>;
  type UIConfig (line 25) | type UIConfig = {
  type RuntimeOptions (line 53) | type RuntimeOptions = {
  class UIMain (line 75) | class UIMain {
    method provider (line 82) | static provider(
    method constructor (line 94) | constructor(
    method publicUrl (line 104) | get publicUrl() {
    method addSignalListener (line 108) | private addSignalListener() {
    method initiateStartPlugins (line 118) | private async initiateStartPlugins(options: StartPluginOptions) {
    method registerUiRoot (line 124) | registerUiRoot(uiRoot: UIRoot) {
    method registerStartPlugin (line 128) | registerStartPlugin(startPlugin: StartPlugin) {
    method getUi (line 133) | getUi(uiRootName?: string): [string, UIRoot] | undefined {
    method generateRoot (line 142) | async generateRoot({
    method createRuntime (line 164) | async createRuntime({ port, uiRootName, verbose, pattern }: RuntimeOpt...

FILE: packages/service/src/ui/uiRoot.ts
  type ProxyEntry (line 4) | type ProxyEntry = ProxyConfigArrayItem & {
  type UIRoot (line 8) | interface UIRoot {

FILE: packages/service/src/ui/uiRuntime/ui.ui.runtime.tsx
  type UIRootSlot (line 10) | type UIRootSlot = SlotRegistry<UIRootFactory>;
  constant MOUNT_ROOT_ID (line 12) | const MOUNT_ROOT_ID = 'root';
  class UIUI (line 14) | class UIUI {
    method provider (line 21) | static provider([router]: [ReactRouterUI], _config, [uiRootSlot]: [UIR...
    method constructor (line 25) | constructor(private router: ReactRouterUI, private uiRootSlot: UIRootS...
    method getRoot (line 27) | private getRoot(rootExtension: string) {
    method registerRoot (line 31) | registerRoot(uiRoot: UIRootFactory) {
    method render (line 35) | render(rootExtension: string) {

FILE: packages/service/src/ui/uiRuntime/uiRoot.ui.ts
  type UIRootUI (line 4) | type UIRootUI = {
  type UIRootFactory (line 8) | type UIRootFactory = () => UIRootUI;

FILE: packages/service/src/ui/uiServer.ts
  type StartOptions (line 17) | type StartOptions = {
  type UIServerProps (line 24) | type UIServerProps = {
  class UIServer (line 34) | class UIServer {
    method create (line 37) | static create({
    method constructor (line 49) | constructor(
    method getName (line 59) | getName() {
    method whenReady (line 63) | get whenReady() {
    method port (line 67) | get port() {
    method host (line 71) | get host() {
    method fullUrl (line 75) | get fullUrl() {
    method buildOptions (line 80) | get buildOptions() {
    method selectPort (line 90) | private async selectPort(portRange?: number[] | number) {
    method getProxyFromPlugins (line 94) | private async getProxyFromPlugins(): Promise<ProxyEntry[]> {
    method getProxy (line 102) | private async getProxy(port = 4000): Promise<ProxyEntry[]> {
    method configureProxy (line 114) | private async configureProxy(app: Express, server: Server) {
    method getDevConfig (line 136) | private async getDevConfig() {
    method getDevServerConfig (line 145) | private async getDevServerConfig(
    method getPluginsComponents (line 154) | getPluginsComponents() {
    method start (line 158) | async start({ portRange }: StartOptions = {}) {
    method dev (line 170) | async dev({ portRange }: StartOptions) {

FILE: packages/service/src/ui/webpack/html.ts
  function html (line 2) | function html(title: string, withDevTools?: boolean) {

FILE: packages/service/src/ui/webpack/webpack.dev.config.ts
  function devConfig (line 40) | function devConfig(

FILE: packages/stone/src/aspect/aspect.ts
  class Aspect (line 5) | class Aspect {
    method constructor (line 6) | constructor(
    method addRuntime (line 17) | addRuntime(runtimeManifest: RuntimeManifest) {
    method getRuntime (line 22) | getRuntime(runtimeDef: RuntimeDefinition): undefined | RuntimeManifest {
    method getRuntimes (line 29) | getRuntimes(): RuntimeManifest[] {
    method create (line 33) | static create(manifest: AspectManifest) {

FILE: packages/stone/src/aspect/aspectManifest.ts
  type AspectManifest (line 5) | type AspectManifest = {

FILE: packages/stone/src/config/config.ts
  class Config (line 1) | class Config {
    method constructor (line 2) | constructor(readonly raw: Map<string, object>) {}
    method toObject (line 4) | toObject() {
    method set (line 11) | set(id: string, config: object) {
    method get (line 15) | get(id: string) {
    method from (line 19) | static from(raw: { [key: string]: object }) {

FILE: packages/stone/src/exception/extensionInitError.ts
  class ExtensionInitError (line 1) | class ExtensionInitError extends Error {}

FILE: packages/stone/src/exception/extensionLoadError.ts
  class ExtensionLoadError (line 3) | class ExtensionLoadError extends Error {
    method constructor (line 4) | constructor(
    method toString (line 23) | toString() {

FILE: packages/stone/src/exception/extensionPotentialCircularError.ts
  class ExtensionPotentialCircularError (line 3) | class ExtensionPotentialCircularError extends Error {
    method constructor (line 4) | constructor(public extension: Extension, public validDeps: Extension[]) {
    method toString (line 8) | toString() {

FILE: packages/stone/src/exception/readConfigError.ts
  class ReadConfigError (line 1) | class ReadConfigError extends Error {
    method constructor (line 2) | constructor(path: string, private err: Error) {
    method stack (line 6) | get stack() {

FILE: packages/stone/src/exception/runtimeModuleError.ts
  class RuntimeModuleError (line 1) | class RuntimeModuleError extends Error {
    method constructor (line 2) | constructor(private err: Error) {
    method stack (line 6) | get stack() {

FILE: packages/stone/src/exception/runtimeNotDefinedError.ts
  class RuntimeNotDefinedError (line 1) | class RuntimeNotDefinedError extends Error {
    method constructor (line 2) | constructor(name: string) {

FILE: packages/stone/src/extension/extension.ts
  class Extension (line 6) | class Extension {
    method from (line 7) | static from(manifest: ExtensionManifest) {
    method constructor (line 11) | constructor(readonly manifest: ExtensionManifest) {}
    method instance (line 17) | get instance() {
    method name (line 21) | get name() {
    method id (line 25) | get id() {
    method dependencies (line 29) | get dependencies(): ExtensionManifest[] {
    method provider (line 33) | get provider() {
    method files (line 37) | get files() {
    method loaded (line 45) | get loaded() {
    method declareRuntime (line 49) | get declareRuntime() {
    method toString (line 53) | toString(): string {
    method buildSlotRegistries (line 57) | private buildSlotRegistries(slots: ((registerFn: () => void) => any)[]...
    method getRuntime (line 65) | getRuntime(runtime: RuntimeDefinition) {
    method getRuntimes (line 69) | getRuntimes() {
    method getSlots (line 73) | getSlots(extensionRuntime: any) {
    method getConfig (line 81) | getConfig(context: Stone, extensionRuntime: any) {
    method __run (line 87) | async __run(dependencies: any[], context: Stone, runtime: RuntimeDefin...

FILE: packages/stone/src/extension/extensionManifest.ts
  type ExtensionManifest (line 4) | type ExtensionManifest = {

FILE: packages/stone/src/extensionGraph/extensionGraph.ts
  type Edge (line 7) | type Edge = {
  class ExtensionGraph (line 12) | class ExtensionGraph extends Graph<Extension, Edge> {
    method getRuntimeDependencies (line 15) | getRuntimeDependencies(aspect: Extension, runtime: RuntimeDefinition):...
    method sortDeps (line 29) | private sortDeps(originalDependencies: any[], targetDependencies: any[...
    method byExecutionOrder (line 38) | byExecutionOrder() {
    method enrichRuntimeExtension (line 42) | private async enrichRuntimeExtension(
    method enrichRuntime (line 74) | async enrichRuntime(runtime: RuntimeDefinition, runtimes: Runtimes, re...
    method add (line 82) | add(manifest: ExtensionManifest) {
    method load (line 90) | load(extensions: ExtensionManifest[]) {
    method getExtension (line 105) | getExtension(manifest: ExtensionManifest): Extension {
    method extensions (line 119) | get extensions(): ExtensionManifest[] {
    method aspects (line 123) | get aspects() {
    method get (line 127) | get(id: string): Extension {
    method fromRoot (line 143) | static fromRoot(extension: ExtensionManifest) {
    method from (line 151) | static from(extensions: ExtensionManifest[]) {

FILE: packages/stone/src/extensionGraph/fromExtension.ts
  function fromExtension (line 8) | function fromExtension(extension: ExtensionManifest) {
  function fromExtensions (line 53) | function fromExtensions(extensions: ExtensionManifest[]) {

FILE: packages/stone/src/runtimes/runtimeDefinition.ts
  type RuntimeDefProps (line 1) | type RuntimeDefProps = {
  class RuntimeDefinition (line 9) | class RuntimeDefinition {
    method constructor (line 10) | constructor(
    method getRuntimeFile (line 15) | getRuntimeFile(paths: string[]): string | undefined {
    method require (line 19) | require(_file: string) {
    method create (line 27) | static create(def: RuntimeDefProps) {

FILE: packages/stone/src/runtimes/runtimeManifest.ts
  type RuntimeManifest (line 6) | interface RuntimeManifest {

FILE: packages/stone/src/runtimes/runtimes.ts
  class Runtimes (line 5) | class Runtimes {
    method constructor (line 6) | constructor(readonly runtimeDefinition: { [key: string]: RuntimeDefini...
    method add (line 8) | add(runtime: RuntimeDefinition) {
    method get (line 13) | get(name: string): RuntimeDefinition {
    method load (line 19) | static async load(graph: ExtensionGraph) {

FILE: packages/stone/src/slot/registry.ts
  class SlotRegistry (line 1) | class SlotRegistry<T> {
    method constructor (line 2) | constructor(private registerFn: () => string, readonly map = new Map<s...
    method get (line 4) | get(id: string): T | undefined {
    method toArray (line 8) | toArray() {
    method values (line 12) | values() {
    method register (line 16) | register(value: T) {

FILE: packages/stone/src/slot/slot.ts
  class Slot (line 3) | class Slot {
    method withType (line 4) | static withType<T>() {
  type SlotProvider (line 11) | type SlotProvider<T> = (registerFn: () => string) => SlotRegistry<T>;

FILE: packages/stone/src/stone.ts
  type GlobalConfig (line 9) | type GlobalConfig = {
  type RequireFn (line 13) | type RequireFn = (aspect: Extension, runtime: RuntimeDefinition) => Prom...
  class Stone (line 15) | class Stone {
    method constructor (line 16) | constructor(
    method extensions (line 30) | get extensions() {
    method extensionsIds (line 34) | get extensionsIds() {
    method runOne (line 38) | private async runOne(extension: Extension, runtime: RuntimeDefinition) {
    method getDependencies (line 51) | getDependencies(aspect: Extension) {
    method initExtension (line 56) | initExtension(id: string) {
    method endExtension (line 60) | endExtension() {
    method get (line 67) | get<T>(id: string): T {
    method resolveRuntime (line 73) | resolveRuntime(name: string): RuntimeDefinition {
    method load (line 80) | async load(extensions: ExtensionManifest[]) {
    method run (line 99) | async run(requireFn?: RequireFn) {
    method load (line 115) | static async load(aspects: Aspect[], runtime: string, globalConfig: Gl...

FILE: packages/stone/src/stoneConfig/configReader.ts
  function readConfigFile (line 6) | function readConfigFile(filePath: string, mustExist = true) {

FILE: packages/stone/src/stoneConfig/stoneConfig.ts
  type GlobalConfigOpts (line 6) | type GlobalConfigOpts = {
  type ConfigOptions (line 11) | type ConfigOptions = {
  class StoneConfig (line 22) | class StoneConfig {
    method constructor (line 23) | constructor(private raw: Record<string, any>) {}
    method toObject (line 25) | toObject() {
    method toString (line 29) | toString() {
    method load (line 33) | static load(fileName: string, opts?: ConfigOptions) {
    method loadGlobal (line 44) | static loadGlobal(globalOpts: GlobalConfigOpts, config: any = {}) {

FILE: packages/stone/src/types.ts
  type ProviderFn (line 6) | type ProviderFn = (deps: any, config: any, slots: any, stone: Stone) => ...

FILE: packages/stone/src/utils/asyncForEach.ts
  function asyncForEach (line 1) | async function asyncForEach(array: any[], callback: any) {

FILE: packages/ui-foundation-react/src/baseUI/grid/grid.tsx
  type ColCount (line 16) | type ColCount = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
  type GridProps (line 18) | interface GridProps extends Omit<React.HTMLAttributes<HTMLDivElement>, '...
  class Grid (line 54) | class Grid extends PureComponent<GridProps> {
    method render (line 55) | render() {

FILE: packages/ui-foundation-react/src/baseUI/grid/gridTemplate/index.ts
  type ColumnPreset (line 3) | type ColumnPreset = {
  function makePreset (line 18) | function makePreset(breakPoints: string): ColumnPreset {

FILE: packages/ui-foundation-react/src/baseUI/table/table.tsx
  type TableProps (line 10) | interface TableProps extends Omit<React.HTMLAttributes<HTMLDivElement>, ...
  function Table (line 33) | function Table({

FILE: packages/ui-foundation-react/src/baseUI/table/tableColumn.tsx
  type TableColumnProps (line 7) | interface TableColumnProps extends Omit<React.HTMLAttributes<HTMLDivElem...
  function TableColumn (line 15) | function TableColumn({ children, className, ...rest }: TableColumnProps) {

FILE: packages/ui-foundation-react/src/baseUI/table/tableHeadingColumn.tsx
  type TableHeadingColumnProps (line 7) | interface TableHeadingColumnProps
  function HeadingColumn (line 15) | function HeadingColumn({ children, className, ...rest }: TableHeadingCol...

FILE: packages/ui-foundation-react/src/baseUI/table/tableHeadingRow.tsx
  type HeadingRowProps (line 9) | type HeadingRowProps = {
  function HeadingRow (line 24) | function HeadingRow({

FILE: packages/ui-foundation-react/src/baseUI/table/tableRow.tsx
  type RowType (line 12) | type RowType = {
  type CustomRowType (line 22) | type CustomRowType = {
  type TableRowProps (line 27) | type TableRowProps = {
  function TableRow (line 46) | function TableRow({ row, colNumber = 4, headings, className, ...rest }: ...

FILE: packages/ui-foundation-react/src/constants.ts
  constant BASE_WEB_DOMAIN (line 4) | const BASE_WEB_DOMAIN = 'arco.design';
  constant BASE_DOCS_DOMAIN (line 6) | const BASE_DOCS_DOMAIN = `${BASE_WEB_DOMAIN}/material`;
  constant CLASSNAME_MARKDOWN_CONTENT (line 11) | const CLASSNAME_MARKDOWN_CONTENT = 'a-md-content';
  constant LOCAL_STORAGE_KEY_WORKSPACE_DARK_MODE (line 16) | const LOCAL_STORAGE_KEY_WORKSPACE_DARK_MODE = 'arco_workspace_dark_mode';
  type VALID_MESSAGE_TYPE_FROM_PARENT_WINDOW (line 21) | enum VALID_MESSAGE_TYPE_FROM_PARENT_WINDOW {

FILE: packages/ui-foundation-react/src/globalLoader/loaderContext.tsx
  type LoaderApi (line 4) | type LoaderApi = {

FILE: packages/ui-foundation-react/src/globalLoader/useLoader.ts
  function useLoader (line 7) | function useLoader(loading: boolean) {

FILE: packages/ui-foundation-react/src/globalLoader/useLoaderApi.ts
  function useLoaderApi (line 5) | function useLoaderApi(): [LoaderApi, boolean] {

FILE: packages/ui-foundation-react/src/hooks/useDataQuery.ts
  function useDataQuery (line 13) | function useDataQuery<TData = any, TVariables = OperationVariables>(

FILE: packages/ui-foundation-react/src/markdown/components/anchor/anchor.tsx
  function Anchor (line 7) | function Anchor({

FILE: packages/ui-foundation-react/src/markdown/components/demoView/demoView.tsx
  type DemoViewProps (line 7) | interface DemoViewProps {
  function decodeRawCode (line 12) | function decodeRawCode(uint8ArrayStr) {
  function DemoView (line 17) | function DemoView({ children, code, language }: PropsWithChildren<DemoVi...

FILE: packages/ui-foundation-react/src/markdown/components/docAnchor/docAnchor.tsx
  function DocAnchor (line 10) | function DocAnchor() {

FILE: packages/ui-foundation-react/src/markdown/components/heading/heading.tsx
  type HeadingProps (line 5) | interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
  function Heading (line 9) | function Heading({ children, depth, ...rest }: HeadingProps) {

FILE: packages/ui-foundation-react/src/markdown/components/heading/utils.ts
  function extractChildrenText (line 4) | function extractChildrenText(children: ReactNode, text = ''): string {
  function textToHTMLId (line 20) | function textToHTMLId(text: string): string {

FILE: packages/ui-foundation-react/src/markdown/components/index.tsx
  constant COMPONENT_NAME_DEMO_VIEW (line 11) | const COMPONENT_NAME_DEMO_VIEW = 'ArcoDemoView';
  constant COMPONENT_NAME_DOC_ANCHOR (line 13) | const COMPONENT_NAME_DOC_ANCHOR = 'ArcoDocAnchor';
  constant COMPONENT_NAME_TABS (line 15) | const COMPONENT_NAME_TABS = 'ArcoMDXPreviewSplit';
  constant DEFAULT_MDX_COMPONENTS (line 17) | const DEFAULT_MDX_COMPONENTS: MDXProviderComponents = {

FILE: packages/ui-foundation-react/src/markdown/components/snippet/codeSnippet.tsx
  type ArcoDemoContext (line 17) | type ArcoDemoContext = {
  type CodeSnippetProps (line 21) | type CodeSnippetProps = {
  function CodeSnippet (line 39) | function CodeSnippet({

FILE: packages/ui-foundation-react/src/markdown/components/snippet/index.tsx
  type SnippetProps (line 5) | type SnippetProps = {
  function Snippet (line 10) | function Snippet({ children, live }: SnippetProps) {

FILE: packages/ui-foundation-react/src/markdown/components/tabs/tabs.tsx
  type TabsProps (line 9) | interface TabsProps {
  function Tabs (line 13) | function Tabs({ panes = [] }: TabsProps) {

FILE: packages/ui-foundation-react/src/markdown/live/markdownLive.tsx
  constant MARKDOWN_BODY_CLASSNAME (line 12) | const MARKDOWN_BODY_CLASSNAME = 'markdown-body';
  type MarkdownLiveProps (line 14) | interface MarkdownLiveProps {
  function H1 (line 19) | function H1(props) {
  function H2 (line 22) | function H2(props) {
  function H3 (line 25) | function H3(props) {
  function H4 (line 28) | function H4(props) {
  function H5 (line 31) | function H5(props) {
  function H6 (line 34) | function H6(props) {
  function Code (line 37) | function Code(props: { children: ReactNode; inline?: boolean }) {
  function MarkdownLive (line 43) | function MarkdownLive(props: MarkdownLiveProps) {

FILE: packages/ui-foundation-react/src/markdown/mdxLayout/mdxLayout.tsx
  constant MARKDOWN_BODY_CLASSNAME (line 11) | const MARKDOWN_BODY_CLASSNAME = 'markdown-body';
  type MDXLayoutProps (line 15) | interface MDXLayoutProps extends React.HTMLAttributes<HTMLDivElement> {
  function MDXLayout (line 21) | function MDXLayout({ children, components, className, ...rest }: MDXLayo...

FILE: packages/ui-foundation-react/src/navbar/navbar.tsx
  type NavbarProps (line 15) | interface NavbarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'clas...
  function Navbar (line 25) | function Navbar({ menu = [], className, title }: NavbarProps) {

FILE: packages/ui-foundation-react/src/pages/contactFooter.tsx
  type ContactFooterProps (line 7) | type ContactFooterProps = HTMLAttributes<HTMLDivElement>;
  function ContactFooter (line 9) | function ContactFooter({ style, ...rest }: ContactFooterProps) {

FILE: packages/ui-foundation-react/src/pages/errorPage.tsx
  type ErrorPageProps (line 7) | type ErrorPageProps = {
  function ErrorPage (line 25) | function ErrorPage({ code, title, style, children, ...rest }: ErrorPageP...

FILE: packages/ui-foundation-react/src/pages/notFoundPage.tsx
  type NotFoundPageProps (line 6) | type NotFoundPageProps = React.HTMLAttributes<HTMLDivElement>;
  function NotFoundPage (line 8) | function NotFoundPage({ ...rest }: NotFoundPageProps) {

FILE: packages/ui-foundation-react/src/preview/SlotRegister.ts
  class SlotRegister (line 1) | class SlotRegister<T = any> {
    method constructor (line 2) | constructor(readonly map = new Map<string, T>()) {}
    method get (line 4) | get(id: string) {
    method toArray (line 8) | toArray() {
    method values (line 12) | values() {
    method unregister (line 16) | unregister(id: string) {
    method register (line 20) | register(cb: T) {

FILE: packages/ui-foundation-react/src/preview/app.tsx
  function App (line 20) | function App({ doc, metadata, docContextProvider }: DocsRootProps) {

FILE: packages/ui-foundation-react/src/preview/doc/content.tsx
  type DocsContentProps (line 9) | interface DocsContentProps {
  function ErrorFallback (line 13) | function ErrorFallback({ error }: { error: Error }) {
  function Content (line 22) | function Content({ doc }: DocsContentProps) {

FILE: packages/ui-foundation-react/src/preview/doc/propertiesTable.tsx
  type AnchorInfo (line 12) | type AnchorInfo = { depth: number; text: string };
  type PropertiesTableProps (line 14) | interface PropertiesTableProps {
  function PropertiesTable (line 19) | function PropertiesTable({ doclet, placeholderID }: PropertiesTableProps) {

FILE: packages/ui-foundation-react/src/preview/index.tsx
  constant MOUNT_ROOT_SELECTOR (line 13) | const MOUNT_ROOT_SELECTOR = '#root';

FILE: packages/ui-foundation-react/src/preview/previewContext/index.tsx
  constant GLOBAL_MAP_KEY (line 5) | const GLOBAL_MAP_KEY = '__ARCO_PREVIEW_GLOBAL_VARIABLES';
  type PreviewContextType (line 7) | type PreviewContextType = {
  function PreviewContextProvider (line 18) | function PreviewContextProvider(

FILE: packages/ui-foundation-react/src/preview/theme.tsx
  type ThemeProps (line 5) | interface ThemeProps {}
  function Theme (line 7) | function Theme(props: PropsWithChildren<ThemeProps>) {

FILE: packages/ui-foundation-react/src/sideBar/componentMenu/componentMenu.tsx
  type ComponentMenuProps (line 17) | interface ComponentMenuProps {
  function ComponentMenu (line 22) | function ComponentMenu({ componentId, onComponentChange }: ComponentMenu...

FILE: packages/ui-foundation-react/src/sideBar/sideBar.tsx
  type SideBarProps (line 8) | interface SideBarProps {
  function SideBar (line 13) | function SideBar({ className, componentMenuProps }: SideBarProps) {

FILE: packages/ui-foundation-react/src/workspaceContext/workspaceContext.tsx
  type WorkspaceContextType (line 11) | type WorkspaceContextType = {
  function WorkspaceContextProvider (line 27) | function WorkspaceContextProvider(

FILE: packages/ui-foundation-react/src/workspaceOverview/workspaceOverview.tsx
  constant AVAILABLE_AVATAR_COLORS (line 12) | const AVAILABLE_AVATAR_COLORS = ['#FF7D00', '#FADC19', '#9FDB1D', '#14C9...
  function WorkspaceOverview (line 14) | function WorkspaceOverview() {

FILE: ui/src/Overview/Overview.tsx
  type IFRAME_VALID_MESSAGE_TYPE (line 26) | const enum IFRAME_VALID_MESSAGE_TYPE {
  function getContainer (line 34) | function getContainer(targetContainer?: string | HTMLElement | Window) {
  function canAccessIFrame (line 41) | function canAccessIFrame(iframe: HTMLIFrameElement) {

FILE: ui/src/Overview/__docs__/basic.tsx
  function Basic (line 3) | function Basic() {

FILE: ui/src/Overview/interface.ts
  type OverviewProps (line 7) | interface OverviewProps {
  type OverviewHandle (line 86) | type OverviewHandle = {
  type PubsubMessageType (line 92) | type PubsubMessageType = {

FILE: ui/src/utils/constant.ts
  constant PUBSUB_TOPIC_PARENT_TO_CHILD (line 1) | const PUBSUB_TOPIC_PARENT_TO_CHILD = 'preview-host';
  constant PUBSUB_TOPIC_CHILD_TO_PARENT (line 3) | const PUBSUB_TOPIC_CHILD_TO_PARENT = 'preview';
  constant PREVIEW_IFRAME_GLOBAL_VARIABLES_KEY (line 5) | const PREVIEW_IFRAME_GLOBAL_VARIABLES_KEY = '__ARCO_PREVIEW_GLOBAL_VARIA...

FILE: ui/src/utils/findNode.ts
  function findNode (line 1) | function findNode(dom: HTMLElement | Document, selector: string): HTMLEl...

FILE: ui/src/utils/useConnectIframe.ts
  function useConnectIframe (line 6) | function useConnectIframe(refIframe: MutableRefObject<HTMLIFrameElement>) {
Condensed preview — 700 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (975K chars).
[
  {
    "path": ".eslintignore",
    "chars": 78,
    "preview": "**/node_modules/**\n**/dist/**\n*.json\n**/template/**\npackages/*/lib/*\nfixtures\n"
  },
  {
    "path": ".eslintrc.json",
    "chars": 2725,
    "preview": "{\n  \"extends\": [\"plugin:@typescript-eslint/recommended\", \"airbnb\", \"plugin:prettier/recommended\"],\n  \"env\": {\n    \"brows"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 645,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the b"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 595,
    "preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "chars": 1567,
    "preview": "<!--\n  Thanks so much for your PR and contribution.\n  \n  Before submitting, please make sure to follow the Pull Request "
  },
  {
    "path": ".gitignore",
    "chars": 1097,
    "preview": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n.npmrc\n\n# "
  },
  {
    "path": ".husky/pre-commit",
    "chars": 86,
    "preview": "#!/usr/bin/env sh\n. \"$(dirname -- \"$0\")/_/husky.sh\"\n\nnpm run eslint\nnpm run stylelint\n"
  },
  {
    "path": ".prettierrc.json",
    "chars": 211,
    "preview": "{\n  \"arrowParens\": \"always\",\n  \"jsxBracketSameLine\": false,\n  \"jsxSingleQuote\": false,\n  \"printWidth\": 100,\n  \"semi\": tr"
  },
  {
    "path": ".scripts/build-esm.sh",
    "chars": 331,
    "preview": "root=`git rev-parse --show-toplevel`\nbabel_config_path=\"${root}/babel.config.js\"\n\nbabel_options=\"\"\n\nif [[ $1 == dev ]]; "
  },
  {
    "path": ".scripts/build-type.sh",
    "chars": 59,
    "preview": "# disable this command for now\n# tsc --emitDeclarationOnly\n"
  },
  {
    "path": ".scripts/build.sh",
    "chars": 518,
    "preview": "root=`git rev-parse --show-toplevel`\nbabel_config_path=\"${root}/babel.config.js\"\n\nflag_no_source_maps=\"no-source-maps\"\nb"
  },
  {
    "path": ".scripts/flatPackages.js",
    "chars": 4919,
    "preview": "/* eslint-disable */\nconst path = require('path');\nconst fs = require('fs-extra');\nconst gulp = require('gulp');\nconst g"
  },
  {
    "path": ".scripts/getLocalPackages.js",
    "chars": 826,
    "preview": "/* eslint-disable */\nconst path = require('path');\nconst { exec } = require('child_process');\n\nconst DIR_PACKAGES = path"
  },
  {
    "path": ".scripts/linkLocalPackages.js",
    "chars": 1254,
    "preview": "/* eslint-disable */\nconst path = require('path');\nconst fs = require('fs-extra');\nconst chalk = require('chalk');\nconst"
  },
  {
    "path": ".scripts/linkTsPaths.js",
    "chars": 998,
    "preview": "/* eslint-disable */\nconst path = require('path');\nconst fs = require('fs-extra');\nconst chalk = require('chalk');\nconst"
  },
  {
    "path": ".stylelintignore",
    "chars": 30,
    "preview": "**/node_modules/**\n**/dist/**\n"
  },
  {
    "path": ".stylelintrc",
    "chars": 598,
    "preview": "{\n  \"extends\": \"stylelint-config-standard-scss\",\n  \"rules\": {\n    \"block-no-empty\": null,\n    \"block-opening-brace-space"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3347,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 2987,
    "preview": "\n> English | [简体中文](./CONTRIBUTING.zh-CN.md)\n# Contributing\n\nThank you for taking your time to contribute and make this "
  },
  {
    "path": "CONTRIBUTING.zh-CN.md",
    "chars": 1493,
    "preview": "\n> [English](./CONTRIBUTING.md) | 简体中文\n\n# 贡献指南\n\n感谢你的宝贵时间。你的贡献将使这个项目变得更好!在提交贡献之前,请务必花点时间阅读下面的入门指南。\n\n## 行为准则\n\n该项目有一份 [行为准则"
  },
  {
    "path": "LICENSE",
    "chars": 1091,
    "preview": "MIT License\n\nCopyright (c) 2021 Bytedance, Inc. and its affiliates.\n\nPermission is hereby granted, free of charge, to an"
  },
  {
    "path": "README.md",
    "chars": 188,
    "preview": "# Arco CLI\n\nA command-line interface tool for creating, developing and managing Arco materials.\n\n## How to start\n\n`npm r"
  },
  {
    "path": "babel.config.js",
    "chars": 1453,
    "preview": "// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst createResolvePath = require('babel-plugin-tsconfig-"
  },
  {
    "path": "jest.config.ts",
    "chars": 373,
    "preview": "import type { Config } from 'jest';\n\nconst config: Config = {\n  preset: 'ts-jest',\n  testEnvironment: 'node',\n  collectC"
  },
  {
    "path": "lerna.json",
    "chars": 112,
    "preview": "{\n  \"version\": \"independent\",\n  \"useWorkspaces\": true,\n  \"npmClient\": \"pnpm\",\n  \"ignoreChanges\": [\"**/ui/**\"]\n}\n"
  },
  {
    "path": "package.json",
    "chars": 2746,
    "preview": "{\n  \"name\": \"@arco-design/arco-cli\",\n  \"description\": \"Arco CLI & Arco Scripts\",\n  \"private\": true,\n  \"scripts\": {\n    \""
  },
  {
    "path": "packages/arco/bin/arco",
    "chars": 44,
    "preview": "#!/usr/bin/env node\nrequire('../dist/app');\n"
  },
  {
    "path": "packages/arco/package.json",
    "chars": 885,
    "preview": "{\n  \"name\": \"@arco-cli/arco\",\n  \"version\": \"2.4.5\",\n  \"description\": \"Main entry for arco cli\",\n  \"homepage\": \"https://g"
  },
  {
    "path": "packages/arco/src/app.ts",
    "chars": 693,
    "preview": "/* eslint-disable import/first */\nprocess.on('uncaughtException', (error) => {\n  console.error('uncaughtException', erro"
  },
  {
    "path": "packages/arco/src/arco.aspect.ts",
    "chars": 222,
    "preview": "import { Aspect } from '@arco-cli/stone';\nimport { CORE_ASPECT_ID_MAP } from '@arco-cli/legacy/dist/constants';\n\nexport "
  },
  {
    "path": "packages/arco/src/arco.main.runtime.ts",
    "chars": 264,
    "preview": "import { MainRuntime } from '@arco-cli/core/dist/cli';\n\nimport { manifestMap } from './manifest';\n\nconst manifests = Obj"
  },
  {
    "path": "packages/arco/src/index.ts",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "packages/arco/src/loadCli.ts",
    "chars": 2395,
    "preview": "import path from 'path';\nimport logger from '@arco-cli/legacy/dist/logger';\nimport { Stone, Extension, RuntimeDefinition"
  },
  {
    "path": "packages/arco/src/manifest.ts",
    "chars": 2698,
    "preview": "import { AspectLoaderAspect } from '@arco-cli/core/dist/aspect-loader';\nimport { LoggerAspect } from '@arco-cli/core/dis"
  },
  {
    "path": "packages/arco/src/types.ts",
    "chars": 557,
    "preview": "import type { WorkspaceConfig } from '@arco-cli/aspect/dist/workspace';\nimport type { CompilerAspectConfig } from '@arco"
  },
  {
    "path": "packages/arco/tsconfig.json",
    "chars": 653,
    "preview": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\"],\n  \"compilerOptions\": {\n    \"baseUrl\": \".\",\n    \"outDir\": \"di"
  },
  {
    "path": "packages/aspect/package.json",
    "chars": 2637,
    "preview": "{\n  \"name\": \"@arco-cli/aspect\",\n  \"version\": \"2.4.5\",\n  \"homepage\": \"https://github.com/arco-design/arco-cli\",\n  \"reposi"
  },
  {
    "path": "packages/aspect/src/bundler/browserRuntime.ts",
    "chars": 143,
    "preview": "import { ExecutionContext } from '@aspect/envs';\n\nexport type BrowserRuntime = {\n  entry: (context: ExecutionContext) =>"
  },
  {
    "path": "packages/aspect/src/bundler/bundler.aspect.ts",
    "chars": 152,
    "preview": "import { Aspect } from '@arco-cli/stone';\n\nexport const BundlerAspect = Aspect.create({\n  id: 'arco.aspect/bundler',\n});"
  },
  {
    "path": "packages/aspect/src/bundler/bundler.main.runtime.ts",
    "chars": 2276,
    "preview": "import { MainRuntime } from '@arco-cli/core/dist/cli';\nimport { Slot, SlotRegistry } from '@arco-cli/stone';\nimport { Gr"
  },
  {
    "path": "packages/aspect/src/bundler/bundler.ts",
    "chars": 1673,
    "preview": "import { Component } from '@aspect/component';\n\nexport type Asset = {\n  /**\n   * name of the asset.\n   */\n  name: string"
  },
  {
    "path": "packages/aspect/src/bundler/bundlerContext.ts",
    "chars": 4149,
    "preview": "import { BuildContext } from '@arco-cli/service/dist/builder';\n\nimport { Component } from '@aspect/component';\n\nexport t"
  },
  {
    "path": "packages/aspect/src/bundler/componentServer.ts",
    "chars": 1589,
    "preview": "import { AddressInfo } from 'net';\nimport { Port } from '@arco-cli/legacy/dist/utils/network/port';\nimport { ExecutionCo"
  },
  {
    "path": "packages/aspect/src/bundler/dedupEnvs.ts",
    "chars": 660,
    "preview": "import type { ExecutionContext } from '@aspect/envs';\n\ntype GroupIdContextMap = Record<string, ExecutionContext[]>;\n\n/**"
  },
  {
    "path": "packages/aspect/src/bundler/devServer.graphql.ts",
    "chars": 741,
    "preview": "import gql from 'graphql-tag';\n\nimport { Component } from '@aspect/component';\n\nimport { BundlerMain } from './bundler.m"
  },
  {
    "path": "packages/aspect/src/bundler/devServer.service.ts",
    "chars": 3204,
    "preview": "import { sep } from 'path';\nimport { flatten } from 'lodash';\n\nimport { EnvService, ExecutionContext, EnvDefinition } fr"
  },
  {
    "path": "packages/aspect/src/bundler/devServer.ts",
    "chars": 647,
    "preview": "import { Server } from 'http';\n\n/**\n * interface for implementing dev servers.\n */\nexport interface DevServer {\n  /**\n  "
  },
  {
    "path": "packages/aspect/src/bundler/devServerContext.ts",
    "chars": 409,
    "preview": "import { ExecutionContext } from '@aspect/envs';\n\nexport interface DevServerContext extends ExecutionContext {\n  /**\n   "
  },
  {
    "path": "packages/aspect/src/bundler/exceptions/bindError.ts",
    "chars": 40,
    "preview": "export class BindError extends Error {}\n"
  },
  {
    "path": "packages/aspect/src/bundler/exceptions/index.ts",
    "chars": 41,
    "preview": "export { BindError } from './bindError';\n"
  },
  {
    "path": "packages/aspect/src/bundler/getEntry.ts",
    "chars": 537,
    "preview": "import { ExecutionContext } from '@aspect/envs';\n\nimport { BrowserRuntimeSlot } from './bundler.main.runtime';\n\n/**\n * c"
  },
  {
    "path": "packages/aspect/src/bundler/index.ts",
    "chars": 675,
    "preview": "import { BundlerAspect } from './bundler.aspect';\n\nexport default BundlerAspect;\nexport { BundlerAspect };\nexport { DevS"
  },
  {
    "path": "packages/aspect/src/component/component.aspect.ts",
    "chars": 158,
    "preview": "import { Aspect } from '@arco-cli/stone';\n\nexport const ComponentAspect = Aspect.create({\n  id: 'arco.aspect/component',"
  },
  {
    "path": "packages/aspect/src/component/component.graphql.ts",
    "chars": 2231,
    "preview": "import gql from 'graphql-tag';\nimport type { Component } from './component';\nimport { ComponentMain } from './component."
  },
  {
    "path": "packages/aspect/src/component/component.main.runtime.ts",
    "chars": 1455,
    "preview": "import { Slot, SlotRegistry } from '@arco-cli/stone';\nimport { MainRuntime } from '@arco-cli/core/dist/cli';\nimport { Gr"
  },
  {
    "path": "packages/aspect/src/component/component.ts",
    "chars": 2783,
    "preview": "import fs from 'fs-extra';\nimport path from 'path';\nimport { SourceFile } from '@arco-cli/legacy/dist/workspace/componen"
  },
  {
    "path": "packages/aspect/src/component/componentFactory.ts",
    "chars": 1102,
    "preview": "import { AspectDefinition } from '@arco-cli/core/dist/aspect-loader';\nimport { Component } from './component';\n\nexport i"
  },
  {
    "path": "packages/aspect/src/component/componentMap.ts",
    "chars": 2866,
    "preview": "import { Component } from './component';\n\n/**\n * allows to index components -> values.\n */\nexport class ComponentMap<T> "
  },
  {
    "path": "packages/aspect/src/component/exceptions/hostNotFoundError.ts",
    "chars": 199,
    "preview": "export class HostNotFoundError extends Error {\n  constructor(private hostName: string) {\n    super();\n  }\n\n  toString() "
  },
  {
    "path": "packages/aspect/src/component/exceptions/index.ts",
    "chars": 173,
    "preview": "export { HostNotFoundError } from './hostNotFoundError';\nexport { InvalidNameError } from './invalidNameError';\nexport {"
  },
  {
    "path": "packages/aspect/src/component/exceptions/invalidNameError.ts",
    "chars": 294,
    "preview": "export class InvalidNameError extends Error {\n  componentName: string;\n\n  constructor(componentName: string) {\n    super"
  },
  {
    "path": "packages/aspect/src/component/exceptions/invalidVersionError.ts",
    "chars": 280,
    "preview": "export class InvalidVersionError extends Error {\n  version: string | null | undefined;\n\n  constructor(version?: string |"
  },
  {
    "path": "packages/aspect/src/component/extensionData.ts",
    "chars": 3190,
    "preview": "import { cloneDeep, compact, isEmpty } from 'lodash';\n\ntype RemoveExtensionSpecialSign = '-';\n\ntype ExtensionConfig = { "
  },
  {
    "path": "packages/aspect/src/component/index.ts",
    "chars": 326,
    "preview": "import { ComponentAspect } from './component.aspect';\n\nexport default ComponentAspect;\nexport { ComponentAspect };\nexpor"
  },
  {
    "path": "packages/aspect/src/component/type/custom.d.ts",
    "chars": 967,
    "preview": "declare module '*.module.css' {\n  const classes: { readonly [key: string]: string };\n  export default classes;\n}\ndeclare"
  },
  {
    "path": "packages/aspect/src/component/uiRuntime/component.module.scss",
    "chars": 15,
    "preview": ".container {\n}\n"
  },
  {
    "path": "packages/aspect/src/component/uiRuntime/component.tsx",
    "chars": 2162,
    "preview": "import React, { useMemo, ReactNode, useEffect } from 'react';\n// eslint-disable-next-line import/no-extraneous-dependenc"
  },
  {
    "path": "packages/aspect/src/component/uiRuntime/component.ui.runtime.tsx",
    "chars": 1369,
    "preview": "import React from 'react';\nimport type { RouteProps } from 'react-router-dom';\nimport { UIRuntime } from '@arco-cli/serv"
  },
  {
    "path": "packages/aspect/src/component/uiRuntime/componentContext.tsx",
    "chars": 452,
    "preview": "import React, { createContext, PropsWithChildren } from 'react';\nimport { ComponentModel } from './componentModel';\n\nexp"
  },
  {
    "path": "packages/aspect/src/component/uiRuntime/componentError.tsx",
    "chars": 367,
    "preview": "import React from 'react';\nimport { NotFoundPage } from '@arco-cli/ui-foundation-react';\n\nexport class ComponentError {\n"
  },
  {
    "path": "packages/aspect/src/component/uiRuntime/componentMeta/componentMeta.module.scss",
    "chars": 1299,
    "preview": ".metadata {\n  .flexBetween {\n    display: flex;\n    justify-content: space-between;\n  }\n\n  .title {\n    margin: 0 0 12px"
  },
  {
    "path": "packages/aspect/src/component/uiRuntime/componentMeta/componentMeta.tsx",
    "chars": 1750,
    "preview": "import React, { useEffect } from 'react';\nimport { Typography, Select } from '@arco-design/web-react';\nimport { IconTag,"
  },
  {
    "path": "packages/aspect/src/component/uiRuntime/componentMeta/index.ts",
    "chars": 49,
    "preview": "export { ComponentMeta } from './componentMeta';\n"
  },
  {
    "path": "packages/aspect/src/component/uiRuntime/componentModel.ts",
    "chars": 1792,
    "preview": "export type ComponentServer = {\n  env: string;\n  url: string;\n};\n\nexport type ComponentOutline = {\n  text: string;\n  dep"
  },
  {
    "path": "packages/aspect/src/component/uiRuntime/hooks/useComponentQuery.ts",
    "chars": 1838,
    "preview": "// eslint-disable-next-line import/no-extraneous-dependencies\nimport { useMemo, useRef } from 'react';\nimport gql from '"
  },
  {
    "path": "packages/aspect/src/component/uiRuntime/index.ts",
    "chars": 290,
    "preview": "export { ComponentAspect } from '../component.aspect';\nexport type { ComponentUI } from './component.ui.runtime';\nexport"
  },
  {
    "path": "packages/aspect/src/component/uiRuntime/utils/getIdFromLocation.ts",
    "chars": 357,
    "preview": "/**\n * this can match component is like package-name/component-name\n * or @scope/package-name/component-name\n */\nconst c"
  },
  {
    "path": "packages/aspect/src/component/version/index.ts",
    "chars": 121,
    "preview": "export { Version, LATEST_VERSION, VERSION_DELIMITER } from './version';\nexport { versionParser } from './versionParser';"
  },
  {
    "path": "packages/aspect/src/component/version/version.ts",
    "chars": 978,
    "preview": "import semver from 'semver';\nimport { InvalidVersionError } from '../exceptions';\n\nexport const LATEST_VERSION = 'latest"
  },
  {
    "path": "packages/aspect/src/component/version/versionParser.ts",
    "chars": 1684,
    "preview": "import semver from 'semver';\nimport { InvalidVersionError } from '../exceptions';\nimport { Version, LATEST_VERSION } fro"
  },
  {
    "path": "packages/aspect/src/docs/doc/doc.ts",
    "chars": 1307,
    "preview": "import { DocPropList } from './docPropList';\nimport { SerializableMap } from './docProp';\nimport { DocOutline, DocSnippe"
  },
  {
    "path": "packages/aspect/src/docs/doc/docProp.ts",
    "chars": 465,
    "preview": "export type Serializable =\n  | string\n  | {\n      /**\n       * serialize the object into a string.\n       */\n      toStr"
  },
  {
    "path": "packages/aspect/src/docs/doc/docPropList.ts",
    "chars": 496,
    "preview": "import { DocProp } from './docProp';\n\nexport class DocPropList {\n  constructor(readonly docProps: DocProp[]) {}\n\n  get(n"
  },
  {
    "path": "packages/aspect/src/docs/doc/index.ts",
    "chars": 111,
    "preview": "export { Doc } from './doc';\nexport { DocProp } from './docProp';\nexport { DocPropList } from './docPropList';\n"
  },
  {
    "path": "packages/aspect/src/docs/docs.aspect.ts",
    "chars": 143,
    "preview": "import { Aspect } from '@arco-cli/stone';\n\nexport const DocsAspect = Aspect.create({\n  id: 'arco.aspect/docs',\n});\n\nexpo"
  },
  {
    "path": "packages/aspect/src/docs/docs.graphql.ts",
    "chars": 1739,
    "preview": "import path from 'path';\nimport gql from 'graphql-tag';\n\nimport { Component } from '@aspect/component';\nimport { Compone"
  },
  {
    "path": "packages/aspect/src/docs/docs.main.runtime.ts",
    "chars": 6520,
    "preview": "import path from 'path';\nimport fs from 'fs-extra';\nimport { MainRuntime } from '@arco-cli/core/dist/cli';\nimport { Logg"
  },
  {
    "path": "packages/aspect/src/docs/docs.previewDefinition.ts",
    "chars": 920,
    "preview": "import type { PreviewDefinition } from '@arco-cli/service/dist/preview';\n\nimport type { Component } from '@aspect/compon"
  },
  {
    "path": "packages/aspect/src/docs/docs.task.ts",
    "chars": 4171,
    "preview": "import path from 'path';\nimport fs from 'fs-extra';\nimport { toFsCompatible } from '@arco-cli/legacy/dist/utils';\nimport"
  },
  {
    "path": "packages/aspect/src/docs/exceptions/fileExtensionNotSupportedError.ts",
    "chars": 274,
    "preview": "export class FileExtensionNotSupportedError extends Error {\n  constructor(filePath: string, extension: string) {\n    sup"
  },
  {
    "path": "packages/aspect/src/docs/exceptions/index.ts",
    "chars": 83,
    "preview": "export { FileExtensionNotSupportedError } from './fileExtensionNotSupportedError';\n"
  },
  {
    "path": "packages/aspect/src/docs/index.ts",
    "chars": 242,
    "preview": "import { DocsAspect } from './docs.aspect';\n\nexport default DocsAspect;\nexport { DocsAspect };\nexport type { DocsMain } "
  },
  {
    "path": "packages/aspect/src/docs/previewRuntime/docs.preview.runtime.tsx",
    "chars": 2292,
    "preview": "// eslint-disable-next-line import/no-extraneous-dependencies\nimport { ComponentType } from 'react';\nimport type { Docle"
  },
  {
    "path": "packages/aspect/src/docs/previewRuntime/index.ts",
    "chars": 56,
    "preview": "export { DocsRootProps } from './docs.preview.runtime';\n"
  },
  {
    "path": "packages/aspect/src/docs/type/custom.d.ts",
    "chars": 967,
    "preview": "declare module '*.module.css' {\n  const classes: { readonly [key: string]: string };\n  export default classes;\n}\ndeclare"
  },
  {
    "path": "packages/aspect/src/docs/type/docOutline.ts",
    "chars": 65,
    "preview": "export type DocOutline = Array<{ depth: number; text: string }>;\n"
  },
  {
    "path": "packages/aspect/src/docs/type/docReader.ts",
    "chars": 322,
    "preview": "import type { Component } from '@aspect/component';\n\nexport interface DocReader {\n  /**\n   * read a component doc.\n   */"
  },
  {
    "path": "packages/aspect/src/docs/type/docSnippet.ts",
    "chars": 61,
    "preview": "export type DocSnippet = { language: string; code: string };\n"
  },
  {
    "path": "packages/aspect/src/docs/type/index.ts",
    "chars": 127,
    "preview": "export { DocReader } from './docReader';\nexport { DocOutline } from './docOutline';\nexport { DocSnippet } from './docSni"
  },
  {
    "path": "packages/aspect/src/docs/uiRuntime/docs.ui.runtime.tsx",
    "chars": 612,
    "preview": "import React from 'react';\nimport { UIRuntime } from '@arco-cli/service/dist/ui/uiRuntime';\n\nimport { ComponentAspect, C"
  },
  {
    "path": "packages/aspect/src/docs/uiRuntime/index.tsx",
    "chars": 94,
    "preview": "export { DocsAspect } from '../docs.aspect';\nexport type { DocsUI } from './docs.ui.runtime';\n"
  },
  {
    "path": "packages/aspect/src/docs/uiRuntime/overview.module.scss",
    "chars": 302,
    "preview": ".overview {\n  padding: 0 20px;\n\n  .divider {\n    margin: 40px 0 24px;\n    border: none;\n    border-bottom: 1px solid var"
  },
  {
    "path": "packages/aspect/src/docs/uiRuntime/overview.tsx",
    "chars": 1706,
    "preview": "import React, { useContext, useState } from 'react';\nimport { WorkspaceContext } from '@arco-cli/ui-foundation-react';\ni"
  },
  {
    "path": "packages/aspect/src/envs/envDefinition.ts",
    "chars": 421,
    "preview": "import { Environment } from './environment';\n\n/**\n * API for component development environment.\n */\nexport class EnvDefi"
  },
  {
    "path": "packages/aspect/src/envs/envService.ts",
    "chars": 1567,
    "preview": "import type { ReactElement } from 'react';\nimport { Environment } from './environment';\nimport { ExecutionContext } from"
  },
  {
    "path": "packages/aspect/src/envs/environment.ts",
    "chars": 1921,
    "preview": "import { EnvPreviewConfig } from '@arco-cli/service/dist/preview';\nimport type { SourceFile } from '@arco-cli/legacy/dis"
  },
  {
    "path": "packages/aspect/src/envs/envs.aspect.ts",
    "chars": 143,
    "preview": "import { Aspect } from '@arco-cli/stone';\n\nexport const EnvsAspect = Aspect.create({\n  id: 'arco.aspect/envs',\n});\n\nexpo"
  },
  {
    "path": "packages/aspect/src/envs/envs.main.runtime.ts",
    "chars": 4332,
    "preview": "import { Slot, SlotRegistry } from '@arco-cli/stone';\nimport { MainRuntime } from '@arco-cli/core/dist/cli';\nimport { Lo"
  },
  {
    "path": "packages/aspect/src/envs/exceptions/envNotFoundError.ts",
    "chars": 203,
    "preview": "import ArcoError from '@arco-cli/legacy/dist/error/arcoError';\n\nexport class EnvNotFoundError extends ArcoError {\n  cons"
  },
  {
    "path": "packages/aspect/src/envs/executionContext.ts",
    "chars": 1026,
    "preview": "import { EnvDefinition } from './envDefinition';\nimport { Environment } from './environment';\nimport { EnvRuntime, Runti"
  },
  {
    "path": "packages/aspect/src/envs/index.ts",
    "chars": 391,
    "preview": "import { EnvsAspect } from './envs.aspect';\n\nexport default EnvsAspect;\nexport { EnvsAspect };\nexport type { EnvsMain, E"
  },
  {
    "path": "packages/aspect/src/envs/runtime/envRuntime.ts",
    "chars": 394,
    "preview": "import { Component } from '@aspect/component';\n\nimport { Environment } from '../environment';\n\nexport class EnvRuntime {"
  },
  {
    "path": "packages/aspect/src/envs/runtime/envsExecutionResult.ts",
    "chars": 1497,
    "preview": "import { flatten } from 'lodash';\nimport { EnvResult } from './runtime';\nimport { EnvServiceExecutionResult } from '../e"
  },
  {
    "path": "packages/aspect/src/envs/runtime/index.ts",
    "chars": 141,
    "preview": "export { Runtime } from './runtime';\nexport { EnvRuntime } from './envRuntime';\nexport { EnvsExecutionResult } from './e"
  },
  {
    "path": "packages/aspect/src/envs/runtime/runtime.ts",
    "chars": 2207,
    "preview": "import { Logger } from '@arco-cli/core/dist/logger';\nimport mapSeries from 'p-map-series';\nimport { ExecutionContext } f"
  },
  {
    "path": "packages/aspect/src/envs/types.ts",
    "chars": 2215,
    "preview": "import type { StyleCompilerOptions } from '@arco-cli/service/dist/compiler';\n\nimport type { WebpackConfigTransformer } f"
  },
  {
    "path": "packages/aspect/src/index.ts",
    "chars": 111,
    "preview": "// don't write any content here\n// we create this file to make require.resolve() can find path of this package\n"
  },
  {
    "path": "packages/aspect/src/jest/exceptions/index.ts",
    "chars": 41,
    "preview": "export { JestError } from './jestError';\n"
  },
  {
    "path": "packages/aspect/src/jest/exceptions/jestError.ts",
    "chars": 258,
    "preview": "export class JestError extends Error {\n  constructor(\n    message: string,\n    private _stack?: string | null,\n    publi"
  },
  {
    "path": "packages/aspect/src/jest/index.ts",
    "chars": 148,
    "preview": "import { JestAspect } from './jest.aspect';\n\nexport default JestAspect;\nexport { JestAspect };\nexport type { JestMain } "
  },
  {
    "path": "packages/aspect/src/jest/jest.aspect.ts",
    "chars": 143,
    "preview": "import { Aspect } from '@arco-cli/stone';\n\nexport const JestAspect = Aspect.create({\n  id: 'arco.aspect/jest',\n});\n\nexpo"
  },
  {
    "path": "packages/aspect/src/jest/jest.main.runtime.ts",
    "chars": 610,
    "preview": "import { MainRuntime } from '@arco-cli/core/dist/cli';\nimport { JestAspect } from './jest.aspect';\nimport { JestTester, "
  },
  {
    "path": "packages/aspect/src/jest/jest.tester.ts",
    "chars": 5403,
    "preview": "import path from 'path';\nimport type jest from 'jest';\nimport { readFileSync } from 'fs-extra';\nimport { TestResult as J"
  },
  {
    "path": "packages/aspect/src/less/compilerOptions.ts",
    "chars": 272,
    "preview": "import type { CompilerOptions, StyleCompilerOptions } from '@arco-cli/service/dist/compiler';\n\nexport type LessCompilerO"
  },
  {
    "path": "packages/aspect/src/less/index.ts",
    "chars": 210,
    "preview": "import { LessAspect } from './less.aspect';\n\nexport default LessAspect;\nexport { LessAspect };\nexport type { LessMain } "
  },
  {
    "path": "packages/aspect/src/less/less.aspect.ts",
    "chars": 143,
    "preview": "import { Aspect } from '@arco-cli/stone';\n\nexport const LessAspect = Aspect.create({\n  id: 'arco.aspect/less',\n});\n\nexpo"
  },
  {
    "path": "packages/aspect/src/less/less.compiler.ts",
    "chars": 2961,
    "preview": "import path from 'path';\nimport minimatch from 'minimatch';\nimport { render, version } from 'less';\nimport type { Compon"
  },
  {
    "path": "packages/aspect/src/less/less.main.runtime.ts",
    "chars": 546,
    "preview": "import { MainRuntime } from '@arco-cli/core/dist/cli';\n\nimport { LessAspect } from './less.aspect';\nimport { LessCompile"
  },
  {
    "path": "packages/aspect/src/mdx/index.ts",
    "chars": 142,
    "preview": "import { MDXAspect } from './mdx.aspect';\n\nexport default MDXAspect;\nexport { MDXAspect };\nexport type { MDXMain } from "
  },
  {
    "path": "packages/aspect/src/mdx/loader/compileOutput.ts",
    "chars": 1058,
    "preview": "import { VFile } from 'vfile';\n\nimport type { DocOutline, DocSnippet } from '@aspect/docs';\n\nimport { ImportSpecifier } "
  },
  {
    "path": "packages/aspect/src/mdx/loader/importSpecifier.ts",
    "chars": 378,
    "preview": "export type ImportSpecifier = {\n  /**\n   * relative/absolute or module name. e.g. the `y` in the example of `import x fr"
  },
  {
    "path": "packages/aspect/src/mdx/loader/index.ts",
    "chars": 177,
    "preview": "import { mdxLoader } from './mdxLoader';\nimport { compile, compileSync } from './mdxCompiler';\n\nexport default mdxLoader"
  },
  {
    "path": "packages/aspect/src/mdx/loader/mdxCompiler.ts",
    "chars": 2995,
    "preview": "import vfile from 'vfile';\nimport mdx from '@mdx-js/mdx';\nimport detectFrontmatter from 'remark-frontmatter';\nimport rem"
  },
  {
    "path": "packages/aspect/src/mdx/loader/mdxLoader.ts",
    "chars": 837,
    "preview": "import { compile, MDXCompilerOptions } from './mdxCompiler';\n\nexport type MDXLoaderOptions = {\n  preProcessFile?: (file:"
  },
  {
    "path": "packages/aspect/src/mdx/loader/remarkPlugins/extractComponentDemos.ts",
    "chars": 2141,
    "preview": "// TODO try to solve it: demo file content updating won't trigger mdx compiling, then code-text won't update\nimport visi"
  },
  {
    "path": "packages/aspect/src/mdx/loader/remarkPlugins/extractHeadings.ts",
    "chars": 727,
    "preview": "import visit from 'unist-util-visit';\n\nexport function extractHeadings() {\n  const headings = [];\n  const getHeadingText"
  },
  {
    "path": "packages/aspect/src/mdx/loader/remarkPlugins/extractImports.ts",
    "chars": 854,
    "preview": "import visit from 'unist-util-visit';\nimport { detectiveEs6 } from '@arco-cli/legacy/dist/workspace/component/dependenci"
  },
  {
    "path": "packages/aspect/src/mdx/loader/remarkPlugins/extractMetadata.ts",
    "chars": 565,
    "preview": "import yaml from 'yaml';\nimport visit from 'unist-util-visit';\nimport remove from 'unist-util-remove';\n\nexport function "
  },
  {
    "path": "packages/aspect/src/mdx/loader/remarkPlugins/index.ts",
    "chars": 222,
    "preview": "export { extractComponentDemos } from './extractComponentDemos';\nexport { extractHeadings } from './extractHeadings';\nex"
  },
  {
    "path": "packages/aspect/src/mdx/mdx.aspect.ts",
    "chars": 140,
    "preview": "import { Aspect } from '@arco-cli/stone';\n\nexport const MDXAspect = Aspect.create({\n  id: 'arco.aspect/mdx',\n});\n\nexport"
  },
  {
    "path": "packages/aspect/src/mdx/mdx.docReader.ts",
    "chars": 636,
    "preview": "import { DocReader, Doc } from '@aspect/docs';\n\nimport { compile } from './loader';\n\nexport class MDXDocReader implement"
  },
  {
    "path": "packages/aspect/src/mdx/mdx.main.runtime.ts",
    "chars": 738,
    "preview": "import { MainRuntime } from '@arco-cli/core/dist/cli';\n\nimport { DocsAspect, DocsMain } from '@aspect/docs';\n\nimport MDX"
  },
  {
    "path": "packages/aspect/src/multi-compiler/index.ts",
    "chars": 265,
    "preview": "import { MultiCompilerAspect } from './multiCompiler.aspect';\n\nexport default MultiCompilerAspect;\nexport { MultiCompile"
  },
  {
    "path": "packages/aspect/src/multi-compiler/multiCompiler.aspect.ts",
    "chars": 171,
    "preview": "import { Aspect } from '@arco-cli/stone';\n\nexport const MultiCompilerAspect = Aspect.create({\n  id: 'arco.aspect/multi-c"
  },
  {
    "path": "packages/aspect/src/multi-compiler/multiCompiler.compiler.ts",
    "chars": 2985,
    "preview": "import { join } from 'path';\nimport pMapSeries from 'p-map-series';\nimport { Component } from '@arco-cli/aspect/dist/com"
  },
  {
    "path": "packages/aspect/src/multi-compiler/multiCompiler.main.runtime.ts",
    "chars": 792,
    "preview": "import { MainRuntime } from '@arco-cli/core/dist/cli';\nimport { Compiler, CompilerOptions } from '@arco-cli/service/dist"
  },
  {
    "path": "packages/aspect/src/pubsub/events/activeTabEvent.ts",
    "chars": 349,
    "preview": "import { ArcoBaseEvent } from './arcoBaseEvent';\n\nexport type ActiveTabEventType = {\n  activeTab: string;\n};\n\nexport cla"
  },
  {
    "path": "packages/aspect/src/pubsub/events/arcoBaseEvent.ts",
    "chars": 166,
    "preview": "export class ArcoBaseEvent<T> {\n  constructor(\n    readonly type: string,\n    readonly version: string,\n    readonly tim"
  },
  {
    "path": "packages/aspect/src/pubsub/events/index.ts",
    "chars": 256,
    "preview": "export { ArcoBaseEvent } from './arcoBaseEvent';\nexport { SizeEvent, SizeEventType } from './sizeEvent';\nexport { Locati"
  },
  {
    "path": "packages/aspect/src/pubsub/events/locationHashEvent.ts",
    "chars": 362,
    "preview": "import { ArcoBaseEvent } from './arcoBaseEvent';\n\nexport type LocationHashEventType = {\n  hash: string;\n};\n\nexport class"
  },
  {
    "path": "packages/aspect/src/pubsub/events/sizeEvent.ts",
    "chars": 340,
    "preview": "import { ArcoBaseEvent } from './arcoBaseEvent';\n\nexport type SizeEventType = {\n  height: number;\n  width: number;\n};\n\ne"
  },
  {
    "path": "packages/aspect/src/pubsub/exceptions/index.ts",
    "chars": 55,
    "preview": "export { PubsubNoParentError } from './noParentError';\n"
  },
  {
    "path": "packages/aspect/src/pubsub/exceptions/noParentError.ts",
    "chars": 161,
    "preview": "export class PubsubNoParentError extends Error {\n  constructor() {\n    super('could not connect to parent window');\n    "
  },
  {
    "path": "packages/aspect/src/pubsub/index.ts",
    "chars": 344,
    "preview": "import { PubsubAspect } from './pubsub.aspect';\n\nexport default PubsubAspect;\nexport { PubsubAspect };\nexport type { Pub"
  },
  {
    "path": "packages/aspect/src/pubsub/previewRuntime/index.ts",
    "chars": 251,
    "preview": "import { PubsubAspect } from '../pubsub.aspect';\n\nexport default PubsubAspect;\nexport { PubsubAspect };\nexport { Pubsub "
  },
  {
    "path": "packages/aspect/src/pubsub/previewRuntime/pubsub.preview.runtime.ts",
    "chars": 446,
    "preview": "/**\n * Please Notice: This file will run in the preview iframe.\n */\n\nimport { PreviewRuntime } from '@arco-cli/service/d"
  },
  {
    "path": "packages/aspect/src/pubsub/previewRuntime/pubsub.ts",
    "chars": 2382,
    "preview": "import { EventEmitter2 } from 'eventemitter2';\nimport { connectToParent, ErrorCode } from 'penpal';\n\nimport { PubsubNoPa"
  },
  {
    "path": "packages/aspect/src/pubsub/pubsub.aspect.ts",
    "chars": 149,
    "preview": "import { Aspect } from '@arco-cli/stone';\n\nexport const PubsubAspect = Aspect.create({\n  id: 'arco.aspect/pubsub',\n});\n\n"
  },
  {
    "path": "packages/aspect/src/pubsub/pubsub.main.runtime.ts",
    "chars": 813,
    "preview": "import { MainRuntime } from '@arco-cli/core/dist/cli';\n\nimport { ArcoBaseEvent } from './events';\nimport { PubsubAspect "
  },
  {
    "path": "packages/aspect/src/pubsub/pubsub.ui.runtime.ts",
    "chars": 2502,
    "preview": "import { EventEmitter2 } from 'eventemitter2';\nimport { connectToChild } from 'penpal';\nimport type { AsyncMethodReturns"
  },
  {
    "path": "packages/aspect/src/pubsub/pubsubContext.tsx",
    "chars": 992,
    "preview": "import React, { createContext, useContext, useEffect, RefObject, ReactNode } from 'react';\n\nexport interface PubsubRegis"
  },
  {
    "path": "packages/aspect/src/react-router/index.ts",
    "chars": 123,
    "preview": "import { ReactRouterAspect } from './reactRouter.aspect';\n\nexport { ReactRouterAspect };\nexport default ReactRouterAspec"
  },
  {
    "path": "packages/aspect/src/react-router/reactRouter.aspect.ts",
    "chars": 165,
    "preview": "import { Aspect } from '@arco-cli/stone';\n\nexport const ReactRouterAspect = Aspect.create({\n  id: 'arco.aspect/react-rou"
  },
  {
    "path": "packages/aspect/src/react-router/uiRuntime/hooks/useQuery.ts",
    "chars": 277,
    "preview": "// eslint-disable-next-line import/no-extraneous-dependencies\nimport { useLocation } from 'react-router-dom';\n\n/**\n * ho"
  },
  {
    "path": "packages/aspect/src/react-router/uiRuntime/index.ts",
    "chars": 238,
    "preview": "export { ReactRouterAspect } from '../reactRouter.aspect';\nexport { useQuery } from './hooks/useQuery';\nexport { SlotRou"
  },
  {
    "path": "packages/aspect/src/react-router/uiRuntime/reactRouter.ui.runtime.tsx",
    "chars": 1643,
    "preview": "import React from 'react';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { NavigateFunction } fro"
  },
  {
    "path": "packages/aspect/src/react-router/uiRuntime/slotRouter.tsx",
    "chars": 975,
    "preview": "import React, { PropsWithChildren } from 'react';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {"
  },
  {
    "path": "packages/aspect/src/sass/compilerOptions.ts",
    "chars": 268,
    "preview": "import { CompilerOptions, StyleCompilerOptions } from '@arco-cli/service/dist/compiler';\n\nexport type SassCompilerOption"
  },
  {
    "path": "packages/aspect/src/sass/index.ts",
    "chars": 210,
    "preview": "import { SassAspect } from './sass.aspect';\n\nexport default SassAspect;\nexport { SassAspect };\nexport type { SassMain } "
  },
  {
    "path": "packages/aspect/src/sass/sass.aspect.ts",
    "chars": 143,
    "preview": "import { Aspect } from '@arco-cli/stone';\n\nexport const SassAspect = Aspect.create({\n  id: 'arco.aspect/sass',\n});\n\nexpo"
  },
  {
    "path": "packages/aspect/src/sass/sass.compiler.ts",
    "chars": 2861,
    "preview": "import path from 'path';\nimport minimatch from 'minimatch';\nimport { compile } from 'sass';\nimport type { Compiler } fro"
  },
  {
    "path": "packages/aspect/src/sass/sass.main.runtime.ts",
    "chars": 539,
    "preview": "import { MainRuntime } from '@arco-cli/core/dist/cli';\n\nimport { SassAspect } from './sass.aspect';\nimport { SassCompile"
  },
  {
    "path": "packages/aspect/src/typescript/compilerOptions.ts",
    "chars": 941,
    "preview": "import type { CompilerOptions } from '@arco-cli/service/dist/compiler';\n\nexport type TypescriptCompilerOptions = {\n  /**"
  },
  {
    "path": "packages/aspect/src/typescript/index.ts",
    "chars": 375,
    "preview": "import { TypescriptAspect } from './typescript.aspect';\n\nexport default TypescriptAspect;\nexport { TypescriptAspect };\ne"
  },
  {
    "path": "packages/aspect/src/typescript/typescript.aspect.ts",
    "chars": 161,
    "preview": "import { Aspect } from '@arco-cli/stone';\n\nexport const TypescriptAspect = Aspect.create({\n  id: 'arco.aspect/typescript"
  },
  {
    "path": "packages/aspect/src/typescript/typescript.compiler.ts",
    "chars": 10822,
    "preview": "import path from 'path';\nimport fs from 'fs-extra';\nimport ts from 'typescript';\nimport { mergeWith, cloneDeep, get, set"
  },
  {
    "path": "packages/aspect/src/typescript/typescript.main.runtime.ts",
    "chars": 3040,
    "preview": "import ts from 'typescript';\nimport { MainRuntime } from '@arco-cli/core/dist/cli';\nimport { Compiler } from '@arco-cli/"
  },
  {
    "path": "packages/aspect/src/typescript/typescriptConfigMutator.ts",
    "chars": 3412,
    "preview": "import { cloneDeep, mergeWith, isArray } from 'lodash';\nimport { CompilerOptions } from 'typescript';\nimport { Typescrip"
  },
  {
    "path": "packages/aspect/src/typescript/utils/flatTSConfig.ts",
    "chars": 1241,
    "preview": "import path from 'path';\nimport fs from 'fs-extra';\nimport type { CompilerOptions } from 'typescript';\n\ntype TSConfig = "
  },
  {
    "path": "packages/aspect/src/webpack/config/html.ts",
    "chars": 752,
    "preview": "/** html template for Previews (docs, compositions, etc) */\nexport function html(title: string) {\n  return () => `\n  <!D"
  },
  {
    "path": "packages/aspect/src/webpack/config/index.ts",
    "chars": 196,
    "preview": "export { fallbacks } from './webpackFallbacks';\nexport { fallbacksAliases } from './webpackFallbacksAliases';\nexport { f"
  },
  {
    "path": "packages/aspect/src/webpack/config/webpack.config.ts",
    "chars": 3522,
    "preview": "import { sep } from 'path';\nimport webpack, { Configuration } from 'webpack';\nimport { isUndefined, omitBy } from 'lodas"
  },
  {
    "path": "packages/aspect/src/webpack/config/webpack.dev.config.ts",
    "chars": 4786,
    "preview": "import path, { join } from 'path';\nimport webpack from 'webpack';\nimport HtmlWebpackPlugin from 'html-webpack-plugin';\ni"
  },
  {
    "path": "packages/aspect/src/webpack/config/webpackFallbacks.ts",
    "chars": 2505,
    "preview": "// based on https://github1s.com/vercel/next.js/blob/canary/packages/next/build/webpack-config.ts\n// Full list of old po"
  },
  {
    "path": "packages/aspect/src/webpack/config/webpackFallbacksAliases.ts",
    "chars": 122,
    "preview": "export const fallbacksAliases = {\n  process: require.resolve('process/browser'),\n  buffer: require.resolve('buffer/'),\n}"
  },
  {
    "path": "packages/aspect/src/webpack/config/webpackFallbacksProvidePluginConfig.ts",
    "chars": 146,
    "preview": "export const fallbacksProvidePluginConfig = {\n  process: require.resolve('process/browser'),\n  Buffer: [require.resolve("
  },
  {
    "path": "packages/aspect/src/webpack/events/index.ts",
    "chars": 97,
    "preview": "export * from './webpackCompilationDoneEvent';\nexport * from './webpackCompilationStartedEvent';\n"
  },
  {
    "path": "packages/aspect/src/webpack/events/webpackCompilationDoneEvent.ts",
    "chars": 607,
    "preview": "import type { Stats } from 'webpack';\nimport { ArcoBaseEvent } from '@aspect/pubsub';\n\nclass WebpackCompilationDoneEvent"
  },
  {
    "path": "packages/aspect/src/webpack/events/webpackCompilationStartedEvent.ts",
    "chars": 368,
    "preview": "import { ArcoBaseEvent } from '@aspect/pubsub';\n\ntype Params = {\n  devServerID: string;\n};\n\nexport class WebpackCompilat"
  },
  {
    "path": "packages/aspect/src/webpack/generateStyleLoader.ts",
    "chars": 694,
    "preview": "export type GenerateStyleLoadersOptions = {\n  /** the loader injecting the css to the html. style-loader / mini-css-extr"
  },
  {
    "path": "packages/aspect/src/webpack/index.ts",
    "chars": 513,
    "preview": "import { WebpackAspect } from './webpack.aspect';\n\nexport default WebpackAspect;\nexport { WebpackAspect };\nexport { Webp"
  },
  {
    "path": "packages/aspect/src/webpack/webpack.aspect.ts",
    "chars": 152,
    "preview": "import { Aspect } from '@arco-cli/stone';\n\nexport const WebpackAspect = Aspect.create({\n  id: 'arco.aspect/webpack',\n});"
  },
  {
    "path": "packages/aspect/src/webpack/webpack.bundler.ts",
    "chars": 6185,
    "preview": "import { sep } from 'path';\nimport ArcoError from '@arco-cli/legacy/dist/error/arcoError';\nimport type { Logger } from '"
  },
  {
    "path": "packages/aspect/src/webpack/webpack.devServer.ts",
    "chars": 2206,
    "preview": "import type { Server } from 'http';\nimport { inspect } from 'util';\nimport type { webpack as webpackCompiler, Configurat"
  },
  {
    "path": "packages/aspect/src/webpack/webpack.main.runtime.ts",
    "chars": 4912,
    "preview": "import { MainRuntime } from '@arco-cli/core/dist/cli';\nimport { LoggerAspect, LoggerMain } from '@arco-cli/core/dist/log"
  },
  {
    "path": "packages/aspect/src/webpack/webpackConfigMutator.ts",
    "chars": 8265,
    "preview": "import { isObject, omit } from 'lodash';\nimport { merge, mergeWithCustomize, mergeWithRules, CustomizeRule } from 'webpa"
  },
  {
    "path": "packages/aspect/src/workspace/events/index.ts",
    "chars": 124,
    "preview": "export * from './onComponentAddEvent';\nexport * from './onComponentChangeEvent';\nexport * from './onComponentRemovedEven"
  },
  {
    "path": "packages/aspect/src/workspace/events/onComponentAddEvent.ts",
    "chars": 432,
    "preview": "import { ArcoBaseEvent } from '@aspect/pubsub';\n\nclass OnComponentAddEventData {\n  constructor(readonly idStr, readonly "
  },
  {
    "path": "packages/aspect/src/workspace/events/onComponentChangeEvent.ts",
    "chars": 480,
    "preview": "import { ArcoBaseEvent } from '@aspect/pubsub';\n\nclass OnComponentChangeEventData {\n  constructor(readonly idStr, readon"
  },
  {
    "path": "packages/aspect/src/workspace/events/onComponentRemovedEvent.ts",
    "chars": 420,
    "preview": "import { ArcoBaseEvent } from '@aspect/pubsub';\n\nclass OnComponentRemovedEventData {\n  constructor(readonly idStr) {}\n}\n"
  }
]

// ... and 500 more files (download for full content)

About this extraction

This page contains the full source code of the arco-design/arco-cli GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 700 files (864.2 KB), approximately 237.5k tokens, and a symbol index with 1891 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!