Full Code of wszgrcy/angular-miniprogram for AI

master 3a97f1f47f6f cached
497 files
549.0 KB
150.4k tokens
859 symbols
1 requests
Download .txt
Showing preview only (681K chars total). Download the full file or copy to clipboard to get everything.
Repository: wszgrcy/angular-miniprogram
Branch: master
Commit: 3a97f1f47f6f
Files: 497
Total size: 549.0 KB

Directory structure:
gitextract_1na6sspd/

├── .eslintignore
├── .eslintrc.json
├── .github/
│   └── workflows/
│       ├── alpha.yml
│       ├── default.yml
│       ├── deploy.yml
│       └── pull_request.yml
├── .gitignore
├── .husky/
│   ├── commit-msg
│   └── pre-commit
├── .npmrc
├── .nycrc.json
├── .prettierignore
├── .prettierrc
├── .vscode/
│   ├── launch.json
│   └── settings.json
├── LICENSE
├── commitlint.config.js
├── deploy/
│   └── doc/
│       ├── .gitignore
│       ├── Gemfile
│       ├── _config.yml
│       ├── _includes/
│       │   └── language-change.html
│       ├── _layouts/
│       │   ├── home.html
│       │   ├── post.html
│       │   └── redirect.html
│       ├── _posts/
│       │   ├── 2022-02-10-无时间测试.md
│       │   └── 2022-02-10-测试.md
│       ├── assets/
│       │   └── css/
│       │       └── style.scss
│       ├── en-US/
│       │   ├── attention.md
│       │   ├── index.md
│       │   ├── life-time.md
│       │   ├── miniprogram-feature.md
│       │   └── quick-start.md
│       ├── index.md
│       └── zh-Hans/
│           ├── attention.md
│           ├── index.md
│           ├── life-time.md
│           ├── miniprogram-feature.md
│           └── quick-start.md
├── jasmine.json
├── package.json
├── readme.md
├── script/
│   ├── build-ng-package.ts
│   ├── build.ts
│   ├── coverage-badge.ts
│   ├── package-sync.ts
│   ├── registry-transformer.js
│   ├── schema-merge.ts
│   ├── start-build-library.js
│   ├── startup-jasmine.ts
│   ├── tsconfig.json
│   └── tsconfig.startup-jasmine.json
├── src/
│   ├── builder/
│   │   ├── angular-internal/
│   │   │   ├── ast.type.ts
│   │   │   ├── selector.ts
│   │   │   ├── tags.ts
│   │   │   ├── template.ts
│   │   │   └── util.ts
│   │   ├── application/
│   │   │   ├── const.ts
│   │   │   ├── index.ts
│   │   │   ├── library-template-scope.service.ts
│   │   │   ├── loader/
│   │   │   │   ├── component-template.loader.ts
│   │   │   │   ├── library-template.loader.ts
│   │   │   │   ├── library.loader.ts
│   │   │   │   └── type.ts
│   │   │   ├── mini-program-application-analysis.service.ts
│   │   │   ├── plugin/
│   │   │   │   ├── dynamic-library-entry.plugin.ts
│   │   │   │   ├── dynamic-watch-entry.plugin.ts
│   │   │   │   └── export-mini-program-assets.plugin.ts
│   │   │   ├── schema.base.json
│   │   │   ├── schema.json
│   │   │   ├── token.ts
│   │   │   ├── type.ts
│   │   │   ├── util/
│   │   │   │   ├── index.ts
│   │   │   │   └── set-compilation-asset.ts
│   │   │   └── webpack-configuration-change.service.ts
│   │   ├── builder.prod.spec.ts
│   │   ├── builder.spec.ts
│   │   ├── builder.watch.spec.ts
│   │   ├── builders.json
│   │   ├── component-template-inject/
│   │   │   └── change-component.ts
│   │   ├── karma/
│   │   │   ├── client/
│   │   │   │   ├── adapter.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── karma.ts
│   │   │   │   ├── main.ts
│   │   │   │   ├── platform/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── wx/
│   │   │   │   │       └── index.ts
│   │   │   │   ├── tsconfig.json
│   │   │   │   └── updater.ts
│   │   │   ├── index.origin.ts
│   │   │   ├── index.spec.ts
│   │   │   ├── index.ts
│   │   │   ├── plugin/
│   │   │   │   ├── index.js
│   │   │   │   ├── index.ts
│   │   │   │   ├── karma.ts
│   │   │   │   ├── launcher.ts
│   │   │   │   └── tsconfig.json
│   │   │   └── schema.json
│   │   ├── library/
│   │   │   ├── add-declaration-metadata.service.ts
│   │   │   ├── builder.ts
│   │   │   ├── compile-ngc.transform.ts
│   │   │   ├── compile-source-files.ts
│   │   │   ├── const.ts
│   │   │   ├── get-library-path.ts
│   │   │   ├── index.ts
│   │   │   ├── library.spec.ts
│   │   │   ├── merge-using-component-path.ts
│   │   │   ├── ng-packagr-factory.ts
│   │   │   ├── output-template-metadata.service.ts
│   │   │   ├── remove-publish-only.ts
│   │   │   ├── schema.json
│   │   │   ├── setup-component-data.service.ts
│   │   │   ├── stylesheet-processor.ts
│   │   │   ├── token.ts
│   │   │   └── type.ts
│   │   ├── mini-program-compiler/
│   │   │   ├── component-compiler.service.ts
│   │   │   ├── index.ts
│   │   │   ├── meta-collection.ts
│   │   │   ├── mini-program-compiler.service.ts
│   │   │   ├── parse-node/
│   │   │   │   ├── bound-text.ts
│   │   │   │   ├── component-context.ts
│   │   │   │   ├── content.ts
│   │   │   │   ├── element.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── interface.ts
│   │   │   │   ├── template-definition.ts
│   │   │   │   ├── template.ts
│   │   │   │   ├── text.ts
│   │   │   │   └── type.ts
│   │   │   └── type.ts
│   │   ├── platform/
│   │   │   ├── bd/
│   │   │   │   ├── bdzn-platform.ts
│   │   │   │   └── bdzn.transform.ts
│   │   │   ├── dd/
│   │   │   │   ├── dd-platform.ts
│   │   │   │   └── dd.transform.ts
│   │   │   ├── index.ts
│   │   │   ├── jd/
│   │   │   │   ├── jd-platform.ts
│   │   │   │   └── jd.transform.ts
│   │   │   ├── library/
│   │   │   │   ├── library-platform.ts
│   │   │   │   └── library.transform.ts
│   │   │   ├── platform-inject-config.ts
│   │   │   ├── platform.ts
│   │   │   ├── qq/
│   │   │   │   ├── qq-platform.ts
│   │   │   │   └── qq.transform.ts
│   │   │   ├── template/
│   │   │   │   └── app-template.js
│   │   │   ├── template-transform-strategy/
│   │   │   │   ├── transform.base.ts
│   │   │   │   └── wx-like/
│   │   │   │       ├── wx-container.ts
│   │   │   │       └── wx-transform.base.ts
│   │   │   ├── type.ts
│   │   │   ├── util/
│   │   │   │   ├── dataset-bind.ts
│   │   │   │   └── type-predicate.ts
│   │   │   ├── wx/
│   │   │   │   ├── wx-platform.ts
│   │   │   │   └── wx.transform.ts
│   │   │   ├── zfb/
│   │   │   │   ├── zfb-platform.ts
│   │   │   │   └── zfb.transform.ts
│   │   │   └── zjtd/
│   │   │       ├── zj-platform.ts
│   │   │       └── zj.transform.ts
│   │   ├── test/
│   │   │   └── fixture/
│   │   │       └── watch/
│   │   │           └── sub3/
│   │   │               ├── sub3.component.html
│   │   │               ├── sub3.component.ts
│   │   │               ├── sub3.entry.ts
│   │   │               └── sub3.module.ts
│   │   ├── token/
│   │   │   └── component.token.ts
│   │   └── util/
│   │       ├── index.ts
│   │       ├── library-template-scope-name.ts
│   │       ├── literal-resolve.ts
│   │       ├── load_esm.ts
│   │       ├── raw-updater.spec.ts
│   │       ├── raw-updater.ts
│   │       └── run-script.ts
│   └── library/
│       ├── common/
│       │   ├── .gitignore
│       │   └── ng-package.json
│       ├── declaration/
│       │   └── index.d.ts
│       ├── forms/
│       │   ├── .gitignore
│       │   ├── ng-package.json
│       │   ├── readme.md
│       │   └── src/
│       │       ├── directives/
│       │       │   ├── checkbox_value_accessor.ts
│       │       │   ├── default_value_accessor.ts
│       │       │   ├── picker_value_accessor.ts
│       │       │   ├── picker_view_value_accessor.ts
│       │       │   ├── radio_control_value_accessor.ts
│       │       │   ├── slider_value_accessor.ts
│       │       │   └── switch_value_accessor.ts
│       │       ├── directives.ts
│       │       └── forms.ts
│       ├── index.ts
│       ├── ng-package.json
│       ├── package.json
│       └── platform/
│           ├── bd/
│           │   ├── index.ts
│           │   ├── ng-package.json
│           │   └── platform-core.ts
│           ├── dd/
│           │   ├── index.ts
│           │   ├── ng-package.json
│           │   └── platform-core.ts
│           ├── default/
│           │   ├── agent-node.spec.ts
│           │   ├── agent-node.ts
│           │   ├── component-finder.service.ts
│           │   ├── component-template-hook.factory.ts
│           │   ├── diff-node-data.spec.ts
│           │   ├── diff-node-data.ts
│           │   ├── index.ts
│           │   ├── mini-program.renderer.factory.ts
│           │   ├── mini-program.renderer.ts
│           │   ├── ng-package.json
│           │   ├── platform-core.ts
│           │   └── token.ts
│           ├── http/
│           │   ├── README.md
│           │   ├── backend.ts
│           │   ├── index.ts
│           │   ├── module.ts
│           │   ├── provider.ts
│           │   └── response.ts
│           ├── index.ts
│           ├── jd/
│           │   ├── index.ts
│           │   ├── ng-package.json
│           │   └── platform-core.ts
│           ├── mini-program.module.ts
│           ├── ng-package.json
│           ├── page.service.ts
│           ├── platform-miniprogram.ts
│           ├── qq/
│           │   ├── index.ts
│           │   ├── ng-package.json
│           │   └── platform-core.ts
│           ├── token.ts
│           ├── type/
│           │   ├── index.ts
│           │   ├── internal-type.ts
│           │   ├── ng-package.json
│           │   └── type.ts
│           ├── wx/
│           │   ├── index.ts
│           │   └── ng-package.json
│           ├── zfb/
│           │   ├── index.ts
│           │   ├── ng-package.json
│           │   └── platform-core.ts
│           └── zjtd/
│               ├── index.ts
│               ├── ng-package.json
│               └── platform-core.ts
├── test/
│   ├── hello-world-app/
│   │   ├── .browserslistrc
│   │   ├── .gitignore
│   │   ├── angular.json
│   │   ├── karma.conf.js
│   │   ├── projects/
│   │   │   └── test-library/
│   │   │       ├── .browserslistrc
│   │   │       ├── ng-package.json
│   │   │       ├── package.json
│   │   │       ├── src/
│   │   │       │   ├── directive/
│   │   │       │   │   ├── directive.module.ts
│   │   │       │   │   └── input-output.directive.ts
│   │   │       │   ├── global-self-template/
│   │   │       │   │   ├── global-self-template.component.css
│   │   │       │   │   ├── global-self-template.component.html
│   │   │       │   │   ├── global-self-template.component.ts
│   │   │       │   │   └── global-self-template.module.ts
│   │   │       │   ├── lib/
│   │   │       │   │   ├── test-library.component.scss
│   │   │       │   │   ├── test-library.component.spec.ts
│   │   │       │   │   ├── test-library.component.ts
│   │   │       │   │   ├── test-library.directive.ts
│   │   │       │   │   ├── test-library.module.ts
│   │   │       │   │   ├── test-library.service.spec.ts
│   │   │       │   │   └── test-library.service.ts
│   │   │       │   ├── lib-comp1/
│   │   │       │   │   ├── lib-comp1.component.css
│   │   │       │   │   ├── lib-comp1.component.html
│   │   │       │   │   ├── lib-comp1.component.ts
│   │   │       │   │   ├── lib-comp1.module.ts
│   │   │       │   │   └── lib-dir1.directive.ts
│   │   │       │   ├── other/
│   │   │       │   │   ├── other.component.css
│   │   │       │   │   ├── other.component.html
│   │   │       │   │   ├── other.component.ts
│   │   │       │   │   └── other.module.ts
│   │   │       │   ├── outside-template/
│   │   │       │   │   ├── outside-template.component.css
│   │   │       │   │   ├── outside-template.component.html
│   │   │       │   │   ├── outside-template.component.ts
│   │   │       │   │   └── outside-template.module.ts
│   │   │       │   └── public-api.ts
│   │   │       ├── tsconfig.lib.json
│   │   │       ├── tsconfig.lib.prod.json
│   │   │       └── tsconfig.spec.json
│   │   ├── src/
│   │   │   ├── __components/
│   │   │   │   ├── component-need-template/
│   │   │   │   │   ├── component-need-template.component.css
│   │   │   │   │   ├── component-need-template.component.html
│   │   │   │   │   ├── component-need-template.component.ts
│   │   │   │   │   ├── component-need-template.entry.ts
│   │   │   │   │   └── component-need-template.module.ts
│   │   │   │   ├── component1/
│   │   │   │   │   ├── component1.component.css
│   │   │   │   │   ├── component1.component.html
│   │   │   │   │   ├── component1.component.ts
│   │   │   │   │   ├── component1.entry.ts
│   │   │   │   │   └── component1.module.ts
│   │   │   │   ├── component2/
│   │   │   │   │   ├── component2.component.css
│   │   │   │   │   ├── component2.component.html
│   │   │   │   │   ├── component2.component.ts
│   │   │   │   │   ├── component2.entry.ts
│   │   │   │   │   └── component2.module.ts
│   │   │   │   ├── component3/
│   │   │   │   │   ├── component3.component.css
│   │   │   │   │   ├── component3.component.html
│   │   │   │   │   ├── component3.component.ts
│   │   │   │   │   └── component3.entry.ts
│   │   │   │   ├── content/
│   │   │   │   │   ├── content.component.css
│   │   │   │   │   ├── content.component.html
│   │   │   │   │   ├── content.component.ts
│   │   │   │   │   ├── content.entry.ts
│   │   │   │   │   └── content.module.ts
│   │   │   │   ├── content-multi/
│   │   │   │   │   ├── content-multi.component.css
│   │   │   │   │   ├── content-multi.component.html
│   │   │   │   │   ├── content-multi.component.ts
│   │   │   │   │   ├── content-multi.entry.ts
│   │   │   │   │   └── content-multi.module.ts
│   │   │   │   └── life-time/
│   │   │   │       ├── life-time.component.html
│   │   │   │       ├── life-time.component.ts
│   │   │   │       └── life-time.entry.ts
│   │   │   ├── __pages/
│   │   │   │   ├── base-component/
│   │   │   │   │   ├── base-component.component.css
│   │   │   │   │   ├── base-component.component.html
│   │   │   │   │   ├── base-component.component.ts
│   │   │   │   │   ├── base-component.entry.ts
│   │   │   │   │   └── base-component.module.ts
│   │   │   │   ├── base-directive/
│   │   │   │   │   ├── base-directive.component.css
│   │   │   │   │   ├── base-directive.component.html
│   │   │   │   │   ├── base-directive.component.ts
│   │   │   │   │   ├── base-directive.entry.ts
│   │   │   │   │   ├── base-directive.module.ts
│   │   │   │   │   └── directive1.directive.ts
│   │   │   │   ├── base-forms/
│   │   │   │   │   ├── base-forms.component.css
│   │   │   │   │   ├── base-forms.component.html
│   │   │   │   │   ├── base-forms.component.ts
│   │   │   │   │   ├── base-forms.entry.ts
│   │   │   │   │   └── base-forms.module.ts
│   │   │   │   ├── base-http/
│   │   │   │   │   ├── base-http.component.css
│   │   │   │   │   ├── base-http.component.html
│   │   │   │   │   ├── base-http.component.ts
│   │   │   │   │   ├── base-http.entry.ts
│   │   │   │   │   └── base-http.module.ts
│   │   │   │   ├── base-tap/
│   │   │   │   │   ├── base-tap.component.css
│   │   │   │   │   ├── base-tap.component.html
│   │   │   │   │   ├── base-tap.component.ts
│   │   │   │   │   ├── base-tap.entry.ts
│   │   │   │   │   └── base-tap.module.ts
│   │   │   │   ├── complex-property-event/
│   │   │   │   │   ├── app-dir1.directive.ts
│   │   │   │   │   ├── complex-property-event.component.css
│   │   │   │   │   ├── complex-property-event.component.html
│   │   │   │   │   ├── complex-property-event.component.ts
│   │   │   │   │   ├── complex-property-event.entry.ts
│   │   │   │   │   └── complex-property-event.module.ts
│   │   │   │   ├── complex-structure/
│   │   │   │   │   ├── complex-structure.component.css
│   │   │   │   │   ├── complex-structure.component.html
│   │   │   │   │   ├── complex-structure.component.ts
│   │   │   │   │   ├── complex-structure.entry.ts
│   │   │   │   │   └── complex-structure.module.ts
│   │   │   │   ├── component-use-template/
│   │   │   │   │   ├── component-use-template.component.css
│   │   │   │   │   ├── component-use-template.component.html
│   │   │   │   │   ├── component-use-template.component.ts
│   │   │   │   │   ├── component-use-template.entry.ts
│   │   │   │   │   └── component-use-template.module.ts
│   │   │   │   ├── custom-structural-directive/
│   │   │   │   │   ├── custom-structural-directive.component.css
│   │   │   │   │   ├── custom-structural-directive.component.html
│   │   │   │   │   ├── custom-structural-directive.component.ts
│   │   │   │   │   ├── custom-structural-directive.entry.ts
│   │   │   │   │   ├── custom-structural-directive.module.ts
│   │   │   │   │   └── structural1.directive.ts
│   │   │   │   ├── default-structural-directive/
│   │   │   │   │   ├── default-structural-directive.component.css
│   │   │   │   │   ├── default-structural-directive.component.html
│   │   │   │   │   ├── default-structural-directive.component.ts
│   │   │   │   │   ├── default-structural-directive.entry.ts
│   │   │   │   │   └── default-structural-directive.module.ts
│   │   │   │   ├── life-time-page/
│   │   │   │   │   ├── life-time-page.entry.ts
│   │   │   │   │   ├── life-time.component.html
│   │   │   │   │   ├── life-time.component.ts
│   │   │   │   │   └── life-time.module.ts
│   │   │   │   ├── life-time-page-use-component/
│   │   │   │   │   ├── life-time-page-use-component.entry.ts
│   │   │   │   │   ├── life-time.component.html
│   │   │   │   │   ├── life-time.component.ts
│   │   │   │   │   └── life-time.module.ts
│   │   │   │   ├── ng-content/
│   │   │   │   │   ├── ng-content.component.css
│   │   │   │   │   ├── ng-content.component.html
│   │   │   │   │   ├── ng-content.component.ts
│   │   │   │   │   ├── ng-content.entry.ts
│   │   │   │   │   └── ng-content.module.ts
│   │   │   │   ├── root/
│   │   │   │   │   ├── root.component.css
│   │   │   │   │   ├── root.component.html
│   │   │   │   │   ├── root.component.ts
│   │   │   │   │   ├── root.entry.ts
│   │   │   │   │   └── root.module.ts
│   │   │   │   └── self-component/
│   │   │   │       ├── self-component.component.css
│   │   │   │       ├── self-component.component.html
│   │   │   │       ├── self-component.component.ts
│   │   │   │       ├── self-component.entry.ts
│   │   │   │       └── self-component.module.ts
│   │   │   ├── app.json
│   │   │   ├── assets/
│   │   │   │   └── .gitkeep
│   │   │   ├── environments/
│   │   │   │   ├── environment.prod.ts
│   │   │   │   └── environment.ts
│   │   │   ├── main-test.module.ts
│   │   │   ├── main.module.ts
│   │   │   ├── main.ts
│   │   │   ├── project.config.json
│   │   │   ├── spec/
│   │   │   │   ├── empty/
│   │   │   │   │   ├── empty.component.ts
│   │   │   │   │   ├── empty.entry.ts
│   │   │   │   │   └── empty.module.ts
│   │   │   │   ├── http-spec/
│   │   │   │   │   ├── http-spec.entry.ts
│   │   │   │   │   ├── http.component.ts
│   │   │   │   │   ├── http.module.ts
│   │   │   │   │   └── http.spec.ts
│   │   │   │   ├── life-time-spec/
│   │   │   │   │   ├── life-time-spec.entry.ts
│   │   │   │   │   ├── life-time.component.ts
│   │   │   │   │   ├── life-time.module.ts
│   │   │   │   │   └── life-time.spec.ts
│   │   │   │   ├── ng-content-spec/
│   │   │   │   │   ├── ng-content-spec.entry.ts
│   │   │   │   │   ├── ng-content.component.ts
│   │   │   │   │   ├── ng-content.module.ts
│   │   │   │   │   └── ng-content.spec.ts
│   │   │   │   ├── ng-for-spec/
│   │   │   │   │   ├── ng-for-spec.entry.ts
│   │   │   │   │   ├── ng-for.component.ts
│   │   │   │   │   ├── ng-for.module.ts
│   │   │   │   │   └── ng-for.spec.ts
│   │   │   │   ├── ng-if-spec/
│   │   │   │   │   ├── ng-if-spec.entry.ts
│   │   │   │   │   ├── ng-if.component.ts
│   │   │   │   │   ├── ng-if.module.ts
│   │   │   │   │   └── ng-if.spec.ts
│   │   │   │   ├── ng-library-import-spec/
│   │   │   │   │   ├── ng-library-import-spec.entry.ts
│   │   │   │   │   ├── ng-library-import.component.ts
│   │   │   │   │   ├── ng-library-import.module.ts
│   │   │   │   │   └── ng-library-import.spec.ts
│   │   │   │   ├── ng-switch-spec/
│   │   │   │   │   ├── ng-switch-spec.entry.ts
│   │   │   │   │   ├── ng-switch.component.ts
│   │   │   │   │   ├── ng-switch.module.ts
│   │   │   │   │   └── ng-switch.spec.ts
│   │   │   │   ├── ng-template-outlet-spec/
│   │   │   │   │   ├── ng-template-outlet-spec.entry.ts
│   │   │   │   │   ├── ng-template-outlet.component.ts
│   │   │   │   │   ├── ng-template-outlet.module.ts
│   │   │   │   │   └── ng-template-outlet.spec.ts
│   │   │   │   ├── self-template-spec/
│   │   │   │   │   ├── self-template-spec.entry.ts
│   │   │   │   │   ├── self-template.component.ts
│   │   │   │   │   ├── self-template.module.ts
│   │   │   │   │   └── self-template.spec.ts
│   │   │   │   ├── style-class-spec/
│   │   │   │   │   ├── style-class-spec.component.ts
│   │   │   │   │   ├── style-class-spec.entry.ts
│   │   │   │   │   ├── style-class-spec.module.ts
│   │   │   │   │   └── style-class-spec.spec.ts
│   │   │   │   ├── tag-view-convert-spec/
│   │   │   │   │   ├── tag-view-convert-spec.entry.ts
│   │   │   │   │   ├── tag-view-convert.component.ts
│   │   │   │   │   ├── tag-view-convert.module.ts
│   │   │   │   │   └── tag-view-convert.spec.ts
│   │   │   │   └── util/
│   │   │   │       ├── index.ts
│   │   │   │       ├── node-query.ts
│   │   │   │       ├── open-component.ts
│   │   │   │       └── page-info.ts
│   │   │   ├── spec-component/
│   │   │   │   ├── life-time/
│   │   │   │   │   ├── life-time.component.ts
│   │   │   │   │   ├── life-time.entry.ts
│   │   │   │   │   └── life-time.module.ts
│   │   │   │   ├── ng-content/
│   │   │   │   │   ├── ng-content.component.html
│   │   │   │   │   ├── ng-content.component.ts
│   │   │   │   │   ├── ng-content.entry.ts
│   │   │   │   │   └── ng-content.module.ts
│   │   │   │   ├── ng-for/
│   │   │   │   │   ├── ng-for.component.html
│   │   │   │   │   ├── ng-for.component.ts
│   │   │   │   │   ├── ng-for.entry.ts
│   │   │   │   │   └── ng-for.module.ts
│   │   │   │   ├── ng-if/
│   │   │   │   │   ├── ng-if.component.html
│   │   │   │   │   ├── ng-if.component.ts
│   │   │   │   │   ├── ng-if.entry.ts
│   │   │   │   │   └── ng-if.module.ts
│   │   │   │   ├── ng-library-import/
│   │   │   │   │   ├── ng-library-import.component.html
│   │   │   │   │   ├── ng-library-import.component.ts
│   │   │   │   │   ├── ng-library-import.entry.ts
│   │   │   │   │   └── ng-library-import.module.ts
│   │   │   │   ├── ng-switch/
│   │   │   │   │   ├── ng-switch.component.html
│   │   │   │   │   ├── ng-switch.component.ts
│   │   │   │   │   ├── ng-switch.entry.ts
│   │   │   │   │   └── ng-switch.module.ts
│   │   │   │   ├── ng-template-outlet/
│   │   │   │   │   ├── ng-template-outlet.component.html
│   │   │   │   │   ├── ng-template-outlet.component.ts
│   │   │   │   │   ├── ng-template-outlet.entry.ts
│   │   │   │   │   └── ng-template-outlet.module.ts
│   │   │   │   ├── self-template/
│   │   │   │   │   ├── self-template.component.html
│   │   │   │   │   ├── self-template.component.ts
│   │   │   │   │   ├── self-template.entry.ts
│   │   │   │   │   └── self-template.module.ts
│   │   │   │   ├── style-class/
│   │   │   │   │   ├── style-class.component.html
│   │   │   │   │   ├── style-class.component.ts
│   │   │   │   │   ├── style-class.entry.ts
│   │   │   │   │   └── style-class.module.ts
│   │   │   │   └── tag-view-convert/
│   │   │   │       ├── tag-view-convert.component.html
│   │   │   │       ├── tag-view-convert.component.ts
│   │   │   │       ├── tag-view-convert.entry.ts
│   │   │   │       └── tag-view-convert.module.ts
│   │   │   ├── styles.css
│   │   │   ├── test.ts
│   │   │   ├── tsconfig.app.json
│   │   │   ├── tsconfig.dev.json
│   │   │   ├── tsconfig.spec.json
│   │   │   └── typings.d.ts
│   │   ├── tsconfig.base.json
│   │   └── tsconfig.json
│   ├── plugin-describe-builder/
│   │   └── index.ts
│   ├── test-builder/
│   │   ├── index.ts
│   │   ├── schema.json
│   │   ├── schema.karma.json
│   │   └── schema.library.json
│   └── util/
│       └── file.ts
├── tsconfig.base.json
├── tsconfig.builder.json
├── tsconfig.doc.json
├── tsconfig.internal-schematics.json
├── tsconfig.json
├── tsconfig.library.json
├── tsconfig.spec.json
└── typedoc.json

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

================================================
FILE: .eslintignore
================================================
/tests/
.yarn/
dist/
node_modules/
test/test-project-host-hello-world-app-*
test/hello-world-app
jest.builder.config.ts
build-ng-package.ts
schema-merge.ts
test/util
commitlint.config.js
script
**/fixture
*.xspec.ts
src/library/common
src/libary/forms
test
src/library/platform/http
deploy
docs

================================================
FILE: .eslintrc.json
================================================
{
  "ignorePatterns": [
    "src/library/forms/**/*",
    "src/library/common/**/*",
    "*.d.ts",
    "src/builder/karma/client/**/*",
    "src/builder/karma/plugin/**/*"
  ],
  "root": true,
  "env": {
    "es6": true,
    "node": true
  },
  "extends": [
    "eslint:recommended",
    "plugin:import/typescript",
    "plugin:@typescript-eslint/recommended",
    "plugin:@typescript-eslint/recommended-requiring-type-checking",
    "prettier"
  ],
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "project": "tsconfig.json",
    "sourceType": "module"
  },
  "plugins": ["eslint-plugin-import", "@typescript-eslint"],
  "rules": {
    "@typescript-eslint/consistent-type-assertions": "warn",
    "@typescript-eslint/no-explicit-any": "warn",
    "@typescript-eslint/no-non-null-assertion": "off",
    "@typescript-eslint/no-unnecessary-qualifier": "warn",
    "@typescript-eslint/no-unused-expressions": "warn",
    "curly": "warn",
    "import/first": "warn",
    "import/newline-after-import": "warn",
    "import/no-absolute-path": "warn",
    "import/no-duplicates": "warn",
    "import/no-extraneous-dependencies": [
      "off",
      {
        "devDependencies": false
      }
    ],
    "import/no-unassigned-import": [
      "warn",
      {
        "allow": ["miniprogram-api-typings"]
      }
    ],
    "import/order": [
      "warn",
      {
        "alphabetize": {
          "order": "asc"
        },
        "groups": [["builtin", "external"], "parent", "sibling", "index"]
      }
    ],
    "max-len": [
      "warn",
      {
        "code": 140,
        "ignoreUrls": true,
        "ignoreStrings": true,
        "ignoreTemplateLiterals": true,
        "ignoreComments": true,
        "ignoreRegExpLiterals": true
      }
    ],
    "max-lines-per-function": [
      "warn",
      {
        "max": 400
      }
    ],
    "no-caller": "warn",
    "no-console": "warn",
    "no-empty": [
      "warn",
      {
        "allowEmptyCatch": true
      }
    ],
    "no-eval": "warn",
    "no-multiple-empty-lines": ["warn"],
    "no-throw-literal": "warn",
    "no-var": "warn",
    "sort-imports": [
      "warn",
      {
        "ignoreDeclarationSort": true
      }
    ],
    "spaced-comment": [
      "warn",
      "always",
      {
        "markers": ["/"]
      }
    ],
    /* TODO: evaluate usage of these rules and fix issues as needed */
    "no-case-declarations": "off",
    "no-fallthrough": "off",
    "no-underscore-dangle": "off",
    "@typescript-eslint/await-thenable": "off",
    "@typescript-eslint/ban-types": "off",
    "@typescript-eslint/no-empty-function": "off",
    "@typescript-eslint/explicit-module-boundary-types": "off",
    "@typescript-eslint/no-implied-eval": "off",
    "@typescript-eslint/no-var-requires": "off",
    "@typescript-eslint/no-unnecessary-type-assertion": "off",
    "@typescript-eslint/no-unsafe-assignment": "off",
    "@typescript-eslint/no-unsafe-call": "off",
    "@typescript-eslint/no-unsafe-member-access": "off",
    "@typescript-eslint/no-unsafe-return": "off",
    "@typescript-eslint/no-unused-vars": "off",
    "@typescript-eslint/prefer-regexp-exec": "off",
    "@typescript-eslint/require-await": "off",
    "@typescript-eslint/restrict-plus-operands": "off",
    "@typescript-eslint/restrict-template-expressions": "off",
    "@typescript-eslint/unbound-method": "off",
    "@typescript-eslint/no-unsafe-argument": "off",
    "prefer-const": "warn",
    "prefer-rest-params": "warn",
    "prefer-spread": "warn",
    "@typescript-eslint/no-floating-promises": "warn",
    "@typescript-eslint/no-inferrable-types": "off",
    "@typescript-eslint/no-misused-promises": [
      "warn",
      {
        "checksVoidReturn": false
      }
    ],
    "@typescript-eslint/no-this-alias": [
      "warn",
      {
        "allowedNames": ["_this"]
      }
    ]
  },
  "overrides": [
    {
      "files": ["**/*.spec.ts"],
      "parserOptions": {
        "project": "tsconfig.spec.json"
      },
      "rules": {
        "import/no-extraneous-dependencies": [
          "warn",
          {
            "devDependencies": true,
            "packageDir": "./"
          }
        ],
        "max-lines-per-function": "off",
        "no-console": "off"
      }
    },
    {
      "files": ["./src/builder/**/*.ts"],
      "excludedFiles": [
        "./src/**/*.template.ts",
        "./src/**/*.d.ts",
        "**/*.spec.ts",
        "test"
      ],
      "parserOptions": {
        "project": "./tsconfig.builder.json"
      }
    },
    {
      "files": ["./src/library/**/*.ts"],
      "excludedFiles": [
        "./src/**/*.template.ts",
        "./src/**/*.d.ts",
        "**/*.spec.ts",
        "test",
        "./src/library/forms/**/*",
        "./src/library/common/**/*",
        "./src/library/platform/http/**/*"
      ],
      "parserOptions": {
        "project": "tsconfig.library.json"
      }
    },
    {
      "files": ["schematics/internal/**/*.ts"],
      "excludedFiles": [],
      "parserOptions": {
        "project": "tsconfig.internal-schematics.json"
      }
    }
  ]
}


================================================
FILE: .github/workflows/alpha.yml
================================================
name: CI

on:
  push:
    branches:
      - alpha
env:
  REPOSITORY_PATH: https://${{secrets.ACCESS_TOKEN}}@github.com/
jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: init
        run: |
          git config --global user.name "${GITHUB_ACTOR}"
          git config --global user.email "${GITHUB_ACTOR}@gmail.com"
      - name: pull-code
        uses: actions/checkout@v2
      - name: install-node
        uses: actions/setup-node@v2
        with:
          node-version: 16.x
          cache: "npm"
      - name: install-dependencies
        run: |
          npm ci --legacy-peer-deps
      - name: lint
        run: |
          npm run lint
      - name: hook-code
        run: |
          npm run sync
      - name: test
        run: |
          npm run test:ci
      - name: build
        run: |
          npm run build
      - id: publish
        name: publish
        uses: JS-DevTools/npm-publish@v3
        if: ${{ github.repository_owner	== 'wszgrcy' }}
        with:
          token: ${{ secrets.NPM_PUBLISH_TOKEN }}
          package: ./dist/package.json
          tag: alpha
      - if: ${{ github.repository_owner	== 'wszgrcy' && steps.publish.outputs.type  }}
        run: |
          echo "[${{ steps.publish.outputs.type }}]版本已变更: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"
          git tag v${{steps.publish.outputs.version}}
          git push origin v${{steps.publish.outputs.version}}


================================================
FILE: .github/workflows/default.yml
================================================
name: CI

on:
  push:
    branches:
      - master
env:
  REPOSITORY_PATH: https://${{secrets.ACCESS_TOKEN}}@github.com/
jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: init
        run: |
          git config --global user.name "${GITHUB_ACTOR}"
          git config --global user.email "${GITHUB_ACTOR}@gmail.com"
      - name: pull-code
        uses: actions/checkout@v2
      - name: install-node
        uses: actions/setup-node@v2
        with:
          node-version: 16.x
          cache: "npm"
      - name: install-dependencies
        run: |
          npm ci --legacy-peer-deps
      - name: lint
        run: |
          npm run lint
      - name: hook-code
        run: |
          npm run sync
      - name: test
        run: |
          npm run test:ci
      - name: build
        run: |
          npm run build
      - id: publish
        name: publish
        uses: JS-DevTools/npm-publish@v1
        if: ${{ github.repository_owner	== 'wszgrcy' }}
        with:
          token: ${{ secrets.NPM_PUBLISH_TOKEN }}
          package: ./dist/package.json
      - if: ${{ github.repository_owner	== 'wszgrcy' && steps.publish.outputs.type  }}
        run: |
          echo "[${{ steps.publish.outputs.type }}]Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"
          git tag v${{steps.publish.outputs.version}}
          git push origin v${{steps.publish.outputs.version}}


================================================
FILE: .github/workflows/deploy.yml
================================================
name: deploy

on:
  push:
    branches:
      - master
env:
  REPOSITORY_PATH: https://${{secrets.ACCESS_TOKEN}}@github.com/
  # GITHUB_TOKEN: ${{secrets.ACCESS_TOKEN}}
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: init
        run: |
          git config --global user.name "${GITHUB_ACTOR}"
          git config --global user.email "${GITHUB_ACTOR}@gmail.com"
      - name: pull-code
        uses: actions/checkout@v2
      - name: install-node
        uses: actions/setup-node@v2
        with:
          node-version: 16.x
          cache: "npm"
      - name: install-dependencies
        run: |
          npm ci --legacy-peer-deps
      - name: hook-code
        run: |
          npm run sync
      - name: build-docs
        continue-on-error: true
        run: |
          npm run deploy
          cp -rp docs/ ../dist
          git branch gh-pages
          git checkout gh-pages
          rm -rf *
          cp -rp ../dist/* .
          cp ./index.html 404.html
        env:
          INPUT_TOKEN: ''
      - name: tag
        run: |
          git status
          git add -A
          HUSKY=0 git commit -m 'build: 页面构建'
          HUSKY=0 git push --force "${REPOSITORY_PATH}${GITHUB_REPOSITORY}.git" gh-pages
          # git pull


================================================
FILE: .github/workflows/pull_request.yml
================================================
name: PR

on:
  pull_request:
    branches:
      - master
      - alpha

jobs:
  pr-test:
    runs-on: ubuntu-latest

    steps:
      - name: pull-code
        uses: actions/checkout@v2
      - name: install-node
        uses: actions/setup-node@v2
        with:
          node-version: 16.x
          cache: "npm"
      - name: install-dependencies
        run: |
          npm ci --legacy-peer-deps
      - name: lint
        run: |
          npm run lint
      - name: hook-code
        run: |
          npm run sync
      - name: test
        run: |
          npm run test:ci
      - name: build
        run: |
          npm run build


================================================
FILE: .gitignore
================================================
node_modules*
test-project-host-hello-world-app-*
dist
__test-app
coverage-builder
script/startup-jasmine.js
.temp-git
.nyc_output
docs
deploy/api-doc

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

npx --no-install commitlint --edit "$1"


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

npx --no-install pretty-quick --staged


================================================
FILE: .npmrc
================================================
# registry =https://registry.npmmirror.com/

================================================
FILE: .nycrc.json
================================================
{
  "extension": [".ts"],
  "exclude": [
    "**/*.d.ts",
    "**/*.js",
    "**/*.spec.ts",
    "startup-jasmine.js",
    "test/**/*",
    "src/builder/angular-internal/**/*"
  ],
  "reporter": ["html", "text", "json-summary", "json"],
  "all": false,
  "report-dir": "./docs/coverage"
}


================================================
FILE: .prettierignore
================================================
deploy

================================================
FILE: .prettierrc
================================================
{
  "singleQuote": true
}


================================================
FILE: .vscode/launch.json
================================================
{
  // 使用 IntelliSense 了解相关属性。
  // 悬停以查看现有属性的描述。
  // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "name": "测试(jasmine)-library",
      "type": "node",
      "request": "launch",
      "cwd": "${workspaceRoot}",
      "runtimeExecutable": "npm",
      "runtimeArgs": ["run-script", "test", "library"],
      "port": 7899
    },
    {
      "name": "测试(jasmine)-browser",
      "type": "node",
      "request": "launch",
      "cwd": "${workspaceRoot}",
      "runtimeExecutable": "npm",
      "runtimeArgs": ["run-script", "test", "builder-dev"],
      "port": 7899
    },
    {
      "name": "测试(jasmine)-builder-prod",
      "type": "node",
      "request": "launch",
      "cwd": "${workspaceRoot}",
      "runtimeExecutable": "npm",
      "runtimeArgs": ["run-script", "test", "builder-prod"],
      "port": 7899
    },
    {
      "name": "测试(jasmine)-browser-watch",
      "type": "node",
      "request": "launch",
      "cwd": "${workspaceRoot}",
      "runtimeExecutable": "npm",
      "runtimeArgs": ["run-script", "test", "watch"],
      "port": 7899
    }
  ]
}


================================================
FILE: .vscode/settings.json
================================================
{
  "typescript.tsdk": "node_modules/typescript/lib",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit",
    "source.fixAll.tslint": "never"
  }
}


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

Copyright (c) 2021 chen

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: commitlint.config.js
================================================
module.exports = {
  extends: ['@commitlint/config-conventional'],
};


================================================
FILE: deploy/doc/.gitignore
================================================
_site
.jekyll-cache


================================================
FILE: deploy/doc/Gemfile
================================================
source "https://mirrors.tuna.tsinghua.edu.cn/rubygems/"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
#     bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
#gem "jekyll", "~> 4.2.2"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", "~> 226", group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
  gem "jekyll-feed", "~> 0.12"
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
  gem "tzinfo", "~> 1.2"
  gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
# do not have a Java counterpart.
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]


================================================
FILE: deploy/doc/_config.yml
================================================
theme: jekyll-theme-tactile
baseurl: /angular-miniprogram


================================================
FILE: deploy/doc/_includes/language-change.html
================================================
<div>
  <button>
    <a href="{{site.baseurl}}{{page.url| replace_first:page.dir,'/zh-Hans/' }}"
      >简体中文</a
    >
  </button>
  <button>
    <a href="{{site.baseurl}}{{page.url| replace_first:page.dir,'/en-US/' }}"
      >English</a
    >
  </button>
</div>


================================================
FILE: deploy/doc/_layouts/home.html
================================================
<!DOCTYPE html>
<html lang="{{ site.lang | default: " en-US" }}">

<head>
  <meta charset='utf-8'>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
  <link rel="stylesheet" type="text/css" href="{{ '/assets/css/print.css' | relative_url }}" media="print">

  {% seo %}
  {% include head-custom.html %}
</head>

<body>

  <div id="container">
    <div class="inner">
      <nav class="flex">
        <div class="flex-1"></div>
        {% include language-change.html %}
      </nav>
      <header>
        <h1 class="text-center">{{ page.title | default: site.title | default: site.github.repository_name }}</h1>


        <!-- <h2>{{ page.description | default: site.description | default: site.github.project_tagline }}</h2> -->

      </header>

      <hr>
      <section id="main_content">
        {{ content }}
      </section>

      <footer>
        {% if site.github.is_project_page %}
        {{ site.title | default: site.github.repository_name }} is maintained by <a
          href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a><br>
        {% endif %}
        This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.
      </footer>

    </div>
  </div>
</body>

</html>

================================================
FILE: deploy/doc/_layouts/post.html
================================================
<!DOCTYPE html>
<html lang="{{ site.lang | default: "en-US" }}">
  <head>
    <meta charset='utf-8'>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
    <link rel="stylesheet" type="text/css" href="{{ '/assets/css/print.css' | relative_url }}" media="print">

{% seo %}
    {% include head-custom.html %}
  </head>
  <body>
    <div class="inner">
      <nav class="flex">
        <a href="{{site.baseurl}}/">Home</a>
        <div class="flex-1"></div>
        {% include language-change.html %}
      </nav>
      <header>
        <h1>{{ page.title | default: site.title | default: site.github.repository_name }}</h1>
     

      <!-- <h2>{{ page.description | default: site.description | default: site.github.project_tagline }}</h2> -->

    </header>
      <section class="main_content">{{ content }}</section>
      <footer>
        test is maintained by <a href="https://github.com/wszgrcy">wszgrcy</a><br />

        This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.
      </footer>
    </div>
  </body>
</html>


================================================
FILE: deploy/doc/_layouts/redirect.html
================================================
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Refresh" content="0; url={{ site.baseurl }}/zh-Hans/index" />

    <title>Document</title>
</head>
<body>
    
</body>
</html>

================================================
FILE: deploy/doc/_posts/2022-02-10-无时间测试.md
================================================
---
title: "无时间测试"
layout: post
---

# 内容
- 没有

================================================
FILE: deploy/doc/_posts/2022-02-10-测试.md
================================================
---
title: "测试"
layout: post
---

# 内容


================================================
FILE: deploy/doc/assets/css/style.scss
================================================
---
---

@import '{{ site.theme }}';

.action-line {
  display: flex;
  align-items: center;
  justify-content: end;
}

.flex-1 {
  flex: 1 1 0%;
}
.flex {
  display: flex;
}

.text-center {
  text-align: center;
}

blockquote p{
  font-size: 0.8em;
}

================================================
FILE: deploy/doc/en-US/attention.md
================================================
---
layout: post
title: Attention
---
## Forbidden

- All Dom operation

## Import Change

- Use `angular-miniprogram/common` replace `@angular/common`
- Use `angular-miniprogram/common/http` replace `@angular/common/http`
- Use `angular-miniprogram/forms` replace `@angular/forms`
- Use `import { HttpClientModule, provideHttpClient } from 'angular-miniprogram'` replace `import { HttpClientModule, provideHttpClient } from '@angular/common/http'`

## Attention

- A event with prefix,like `bind`,`mut-bind`,etc,remove `:`,such as `bind:tap`=>`bindtap`
  > Prefix in Angular resolve as `target`(window/document/body)
- Miniprogram native component need set `schemas:[NO_ERRORS_SCHEMA]` in `NgModule`
- if property operation not display on view, need to use `detectChanges`
- Now, one file only allow one `@Component`

## Compatible

### Use Template

- `createEmbeddedView` only allow in `structural directive`,or `TemplateRef`
- `createEmbeddedView`need a `__templateName` property in `context` object,this property is miniprogram name
- this name can be find in a private variable: `(this.templateRef as any)._declarationTContainer.localNames[0]`
- only first `template variable` name can be use

```ts
@Directive({
  selector: '[appStructural1]',
})
export class Structural1Directive {
  @Input() appStructural1: TemplateRef<any>;
  @Input() appStructural1Name: string;
  constructor(private viewContainerRef: ViewContainerRef) {}
  ngOnInit(): void {
    this.viewContainerRef.createEmbeddedView(this.appStructural1, {
      __templateName: this.appStructural1Name,
    });
  }
}

```
### Template Rename

- `ng-template` name can't repeat in one Component, if exist, you can use mulit `template variable`
- `<ng-template #name1 #name2></ng-template>` `#name1` is the alias name, and `#name2` is the repeat name
- The first name will write in the template file, but all `template variable` can be use in Angular

### Cross Component use Template

- In same project, a Component use other Component `TemlateRef`,template name should follow this format`$$mp$$__self$$xxx`

  > `same application`or`same library` is same project


```html
<ng-template #$$mp$$__self__$$self1> content </ng-template>
<app-component-need-template
  [templateRef]="$$mp$$__self__$$self1"
></app-component-need-template>

```
- transfer `TemplateRef` to Other library Component, template name should follow this format`$$mp$$TemplateScopeName$$xxx`, `TemplateScopeName`rule as follow:

```ts
import { strings } from '@angular-devkit/core';
//library library name
export function libraryTemplateScopeName(library: string) {
  return strings.classify(library.replace(/[@/]/g, ''));
}
```

- for example: `test-library`=>`TestLibrary`,`@my/library`=>`MyLibrary`


```html
<ng-template #$$mp$$TestLibrary$$first>
  <app-component1></app-component1>
</ng-template>

<app-outside-template
  [template]="$$mp$$TestLibrary$$first"
></app-outside-template>
```

### Unrealized
- control flow
> This part of the functionality currently appears to be dynamically generated, and to convert it to static, we can only use some native methods of the mini program, but it cannot be matched 1:1, so we haven't thought of a good method yet

================================================
FILE: deploy/doc/en-US/index.md
================================================
---
title: 'angular-miniprogram'
layout: home
---
<h1 align="center">Develop MiniProgram using Angular </h1>

<p align="center"> Use Angular Ecosystem as possible, 
reduce cross-platform costs</p>

<p align="center">
  <a href="https://gitter.im/angular-miniprogram/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge">
    <img src="https://badges.gitter.im/angular-miniprogram/community.svg" alt="gitter" />
  </a>&nbsp;
    <a href="https://www.npmjs.com/package/angular-miniprogram">
    <img src="https://img.shields.io/npm/v/angular-miniprogram.svg?logo=npm&logoColor=fff&label=NPM+package&color=limegreen" alt="angular-miniprogram on npm" />
  </a>&nbsp;
    <a href="https://wszgrcy.github.io/angular-miniprogram/coverage/index.html">
    <img src="../assets/img/badge.svg" alt="coverage" />
  </a>

</p>


<hr>

## document

- [Quickstart](quick-start)
- [Attention](attention)
- [MiniProgramFeature](miniprogram-feature)
- [API](../api-doc)
- [life-time](life-time)
## Development Environment

### Prerequisites

- `Node.js` greater than 20
- `@angular/cli` 17

### hello-world

- use this Template [https://github.com/wszgrcy/angular-miniprogram-template](https://github.com/wszgrcy/angular-miniprogram-template) or download
- use `npm` install dependencies

### Quickstart

- [Quickstart](https://github.com/wszgrcy/angular-miniprogram/blob/master/quick-start-en.md)

## Ecosystem

- support all `Pipe` and `Service`
- compatible support `Directive`(a little different from web)
- one file only allow one `Component`

## Support Platform

| Platform Name | Run | Alias                   | comment                                                                                                                   |
| ------------- | --- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Wechat        | ✅  | Work Wechat             |                                                                                                                           |
| bytedance     | ✅  |                         |                                                                                                                           |
| jd            | ❌  |                         | no account                                                                                                                |
| baidu         | ✅  |                         |                                                                                                                           |
| Alipay        | ✅  | DingTalk,Alipay IoT,etc | can't compile in Prod, [see](https://forum.alipay.com/mini-app/post/65101060);can't use v2, while `slot` has some problem |
| qq            | ✅  |                         | unknown error?but can work                                                                                                |
| feishu        | ❌  |                         | like`bytedance`,but compile fail                                                                                          |


================================================
FILE: deploy/doc/en-US/life-time.md
================================================
---
layout: post
title: Life Time
---
# Component(Component)

- created
  > Wait for link (miniprogram component is associated with ng component)
- properties Change(first)
  > link(init with ng auto)
- attached
- ready

# Page(Page)

- onLoad
  > init and link
- onShow(first)
- onReady

# Page(Component)

- onLoad
- onShow(first)
- created
  > init
- attached
  > link
- onReady

# Component(Component) in Page(Page)


- ng-constructor(onLoad start)
> ng page Component
> init and link
- ng-constructor(component)
> ng component Component
- ng-ngOnInit
- ng-ngAfterContentInit
- ng-ngOnInit(component)
- ng-ngAfterContentInit(component)
- ng-ngAfterViewInit(component)
- ng-ngAfterViewInit
- mp-created(component)
- mp-attached(component)
> sub component link(after created ,before created)
- mp-onLoad(onLoad end)
- mp-onShow
- mp-onReady
- mp-ready(component)


================================================
FILE: deploy/doc/en-US/miniprogram-feature.md
================================================
---
layout: post
title: Miniprogram Feature
---
## Service

- `ComponentFinderService`: get MiniProgram Component corresponding to Angular Component


```ts  
import { ComponentFinderService } from 'angular-miniprogram';
//...  
{
  constructor(private componentFinderService: ComponentFinderService) {}
} 
```
## token

- `APP_TOKEN`: get App instance
- `PAGE_TOKEN`: get MiniProgram Page corresponding to Angular Component


```ts  
import {
  APP_TOKEN,
  PAGE_TOKEN,
} from 'angular-miniprogram';
//...  
{
    constructor(
    @Inject(APP_TOKEN) appInstance: any,
    @Inject(PAGE_TOKEN) pageInstance: any
  ) {}
} 
```
## api

- `pageStartup`: page entry

```ts
import { pageStartup } from 'angular-miniprogram';
//...
pageStartup(Page1Module, Page1Component);
```
- `componentRegistry`: component registry

```ts
import { componentRegistry } from 'angular-miniprogram';
//...
componentRegistry(Component1Component);

```
## Static property on @Component

- `static mpPageOptions`: like `Page(mpPageOptions)`
  > use when Component as a Page

```ts
@Component({
  selector: 'app-life-time',
  templateUrl: './life-time.component.html',
})
export class LifeTimePage implements OnInit {
  static mpPageOptions: WechatMiniprogram.Page.Options<{}, {}> = {
    onLoad: function (this: MiniProgramComponentInstance) {
      console.log('mp-onLoad', this.__ngComponentInstance);
    },
    onShow: function () {
      console.log('mp-onShow', this.__ngComponentInstance);
    },
    onReady: function (
      this: WechatMiniprogram.Page.Instance<{}, {}> &
        MiniProgramComponentInstance<LifeTimePage>
    ) {
      console.log('mp-onReady');
    },
  };
//...
}
```

- `static mpComponentOptions`: like `Component(mpComponentOptions)`
  > use when Component as a Component or a Page but `pageStartup` with `{useComponent:true}`

```ts
@Component({
  selector: 'app-life-time-component',
  templateUrl: './life-time.component.html',
  standalone: true,
})
export class LifeTimeComponent implements OnInit {
  static mpComponentOptions: WechatMiniprogram.Component.Options<{}, {}, {}> = {
    lifetimes: {
      created: function (this: MiniProgramComponentInstance) {
        console.log('created(component)');
      },
      attached: function () {
        console.log('attached(component)');
      },
      ready: function () {
        console.log('ready(component)');
      },
      moved: function () {
        console.log('moved(component)');
      },
      detached: function () {
        console.log('detached(component)');
      },
      error: function () {
        console.log('error(component)');
      },
    },
    pageLifetimes: {
      show: function () {
        console.log('page-show(component)');
      },
      hide: function () {
        console.log('page-hide(component)');
      },
      resize: function () {
        console.log('page-resize(component)');
      },
    },
  };
//...
}
```

## Global Variable

- `miniProgramPlatform`: string, hint miniprogram platform(`wx`,`zfb`,`zj`,`bdzn`,`qq`,`dd`,etc)


================================================
FILE: deploy/doc/en-US/quick-start.md
================================================
---
layout: post
title: Quick Start
---
## set Page pattern

- Set output Page pattern in `angular.json`, same with `assets` field

```json
"pages": [
  {
    "glob": "**/*.entry.ts",
    "input": "./src/pages",
    "output": "pages"
  }
]
```

- This config is, in `src/pages` dir match `*.entry.ts` file, and output in`[outputDir]/pages` Dir

## add a Page

- Create code with the following structure

```tree
├── page1.component.html
├── page1.component.scss
├── page1.component.ts
├── page1.entry.json
├── page1.entry.ts
└── page1.module.ts
```

- Create a `page1.entry.ts` file, add code as follow

```ts
import { pageStartup } from 'angular-miniprogram';
import { Page1Component } from './page1.component';
import { Page1Module } from './page1.module';

pageStartup(Page1Module, Page1Component);
```

## set Component pattern

- Set output Component pattern in `angular.json`, same with `assets` field

```json
"components":[
         {
           "glob": "**/*.entry.ts",
           "input": "./src/components",
           "output": "components"
         }
       ]
```

## add a Component

- Create code with the following structure

```tree
├── component1.component.html
├── component1.component.scss
├── component1.component.ts
├── component1.entry.json
├── component1.entry.ts
└── component1.module.ts
```

- Create a `component1.entry.ts` file, add code as follow

```ts
import { componentRegistry } from 'angular-miniprogram';
import { Component1Component } from './component1.component';

componentRegistry(Component1Component);
```

- This code is registry Component as a miniprogram Component
- because of auto init, so use `Registry`


================================================
FILE: deploy/doc/index.md
================================================
---
layout: redirect
---

================================================
FILE: deploy/doc/zh-Hans/attention.md
================================================
---
layout: post
title: 注意事项
---
## 禁止使用

- 一切 dom 行为
- 带前缀的事件,如`bind`,`mut-bind`等,去掉冒号直接写,如事件`bind:tap`=>`bindtap`
  > 前缀在 Angular 被解析为 target(window/document/body)

## 引入变更

- 使用`angular-miniprogram/common`代替`@angular/common`,
- 使用`angular-miniprogram/common/http`代替`@angular/common/http`
- 使用`angular-miniprogram/forms`代替`@angular/forms`
- 使用`import { HttpClientModule, provideHttpClient } from 'angular-miniprogram'`代替`import { HttpClientModule, provideHttpClient } from '@angular/common/http'`

## 注意

- 小程序的原生组件需要在`NgModule`中设置 `schemas:[NO_ERRORS_SCHEMA]` ,规避检测
- 元素属性赋值操作如果无法响应变更检测,使用`detectChanges`即可
- 目前,一个文件内只能有一个组件存在

## 兼容性支持

### 模板使用

- `createEmbeddedView`方法只能在结构型指令,或非结构型指令但是为模板引用`TemplateRef`中使用
- 当使用`createEmbeddedView`进行插入时,需要在上下文中的对象传递`__templateName`属性,这个属性为小程序的实际对应模板名
- 此模板名也可以访问`TemplateRef`实例的私有变量获得`(this.templateRef as any)._declarationTContainer.localNames[0]`

```ts
@Directive({
  selector: '[appStructural1]',
})
export class Structural1Directive {
  @Input() appStructural1: TemplateRef<any>;
  @Input() appStructural1Name: string;
  constructor(private viewContainerRef: ViewContainerRef) {}
  ngOnInit(): void {
    this.viewContainerRef.createEmbeddedView(this.appStructural1, {
      __templateName: this.appStructural1Name,
    });
  }
}

```
### 模板重命名

- 模板会在编译时编译为静态模板,所以可能存在重命名的情况,`如果`存在这种情况,可以使用多模板引用变量的方式实现
- `<ng-template #name1 #name2></ng-template>` `#name2`为可能重复的那个命名,`#name1`为编译到模板中的名字
- 第一个命名始终为模板的真实命名,但是所有的`模板引用变量`都可以引用

### 跨组件调用模板

- 在同一项目下,让其他组件接收到模板时,模板名定义需为`$$mp$$__self$$xxx`,这样就可以在同一项目下传递
  > `同一application`或`同一library`下,都叫同一项目

```html
<ng-template #$$mp$$__self__$$self1> content </ng-template>
<app-component-need-template
  [templateRef]="$$mp$$__self__$$self1"
></app-component-need-template>

```
- 当需要给 library 组件中传入模板时,需要将模板名定义为`$$mp$$TemplateScopeName$$xxx`, `TemplateScopeName`生成规则如下

```ts
import { strings } from '@angular-devkit/core';
//library 为当前libary的名字
export function libraryTemplateScopeName(library: string) {
  return strings.classify(library.replace(/[@/]/g, ''));
}
```

- 如`test-library`库为`TestLibrary`,`@my/library`库为`MyLibrary`

```html
<ng-template #$$mp$$TestLibrary$$first>
  <app-component1></app-component1>
</ng-template>

<app-outside-template
  [template]="$$mp$$TestLibrary$$first"
></app-outside-template>
```


### 未实现
- 控制流(control flow)
> 这部分功能目前看起来是动态生成的,要转换为静态的就只能用小程序原生的一些方法,但是又没法1:1对应,所以暂时没想到好方法

================================================
FILE: deploy/doc/zh-Hans/index.md
================================================
---
title: 'angular-miniprogram'
layout: home
---

<h1 align="center">使用 Angular 开发小程序 </h1>

<p align="center">尽可能使用 Angular 已有生态,降低跨平台时所需成本</p>

<p align="center">
  <a href="https://gitter.im/angular-miniprogram/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge">
    <img src="https://badges.gitter.im/angular-miniprogram/community.svg" alt="gitter" />
  </a>&nbsp;
    <a href="https://www.npmjs.com/package/angular-miniprogram">
    <img src="https://img.shields.io/npm/v/angular-miniprogram.svg?logo=npm&logoColor=fff&label=NPM+package&color=limegreen" alt="angular-miniprogram on npm" />
  </a>&nbsp;
    <a href="https://wszgrcy.github.io/angular-miniprogram/coverage/index.html">
    <img src="../assets/img/badge.svg" alt="coverage" />
  </a>&nbsp;
    <a href="javascript: void(0);">
    <img src="https://img.shields.io/badge/QQ%E7%BE%A4-287566685-brightgreen" alt="coverage" />
  </a>

</p>


<hr>

## 文档

- [快速启动](quick-start)
- [注意事项](attention)
- [小程序特性](miniprogram-feature)
- [API](../api-doc)
- [生命周期](life-time)
## 开发环境

### 前提条件

- `Node.js` 版本大于 20
- `@angular/cli` 版本为 17

### hello-world

- 使用[https://github.com/wszgrcy/angular-miniprogram-template](https://github.com/wszgrcy/angular-miniprogram-template)模板或将此项目下载
- 使用 npm 安装依赖

### 快速启动

- [快速启动](quick-start)

## 生态

- 支持`Angular`的全部服务及管道
- 兼容性支持指令(与 Angular 不同)
- 组件目前在一个文件中只能存在一个

## 支持平台

| 平台名    | 是否实现 | 关联               | 注释                                                                                                              |
| --------- | -------- | ------------------ | ----------------------------------------------------------------------------------------------------------------- |
| 微信      | ✅       | 企业微信           |                                                                                                                   |
| 字节跳动  | ✅       |                    |                                                                                                                   |
| 京东      | ❌       |                    | 没有账号                                                                                                          |
| 百度智能  | ✅       |                    |                                                                                                                   |
| 支付宝    | ✅       | 钉钉,支付宝 IoT 等 | 不能使用 Prod,问题[参见](https://forum.alipay.com/mini-app/post/65101060);不能使用基础库 2.0 编译,slot 有部分问题 |
| qq 小程序 | ✅       |                    | (非微信变种),但是事件有未知报错?但是好像也不影响                                                                  |
| 飞书      | ❌       |                    | 与字节跳动类似,但是编译有点问题                                                                                   |


================================================
FILE: deploy/doc/zh-Hans/life-time.md
================================================
---
layout: post
title: 生命周期
---
# 组件(Component)

- created
  > 等待链接(小程序 Component 与 ng Component 关联)
- properties 变更(第一次)
  > 链接(ng自动初始化)
- attached
- ready

# 页面(Page)

- onLoad
  > 初始化并链接
- onShow(第一次)
- onReady

# 页面(Component)

- onLoad
- onShow(第一次)
- created
  > 初始化
- attached
  > 链接
- onReady


# 组件(Component)在页面(Page)中

- ng-constructor(onLoad 开始)
> 页面组件
> 初始化并链接
- ng-constructor(component)
> 子组件
- ng-ngOnInit
- ng-ngAfterContentInit
- ng-ngOnInit(component)
- ng-ngAfterContentInit(component)
- ng-ngAfterViewInit(component)
- ng-ngAfterViewInit
- mp-created(component)
> 子组件链接(created之后,attached之前)
- mp-attached(component)
- mp-onLoad(onLoad 末尾)
- mp-onShow
- mp-onReady
- mp-ready(component)


================================================
FILE: deploy/doc/zh-Hans/miniprogram-feature.md
================================================
---
layout: post
title: 小程序特性
---
## 服务

- 通过`ComponentFinderService`服务来查询当前 ng 组件实例对应的小程序组件


```ts  
import { ComponentFinderService } from 'angular-miniprogram';
//...  
{
  constructor(private componentFinderService: ComponentFinderService) {}
} 
```
## token

- 通过`APP_TOKEN`可以获得 App 实例
- 通过`PAGE_TOKEN`可以获得组件对应的小程序页面实例

```ts  
import {
  APP_TOKEN,
  PAGE_TOKEN,
} from 'angular-miniprogram';
//...  
{
    constructor(
    @Inject(APP_TOKEN) appInstance: any,
    @Inject(PAGE_TOKEN) pageInstance: any
  ) {}
} 
```
## api

- `pageStartup`函数作为 page 的启动入口

```ts
import { pageStartup } from 'angular-miniprogram';
//...
pageStartup(Page1Module, Page1Component);
```
- `componentRegistry`组件注册

```ts
import { componentRegistry } from 'angular-miniprogram';
//...
componentRegistry(Component1Component);

```
## 组件上静态属性

- 在`Angular`@Component 组件中添加`static mpPageOptions`进行配置传参,与`Page({})`等同
  > 当使用`pageStartup`函数时,使用此方法

```ts
@Component({
  selector: 'app-life-time',
  templateUrl: './life-time.component.html',
})
export class LifeTimePage implements OnInit {
  static mpPageOptions: WechatMiniprogram.Page.Options<{}, {}> = {
    onLoad: function (this: MiniProgramComponentInstance) {
      console.log('mp-onLoad', this.__ngComponentInstance);
    },
    onShow: function () {
      console.log('mp-onShow', this.__ngComponentInstance);
    },
    onReady: function (
      this: WechatMiniprogram.Page.Instance<{}, {}> &
        MiniProgramComponentInstance<LifeTimePage>
    ) {
      console.log('mp-onReady');
    },
  };
//...
}
```
- 在`Angular`@Component 组件中添加`static mpComponentOptions`进行配置传参,与`Component({})`等同
  > 当使用`componentRegistry`函数时或使用`pageStartup`函数,但是 options 为`{useComponent:true}`,使用此方法

```ts
@Component({
  selector: 'app-life-time-component',
  templateUrl: './life-time.component.html',
  standalone: true,
})
export class LifeTimeComponent implements OnInit {
  static mpComponentOptions: WechatMiniprogram.Component.Options<{}, {}, {}> = {
    lifetimes: {
      created: function (this: MiniProgramComponentInstance) {
        console.log('created(component)');
      },
      attached: function () {
        console.log('attached(component)');
      },
      ready: function () {
        console.log('ready(component)');
      },
      moved: function () {
        console.log('moved(component)');
      },
      detached: function () {
        console.log('detached(component)');
      },
      error: function () {
        console.log('error(component)');
      },
    },
    pageLifetimes: {
      show: function () {
        console.log('page-show(component)');
      },
      hide: function () {
        console.log('page-hide(component)');
      },
      resize: function () {
        console.log('page-resize(component)');
      },
    },
  };
//...
}
```

## 全局变量

- `miniProgramPlatform`为一个 string 类型的全局变量,指示当前小程序的运行平台(`wx`,`zfb`,`zj`,`bdzn`,`qq`,`dd`等)


================================================
FILE: deploy/doc/zh-Hans/quick-start.md
================================================
---
layout: post
title: 快速启动
---
## 设置页面匹配

- 在`angular.json`中设置要匹配的页面范围,匹配规则与 assets 相同

```json
"pages": [
  {
    "glob": "**/*.entry.ts",
    "input": "./src/pages",
    "output": "pages"
  }
]
```

- 上述配置为,在 src/pages 文件夹中,匹配`*.entry.ts`文件,并且编译完成导出在`[输出文件夹]/pages`文件夹中

## 添加一个页面

- 建立如下结构的代码

```tree
├── page1.component.html
├── page1.component.scss
├── page1.component.ts
├── page1.entry.json
├── page1.entry.ts
└── page1.module.ts
```

- 新建一个`page1.entry.ts`,输入如下

```ts
import { pageStartup } from 'angular-miniprogram';
import { Page1Component } from './page1.component';
import { Page1Module } from './page1.module';

pageStartup(Page1Module, Page1Component);
```

## 设置组件匹配

- 在`angular.json`中设置要匹配的组件范围,匹配规则与 assets 相同

```json
"components":[
         {
           "glob": "**/*.entry.ts",
           "input": "./src/components",
           "output": "components"
         }
       ]
```

## 添加一个组件

- 建立如下结构的代码

```tree
├── component1.component.html
├── component1.component.scss
├── component1.component.ts
├── component1.entry.json
├── component1.entry.ts
└── component1.module.ts
```

- 新建一个`component1.entry.ts`,输入如下

```ts
import { componentRegistry } from 'angular-miniprogram';
import { Component1Component } from './component1.component';

componentRegistry(Component1Component);
```

- 上述代码为注册为将一个普通组件注册为小程序组件
- 由于该组件的使用为自动初始化,所以使用了`注册`


================================================
FILE: jasmine.json
================================================
{
  "spec_dir": "src",
  "spec_files": ["**/*.spec.ts"],
  "failSpecWithNoExpectations": true,
  "stopSpecOnExpectationFailure": true,
  "stopOnSpecFailure": true,
  "random": false
}


================================================
FILE: package.json
================================================
{
  "name": "angular-miniprogram",
  "version": "0.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test:ci": "npm run build:library && npm run test:jasmine library&& npm run test:jasmine",
    "test": "npm run test:jasmine",
    "test:jasmine": "tsc -p ./script/tsconfig.startup-jasmine.json && node ./script/startup-jasmine.js",
    "prebuild": "rimraf ./dist",
    "build": " npm run build:library && npm run build:builder && npm run copy:assets && npm run build:karma",
    "copy:assets": "cpx \"./src/builder/**/*.json\" ./dist/builder && cpx \"./src/builder/**/*.js\" ./dist/builder && cpx ./readme.md ./dist",
    "build:library": "node ./script/start-build-library",
    "build:builder": "tsx ./script/build.ts ./tsconfig.builder.json",
    "build:karma": "tsx ./script/build.ts ./src/builder/karma/client/tsconfig.json && tsx ./script/build.ts ./src/builder/karma/plugin/tsconfig.json",
    "prepare": "husky install",
    "lint": "eslint --max-warnings 0 \"./**/*.ts\"",
    "sync": "code-recycle ./script/package-sync.ts --cwd ./src/library",
    "coverage": "nyc npm run test",
    "typedoc": "typedoc",
    "deploy": "npm run typedoc && npm run build:library && npm run test:jasmine library && npm run coverage-badge -- init && cpx \"./deploy/doc/**/*\" ./docs && cpx \"./deploy/api-doc/**/*\" ./docs/api-doc && npm run coverage && npm run coverage-badge -- success && cpx ./deploy/doc/assets/img/badge.svg ./docs/assets/img",
    "coverage-badge": "tsx ./script/coverage-badge.ts"
  },
  "private": true,
  "author": "wszgrcy",
  "license": "MIT",
  "devDependencies": {
    "@angular-devkit/architect": "0.1703.1",
    "@angular-devkit/build-angular": "17.3.1",
    "@angular-devkit/core": "17.3.1",
    "@angular-devkit/schematics": "17.3.1",
    "@angular/compiler": "17.3.1",
    "@angular/compiler-cli": "17.3.1",
    "@angular/core": "17.3.1",
    "@code-recycle/cli": "^1.3.10",
    "@commitlint/cli": "^13.1.0",
    "@commitlint/config-conventional": "^13.1.0",
    "@ngtools/webpack": "17.3.1",
    "@types/fs-extra": "11.0.4",
    "@types/glob": "^7.2.0",
    "@types/jasmine": "^3.7.7",
    "@types/karma": "^6.3.3",
    "@types/node": "20.11.30",
    "@types/socket.io-client": "^3.0.0",
    "@typescript-eslint/eslint-plugin": "^5.44.0",
    "@typescript-eslint/parser": "^5.44.0",
    "cpx": "^1.5.0",
    "cross-env": "^7.0.3",
    "cyia-ngx-devkit": "0.0.5",
    "eslint": "^7.32.0",
    "eslint-config-prettier": "^8.5.0",
    "eslint-plugin-import": "^2.26.0",
    "fs-extra": "11.2.0",
    "glob": "^7.2.0",
    "husky": "^7.0.0",
    "jasmine": "5.1.0",
    "jasmine-core": "5.1.2",
    "karma": "^6.3.17",
    "mini-types": "^0.1.7",
    "miniprogram-api-typings": "^3.12.2",
    "ng-packagr": "17.3.0",
    "prettier": "3.2.5",
    "pretty-quick": "4.0.0",
    "queue-microtask": "^1.2.3",
    "rimraf": "5.0.5",
    "rxjs": "^7.8.1",
    "static-injector": "4.0.2",
    "ts-node": "^10.9.2",
    "tslib": "2.6.2",
    "tsx": "^4.7.1",
    "typedoc": "^0.25.12",
    "typescript": "5.4.2",
    "weapp.socket.io": "^3.0.0",
    "webpack": "5.90.3",
    "zone.js": "0.14.4"
  },
  "dependencies": {
    "cyia-code-util": "^1.8.0",
    "nyc": "^15.1.0",
    "webpack-bootstrap-assets-plugin": "^2.0.3"
  },
  "resolutions": {}
}


================================================
FILE: readme.md
================================================
<h1 align="center">angular-miniprogram - 使用 Angular 开发小程序 </h1>

<p align="center">尽可能使用 Angular 已有生态,降低跨平台时所需成本</p>

- 文档 [https://wszgrcy.github.io/angular-miniprogram/](https://wszgrcy.github.io/angular-miniprogram/)
- document [https://wszgrcy.github.io/angular-miniprogram/en-US/](https://wszgrcy.github.io/angular-miniprogram/en-US/)


================================================
FILE: script/build-ng-package.ts
================================================
import * as path from 'path';
import { ngPackagrFactory } from '../src/builder/library/ng-packagr-factory';
async function main() {
  let packagr = await ngPackagrFactory(
    path.resolve(process.cwd(), './src/library/ng-package.json'),
    path.resolve(process.cwd(), './tsconfig.library.json')
  );

  await packagr.build();
}
main();


================================================
FILE: script/build.ts
================================================
import * as path from 'path';
import * as fs from 'fs';
import * as ts from 'typescript';
import { createTransformer } from 'static-injector/transform';
export function main() {
  let inputPath = process.argv[2];
  let filePath = path.resolve(process.cwd(), inputPath);
  let tsConfigBuffer = fs.readFileSync(filePath);
  let jsonSourceFile = ts.parseJsonText(filePath, tsConfigBuffer.toString());
  let config = ts.parseJsonSourceFileConfigFileContent(
    jsonSourceFile,
    ts.sys,
    path.dirname(filePath)
  );
  let program = ts.createProgram({
    rootNames: config.fileNames,
    options: config.options,
    projectReferences: config.projectReferences,
  });
  let errors = [
    ...program.getOptionsDiagnostics(),
    ...program.getGlobalDiagnostics(),
  ];
  program.getSourceFiles().forEach((sf) => {
    errors.push(
      ...program.getSyntacticDiagnostics(sf),
      ...program.getSemanticDiagnostics(sf)
    );
  });

  if (errors.length) {
    console.log(
      ts.formatDiagnostics(errors, {
        getCurrentDirectory: () => ts.sys.getCurrentDirectory(),
        getNewLine: () => ts.sys.newLine,
        getCanonicalFileName: (f: string) => f,
      })
    );
    return;
  }
  let transformer = createTransformer(program);
  program.emit(undefined, undefined, undefined, undefined, {
    before: [transformer],
  });
}

if (require.main === module) {
  main();
}


================================================
FILE: script/coverage-badge.ts
================================================
import * as fs from 'fs-extra';
import * as path from 'path';
enum Status {
  success = 'success',
  init = 'init',
}
function main() {
  let status = process.argv[2];
  let outputPath = path.join(
    process.cwd(),
    'deploy',
    'doc',
    'assets',
    'img',
    'badge.svg'
  );
  let content: string;
  if (status === Status.init) {
    content = svgFailedGenerate();
  } else if (status === Status.success) {
    let file = fs
      .readFileSync(
        path.join(process.cwd(), 'docs', 'coverage', 'coverage-summary.json')
      )
      .toString();
    let json = JSON.parse(file);
    console.log(json.total.lines.pct);
    content = svgGenerate(json.total.lines.pct + '%');
  }
  if (!fs.existsSync(path.dirname(outputPath))) {
    fs.mkdirSync(path.dirname(outputPath), { recursive: true });
  }
  fs.writeFileSync(outputPath, content);
}
function svgGenerate(percent: any) {
  return `
    <svg xmlns="http://www.w3.org/2000/svg" width="90" height="20">
      <defs>
        <linearGradient id="workflow-fill" x1="50%" y1="0%" x2="50%" y2="100%">
          <stop stop-color="#444D56" offset="0%"></stop>
          <stop stop-color="#24292E" offset="100%"></stop>
        </linearGradient>
        <linearGradient id="state-fill" x1="50%" y1="0%" x2="50%" y2="100%">
          <stop stop-color="#34D058" offset="0%"></stop>
          <stop stop-color="#28A745" offset="100%"></stop>
        </linearGradient>
      </defs>
      <g fill="none" fill-rule="evenodd">
        <g font-family="&#39;DejaVu Sans&#39;,Verdana,Geneva,sans-serif" font-size="11">
          <path id="workflow-bg" d="M0,3 C0,1.3431 1.3552,0 3.02702703,0 L40,0 L40,20 L3.02702703,20 C1.3552,20 0,18.6569 0,17 L0,3 Z" fill="url(#workflow-fill)" fill-rule="nonzero"></path>
          <text fill="#010101" fill-opacity=".3">
            <tspan x="22.1981982" y="15">CI</tspan>
          </text>
          <text fill="#FFFFFF">
            <tspan x="22.1981982" y="14">CI</tspan>
          </text>
        </g>
        <g transform="translate(40)" font-family="&#39;DejaVu Sans&#39;,Verdana,Geneva,sans-serif" font-size="11">
          <path d="M0 0h46.939C48.629 0 50 1.343 50 3v14c0 1.657-1.37 3-3.061 3H0V0z" id="state-bg" fill="url(#state-fill)" fill-rule="nonzero"></path>
          <text fill="#010101" fill-opacity=".3">
            <tspan x="4" y="15">${percent}</tspan>
          </text>
          <text fill="#FFFFFF">
            <tspan x="4" y="14">${percent}</tspan>
          </text>
        </g>
        <path fill="#959DA5" d="M11 3c-3.868 0-7 3.132-7 7a6.996 6.996 0 0 0 4.786 6.641c.35.062.482-.148.482-.332 0-.166-.01-.718-.01-1.304-1.758.324-2.213-.429-2.353-.822-.079-.202-.42-.823-.717-.99-.245-.13-.595-.454-.01-.463.552-.009.946.508 1.077.718.63 1.058 1.636.76 2.039.577.061-.455.245-.761.446-.936-1.557-.175-3.185-.779-3.185-3.456 0-.762.271-1.392.718-1.882-.07-.175-.315-.892.07-1.855 0 0 .586-.183 1.925.718a6.5 6.5 0 0 1 1.75-.236 6.5 6.5 0 0 1 1.75.236c1.338-.91 1.925-.718 1.925-.718.385.963.14 1.68.07 1.855.446.49.717 1.112.717 1.882 0 2.686-1.636 3.28-3.194 3.456.254.219.473.639.473 1.295 0 .936-.009 1.689-.009 1.925 0 .184.131.402.481.332A7.011 7.011 0 0 0 18 10c0-3.867-3.133-7-7-7z"></path>
      </g>
    </svg>
    
    `;
}
function svgFailedGenerate() {
  return `
  <svg xmlns="http://www.w3.org/2000/svg" width="83" height="20">
    <defs>
      <linearGradient id="workflow-fill" x1="50%" y1="0%" x2="50%" y2="100%">
        <stop stop-color="#444D56" offset="0%"></stop>
        <stop stop-color="#24292E" offset="100%"></stop>
      </linearGradient>
      <linearGradient id="state-fill" x1="50%" y1="0%" x2="50%" y2="100%">
        <stop stop-color="#D73A49" offset="0%"></stop>
        <stop stop-color="#CB2431" offset="100%"></stop>
      </linearGradient>
    </defs>
    <g fill="none" fill-rule="evenodd">
      <g font-family="&#39;DejaVu Sans&#39;,Verdana,Geneva,sans-serif" font-size="11">
        <path id="workflow-bg" d="M0,3 C0,1.3431 1.3552,0 3.02702703,0 L40,0 L40,20 L3.02702703,20 C1.3552,20 0,18.6569 0,17 L0,3 Z" fill="url(#workflow-fill)" fill-rule="nonzero"></path>
        <text fill="#010101" fill-opacity=".3">
          <tspan x="22.1981982" y="15">CI</tspan>
        </text>
        <text fill="#FFFFFF">
          <tspan x="22.1981982" y="14">CI</tspan>
        </text>
      </g>
      <g transform="translate(40)" font-family="&#39;DejaVu Sans&#39;,Verdana,Geneva,sans-serif" font-size="11">
        <path d="M0 0h40.47C41.869 0 43 1.343 43 3v14c0 1.657-1.132 3-2.53 3H0V0z" id="state-bg" fill="url(#state-fill)" fill-rule="nonzero"></path>
        <text fill="#010101" fill-opacity=".3">
          <tspan x="5" y="15">failing</tspan>
        </text>
        <text fill="#FFFFFF">
          <tspan x="5" y="14">failing</tspan>
        </text>
      </g>
      <path fill="#959DA5" d="M11 3c-3.868 0-7 3.132-7 7a6.996 6.996 0 0 0 4.786 6.641c.35.062.482-.148.482-.332 0-.166-.01-.718-.01-1.304-1.758.324-2.213-.429-2.353-.822-.079-.202-.42-.823-.717-.99-.245-.13-.595-.454-.01-.463.552-.009.946.508 1.077.718.63 1.058 1.636.76 2.039.577.061-.455.245-.761.446-.936-1.557-.175-3.185-.779-3.185-3.456 0-.762.271-1.392.718-1.882-.07-.175-.315-.892.07-1.855 0 0 .586-.183 1.925.718a6.5 6.5 0 0 1 1.75-.236 6.5 6.5 0 0 1 1.75.236c1.338-.91 1.925-.718 1.925-.718.385.963.14 1.68.07 1.855.446.49.717 1.112.717 1.882 0 2.686-1.636 3.28-3.194 3.456.254.219.473.639.473 1.295 0 .936-.009 1.689-.009 1.925 0 .184.131.402.481.332A7.011 7.011 0 0 0 18 10c0-3.867-3.133-7-7-7z"></path>
    </g>
  </svg>
  
  `;
}
main();


================================================
FILE: script/package-sync.ts
================================================
import {
  type NodeQueryOption,
  type ScriptFunction,
  type FileQueryLayer,
  completePromise,
  fileBufferToString,
  stringToFileBuffer,
} from '@code-recycle/cli';
const templateName = `__templateName`;

function getTemplateNameExpressionStr(templateRefName: string) {
  return `(${templateRefName} as any)._declarationTContainer.localNames?(${templateRefName} as any)._declarationTContainer.localNames[0]:null`;
}
let fn: ScriptFunction = async (util, rule, host, injector) => {
  let path = util.path;

  let data = await rule.os.gitClone(
    'https://github.com/angular/angular.git',
    [
      '/packages/common',
      '/packages/forms',
      '!/packages/common/test',
      '!/packages/forms/test',
      '!**/*.bazel',
      '!**/*spec.ts',
      '!**/*.js',
      '!**/*.md',
    ],
    'packages',
    'branch',
    '17.3.1'
  );
  let exclude = [
    'forms/src/directives/default_value_accessor.ts',
    'forms/src/directives/checkbox_value_accessor.ts',
    // 'forms/src/directives/number_value_accessor.ts',
    'forms/src/directives/radio_control_value_accessor.ts',
    // 'forms/src/directives/range_value_accessor.ts',
    // 'forms/src/directives/select_control_value_accessor.ts',
    // 'forms/src/directives/select_multiple_control_value_accessor.ts',
    'forms/src/directives.ts',
    'forms/src/forms.ts',
  ];

  for (const key in data) {
    if (exclude.includes(key)) {
      continue;
    }
    let buffer = data[key];
    if (key.startsWith('common')) {
      let content = fileBufferToString(buffer).replace(
        /@angular\/common/g,
        `angular-miniprogram/common`
      );
      buffer = stringToFileBuffer(content);
    }
    await completePromise(host.write(path.normalize(key), buffer));
  }
  let list = await util.changeList([
    {
      path: './common/src/directives/ng_for_of.ts',
      list: [
        {
          query: `Constructor>CloseParenToken`,
          insertBefore: true,
          replace: `public ${templateName}:string`,
        },
        {
          query: `NewExpression:like(new NgForOfContext)>CloseParenToken`,
          insertBefore: true,
          replace: `,${getTemplateNameExpressionStr('this._template')}`,
        },
      ],
    },
    {
      path: './common/src/directives/ng_if.ts',
      list: [
        {
          query: `IfStatement:has(>PrefixUnaryExpression:like(this._thenViewRef) ) CallExpression:like(this._viewContainer.createEmbeddedView)>OpenParenToken+*::children(2)`,
          replace: `{...{{''|ctxValue}},${templateName}:${getTemplateNameExpressionStr(
            'this._thenTemplateRef'
          )}}`,
        },
        {
          query: `IfStatement:has(>PrefixUnaryExpression:like(this._elseViewRef) ) CallExpression:like(this._viewContainer.createEmbeddedView)>OpenParenToken+*::children(2)`,
          replace: `{...{{''|ctxValue}},${templateName}:${getTemplateNameExpressionStr(
            'this._elseTemplateRef'
          )}}`,
        },
        {
          query: `ClassDeclaration:has(>Identifier[value=NgIfContext])>CloseBraceToken`,
          insertBefore: true,
          replace: `public ${templateName}!:string`,
        },
      ],
    },
    {
      path: `./common/src/directives/ng_switch.ts`,
      list: [
        {
          query: `CallExpression:like(this._viewContainerRef.createEmbeddedView)>CloseParenToken`,
          insertBefore: true,
          replace: `,{${templateName}:${getTemplateNameExpressionStr(
            'this._templateRef'
          )}}`,
        },
      ],
    },
    {
      path: `./common/src/directives/ng_template_outlet.ts`,
      list: [
        {
          query: `CallExpression:like(viewContainerRef.createEmbeddedView)>OpenParenToken+*::children(2)`,
          replace: `{...{{''|ctxValue}},${templateName}:${getTemplateNameExpressionStr(
            'this.ngTemplateOutlet'
          )}}as any`,
        },
      ],
    },
    {
      path: `./common/src/common.ts`,
      list: [
        {
          query: `ExportDeclaration:has(StringLiteral[value*=i18n])`,
          delete: true,
          multi: true,
        },
        {
          query: `ExportSpecifier[value^=I18n]:use(*,*+*)`,
          delete: true,
          multi: true,
        },
        {
          query: `ExportSpecifier[value=NgComponentOutlet]:use(*,*+*)`,
          delete: true,
          multi: true,
        },
      ],
    },
    {
      path: `./common/src/pipes/index.ts`,
      list: [
        {
          query: `ImportDeclaration:has(Identifier[value^=I18n])`,
          multi: true,
          delete: true,
        },
        {
          query: `ExportSpecifier[value^=I18n]:use(*,*+*)`,
          delete: true,
          multi: true,
        },
        {
          query: `ArrayLiteralExpression Identifier[value^=I18n]:use(*,*+*)`,
          delete: true,
          multi: true,
        },
      ],
    },
    {
      path: `./common/src/directives/index.ts`,
      list: [
        {
          query: `ImportDeclaration:has(Identifier[value=NgComponentOutlet])`,
          multi: true,
          delete: true,
        },
        {
          query: `ExportSpecifier[value=NgComponentOutlet]:use(*,*+*)`,
          delete: true,
          multi: true,
        },
        {
          query: `ArrayLiteralExpression Identifier[value=NgComponentOutlet]:use(*,*+*)`,
          delete: true,
          multi: true,
        },
      ],
    },
  ]);
  await util.updateChangeList(list);
};
export default fn;


================================================
FILE: script/registry-transformer.js
================================================
let { register } = require('ts-node');
let path = require('path');
let { createTransformer } = require('static-injector/transform');
module.exports = function registerTsNode() {
  register({
    project: path.resolve(__dirname, '../tsconfig.spec.json'),
    transformers: (program) => {
      const transformer = createTransformer(program);
      return {
        before: [transformer],
      };
    },
  });
};


================================================
FILE: script/schema-merge.ts
================================================
import * as fs from 'fs';
import * as path from 'path';
function merge(origin: string, additional: string, output: string) {
  origin = require.resolve(origin);
  additional = require.resolve(additional);
  let originFile = JSON.parse(fs.readFileSync(origin).toString());
  let additionalFile = JSON.parse(fs.readFileSync(additional).toString());
  let outputAbsolutePath = path.resolve(path.dirname(additional), output);
  originFile['properties'] = {
    ...additionalFile['properties'],
    ...originFile['properties'],
  };
  originFile['definitions'] = {
    ...originFile['definitions'],
    ...additionalFile['definitions'],
  };
  fs.writeFileSync(
    outputAbsolutePath,
    JSON.stringify(originFile, undefined, 2)
  );
}
function main() {
  merge(
    '@angular-devkit/build-angular/src/browser/schema.json',
    '../src/builder/application/schema.base.json',
    './schema.json'
  );
}
main();


================================================
FILE: script/start-build-library.js
================================================
let registerTsNode = require('./registry-transformer');
registerTsNode();
require('./build-ng-package');


================================================
FILE: script/startup-jasmine.ts
================================================
import { register } from 'ts-node';
import { createTransformer } from 'static-injector/transform';
import Jasmine from 'jasmine';
import path from 'path';

register({
  project: path.resolve(__dirname, '../tsconfig.spec.json'),
  transformers: (program) => {
    const transformer = createTransformer(program);
    return {
      before: [transformer],
    };
  },
  logError: true,
});
let jasmineInstance = new Jasmine();
let args = process.argv.slice(2) || [];
jasmineInstance.loadConfigFile(path.resolve(__dirname, '../jasmine.json'));
jasmineInstance.execute(undefined, args[0] || undefined);


================================================
FILE: script/tsconfig.json
================================================
{
  "extends": "../tsconfig.base.json",
  "compilerOptions": {
    "esModuleInterop": true,
    "downlevelIteration": true
  },
  "include": ["**/*.ts"],
  "exclude": []
}


================================================
FILE: script/tsconfig.startup-jasmine.json
================================================
{
  "extends": "./tsconfig.json",
  "compilerOptions": { "skipLibCheck": true, "outDir": "." },
  "files": ["./startup-jasmine.ts"],
  "include": [],
  "exclude": []
}


================================================
FILE: src/builder/angular-internal/ast.type.ts
================================================
import type {
  TmplAstBoundAttribute,
  TmplAstBoundEvent,
  TmplAstBoundText,
  TmplAstContent,
  TmplAstElement,
  TmplAstIcu,
  TmplAstNode,
  TmplAstRecursiveVisitor,
  TmplAstReference,
  TmplAstTemplate,
  TmplAstText,
  TmplAstTextAttribute,
  TmplAstVariable,
} from '@angular/compiler';

export type Element = TmplAstElement;
export type Template = TmplAstTemplate;

export type Content = TmplAstContent;
export type Variable = TmplAstVariable;
export type Reference = TmplAstReference;
export type TextAttribute = TmplAstTextAttribute;
export type BoundAttribute = Parameters<
  TmplAstRecursiveVisitor['visitBoundAttribute']
>[0];
export type BoundEvent = TmplAstBoundEvent;
export type Text = TmplAstText;
export type BoundText = TmplAstBoundText;
export type Icu = TmplAstIcu;
export type Node = TmplAstNode;


================================================
FILE: src/builder/angular-internal/selector.ts
================================================
/* eslint-disable @typescript-eslint/no-this-alias */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable no-useless-escape */
/* eslint-disable no-irregular-whitespace */
/**
 * @license
 * Copyright Google LLC All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.io/license
 */

const _SELECTOR_REGEXP = new RegExp(
  '(\\:not\\()|' + // 1: ":not("
    '(([\\.\\#]?)[-\\w]+)|' + // 2: "tag"; 3: "."/"#";
    // "-" should appear first in the regexp below as FF31 parses "[.-\w]" as a range
    // 4: attribute; 5: attribute_string; 6: attribute_value
    '(?:\\[([-.\\w*\\\\$]+)(?:=(["\']?)([^\\]"\']*)\\5)?\\])|' + // "[name]", "[name=value]",
    // "[name="value"]",
    // "[name='value']"
    '(\\))|' + // 7: ")"
    '(\\s*,\\s*)', // 8: ","
  'g'
);

/**
 * These offsets should match the match-groups in `_SELECTOR_REGEXP` offsets.
 */
const enum SelectorRegexp {
  ALL = 0, // The whole match
  NOT = 1,
  TAG = 2,
  PREFIX = 3,
  ATTRIBUTE = 4,
  ATTRIBUTE_STRING = 5,
  ATTRIBUTE_VALUE = 6,
  NOT_END = 7,
  SEPARATOR = 8,
}
/**
 * A css selector contains an element name,
 * css classes and attribute/value pairs with the purpose
 * of selecting subsets out of them.
 */
export class CssSelector {
  element: string | null = null;
  classNames: string[] = [];
  /**
   * The selectors are encoded in pairs where:
   * - even locations are attribute names
   * - odd locations are attribute values.
   *
   * Example:
   * Selector: `[key1=value1][key2]` would parse to:
   * ```
   * ['key1', 'value1', 'key2', '']
   * ```
   */
  attrs: string[] = [];
  notSelectors: CssSelector[] = [];

  static parse(selector: string): CssSelector[] {
    const results: CssSelector[] = [];
    const _addResult = (res: CssSelector[], cssSel: CssSelector) => {
      if (
        cssSel.notSelectors.length > 0 &&
        !cssSel.element &&
        cssSel.classNames.length == 0 &&
        cssSel.attrs.length == 0
      ) {
        cssSel.element = '*';
      }
      res.push(cssSel);
    };
    let cssSelector = new CssSelector();
    let match: string[] | null;
    let current = cssSelector;
    let inNot = false;
    _SELECTOR_REGEXP.lastIndex = 0;
    // eslint-disable-next-line no-cond-assign
    while ((match = _SELECTOR_REGEXP.exec(selector))) {
      if (match[SelectorRegexp.NOT]) {
        if (inNot) {
          throw new Error('Nesting :not in a selector is not allowed');
        }
        inNot = true;
        current = new CssSelector();
        cssSelector.notSelectors.push(current);
      }
      const tag = match[SelectorRegexp.TAG];
      if (tag) {
        const prefix = match[SelectorRegexp.PREFIX];
        if (prefix === '#') {
          // #hash
          current.addAttribute('id', tag.substr(1));
        } else if (prefix === '.') {
          // Class
          current.addClassName(tag.substr(1));
        } else {
          // Element
          current.setElement(tag);
        }
      }
      const attribute = match[SelectorRegexp.ATTRIBUTE];

      if (attribute) {
        current.addAttribute(
          current.unescapeAttribute(attribute),
          match[SelectorRegexp.ATTRIBUTE_VALUE]
        );
      }
      if (match[SelectorRegexp.NOT_END]) {
        inNot = false;
        current = cssSelector;
      }
      if (match[SelectorRegexp.SEPARATOR]) {
        if (inNot) {
          throw new Error('Multiple selectors in :not are not supported');
        }
        _addResult(results, cssSelector);
        cssSelector = current = new CssSelector();
      }
    }
    _addResult(results, cssSelector);
    return results;
  }

  /**
   * Unescape `\$` sequences from the CSS attribute selector.
   *
   * This is needed because `$` can have a special meaning in CSS selectors,
   * but we might want to match an attribute that contains `$`.
   * [MDN web link for more
   * info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).
   * @param attr the attribute to unescape.
   * @returns the unescaped string.
   */
  unescapeAttribute(attr: string): string {
    let result = '';
    let escaping = false;
    for (let i = 0; i < attr.length; i++) {
      const char = attr.charAt(i);
      if (char === '\\') {
        escaping = true;
        continue;
      }
      if (char === '$' && !escaping) {
        throw new Error(
          `Error in attribute selector "${attr}". ` +
            `Unescaped "$" is not supported. Please escape with "\\$".`
        );
      }
      escaping = false;
      result += char;
    }
    return result;
  }

  /**
   * Escape `$` sequences from the CSS attribute selector.
   *
   * This is needed because `$` can have a special meaning in CSS selectors,
   * with this method we are escaping `$` with `\$'.
   * [MDN web link for more
   * info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).
   * @param attr the attribute to escape.
   * @returns the escaped string.
   */
  escapeAttribute(attr: string): string {
    return attr.replace(/\\/g, '\\\\').replace(/\$/g, '\\$');
  }

  hasElementSelector(): boolean {
    return !!this.element;
  }

  setElement(element: string | null = null) {
    this.element = element;
  }

  addAttribute(name: string, value: string = '') {
    this.attrs.push(name, (value && value.toLowerCase()) || '');
  }

  addClassName(name: string) {
    this.classNames.push(name.toLowerCase());
  }

  toString(): string {
    let res: string = this.element || '';
    if (this.classNames) {
      this.classNames.forEach((klass) => (res += `.${klass}`));
    }
    if (this.attrs) {
      for (let i = 0; i < this.attrs.length; i += 2) {
        const name = this.escapeAttribute(this.attrs[i]);
        const value = this.attrs[i + 1];
        res += `[${name}${value ? '=' + value : ''}]`;
      }
    }
    this.notSelectors.forEach((notSelector) => (res += `:not(${notSelector})`));
    return res;
  }
}

/**
 * Reads a list of CssSelectors and allows to calculate which ones
 * are contained in a given CssSelector.
 */
export class SelectorMatcher<T = any> {
  static createNotMatcher(notSelectors: CssSelector[]): SelectorMatcher<null> {
    const notMatcher = new SelectorMatcher<null>();
    notMatcher.addSelectables(notSelectors, null);
    return notMatcher;
  }

  private _elementMap = new Map<string, SelectorContext<T>[]>();
  private _elementPartialMap = new Map<string, SelectorMatcher<T>>();
  private _classMap = new Map<string, SelectorContext<T>[]>();
  private _classPartialMap = new Map<string, SelectorMatcher<T>>();
  private _attrValueMap = new Map<string, Map<string, SelectorContext<T>[]>>();
  private _attrValuePartialMap = new Map<
    string,
    Map<string, SelectorMatcher<T>>
  >();
  private _listContexts: SelectorListContext[] = [];

  addSelectables(cssSelectors: CssSelector[], callbackCtxt?: T) {
    let listContext: SelectorListContext = null!;
    if (cssSelectors.length > 1) {
      listContext = new SelectorListContext(cssSelectors);
      this._listContexts.push(listContext);
    }
    for (let i = 0; i < cssSelectors.length; i++) {
      this._addSelectable(cssSelectors[i], callbackCtxt as T, listContext);
    }
  }

  /**
   * Add an object that can be found later on by calling `match`.
   * @param cssSelector A css selector
   * @param callbackCtxt An opaque object that will be given to the callback of the `match` function
   */
  private _addSelectable(
    cssSelector: CssSelector,
    callbackCtxt: T,
    listContext: SelectorListContext
  ) {
    let matcher: SelectorMatcher<T> = this;
    const element = cssSelector.element;
    const classNames = cssSelector.classNames;
    const attrs = cssSelector.attrs;
    const selectable = new SelectorContext(
      cssSelector,
      callbackCtxt,
      listContext
    );

    if (element) {
      const isTerminal = attrs.length === 0 && classNames.length === 0;
      if (isTerminal) {
        this._addTerminal(matcher._elementMap, element, selectable);
      } else {
        matcher = this._addPartial(matcher._elementPartialMap, element);
      }
    }

    if (classNames) {
      for (let i = 0; i < classNames.length; i++) {
        const isTerminal = attrs.length === 0 && i === classNames.length - 1;
        const className = classNames[i];
        if (isTerminal) {
          this._addTerminal(matcher._classMap, className, selectable);
        } else {
          matcher = this._addPartial(matcher._classPartialMap, className);
        }
      }
    }

    if (attrs) {
      for (let i = 0; i < attrs.length; i += 2) {
        const isTerminal = i === attrs.length - 2;
        const name = attrs[i];
        const value = attrs[i + 1];
        if (isTerminal) {
          const terminalMap = matcher._attrValueMap;
          let terminalValuesMap = terminalMap.get(name);
          if (!terminalValuesMap) {
            terminalValuesMap = new Map<string, SelectorContext<T>[]>();
            terminalMap.set(name, terminalValuesMap);
          }
          this._addTerminal(terminalValuesMap, value, selectable);
        } else {
          const partialMap = matcher._attrValuePartialMap;
          let partialValuesMap = partialMap.get(name);
          if (!partialValuesMap) {
            partialValuesMap = new Map<string, SelectorMatcher<T>>();
            partialMap.set(name, partialValuesMap);
          }
          matcher = this._addPartial(partialValuesMap, value);
        }
      }
    }
  }

  private _addTerminal(
    map: Map<string, SelectorContext<T>[]>,
    name: string,
    selectable: SelectorContext<T>
  ) {
    let terminalList = map.get(name);
    if (!terminalList) {
      terminalList = [];
      map.set(name, terminalList);
    }
    terminalList.push(selectable);
  }

  private _addPartial(
    map: Map<string, SelectorMatcher<T>>,
    name: string
  ): SelectorMatcher<T> {
    let matcher = map.get(name);
    if (!matcher) {
      matcher = new SelectorMatcher<T>();
      map.set(name, matcher);
    }
    return matcher;
  }

  /**
   * Find the objects that have been added via `addSelectable`
   * whose css selector is contained in the given css selector.
   * @param cssSelector A css selector
   * @param matchedCallback This callback will be called with the object handed into `addSelectable`
   * @return boolean true if a match was found
   */
  match(
    cssSelector: CssSelector,
    matchedCallback: ((c: CssSelector, a: T) => void) | null
  ): boolean {
    let result = false;
    const element = cssSelector.element!;
    const classNames = cssSelector.classNames;
    const attrs = cssSelector.attrs;

    for (let i = 0; i < this._listContexts.length; i++) {
      this._listContexts[i].alreadyMatched = false;
    }

    result =
      this._matchTerminal(
        this._elementMap,
        element,
        cssSelector,
        matchedCallback
      ) || result;
    result =
      this._matchPartial(
        this._elementPartialMap,
        element,
        cssSelector,
        matchedCallback
      ) || result;

    if (classNames) {
      for (let i = 0; i < classNames.length; i++) {
        const className = classNames[i];
        result =
          this._matchTerminal(
            this._classMap,
            className,
            cssSelector,
            matchedCallback
          ) || result;
        result =
          this._matchPartial(
            this._classPartialMap,
            className,
            cssSelector,
            matchedCallback
          ) || result;
      }
    }

    if (attrs) {
      for (let i = 0; i < attrs.length; i += 2) {
        const name = attrs[i];
        const value = attrs[i + 1];

        const terminalValuesMap = this._attrValueMap.get(name)!;
        if (value) {
          result =
            this._matchTerminal(
              terminalValuesMap,
              '',
              cssSelector,
              matchedCallback
            ) || result;
        }
        result =
          this._matchTerminal(
            terminalValuesMap,
            value,
            cssSelector,
            matchedCallback
          ) || result;

        const partialValuesMap = this._attrValuePartialMap.get(name)!;
        if (value) {
          result =
            this._matchPartial(
              partialValuesMap,
              '',
              cssSelector,
              matchedCallback
            ) || result;
        }
        result =
          this._matchPartial(
            partialValuesMap,
            value,
            cssSelector,
            matchedCallback
          ) || result;
      }
    }
    return result;
  }

  /** @internal */
  _matchTerminal(
    map: Map<string, SelectorContext<T>[]>,
    name: string,
    cssSelector: CssSelector,
    matchedCallback: ((c: CssSelector, a: any) => void) | null
  ): boolean {
    if (!map || typeof name !== 'string') {
      return false;
    }

    let selectables: SelectorContext<T>[] = map.get(name) || [];
    const starSelectables: SelectorContext<T>[] = map.get('*')!;
    if (starSelectables) {
      selectables = selectables.concat(starSelectables);
    }
    if (selectables.length === 0) {
      return false;
    }
    let selectable: SelectorContext<T>;
    let result = false;
    for (let i = 0; i < selectables.length; i++) {
      selectable = selectables[i];
      result = selectable.finalize(cssSelector, matchedCallback) || result;
    }
    return result;
  }

  /** @internal */
  _matchPartial(
    map: Map<string, SelectorMatcher<T>>,
    name: string,
    cssSelector: CssSelector,
    matchedCallback: ((c: CssSelector, a: any) => void) | null
  ): boolean {
    if (!map || typeof name !== 'string') {
      return false;
    }

    const nestedSelector = map.get(name);
    if (!nestedSelector) {
      return false;
    }
    // TODO(perf): get rid of recursion and measure again
    // TODO(perf): don't pass the whole selector into the recursion,
    // but only the not processed parts
    return nestedSelector.match(cssSelector, matchedCallback);
  }
}

export class SelectorListContext {
  alreadyMatched: boolean = false;

  constructor(public selectors: CssSelector[]) {}
}

// Store context to pass back selector and context when a selector is matched
export class SelectorContext<T = any> {
  notSelectors: CssSelector[];

  constructor(
    public selector: CssSelector,
    public cbContext: T,
    public listContext: SelectorListContext
  ) {
    this.notSelectors = selector.notSelectors;
  }

  finalize(
    cssSelector: CssSelector,
    callback: ((c: CssSelector, a: T) => void) | null
  ): boolean {
    let result = true;
    if (
      this.notSelectors.length > 0 &&
      (!this.listContext || !this.listContext.alreadyMatched)
    ) {
      const notMatcher = SelectorMatcher.createNotMatcher(this.notSelectors);
      result = !notMatcher.match(cssSelector, null);
    }
    if (
      result &&
      callback &&
      (!this.listContext || !this.listContext.alreadyMatched)
    ) {
      if (this.listContext) {
        this.listContext.alreadyMatched = true;
      }
      callback(this.selector, this.cbContext);
    }
    return result;
  }
}


================================================
FILE: src/builder/angular-internal/tags.ts
================================================
/**
 * @license
 * Copyright Google LLC All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.io/license
 */

export enum TagContentType {
  RAW_TEXT,
  ESCAPABLE_RAW_TEXT,
  PARSABLE_DATA,
}

export interface TagDefinition {
  closedByParent: boolean;
  implicitNamespacePrefix: string | null;
  isVoid: boolean;
  ignoreFirstLf: boolean;
  canSelfClose: boolean;
  preventNamespaceInheritance: boolean;

  isClosedByChild(name: string): boolean;
  getContentType(prefix?: string): TagContentType;
}

export function splitNsName(elementName: string): [string | null, string] {
  if (elementName[0] != ':') {
    return [null, elementName];
  }

  const colonIndex = elementName.indexOf(':', 1);

  if (colonIndex === -1) {
    throw new Error(
      `Unsupported format "${elementName}" expecting ":namespace:name"`
    );
  }

  return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];
}

// `<ng-container>` tags work the same regardless the namespace
export function isNgContainer(tagName: string): boolean {
  return splitNsName(tagName)[1] === 'ng-container';
}

// `<ng-content>` tags work the same regardless the namespace
export function isNgContent(tagName: string): boolean {
  return splitNsName(tagName)[1] === 'ng-content';
}

// `<ng-template>` tags work the same regardless the namespace
export function isNgTemplate(tagName: string): boolean {
  return splitNsName(tagName)[1] === 'ng-template';
}

export function getNsPrefix(fullName: string): string;
export function getNsPrefix(fullName: null): null;
export function getNsPrefix(fullName: string | null): string | null {
  return fullName === null ? null : splitNsName(fullName)[0];
}

export function mergeNsAndName(prefix: string, localName: string): string {
  return prefix ? `:${prefix}:${localName}` : localName;
}


================================================
FILE: src/builder/angular-internal/template.ts
================================================
/* eslint-disable @typescript-eslint/no-explicit-any */
/**
 * @license
 * Copyright Google LLC All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.io/license
 */

import type { CssSelector as CssSelectorType } from '@angular/compiler';
import { CssSelector } from './selector';
import { splitNsName } from './tags';
/**
 * Creates a `CssSelector` given a tag name and a map of attributes
 */
export function createCssSelector(
  elementName: string,
  attributes: { [name: string]: string }
): CssSelectorType {
  const cssSelector = new CssSelector();
  const elementNameNoNs = splitNsName(elementName)[1];

  cssSelector.setElement(elementNameNoNs);

  Object.getOwnPropertyNames(attributes).forEach((name) => {
    const nameNoNs = splitNsName(name)[1];
    const value = attributes[name];

    cssSelector.addAttribute(nameNoNs, value);
    if (name.toLowerCase() === 'class') {
      const classes = value.trim().split(/\s+/);
      classes.forEach((className) => cssSelector.addClassName(className));
    }
  });

  return cssSelector as any;
}


================================================
FILE: src/builder/angular-internal/util.ts
================================================
/**
 * @license
 * Copyright Google LLC All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.io/license
 */

import type * as t from './ast.type';

/**
 * Extract a map of properties to values for a given element or template node, which can be used
 * by the directive matching machinery.
 *
 * @param elOrTpl the element or template in question
 * @return an object set up for directive matching. For attributes on the element/template, this
 * object maps a property name to its (static) value. For any bindings, this map simply maps the
 * property name to an empty string.
 */
export function getAttrsForDirectiveMatching(elOrTpl: t.Element): {
  [name: string]: string;
} {
  const attributesMap: { [name: string]: string } = {};

  elOrTpl.attributes.forEach((a: { name: string; value: string }) => {
    if (!isI18nAttribute(a.name)) {
      attributesMap[a.name] = a.value;
    }
  });

  elOrTpl.inputs.forEach((i: { name: string | number }) => {
    attributesMap[i.name] = '';
  });
  elOrTpl.outputs.forEach((o: { name: string | number }) => {
    attributesMap[o.name] = '';
  });

  return attributesMap;
}

/** Name of the i18n attributes **/
export const I18N_ATTR = 'i18n';
export const I18N_ATTR_PREFIX = 'i18n-';

export function isI18nAttribute(name: string): boolean {
  return name === I18N_ATTR || name.startsWith(I18N_ATTR_PREFIX);
}


================================================
FILE: src/builder/application/const.ts
================================================
export const ExportMiniProgramAssetsPluginSymbol = Symbol.for(
  'ExportMiniProgramAssetsPluginSymbol'
);
export const LibrarySymbol = Symbol.for('LibrarySymbol');
export const InjectorSymbol = Symbol.for('InjectorSymbol');
export const TemplateScopeSymbol = Symbol.for('TemplateScopeSymbol');


================================================
FILE: src/builder/application/index.ts
================================================
import type { BuilderContext } from '@angular-devkit/architect';
import { createBuilder } from '@angular-devkit/architect';
import type {
  AssetPattern,
  BrowserBuilderOptions,
} from '@angular-devkit/build-angular';
import { executeBrowserBuilder } from '@angular-devkit/build-angular';
import { Injector } from 'static-injector';
import * as webpack from 'webpack';
import { PlatformType } from '../platform/platform';
import { getBuildPlatformInjectConfig } from '../platform/platform-inject-config';
import { WebpackConfigurationChangeService } from './webpack-configuration-change.service';

export default createBuilder(
  (
    angularOptions: BrowserBuilderOptions & {
      pages: AssetPattern[];
      components: AssetPattern[];
      platform: PlatformType;
    },
    context: BuilderContext
  ): ReturnType<typeof executeBrowserBuilder> => {
    return runBuilder(angularOptions, context);
  }
);

export function runBuilder(
  angularOptions: BrowserBuilderOptions & {
    pages: AssetPattern[];
    components: AssetPattern[];
    platform: PlatformType;
  },
  context: BuilderContext
): ReturnType<typeof executeBrowserBuilder> {
  return executeBrowserBuilder(angularOptions, context, {
    webpackConfiguration: async (options: webpack.Configuration) => {
      const injector = Injector.create({
        providers: [
          ...getBuildPlatformInjectConfig(angularOptions.platform),
          {
            provide: WebpackConfigurationChangeService,
            useFactory: (injector: Injector) => {
              return new WebpackConfigurationChangeService(
                angularOptions,
                context,
                options,
                injector
              );
            },
            deps: [Injector],
          },
        ],
      });
      const config = injector.get(WebpackConfigurationChangeService);
      config.init();
      await config.change();
      return options;
    },
  });
}


================================================
FILE: src/builder/application/library-template-scope.service.ts
================================================
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Injectable } from 'static-injector';
import * as webpack from 'webpack';
import { TemplateScopeSymbol } from './const';

export type TemplateScopeOutside = Omit<
  LibraryTemplateScopeService,
  Exclude<
    keyof LibraryTemplateScopeService,
    'setScopeLibraryUseComponents' | 'setScopeExtraUseComponents'
  >
>;
export interface ExtraTemplateData {
  useComponents: Record<string, string>;
  templateList: string[];
  configPath?: string;
  templatePath?: string;
}

@Injectable()
export class LibraryTemplateScopeService {
  private scopeExtraUseComponentsMap = new Map<string, ExtraTemplateData>();
  private scopeLibraryUseComponentsMap = new Map<string, ExtraTemplateData[]>();
  // 追加模板
  constructor() {}
  register(compilation: webpack.Compilation) {
    (compilation as any)[TemplateScopeSymbol] = {
      setScopeExtraUseComponents: this.setScopeExtraUseComponents,
      setScopeLibraryUseComponents: this.setScopeLibraryUseComponents,
    } as TemplateScopeOutside;
  }

  exportLibraryComponentConfig() {
    const list: {
      filePath: string;
      content: { component: boolean; usingComponents: Record<string, string> };
    }[] = [];
    this.scopeLibraryUseComponentsMap.forEach((obj, libraryScope) => {
      const extraData = this.scopeExtraUseComponentsMap.get(libraryScope) || {
        useComponents: {},
      };
      // if (!extraData) {
      //   throw new Error(`没有找到${libraryScope}对应的配置`);
      // }
      for (const item of obj) {
        const configPath = item.configPath!;
        const usingComponents = {
          ...item.useComponents,
          ...extraData.useComponents,
        };
        list.push({
          filePath: configPath,
          content: { component: true, usingComponents: usingComponents },
        });
      }
    });
    return list;
  }
  exportLibraryTemplate() {
    const fileGroup: Record<string, string> = {};
    this.scopeLibraryUseComponentsMap.forEach((obj, libraryScope) => {
      const extraData = this.scopeExtraUseComponentsMap.get(libraryScope) || {
        templateList: [],
      };
      // if (!extraData) {
      //   throw new Error(`没有找到${libraryScope}对应的配置`);
      // }
      for (const item of obj) {
        if (fileGroup[item.templatePath!]) {
          continue;
        }
        fileGroup[item.templatePath!] = extraData.templateList.join('');
      }
    });
    return fileGroup;
  }
  setScopeExtraUseComponents = (
    libraryScope: string,
    extraData: ExtraTemplateData
  ) => {
    const data: ExtraTemplateData = this.scopeExtraUseComponentsMap.get(
      libraryScope
    ) || { useComponents: {}, templateList: [] };
    this.scopeExtraUseComponentsMap.set(libraryScope, {
      useComponents: { ...data.useComponents, ...extraData.useComponents },
      templateList: [...data.templateList, ...extraData.templateList],
    });
  };

  setScopeLibraryUseComponents = (
    libraryScope: string,
    libraryUseComponents: ExtraTemplateData[]
  ) => {
    this.scopeLibraryUseComponentsMap.set(libraryScope, libraryUseComponents);
  };
}


================================================
FILE: src/builder/application/loader/component-template.loader.ts
================================================
import * as webpack from 'webpack';
import { changeComponent } from '../../component-template-inject/change-component';

export default async function (
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  this: webpack.LoaderContext<any>,
  data: string,
  map: string
) {
  const callback = this.async();
  const changeData = changeComponent(data)!;

  if (typeof data === 'undefined' || typeof changeData === 'undefined') {
    callback(undefined, data, map);
    return;
  }

  callback(undefined, changeData.content);
}


================================================
FILE: src/builder/application/loader/library-template.loader.ts
================================================
/* eslint-disable @typescript-eslint/no-explicit-any */
import { createCssSelectorForTs } from 'cyia-code-util';
import { Injector } from 'static-injector';
import { VariableDeclaration } from 'typescript';
import * as webpack from 'webpack';
import { TemplateScopeOutside } from '../../application/library-template-scope.service';
import { GLOBAL_TEMPLATE_SUFFIX } from '../../library';
import { ExtraTemplateData } from '../../library/type';
import { BuildPlatform } from '../../platform/platform';
import { literalResolve } from '../../util';
import { InjectorSymbol, TemplateScopeSymbol } from '../const';
import { LibraryTemplateLiteralConvertOptions } from '../type';

export default async function (
  this: webpack.LoaderContext<any>,
  data: string,
  map: string
) {
  const callback = this.async();
  const selector = createCssSelectorForTs(data);
  const injector: Injector = (this._compilation! as any)[InjectorSymbol];
  const buildPlatform = injector.get(BuildPlatform);
  const templateScopeOutside = (this._compilation as any)[
    TemplateScopeSymbol
  ] as TemplateScopeOutside;
  const selfTemplateNode = selector.queryOne(
    `VariableDeclaration[name="$self_${GLOBAL_TEMPLATE_SUFFIX}"]`
  ) as VariableDeclaration;
  if (selfTemplateNode) {
    const content = selfTemplateNode.initializer!.getText();
    const config: ExtraTemplateData = literalResolve(content);

    this.emitFile(
      config.outputPath + buildPlatform.fileExtname.contentTemplate,
      literalResolve<LibraryTemplateLiteralConvertOptions>(
        `\`${config.template}\``,
        {
          directivePrefix:
            buildPlatform.templateTransform.getData().directivePrefix,
          eventListConvert: buildPlatform.templateTransform.eventListConvert,
          templateInterpolation:
            buildPlatform.templateTransform.templateInterpolation,
          fileExtname: buildPlatform.fileExtname,
        }
      )
    );
  }
  const libraryTemplateNode = selector.queryOne(
    `VariableDeclaration[name="library_${GLOBAL_TEMPLATE_SUFFIX}"]`
  ) as VariableDeclaration;
  if (libraryTemplateNode) {
    const content = libraryTemplateNode.initializer!.getText();
    const config: Record<string, ExtraTemplateData> = literalResolve(content);

    for (const key in config) {
      if (Object.prototype.hasOwnProperty.call(config, key)) {
        const element = config[key];
        templateScopeOutside.setScopeExtraUseComponents(key, {
          useComponents: element.useComponents!,
          templateList: [element.template],
        });
      }
    }
  }
  callback(undefined, data, map);
}


================================================
FILE: src/builder/application/loader/library.loader.ts
================================================
/* eslint-disable @typescript-eslint/no-explicit-any */
import { dirname, join, normalize, strings } from '@angular-devkit/core';

import { createCssSelectorForTs } from 'cyia-code-util';
import ts from 'typescript';
import * as webpack from 'webpack';
import {
  ExtraTemplateData,
  TemplateScopeOutside,
} from '../../application/library-template-scope.service';
import {
  LIBRARY_COMPONENT_METADATA_SUFFIX,
  LIBRARY_OUTPUT_ROOTDIR,
} from '../../library';
import type { ExportLibraryComponentMeta } from '../../library';
import { libraryTemplateScopeName, literalResolve } from '../../util';
import {
  ExportMiniProgramAssetsPluginSymbol,
  LibrarySymbol,
  TemplateScopeSymbol,
} from '../const';
import type { LibraryLoaderContext } from '../type';
import { LibraryTemplateLiteralConvertOptions } from '../type';
import { ComponentTemplateLoaderContext } from './type';

export default async function (
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  this: webpack.LoaderContext<any>,
  data: string,
  map: string
) {
  const callback = this.async();
  const selector = createCssSelectorForTs(data);
  const list = selector.queryAll(
    `PropertyAccessExpression[name=ɵɵdefineComponent]~SyntaxList ObjectLiteralExpression PropertyAssignment[name=type]::initializer`
  );
  if (!list.length) {
    callback(undefined, data, map);
    return;
  }
  const context: ComponentTemplateLoaderContext = (this._compilation! as any)[
    ExportMiniProgramAssetsPluginSymbol
  ];
  const templateScopeOutside = (this._compilation as any)[
    TemplateScopeSymbol
  ] as TemplateScopeOutside;
  const scopeLibraryObj: Record<string, ExtraTemplateData[]> = {};
  for (let i = 0; i < list.length; i++) {
    const element = list[i] as ts.BinaryExpression;
    const componentName = element.getText();
    const extraNode = selector.queryOne(
      `VariableDeclaration[name="${componentName}_${LIBRARY_COMPONENT_METADATA_SUFFIX}"]`
    ) as ts.VariableDeclaration;
    if (!extraNode) {
      continue;
    }
    const content = extraNode.initializer!.getText();
    const meta: ExportLibraryComponentMeta = literalResolve(content);
    (this._compilation as any)[LibrarySymbol] =
      (this._compilation as any)[LibrarySymbol] || {};
    const libraryLoaderContext: LibraryLoaderContext = (
      this._compilation as any
    )[LibrarySymbol];
    libraryLoaderContext.libraryMetaList =
      libraryLoaderContext.libraryMetaList || [];
    libraryLoaderContext.libraryMetaList.push({
      ...meta,
      context: this.context,
      importPath: this.resourcePath,
      contextPath: this.utils.contextify(this.rootContext, this.resourcePath),
    });
    const fileExtname = libraryLoaderContext.buildPlatform.fileExtname;
    libraryLoaderContext.libraryMetaList.forEach((item) => {
      const globalTemplatePath = join(
        normalize('/library-template'),
        strings.classify(item.moduleId) +
          libraryLoaderContext.buildPlatform.fileExtname.contentTemplate
      );
      const LIBRARY_SCOPE_ID = libraryTemplateScopeName(item.moduleId);
      const configPath = join(
        normalize(LIBRARY_OUTPUT_ROOTDIR),
        item.libraryPath + fileExtname.config
      );
      const list = scopeLibraryObj[LIBRARY_SCOPE_ID] || [];
      list.push({
        configPath: configPath,
        useComponents: item.useComponents,
        templateList: [],
        templatePath: globalTemplatePath,
      });

      scopeLibraryObj[LIBRARY_SCOPE_ID] = list;
      const libraryTemplateLiteralConvertOptions: LibraryTemplateLiteralConvertOptions =
        {
          directivePrefix:
            libraryLoaderContext.buildPlatform.templateTransform.getData()
              .directivePrefix,
          eventListConvert:
            libraryLoaderContext.buildPlatform.templateTransform
              .eventListConvert,
          templateInterpolation:
            libraryLoaderContext.buildPlatform.templateTransform
              .templateInterpolation,
          fileExtname: libraryLoaderContext.buildPlatform.fileExtname,
        };
      this.emitFile(
        join(
          normalize(LIBRARY_OUTPUT_ROOTDIR),
          item.libraryPath + fileExtname.content
        ),
        `<import src="${globalTemplatePath}"/>` +
          literalResolve(
            `\`${item.content}\``,
            libraryTemplateLiteralConvertOptions
          )
      );
      if (item.contentTemplate) {
        this.emitFile(
          join(
            normalize(LIBRARY_OUTPUT_ROOTDIR),
            dirname(normalize(item.libraryPath)),
            'template' + fileExtname.contentTemplate
          ),
          `<import src="${globalTemplatePath}"/>` +
            literalResolve(
              `\`${item.contentTemplate}\``,
              libraryTemplateLiteralConvertOptions
            )
        );
      }
      if (item.style) {
        this.emitFile(
          join(
            normalize(LIBRARY_OUTPUT_ROOTDIR),
            item.libraryPath + fileExtname.style
          ),
          item.style
        );
      }
    });
  }
  for (const key in scopeLibraryObj) {
    if (Object.prototype.hasOwnProperty.call(scopeLibraryObj, key)) {
      const element = scopeLibraryObj[key];
      templateScopeOutside.setScopeLibraryUseComponents(key, element);
    }
  }
  callback(undefined, data, map);
}


================================================
FILE: src/builder/application/loader/type.ts
================================================
import { MetaCollection } from '../../mini-program-compiler';
import type { BuildPlatform } from '../../platform/platform';

export interface ComponentTemplateLoaderContext {
  buildPlatform: BuildPlatform;
  otherMetaGroupPromise: Promise<Record<string, MetaCollection>>;
}


================================================
FILE: src/builder/application/mini-program-application-analysis.service.ts
================================================
import type { NgtscProgram, ParsedConfiguration } from '@angular/compiler-cli';
import type { NgCompiler } from '@angular/compiler-cli/src/ngtsc/core';
import { join, normalize, resolve } from '@angular-devkit/core';
import { externalizePath } from '@ngtools/webpack/src/ivy/paths';
import { createHash } from 'crypto';
import { createCssSelectorForTs } from 'cyia-code-util';
import * as path from 'path';
import { Inject, Injectable, Injector } from 'static-injector';
import ts from 'typescript';
import type { CompilerOptions } from 'typescript';
import { Compilation, Compiler } from 'webpack';
import { LIBRARY_OUTPUT_ROOTDIR } from '../library';
import { MiniProgramCompilerService } from '../mini-program-compiler';
import { BuildPlatform } from '../platform/platform';
import { angularCompilerCliPromise } from '../util/load_esm';
import {
  OLD_BUILDER,
  PAGE_PATTERN_TOKEN,
  TS_CONFIG_TOKEN,
  TS_SYSTEM,
  WEBPACK_COMPILATION,
  WEBPACK_COMPILER,
} from './token';
import type { PagePattern } from './type';

@Injectable()
export class MiniProgramApplicationAnalysisService {
  private dependencyUseModule = new Map<string, string[]>();
  private cleanDependencyFileCacheSet = new Set<string>();
  builder!: ts.BuilderProgram | ts.EmitAndSemanticDiagnosticsBuilderProgram;
  private ngTscProgram!: NgtscProgram;
  private tsProgram!: ts.Program;
  private ngCompiler!: NgCompiler;
  private typeChecker!: ts.TypeChecker;
  constructor(
    private injector: Injector,
    @Inject(WEBPACK_COMPILATION) private compilation: Compilation,
    @Inject(TS_SYSTEM) private system: ts.System,
    @Inject(WEBPACK_COMPILER) private compiler: Compiler,
    @Inject(TS_CONFIG_TOKEN) private tsConfig: string,
    @Inject(OLD_BUILDER)
    private oldBuilder: ts.EmitAndSemanticDiagnosticsBuilderProgram | undefined,
    @Inject(PAGE_PATTERN_TOKEN) private pagePatternList: PagePattern[],
    private buildPlatform: BuildPlatform
  ) {}

  async exportComponentBuildMetaMap() {
    const injector = Injector.create({
      providers: [
        {
          provide: MiniProgramCompilerService,
          useFactory: (injector: Injector, buildPlatform: BuildPlatform) => {
            return new MiniProgramCompilerService(
              this.ngTscProgram,
              injector,
              buildPlatform
            );
          },
          deps: [Injector, BuildPlatform],
        },
      ],
      parent: this.injector,
    });
    const miniProgramCompilerService = injector.get(MiniProgramCompilerService);
    miniProgramCompilerService.init();
    const metaMap =
      await miniProgramCompilerService.exportComponentBuildMetaMap();

    const selfMetaCollection = metaMap.otherMetaCollectionGroup['$self'];
    const selfTemplate: Record<string, string> = {};
    if (selfMetaCollection) {
      const importSelfTemplatePath = `/self-template/self${this.buildPlatform.fileExtname.contentTemplate}`;
      const importSelfTemplate = `<import src="${importSelfTemplatePath}"/>`;
      metaMap.outputContent.forEach((value, key) => {
        value = `${importSelfTemplate}${value}`;
        metaMap.outputContent.set(key, value);
      });

      metaMap.useComponentPath.forEach((value, key) => {
        value.libraryPath.push(...selfMetaCollection.libraryPath);
        value.localPath.push(...selfMetaCollection.localPath);
      });
      selfTemplate[importSelfTemplatePath] = selfMetaCollection.templateList
        .map((item) => item.content)
        .join('');
      delete metaMap.otherMetaCollectionGroup['$self'];
    }
    metaMap.useComponentPath.forEach((value, key) => {
      value.libraryPath = Array.from(new Set(value.libraryPath));
      value.localPath = Array.from(new Set(value.localPath));
    });
    const styleMap = new Map<string, string[]>();
    metaMap.style.forEach((value, key) => {
      const entryPattern = this.getComponentPagePattern(key);
      styleMap.set(entryPattern.outputFiles.style, value);
    });
    const contentMap = new Map<string, string>();
    metaMap.outputContent.forEach((value, key) => {
      const entryPattern = this.getComponentPagePattern(key);
      contentMap.set(entryPattern.outputFiles.content, value);
    });

    metaMap.style = styleMap;
    const config = new Map<
      string,
      {
        component: true | undefined;
        usingComponents: { selector: string; path: string }[];
        existConfig: string;
      }
    >();
    metaMap.useComponentPath.forEach((value, key) => {
      const entryPattern = this.getComponentPagePattern(key);
      const list = [
        ...value.libraryPath.map((item) => {
          item.path = resolve(
            normalize('/'),
            join(normalize(LIBRARY_OUTPUT_ROOTDIR), item.path)
          );
          return item;
        }),
      ];
      list.push(
        ...value.localPath.map((item) => ({
          selector: item.selector,
          path: resolve(
            normalize('/'),
            normalize(this.getComponentPagePattern(item.path).outputFiles.path)
          ),
          className: item.className,
        }))
      );
      config.set(entryPattern.outputFiles.config, {
        component: entryPattern.type === 'component' || undefined,
        usingComponents: list,
        existConfig: entryPattern.inputFiles.config,
      });
    });

    for (const key in metaMap.otherMetaCollectionGroup) {
      if (
        Object.prototype.hasOwnProperty.call(
          metaMap.otherMetaCollectionGroup,
          key
        )
      ) {
        const element = metaMap.otherMetaCollectionGroup[key];
        element.libraryPath.forEach((item) => {
          item.path = resolve(
            normalize('/'),
            join(normalize(LIBRARY_OUTPUT_ROOTDIR), item.path)
          );
        });
        element.localPath.forEach((item) => {
          item.path = resolve(
            normalize('/'),
            normalize(this.getComponentPagePattern(item.path).outputFiles.path)
          );
        });
      }
    }
    return {
      style: styleMap,
      outputContent: contentMap,
      config: config,
      otherMetaCollectionGroup: metaMap.otherMetaCollectionGroup,
      selfTemplate,
    };
  }

  private initHost(config: ParsedConfiguration) {
    const host = ts.createIncrementalCompilerHost(config.options, this.system);
    this.augmentResolveModuleNames(host, config.options);
    this.addCleanDependency(host);
    return host;
  }
  private async initTscProgram() {
    const { readConfiguration, NgtscProgram } = await angularCompilerCliPromise;
    const config = readConfiguration(this.tsConfig, undefined);
    const host = this.initHost(config);
    this.ngTscProgram = new NgtscProgram(
      config.rootNames,
      config.options,
      host
    );
    this.tsProgram = this.ngTscProgram.getTsProgram();
    this.typeChecker = this.tsProgram.getTypeChecker();
    this.augmentProgramWithVersioning(this.tsProgram);
    if (this.compiler.watchMode) {
      this.builder = this.oldBuilder =
        ts.createEmitAndSemanticDiagnosticsBuilderProgram(
          this.tsProgram,
          host,
          this.oldBuilder
        );
    } else {
      this.builder = ts.createAbstractBuilder(this.tsProgram, host);
    }
    this.ngCompiler = this.ngTscProgram.compiler;
  }
  /** 获得组件/页面的入口 */
  private getComponentPagePattern(fileName: string) {
    const findList = [fileName];
    let maybeEntryPath: PagePattern | undefined;

    while (findList.length) {
      const module = findList.shift();
      const moduleList = this.dependencyUseModule.get(path.normalize(module!));
      if (moduleList && moduleList.length) {
        findList.push(...moduleList);
      } else {
        maybeEntryPath = this.pagePatternList.find(
          (item) => path.normalize(item.src) === path.normalize(module!)
        );
        if (maybeEntryPath) {
          const sourceFile = this.tsProgram.getSourceFile(maybeEntryPath.src)!;
          const selector = createCssSelectorForTs(sourceFile);
          let importComponent: ts.Expression;
          if (maybeEntryPath.type === 'page') {
            const node = selector.queryOne(
              `CallExpression[expression=pageStartup]`
            ) as ts.CallExpression;
            importComponent = node.arguments[1];
          } else {
            const node = selector.queryOne(
              `CallExpression[expression=componentRegistry]`
            ) as ts.CallExpression;
            importComponent = node.arguments[0];
          }
          const symbol = this.typeChecker.getSymbolAtLocation(importComponent);
          const node = symbol?.getDeclarations()?.[0];
          const importDeclaration = node?.parent.parent
            .parent as ts.ImportDeclaration;
          const relativeImportComponentPath = importDeclaration.moduleSpecifier
            .getText()
            .slice(1, -1);

          const importComponentPath =
            path.resolve(
              path.dirname(maybeEntryPath.src),
              path.normalize(relativeImportComponentPath)
            ) + '.ts';
          if (importComponentPath === path.normalize(fileName)) {
            break;
          }

          maybeEntryPath = undefined;
        }
      }
    }
    if (!maybeEntryPath) {
      throw new Error(`没有找到组件[${fileName}]对应的入口点`);
    }
    return maybeEntryPath;
  }

  private addCleanDependency(host: ts.CompilerHost) {
    const oldReadFile = host.readFile;
    const _this = this;
    host.readFile = function (fileName) {
      if (fileName.includes('node_modules')) {
        _this.cleanDependencyFileCacheSet.add(externalizePath(fileName));
      }
      return oldReadFile.call(this, fileName);
    };
  }
  private saveModuleDependency(
    filePath: string,
    moduleName: string,
    module: ts.ResolvedModule
  ) {
    if (!module) {
      throw new Error(`模块未被解析,文件名${filePath},模块名${moduleName}`);
    }
    const useList =
      this.dependencyUseModule.get(path.normalize(module.resolvedFileName)) ||
      [];
    useList.push(filePath);
    this.dependencyUseModule.set(
      path.normalize(module.resolvedFileName),
      useList
    );
  }
  private augmentResolveModuleNames(
    host: ts.CompilerHost,
    compilerOptions: CompilerOptions
  ) {
    const moduleResolutionCache = ts.createModuleResolutionCache(
      host.getCurrentDirectory(),
      host.getCanonicalFileName.bind(host),
      compilerOptions
    );
    const oldResolveModuleNames = host.resolveModuleNames;
    if (oldResolveModuleNames) {
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      host.resolveModuleNames = (moduleNames: string[], ...args: any[]) => {
        return moduleNames.map((name) => {
          // eslint-disable-next-line @typescript-eslint/no-explicit-any
          const result = (oldResolveModuleNames! as any).call(
            host,
            [name],
            ...args
          );
          this.saveModuleDependency(args[0], name, result);

          return result;
        });
      };
    } else {
      host.resolveModuleNames = (
        moduleNames: string[],
        containingFile: string,
        _reusedNames: string[] | undefined,
        redirectedReference: ts.ResolvedProjectReference | undefined,
        options: ts.CompilerOptions
      ) => {
        return moduleNames.map((name) => {
          const result = ts.resolveModuleName(
            name,
            containingFile,
            options,
            host,
            moduleResolutionCache,
            redirectedReference
          ).resolvedModule;
          if (!containingFile.includes('node_modules')) {
            this.saveModuleDependency(containingFile, name, result!);
          }
          return result;
        });
      };
    }
  }

  async analyzeAsync() {
    await this.initTscProgram();
    await this.ngCompiler.analyzeAsync();
  }
  getBuilder() {
    return this.builder;
  }
  cleanDependencyFileCache() {
    this.cleanDependencyFileCacheSet.forEach((filePath) => {
      try {
        this.compiler.inputFileSystem.purge!(filePath);
      } catch (error) {}
    });
  }
  private augmentProgramWithVersioning(program: ts.Program): void {
    const baseGetSourceFiles = program.getSourceFiles;
    program.getSourceFiles = function (...parameters) {
      const files: readonly (ts.SourceFile & { version?: string })[] =
        baseGetSourceFiles(...parameters);

      for (const file of files) {
        if (file.version === undefined) {
          file.version = createHash('sha256').update(file.text).digest('hex');
        }
      }

      return files;
    };
  }
}


================================================
FILE: src/builder/application/plugin/dynamic-library-entry.plugin.ts
================================================
/* eslint-disable @typescript-eslint/no-explicit-any */
import { join, normalize } from '@angular-devkit/core';
import path from 'path';
import { Injectable } from 'static-injector';
import * as webpack from 'webpack';
import { LIBRARY_OUTPUT_ROOTDIR } from '../../library';
import type { LibraryComponentEntryMeta } from '../../library';
import { BuildPlatform } from '../../platform/platform';
import { LibrarySymbol } from '../const';
import type { LibraryLoaderContext } from '../type';

const CUSTOM_URI = 'dynamic';
const CUSTOM_URI_REG = /^dynamic:\/\/__license(?:\/|\\)(.*)\.ts$/;
@Injectable()
export class DynamicLibraryComponentEntryPlugin {
  private libraryComponentMap = new Map<string, LibraryComponentEntryMeta>();
  constructor(private buildPlatform: BuildPlatform) {}
  apply(compiler: webpack.Compiler) {
    compiler.hooks.thisCompilation.tap(
      'DynamicLibraryEntryPlugin',
      (thisCompilation) => {
        (thisCompilation as any)[LibrarySymbol] = (thisCompilation as any)[
          LibrarySymbol
        ] || { buildPlatform: this.buildPlatform };
        const hooks = webpack.NormalModule.getCompilationHooks(thisCompilation);
        hooks.readResource
          .for(CUSTOM_URI)
          .tapAsync(
            'DynamicLibraryEntryPlugin',
            (loaderContext: any, callback) => {
              const resourcePath: string = loaderContext.resourcePath;
              const id = resourcePath.match(CUSTOM_URI_REG)![1];
              const libraryMeta = this.libraryComponentMap.get(id);

              callback(
                undefined,
                `
            import * as amp from 'angular-miniprogram';
            import * as library from '${libraryMeta?.contextPath}';
            amp.componentRegistry(library.${libraryMeta?.className});
            `
              );
              return;
            }
          );
        compiler.hooks.finishMake.tapAsync(
          'DynamicLibraryEntryPlugin',
          (compilation, callback) => {
            const libraryLoaderContext: LibraryLoaderContext = (
              compilation as any
            )[LibrarySymbol];
            if (compilation !== thisCompilation) {
              callback(undefined);
              return;
            }
            if (libraryLoaderContext.libraryMetaList) {
              libraryLoaderContext.libraryMetaList.forEach((item) => {
                this.libraryComponentMap.set(item.id, item);
              });
            }

            if (this.libraryComponentMap.size === 0) {
              callback(undefined);
              return;
            }
            let j = 0;
            this.libraryComponentMap.forEach((meta) => {
              const entry = join(
                normalize(LIBRARY_OUTPUT_ROOTDIR),
                meta.libraryPath
              );
              const dep = webpack.EntryPlugin.createDependency(
                `${CUSTOM_URI}://${path.join('__license', meta.id)}.ts`,
                entry
              );
              compilation.addEntry(
                compiler.context,
                dep,
                entry,
                (err, result) => {
                  j++;
                  if (j === this.libraryComponentMap.size) {
                    callback(undefined);
                  }
                }
              );
            });
          }
        );
      }
    );
  }
}


================================================
FILE: src/builder/application/plugin/dynamic-watch-entry.plugin.ts
================================================
import type { BuilderContext } from '@angular-devkit/architect';
import type { AssetPattern } from '@angular-devkit/build-angular';
import { normalizeAssetPatterns } from '@angular-devkit/build-angular/src/utils';
import { Path, getSystemPath, normalize, resolve } from '@angular-devkit/core';
import * as glob from 'glob';
import * as path from 'path';
import { BehaviorSubject, firstValueFrom } from 'rxjs';
import { filter, take } from 'rxjs/operators';
import { Injectable } from 'static-injector';
import * as webpack from 'webpack';
import { BuildPlatform } from '../../platform/platform';
import type { PagePattern } from '../type';

function globAsync(pattern: string, options: glob.IOptions) {
  return new Promise<string[]>((resolve, reject) =>
    glob.default(pattern, options, (e, m) => (e ? reject(e) : resolve(m)))
  );
}
@Injectable()
export class DynamicWatchEntryPlugin {
  pageList!: PagePattern[];
  componentList!: PagePattern[];
  entryPattern$ = new BehaviorSubject<
    | {
        pageList: PagePattern[];
        componentList: PagePattern[];
      }
    | undefined
  >(undefined);
  private first = true;
  absoluteProjectRoot!: Path;
  absoluteProjectSourceRoot!: Path;
  constructor(
    private options: {
      pages: AssetPattern[];
      components: AssetPattern[];
      workspaceRoot: Path;
      context: BuilderContext;
      config: webpack.Configuration;
    },
    private buildPlatform: BuildPlatform
  ) {}
  async init() {
    const projectName =
      this.options.context.target && this.options.context.target.project;
    if (!projectName) {
      throw new Error('The builder requires a target.');
    }
    const projectMetadata = await this.options.context.getProjectMetadata(
      projectName
    );
    this.absoluteProjectRoot = normalize(
      getSystemPath(
        resolve(
          this.options.workspaceRoot,
          normalize((projectMetadata.root as string) || '')
        )
      )
    );
    const relativeSourceRoot = projectMetadata.sourceRoot as string | undefined;
    const absoluteSourceRootPath =
      typeof relativeSourceRoot === 'string'
        ? resolve(this.options.workspaceRoot, normalize(relativeSourceRoot))
        : undefined;
    if (relativeSourceRoot) {
      this.absoluteProjectSourceRoot = normalize(
        getSystemPath(absoluteSourceRootPath!)
      )!;
    }
  }
  apply(compiler: webpack.Compiler) {
    let rootCompilation: boolean = false;
    compiler.hooks.beforeCompile.tapPromise(
      'DynamicWatchEntryPlugin',
      async (compilationParams) => {
        if (rootCompilation) {
          return;
        }

        this.entryPattern$.next({
          pageList: await this.generateModuleInfo(
            this.options.pages || [],
            'page'
          ),
          componentList: await this.generateModuleInfo(
            this.options.components || [],
            'component'
          ),
        });
      }
    );
    compiler.hooks.thisCompilation.tap(
      'DynamicWatchEntryPlugin',
      (compilation) => {
        rootCompilation = true;
        if (this.first) {
          this.first = false;
          const patternList = normalizeAssetPatterns(
            [...(this.options.pages || []), ...(this.options.components || [])],
            this.options.workspaceRoot,
            this.absoluteProjectRoot,
            this.absoluteProjectSourceRoot
          );
          for (const pattern of patternList) {
            const cwd = path.resolve(
              this.options.context.workspaceRoot,
              pattern.input
            );
            compilation.fileDependencies.add(cwd);
          }
        }
      }
    );
    // 因为监听更新的时候beforeCompile会拦截所有的,所以这么实现(因为还有一次性构建不触发watchRun,所以不能代替)
    compiler.hooks.watchRun.tap('DynamicWatchEntryPlugin', async () => {
      rootCompilation = false;
    });
    // 入口移动到这里是因为ng新增了一个插件也同时修改了入口,
    compiler.hooks.environment.tap(
      { name: `DynamicWatchEntryPlugin`, stage: 9999 },
      () => {
        const originEntryConfig = compiler.options.entry;
        compiler.options.entry = async () => {
          await firstValueFrom(
            this.entryPattern$.pipe(filter(Boolean), take(1))
          );
          const entryPattern = this.entryPattern$.value!;
          const list = [
            ...entryPattern.pageList,
            ...entryPattern.componentList,
          ];
          const result = (await (typeof originEntryConfig === 'function'
            ? originEntryConfig()
            : originEntryConfig))!;
          if (result['app']) {
            throw new Error(
              '资源文件不能指定为app文件名或bundleName,请重新修改(不影响导出)'
            );
          }
          return {
            ...result,
            ...list.reduce((pre, cur) => {
              pre[cur.entryName] = { import: [cur.src] };
              return pre;
            }, {} as Record<string, Exclude<webpack.EntryNormalized, Function>[string]>),
          };
        };
      }
    );
  }
  private async generateModuleInfo(
    list: AssetPattern[],
    type: 'page' | 'component'
  ) {
    const patternList = normalizeAssetPatterns(
      list,
      this.options.workspaceRoot,
      this.absoluteProjectRoot,
      this.absoluteProjectSourceRoot
    );
    const moduleList: PagePattern[] = [];
    for (const pattern of patternList) {
      const cwd = path.resolve(
        this.options.context.workspaceRoot,
        pattern.input
      );
      /** 当前匹配匹配到的文件 */
      const files = await globAsync(pattern.glob, {
        cwd,
        dot: true,
        nodir: true,
        ignore: pattern.ignore || [],
        follow: pattern.followSymlinks,
      });

      moduleList.push(
        ...files.map((file) => {
          const object: Partial<PagePattern> = {
            entryName: path.basename(file, '.ts').replace(/\./g, '-'),
            fileName: file,
            src: path.join(cwd, file),
            ...pattern,
            // eslint-disable-next-line @typescript-eslint/no-explicit-any
            outputFiles: {} as any,
            // eslint-disable-next-line @typescript-eslint/no-explicit-any
            inputFiles: {} as any,
          };
          object.inputFiles!.config = object.src!.replace(
            /\.ts$/,
            this.buildPlatform.fileExtname.config!
          );
          const outputFileName =
            object.fileName!.replace(/\.ts$/, '').replace(/\./g, '-') + '.ts';
          object.outputFiles!.path = path
            .join(pattern.output, outputFileName)
            .replace(/\.ts$/, '');
          object.outputFiles!.logic =
            object.outputFiles!.path + this.buildPlatform.fileExtname.logic;
          object.outputFiles!.style =
            object.outputFiles!.path + this.buildPlatform.fileExtname.style;
          object.outputFiles!.content =
            object.outputFiles!.path + this.buildPlatform.fileExtname.content;
          object.outputFiles!.config =
            object.outputFiles!.path + this.buildPlatform.fileExtname.config;
          object.type = type;
          return object as PagePattern;
        })
      );
    }
    return moduleList;
  }
}


================================================
FILE: src/builder/application/plugin/export-mini-program-assets.plugin.ts
================================================
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable no-console */
import { normalizePath } from '@ngtools/webpack/src/ivy/paths';
import {
  InputFileSystemSync,
  createWebpackSystem,
} from '@ngtools/webpack/src/ivy/system';
import * as path from 'path';
import { Inject, Injectable, Injector } from 'static-injector';
import ts from 'typescript';
import { sources } from 'webpack';
import * as webpack from 'webpack';
import { BuildPlatform } from '../../platform/platform';
import { literalResolve } from '../../util';
import { ExportMiniProgramAssetsPluginSymbol, InjectorSymbol } from '../const';
import { LibraryTemplateScopeService } from '../library-template-scope.service';
import type { ComponentTemplateLoaderContext } from '../loader/type';
import { MiniProgramApplicationAnalysisService } from '../mini-program-application-analysis.service';
import {
  OLD_BUILDER,
  PAGE_PATTERN_TOKEN,
  TS_CONFIG_TOKEN,
  TS_SYSTEM,
  WEBPACK_COMPILATION,
  WEBPACK_COMPILER,
} from '../token';
import type { PagePattern } from '../type';
import { LibraryTemplateLiteralConvertOptions } from '../type';
import { setCompilationAsset } from '../util';

@Injectable()
export class ExportMiniProgramAssetsPlugin {
  private pageList!: PagePattern[];
  private componentList!: PagePattern[];
  private system!: ts.System;
  constructor(
    @Inject(TS_CONFIG_TOKEN) tsConfig: string,
    private buildPlatform: BuildPlatform,
    private injector: Injector,
    private libraryTemplateScopeService: LibraryTemplateScopeService
  ) {}
  apply(compiler: webpack.Compiler) {
    const ifs = compiler.inputFileSystem as InputFileSystemSync;
    let oldBuilder: ts.EmitAndSemanticDiagnosticsBuilderProgram | undefined =
      undefined;
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    const styleAssets = new Map<string, sources.Source>();
    compiler.hooks.compilation.tap(
      'ExportMiniProgramAssetsPlugin',
      (compilation) => {
        compilation.hooks.processAssets.tap(
          'ExportMiniProgramAssetsPlugin',
          () => {
            for (const stylePath in compilation.assets) {
              if (
                Object.prototype.hasOwnProperty.call(
                  compilation.assets,
                  stylePath
                )
              ) {
                const data = compilation.getAsset(stylePath)!;
                if (/\.(scss|css|sass|less|styl)$/.test(stylePath)) {
                  styleAssets.set(path.normalize(stylePath), data.source);
                  setCompilationAsset(
                    compilation,
                    stylePath,
                    new sources.RawSource(' ')
                  );
                }
              }
            }
          }
        );
      }
    );
    compiler.hooks.thisCompilation.tap(
      'ExportMiniProgramAssetsPlugin',
      (compilation) => {
        this.system = createWebpackSystem(
          compiler.inputFileSystem as InputFileSystemSync,
          normalizePath(compiler.context)
        );
        this.libraryTemplateScopeService.register(compilation);
        (compilation as any)[InjectorSymbol] = this.injector;
        const injector = Injector.create({
          providers: [
            { provide: MiniProgramApplicationAnalysisService },
            { provide: WEBPACK_COMPILATION, useValue: compilation },
            { provide: WEBPACK_COMPILER, useValue: compiler },
            { provide: OLD_BUILDER, useValue: oldBuilder },
            {
              provide: TS_SYSTEM,
              useValue: this.system,
            },
            {
              provide: PAGE_PATTERN_TOKEN,
              useValue: [...this.pageList, ...this.componentList],
            },
          ],
          parent: this.injector,
        });
        const templateService = injector.get(
          MiniProgramApplicationAnalysisService
        );
        oldBuilder =
          templateService.getBuilder() as ts.EmitAndSemanticDiagnosticsBuilderProgram;
        const buildTemplatePromise = this.buildTemplate(templateService);
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        (compilation as any)[ExportMiniProgramAssetsPluginSymbol] = {
          buildPlatform: this.buildPlatform,
          otherMetaGroupPromise: buildTemplatePromise.then(
            (item) => item.otherMetaCollectionGroup
          ),
        } as ComponentTemplateLoaderContext;

        compilation.hooks.processAssets.tapAsync(
          'ExportMiniProgramAssetsPlugin',
          async (assets, cb) => {
            const metaMap = await buildTemplatePromise;

            metaMap.outputContent.forEach((value, key) => {
              setCompilationAsset(
                compilation,
                key,
                new sources.RawSource(value)
              );
            });

            metaMap.style.forEach((value, outputPath) => {
              setCompilationAsset(
                compilation,
                outputPath,
                new sources.ConcatSource(
                  ...value.map((item) => styleAssets.get(item)!)
                )
              );
            });
            metaMap.config.forEach((value, key) => {
              // eslint-disable-next-line @typescript-eslint/no-explicit-any
              let config: Record<string, any>;
              // eslint-disable-next-line @typescript-eslint/no-explicit-any
              if ((ifs as any).fileSystem.existsSync(value.existConfig)) {
                config = JSON.parse(
                  ifs.readFileSync(value.existConfig).toString()
                );
              } else {
                config = {};
              }
              config.component ??= value.component;
              config.usingComponents = config.usingComponents || {};
              config.usingComponents = {
                ...config.usingComponents,
                ...value.usingComponents.reduce((pre, cur) => {
                  pre[cur.selector] = cur.path;
                  return pre;
                }, {} as Record<string, string>),
              };
              setCompilationAsset(
                compilation,
                key,
                new sources.RawSource(JSON.stringify(config))
              );
            });
            for (const key in metaMap.otherMetaCollectionGroup) {
              if (
                Object.prototype.hasOwnProperty.call(
                  metaMap.otherMetaCollectionGroup,
                  key
                )
              ) {
                const element = metaMap.otherMetaCollectionGroup[key];
                this.libraryTemplateScopeService.setScopeExtraUseComponents(
                  key,
                  {
                    useComponents: {
                      ...[...element.localPath, ...element.libraryPath].reduce(
                        (pre, cur) => {
                          pre[cur.selector] = cur.path;
                          return pre;
                        },
                        {} as Record<string, string>
                      ),
                    },
                    templateList: element.templateList.map(
                      (item) => item.content
                    ),
                  }
                );
              }
            }
            const componentConfigGroup =
              this.libraryTemplateScopeService.exportLibraryComponentConfig();
            for (const item of componentConfigGroup) {
              setCompilationAsset(
                compilation,
                item.filePath,
                new sources.RawSource(JSON.stringify(item.content))
              );
            }
            const templateGroup =
              this.libraryTemplateScopeService.exportLibraryTemplate();
            for (const key in templateGroup) {
              if (Object.prototype.hasOwnProperty.call(templateGroup, key)) {
                const element = templateGroup[key];
                setCompilationAsset(
                  compilation,
                  key,
                  new sources.RawSource(
                    literalResolve<LibraryTemplateLiteralConvertOptions>(
                      `\`${element}\``,
                      {
                        directivePrefix:
                          this.buildPlatform.templateTransform.getData()
                            .directivePrefix,
                        eventListConvert:
                          this.buildPlatform.templateTransform.eventListConvert,
                        templateInterpolation:
                          this.buildPlatform.templateTransform
                            .templateInterpolation,
                        fileExtname: this.buildPlatform.fileExtname,
                      }
                    )
                  )
                );
              }
            }

            for (const key in metaMap.selfTemplate) {
              if (
                Object.prototype.hasOwnProperty.call(metaMap.selfTemplate, key)
              ) {
                const element = metaMap.selfTemplate[key];
                setCompilationAsset(
                  compilation,
                  key,
                  new sources.RawSource(element)
                );
              }
            }
            cb();
          }
        );
        templateService.cleanDependencyFileCache();
      }
    );
  }

  public setEntry(pageList: PagePattern[], componentList: PagePattern[]) {
    this.pageList = pageList;
    this.componentList = componentList;
  }
  async buildTemplate(service: MiniProgramApplicationAnalysisService) {
    try {
      await service.analyzeAsync();
      const result = await service.exportComponentBuildMetaMap();
      return result;
    } catch (error) {
      console.error(error);
      throw error;
    }
  }
}


================================================
FILE: src/builder/application/schema.base.json
================================================
{
  "$schema": "http://json-schema.org/schema",
  "title": "Webpack browser schema for Build Facade.",
  "description": "Browser target options",
  "type": "object",
  "properties": {
    "pages": {
      "type": "array",
      "description": "页面配置",
      "default": [],
      "items": {
        "$ref": "#/definitions/assetPattern"
      }
    },
    "components": {
      "type": "array",
      "description": "组件配置",
      "default": [],
      "items": {
        "$ref": "#/definitions/assetPattern"
      }
    },
    "platform": {
      "type": "string",
      "description": "小程序平台",
      "default": "wx"
    }
  },
  "definitions": {
    "assetPattern": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "followSymlinks": {
              "type": "boolean",
              "default": false,
              "description": "Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched."
            },
            "glob": {
              "type": "string",
              "description": "The pattern to match."
            },
            "input": {
              "type": "string",
              "description": "The input directory path in which to apply 'glob'. Defaults to the project root."
            },
            "ignore": {
              "description": "An array of globs to ignore.",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "output": {
              "type": "string",
              "description": "Absolute path within the output."
            }
          },
          "additionalProperties": false,
          "required": ["glob", "input", "output"]
        },
        {
          "type": "string"
        }
      ]
    }
  },
  "additionalProperties": false
}


================================================
FILE: src/builder/application/schema.json
================================================
{
  "$schema": "http://json-schema.org/draft-07/schema",
  "title": "Webpack browser schema for Build Facade.",
  "description": "Browser target options",
  "type": "object",
  "properties": {
    "pages": {
      "type": "array",
      "description": "页面配置",
      "default": [],
      "items": {
        "$ref": "#/definitions/assetPattern"
      }
    },
    "components": {
      "type": "array",
      "description": "组件配置",
      "default": [],
      "items": {
        "$ref": "#/definitions/assetPattern"
      }
    },
    "platform": {
      "type": "string",
      "description": "小程序平台",
      "default": "wx"
    },
    "assets": {
      "type": "array",
      "description": "List of static application assets.",
      "default": [],
      "items": {
        "$ref": "#/definitions/assetPattern"
      }
    },
    "main": {
      "type": "string",
      "description": "The full path for the main entry point to the app, relative to the current workspace."
    },
    "polyfills": {
      "type": "string",
      "description": "The full path for the polyfills file, relative to the current workspace."
    },
    "tsConfig": {
      "type": "string",
      "description": "The full path for the TypeScript configuration file, relative to the current workspace."
    },
    "scripts": {
      "description": "Global scripts to be included in the build.",
      "type": "array",
      "default": [],
      "items": {
        "$ref": "#/definitions/extraEntryPoint"
      }
    },
    "styles": {
      "description": "Global styles to be included in the build.",
      "type": "array",
      "default": [],
      "items": {
        "$ref": "#/definitions/extraEntryPoint"
      }
    },
    "inlineStyleLanguage": {
      "description": "The stylesheet language to use for the application's inline component styles.",
      "type": "string",
      "default": "css",
      "enum": ["css", "less", "sass", "scss"]
    },
    "stylePreprocessorOptions": {
      "description": "Options to pass to style preprocessors.",
      "type": "object",
      "properties": {
        "includePaths": {
          "description": "Paths to include. Paths will be resolved to workspace root.",
          "type": "array",
          "items": {
            "type": "string"
          },
          "default": []
        }
      },
      "additionalProperties": false
    },
    "optimization": {
      "description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.io/guide/workspace-config#optimization-configuration.",
      "x-user-analytics": 16,
      "default": true,
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "scripts": {
              "type": "boolean",
              "description": "Enables optimization of the scripts output.",
              "default": true
            },
            "styles": {
              "description": "Enables optimization of the styles output.",
              "default": true,
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "minify": {
                      "type": "boolean",
                      "description": "Minify CSS definitions by removing extraneous whitespace and comments, merging identifiers and minimizing values.",
                      "default": true
                    },
                    "inlineCritical": {
                      "type": "boolean",
                      "description": "Extract and inline critical CSS definitions to improve first paint time.",
                      "default": true
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "fonts": {
              "description": "Enables optimization for fonts. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.",
              "default": true,
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "inline": {
                      "type": "boolean",
                      "description": "Reduce render blocking requests by inlining external Google fonts and icons CSS definitions in the application's HTML index file. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.",
                      "default": true
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "type": "boolean"
                }
              ]
            }
          },
          "additionalProperties": false
        },
        {
          "type": "boolean"
        }
      ]
    },
    "fileReplacements": {
      "description": "Replace compilation source files with other compilation source files in the build.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/fileReplacement"
      },
      "default": []
    },
    "outputPath": {
      "type": "string",
      "description": "The full path for the new output directory, relative to the current workspace.\n\nBy default, writes output to a folder named dist/ in the current project."
    },
    "resourcesOutputPath": {
      "type": "string",
      "description": "The path where style resources will be placed, relative to outputPath.",
      "default": ""
    },
    "aot": {
      "type": "boolean",
      "description": "Build using Ahead of Time compilation.",
      "x-user-analytics": 13,
      "default": true
    },
    "sourceMap": {
      "description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.",
      "default": false,
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "scripts": {
              "type": "boolean",
              "description": "Output source maps for all scripts.",
              "default": true
            },
            "styles": {
              "type": "boolean",
              "description": "Output source maps for all styles.",
              "default": true
            },
            "hidden": {
              "type": "boolean",
              "description": "Output source maps used for error reporting tools.",
              "default": false
            },
            "vendor": {
              "type": "boolean",
              "description": "Resolve vendor packages source maps.",
              "default": false
            }
          },
          "additionalProperties": false
        },
        {
          "type": "boolean"
        }
      ]
    },
    "vendorChunk": {
      "type": "boolean",
      "description": "Generate a seperate bundle containing only vendor libraries. This option should only used for development.",
      "default": false
    },
    "commonChunk": {
      "type": "boolean",
      "description": "Generate a seperate bundle containing code used across multiple bundles.",
      "default": true
    },
    "baseHref": {
      "type": "string",
      "description": "Base url for the application being built."
    },
    "deployUrl": {
      "type": "string",
      "description": "URL where files will be deployed."
    },
    "verbose": {
      "type": "boolean",
      "description": "Adds more details to output logging.",
      "default": false
    },
    "progress": {
      "type": "boolean",
      "description": "Log progress to the console while building.",
      "default": true
    },
    "i18nMissingTranslation": {
      "type": "string",
      "description": "How to handle missing translations for i18n.",
      "enum": ["warning", "error", "ignore"],
      "default": "warning"
    },
    "localize": {
      "description": "Translate the bundles in one or more locales.",
      "oneOf": [
        {
          "type": "boolean",
          "description": "Translate all locales."
        },
        {
          "type": "array",
          "description": "List of locales ID's to translate.",
          "minItems": 1,
          "items": {
            "type": "string",
            "pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?(-x(-[a-zA-Z0-9]{1,8})+)?$"
          }
        }
      ]
    },
    "extractCss": {
      "type": "boolean",
      "description": "Extract CSS from global styles into '.css' files instead of '.js'.",
      "default": true,
      "x-deprecated": "Deprecated since version 11.0. No longer required to disable CSS extraction for HMR."
    },
    "watch": {
      "type": "boolean",
      "description": "Run build when files change.",
      "default": false
    },
    "outputHashing": {
      "type": "string",
      "description": "Define the output filename cache-busting hashing mode.",
      "default": "none",
      "enum": ["none", "all", "media", "bundles"]
    },
    "poll": {
      "type": "number",
      "description": "Enable and define the file watching poll time period in milliseconds."
    },
    "deleteOutputPath": {
      "type": "boolean",
      "description": "Delete the output path before building.",
      "default": true
    },
    "preserveSymlinks": {
      "type": "boolean",
      "description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
    },
    "extractLicenses": {
      "type": "boolean",
      "description": "Extract all licenses in a separate file.",
      "default": true
    },
    "showCircularDependencies": {
      "type": "boolean",
      "description": "Show circular dependency warnings on builds.",
      "default": false,
      "x-deprecated": "The recommended method to detect circular dependencies in project code is to use either a lint rule or other external tooling."
    },
    "buildOptimizer": {
      "type": "boolean",
      "description": "Enables '@angular-devkit/build-optimizer' optimizations when using the 'aot' option.",
      "default": true
    },
    "namedChunks": {
      "type": "boolean",
      "description": "Use file name for lazy loaded chunks.",
      "default": false
    },
    "subresourceIntegrity": {
      "type": "boolean",
      "description": "Enables the use of subresource integrity validation.",
      "default": false
    },
    "serviceWorker": {
      "type": "boolean",
      "description": "Generates a service worker config for production builds.",
      "default": false
    },
    "ngswConfigPath": {
      "type": "string",
      "description": "Path to ngsw-config.json."
    },
    "index": {
      "description": "Configures the generation of the application's HTML index.",
      "oneOf": [
        {
          "type": "string",
          "description": "The path of a file to use for the application's HTML index. The filename of the specified path will be used for the generated file and will be created in the root of the application's configured output path."
        },
        {
          "type": "object",
          "description": "",
          "properties": {
            "input": {
              "type": "string",
              "minLength": 1,
              "description": "The path of a file to use for the application's generated HTML index."
            },
            "output": {
              "type": "string",
              "minLength": 1,
              "default": "index.html",
              "description": "The output path of the application's generated HTML index file. The full provided path will be used and will be considered relative to the application's configured output path."
            }
          },
          "required": ["input"]
        }
      ]
    },
    "statsJson": {
      "type": "boolean",
      "description": "Generates a 'stats.json' file which can be analyzed using tools such as 'webpack-bundle-analyzer'.",
      "default": false
    },
    "budgets": {
      "description": "Budget thresholds to ensure parts of your application stay within boundaries which you set.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/budget"
      },
      "default": []
    },
    "webWorkerTsConfig": {
      "type": "string",
      "description": "TypeScript configuration for Web Worker modules."
    },
    "crossOrigin": {
      "type": "string",
      "description": "Define the crossorigin attribute setting of elements that provide CORS support.",
      "default": "none",
      "enum": ["none", "anonymous", "use-credentials"]
    },
    "allowedCommonJsDependencies": {
      "description": "A list of CommonJS packages that are allowed to be used without a build time warning.",
      "type": "array",
      "items": {
        "type": "string"
      },
      "default": []
    }
  },
  "additionalProperties": false,
  "required": ["outputPath", "index", "main", "tsConfig"],
  "definitions": {
    "assetPattern": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "followSymlinks": {
              "type": "boolean",
              "default": false,
              "description": "Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched."
            },
            "glob": {
              "type": "string",
              "description": "The pattern to match."
            },
            "input": {
              "type": "string",
              "description": "The input directory path in which to apply 'glob'. Defaults to the project root."
            },
            "ignore": {
              "description": "An array of globs to ignore.",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "output": {
              "type": "string",
              "description": "Absolute path within the output."
            }
          },
          "additionalProperties": false,
          "required": ["glob", "input", "output"]
        },
        {
          "type": "string"
        }
      ]
    },
    "fileReplacement": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "src": {
              "type": "string",
              "pattern": "\\.(([cm]?j|t)sx?|json)$"
            },
            "replaceWith": {
              "type": "string",
              "pattern": "\\.(([cm]?j|t)sx?|json)$"
            }
          },
          "additionalProperties": false,
          "required": ["src", "replaceWith"]
        },
        {
          "type": "object",
          "properties": {
            "replace": {
              "type": "string",
              "pattern": "\\.(([cm]?j|t)sx?|json)$"
            },
            "with": {
              "type": "string",
              "pattern": "\\.(([cm]?j|t)sx?|json)$"
            }
          },
          "additionalProperties": false,
          "required": ["replace", "with"]
        }
      ]
    },
    "extraEntryPoint": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "input": {
              "type": "string",
              "description": "The file to include."
            },
            "bundleName": {
              "type": "string",
              "pattern": "^[\\w\\-.]*$",
              "description": "The bundle name for this extra entry point."
            },
            "inject": {
              "type": "boolean",
              "description": "If the bundle will be referenced in the HTML file.",
              "default": true
            }
          },
          "additionalProperties": false,
          "required": ["input"]
        },
        {
          "type": "string",
          "description": "The file to include."
        }
      ]
    },
    "budget": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of budget.",
          "enum": [
            "all",
            "allScript",
            "any",
            "anyScript",
            "anyComponentStyle",
            "bundle",
            "initial"
          ]
        },
        "name": {
          "type": "string",
          "description": "The name of the bundle."
        },
        "baseline": {
          "type": "string",
          "description": "The baseline size for comparison."
        },
        "maximumWarning": {
          "type": "string",
          "description": "The maximum threshold for warning relative to the baseline."
        },
        "maximumError": {
          "type": "string",
          "description": "The maximum threshold for error relative to the baseline."
        },
        "minimumWarning": {
          "type": "string",
          "description": "The minimum threshold for warning relative to the baseline."
        },
        "minimumError": {
          "type": "string",
          "description": "The minimum threshold for error relative to the baseline."
        },
        "warning": {
          "type": "string",
          "description": "The threshold for warning relative to the baseline (min & max)."
        },
        "error": {
          "type": "string",
          "description": "The threshold for error relative to the baseline (min & max)."
        }
      },
      "additionalProperties": false,
      "required": ["type"]
    }
  }
}


================================================
FILE: src/builder/application/token.ts
================================================
import { InjectionToken } from 'static-injector';

export const TS_CONFIG_TOKEN = new InjectionToken('TS_CONFIG_TOKEN');
export const PAGE_PATTERN_TOKEN = new InjectionToken('PAGE_PATTERN_TOKEN');
export const OLD_BUILDER = new InjectionToken('OLD_BUILDER');
export const TS_SYSTEM = new InjectionToken('TS_SYSTEM');
export const WEBPACK_COMPILATION = new InjectionToken('WEBPACK_COMPILATION');
export const WEBPACK_COMPILER = new InjectionToken('WEBPACK_COMPILER');


================================================
FILE: src/builder/application/type.ts
================================================
import type { AssetPattern } from '@angular-devkit/build-angular';
import { LibraryComponentEntryMeta } from '../library';
import { BuildPlatform, PlatformFileExtname } from '../platform';

export interface LibraryTemplateLiteralConvertOptions {
  directivePrefix: string;
  eventListConvert: (name: string[]) => string;
  templateInterpolation: [string, string];
  fileExtname: PlatformFileExtname;
}

export interface PagePattern extends Exclude<AssetPattern, string> {
  /** 入口名 */
  entryName: string;
  /** 匹配文件,相对于input */
  fileName: string;
  /** 要输出的js出口 */
  output: string;
  /** 绝对路径,path.join */
  src: string;
  outputFiles: {
    content: string;
    style: string;
    logic: string;
    path: string;
    config: string;
  };
  inputFiles: {
    config: string;
  };
  type: 'component' | 'page';
}

export interface LibraryLoaderContext {
  libraryMetaList: LibraryComponentEntryMeta[];
  buildPlatform: BuildPlatform;
}


================================================
FILE: src/builder/application/util/index.ts
================================================
export * from './set-compilation-asset';


================================================
FILE: src/builder/application/util/set-compilation-asset.ts
================================================
import * as webpack from 'webpack';

export function setCompilationAsset(
  compilation: webpack.Compilation,
  key: string,
  content: webpack.sources.Source
) {
  if (compilation.getAsset(key)) {
    compilation.updateAsset(key, content, {});
  } else {
    compilation.emitAsset(key, content, {});
  }
}


================================================
FILE: src/builder/application/webpack-configuration-change.service.ts
================================================
import type { BuilderContext } from '@angular-devkit/architect';
import {
  AssetPattern,
  BrowserBuilderOptions,
  KarmaBuilderOptions,
} from '@angular-devkit/build-angular';
import { normalize } from '@angular-devkit/core';
import * as path from 'path';
import { filter } from 'rxjs/operators';
import { Injectable, Injector } from 'static-injector';
import * as webpack from 'webpack';
import { DefinePlugin } from 'webpack';
import { BootstrapAssetsPlugin } from 'webpack-bootstrap-assets-plugin';
import { LIBRARY_OUTPUT_ROOTDIR } from '../library';
import { BuildPlatform } from '../platform/platform';
import type { PlatformType } from '../platform/platform';
import { LibraryTemplateScopeService } from './library-template-scope.service';
import { DynamicLibraryComponentEntryPlugin } from './plugin/dynamic-library-entry.plugin';
import { DynamicWatchEntryPlugin } from './plugin/dynamic-watch-entry.plugin';
import { ExportMiniProgramAssetsPlugin } from './plugin/export-mini-program-assets.plugin';
import { TS_CONFIG_TOKEN } from './token';
import type { PagePattern } from './type';

type OptimizationOptions = NonNullable<webpack.Configuration['optimization']>;
type OptimizationSplitChunksOptions = Exclude<
  OptimizationOptions['splitChunks'],
  false | undefined
>;
type OptimizationSplitChunksCacheGroup = Exclude<
  NonNullable<OptimizationSplitChunksOptions['cacheGroups']>[''],
  false | string | Function | RegExp
>;
@Injectable()
export class WebpackConfigurationChangeService {
  exportMiniProgramAssetsPluginInstance!: ExportMiniProgramAssetsPlugin;
  private buildPlatform!: BuildPlatform;
  private entryList!: PagePattern[];
  constructor(
    private options: (BrowserBuilderOptions | KarmaBuilderOptions) & {
      pages: AssetPattern[];
      components: AssetPattern[];
      platform: PlatformType;
    },
    private context: BuilderContext,
    private config: webpack.Configuration,
    private injector: Injector
  ) {}
  init() {
    this.injector = Injector.create({
      parent: this.injector,
      providers: [
        { provide: ExportMiniProgramAssetsPlugin },
        { provide: LibraryTemplateScopeService },
        {
          provide: TS_CONFIG_TOKEN,
          useValue: path.resolve(
            this.context.workspaceRoot,
            this.options.tsConfig
          ),
        },
        {
          provide: DynamicWatchEntryPlugin,
          deps: [BuildPlatform],
          useFactory: (buildPlatform: BuildPlatform) => {
            return new DynamicWatchEntryPlugin(
              {
                pages: this.options.pages,
                components: this.options.components,
                workspaceRoot: normalize(this.context.workspaceRoot),
                context: this.context,
                config: this.config,
              },
              buildPlatform
            );
          },
        },
        { provide: DynamicLibraryComponentEntryPlugin },
      ],
    });
    this.buildPlatform = this.injector.get(BuildPlatform);
    this.buildPlatform.fileExtname.config =
      this.buildPlatform.fileExtname.config || '.json';
    this.config.output!.globalObject = this.buildPlatform.globalObject;
  }
  async change() {
    this.buildPlatformCompatible();
    this.exportAssets();
    await this.pageHandle();
    this.addLoader();
    this.globalVariableChange();
    this.changeStylesExportSuffix();
    this.config.plugins?.push(
      this.injector.get(DynamicLibraryComponentEntryPlugin)
    );
    this.config.plugins?.push(
      new webpack.NormalModuleReplacementPlugin(
        /^angular-miniprogram\/platform\/wx$/,
        `angular-miniprogram/platform/${this.buildPlatform.packageName}`
      )
    );
  }
  private buildPlatformCompatible() {
    if (this.buildPlatform.packageName == 'zfb') {
      this.config.resolve?.conditionNames?.shift();
      this.config.resolve?.mainFields?.shift();
    }
  }
  private async pageHandle() {
    const dynamicWatchEntryInstance = this.injector.get(
      DynamicWatchEntryPlugin
    );
    await dynamicWatchEntryInstance.init();
    dynamicWatchEntryInstance.entryPattern$
      .pipe(filter((item) => !!item))
      .subscribe((result) => {
        this.entryList = [...result!.pageList, ...result!.componentList];
        this.exportMiniProgramAssetsPluginInstance.setEntry(
          result!.pageList,
          result!.componentList
        );
      });
    this.config.plugins?.push(dynamicWatchEntryInstance);
    // 出口
    const oldFileName = this.config.output!.filename as string;
    this.config.output!.filename = (chunkData) => {
      const page = this.entryList.find(
        (item) => item.entryName === chunkData.chunk!.name
      );
      if (page) {
        return page.outputFiles.logic;
      }
      return oldFileName;
    };
    // 共享依赖
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    const oldChunks = (this.config.optimization!.splitChunks as any).cacheGroups
      .defaultVendors.chunks;
    (
      (
        this.config.optimization!
          .splitChunks! as unknown as OptimizationSplitChunksOptions
      ).cacheGroups!.defaultVendors as OptimizationSplitChunksCacheGroup
    ).chunks = (chunk) => {
      if (
        this.entryList.find((item) => item.entryName === chunk.name) ||
        chunk.name!.startsWith(`${LIBRARY_OUTPUT_ROOTDIR}/`)
      ) {
        return true;
      }
      return oldChunks(chunk);
    };
    ((this.config.optimization!.splitChunks as OptimizationSplitChunksOptions)
      .cacheGroups!['moduleChunks'] as OptimizationSplitChunksCacheGroup) = {
      test: (module: webpack.NormalModule) => {
        const name = module.nameForCondition();
        return (
          (name &&
            name.endsWith('.ts') &&
            !/[\\/]node_modules[\\/]/.test(name)) ||
          name?.includes('angular-miniprogram\\dist')
        );
      },
      minChunks: 2,
      minSize: 0,
      name: 'module-chunk',
      chunks: 'all',
    };
    // 出口保留必要加载
    const assetsPlugin = new BootstrapAssetsPlugin();
    assetsPlugin.hooks.removeChunk.tap('pageHandle', (chunk) => {
      if (
        this.entryList.some((page) => page.entryName === chunk.name) ||
        [...chunk.files].some((file) =>
          file.endsWith(this.buildPlatform.fileExtname.style)
        ) ||
        chunk.name!.startsWith(`${LIBRARY_OUTPUT_ROOTDIR}/`)
      ) {
        return true;
      }
      return false;
    });
    assetsPlugin.hooks.emitAssets.tap('pageHandle', (object, json) => {
      return {
        'app.js':
          this.buildPlatform.importTemplate +
          json.scripts.map((item) => `require('./${item.src}')`).join(';'),
      };
    });
    this.config.plugins!.push(assetsPlugin);
  }
  private exportAssets() {
    this.exportMiniProgramAssetsPluginInstance = this.injector.get(
      ExportMiniProgramAssetsPlugin
    );
    this.config.plugins!.unshift(this.exportMiniProgramAssetsPluginInstance);
  }

  private addLoader() {
    this.config.module!.rules!.unshift({
      test: /\.ts$/,
      loader: require.resolve(
        path.join(__dirname, './loader/component-template.loader')
      ),
    });
    this.config.module?.rules?.unshift({
      test: /\.mjs$/,
      loader: require.resolve(path.join(__dirname, './loader/library.loader')),
    });
    this.config.module?.rules?.unshift({
      test: /\.mjs$/,
      loader: require.resolve(
        path.join(__dirname, './loader/library-template.loader')
      ),
    });
  }
  private globalVariableChange() {
    const defineObject: Record<string, string> = {
      global: `${this.buildPlatform.globalObject}.__global`,
      window: `${this.buildPlatform.globalVariablePrefix}`,
      globalThis: `${this.buildPlatform.globalVariablePrefix}`,
      Zone: `${this.buildPlatform.globalVariablePrefix}.Zone`,
      setTimeout: `${this.buildPlatform.globalVariablePrefix}.setTimeout`,
      clearTimeout: `${this.buildPlatform.globalVariablePrefix}.clearTimeout`,
      setInterval: `${this.buildPlatform.globalVariablePrefix}.setInterval`,
      clearInterval: `${this.buildPlatform.globalVariablePrefix}.clearInterval`,
      Promise: `${this.buildPlatform.globalVariablePrefix}.Promise`,
      Reflect: `${this.buildPlatform.globalVariablePrefix}.Reflect`,
      requestAnimationFrame: `${this.buildPlatform.globalVariablePrefix}.requestAnimationFrame`,
      cancelAnimationFrame: `${this.buildPlatform.globalVariablePrefix}.cancelAnimationFrame`,
      performance: `${this.buildPlatform.globalVariablePrefix}.performance`,
      navigator: `${this.buildPlatform.globalVariablePrefix}.navigator`,
      wx: this.buildPlatform.globalObject,
      miniProgramPlatform: `"${this.buildPlatform.globalObject}"`,
      queueMicrotask:`${this.buildPlatform.globalVariablePrefix}.queueMicrotask`
    };
    if (this.config.mode === 'development') {
      defineObject[
        'ngDevMode'
      ] = `${this.buildPlatform.globalObject}.__global.ngDevMode`;
    }
    this.config.plugins!.push(new DefinePlugin(defineObject));
  }
  private changeStylesExportSuffix() {
    const index = this.config.plugins!.findIndex(
      (plugin) =>
        Object.getPrototypeOf(plugin).constructor.name ===
        'MiniCssExtractPlugin'
    );
    if (index > -1) {
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      const pluginInstance = this.config.plugins![index] as any;
      const pluginPrototype = Object.getPrototypeOf(pluginInstance);
      this.config.plugins?.splice(
        index,
        1,
        new pluginPrototype.constructor({
          filename: 'app' + this.buildPlatform.fileExtname.style,
        })
      );
    } else {
      throw new Error('没有找到MiniCssExtractPlugin插件,无法修改生成style');
    }
  }
}


================================================
FILE: src/builder/builder.prod.spec.ts
================================================
import { join, normalize } from '@angular-devkit/core';
import {
  MyTestProjectHost,
  describeBuilder,
  setWorkspaceRoot,
} from '../../test/plugin-describe-builder';
import {
  BROWSER_BUILDER_INFO,
  DEFAULT_ANGULAR_CONFIG,
} from '../../test/test-builder';
import {
  ALL_COMPONENT_NAME_LIST,
  ALL_PAGE_NAME_LIST,
} from '../../test/util/file';
import { runBuilder } from './application';
import { PlatformType } from './platform/platform';

const angularConfig = {
  ...DEFAULT_ANGULAR_CONFIG,
  platform: PlatformType.wx,
  buildOptimizer: true,
  optimization: true,
  extractLicenses: true,
};

describeBuilder(runBuilder, BROWSER_BUILDER_INFO, (harness) => {
  describe('builder-prod', () => {
    it('运行', async () => {
      const root = harness.host.root();
      const myTestProjectHost = new MyTestProjectHost(harness.host);

      const list = await myTestProjectHost.getFileList(
        normalize(join(root, 'src', '__pages'))
      );
      list.push(
        ...(await myTestProjectHost.getFileList(
          normalize(join(root, 'src', '__components'))
        ))
      );
      await myTestProjectHost.importPathRename(list);
      await myTestProjectHost.moveDir(ALL_PAGE_NAME_LIST, '__pages', 'pages');
      await myTestProjectHost.moveDir(
        ALL_COMPONENT_NAME_LIST,
        '__components',
        'components'
      );
      await myTestProjectHost.addPageEntry(ALL_PAGE_NAME_LIST);
      harness.useTarget('build', angularConfig);
      const result = await harness.executeOnce();
      expect(result).toBeTruthy();
      expect(result.error).toBeFalsy();
      expect(result.logs[0].level !== 'error').toBeTruthy();
      expect(result.result?.success).toBeTruthy();
    });
  });
});


================================================
FILE: src/builder/builder.spec.ts
================================================
import { join, normalize } from '@angular-devkit/core';
import * as fs from 'fs-extra';
import * as path from 'path';
import { Injector } from 'static-injector';
import {
  MyTestProjectHost,
  describeBuilder,
  setWorkspaceRoot,
} from '../../test/plugin-describe-builder';
import {
  BROWSER_BUILDER_INFO,
  DEFAULT_ANGULAR_CONFIG,
} from '../../test/test-builder';
import {
  ALL_COMPONENT_NAME_LIST,
  ALL_PAGE_NAME_LIST,
  TEST_LIBRARY_COMPONENT_LIST,
} from '../../test/util/file';
import { runBuilder } from './application';
import { LIBRARY_OUTPUT_ROOTDIR } from './library';
import { BuildPlatform, PlatformType } from './platform/platform';
import { getBuildPlatformInjectConfig } from './platform/platform-inject-config';

const angularConfig = {
  ...DEFAULT_ANGULAR_CONFIG,
  platform: PlatformType.wx,
  sourceMap: false,
  // buildOptimizer: true,
  // optimization: true,
};
describeBuilder(runBuilder, BROWSER_BUILDER_INFO, (harness) => {
  describe('builder-dev', () => {
    for (const platform of [
      PlatformType.wx,
      PlatformType.bdzn,
      PlatformType.dd,
      PlatformType.jd,
      PlatformType.qq,
      PlatformType.zfb,
      PlatformType.zj,
    ]) {
      it(`运行${PlatformType[platform]}`, async () => {
        angularConfig.platform = platform;
        const root = harness.host.root();
        const myTestProjectHost = new MyTestProjectHost(harness.host);
        const list = await myTestProjectHost.getFileList(
          normalize(join(root, 'src', '__pages'))
        );
        list.push(
          ...(await myTestProjectHost.getFileList(
            normalize(join(root, 'src', '__components'))
          ))
        );
        await myTestProjectHost.importPathRename(list);
        await myTestProjectHost.moveDir(ALL_PAGE_NAME_LIST, '__pages', 'pages');
        await myTestProjectHost.moveDir(
          ALL_COMPONENT_NAME_LIST,
          '__components',
          'components'
        );
        await myTestProjectHost.addPageEntry(ALL_PAGE_NAME_LIST);
        harness.useTarget('build', angularConfig);
        const result = await harness.executeOnce();
        expect(result).toBeTruthy();
        expect(result.error).toBeFalsy();
        expect(result.logs[0].level !== 'error').toBeTruthy();
        expect(result.result?.success).toBeTruthy();
        const injectList = getBuildPlatformInjectConfig(angularConfig.platform);
        const injector = Injector.create({ providers: injectList });
        const buildPlatform = injector.get(BuildPlatform);
        harness
          .expectFile(
            join(
              normalize(DEFAULT_ANGULAR_CONFIG.outputPath),
              `app${buildPlatform.fileExtname.style}`
            )
          )
          .toExist();
        const libraryPath = join(
          normalize(DEFAULT_ANGULAR_CONFIG.outputPath),
          LIBRARY_OUTPUT_ROOTDIR,
          'test-library'
        );
        const librarySelfTemplateFile = harness.expectFile(
          join(libraryPath, `self${buildPlatform.fileExtname.contentTemplate}`)
        );
        librarySelfTemplateFile.toExist();
        librarySelfTemplateFile.content.toContain(`$$mp$$__self__$$`);
        TEST_LIBRARY_COMPONENT_LIST.forEach((item) => {
          const componentPath = join(libraryPath, item, item);
          harness
            .expectFile(componentPath + buildPlatform.fileExtname.logic)
            .toExist();
          harness
            .expectFile(
              componentPath + (buildPlatform.fileExtname.config || '.json')
            )
            .toExist();
          harness
            .expectFile(componentPath + buildPlatform.fileExtname.content)
            .toExist();
        });
        const realTestPath: string = result.result?.baseOutputPath as string;
        const appTestPath = path.resolve(process.cwd(), '__test-app');
        fs.copySync(realTestPath, path.resolve(process.cwd(), '__test-app'));
        // ('等待断点放开');
        fs.removeSync(appTestPath);
      });
    }
  });
});


================================================
FILE: src/builder/builder.watch.spec.ts
================================================
import { join, normalize } from '@angular-devkit/core';
import fs from 'node:fs';
import path from 'node:path';
import { of } from 'rxjs';
import { concatMap, skip, take } from 'rxjs/operators';
import {
  MyTestProjectHost,
  describeBuilder,
  setWorkspaceRoot,
} from '../../test/plugin-describe-builder';
import {
  BROWSER_BUILDER_INFO,
  DEFAULT_ANGULAR_CONFIG,
} from '../../test/test-builder';
import {
  ALL_COMPONENT_NAME_LIST,
  ALL_PAGE_NAME_LIST,
} from '../../test/util/file';
import { runBuilder } from './application';
import { PlatformType } from './platform/platform';

const angularConfig = {
  ...DEFAULT_ANGULAR_CONFIG,
  platform: PlatformType.wx,
  watch: true,
};
describeBuilder(
  runBuilder,
  { ...BROWSER_BUILDER_INFO, name: 'test-builder:watch' },
  (harness) => {
    describe('builder-watch-dev', () => {
      it('运行', async () => {
        const root = harness.host.root();
        const myTestProjectHost = new MyTestProjectHost(harness.host);

        const list = await myTestProjectHost.getFileList(
          normalize(join(root, 'src', '__pages'))
        );
        list.push(
          ...(await myTestProjectHost.getFileList(
            normalize(join(root, 'src', '__components'))
          ))
        );
        await myTestProjectHost.importPathRename(list);
        await myTestProjectHost.moveDir(ALL_PAGE_NAME_LIST, '__pages', 'pages');
        await myTestProjectHost.moveDir(
          ALL_COMPONENT_NAME_LIST,
          '__components',
          'components'
        );
        await myTestProjectHost.addPageEntry(ALL_PAGE_NAME_LIST);
        let finish: Function;
        const waitFinish = new Promise((res) => {
          finish = res;
        });
        harness.useTarget('build', angularConfig);
        harness
          .execute()
          .pipe(
            concatMap((result, index) => {
              if (index) {
                return of(result);
              }
              const value = JSON.parse(harness.readFile('src/app.json'));
              value.pages.push(`pages/sub3/sub3-entry`);
              const data = readFixture('watch/sub3', 'src/pages/sub3');
              harness
                .writeFiles({
                  'src/app.json': JSON.stringify(value),
                  ...data,
                })
                .then(
                  (res) => {},
                  (rej) => {
                    throw rej;
                  }
                );
              return of(result);
            }),
            take(2),
            skip(1)
          )
          .subscribe((result) => {
            expect(result.logs[0].level !== 'error').toBeTruthy();
            expect(result).toBeTruthy();
            expect(result.error).toBeFalsy();
            expect(result.result?.success).toBeTruthy();
            expect(result.logs[0].message).toContain('sub3-entry.js');
            harness
              .expectFile(
                join(
                  normalize(DEFAULT_ANGULAR_CONFIG.outputPath),
                  'pages/sub3/sub3-entry.js'
                )
              )
              .toExist();
            harness
              .expectFile(
                join(
                  normalize(DEFAULT_ANGULAR_CONFIG.outputPath),
                  'pages/sub3/sub3-entry.json'
                )
              )
              .toExist();
            harness
              .expectFile(
                join(
                  normalize(DEFAULT_ANGULAR_CONFIG.outputPath),
                  'pages/sub3/sub3-entry.wxml'
                )
              )
              .toExist();
            harness
              .expectFile(
                join(
                  normalize(DEFAULT_ANGULAR_CONFIG.outputPath),
                  'pages/sub3/sub3-entry.wxss'
                )
              )
              .toExist();
            harness
              .expectFile(
                join(
                  normalize(DEFAULT_ANGULAR_CONFIG.outputPath),
                  'library/test-library/lib-comp1-component/lib-comp1-component.js'
                )
              )
              .toExist();
            finish();
          });
        await waitFinish;
      });
    });
  }
);
function readFixture(dir: string, to: string) {
  const dirPath = path.resolve(__dirname, 'test/fixture', dir);
  const list = fs.readdirSync(dirPath);
  const fileObject: Record<string, string> = {};
  for (const item of list) {
    const filePath = path.resolve(dirPath, item);
    const content = fs.readFileSync(filePath, { encoding: 'utf8' });
    fileObject[`${path.posix.join(to, item)}`] = content;
  }
  return fileObject;
}


================================================
FILE: src/builder/builders.json
================================================
{
  "$schema": "../../node_modules/@angular-devkit/architect/src/builders-schema.json",
  "builders": {
    "application": {
      "implementation": "./application",
      "schema": "./application/schema.json",
      "description": "小程序构建builder"
    },
    "library": {
      "implementation": "./library/builder",
      "schema": "./library/schema.json",
      "description": "小程序构建library"
    },
    "karma": {
      "implementation": "./karma",
      "schema": "./karma/schema.json",
      "description": "小程序测试"
    }
  }
}


================================================
FILE: src/builder/component-template-inject/change-component.ts
================================================
import {
  Change,
  InsertChange,
  TsChange,
  createCssSelectorForTs,
} from 'cyia-code-util';
import * as ts from 'typescript';
import { RawUpdater } from '../util';

export function changeComponent(data: string) {
  const sf = ts.createSourceFile('', data, ts.ScriptTarget.Latest, true);
  const selector = createCssSelectorForTs(sf);

  const ɵcmpNodeList = selector.queryAll(
    `PropertyAccessExpression[name=ɵɵdefineComponent]~SyntaxList ObjectLiteralExpression`
  ) as ts.BinaryExpression[];
  if (!ɵcmpNodeList.length) {
    return undefined;
  }
  const changeList: Change[] = [];
  for (const componentNode of ɵcmpNodeList) {
    const ɵcmpNode = componentNode;

    const templateNode = selector.queryOne(
      ɵcmpNode,
      `PropertyAssignment[name=template]::initializer`
    ) as ts.PropertyAssignment;
    const initIfNode = selector.queryOne(
      templateNode,
      `IfStatement[expression="rf & 1"]`
    ) as ts.IfStatement;
    if (!initIfNode) {
      continue;
    }
    const change = new TsChange(sf);

    let updateInsertChange: InsertChange;
    changeList.push(
      new InsertChange(0, `import * as amp from 'angular-miniprogram';\n`)
    );
    changeList.push(
      new InsertChange(0, `import * as ampNgCore from '@angular/core';\n`)
    );
    const updateIfNode = selector.queryOne(
      templateNode,
      `IfStatement[expression="rf & 2"]`
    ) as ts.IfStatement;
    const updateContent = `amp.propertyChange(ampNgCore.ɵɵgetCurrentView());`;
    if (updateIfNode) {
      const updateBlock = updateIfNode.thenStatement as ts.Block;
      updateInsertChange = change.insertNode(
        updateBlock.statements[updateBlock.statements.length - 1],
        `;${updateContent}`,
        'end'
      );
    } else {
      updateInsertChange = change.insertNode(
        initIfNode,
        `if(rf & 2){${updateContent}}`,
        'end'
      );
    }
    changeList.push(updateInsertChange);
  }
  return {
    content: RawUpdater.update(data, changeList),
    // todo library可否支持同文件多组件
    componentName: selector
      .queryOne(ɵcmpNodeList[0], 'PropertyAssignment[name=type]::initializer')
      .getText(),
  };
}


================================================
FILE: src/builder/karma/client/adapter.ts
================================================
import { KarmaClient } from './karma';

// Save link to native Date object
// before it might be mocked by the user
const _Date = Date;

/**
 * Decision maker for whether a stack entry is considered external to jasmine and karma.
 * @param  {String}  entry Error stack entry.
 * @return {Boolean}       True if external, False otherwise.
 */
function isExternalStackEntry(entry: string) {
  return (
    !!entry &&
    // entries related to jasmine and karma-jasmine:
    !/\/(jasmine-core|karma-jasmine)\//.test(entry) &&
    // karma specifics, e.g. "at http://localhost:7018/karma.js:185"
    !/\/(karma.js|context.html):/.test(entry)
  );
}

/**
 * Returns relevant stack entries.
 * @param  {Array} stack frames
 * @return {Array}        A list of relevant stack entries.
 */
function getRelevantStackFrom(stack: string[]): string[] {
  let filteredStack: string[] = [];
  const relevantStack: string[] = [];

  for (let i = 0; i < stack.length; i += 1) {
    if (isExternalStackEntry(stack[i])) {
      filteredStack.push(stack[i]);
    }
  }

  // If the filtered stack is empty, i.e. the error originated entirely from within jasmine or karma, then the whole stack
  // should be relevant.
  if (filteredStack.length === 0) {
    filteredStack = stack;
  }

  for (let i = 0; i < filteredStack.length; i += 1) {
    if (filteredStack[i]) {
      relevantStack.push(filteredStack[i]);
    }
  }

  return relevantStack;
}

/**
 * Custom formatter for a failed step.
 *
 * Different browsers report stack trace in different ways. This function
 * attempts to provide a concise, relevant error message by removing the
 * unnecessary stack traces coming from the testing framework itself as well
 * as possible repetition.
 *
 * @see    https://github.com/karma-runner/karma-jasmine/issues/60
 * @param  {Object} step Step object with stack and message properties.
 * @return {String}      Formatted step.
 */
function formatFailedStep(step: Record<string, any>): string {
  const relevantMessage: string[] = [];
  const relevantStack: string[] = [];

  // Safari/Firefox seems to have no stack trace,
  // so we just return the error message and if available
  // construct a stacktrace out of filename and lineno:
  if (!step.stack) {
    if (step.filename) {
      let stackframe: string = step.filename;
      if (step.lineno) {
        stackframe = stackframe + ':' + step.lineno;
      }
      relevantStack.push(stackframe);
    }
    relevantMessage.push(step.message);
    return relevantMessage.concat(relevantStack).join('\n');
  }

  // Remove the message prior to processing the stack to prevent issues like
  // https://github.com/karma-runner/karma-jasmine/issues/79
  const stackframes = step.stack.split('\n');
  let messageOnStack = null;
  if (stackframes[0].indexOf(step.message) !== -1) {
    // Remove the message if it is in the stack string (eg Chrome)
    messageOnStack = stackframes.shift();
  }
  // Filter frames
  const relevantStackFrames = getRelevantStackFrom(stackframes);
  if (messageOnStack) {
    // Put the message back if we removed it.
    relevantStackFrames.unshift(messageOnStack);
  } else {
    // The stack did not have the step.message so add it.
    relevantStackFrames.unshift(step.message);
  }

  return relevantStackFrames.join('\n');
}

class SuiteNode {
  constructor(public name?: string, public parent?: SuiteNode) {}
  description!: string;
  children: any[] = [];

  addChild(name: string) {
    const suite = new SuiteNode(name, this);
    this.children.push(suite);
    return suite;
  }
}

function processSuite(suite: SuiteNode, pointer: Record<string, any>) {
  let child;
  let childPointer;

  for (let i = 0; i < suite.children.length; i++) {
    child = suite.children[i];

    if (child.children) {
      childPointer = pointer[child.description] = { _: [] };
      processSuite(child, childPointer);
    } else {
      if (!pointer._) {
        pointer._ = [];
      }
      pointer._.push(child.description);
    }
  }
}

function getAllSpecNames(topSuite: SuiteNode) {
  const specNames = {};

  processSuite(topSuite, specNames);

  return specNames;
}

/**
 * Very simple reporter for Jasmine.
 */
class KarmaReporter implements jasmine.CustomReporter {
  currentSuite = new SuiteNode();

  startTimeCurrentSpec = new _Date().getTime();

  constructor(private tc: KarmaClient, private jasmineEnv: jasmine.Env) {}
  handleGlobalErrors(result: Record<string, any>) {
    if (result.failedExpectations && result.failedExpectations.length) {
      let message: string = 'An error was thrown in afterAll';
      const steps = result.failedExpectations;
      for (let i = 0, l = steps.length; i < l; i++) {
        message += '\n' + formatFailedStep(steps[i]);
      }

      this.tc.error(message);
    }
  }

  /**
   * Jasmine 2.0 dispatches the following events:
   *
   *  - jasmineStarted
   *  - jasmineDone
   *  - suiteStarted
   *  - suiteDone
   *  - specStarted
   *  - specDone
   */

  jasmineStarted(data: Record<string, any>) {
    // TODO(vojta): Do not send spec names when polling.
    this.tc.info({
      event: 'jasmineStarted',
      total: data.totalSpecsDefined,
      specs: getAllSpecNames(this.jasmineEnv.topSuite() as any),
    });
  }

  jasmineDone(result: Record<string, any>) {
    result = result || {};

    // Any errors in top-level afterAll blocks are given here.
    this.handleGlobalErrors(result);

    // Remove functions from called back results to avoid IPC errors in Electron
    // https://github.com/twolfson/karma-electron/issues/47
    let cleanedOrder!: Record<string, any>;
    if (result.order) {
      cleanedOrder = {};
      const orderKeys = Object.getOwnPropertyNames(result.order);
      for (let i = 0; i < orderKeys.length; i++) {
        const orderKey = orderKeys[i];
        if (typeof result.order[orderKey] !== 'function') {
          cleanedOrder[orderKey] = result.order[orderKey];
        }
      }
    }
    // todo 单元测试覆盖率移除
    this.tc.complete({
      order: cleanedOrder,
      coverage: undefined,
    });
  }

  suiteStarted(result: Record<string, any>) {
    this.currentSuite = this.currentSuite.addChild(result.description);
    this.tc.info({
      event: 'suiteStarted',
      result: result,
    });
  }

  suiteDone(result: Record<string, any>) {
    // In the case of xdescribe, only "suiteDone" is fired.
    // We need to skip that.
    if (result.description !== this.currentSuite.name) {
      return;
    }

    // Any errors in afterAll blocks are given here, except for top-level
    // afterAll blocks.
    this.handleGlobalErrors(result);

    this.currentSuite = this.currentSuite.parent!;

    this.tc.info({
      event: 'suiteDone',
      result: result,
    });
  }

  specStarted() {
    this.startTimeCurrentSpec = new _Date().getTime();
  }

  specDone(specResult: Record<string, any>) {
    const skipped =
      specResult.status === 'disabled' ||
      specResult.status === 'pending' ||
      specResult.status === 'excluded';
    const result = {
      fullName: specResult.fullName,
      description: specResult.description,
      id: specResult.id,
      log: [] as string[],
      skipped: skipped,
      disabled:
        specResult.status === 'disabled' || specResult.status === 'excluded',
      pending: specResult.status === 'pending',
      success: specResult.failedExpectations.length === 0,
      suite: [] as string[],
      time: skipped ? 0 : new _Date().getTime() - this.startTimeCurrentSpec,
      executedExpectationsCount:
        specResult.failedExpectations.length +
        specResult.passedExpectations.length,
      passedExpectations: specResult.passedExpectations,
      properties: specResult.properties,
    };

    // generate ordered list of (nested) suite names
    let suitePointer = this.currentSuite;
    while (suitePointer.parent) {
      result.suite.unshift(suitePointer.name!);
      suitePointer = suitePointer.parent;
    }

    if (!result.success) {
      const steps = specResult.failedExpectations;
      for (let i = 0, l = steps.length; i < l; i++) {
        result.log.push(formatFailedStep(steps[i]));
      }

      // todo 永远不可能赋值当前
      // Report the name of fhe failing spec so the reporter can emit a debug url.
      // (result as any).debug_url = debugUrl(specResult.fullName);
    }

    // When failSpecWithNoExpectations is true, Jasmine will report specs without expectations as failed
    if (
      result.executedExpectationsCount === 0 &&
      specResult.status === 'failed'
    ) {
      result.success = false;
      result.log.push('Spec has no expectations');
    }

    this.tc.result(result);
    delete specResult.startTime;
  }
}

/**
 * Extract grep option from karma config
 * @param {[Array|string]} clientArguments The karma client arguments
 * @return {string} The value of grep option by default empty string
 */
const getGrepOption = function (clientArguments: any[] | string) {
  const grepRegex = /^--grep=(.*)$/;

  if (Object.prototype.toString.call(clientArguments) === '[object Array]') {
    const indexOfGrep = indexOf(clientArguments as any[], '--grep');

    if (indexOfGrep !== -1) {
      return clientArguments[indexOfGrep + 1];
    }

    return (
      map(
        filter(clientArguments as any[], function (arg: string) {
          return grepRegex.test(arg);
        }),
        function (arg) {
          return arg.replace(grepRegex, '$1');
        }
      )[0] || ''
    );
  } else if (typeof clientArguments === 'string') {
    const match = /--grep=([^=]+)/.exec(clientArguments);

    return match ? match[1] : '';
  }
};

const createRegExp = function (filter: string) {
  filter = filter || '';
  if (filter === '') {
    return new RegExp(''); // to match all
  }

  const regExp = /^[/](.*)[/]([gmixXsuUAJD]*)$/; // pattern to check whether the string is RegExp pattern

  const parts = regExp.exec(filter);
  if (parts === null) {
    return new RegExp(filter.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')); // escape functional symbols
  }

  const patternExpression = parts[1];
  const patternSwitches = parts[2];
  return new RegExp(patternExpression, patternSwitches);
};

function getGrepSpecsToRun(clientConfig: Record<string, any>, specs: any[]) {
  const grepOption = getGrepOption(clientConfig.args);
  if (grepOption) {
    const regExp = createRegExp(grepOption);
    return filter(specs, function specFilter(spec: any) {
      return regExp.test(spec.getFullName());
    });
  }
}

function parseQueryParams(location: Record<string, any>) {
  const params: Record<string, any> = {};
  if (location && Object.prototype.hasOwnProperty.call(location, 'search')) {
    const pairs = location.search.substr(1).split('&');
    for (let i = 0; i < pairs.length; i++) {
      const keyValue = pairs[i].split('=');
      params[decodeURIComponent(keyValue[0])] = decodeURIComponent(keyValue[1]);
    }
  }
  return params;
}

function getId(s: { id: any }) {
  return s.id;
}

function getSpecsByName(specs: any[], name: string) {
  specs = specs.filter(function (s) {
    return s.name.indexOf(name) !== -1;
  });
  if (specs.length === 0) {
    throw new Error('No spec found with name: "' + name + '"');
  }
  return specs;
}

function getDebugSpecToRun(location: Record<string, any>, specs: any[]) {
  const queryParams: Record<string, any> = parseQueryParams(location);
  const spec = queryParams.spec;
  if (spec) {
    // A single spec has been requested by name for debugging.
    return getSpecsByName(specs, spec);
  }
}

function getSpecsToRunForCurrentShard(
  specs: any[],
  shardIndex: number,
  totalShards: number
) {
  if (specs.length < totalShards) {
    throw new Error(
      'More shards (' + totalShards + ') than test specs (' + specs.length + ')'
    );
  }

  // Just do a simple sharding strategy of dividing the number of specs
  // equally.
  const firstSpec = Math.floor((specs.length * shardIndex) / totalShards);
  const lastSpec = Math.floor((specs.length * (shardIndex + 1)) / totalShards);
  return specs.slice(firstSpec, lastSpec);
}

function getShardedSpecsToRun(specs: any[], clientConfig: Record<string, any>) {
  const shardIndex = clientConfig.shardIndex;
  const totalShards = clientConfig.totalShards;
  if (shardIndex != null && totalShards != null) {
    // Sharded mode - Run only the subset of the specs corresponding to the
    // current shard.
    return getSpecsToRunForCurrentShard(
      specs,
      Number(shardIndex),
      Number(totalShards)
    );
  }
}

/**
 * Create jasmine spec filter
 * @param {Object} clientConfig karma config
 * @param {!Object} jasmineEnv
 */
class KarmaSpecFilter {
  specIdsToRun: any[];
  constructor(
    private clientConfig: Record<string, any>,
    private jasmineEnv: jasmine.Env
  ) {
    this.specIdsToRun = this.getSpecsToRun(
      undefined as any,
      this.clientConfig,
      this.jasmineEnv
    ).map(getId);
  }
  /**
   * Walk the test suite tree depth first and collect all test specs
   * @param {!Object} jasmineEnv
   * @return {!Array<string>} All possible tests.
   */
  getAllSpecs(jasmineEnv: jasmine.Env) {
    const specs: (jasmine.Suite | jasmine.Spec)[] = [];
    let stack = [jasmineEnv.topSuite()];
    let currentNode: jasmine.Suite;
    while ((currentNode = stack.pop()!)) {
      if (currentNode.children) {
        // jasmine.Suite
        stack = stack.concat(currentNode.children as jasmine.Suite[]);
      } else if (currentNode.id) {
        // jasmine.Spec
        specs.unshift(currentNode);
      }
    }

    return specs;
  }

  /**
   * Filter the specs with URL search params and config.
   * @param {!Object} location property 'search' from URL.
   * @param {!Object} clientConfig karma client config
   * @param {!Object} jasmineEnv
   * @return {!Array<string>}
   */
  getSpecsToRun(
    location: Record<string, any>,
    clientConfig: Record<string, any>,
    jasmineEnv: jasmine.Env
  ) {
    const specs = this.getAllSpecs(jasmineEnv).map(function (spec) {
      (spec as any).name = spec.getFullName();
      return spec;
    });

    if (!specs || !specs.length) {
      return [];
    }

    return (
      getGrepSpecsToRun(clientConfig, specs) ||
      getDebugSpecToRun(location, specs) ||
      getShardedSpecsToRun(specs, clientConfig) ||
      specs
    );
  }

  matches(spec: jasmine.Suite) {
    return this.specIdsToRun.indexOf(spec.id) !== -1;
  }
}

/**
 * Configure jasmine specFilter
 *
 * This function is invoked from the wrapper.
 * @see  adapter.wrapper
 *
 * @param {Object} config The karma config
 * @param {Object} jasmineEnv jasmine environment object
 */
const createSpecFilter = function (
  config: Record<string, any>,
  jasmineEnv: jasmine.Env
) {
  const karmaSpecFilter = new KarmaSpecFilter(config, jasmineEnv);

  const specFilter = function (spec: jasmine.Suite) {
    return karmaSpecFilter.matches(spec);
  };

  return specFilter;
};

/**
 * Karma starter function factory.
 *
 * This function is invoked from the wrapper.
 * @see  adapter.wrapper
 *
 * @param  {Object}   karma        Karma runner instance.
 * @param  {Object}   [jasmineEnv] Optional Jasmine environment for testing.
 * @return {Function}              Karma starter function.
 */
export function createStartFn(karma: KarmaClient, jasmineEnv: jasmine.Env) {
  // This function will be assigned to `window.__karma__.start`:
  return function () {
    const clientConfig = {
      args: [],
      useIframe: true,
      runInParent: false,
      captureConsole: true,
      clearContext: false,
      jasmine: {},
      originalArgs: [],
    };
    const jasmineConfig = clientConfig.jasmine || {};

    jasmineEnv = jasmineEnv || jasmine.getEnv();

    (jasmineConfig as any).specFilter = createSpecFilter(
      clientConfig,
      jasmineEnv
    );

    jasmineEnv.configure(jasmineConfig);

    jasmine.DEFAULT_TIMEOUT_INTERVAL =
      (jasmineConfig as any).timeoutInterval ||
      jasmine.DEFAULT_TIMEOUT_INTERVAL;
    jasmineEnv.addReporter(new KarmaReporter(karma, jasmineEnv));
    jasmineEnv.execute();
  };
}

function indexOf(collection: any[], find: any, i?: number /* opt */) {
  if (collection.indexOf) {
    return collection.indexOf(find, i);
  }

  if (i === undefined) {
    i = 0;
  }
  if (i < 0) {
    i += collection.length;
  }
  if (i < 0) {
    i = 0;
  }
  for (let n = collection.length; i < n; i++) {
    if (i in collection && collection[i] === find) {
      return i;
    }
  }
  return -1;
}

function filter(collection: any[], filter: any, that?: any /* opt */) {
  if (collection.filter) {
    return collection.filter(filter, that);
  }

  const other: any[] = [];
  let v: any;
  for (let i = 0, n = collection.length; i < n; i++) {
    if (
      i in collection &&
      filter.call(that, (v = collection[i]), i, collection)
    ) {
      other.push(v);
    }
  }
  return other;
}

function map(
  collection: any[],
  mapper: (value: any, index: number, array: any[]) => any,
  that?: any /* opt */
) {
  if (collection.map) {
    return collection.map(mapper, that);
  }

  const other = new Array(collection.length);
  for (let i = 0, n = collection.length; i < n; i++) {
    if (i in collection) {
      other[i] = mapper.call(that, collection[i], i, collection);
    }
  }
  return other;
}


================================================
FILE: src/builder/karma/client/index.ts
================================================
export * from './main';


================================================
FILE: src/builder/karma/client/karma.ts
================================================
import { IO } from './platform';
import { StatusUpdater } from './updater';

export class KarmaClient {
  /** 是否正式发射判断? */
  private startEmitted = false;

  public config: Record<string, any> = {};
  /** socket重连接标记 */
  private socketReconnect = false;
  private resultsBufferLimit = 50;
  private resultsBuffer: any[] = [];
  private returnUrl!: string;
  readonly id: string = 'miniprogram';
  constructor(private updater: StatusUpdater, private socket: IO) {
    socket.on('execute', (cfg) => {
      this.updater.updateTestStatus('execute');
      // reset startEmitted and reload the iframe
Download .txt
gitextract_1na6sspd/

├── .eslintignore
├── .eslintrc.json
├── .github/
│   └── workflows/
│       ├── alpha.yml
│       ├── default.yml
│       ├── deploy.yml
│       └── pull_request.yml
├── .gitignore
├── .husky/
│   ├── commit-msg
│   └── pre-commit
├── .npmrc
├── .nycrc.json
├── .prettierignore
├── .prettierrc
├── .vscode/
│   ├── launch.json
│   └── settings.json
├── LICENSE
├── commitlint.config.js
├── deploy/
│   └── doc/
│       ├── .gitignore
│       ├── Gemfile
│       ├── _config.yml
│       ├── _includes/
│       │   └── language-change.html
│       ├── _layouts/
│       │   ├── home.html
│       │   ├── post.html
│       │   └── redirect.html
│       ├── _posts/
│       │   ├── 2022-02-10-无时间测试.md
│       │   └── 2022-02-10-测试.md
│       ├── assets/
│       │   └── css/
│       │       └── style.scss
│       ├── en-US/
│       │   ├── attention.md
│       │   ├── index.md
│       │   ├── life-time.md
│       │   ├── miniprogram-feature.md
│       │   └── quick-start.md
│       ├── index.md
│       └── zh-Hans/
│           ├── attention.md
│           ├── index.md
│           ├── life-time.md
│           ├── miniprogram-feature.md
│           └── quick-start.md
├── jasmine.json
├── package.json
├── readme.md
├── script/
│   ├── build-ng-package.ts
│   ├── build.ts
│   ├── coverage-badge.ts
│   ├── package-sync.ts
│   ├── registry-transformer.js
│   ├── schema-merge.ts
│   ├── start-build-library.js
│   ├── startup-jasmine.ts
│   ├── tsconfig.json
│   └── tsconfig.startup-jasmine.json
├── src/
│   ├── builder/
│   │   ├── angular-internal/
│   │   │   ├── ast.type.ts
│   │   │   ├── selector.ts
│   │   │   ├── tags.ts
│   │   │   ├── template.ts
│   │   │   └── util.ts
│   │   ├── application/
│   │   │   ├── const.ts
│   │   │   ├── index.ts
│   │   │   ├── library-template-scope.service.ts
│   │   │   ├── loader/
│   │   │   │   ├── component-template.loader.ts
│   │   │   │   ├── library-template.loader.ts
│   │   │   │   ├── library.loader.ts
│   │   │   │   └── type.ts
│   │   │   ├── mini-program-application-analysis.service.ts
│   │   │   ├── plugin/
│   │   │   │   ├── dynamic-library-entry.plugin.ts
│   │   │   │   ├── dynamic-watch-entry.plugin.ts
│   │   │   │   └── export-mini-program-assets.plugin.ts
│   │   │   ├── schema.base.json
│   │   │   ├── schema.json
│   │   │   ├── token.ts
│   │   │   ├── type.ts
│   │   │   ├── util/
│   │   │   │   ├── index.ts
│   │   │   │   └── set-compilation-asset.ts
│   │   │   └── webpack-configuration-change.service.ts
│   │   ├── builder.prod.spec.ts
│   │   ├── builder.spec.ts
│   │   ├── builder.watch.spec.ts
│   │   ├── builders.json
│   │   ├── component-template-inject/
│   │   │   └── change-component.ts
│   │   ├── karma/
│   │   │   ├── client/
│   │   │   │   ├── adapter.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── karma.ts
│   │   │   │   ├── main.ts
│   │   │   │   ├── platform/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── wx/
│   │   │   │   │       └── index.ts
│   │   │   │   ├── tsconfig.json
│   │   │   │   └── updater.ts
│   │   │   ├── index.origin.ts
│   │   │   ├── index.spec.ts
│   │   │   ├── index.ts
│   │   │   ├── plugin/
│   │   │   │   ├── index.js
│   │   │   │   ├── index.ts
│   │   │   │   ├── karma.ts
│   │   │   │   ├── launcher.ts
│   │   │   │   └── tsconfig.json
│   │   │   └── schema.json
│   │   ├── library/
│   │   │   ├── add-declaration-metadata.service.ts
│   │   │   ├── builder.ts
│   │   │   ├── compile-ngc.transform.ts
│   │   │   ├── compile-source-files.ts
│   │   │   ├── const.ts
│   │   │   ├── get-library-path.ts
│   │   │   ├── index.ts
│   │   │   ├── library.spec.ts
│   │   │   ├── merge-using-component-path.ts
│   │   │   ├── ng-packagr-factory.ts
│   │   │   ├── output-template-metadata.service.ts
│   │   │   ├── remove-publish-only.ts
│   │   │   ├── schema.json
│   │   │   ├── setup-component-data.service.ts
│   │   │   ├── stylesheet-processor.ts
│   │   │   ├── token.ts
│   │   │   └── type.ts
│   │   ├── mini-program-compiler/
│   │   │   ├── component-compiler.service.ts
│   │   │   ├── index.ts
│   │   │   ├── meta-collection.ts
│   │   │   ├── mini-program-compiler.service.ts
│   │   │   ├── parse-node/
│   │   │   │   ├── bound-text.ts
│   │   │   │   ├── component-context.ts
│   │   │   │   ├── content.ts
│   │   │   │   ├── element.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── interface.ts
│   │   │   │   ├── template-definition.ts
│   │   │   │   ├── template.ts
│   │   │   │   ├── text.ts
│   │   │   │   └── type.ts
│   │   │   └── type.ts
│   │   ├── platform/
│   │   │   ├── bd/
│   │   │   │   ├── bdzn-platform.ts
│   │   │   │   └── bdzn.transform.ts
│   │   │   ├── dd/
│   │   │   │   ├── dd-platform.ts
│   │   │   │   └── dd.transform.ts
│   │   │   ├── index.ts
│   │   │   ├── jd/
│   │   │   │   ├── jd-platform.ts
│   │   │   │   └── jd.transform.ts
│   │   │   ├── library/
│   │   │   │   ├── library-platform.ts
│   │   │   │   └── library.transform.ts
│   │   │   ├── platform-inject-config.ts
│   │   │   ├── platform.ts
│   │   │   ├── qq/
│   │   │   │   ├── qq-platform.ts
│   │   │   │   └── qq.transform.ts
│   │   │   ├── template/
│   │   │   │   └── app-template.js
│   │   │   ├── template-transform-strategy/
│   │   │   │   ├── transform.base.ts
│   │   │   │   └── wx-like/
│   │   │   │       ├── wx-container.ts
│   │   │   │       └── wx-transform.base.ts
│   │   │   ├── type.ts
│   │   │   ├── util/
│   │   │   │   ├── dataset-bind.ts
│   │   │   │   └── type-predicate.ts
│   │   │   ├── wx/
│   │   │   │   ├── wx-platform.ts
│   │   │   │   └── wx.transform.ts
│   │   │   ├── zfb/
│   │   │   │   ├── zfb-platform.ts
│   │   │   │   └── zfb.transform.ts
│   │   │   └── zjtd/
│   │   │       ├── zj-platform.ts
│   │   │       └── zj.transform.ts
│   │   ├── test/
│   │   │   └── fixture/
│   │   │       └── watch/
│   │   │           └── sub3/
│   │   │               ├── sub3.component.html
│   │   │               ├── sub3.component.ts
│   │   │               ├── sub3.entry.ts
│   │   │               └── sub3.module.ts
│   │   ├── token/
│   │   │   └── component.token.ts
│   │   └── util/
│   │       ├── index.ts
│   │       ├── library-template-scope-name.ts
│   │       ├── literal-resolve.ts
│   │       ├── load_esm.ts
│   │       ├── raw-updater.spec.ts
│   │       ├── raw-updater.ts
│   │       └── run-script.ts
│   └── library/
│       ├── common/
│       │   ├── .gitignore
│       │   └── ng-package.json
│       ├── declaration/
│       │   └── index.d.ts
│       ├── forms/
│       │   ├── .gitignore
│       │   ├── ng-package.json
│       │   ├── readme.md
│       │   └── src/
│       │       ├── directives/
│       │       │   ├── checkbox_value_accessor.ts
│       │       │   ├── default_value_accessor.ts
│       │       │   ├── picker_value_accessor.ts
│       │       │   ├── picker_view_value_accessor.ts
│       │       │   ├── radio_control_value_accessor.ts
│       │       │   ├── slider_value_accessor.ts
│       │       │   └── switch_value_accessor.ts
│       │       ├── directives.ts
│       │       └── forms.ts
│       ├── index.ts
│       ├── ng-package.json
│       ├── package.json
│       └── platform/
│           ├── bd/
│           │   ├── index.ts
│           │   ├── ng-package.json
│           │   └── platform-core.ts
│           ├── dd/
│           │   ├── index.ts
│           │   ├── ng-package.json
│           │   └── platform-core.ts
│           ├── default/
│           │   ├── agent-node.spec.ts
│           │   ├── agent-node.ts
│           │   ├── component-finder.service.ts
│           │   ├── component-template-hook.factory.ts
│           │   ├── diff-node-data.spec.ts
│           │   ├── diff-node-data.ts
│           │   ├── index.ts
│           │   ├── mini-program.renderer.factory.ts
│           │   ├── mini-program.renderer.ts
│           │   ├── ng-package.json
│           │   ├── platform-core.ts
│           │   └── token.ts
│           ├── http/
│           │   ├── README.md
│           │   ├── backend.ts
│           │   ├── index.ts
│           │   ├── module.ts
│           │   ├── provider.ts
│           │   └── response.ts
│           ├── index.ts
│           ├── jd/
│           │   ├── index.ts
│           │   ├── ng-package.json
│           │   └── platform-core.ts
│           ├── mini-program.module.ts
│           ├── ng-package.json
│           ├── page.service.ts
│           ├── platform-miniprogram.ts
│           ├── qq/
│           │   ├── index.ts
│           │   ├── ng-package.json
│           │   └── platform-core.ts
│           ├── token.ts
│           ├── type/
│           │   ├── index.ts
│           │   ├── internal-type.ts
│           │   ├── ng-package.json
│           │   └── type.ts
│           ├── wx/
│           │   ├── index.ts
│           │   └── ng-package.json
│           ├── zfb/
│           │   ├── index.ts
│           │   ├── ng-package.json
│           │   └── platform-core.ts
│           └── zjtd/
│               ├── index.ts
│               ├── ng-package.json
│               └── platform-core.ts
├── test/
│   ├── hello-world-app/
│   │   ├── .browserslistrc
│   │   ├── .gitignore
│   │   ├── angular.json
│   │   ├── karma.conf.js
│   │   ├── projects/
│   │   │   └── test-library/
│   │   │       ├── .browserslistrc
│   │   │       ├── ng-package.json
│   │   │       ├── package.json
│   │   │       ├── src/
│   │   │       │   ├── directive/
│   │   │       │   │   ├── directive.module.ts
│   │   │       │   │   └── input-output.directive.ts
│   │   │       │   ├── global-self-template/
│   │   │       │   │   ├── global-self-template.component.css
│   │   │       │   │   ├── global-self-template.component.html
│   │   │       │   │   ├── global-self-template.component.ts
│   │   │       │   │   └── global-self-template.module.ts
│   │   │       │   ├── lib/
│   │   │       │   │   ├── test-library.component.scss
│   │   │       │   │   ├── test-library.component.spec.ts
│   │   │       │   │   ├── test-library.component.ts
│   │   │       │   │   ├── test-library.directive.ts
│   │   │       │   │   ├── test-library.module.ts
│   │   │       │   │   ├── test-library.service.spec.ts
│   │   │       │   │   └── test-library.service.ts
│   │   │       │   ├── lib-comp1/
│   │   │       │   │   ├── lib-comp1.component.css
│   │   │       │   │   ├── lib-comp1.component.html
│   │   │       │   │   ├── lib-comp1.component.ts
│   │   │       │   │   ├── lib-comp1.module.ts
│   │   │       │   │   └── lib-dir1.directive.ts
│   │   │       │   ├── other/
│   │   │       │   │   ├── other.component.css
│   │   │       │   │   ├── other.component.html
│   │   │       │   │   ├── other.component.ts
│   │   │       │   │   └── other.module.ts
│   │   │       │   ├── outside-template/
│   │   │       │   │   ├── outside-template.component.css
│   │   │       │   │   ├── outside-template.component.html
│   │   │       │   │   ├── outside-template.component.ts
│   │   │       │   │   └── outside-template.module.ts
│   │   │       │   └── public-api.ts
│   │   │       ├── tsconfig.lib.json
│   │   │       ├── tsconfig.lib.prod.json
│   │   │       └── tsconfig.spec.json
│   │   ├── src/
│   │   │   ├── __components/
│   │   │   │   ├── component-need-template/
│   │   │   │   │   ├── component-need-template.component.css
│   │   │   │   │   ├── component-need-template.component.html
│   │   │   │   │   ├── component-need-template.component.ts
│   │   │   │   │   ├── component-need-template.entry.ts
│   │   │   │   │   └── component-need-template.module.ts
│   │   │   │   ├── component1/
│   │   │   │   │   ├── component1.component.css
│   │   │   │   │   ├── component1.component.html
│   │   │   │   │   ├── component1.component.ts
│   │   │   │   │   ├── component1.entry.ts
│   │   │   │   │   └── component1.module.ts
│   │   │   │   ├── component2/
│   │   │   │   │   ├── component2.component.css
│   │   │   │   │   ├── component2.component.html
│   │   │   │   │   ├── component2.component.ts
│   │   │   │   │   ├── component2.entry.ts
│   │   │   │   │   └── component2.module.ts
│   │   │   │   ├── component3/
│   │   │   │   │   ├── component3.component.css
│   │   │   │   │   ├── component3.component.html
│   │   │   │   │   ├── component3.component.ts
│   │   │   │   │   └── component3.entry.ts
│   │   │   │   ├── content/
│   │   │   │   │   ├── content.component.css
│   │   │   │   │   ├── content.component.html
│   │   │   │   │   ├── content.component.ts
│   │   │   │   │   ├── content.entry.ts
│   │   │   │   │   └── content.module.ts
│   │   │   │   ├── content-multi/
│   │   │   │   │   ├── content-multi.component.css
│   │   │   │   │   ├── content-multi.component.html
│   │   │   │   │   ├── content-multi.component.ts
│   │   │   │   │   ├── content-multi.entry.ts
│   │   │   │   │   └── content-multi.module.ts
│   │   │   │   └── life-time/
│   │   │   │       ├── life-time.component.html
│   │   │   │       ├── life-time.component.ts
│   │   │   │       └── life-time.entry.ts
│   │   │   ├── __pages/
│   │   │   │   ├── base-component/
│   │   │   │   │   ├── base-component.component.css
│   │   │   │   │   ├── base-component.component.html
│   │   │   │   │   ├── base-component.component.ts
│   │   │   │   │   ├── base-component.entry.ts
│   │   │   │   │   └── base-component.module.ts
│   │   │   │   ├── base-directive/
│   │   │   │   │   ├── base-directive.component.css
│   │   │   │   │   ├── base-directive.component.html
│   │   │   │   │   ├── base-directive.component.ts
│   │   │   │   │   ├── base-directive.entry.ts
│   │   │   │   │   ├── base-directive.module.ts
│   │   │   │   │   └── directive1.directive.ts
│   │   │   │   ├── base-forms/
│   │   │   │   │   ├── base-forms.component.css
│   │   │   │   │   ├── base-forms.component.html
│   │   │   │   │   ├── base-forms.component.ts
│   │   │   │   │   ├── base-forms.entry.ts
│   │   │   │   │   └── base-forms.module.ts
│   │   │   │   ├── base-http/
│   │   │   │   │   ├── base-http.component.css
│   │   │   │   │   ├── base-http.component.html
│   │   │   │   │   ├── base-http.component.ts
│   │   │   │   │   ├── base-http.entry.ts
│   │   │   │   │   └── base-http.module.ts
│   │   │   │   ├── base-tap/
│   │   │   │   │   ├── base-tap.component.css
│   │   │   │   │   ├── base-tap.component.html
│   │   │   │   │   ├── base-tap.component.ts
│   │   │   │   │   ├── base-tap.entry.ts
│   │   │   │   │   └── base-tap.module.ts
│   │   │   │   ├── complex-property-event/
│   │   │   │   │   ├── app-dir1.directive.ts
│   │   │   │   │   ├── complex-property-event.component.css
│   │   │   │   │   ├── complex-property-event.component.html
│   │   │   │   │   ├── complex-property-event.component.ts
│   │   │   │   │   ├── complex-property-event.entry.ts
│   │   │   │   │   └── complex-property-event.module.ts
│   │   │   │   ├── complex-structure/
│   │   │   │   │   ├── complex-structure.component.css
│   │   │   │   │   ├── complex-structure.component.html
│   │   │   │   │   ├── complex-structure.component.ts
│   │   │   │   │   ├── complex-structure.entry.ts
│   │   │   │   │   └── complex-structure.module.ts
│   │   │   │   ├── component-use-template/
│   │   │   │   │   ├── component-use-template.component.css
│   │   │   │   │   ├── component-use-template.component.html
│   │   │   │   │   ├── component-use-template.component.ts
│   │   │   │   │   ├── component-use-template.entry.ts
│   │   │   │   │   └── component-use-template.module.ts
│   │   │   │   ├── custom-structural-directive/
│   │   │   │   │   ├── custom-structural-directive.component.css
│   │   │   │   │   ├── custom-structural-directive.component.html
│   │   │   │   │   ├── custom-structural-directive.component.ts
│   │   │   │   │   ├── custom-structural-directive.entry.ts
│   │   │   │   │   ├── custom-structural-directive.module.ts
│   │   │   │   │   └── structural1.directive.ts
│   │   │   │   ├── default-structural-directive/
│   │   │   │   │   ├── default-structural-directive.component.css
│   │   │   │   │   ├── default-structural-directive.component.html
│   │   │   │   │   ├── default-structural-directive.component.ts
│   │   │   │   │   ├── default-structural-directive.entry.ts
│   │   │   │   │   └── default-structural-directive.module.ts
│   │   │   │   ├── life-time-page/
│   │   │   │   │   ├── life-time-page.entry.ts
│   │   │   │   │   ├── life-time.component.html
│   │   │   │   │   ├── life-time.component.ts
│   │   │   │   │   └── life-time.module.ts
│   │   │   │   ├── life-time-page-use-component/
│   │   │   │   │   ├── life-time-page-use-component.entry.ts
│   │   │   │   │   ├── life-time.component.html
│   │   │   │   │   ├── life-time.component.ts
│   │   │   │   │   └── life-time.module.ts
│   │   │   │   ├── ng-content/
│   │   │   │   │   ├── ng-content.component.css
│   │   │   │   │   ├── ng-content.component.html
│   │   │   │   │   ├── ng-content.component.ts
│   │   │   │   │   ├── ng-content.entry.ts
│   │   │   │   │   └── ng-content.module.ts
│   │   │   │   ├── root/
│   │   │   │   │   ├── root.component.css
│   │   │   │   │   ├── root.component.html
│   │   │   │   │   ├── root.component.ts
│   │   │   │   │   ├── root.entry.ts
│   │   │   │   │   └── root.module.ts
│   │   │   │   └── self-component/
│   │   │   │       ├── self-component.component.css
│   │   │   │       ├── self-component.component.html
│   │   │   │       ├── self-component.component.ts
│   │   │   │       ├── self-component.entry.ts
│   │   │   │       └── self-component.module.ts
│   │   │   ├── app.json
│   │   │   ├── assets/
│   │   │   │   └── .gitkeep
│   │   │   ├── environments/
│   │   │   │   ├── environment.prod.ts
│   │   │   │   └── environment.ts
│   │   │   ├── main-test.module.ts
│   │   │   ├── main.module.ts
│   │   │   ├── main.ts
│   │   │   ├── project.config.json
│   │   │   ├── spec/
│   │   │   │   ├── empty/
│   │   │   │   │   ├── empty.component.ts
│   │   │   │   │   ├── empty.entry.ts
│   │   │   │   │   └── empty.module.ts
│   │   │   │   ├── http-spec/
│   │   │   │   │   ├── http-spec.entry.ts
│   │   │   │   │   ├── http.component.ts
│   │   │   │   │   ├── http.module.ts
│   │   │   │   │   └── http.spec.ts
│   │   │   │   ├── life-time-spec/
│   │   │   │   │   ├── life-time-spec.entry.ts
│   │   │   │   │   ├── life-time.component.ts
│   │   │   │   │   ├── life-time.module.ts
│   │   │   │   │   └── life-time.spec.ts
│   │   │   │   ├── ng-content-spec/
│   │   │   │   │   ├── ng-content-spec.entry.ts
│   │   │   │   │   ├── ng-content.component.ts
│   │   │   │   │   ├── ng-content.module.ts
│   │   │   │   │   └── ng-content.spec.ts
│   │   │   │   ├── ng-for-spec/
│   │   │   │   │   ├── ng-for-spec.entry.ts
│   │   │   │   │   ├── ng-for.component.ts
│   │   │   │   │   ├── ng-for.module.ts
│   │   │   │   │   └── ng-for.spec.ts
│   │   │   │   ├── ng-if-spec/
│   │   │   │   │   ├── ng-if-spec.entry.ts
│   │   │   │   │   ├── ng-if.component.ts
│   │   │   │   │   ├── ng-if.module.ts
│   │   │   │   │   └── ng-if.spec.ts
│   │   │   │   ├── ng-library-import-spec/
│   │   │   │   │   ├── ng-library-import-spec.entry.ts
│   │   │   │   │   ├── ng-library-import.component.ts
│   │   │   │   │   ├── ng-library-import.module.ts
│   │   │   │   │   └── ng-library-import.spec.ts
│   │   │   │   ├── ng-switch-spec/
│   │   │   │   │   ├── ng-switch-spec.entry.ts
│   │   │   │   │   ├── ng-switch.component.ts
│   │   │   │   │   ├── ng-switch.module.ts
│   │   │   │   │   └── ng-switch.spec.ts
│   │   │   │   ├── ng-template-outlet-spec/
│   │   │   │   │   ├── ng-template-outlet-spec.entry.ts
│   │   │   │   │   ├── ng-template-outlet.component.ts
│   │   │   │   │   ├── ng-template-outlet.module.ts
│   │   │   │   │   └── ng-template-outlet.spec.ts
│   │   │   │   ├── self-template-spec/
│   │   │   │   │   ├── self-template-spec.entry.ts
│   │   │   │   │   ├── self-template.component.ts
│   │   │   │   │   ├── self-template.module.ts
│   │   │   │   │   └── self-template.spec.ts
│   │   │   │   ├── style-class-spec/
│   │   │   │   │   ├── style-class-spec.component.ts
│   │   │   │   │   ├── style-class-spec.entry.ts
│   │   │   │   │   ├── style-class-spec.module.ts
│   │   │   │   │   └── style-class-spec.spec.ts
│   │   │   │   ├── tag-view-convert-spec/
│   │   │   │   │   ├── tag-view-convert-spec.entry.ts
│   │   │   │   │   ├── tag-view-convert.component.ts
│   │   │   │   │   ├── tag-view-convert.module.ts
│   │   │   │   │   └── tag-view-convert.spec.ts
│   │   │   │   └── util/
│   │   │   │       ├── index.ts
│   │   │   │       ├── node-query.ts
│   │   │   │       ├── open-component.ts
│   │   │   │       └── page-info.ts
│   │   │   ├── spec-component/
│   │   │   │   ├── life-time/
│   │   │   │   │   ├── life-time.component.ts
│   │   │   │   │   ├── life-time.entry.ts
│   │   │   │   │   └── life-time.module.ts
│   │   │   │   ├── ng-content/
│   │   │   │   │   ├── ng-content.component.html
│   │   │   │   │   ├── ng-content.component.ts
│   │   │   │   │   ├── ng-content.entry.ts
│   │   │   │   │   └── ng-content.module.ts
│   │   │   │   ├── ng-for/
│   │   │   │   │   ├── ng-for.component.html
│   │   │   │   │   ├── ng-for.component.ts
│   │   │   │   │   ├── ng-for.entry.ts
│   │   │   │   │   └── ng-for.module.ts
│   │   │   │   ├── ng-if/
│   │   │   │   │   ├── ng-if.component.html
│   │   │   │   │   ├── ng-if.component.ts
│   │   │   │   │   ├── ng-if.entry.ts
│   │   │   │   │   └── ng-if.module.ts
│   │   │   │   ├── ng-library-import/
│   │   │   │   │   ├── ng-library-import.component.html
│   │   │   │   │   ├── ng-library-import.component.ts
│   │   │   │   │   ├── ng-library-import.entry.ts
│   │   │   │   │   └── ng-library-import.module.ts
│   │   │   │   ├── ng-switch/
│   │   │   │   │   ├── ng-switch.component.html
│   │   │   │   │   ├── ng-switch.component.ts
│   │   │   │   │   ├── ng-switch.entry.ts
│   │   │   │   │   └── ng-switch.module.ts
│   │   │   │   ├── ng-template-outlet/
│   │   │   │   │   ├── ng-template-outlet.component.html
│   │   │   │   │   ├── ng-template-outlet.component.ts
│   │   │   │   │   ├── ng-template-outlet.entry.ts
│   │   │   │   │   └── ng-template-outlet.module.ts
│   │   │   │   ├── self-template/
│   │   │   │   │   ├── self-template.component.html
│   │   │   │   │   ├── self-template.component.ts
│   │   │   │   │   ├── self-template.entry.ts
│   │   │   │   │   └── self-template.module.ts
│   │   │   │   ├── style-class/
│   │   │   │   │   ├── style-class.component.html
│   │   │   │   │   ├── style-class.component.ts
│   │   │   │   │   ├── style-class.entry.ts
│   │   │   │   │   └── style-class.module.ts
│   │   │   │   └── tag-view-convert/
│   │   │   │       ├── tag-view-convert.component.html
│   │   │   │       ├── tag-view-convert.component.ts
│   │   │   │       ├── tag-view-convert.entry.ts
│   │   │   │       └── tag-view-convert.module.ts
│   │   │   ├── styles.css
│   │   │   ├── test.ts
│   │   │   ├── tsconfig.app.json
│   │   │   ├── tsconfig.dev.json
│   │   │   ├── tsconfig.spec.json
│   │   │   └── typings.d.ts
│   │   ├── tsconfig.base.json
│   │   └── tsconfig.json
│   ├── plugin-describe-builder/
│   │   └── index.ts
│   ├── test-builder/
│   │   ├── index.ts
│   │   ├── schema.json
│   │   ├── schema.karma.json
│   │   └── schema.library.json
│   └── util/
│       └── file.ts
├── tsconfig.base.json
├── tsconfig.builder.json
├── tsconfig.doc.json
├── tsconfig.internal-schematics.json
├── tsconfig.json
├── tsconfig.library.json
├── tsconfig.spec.json
└── typedoc.json
Download .txt
SYMBOL INDEX (859 symbols across 233 files)

FILE: script/build-ng-package.ts
  function main (line 3) | async function main() {

FILE: script/build.ts
  function main (line 5) | function main() {

FILE: script/coverage-badge.ts
  type Status (line 3) | enum Status {
  function main (line 7) | function main() {
  function svgGenerate (line 35) | function svgGenerate(percent: any) {
  function svgFailedGenerate (line 73) | function svgFailedGenerate() {

FILE: script/package-sync.ts
  function getTemplateNameExpressionStr (line 11) | function getTemplateNameExpressionStr(templateRefName: string) {

FILE: script/schema-merge.ts
  function merge (line 3) | function merge(origin: string, additional: string, output: string) {
  function main (line 22) | function main() {

FILE: src/builder/angular-internal/ast.type.ts
  type Element (line 17) | type Element = TmplAstElement;
  type Template (line 18) | type Template = TmplAstTemplate;
  type Content (line 20) | type Content = TmplAstContent;
  type Variable (line 21) | type Variable = TmplAstVariable;
  type Reference (line 22) | type Reference = TmplAstReference;
  type TextAttribute (line 23) | type TextAttribute = TmplAstTextAttribute;
  type BoundAttribute (line 24) | type BoundAttribute = Parameters<
  type BoundEvent (line 27) | type BoundEvent = TmplAstBoundEvent;
  type Text (line 28) | type Text = TmplAstText;
  type BoundText (line 29) | type BoundText = TmplAstBoundText;
  type Icu (line 30) | type Icu = TmplAstIcu;
  type Node (line 31) | type Node = TmplAstNode;

FILE: src/builder/angular-internal/selector.ts
  type SelectorRegexp (line 29) | const enum SelectorRegexp {
  class CssSelector (line 45) | class CssSelector {
    method parse (line 62) | static parse(selector: string): CssSelector[] {
    method unescapeAttribute (line 138) | unescapeAttribute(attr: string): string {
    method escapeAttribute (line 169) | escapeAttribute(attr: string): string {
    method hasElementSelector (line 173) | hasElementSelector(): boolean {
    method setElement (line 177) | setElement(element: string | null = null) {
    method addAttribute (line 181) | addAttribute(name: string, value: string = '') {
    method addClassName (line 185) | addClassName(name: string) {
    method toString (line 189) | toString(): string {
  class SelectorMatcher (line 210) | class SelectorMatcher<T = any> {
    method createNotMatcher (line 211) | static createNotMatcher(notSelectors: CssSelector[]): SelectorMatcher<...
    method addSelectables (line 228) | addSelectables(cssSelectors: CssSelector[], callbackCtxt?: T) {
    method _addSelectable (line 244) | private _addSelectable(
    method _addTerminal (line 306) | private _addTerminal(
    method _addPartial (line 319) | private _addPartial(
    method match (line 338) | match(
    method _matchTerminal (line 432) | _matchTerminal(
    method _matchPartial (line 460) | _matchPartial(
  class SelectorListContext (line 481) | class SelectorListContext {
    method constructor (line 484) | constructor(public selectors: CssSelector[]) {}
  class SelectorContext (line 488) | class SelectorContext<T = any> {
    method constructor (line 491) | constructor(
    method finalize (line 499) | finalize(

FILE: src/builder/angular-internal/tags.ts
  type TagContentType (line 9) | enum TagContentType {
  type TagDefinition (line 15) | interface TagDefinition {
  function splitNsName (line 27) | function splitNsName(elementName: string): [string | null, string] {
  function isNgContainer (line 44) | function isNgContainer(tagName: string): boolean {
  function isNgContent (line 49) | function isNgContent(tagName: string): boolean {
  function isNgTemplate (line 54) | function isNgTemplate(tagName: string): boolean {
  function getNsPrefix (line 60) | function getNsPrefix(fullName: string | null): string | null {
  function mergeNsAndName (line 64) | function mergeNsAndName(prefix: string, localName: string): string {

FILE: src/builder/angular-internal/template.ts
  function createCssSelector (line 16) | function createCssSelector(

FILE: src/builder/angular-internal/util.ts
  function getAttrsForDirectiveMatching (line 20) | function getAttrsForDirectiveMatching(elOrTpl: t.Element): {
  constant I18N_ATTR (line 42) | const I18N_ATTR = 'i18n';
  constant I18N_ATTR_PREFIX (line 43) | const I18N_ATTR_PREFIX = 'i18n-';
  function isI18nAttribute (line 45) | function isI18nAttribute(name: string): boolean {

FILE: src/builder/application/index.ts
  function runBuilder (line 27) | function runBuilder(

FILE: src/builder/application/library-template-scope.service.ts
  type TemplateScopeOutside (line 6) | type TemplateScopeOutside = Omit<
  type ExtraTemplateData (line 13) | interface ExtraTemplateData {
  class LibraryTemplateScopeService (line 21) | class LibraryTemplateScopeService {
    method constructor (line 25) | constructor() {}
    method register (line 26) | register(compilation: webpack.Compilation) {
    method exportLibraryComponentConfig (line 33) | exportLibraryComponentConfig() {
    method exportLibraryTemplate (line 59) | exportLibraryTemplate() {

FILE: src/builder/application/loader/type.ts
  type ComponentTemplateLoaderContext (line 4) | interface ComponentTemplateLoaderContext {

FILE: src/builder/application/mini-program-application-analysis.service.ts
  class MiniProgramApplicationAnalysisService (line 27) | class MiniProgramApplicationAnalysisService {
    method constructor (line 35) | constructor(
    method exportComponentBuildMetaMap (line 47) | async exportComponentBuildMetaMap() {
    method initHost (line 171) | private initHost(config: ParsedConfiguration) {
    method initTscProgram (line 177) | private async initTscProgram() {
    method getComponentPagePattern (line 202) | private getComponentPagePattern(fileName: string) {
    method addCleanDependency (line 257) | private addCleanDependency(host: ts.CompilerHost) {
    method saveModuleDependency (line 267) | private saveModuleDependency(
    method augmentResolveModuleNames (line 284) | private augmentResolveModuleNames(
    method analyzeAsync (line 335) | async analyzeAsync() {
    method getBuilder (line 339) | getBuilder() {
    method cleanDependencyFileCache (line 342) | cleanDependencyFileCache() {
    method augmentProgramWithVersioning (line 349) | private augmentProgramWithVersioning(program: ts.Program): void {

FILE: src/builder/application/plugin/dynamic-library-entry.plugin.ts
  constant CUSTOM_URI (line 12) | const CUSTOM_URI = 'dynamic';
  constant CUSTOM_URI_REG (line 13) | const CUSTOM_URI_REG = /^dynamic:\/\/__license(?:\/|\\)(.*)\.ts$/;
  class DynamicLibraryComponentEntryPlugin (line 15) | class DynamicLibraryComponentEntryPlugin {
    method constructor (line 17) | constructor(private buildPlatform: BuildPlatform) {}
    method apply (line 18) | apply(compiler: webpack.Compiler) {

FILE: src/builder/application/plugin/dynamic-watch-entry.plugin.ts
  function globAsync (line 14) | function globAsync(pattern: string, options: glob.IOptions) {
  class DynamicWatchEntryPlugin (line 20) | class DynamicWatchEntryPlugin {
    method constructor (line 33) | constructor(
    method init (line 43) | async init() {
    method apply (line 71) | apply(compiler: webpack.Compiler) {
    method generateModuleInfo (line 151) | private async generateModuleInfo(

FILE: src/builder/application/plugin/export-mini-program-assets.plugin.ts
  class ExportMiniProgramAssetsPlugin (line 32) | class ExportMiniProgramAssetsPlugin {
    method constructor (line 36) | constructor(
    method apply (line 42) | apply(compiler: webpack.Compiler) {
    method setEntry (line 248) | public setEntry(pageList: PagePattern[], componentList: PagePattern[]) {
    method buildTemplate (line 252) | async buildTemplate(service: MiniProgramApplicationAnalysisService) {

FILE: src/builder/application/token.ts
  constant TS_CONFIG_TOKEN (line 3) | const TS_CONFIG_TOKEN = new InjectionToken('TS_CONFIG_TOKEN');
  constant PAGE_PATTERN_TOKEN (line 4) | const PAGE_PATTERN_TOKEN = new InjectionToken('PAGE_PATTERN_TOKEN');
  constant OLD_BUILDER (line 5) | const OLD_BUILDER = new InjectionToken('OLD_BUILDER');
  constant TS_SYSTEM (line 6) | const TS_SYSTEM = new InjectionToken('TS_SYSTEM');
  constant WEBPACK_COMPILATION (line 7) | const WEBPACK_COMPILATION = new InjectionToken('WEBPACK_COMPILATION');
  constant WEBPACK_COMPILER (line 8) | const WEBPACK_COMPILER = new InjectionToken('WEBPACK_COMPILER');

FILE: src/builder/application/type.ts
  type LibraryTemplateLiteralConvertOptions (line 5) | interface LibraryTemplateLiteralConvertOptions {
  type PagePattern (line 12) | interface PagePattern extends Exclude<AssetPattern, string> {
  type LibraryLoaderContext (line 34) | interface LibraryLoaderContext {

FILE: src/builder/application/util/set-compilation-asset.ts
  function setCompilationAsset (line 3) | function setCompilationAsset(

FILE: src/builder/application/webpack-configuration-change.service.ts
  type OptimizationOptions (line 24) | type OptimizationOptions = NonNullable<webpack.Configuration['optimizati...
  type OptimizationSplitChunksOptions (line 25) | type OptimizationSplitChunksOptions = Exclude<
  type OptimizationSplitChunksCacheGroup (line 29) | type OptimizationSplitChunksCacheGroup = Exclude<
  class WebpackConfigurationChangeService (line 34) | class WebpackConfigurationChangeService {
    method constructor (line 38) | constructor(
    method init (line 48) | init() {
    method change (line 85) | async change() {
    method buildPlatformCompatible (line 102) | private buildPlatformCompatible() {
    method pageHandle (line 108) | private async pageHandle() {
    method exportAssets (line 191) | private exportAssets() {
    method addLoader (line 198) | private addLoader() {
    method globalVariableChange (line 216) | private globalVariableChange() {
    method changeStylesExportSuffix (line 243) | private changeStylesExportSuffix() {

FILE: src/builder/builder.watch.spec.ts
  function readFixture (line 136) | function readFixture(dir: string, to: string) {

FILE: src/builder/component-template-inject/change-component.ts
  function changeComponent (line 10) | function changeComponent(data: string) {

FILE: src/builder/karma/client/adapter.ts
  function isExternalStackEntry (line 12) | function isExternalStackEntry(entry: string) {
  function getRelevantStackFrom (line 27) | function getRelevantStackFrom(stack: string[]): string[] {
  function formatFailedStep (line 64) | function formatFailedStep(step: Record<string, any>): string {
  class SuiteNode (line 104) | class SuiteNode {
    method constructor (line 105) | constructor(public name?: string, public parent?: SuiteNode) {}
    method addChild (line 109) | addChild(name: string) {
  function processSuite (line 116) | function processSuite(suite: SuiteNode, pointer: Record<string, any>) {
  function getAllSpecNames (line 135) | function getAllSpecNames(topSuite: SuiteNode) {
  class KarmaReporter (line 146) | class KarmaReporter implements jasmine.CustomReporter {
    method constructor (line 151) | constructor(private tc: KarmaClient, private jasmineEnv: jasmine.Env) {}
    method handleGlobalErrors (line 152) | handleGlobalErrors(result: Record<string, any>) {
    method jasmineStarted (line 175) | jasmineStarted(data: Record<string, any>) {
    method jasmineDone (line 184) | jasmineDone(result: Record<string, any>) {
    method suiteStarted (line 210) | suiteStarted(result: Record<string, any>) {
    method suiteDone (line 218) | suiteDone(result: Record<string, any>) {
    method specStarted (line 237) | specStarted() {
    method specDone (line 241) | specDone(specResult: Record<string, any>) {
  function getGrepSpecsToRun (line 347) | function getGrepSpecsToRun(clientConfig: Record<string, any>, specs: any...
  function parseQueryParams (line 357) | function parseQueryParams(location: Record<string, any>) {
  function getId (line 369) | function getId(s: { id: any }) {
  function getSpecsByName (line 373) | function getSpecsByName(specs: any[], name: string) {
  function getDebugSpecToRun (line 383) | function getDebugSpecToRun(location: Record<string, any>, specs: any[]) {
  function getSpecsToRunForCurrentShard (line 392) | function getSpecsToRunForCurrentShard(
  function getShardedSpecsToRun (line 410) | function getShardedSpecsToRun(specs: any[], clientConfig: Record<string,...
  class KarmaSpecFilter (line 429) | class KarmaSpecFilter {
    method constructor (line 431) | constructor(
    method getAllSpecs (line 446) | getAllSpecs(jasmineEnv: jasmine.Env) {
    method getSpecsToRun (line 470) | getSpecsToRun(
    method matches (line 492) | matches(spec: jasmine.Suite) {
  function createStartFn (line 529) | function createStartFn(karma: KarmaClient, jasmineEnv: jasmine.Env) {
  function indexOf (line 560) | function indexOf(collection: any[], find: any, i?: number /* opt */) {
  function filter (line 582) | function filter(collection: any[], filter: any, that?: any /* opt */) {
  function map (line 600) | function map(

FILE: src/builder/karma/client/karma.ts
  class KarmaClient (line 4) | class KarmaClient {
    method constructor (line 15) | constructor(private updater: StatusUpdater, private socket: IO) {
    method navigateContextTo (line 36) | private navigateContextTo(url: string) {}
    method log (line 37) | log(type: string, args: any[]) {
    method getLocation (line 47) | private getLocation(url?: string, lineno?: string, colno?: string) {
    method error (line 65) | error(
    method result (line 94) | result(originalResult: Record<string, any>) {
    method complete (line 133) | complete(result?: Record<string, any>) {
    method info (line 167) | info(info: any) {

FILE: src/builder/karma/client/main.ts
  function startupTest (line 7) | function startupTest() {

FILE: src/builder/karma/client/platform/wx/index.ts
  class IO (line 8) | class IO {
    method constructor (line 10) | constructor() {
    method on (line 13) | on(data: string, callback: (...args: any[]) => void) {
    method emit (line 18) | emit(type: string, data: any) {

FILE: src/builder/karma/client/updater.ts
  class StatusUpdater (line 3) | class StatusUpdater {
    method constructor (line 7) | constructor(private socket: IO) {
    method updateBrowsersInfo (line 36) | private updateBrowsersInfo(browsers: any[]) {}
    method updateBanner (line 37) | private updateBanner() {}
    method updateConnectionStatus (line 39) | private updateConnectionStatus(connectionStatus: string) {
    method updateTestStatus (line 43) | updateTestStatus(testStatus: string) {
    method updatePingStatus (line 47) | private updatePingStatus(pingStatus: string) {

FILE: src/builder/karma/index.origin.ts
  type KarmaConfigOptions (line 39) | type KarmaConfigOptions = ConfigOptions & {
  function initialize (line 44) | async function initialize(
  function execute (line 94) | function execute(

FILE: src/builder/karma/index.spec.ts
  function writeFile (line 124) | function writeFile() {

FILE: src/builder/karma/index.ts
  function runBuilder (line 29) | function runBuilder(

FILE: src/builder/karma/plugin/karma.ts
  function init (line 15) | function init(
  function requestBlocker (line 152) | function requestBlocker() {
  function muteDuplicateReporterLogging (line 169) | function muteDuplicateReporterLogging(context: any, config: any) {

FILE: src/builder/library/add-declaration-metadata.service.ts
  class AddDeclarationMetaDataService (line 18) | class AddDeclarationMetaDataService {
    method constructor (line 23) | constructor(
    method run (line 30) | run(dTsFileName: string, data: string): string {
    method addComponentMetaDataDeclaration (line 40) | private addComponentMetaDataDeclaration(list: ts.ClassDeclaration[]) {
    method addDirectiveMetaDataDeclaration (line 67) | private addDirectiveMetaDataDeclaration(list: ts.ClassDeclaration[]) {
    method getPropertyAndListener (line 86) | private getPropertyAndListener(

FILE: src/builder/library/builder.ts
  function execute (line 24) | function execute(

FILE: src/builder/library/compile-source-files.ts
  function compileSourceFiles (line 37) | async function compileSourceFiles(

FILE: src/builder/library/const.ts
  constant LIBRARY_OUTPUT_ROOTDIR (line 1) | const LIBRARY_OUTPUT_ROOTDIR = 'library';
  constant LIBRARY_DIRECTIVE_LISTENERS_SUFFIX (line 2) | const LIBRARY_DIRECTIVE_LISTENERS_SUFFIX = 'Listeners';
  constant LIBRARY_DIRECTIVE_PROPERTIES_SUFFIX (line 3) | const LIBRARY_DIRECTIVE_PROPERTIES_SUFFIX = 'Properties';
  constant LIBRARY_COMPONENT_OUTPUT_PATH_SUFFIX (line 4) | const LIBRARY_COMPONENT_OUTPUT_PATH_SUFFIX = 'OutputPath';
  constant LIBRARY_COMPONENT_METADATA_SUFFIX (line 5) | const LIBRARY_COMPONENT_METADATA_SUFFIX = 'ExtraData';
  constant GLOBAL_TEMPLATE_SUFFIX (line 6) | const GLOBAL_TEMPLATE_SUFFIX = 'Global_Template';

FILE: src/builder/library/get-library-path.ts
  function getComponentOutputPath (line 4) | function getComponentOutputPath(entry: string, className: string) {

FILE: src/builder/library/merge-using-component-path.ts
  function getUseComponents (line 6) | function getUseComponents(

FILE: src/builder/library/ng-packagr-factory.ts
  function ngPackagrFactory (line 7) | async function ngPackagrFactory(

FILE: src/builder/library/output-template-metadata.service.ts
  class OutputTemplateMetadataService (line 15) | class OutputTemplateMetadataService {
    method constructor (line 18) | constructor(
    method run (line 25) | run(fileName: string, data: string, sourceFile: ts.SourceFile) {
    method getSelfTemplate (line 34) | private getSelfTemplate() {
    method getLibraryTemplate (line 58) | private getLibraryTemplate() {
    method getSelfUseComponents (line 90) | getSelfUseComponents() {

FILE: src/builder/library/remove-publish-only.ts
  function hookWritePackage (line 13) | function hookWritePackage() {
  function myWritePackage (line 17) | function myWritePackage(options: NgPackagrOptions) {

FILE: src/builder/library/setup-component-data.service.ts
  class SetupComponentDataService (line 18) | class SetupComponentDataService {
    method constructor (line 19) | constructor(
    method run (line 26) | run(

FILE: src/builder/library/stylesheet-processor.ts
  class CustomStyleSheetProcessor (line 3) | class CustomStyleSheetProcessor extends StylesheetProcessor {
    method process (line 5) | async process({

FILE: src/builder/library/token.ts
  constant RESOLVED_DATA_GROUP_TOKEN (line 3) | const RESOLVED_DATA_GROUP_TOKEN = new InjectionToken(
  constant ENTRY_POINT_TOKEN (line 6) | const ENTRY_POINT_TOKEN = new InjectionToken<string>(
  constant ENTRY_FILE_TOKEN (line 10) | const ENTRY_FILE_TOKEN = new InjectionToken<string>('ENTRY_FILE_TOKEN');

FILE: src/builder/library/type.ts
  type ExtraTemplateData (line 1) | interface ExtraTemplateData {
  type ExportLibraryComponentMeta (line 8) | interface ExportLibraryComponentMeta {
  type LibraryComponentEntryMeta (line 18) | interface LibraryComponentEntryMeta extends ExportLibraryComponentMeta {

FILE: src/builder/mini-program-compiler/component-compiler.service.ts
  class ComponentCompilerService (line 8) | class ComponentCompilerService {
    method constructor (line 9) | constructor(
    method collectionNode (line 16) | private collectionNode() {
    method compile (line 26) | compile() {

FILE: src/builder/mini-program-compiler/meta-collection.ts
  class MetaCollection (line 3) | class MetaCollection {
    method merge (line 7) | merge(other: MetaCollection) {

FILE: src/builder/mini-program-compiler/mini-program-compiler.service.ts
  class MiniProgramCompilerService (line 36) | class MiniProgramCompilerService {
    method constructor (line 53) | constructor(
    method init (line 58) | init() {
    method exportComponentBuildMetaMap (line 112) | async exportComponentBuildMetaMap() {
    method buildComponentMeta (line 193) | private buildComponentMeta(
    method resolveStyleUrl (line 214) | private resolveStyleUrl(componentPath: string, styleUrl: string) {
    method getDirectiveMap (line 217) | getDirectiveMap() {
    method getComponentMap (line 220) | getComponentMap() {
    method getLibraryDirectiveMeta (line 223) | private getLibraryDirectiveMeta(
    method getLibraryComponentMeta (line 248) | private getLibraryComponentMeta(

FILE: src/builder/mini-program-compiler/parse-node/bound-text.ts
  class ParsedNgBoundText (line 9) | class ParsedNgBoundText implements ParsedNode<NgBoundTextMeta> {
    method constructor (line 12) | constructor(
    method getNodeMeta (line 17) | getNodeMeta(): NgBoundTextMeta {

FILE: src/builder/mini-program-compiler/parse-node/component-context.ts
  class ComponentContext (line 22) | class ComponentContext {
    method constructor (line 23) | constructor(private directiveMatcher: SelectorMatcher | undefined) {}
    method matchDirective (line 24) | matchDirective(node: t.Element): MatchedMeta[] {

FILE: src/builder/mini-program-compiler/parse-node/content.ts
  constant SELECT_NAME_VALUE_REGEXP (line 4) | const SELECT_NAME_VALUE_REGEXP = /^\[slot=["']?([^"']*)["']?\]$/;
  class ParsedNgContent (line 5) | class ParsedNgContent implements ParsedNode<NgContentMeta> {
    method constructor (line 8) | constructor(
    method getNodeMeta (line 13) | getNodeMeta(): NgContentMeta {

FILE: src/builder/mini-program-compiler/parse-node/element.ts
  class ParsedNgElement (line 6) | class ParsedNgElement implements ParsedNode<NgElementMeta> {
    method constructor (line 14) | constructor(
    method analysis (line 21) | private analysis() {
    method getTagName (line 46) | private getTagName() {
    method appendNgNodeChild (line 56) | appendNgNodeChild(child: ParsedNode<NgNodeMeta>) {
    method getNodeMeta (line 59) | getNodeMeta(): NgElementMeta {

FILE: src/builder/mini-program-compiler/parse-node/interface.ts
  type ParsedNode (line 3) | interface ParsedNode<T> {
  type NgNodeKind (line 10) | enum NgNodeKind {
  type NgNodeMeta (line 17) | interface NgNodeMeta {
  type NgElementMeta (line 21) | interface NgElementMeta extends NgNodeMeta {
  type NgBoundTextMeta (line 32) | interface NgBoundTextMeta extends NgNodeMeta {
  type NgTextMeta (line 35) | interface NgTextMeta extends NgNodeMeta {
  type NgTemplateMeta (line 40) | interface NgTemplateMeta extends NgNodeMeta {
  type NgContentMeta (line 45) | interface NgContentMeta extends NgNodeMeta {

FILE: src/builder/mini-program-compiler/parse-node/template-definition.ts
  class TemplateDefinition (line 51) | class TemplateDefinition implements TmplAstRecursiveVisitor {
    method constructor (line 60) | constructor(
    method init (line 64) | init() {}
    method visit (line 65) | visit?(node: t.Node) {}
    method visitElement (line 66) | visitElement(element: t.Element) {
    method visitTemplate (line 111) | visitTemplate(template: t.Template) {
    method visitContent (line 142) | visitContent(content: t.Content) {
    method visitVariable (line 151) | visitVariable(variable: t.Variable) {}
    method visitReference (line 152) | visitReference(reference: t.Reference) {}
    method visitTextAttribute (line 153) | visitTextAttribute(attribute: t.TextAttribute) {}
    method visitBoundAttribute (line 154) | visitBoundAttribute(attribute: t.BoundAttribute) {}
    method visitBoundEvent (line 155) | visitBoundEvent(attribute: t.BoundEvent) {}
    method visitText (line 156) | visitText(text: t.Text) {
    method visitBoundText (line 165) | visitBoundText(text: t.BoundText) {
    method visitIcu (line 175) | visitIcu(icu: t.Icu) {}
    method run (line 176) | run() {
    method prepareRefsArray (line 180) | prepareRefsArray(refs: t.Reference[]) {
    method visitDeferredBlock (line 189) | visitDeferredBlock(deferred: TmplAstDeferredBlock): void {}
    method visitDeferredBlockError (line 190) | visitDeferredBlockError(block: TmplAstDeferredBlockError): void {}
    method visitDeferredBlockLoading (line 191) | visitDeferredBlockLoading(block: TmplAstDeferredBlockLoading): void {}
    method visitDeferredBlockPlaceholder (line 192) | visitDeferredBlockPlaceholder(block: TmplAstDeferredBlockPlaceholder):...
    method visitDeferredTrigger (line 193) | visitDeferredTrigger(trigger: TmplAstDeferredTrigger): void {}
    method visitForLoopBlock (line 194) | visitForLoopBlock(block: TmplAstForLoopBlock): void {}
    method visitForLoopBlockEmpty (line 195) | visitForLoopBlockEmpty(block: TmplAstForLoopBlockEmpty): void {}
    method visitIfBlock (line 196) | visitIfBlock(block: TmplAstIfBlock): void {}
    method visitIfBlockBranch (line 197) | visitIfBlockBranch(block: TmplAstIfBlockBranch): void {}
    method visitSwitchBlock (line 198) | visitSwitchBlock(block: TmplAstSwitchBlock): void {}
    method visitSwitchBlockCase (line 199) | visitSwitchBlockCase(block: TmplAstSwitchBlockCase): void {}
    method visitUnknownBlock (line 200) | visitUnknownBlock(block: TmplAstUnknownBlock): void {}
  function visitAll (line 202) | function visitAll(visitor: TemplateDefinition, nodes: TmplAstNode[]) {
  class CustomAstVisitor (line 207) | class CustomAstVisitor implements AstVisitor {
    method constructor (line 208) | constructor(private pipeCallback: () => void) {}
    method visitCall (line 209) | visitCall(ast: Call) {
    method visitSafeCall (line 213) | visitSafeCall(ast: SafeCall) {
    method visitSafeKeyedRead (line 217) | visitSafeKeyedRead(ast: SafeKeyedRead) {
    method visitImplicitReceiver (line 221) | visitImplicitReceiver(ast: ImplicitReceiver) {}
    method visitInterpolation (line 222) | visitInterpolation(ast: Interpolation) {
    method visitKeyedRead (line 225) | visitKeyedRead(ast: KeyedRead) {
    method visitKeyedWrite (line 229) | visitKeyedWrite(ast: KeyedWrite) {
    method visitLiteralArray (line 234) | visitLiteralArray(ast: LiteralArray) {
    method visitLiteralMap (line 237) | visitLiteralMap(ast: LiteralMap) {
    method visitLiteralPrimitive (line 240) | visitLiteralPrimitive(ast: LiteralPrimitive) {}
    method visitPipe (line 241) | visitPipe(ast: BindingPipe) {
    method visitPrefixNot (line 244) | visitPrefixNot(ast: PrefixNot) {
    method visitNonNullAssert (line 247) | visitNonNullAssert(ast: NonNullAssert) {
    method visitPropertyRead (line 250) | visitPropertyRead(ast: PropertyRead) {
    method visitPropertyWrite (line 253) | visitPropertyWrite(ast: PropertyWrite) {}
    method visitSafePropertyRead (line 255) | visitSafePropertyRead(ast: SafePropertyRead) {}
    method visitBinary (line 256) | visitBinary(ast: Binary) {
    method visitChain (line 260) | visitChain(ast: Chain) {
    method visitConditional (line 263) | visitConditional(ast: Conditional) {
    method visit (line 268) | visit(ast: AST) {}
    method visitAll (line 269) | visitAll(asts: AST[]) {

FILE: src/builder/mini-program-compiler/parse-node/template.ts
  class ParsedNgTemplate (line 9) | class ParsedNgTemplate implements ParsedNode<NgTemplateMeta> {
    method constructor (line 13) | constructor(
    method appendNgNodeChild (line 19) | appendNgNodeChild(child: ParsedNode<NgNodeMeta>) {
    method getTemplateName (line 22) | private getTemplateName(): string {
    method getNodeMeta (line 30) | getNodeMeta(): NgTemplateMeta {

FILE: src/builder/mini-program-compiler/parse-node/text.ts
  class ParsedNgText (line 4) | class ParsedNgText implements ParsedNode<NgTextMeta> {
    method constructor (line 7) | constructor(
    method getNodeMeta (line 13) | getNodeMeta(): NgTextMeta {

FILE: src/builder/mini-program-compiler/parse-node/type.ts
  type MatchedMeta (line 1) | type MatchedMeta = MatchedComponent | MatchedDirective;
  type MatchedComponent (line 2) | interface MatchedComponent {
  type MatchedDirective (line 13) | interface MatchedDirective {

FILE: src/builder/mini-program-compiler/type.ts
  type ComponentMetaFromLibrary (line 3) | interface ComponentMetaFromLibrary {
  type DirectiveMetaFromLibrary (line 9) | interface DirectiveMetaFromLibrary {
  type MetaFromLibrary (line 14) | type MetaFromLibrary =
  type UseComponent (line 18) | interface UseComponent {
  type ResolvedDataGroup (line 23) | interface ResolvedDataGroup {

FILE: src/builder/platform/bd/bdzn-platform.ts
  class BdZnBuildPlatform (line 8) | class BdZnBuildPlatform extends BuildPlatform {
    method constructor (line 22) | constructor(public templateTransform: BdZnTransform) {

FILE: src/builder/platform/bd/bdzn.transform.ts
  class BdZnTransform (line 5) | class BdZnTransform extends WxTransformLike {

FILE: src/builder/platform/dd/dd-platform.ts
  class DdBuildPlatform (line 8) | class DdBuildPlatform extends BuildPlatform {
    method constructor (line 22) | constructor(public templateTransform: DdTransform) {

FILE: src/builder/platform/dd/dd.transform.ts
  class DdTransform (line 5) | class DdTransform extends WxTransformLike {

FILE: src/builder/platform/jd/jd-platform.ts
  class JdBuildPlatform (line 8) | class JdBuildPlatform extends BuildPlatform {
    method constructor (line 22) | constructor(public templateTransform: JdTransform) {

FILE: src/builder/platform/jd/jd.transform.ts
  class JdTransform (line 5) | class JdTransform extends WxTransformLike {

FILE: src/builder/platform/library/library-platform.ts
  constant ERROR_VALUE (line 5) | const ERROR_VALUE = '!!!library_can_not_use!!!';
  class LibraryBuildPlatform (line 7) | class LibraryBuildPlatform extends BuildPlatform {
    method constructor (line 17) | constructor(public templateTransform: LibraryTransform) {

FILE: src/builder/platform/library/library.transform.ts
  class LibraryTransform (line 8) | class LibraryTransform extends WxTransformLike {

FILE: src/builder/platform/platform-inject-config.ts
  function getBuildPlatformInjectConfig (line 19) | function getBuildPlatformInjectConfig(platform: PlatformType) {

FILE: src/builder/platform/platform.ts
  type PlatformType (line 5) | enum PlatformType {
  class BuildPlatform (line 17) | class BuildPlatform {
    method constructor (line 23) | constructor(public templateTransform: TemplateTransformBase) {

FILE: src/builder/platform/qq/qq-platform.ts
  class QqBuildPlatform (line 8) | class QqBuildPlatform extends BuildPlatform {
    method constructor (line 22) | constructor(public templateTransform: QqTransform) {

FILE: src/builder/platform/qq/qq.transform.ts
  class QqTransform (line 5) | class QqTransform extends WxTransformLike {

FILE: src/builder/platform/template-transform-strategy/wx-like/wx-container.ts
  type WxContainerGlobalConfig (line 18) | interface WxContainerGlobalConfig {
  class WxContainer (line 24) | class WxContainer {
    method constructor (line 30) | constructor(private parent?: WxContainer) {}
    method _compileTemplate (line 32) | private _compileTemplate(node: NgNodeMeta): string {
    method compileNode (line 48) | compileNode(node: NgNodeMeta) {
    method ngElementTransform (line 52) | private ngElementTransform(node: NgElementMeta): string {
    method ngBoundTextTransform (line 81) | private ngBoundTextTransform(node: NgBoundTextMeta): string {
    method ngContentTransform (line 84) | private ngContentTransform(node: NgContentMeta): string {
    method ngTemplateTransform (line 87) | private ngTemplateTransform(node: NgTemplateMeta): string {
    method ngTextTransform (line 129) | private ngTextTransform(node: NgTextMeta): string {
    method getTemplateDataStr (line 133) | private getTemplateDataStr(directiveIndex: number, indexName: string) {
    method export (line 137) | export(): { wxmlTemplate: string } {
    method setComponentIdentification (line 143) | private setComponentIdentification(
    method elementPropertyAndEvent (line 153) | private elementPropertyAndEvent(node: NgElementMeta, index: number) {
    method initWxContainerFactory (line 215) | static initWxContainerFactory(globalConfig: WxContainerGlobalConfig) {
    method isGlobalTemplate (line 218) | private isGlobalTemplate(name: string) {
    method exportMetaCollectionGroup (line 225) | exportMetaCollectionGroup() {

FILE: src/builder/platform/template-transform-strategy/wx-like/wx-transform.base.ts
  constant EVENT_PREFIX_REGEXP (line 6) | const EVENT_PREFIX_REGEXP =
  method constructor (line 13) | constructor() {
  method init (line 16) | init() {
  method compile (line 24) | compile(nodes: NgNodeMeta[]) {
  method getData (line 48) | getData() {
  method eventNameConvert (line 51) | eventNameConvert(tagEventMeta: string) {

FILE: src/builder/platform/type.ts
  type PlatformFileExtname (line 1) | interface PlatformFileExtname {

FILE: src/builder/platform/util/dataset-bind.ts
  class DatasetBind (line 2) | class DatasetBind {
    method constructor (line 3) | constructor(private data: any) {}
    method toJSON (line 4) | toJSON() {
    method objectToJSON (line 7) | private objectToJSON(obj: Record<string, unknown>) {
    method numberToJSON (line 30) | private numberToJSON(number: number) {
    method stringToJSON (line 33) | private stringToJSON(string: string) {
    method arrayToJSON (line 36) | private arrayToJSON(list: any[]) {

FILE: src/builder/platform/util/type-predicate.ts
  function isNgElementMeta (line 11) | function isNgElementMeta(node: NgNodeMeta): node is NgElementMeta {
  function isNgBoundTextMeta (line 14) | function isNgBoundTextMeta(node: NgNodeMeta): node is NgBoundTextMeta {
  function isNgContentMeta (line 17) | function isNgContentMeta(node: NgNodeMeta): node is NgContentMeta {
  function isNgTemplateMeta (line 20) | function isNgTemplateMeta(node: NgNodeMeta): node is NgTemplateMeta {
  function isNgTextMeta (line 23) | function isNgTextMeta(node: NgNodeMeta): node is NgTextMeta {

FILE: src/builder/platform/wx/wx-platform.ts
  class WxBuildPlatform (line 8) | class WxBuildPlatform extends BuildPlatform {
    method constructor (line 22) | constructor(public templateTransform: WxTransform) {

FILE: src/builder/platform/wx/wx.transform.ts
  class WxTransform (line 5) | class WxTransform extends WxTransformLike {

FILE: src/builder/platform/zfb/zfb-platform.ts
  class ZfbBuildPlatform (line 8) | class ZfbBuildPlatform extends BuildPlatform {
    method constructor (line 22) | constructor(public templateTransform: ZfbTransform) {

FILE: src/builder/platform/zfb/zfb.transform.ts
  constant BIND_PREFIX_REGEXP (line 5) | const BIND_PREFIX_REGEXP = /^(bind|mut-bind|capture-bind)(.*)/;
  constant CATCH_PREFIX_REGEXP (line 6) | const CATCH_PREFIX_REGEXP = /^(catch|capture-catch)(.*)/;
  class ZfbTransform (line 8) | class ZfbTransform extends WxTransformLike {
    method eventNameConvert (line 10) | override eventNameConvert(name: string) {

FILE: src/builder/platform/zjtd/zj-platform.ts
  class ZjBuildPlatform (line 8) | class ZjBuildPlatform extends BuildPlatform {
    method constructor (line 23) | constructor(public templateTransform: ZjTransform) {

FILE: src/builder/platform/zjtd/zj.transform.ts
  class ZjTransform (line 5) | class ZjTransform extends WxTransformLike {

FILE: src/builder/test/fixture/watch/sub3/sub3.component.ts
  class Sub3Component (line 7) | class Sub3Component implements OnInit {
    method constructor (line 8) | constructor() {}
    method ngOnInit (line 10) | ngOnInit() {}

FILE: src/builder/test/fixture/watch/sub3/sub3.module.ts
  class Sub3Module (line 9) | class Sub3Module {}

FILE: src/builder/token/component.token.ts
  constant COMPONENT_META (line 3) | const COMPONENT_META = new InjectionToken('COMPONENT_META');

FILE: src/builder/util/library-template-scope-name.ts
  function libraryTemplateScopeName (line 3) | function libraryTemplateScopeName(library: string) {

FILE: src/builder/util/literal-resolve.ts
  function literalResolve (line 4) | function literalResolve<T extends Record<string, any>>(

FILE: src/builder/util/load_esm.ts
  function loadEsmModule (line 1) | async function loadEsmModule<T>(modulePath: string): Promise<T> {

FILE: src/builder/util/raw-updater.ts
  class RawUpdater (line 8) | class RawUpdater {
    method update (line 9) | static update(content: string, change: Change[]) {
    method constructor (line 14) | constructor(private content: string, private changes: Change[]) {
    method update (line 17) | update() {
    method slice (line 43) | private slice(pos: number, length: number = 0): [string, string] {

FILE: src/builder/util/run-script.ts
  function runScript (line 4) | function runScript(code: string, context?: vm.Context) {

FILE: src/library/forms/src/directives.ts
  constant SHARED_FORM_DIRECTIVES (line 103) | const SHARED_FORM_DIRECTIVES: Type<any>[] = [
  constant TEMPLATE_DRIVEN_DIRECTIVES (line 131) | const TEMPLATE_DRIVEN_DIRECTIVES: Type<any>[] = [
  constant REACTIVE_DRIVEN_DIRECTIVES (line 137) | const REACTIVE_DRIVEN_DIRECTIVES: Type<any>[] = [
  class ɵInternalFormsSharedModule (line 153) | class ɵInternalFormsSharedModule {}

FILE: src/library/forms/src/directives/checkbox_value_accessor.ts
  constant CHECKBOX_VALUE_ACCESSOR (line 26) | const CHECKBOX_VALUE_ACCESSOR: any = {
  class CheckBoxGroupValueAccessor (line 40) | class CheckBoxGroupValueAccessor
    method valueChange (line 46) | valueChange(list: string[]) {
    method writeValue (line 54) | writeValue(list: string[]) {
  class CheckboxControl (line 89) | class CheckboxControl {
    method constructor (line 97) | constructor(private elementRef: ElementRef, private renderer: Renderer...
    method updateChecked (line 98) | updateChecked(value: boolean) {

FILE: src/library/forms/src/directives/default_value_accessor.ts
  constant DEFAULT_VALUE_ACCESSOR (line 26) | const DEFAULT_VALUE_ACCESSOR: any = {
  constant COMPOSITION_BUFFER_MODE (line 38) | const COMPOSITION_BUFFER_MODE = new InjectionToken<boolean>(
  class DefaultValueAccessor (line 89) | class DefaultValueAccessor
    method constructor (line 95) | constructor(renderer: Renderer2, elementRef: ElementRef) {
    method writeValue (line 103) | writeValue(value: string): void {
    method valueChange (line 109) | valueChange(value: string) {

FILE: src/library/forms/src/directives/picker_value_accessor.ts
  constant SWITCH_VALUE_ACCESSOR (line 23) | const SWITCH_VALUE_ACCESSOR: any = {
  class PickerValueAccessor (line 58) | class PickerValueAccessor
    method writeValue (line 68) | writeValue(value: number | any[] | string): void {
    method valueChange (line 74) | valueChange(value: any) {

FILE: src/library/forms/src/directives/picker_view_value_accessor.ts
  constant PICKER_VIEW_VALUE_ACCESSOR (line 23) | const PICKER_VIEW_VALUE_ACCESSOR: any = {
  class PickerViewValueAccessor (line 59) | class PickerViewValueAccessor
    method writeValue (line 68) | writeValue(value: number[]): void {
    method setDisabledState (line 74) | override setDisabledState() {}
    method valueChange (line 75) | valueChange(value: any) {

FILE: src/library/forms/src/directives/radio_control_value_accessor.ts
  constant RADIO_GROUP_VALUE_ACCESSOR (line 32) | const RADIO_GROUP_VALUE_ACCESSOR: any = {
  function throwNameError (line 38) | function throwNameError() {
  class RadioControlRegistryModule (line 52) | class RadioControlRegistryModule {}
  class RadioControlRegistry (line 59) | class RadioControlRegistry {
    method add (line 66) | add(control: NgControl, accessor: RadioControl) {
    method remove (line 74) | remove(accessor: RadioControl) {
    method select (line 87) | select(accessor: RadioControl) {
    method _isSameGroup (line 95) | private _isSameGroup(
  class RadioGroupValueAccessor (line 118) | class RadioGroupValueAccessor
    method valueChange (line 124) | valueChange(value: string) {
    method writeValue (line 132) | writeValue(value: string) {
  class RadioControl (line 165) | class RadioControl {
    method constructor (line 175) | constructor(
    method updateChecked (line 182) | updateChecked(value: boolean) {

FILE: src/library/forms/src/directives/slider_value_accessor.ts
  constant NUMBER_VALUE_ACCESSOR (line 23) | const NUMBER_VALUE_ACCESSOR: any = {
  class SliderValueAccessor (line 58) | class SliderValueAccessor
    method writeValue (line 68) | writeValue(value: number): void {
    method valueChange (line 74) | valueChange(value: any) {

FILE: src/library/forms/src/directives/switch_value_accessor.ts
  constant SWITCH_VALUE_ACCESSOR (line 23) | const SWITCH_VALUE_ACCESSOR: any = {
  class SwitchValueAccessor (line 58) | class SwitchValueAccessor
    method writeValue (line 68) | writeValue(value: boolean): void {
    method valueChange (line 74) | valueChange(value: any) {

FILE: src/library/platform/bd/platform-core.ts
  class MiniProgramCoreFactory (line 4) | class MiniProgramCoreFactory extends BaseFactory {}

FILE: src/library/platform/default/agent-node.spec.ts
  function getAgentNode (line 3) | function getAgentNode() {

FILE: src/library/platform/default/agent-node.ts
  class AgentNode (line 6) | class AgentNode {
    method constructor (line 18) | constructor(public type: 'element' | 'comment' | 'text') {}
    method appendChild (line 19) | appendChild(child: AgentNode) {
    method setParent (line 27) | setParent(parent: AgentNode) {
    method insertBefore (line 38) | insertBefore(newChild: AgentNode, refChild: AgentNode) {
    method removeChild (line 52) | removeChild(child: AgentNode) {
    method toView (line 66) | toView(): MPTextData | MPElementData {

FILE: src/library/platform/default/component-finder.service.ts
  class ComponentFinderService (line 4) | class ComponentFinderService<T = unknown> {
    method get (line 7) | async get(component: unknown) {
    method set (line 22) | set(component: unknown, instance: T): void {
    method remove (line 29) | remove(component: unknown) {

FILE: src/library/platform/default/component-template-hook.factory.ts
  constant CLEANUP (line 13) | const CLEANUP = 7;
  constant LVIEW_CONTEXT (line 14) | const LVIEW_CONTEXT = 8;
  constant INJECTOR (line 15) | const INJECTOR = 9;
  constant VIEW_REFS (line 17) | const VIEW_REFS = 8;
  function propertyChange (line 28) | function propertyChange(lView: LView) {
  function endRender (line 46) | function endRender() {
  function getPageRefreshContext (line 53) | function getPageRefreshContext(lView: LView) {
  function lViewToWXView (line 64) | function lViewToWXView(lView: LView, parentNodePath: any[] = []) {
  function setLViewPath (line 100) | function setLViewPath(lView: LView, nodePath: NodePath) {
  function getLViewPath (line 104) | function getLViewPath(lView: LView) {
  function updatePath (line 107) | function updatePath(context: MPView, nodePath: NodePath) {
  function resolveNodePath (line 128) | function resolveNodePath(list: NodePath): any {
  function findCurrentElement (line 145) | function findCurrentElement(lView: LView, list: NodePath = []) {
  function lViewLinkToMPComponentRef (line 163) | function lViewLinkToMPComponentRef(ref: any, lView: LView) {
  function cleanWhenDestroy (line 167) | function cleanWhenDestroy(lView: LView, fn: () => void) {
  function cleanAll (line 172) | function cleanAll(lView: LView) {
  function findPageLView (line 178) | function findPageLView(componentRef: ComponentRef<unknown>) {
  function removePageLViewLink (line 185) | function removePageLViewLink(id: number) {
  function getDiffData (line 190) | function getDiffData(lView: LView, currentData: Record<string, any>) {

FILE: src/library/platform/default/diff-node-data.ts
  type DiffResult (line 1) | interface DiffResult {
  function _arrayOrObjectItemDiff (line 5) | function _arrayOrObjectItemDiff(
  function diffDataObject (line 50) | function diffDataObject(
  function diffDataArray (line 83) | function diffDataArray(
  function diffNodeData (line 115) | function diffNodeData(

FILE: src/library/platform/default/mini-program.renderer.factory.ts
  class MiniProgramRendererFactory (line 12) | class MiniProgramRendererFactory implements RendererFactory2 {
    method constructor (line 14) | constructor() {
    method createRenderer (line 18) | createRenderer(element: AgentNode, type: RendererType2 | null): Render...
    method begin (line 21) | begin() {}
    method end (line 22) | end() {

FILE: src/library/platform/default/mini-program.renderer.ts
  class MiniProgramRenderer (line 4) | class MiniProgramRenderer implements Renderer2 {
    method constructor (line 6) | constructor() {}
    method destroy (line 8) | destroy() {}
    method createElement (line 9) | createElement(name: string, namespace?: string | null) {
    method createComment (line 15) | createComment(value: string) {
    method createText (line 20) | createText(value: string) {
    method destroyNode (line 25) | destroyNode() {}
    method appendChild (line 26) | appendChild(parent: AgentNode, newChild: AgentNode) {
    method insertBefore (line 29) | insertBefore(
    method removeChild (line 42) | removeChild(parent: AgentNode, oldChild: AgentNode, isHostElement?: bo...
    method selectRootElement (line 50) | selectRootElement(
    method parentNode (line 59) | parentNode(node: AgentNode) {
    method nextSibling (line 62) | nextSibling(node: AgentNode) {
    method setAttribute (line 65) | setAttribute(
    method removeAttribute (line 73) | removeAttribute(el: AgentNode, name: string, namespace?: string | null) {
    method addClass (line 76) | addClass(el: AgentNode, name: string) {
    method removeClass (line 79) | removeClass(el: AgentNode, name: string) {
    method setStyle (line 82) | setStyle(
    method removeStyle (line 90) | removeStyle(el: AgentNode, style: string, flags?: RendererStyleFlags2) {
    method setProperty (line 93) | setProperty(el: AgentNode, name: string, value: unknown) {
    method setValue (line 96) | setValue(node: AgentNode, value: string) {
    method listen (line 99) | listen(

FILE: src/library/platform/default/platform-core.ts
  class MiniProgramCoreFactory (line 36) | class MiniProgramCoreFactory {
    method getListenerEventMapping (line 55) | protected getListenerEventMapping(prefix: string, name: string) {
    method linkNgComponentWithPath (line 59) | protected linkNgComponentWithPath(
    method listenerEvent (line 91) | protected listenerEvent() {
    method linkNgComponentWithPage (line 153) | protected linkNgComponentWithPage(
    method addNgComponentLinkLogic (line 306) | protected addNgComponentLinkLogic(
    method getPageOptions (line 375) | protected getPageOptions(component: Type<unknown> & MiniProgramPageOpt...
    method getComponentOptions (line 378) | protected getComponentOptions<T extends boolean = false>(

FILE: src/library/platform/default/token.ts
  constant PAGE_TOKEN (line 3) | const PAGE_TOKEN = new InjectionToken<unknown>('PAGE_TOKEN');

FILE: src/library/platform/http/backend.ts
  constant UPLOAD_FILE_TOKEN (line 22) | const UPLOAD_FILE_TOKEN = new HttpContextToken<{
  constant DOWNLOAD_FILE_TOKEN (line 29) | const DOWNLOAD_FILE_TOKEN = new HttpContextToken<{
  constant REQUSET_TOKEN (line 35) | const REQUSET_TOKEN = new HttpContextToken<{
  class MiniprogramHttpBackend (line 42) | class MiniprogramHttpBackend implements HttpBackend {
    method handle (line 43) | handle(request: HttpRequest<any>): Observable<HttpEvent<any>> {
    method upload (line 65) | private upload(request: HttpRequest<any>): Observable<HttpEvent<any>> {
    method download (line 179) | private download(request: HttpRequest<any>): Observable<HttpEvent<any>> {
    method request (line 281) | private request(request: HttpRequest<any>): Observable<HttpEvent<any>> {
    method buildHeaders (line 381) | private buildHeaders(request: HttpRequest<any>): { [key: string]: stri...

FILE: src/library/platform/http/module.ts
  class HttpClientModule (line 10) | class HttpClientModule { }

FILE: src/library/platform/http/provider.ts
  function provideHttpClient (line 5) | function provideHttpClient(...features: HttpFeature<HttpFeatureKind>[]):...

FILE: src/library/platform/http/response.ts
  class MiniProgramHttpResponse (line 3) | class MiniProgramHttpResponse<T> extends HttpResponse<T> {
    method constructor (line 16) | constructor(
    method clone (line 50) | clone(
  class MiniProgramHttpDownloadResponse (line 73) | class MiniProgramHttpDownloadResponse<T> extends HttpResponse<T> {
    method constructor (line 86) | constructor(
    method clone (line 124) | clone(

FILE: src/library/platform/mini-program.module.ts
  function errorHandler (line 15) | function errorHandler(): ErrorHandler {
  class MiniProgramModule (line 35) | class MiniProgramModule {
    method constructor (line 36) | constructor(pageService: PageService) {

FILE: src/library/platform/page.service.ts
  class PageService (line 18) | class PageService {
    method constructor (line 19) | constructor(
    method register (line 26) | register() {

FILE: src/library/platform/platform-miniprogram.ts
  function platformMiniProgram (line 9) | function platformMiniProgram<T>(

FILE: src/library/platform/qq/platform-core.ts
  class MiniProgramCoreFactory (line 5) | class MiniProgramCoreFactory extends BaseFactory {}

FILE: src/library/platform/token.ts
  constant APP_TOKEN (line 3) | const APP_TOKEN = new InjectionToken<unknown>('APP_TOKEN');
  constant MINIPROGRAM_GLOBAL_TOKEN (line 4) | const MINIPROGRAM_GLOBAL_TOKEN = new InjectionToken<unknown>(

FILE: src/library/platform/type/internal-type.ts
  type LView (line 3) | type LView = NonNullable<ɵLContext['lView']>;

FILE: src/library/platform/type/type.ts
  type AppOptions (line 12) | interface AppOptions {
  type MiniProgramComponentVariable (line 25) | interface MiniProgramComponentVariable<NG_COMPONENT_INSTANCE = unknown> {
  type MiniProgramComponentMethod (line 49) | interface MiniProgramComponentMethod {
  type MPView (line 53) | interface MPView {
  type MPElementData (line 60) | interface MPElementData {
  type MPTextData (line 66) | interface MPTextData {
  type NodePath (line 70) | type NodePath = ('directive' | number)[];
  type MiniProgramComponentBuiltIn (line 71) | interface MiniProgramComponentBuiltIn {
  type MiniProgramComponentInstance (line 75) | type MiniProgramComponentInstance<NG_COMPONENT_INSTANCE = unknown> =
  type MiniProgramPageOptions (line 82) | interface MiniProgramPageOptions {
  type MiniProgramComponentOptions (line 85) | interface MiniProgramComponentOptions {

FILE: src/library/platform/zfb/platform-core.ts
  class MiniProgramCoreFactory (line 8) | class MiniProgramCoreFactory extends BaseFactory {
    method getListenerEventMapping (line 13) | override getListenerEventMapping(prefix: string, name: string) {
    method addNgComponentLinkLogic (line 32) | override addNgComponentLinkLogic(config: any) {

FILE: test/hello-world-app/projects/test-library/src/directive/directive.module.ts
  class DirectiveModule (line 10) | class DirectiveModule {}

FILE: test/hello-world-app/projects/test-library/src/directive/input-output.directive.ts
  class InputOutputDirective (line 6) | class InputOutputDirective {

FILE: test/hello-world-app/projects/test-library/src/global-self-template/global-self-template.component.ts
  class GlobalSelfTemplateComponent (line 8) | class GlobalSelfTemplateComponent implements OnInit {
    method constructor (line 9) | constructor() {}
    method ngOnInit (line 11) | ngOnInit() {}

FILE: test/hello-world-app/projects/test-library/src/global-self-template/global-self-template.module.ts
  class GlobalSelfTemplateModule (line 11) | class GlobalSelfTemplateModule {}

FILE: test/hello-world-app/projects/test-library/src/lib-comp1/lib-comp1.component.ts
  class LibComp1Component (line 8) | class LibComp1Component implements OnInit {
    method tap1 (line 9) | tap1(event) {
    method tap2 (line 12) | tap2(event) {
    method constructor (line 15) | constructor() {}
    method ngOnInit (line 17) | ngOnInit() {}

FILE: test/hello-world-app/projects/test-library/src/lib-comp1/lib-comp1.module.ts
  class LibComp1Module (line 11) | class LibComp1Module {}

FILE: test/hello-world-app/projects/test-library/src/lib-comp1/lib-dir1.directive.ts
  class LibDir1Directive (line 6) | class LibDir1Directive {
    method tap1 (line 7) | tap1(event) {
    method tap2 (line 10) | tap2(event) {
    method constructor (line 13) | constructor() {}

FILE: test/hello-world-app/projects/test-library/src/lib/test-library.component.ts
  class TestLibraryComponent (line 8) | class TestLibraryComponent implements OnInit {
    method constructor (line 12) | constructor() {}
    method ngOnInit (line 14) | ngOnInit(): void {}

FILE: test/hello-world-app/projects/test-library/src/lib/test-library.directive.ts
  class TestLibraryDirective (line 9) | class TestLibraryDirective {
    method methodDecoratorTouchstart (line 10) | methodDecoratorTouchstart(event) {
    method constructor (line 14) | constructor() {
    method hostTap (line 20) | hostTap(event) {

FILE: test/hello-world-app/projects/test-library/src/lib/test-library.module.ts
  class TestLibraryModule (line 11) | class TestLibraryModule {}

FILE: test/hello-world-app/projects/test-library/src/lib/test-library.service.ts
  class TestLibraryService (line 6) | class TestLibraryService {
    method constructor (line 7) | constructor() {}

FILE: test/hello-world-app/projects/test-library/src/other/other.component.ts
  class OtherComponent (line 8) | class OtherComponent implements OnInit {
    method constructor (line 9) | constructor() {}
    method ngOnInit (line 11) | ngOnInit() {}
    method click (line 12) | click() {

FILE: test/hello-world-app/projects/test-library/src/other/other.module.ts
  class OtherModule (line 9) | class OtherModule {}

FILE: test/hello-world-app/projects/test-library/src/outside-template/outside-template.component.ts
  class OutsideTemplateComponent (line 8) | class OutsideTemplateComponent implements OnInit {
    method constructor (line 10) | constructor() {}
    method ngOnInit (line 12) | ngOnInit() {}

FILE: test/hello-world-app/projects/test-library/src/outside-template/outside-template.module.ts
  class OutsideTemplateModule (line 10) | class OutsideTemplateModule {}

FILE: test/hello-world-app/src/__components/component-need-template/component-need-template.component.ts
  class ComponentNeedTemplateComponent (line 8) | class ComponentNeedTemplateComponent implements OnInit {
    method constructor (line 10) | constructor() {}
    method ngOnInit (line 12) | ngOnInit() {}

FILE: test/hello-world-app/src/__components/component-need-template/component-need-template.module.ts
  class ComponentNeedTemplateModule (line 10) | class ComponentNeedTemplateModule {}

FILE: test/hello-world-app/src/__components/component1/component1.component.ts
  class Component1Component (line 8) | class Component1Component implements OnInit {
    method constructor (line 10) | constructor() {}
    method ngOnInit (line 12) | ngOnInit() {}

FILE: test/hello-world-app/src/__components/component1/component1.module.ts
  class Component1Module (line 10) | class Component1Module {}

FILE: test/hello-world-app/src/__components/component2/component2.component.ts
  class Component2Component (line 8) | class Component2Component implements OnInit {
    method constructor (line 10) | constructor() {}
    method ngOnInit (line 12) | ngOnInit() {}

FILE: test/hello-world-app/src/__components/component2/component2.module.ts
  class Component2Module (line 11) | class Component2Module {}

FILE: test/hello-world-app/src/__components/component3/component3.component.ts
  class Component3Component (line 9) | class Component3Component implements OnInit {
    method tap1 (line 10) | tap1(event) {
    method tap2 (line 13) | tap2(event) {
    method constructor (line 16) | constructor() {}
    method ngOnInit (line 18) | ngOnInit() {}

FILE: test/hello-world-app/src/__components/content-multi/content-multi.component.ts
  class ContentMultiComponent (line 8) | class ContentMultiComponent implements OnInit {
    method constructor (line 9) | constructor() {}
    method ngOnInit (line 11) | ngOnInit() {}

FILE: test/hello-world-app/src/__components/content-multi/content-multi.module.ts
  class ContentMultiModule (line 10) | class ContentMultiModule {}

FILE: test/hello-world-app/src/__components/content/content.component.ts
  class ContentComponent (line 8) | class ContentComponent implements OnInit {
    method constructor (line 9) | constructor() {}
    method ngOnInit (line 11) | ngOnInit() {}

FILE: test/hello-world-app/src/__components/content/content.module.ts
  class ContentModule (line 10) | class ContentModule {}

FILE: test/hello-world-app/src/__components/life-time/life-time.component.ts
  class LifeTimeComponent (line 9) | class LifeTimeComponent implements OnInit {
    method constructor (line 43) | constructor() {
    method ngOnInit (line 47) | ngOnInit() {
    method ngAfterViewInit (line 50) | ngAfterViewInit(): void {
    method ngAfterContentInit (line 53) | ngAfterContentInit(): void {

FILE: test/hello-world-app/src/__pages/base-component/base-component.component.ts
  class BaseComponentComponent (line 8) | class BaseComponentComponent implements OnInit {
    method constructor (line 10) | constructor() {}
    method ngOnInit (line 12) | ngOnInit() {}

FILE: test/hello-world-app/src/__pages/base-component/base-component.module.ts
  class BaseComponentModule (line 11) | class BaseComponentModule {}

FILE: test/hello-world-app/src/__pages/base-directive/base-directive.component.ts
  class BaseDirectiveComponent (line 8) | class BaseDirectiveComponent implements OnInit {
    method constructor (line 9) | constructor() {}
    method ngOnInit (line 11) | ngOnInit() {}
    method event1 (line 13) | event1() {}

FILE: test/hello-world-app/src/__pages/base-directive/base-directive.module.ts
  class BaseDirectiveModule (line 11) | class BaseDirectiveModule {}

FILE: test/hello-world-app/src/__pages/base-directive/directive1.directive.ts
  class Directive1Directive (line 6) | class Directive1Directive {
    method tap (line 8) | tap(event) {
    method constructor (line 12) | constructor() {}

FILE: test/hello-world-app/src/__pages/base-forms/base-forms.component.ts
  class BaseFormsComponent (line 8) | class BaseFormsComponent implements OnInit {
    method constructor (line 11) | constructor() {}
    method ngOnInit (line 13) | ngOnInit() {}
    method modelChange (line 14) | modelChange(e) {
    method checkboxChange (line 17) | checkboxChange(e) {

FILE: test/hello-world-app/src/__pages/base-forms/base-forms.module.ts
  class BaseFormsModule (line 10) | class BaseFormsModule {}

FILE: test/hello-world-app/src/__pages/base-http/base-http.component.ts
  class BaseHttpComponent (line 9) | class BaseHttpComponent implements OnInit {
    method constructor (line 10) | constructor(private http: HttpClient) {}
    method ngOnInit (line 12) | ngOnInit() {}
    method request (line 13) | request() {

FILE: test/hello-world-app/src/__pages/base-http/base-http.module.ts
  class BaseHttpModule (line 10) | class BaseHttpModule {}

FILE: test/hello-world-app/src/__pages/base-tap/base-tap.component.ts
  class BaseTagComponent (line 8) | class BaseTagComponent implements OnInit {
    method constructor (line 12) | constructor() {}
    method ngOnInit (line 14) | ngOnInit() {}
    method tap1 (line 15) | tap1(event) {
    method mutBindTap1 (line 18) | mutBindTap1(event) {
    method catchTap1 (line 21) | catchTap1(event) {
    method captureBindTap1 (line 24) | captureBindTap1(event) {

FILE: test/hello-world-app/src/__pages/base-tap/base-tap.module.ts
  class BaseTagModule (line 10) | class BaseTagModule {}

FILE: test/hello-world-app/src/__pages/complex-property-event/app-dir1.directive.ts
  class AppDir1Directive (line 6) | class AppDir1Directive {
    method tap1 (line 7) | tap1(event) {
    method tap2 (line 10) | tap2(event) {
    method constructor (line 13) | constructor() {}

FILE: test/hello-world-app/src/__pages/complex-property-event/complex-property-event.component.ts
  class ComplexPropertyEventComponent (line 8) | class ComplexPropertyEventComponent implements OnInit {
    method constructor (line 9) | constructor() {}
    method ngOnInit (line 11) | ngOnInit() {}

FILE: test/hello-world-app/src/__pages/complex-property-event/complex-property-event.module.ts
  class ComplexPropertyEventModule (line 12) | class ComplexPropertyEventModule {}

FILE: test/hello-world-app/src/__pages/complex-structure/complex-structure.component.ts
  class ComplexStructureComponent (line 8) | class ComplexStructureComponent implements OnInit {
    method constructor (line 10) | constructor() {}
    method ngOnInit (line 12) | ngOnInit() {}

FILE: test/hello-world-app/src/__pages/complex-structure/complex-structure.module.ts
  class ComplexStructureModule (line 10) | class ComplexStructureModule {}

FILE: test/hello-world-app/src/__pages/component-use-template/component-use-template.component.ts
  class ComponentUseTemplateComponent (line 8) | class ComponentUseTemplateComponent implements OnInit {
    method constructor (line 9) | constructor() {}
    method ngOnInit (line 11) | ngOnInit() {}

FILE: test/hello-world-app/src/__pages/component-use-template/component-use-template.module.ts
  class ComponentUseTemplateModule (line 11) | class ComponentUseTemplateModule {}

FILE: test/hello-world-app/src/__pages/custom-structural-directive/custom-structural-directive.component.ts
  class CustomStructuralDirectiveComponent (line 8) | class CustomStructuralDirectiveComponent implements OnInit {
    method constructor (line 9) | constructor() {}
    method ngOnInit (line 11) | ngOnInit() {}

FILE: test/hello-world-app/src/__pages/custom-structural-directive/custom-structural-directive.module.ts
  class CustomStructuralDirectiveModule (line 10) | class CustomStructuralDirectiveModule {}

FILE: test/hello-world-app/src/__pages/custom-structural-directive/structural1.directive.ts
  class Structural1Directive (line 6) | class Structural1Directive {
    method constructor (line 9) | constructor(private viewContainerRef: ViewContainerRef) {}
    method ngOnInit (line 10) | ngOnInit(): void {

FILE: test/hello-world-app/src/__pages/default-structural-directive/default-structural-directive.component.ts
  class DefaultStructuralDirectiveComponent (line 8) | class DefaultStructuralDirectiveComponent implements OnInit {
    method constructor (line 18) | constructor() {}
    method ngOnInit (line 20) | ngOnInit() {}
    method ngIfControl (line 21) | ngIfControl() {
    method ngIfElseControl (line 24) | ngIfElseControl() {
    method ngIfDefault (line 27) | ngIfDefault() {
    method addList (line 30) | addList() {
    method removeList (line 34) | removeList() {
    method changeSwitch (line 38) | changeSwitch() {

FILE: test/hello-world-app/src/__pages/default-structural-directive/default-structural-directive.module.ts
  class DefaultStructuralDirectiveModule (line 9) | class DefaultStructuralDirectiveModule {}

FILE: test/hello-world-app/src/__pages/life-time-page-use-component/life-time.component.ts
  class LifeTimePage (line 8) | class LifeTimePage implements OnInit {
    method constructor (line 59) | constructor() {
    method ngOnInit (line 63) | ngOnInit() {
    method ngAfterViewInit (line 66) | ngAfterViewInit(): void {
    method ngAfterContentInit (line 69) | ngAfterContentInit(): void {

FILE: test/hello-world-app/src/__pages/life-time-page-use-component/life-time.module.ts
  class LifeTimePageModule (line 10) | class LifeTimePageModule {}

FILE: test/hello-world-app/src/__pages/life-time-page/life-time.component.ts
  class LifeTimePage (line 8) | class LifeTimePage implements OnInit {
    method constructor (line 23) | constructor() {
    method ngOnInit (line 27) | ngOnInit() {
    method ngAfterViewInit (line 30) | ngAfterViewInit(): void {
    method ngAfterContentInit (line 33) | ngAfterContentInit(): void {

FILE: test/hello-world-app/src/__pages/life-time-page/life-time.module.ts
  class LifeTimePageModule (line 10) | class LifeTimePageModule {}

FILE: test/hello-world-app/src/__pages/ng-content/ng-content.component.ts
  class NgContentComponent (line 8) | class NgContentComponent implements OnInit {
    method constructor (line 9) | constructor() {}
    method ngOnInit (line 11) | ngOnInit() {}

FILE: test/hello-world-app/src/__pages/ng-content/ng-content.module.ts
  class NgContentModule (line 11) | class NgContentModule {}

FILE: test/hello-world-app/src/__pages/root/root.component.ts
  class RootComponent (line 9) | class RootComponent implements OnInit {
    method constructor (line 10) | constructor(@Inject(MINIPROGRAM_GLOBAL_TOKEN) private global: any) {}
    method ngOnInit (line 12) | ngOnInit() {}
    method baseTag (line 13) | baseTag() {
    method baseComponent (line 16) | baseComponent() {
    method baseDirective (line 21) | baseDirective() {
    method ngContent (line 26) | ngContent() {
    method defaultStructuralDirective (line 29) | defaultStructuralDirective() {
    method customStructuralDirective (line 34) | customStructuralDirective() {
    method complexStructure (line 39) | complexStructure() {
    method complexPropertyEvent (line 44) | complexPropertyEvent() {
    method baseForms (line 49) | baseForms() {
    method componentUseTemplate (line 54) | componentUseTemplate() {
    method baseHttp (line 59) | baseHttp() {
    method selfComponent (line 64) | selfComponent() {
    method lifeTime (line 69) | lifeTime() {
    method lifeTimeUseComponent (line 74) | lifeTimeUseComponent() {

FILE: test/hello-world-app/src/__pages/root/root.module.ts
  class RootModule (line 9) | class RootModule {}

FILE: test/hello-world-app/src/__pages/self-component/self-component.component.ts
  class SelfComponentComponent (line 8) | class SelfComponentComponent implements OnInit {
    method constructor (line 9) | constructor() {}
    method ngOnInit (line 11) | ngOnInit() {}

FILE: test/hello-world-app/src/__pages/self-component/self-component.module.ts
  class SelfComponentModule (line 10) | class SelfComponentModule {}

FILE: test/hello-world-app/src/main-test.module.ts
  class MainTestModule (line 10) | class MainTestModule implements DoBootstrap {
    method constructor (line 11) | constructor() {}
    method ngDoBootstrap (line 12) | ngDoBootstrap() {}

FILE: test/hello-world-app/src/main.module.ts
  class MainModule (line 10) | class MainModule implements DoBootstrap {
    method constructor (line 11) | constructor() {}
    method ngDoBootstrap (line 12) | ngDoBootstrap() {}

FILE: test/hello-world-app/src/spec-component/life-time/life-time.component.ts
  class LifeTimeComponent (line 8) | class LifeTimeComponent implements OnInit {
    method constructor (line 42) | constructor() {}
    method ngOnInit (line 44) | ngOnInit() {

FILE: test/hello-world-app/src/spec-component/life-time/life-time.module.ts
  class LifeTimeModule (line 9) | class LifeTimeModule {}

FILE: test/hello-world-app/src/spec-component/ng-content/ng-content.component.ts
  class NgContentComponent (line 7) | class NgContentComponent implements OnInit {
    method constructor (line 8) | constructor() {}
    method ngOnInit (line 10) | ngOnInit() {}

FILE: test/hello-world-app/src/spec-component/ng-content/ng-content.module.ts
  class NgContentModule (line 9) | class NgContentModule {}

FILE: test/hello-world-app/src/spec-component/ng-for/ng-for.component.ts
  class NgForComponent (line 7) | class NgForComponent implements OnInit {
    method constructor (line 9) | constructor() {}
    method ngOnInit (line 11) | ngOnInit() {}

FILE: test/hello-world-app/src/spec-component/ng-for/ng-for.module.ts
  class NgForModule (line 10) | class NgForModule {}

FILE: test/hello-world-app/src/spec-component/ng-if/ng-if.component.ts
  class NgIfComponent (line 7) | class NgIfComponent implements OnInit {
    method constructor (line 8) | constructor() {}
    method ngOnInit (line 10) | ngOnInit() {}

FILE: test/hello-world-app/src/spec-component/ng-if/ng-if.module.ts
  class NgIfModule (line 10) | class NgIfModule {}

FILE: test/hello-world-app/src/spec-component/ng-library-import/ng-library-import.component.ts
  class NgLibraryImportComponent (line 7) | class NgLibraryImportComponent implements OnInit {
    method constructor (line 9) | constructor() {}
    method ngOnInit (line 11) | ngOnInit() {}

FILE: test/hello-world-app/src/spec-component/ng-library-import/ng-library-import.module.ts
  class NgLibraryImportModule (line 9) | class NgLibraryImportModule {}

FILE: test/hello-world-app/src/spec-component/ng-switch/ng-switch.component.ts
  class NgSwitchComponent (line 7) | class NgSwitchComponent implements OnInit {
    method constructor (line 9) | constructor() {}
    method ngOnInit (line 11) | ngOnInit() {}

FILE: test/hello-world-app/src/spec-component/ng-switch/ng-switch.module.ts
  class NgSwitchModule (line 10) | class NgSwitchModule {}

FILE: test/hello-world-app/src/spec-component/ng-template-outlet/ng-template-outlet.component.ts
  class NgTemplateOutletComponent (line 7) | class NgTemplateOutletComponent implements OnInit {
    method constructor (line 8) | constructor() {}
    method ngOnInit (line 10) | ngOnInit() {}

FILE: test/hello-world-app/src/spec-component/ng-template-outlet/ng-template-outlet.module.ts
  class NgTemplateOutletModule (line 10) | class NgTemplateOutletModule {}

FILE: test/hello-world-app/src/spec-component/self-template/self-template.component.ts
  class SelfTemplateComponent (line 7) | class SelfTemplateComponent implements OnInit {
    method constructor (line 9) | constructor() {}
    method ngOnInit (line 11) | ngOnInit() {}

FILE: test/hello-world-app/src/spec-component/self-template/self-template.module.ts
  class SelfTemplateModule (line 10) | class SelfTemplateModule {}

FILE: test/hello-world-app/src/spec-component/style-class/style-class.component.ts
  class StyleClassComponent (line 7) | class StyleClassComponent implements OnInit {
    method constructor (line 8) | constructor() {}
    method ngOnInit (line 10) | ngOnInit() {}

FILE: test/hello-world-app/src/spec-component/style-class/style-class.module.ts
  class StyleClassModule (line 9) | class StyleClassModule {}

FILE: test/hello-world-app/src/spec-component/tag-view-convert/tag-view-convert.component.ts
  class TagViewConvertComponent (line 7) | class TagViewConvertComponent {}

FILE: test/hello-world-app/src/spec-component/tag-view-convert/tag-view-convert.module.ts
  class TagViewConvertModule (line 9) | class TagViewConvertModule {}

FILE: test/hello-world-app/src/spec/empty/empty.component.ts
  class EmptyComponent (line 7) | class EmptyComponent {}

FILE: test/hello-world-app/src/spec/empty/empty.module.ts
  class EmptyModule (line 9) | class EmptyModule {}

FILE: test/hello-world-app/src/spec/http-spec/http.component.ts
  class HttpSpecComponent (line 9) | class HttpSpecComponent implements OnInit {
    method constructor (line 12) | constructor(private http: HttpClient) {}
    method ngOnInit (line 14) | ngOnInit() {
    method request (line 17) | request() {

FILE: test/hello-world-app/src/spec/http-spec/http.module.ts
  class HttpSpecModule (line 9) | class HttpSpecModule {}

FILE: test/hello-world-app/src/spec/life-time-spec/life-time.component.ts
  class LifeTimeSPecComponent (line 12) | class LifeTimeSPecComponent {
    method constructor (line 30) | constructor(
    method ngOnInit (line 34) | ngOnInit(): void {

FILE: test/hello-world-app/src/spec/life-time-spec/life-time.module.ts
  class LifeTimeSpecModule (line 10) | class LifeTimeSpecModule {}

FILE: test/hello-world-app/src/spec/ng-content-spec/ng-content.component.ts
  class NgContentSpecComponent (line 14) | class NgContentSpecComponent {
    method constructor (line 47) | constructor(private componentFinderService: ComponentFinderService) {}
    method ngOnInit (line 48) | ngOnInit(): void {}

FILE: test/hello-world-app/src/spec/ng-content-spec/ng-content.module.ts
  class NgContentSpecModule (line 9) | class NgContentSpecModule {}

FILE: test/hello-world-app/src/spec/ng-for-spec/ng-for.component.ts
  class NgForSPecComponent (line 12) | class NgForSPecComponent {
    method constructor (line 40) | constructor(private componentFinderService: ComponentFinderService) {}
    method ngOnInit (line 41) | ngOnInit(): void {}

FILE: test/hello-world-app/src/spec/ng-for-spec/ng-for.module.ts
  class NgForSpecModule (line 10) | class NgForSpecModule {}

FILE: test/hello-world-app/src/spec/ng-if-spec/ng-if.component.ts
  class NgIfSPecComponent (line 12) | class NgIfSPecComponent {
    method constructor (line 36) | constructor(private componentFinderService: ComponentFinderService) {}
    method ngOnInit (line 37) | ngOnInit(): void {}

FILE: test/hello-world-app/src/spec/ng-if-spec/ng-if.module.ts
  class NgIfSpecModule (line 10) | class NgIfSpecModule {}

FILE: test/hello-world-app/src/spec/ng-library-import-spec/ng-library-import.component.ts
  class NgLibraryImportSPecComponent (line 12) | class NgLibraryImportSPecComponent {
    method constructor (line 38) | constructor(private componentFinderService: ComponentFinderService) {}
    method ngOnInit (line 39) | ngOnInit(): void {}

FILE: test/hello-world-app/src/spec/ng-library-import-spec/ng-library-import.module.ts
  class NgLibraryImportSpecModule (line 9) | class NgLibraryImportSpecModule {}

FILE: test/hello-world-app/src/spec/ng-switch-spec/ng-switch.component.ts
  class NgSwitchSPecComponent (line 12) | class NgSwitchSPecComponent {
    method constructor (line 39) | constructor(private componentFinderService: ComponentFinderService) {}
    method ngOnInit (line 40) | ngOnInit(): void {}

FILE: test/hello-world-app/src/spec/ng-switch-spec/ng-switch.module.ts
  class NgSwitchSpecModule (line 10) | class NgSwitchSpecModule {}

FILE: test/hello-world-app/src/spec/ng-template-outlet-spec/ng-template-outlet.component.ts
  class NgTemplateOutletSPecComponent (line 12) | class NgTemplateOutletSPecComponent {
    method constructor (line 38) | constructor(private componentFinderService: ComponentFinderService) {}
    method ngOnInit (line 39) | ngOnInit(): void {}

FILE: test/hello-world-app/src/spec/ng-template-outlet-spec/ng-template-outlet.module.ts
  class NgTemplateOutletSpecModule (line 10) | class NgTemplateOutletSpecModule {}

FILE: test/hello-world-app/src/spec/self-template-spec/self-template.component.ts
  class SelfTemplateSPecComponent (line 18) | class SelfTemplateSPecComponent {
    method constructor (line 45) | constructor(private componentFinderService: ComponentFinderService) {}
    method ngOnInit (line 46) | ngOnInit(): void {}

FILE: test/hello-world-app/src/spec/self-template-spec/self-template.module.ts
  class SelfTemplateSpecModule (line 10) | class SelfTemplateSpecModule {}

FILE: test/hello-world-app/src/spec/style-class-spec/style-class-spec.component.ts
  class StyleClassSpecComponent (line 12) | class StyleClassSpecComponent {
    method constructor (line 42) | constructor(private componentFinderService: ComponentFinderService) {}

FILE: test/hello-world-app/src/spec/style-class-spec/style-class-spec.module.ts
  class StyleClassSpecModule (line 10) | class StyleClassSpecModule {}

FILE: test/hello-world-app/src/spec/tag-view-convert-spec/tag-view-convert.component.ts
  class TagViewConvertSpecComponent (line 12) | class TagViewConvertSpecComponent {
    method constructor (line 38) | constructor(private componentFinderService: ComponentFinderService) {}
    method ngOnInit (line 39) | ngOnInit(): void {}

FILE: test/hello-world-app/src/spec/tag-view-convert-spec/tag-view-convert.module.ts
  class TagViewConvertSpecModule (line 10) | class TagViewConvertSpecModule {}

FILE: test/hello-world-app/src/spec/util/node-query.ts
  function nodeExist (line 1) | function nodeExist(
  function nodeNotEmpty (line 18) | function nodeNotEmpty(
  function fields (line 36) | function fields(

FILE: test/hello-world-app/src/spec/util/open-component.ts
  function routeEvent (line 4) | function routeEvent() {
  function openComponent (line 12) | async function openComponent(url: string) {

FILE: test/hello-world-app/src/spec/util/page-info.ts
  function assertMiniProgramComponent (line 4) | function assertMiniProgramComponent(
  function getComponent (line 10) | function getComponent<T>(
  function componentTestComplete (line 19) | function componentTestComplete(subject: BehaviorSubject<unknown>) {

FILE: test/hello-world-app/src/test.ts
  function bootWithoutGlobals (line 8) | function bootWithoutGlobals() {

FILE: test/hello-world-app/src/typings.d.ts
  type NodeModule (line 11) | interface NodeModule {

FILE: test/plugin-describe-builder/index.ts
  type TestContext (line 10) | interface TestContext {
  class MyTestProjectHost (line 14) | class MyTestProjectHost {
    method constructor (line 15) | constructor(private host: TestProjectHost) {}
    method getFileList (line 16) | async getFileList(dirPath: Path): Promise<string[]> {
    method importPathRename (line 31) | async importPathRename(list: string[]) {
    method moveDir (line 47) | async moveDir(list: string[], from: string, to: string) {
    method addPageEntry (line 58) | async addPageEntry(list: string[]) {
    method addSpecEntry (line 68) | async addSpecEntry(list: string[]) {

FILE: test/test-builder/index.ts
  type CustomWebpackBrowserSchema (line 13) | type CustomWebpackBrowserSchema = BrowserBuilderOptions;
  function buildWebpackBrowserGenerate (line 15) | function buildWebpackBrowserGenerate(
  constant BROWSER_BUILDER_INFO (line 31) | const BROWSER_BUILDER_INFO = {
  constant LIBRARY_BUILDER_INFO (line 35) | const LIBRARY_BUILDER_INFO = {
  constant KARMA_BUILDER_INFO (line 39) | const KARMA_BUILDER_INFO = {
  constant DEFAULT_ANGULAR_CONFIG (line 44) | const DEFAULT_ANGULAR_CONFIG = {
  constant DEFAULT_ANGULAR_KARMA_CONFIG (line 77) | const DEFAULT_ANGULAR_KARMA_CONFIG: KarmaBuilderOptions & {
  constant DEFAULT_ANGULAR_LIBRARY_CONFIG (line 117) | const DEFAULT_ANGULAR_LIBRARY_CONFIG = {

FILE: test/util/file.ts
  constant ALL_PAGE_NAME_LIST (line 1) | const ALL_PAGE_NAME_LIST = [
  constant ALL_COMPONENT_NAME_LIST (line 18) | const ALL_COMPONENT_NAME_LIST = [
  constant TEST_LIBRARY_COMPONENT_LIST (line 28) | const TEST_LIBRARY_COMPONENT_LIST = [
Condensed preview — 497 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (636K chars).
[
  {
    "path": ".eslintignore",
    "chars": 294,
    "preview": "/tests/\n.yarn/\ndist/\nnode_modules/\ntest/test-project-host-hello-world-app-*\ntest/hello-world-app\njest.builder.config.ts\n"
  },
  {
    "path": ".eslintrc.json",
    "chars": 5085,
    "preview": "{\n  \"ignorePatterns\": [\n    \"src/library/forms/**/*\",\n    \"src/library/common/**/*\",\n    \"*.d.ts\",\n    \"src/builder/karm"
  },
  {
    "path": ".github/workflows/alpha.yml",
    "chars": 1467,
    "preview": "name: CI\n\non:\n  push:\n    branches:\n      - alpha\nenv:\n  REPOSITORY_PATH: https://${{secrets.ACCESS_TOKEN}}@github.com/\n"
  },
  {
    "path": ".github/workflows/default.yml",
    "chars": 1457,
    "preview": "name: CI\n\non:\n  push:\n    branches:\n      - master\nenv:\n  REPOSITORY_PATH: https://${{secrets.ACCESS_TOKEN}}@github.com/"
  },
  {
    "path": ".github/workflows/deploy.yml",
    "chars": 1261,
    "preview": "name: deploy\n\non:\n  push:\n    branches:\n      - master\nenv:\n  REPOSITORY_PATH: https://${{secrets.ACCESS_TOKEN}}@github."
  },
  {
    "path": ".github/workflows/pull_request.yml",
    "chars": 641,
    "preview": "name: PR\n\non:\n  pull_request:\n    branches:\n      - master\n      - alpha\n\njobs:\n  pr-test:\n    runs-on: ubuntu-latest\n\n "
  },
  {
    "path": ".gitignore",
    "chars": 150,
    "preview": "node_modules*\ntest-project-host-hello-world-app-*\ndist\n__test-app\ncoverage-builder\nscript/startup-jasmine.js\n.temp-git\n."
  },
  {
    "path": ".husky/commit-msg",
    "chars": 82,
    "preview": "#!/bin/sh\n. \"$(dirname \"$0\")/_/husky.sh\"\n\nnpx --no-install commitlint --edit \"$1\"\n"
  },
  {
    "path": ".husky/pre-commit",
    "chars": 81,
    "preview": "#!/bin/sh\n. \"$(dirname \"$0\")/_/husky.sh\"\n\nnpx --no-install pretty-quick --staged\n"
  },
  {
    "path": ".npmrc",
    "chars": 43,
    "preview": "# registry =https://registry.npmmirror.com/"
  },
  {
    "path": ".nycrc.json",
    "chars": 289,
    "preview": "{\n  \"extension\": [\".ts\"],\n  \"exclude\": [\n    \"**/*.d.ts\",\n    \"**/*.js\",\n    \"**/*.spec.ts\",\n    \"startup-jasmine.js\",\n "
  },
  {
    "path": ".prettierignore",
    "chars": 6,
    "preview": "deploy"
  },
  {
    "path": ".prettierrc",
    "chars": 26,
    "preview": "{\n  \"singleQuote\": true\n}\n"
  },
  {
    "path": ".vscode/launch.json",
    "chars": 1146,
    "preview": "{\n  // 使用 IntelliSense 了解相关属性。\n  // 悬停以查看现有属性的描述。\n  // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387\n  \"ve"
  },
  {
    "path": ".vscode/settings.json",
    "chars": 168,
    "preview": "{\n  \"typescript.tsdk\": \"node_modules/typescript/lib\",\n  \"editor.codeActionsOnSave\": {\n    \"source.fixAll.eslint\": \"expli"
  },
  {
    "path": "LICENSE",
    "chars": 1061,
    "preview": "MIT License\n\nCopyright (c) 2021 chen\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof th"
  },
  {
    "path": "commitlint.config.js",
    "chars": 70,
    "preview": "module.exports = {\n  extends: ['@commitlint/config-conventional'],\n};\n"
  },
  {
    "path": "deploy/doc/.gitignore",
    "chars": 20,
    "preview": "_site\n.jekyll-cache\n"
  },
  {
    "path": "deploy/doc/Gemfile",
    "chars": 1340,
    "preview": "source \"https://mirrors.tuna.tsinghua.edu.cn/rubygems/\"\n# Hello! This is where you manage which Jekyll version is used t"
  },
  {
    "path": "deploy/doc/_config.yml",
    "chars": 58,
    "preview": "theme: jekyll-theme-tactile\nbaseurl: /angular-miniprogram\n"
  },
  {
    "path": "deploy/doc/_includes/language-change.html",
    "chars": 262,
    "preview": "<div>\n  <button>\n    <a href=\"{{site.baseurl}}{{page.url| replace_first:page.dir,'/zh-Hans/' }}\"\n      >简体中文</a\n    >\n  "
  },
  {
    "path": "deploy/doc/_layouts/home.html",
    "chars": 1416,
    "preview": "<!DOCTYPE html>\n<html lang=\"{{ site.lang | default: \" en-US\" }}\">\n\n<head>\n  <meta charset='utf-8'>\n  <meta name=\"viewpor"
  },
  {
    "path": "deploy/doc/_layouts/post.html",
    "chars": 1252,
    "preview": "<!DOCTYPE html>\n<html lang=\"{{ site.lang | default: \"en-US\" }}\">\n  <head>\n    <meta charset='utf-8'>\n    <meta name=\"vie"
  },
  {
    "path": "deploy/doc/_layouts/redirect.html",
    "chars": 348,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=ed"
  },
  {
    "path": "deploy/doc/_posts/2022-02-10-无时间测试.md",
    "chars": 46,
    "preview": "---\ntitle: \"无时间测试\"\nlayout: post\n---\n\n# 内容\n- 没有"
  },
  {
    "path": "deploy/doc/_posts/2022-02-10-测试.md",
    "chars": 39,
    "preview": "---\ntitle: \"测试\"\nlayout: post\n---\n\n# 内容\n"
  },
  {
    "path": "deploy/doc/assets/css/style.scss",
    "chars": 251,
    "preview": "---\n---\n\n@import '{{ site.theme }}';\n\n.action-line {\n  display: flex;\n  align-items: center;\n  justify-content: end;\n}\n\n"
  },
  {
    "path": "deploy/doc/en-US/attention.md",
    "chars": 3202,
    "preview": "---\nlayout: post\ntitle: Attention\n---\n## Forbidden\n\n- All Dom operation\n\n## Import Change\n\n- Use `angular-miniprogram/co"
  },
  {
    "path": "deploy/doc/en-US/index.md",
    "chars": 3124,
    "preview": "---\ntitle: 'angular-miniprogram'\nlayout: home\n---\n<h1 align=\"center\">Develop MiniProgram using Angular </h1>\n\n<p align=\""
  },
  {
    "path": "deploy/doc/en-US/life-time.md",
    "chars": 865,
    "preview": "---\nlayout: post\ntitle: Life Time\n---\n# Component(Component)\n\n- created\n  > Wait for link (miniprogram component is asso"
  },
  {
    "path": "deploy/doc/en-US/miniprogram-feature.md",
    "chars": 3036,
    "preview": "---\nlayout: post\ntitle: Miniprogram Feature\n---\n## Service\n\n- `ComponentFinderService`: get MiniProgram Component corres"
  },
  {
    "path": "deploy/doc/en-US/quick-start.md",
    "chars": 1651,
    "preview": "---\nlayout: post\ntitle: Quick Start\n---\n## set Page pattern\n\n- Set output Page pattern in `angular.json`, same with `ass"
  },
  {
    "path": "deploy/doc/index.md",
    "chars": 24,
    "preview": "---\nlayout: redirect\n---"
  },
  {
    "path": "deploy/doc/zh-Hans/attention.md",
    "chars": 2401,
    "preview": "---\nlayout: post\ntitle: 注意事项\n---\n## 禁止使用\n\n- 一切 dom 行为\n- 带前缀的事件,如`bind`,`mut-bind`等,去掉冒号直接写,如事件`bind:tap`=>`bindtap`\n  > "
  },
  {
    "path": "deploy/doc/zh-Hans/index.md",
    "chars": 2735,
    "preview": "---\ntitle: 'angular-miniprogram'\nlayout: home\n---\n\n<h1 align=\"center\">使用 Angular 开发小程序 </h1>\n\n<p align=\"center\">尽可能使用 An"
  },
  {
    "path": "deploy/doc/zh-Hans/life-time.md",
    "chars": 709,
    "preview": "---\nlayout: post\ntitle: 生命周期\n---\n# 组件(Component)\n\n- created\n  > 等待链接(小程序 Component 与 ng Component 关联)\n- properties 变更(第一"
  },
  {
    "path": "deploy/doc/zh-Hans/miniprogram-feature.md",
    "chars": 2904,
    "preview": "---\nlayout: post\ntitle: 小程序特性\n---\n## 服务\n\n- 通过`ComponentFinderService`服务来查询当前 ng 组件实例对应的小程序组件\n\n\n```ts  \nimport { Componen"
  },
  {
    "path": "deploy/doc/zh-Hans/quick-start.md",
    "chars": 1361,
    "preview": "---\nlayout: post\ntitle: 快速启动\n---\n## 设置页面匹配\n\n- 在`angular.json`中设置要匹配的页面范围,匹配规则与 assets 相同\n\n```json\n\"pages\": [\n  {\n    \"gl"
  },
  {
    "path": "jasmine.json",
    "chars": 184,
    "preview": "{\n  \"spec_dir\": \"src\",\n  \"spec_files\": [\"**/*.spec.ts\"],\n  \"failSpecWithNoExpectations\": true,\n  \"stopSpecOnExpectationF"
  },
  {
    "path": "package.json",
    "chars": 3282,
    "preview": "{\n  \"name\": \"angular-miniprogram\",\n  \"version\": \"0.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \""
  },
  {
    "path": "readme.md",
    "chars": 340,
    "preview": "<h1 align=\"center\">angular-miniprogram - 使用 Angular 开发小程序 </h1>\n\n<p align=\"center\">尽可能使用 Angular 已有生态,降低跨平台时所需成本</p>\n\n- "
  },
  {
    "path": "script/build-ng-package.ts",
    "chars": 338,
    "preview": "import * as path from 'path';\nimport { ngPackagrFactory } from '../src/builder/library/ng-packagr-factory';\nasync functi"
  },
  {
    "path": "script/build.ts",
    "chars": 1389,
    "preview": "import * as path from 'path';\nimport * as fs from 'fs';\nimport * as ts from 'typescript';\nimport { createTransformer } f"
  },
  {
    "path": "script/coverage-badge.ts",
    "chars": 5570,
    "preview": "import * as fs from 'fs-extra';\nimport * as path from 'path';\nenum Status {\n  success = 'success',\n  init = 'init',\n}\nfu"
  },
  {
    "path": "script/package-sync.ts",
    "chars": 5459,
    "preview": "import {\n  type NodeQueryOption,\n  type ScriptFunction,\n  type FileQueryLayer,\n  completePromise,\n  fileBufferToString,\n"
  },
  {
    "path": "script/registry-transformer.js",
    "chars": 412,
    "preview": "let { register } = require('ts-node');\nlet path = require('path');\nlet { createTransformer } = require('static-injector/"
  },
  {
    "path": "script/schema-merge.ts",
    "chars": 907,
    "preview": "import * as fs from 'fs';\nimport * as path from 'path';\nfunction merge(origin: string, additional: string, output: strin"
  },
  {
    "path": "script/start-build-library.js",
    "chars": 105,
    "preview": "let registerTsNode = require('./registry-transformer');\nregisterTsNode();\nrequire('./build-ng-package');\n"
  },
  {
    "path": "script/startup-jasmine.ts",
    "chars": 598,
    "preview": "import { register } from 'ts-node';\nimport { createTransformer } from 'static-injector/transform';\nimport Jasmine from '"
  },
  {
    "path": "script/tsconfig.json",
    "chars": 172,
    "preview": "{\n  \"extends\": \"../tsconfig.base.json\",\n  \"compilerOptions\": {\n    \"esModuleInterop\": true,\n    \"downlevelIteration\": tr"
  },
  {
    "path": "script/tsconfig.startup-jasmine.json",
    "chars": 168,
    "preview": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": { \"skipLibCheck\": true, \"outDir\": \".\" },\n  \"files\": [\"./startup-j"
  },
  {
    "path": "src/builder/angular-internal/ast.type.ts",
    "chars": 823,
    "preview": "import type {\n  TmplAstBoundAttribute,\n  TmplAstBoundEvent,\n  TmplAstBoundText,\n  TmplAstContent,\n  TmplAstElement,\n  Tm"
  },
  {
    "path": "src/builder/angular-internal/selector.ts",
    "chars": 15210,
    "preview": "/* eslint-disable @typescript-eslint/no-this-alias */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-"
  },
  {
    "path": "src/builder/angular-internal/tags.ts",
    "chars": 1906,
    "preview": "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style l"
  },
  {
    "path": "src/builder/angular-internal/template.ts",
    "chars": 1147,
    "preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n"
  },
  {
    "path": "src/builder/angular-internal/util.ts",
    "chars": 1452,
    "preview": "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style l"
  },
  {
    "path": "src/builder/application/const.ts",
    "chars": 294,
    "preview": "export const ExportMiniProgramAssetsPluginSymbol = Symbol.for(\n  'ExportMiniProgramAssetsPluginSymbol'\n);\nexport const L"
  },
  {
    "path": "src/builder/application/index.ts",
    "chars": 1946,
    "preview": "import type { BuilderContext } from '@angular-devkit/architect';\nimport { createBuilder } from '@angular-devkit/architec"
  },
  {
    "path": "src/builder/application/library-template-scope.service.ts",
    "chars": 3111,
    "preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Injectable } from 'static-injector';\nimport * as webpac"
  },
  {
    "path": "src/builder/application/loader/component-template.loader.ts",
    "chars": 539,
    "preview": "import * as webpack from 'webpack';\nimport { changeComponent } from '../../component-template-inject/change-component';\n"
  },
  {
    "path": "src/builder/application/loader/library-template.loader.ts",
    "chars": 2608,
    "preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { createCssSelectorForTs } from 'cyia-code-util';\nimport "
  },
  {
    "path": "src/builder/application/loader/library.loader.ts",
    "chars": 5325,
    "preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { dirname, join, normalize, strings } from '@angular-devk"
  },
  {
    "path": "src/builder/application/loader/type.ts",
    "chars": 275,
    "preview": "import { MetaCollection } from '../../mini-program-compiler';\nimport type { BuildPlatform } from '../../platform/platfor"
  },
  {
    "path": "src/builder/application/mini-program-application-analysis.service.ts",
    "chars": 12563,
    "preview": "import type { NgtscProgram, ParsedConfiguration } from '@angular/compiler-cli';\nimport type { NgCompiler } from '@angula"
  },
  {
    "path": "src/builder/application/plugin/dynamic-library-entry.plugin.ts",
    "chars": 3372,
    "preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { join, normalize } from '@angular-devkit/core';\nimport p"
  },
  {
    "path": "src/builder/application/plugin/dynamic-watch-entry.plugin.ts",
    "chars": 7110,
    "preview": "import type { BuilderContext } from '@angular-devkit/architect';\nimport type { AssetPattern } from '@angular-devkit/buil"
  },
  {
    "path": "src/builder/application/plugin/export-mini-program-assets.plugin.ts",
    "chars": 9792,
    "preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable no-console */\nimport { normalizePath } from '@"
  },
  {
    "path": "src/builder/application/schema.base.json",
    "chars": 1856,
    "preview": "{\n  \"$schema\": \"http://json-schema.org/schema\",\n  \"title\": \"Webpack browser schema for Build Facade.\",\n  \"description\": "
  },
  {
    "path": "src/builder/application/schema.json",
    "chars": 17644,
    "preview": "{\n  \"$schema\": \"http://json-schema.org/draft-07/schema\",\n  \"title\": \"Webpack browser schema for Build Facade.\",\n  \"descr"
  },
  {
    "path": "src/builder/application/token.ts",
    "chars": 467,
    "preview": "import { InjectionToken } from 'static-injector';\n\nexport const TS_CONFIG_TOKEN = new InjectionToken('TS_CONFIG_TOKEN');"
  },
  {
    "path": "src/builder/application/type.ts",
    "chars": 939,
    "preview": "import type { AssetPattern } from '@angular-devkit/build-angular';\nimport { LibraryComponentEntryMeta } from '../library"
  },
  {
    "path": "src/builder/application/util/index.ts",
    "chars": 41,
    "preview": "export * from './set-compilation-asset';\n"
  },
  {
    "path": "src/builder/application/util/set-compilation-asset.ts",
    "chars": 307,
    "preview": "import * as webpack from 'webpack';\n\nexport function setCompilationAsset(\n  compilation: webpack.Compilation,\n  key: str"
  },
  {
    "path": "src/builder/application/webpack-configuration-change.service.ts",
    "chars": 9727,
    "preview": "import type { BuilderContext } from '@angular-devkit/architect';\nimport {\n  AssetPattern,\n  BrowserBuilderOptions,\n  Kar"
  },
  {
    "path": "src/builder/builder.prod.spec.ts",
    "chars": 1724,
    "preview": "import { join, normalize } from '@angular-devkit/core';\nimport {\n  MyTestProjectHost,\n  describeBuilder,\n  setWorkspaceR"
  },
  {
    "path": "src/builder/builder.spec.ts",
    "chars": 3995,
    "preview": "import { join, normalize } from '@angular-devkit/core';\nimport * as fs from 'fs-extra';\nimport * as path from 'path';\nim"
  },
  {
    "path": "src/builder/builder.watch.spec.ts",
    "chars": 4617,
    "preview": "import { join, normalize } from '@angular-devkit/core';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport {"
  },
  {
    "path": "src/builder/builders.json",
    "chars": 530,
    "preview": "{\n  \"$schema\": \"../../node_modules/@angular-devkit/architect/src/builders-schema.json\",\n  \"builders\": {\n    \"application"
  },
  {
    "path": "src/builder/component-template-inject/change-component.ts",
    "chars": 2163,
    "preview": "import {\n  Change,\n  InsertChange,\n  TsChange,\n  createCssSelectorForTs,\n} from 'cyia-code-util';\nimport * as ts from 't"
  },
  {
    "path": "src/builder/karma/client/adapter.ts",
    "chars": 17278,
    "preview": "import { KarmaClient } from './karma';\n\n// Save link to native Date object\n// before it might be mocked by the user\ncons"
  },
  {
    "path": "src/builder/karma/client/index.ts",
    "chars": 24,
    "preview": "export * from './main';\n"
  },
  {
    "path": "src/builder/karma/client/karma.ts",
    "chars": 4889,
    "preview": "import { IO } from './platform';\nimport { StatusUpdater } from './updater';\n\nexport class KarmaClient {\n  /** 是否正式发射判断? "
  },
  {
    "path": "src/builder/karma/client/main.ts",
    "chars": 1401,
    "preview": "import { createStartFn } from './adapter';\nimport { KarmaClient } from './karma';\nimport { IO } from './platform';\nimpor"
  },
  {
    "path": "src/builder/karma/client/platform/index.ts",
    "chars": 22,
    "preview": "export * from './wx';\n"
  },
  {
    "path": "src/builder/karma/client/platform/wx/index.ts",
    "chars": 524,
    "preview": "/// <reference types=\"miniprogram-api-typings\" />\n\nimport type { Socket } from 'socket.io-client';\n\nconst io = require('"
  },
  {
    "path": "src/builder/karma/client/tsconfig.json",
    "chars": 368,
    "preview": "{\n  \"compilerOptions\": {\n    \"outDir\": \"../../../../dist/karma/client\",\n    \"strict\": false,\n    \"strictNullChecks\": fal"
  },
  {
    "path": "src/builder/karma/client/updater.ts",
    "chars": 1511,
    "preview": "import { IO } from './platform';\n\nexport class StatusUpdater {\n  private connectionText = 'never-connected';\n  private t"
  },
  {
    "path": "src/builder/karma/index.origin.ts",
    "chars": 6809,
    "preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n"
  },
  {
    "path": "src/builder/karma/index.spec.ts",
    "chars": 4249,
    "preview": "import { BuilderOutput } from '@angular-devkit/architect';\nimport { join, normalize } from '@angular-devkit/core';\nimpor"
  },
  {
    "path": "src/builder/karma/index.ts",
    "chars": 3462,
    "preview": "import { BuilderContext, createBuilder } from '@angular-devkit/architect';\nimport {\n  AssetPattern,\n  KarmaBuilderOption"
  },
  {
    "path": "src/builder/karma/plugin/index.js",
    "chars": 195,
    "preview": "require('ts-node').register({\n  /* options */\n  scope: true,\n  cwd: __dirname,\n});\nlet obj = require('./launcher');\nobj "
  },
  {
    "path": "src/builder/karma/plugin/index.ts",
    "chars": 110,
    "preview": "import config from './karma';\nimport launcher from './launcher';\nmodule.exports = { ...config, ...launcher };\n"
  },
  {
    "path": "src/builder/karma/plugin/karma.ts",
    "chars": 6278,
    "preview": "// import { statsErrorsToString } from '@angular-devkit/build-angular/src/webpack/utils/stats';\nimport { logging } from "
  },
  {
    "path": "src/builder/karma/plugin/launcher.ts",
    "chars": 458,
    "preview": "const miniProgram = function (\n  this: any,\n  baseBrowserDecorator: any,\n  config: any\n) {\n  baseBrowserDecorator(this);"
  },
  {
    "path": "src/builder/karma/plugin/tsconfig.json",
    "chars": 418,
    "preview": "{\n  \"compilerOptions\": {\n    \"outDir\": \"../../../../dist/karma/plugin\",\n    \"strict\": false,\n    \"strictNullChecks\": fal"
  },
  {
    "path": "src/builder/karma/schema.json",
    "chars": 7784,
    "preview": "{\n  \"$schema\": \"http://json-schema.org/draft-07/schema\",\n  \"title\": \"Karma Target\",\n  \"description\": \"Karma target optio"
  },
  {
    "path": "src/builder/library/add-declaration-metadata.service.ts",
    "chars": 3915,
    "preview": "import type {\n  R3ComponentMetadata,\n  R3DirectiveMetadata,\n} from '@angular/compiler';\nimport { createCssSelectorForTs "
  },
  {
    "path": "src/builder/library/builder.ts",
    "chars": 2066,
    "preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n"
  },
  {
    "path": "src/builder/library/compile-ngc.transform.ts",
    "chars": 2688,
    "preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n  Transform,\n  transformFromPromise,\n} from 'ng-packagr"
  },
  {
    "path": "src/builder/library/compile-source-files.ts",
    "chars": 11261,
    "preview": "import type {\n  CompilerOptions,\n  ParsedConfiguration,\n} from '@angular/compiler-cli';\nimport { dirname, normalize } fr"
  },
  {
    "path": "src/builder/library/const.ts",
    "chars": 362,
    "preview": "export const LIBRARY_OUTPUT_ROOTDIR = 'library';\nexport const LIBRARY_DIRECTIVE_LISTENERS_SUFFIX = 'Listeners';\nexport c"
  },
  {
    "path": "src/builder/library/get-library-path.ts",
    "chars": 325,
    "preview": "import { join, normalize } from '@angular-devkit/core';\nimport { camelize, dasherize } from '@angular-devkit/core/src/ut"
  },
  {
    "path": "src/builder/library/index.ts",
    "chars": 49,
    "preview": "export * from './const';\nexport * from './type';\n"
  },
  {
    "path": "src/builder/library/library.spec.ts",
    "chars": 1879,
    "preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { join, normalize } from '@angular-devkit/core';\nimport *"
  },
  {
    "path": "src/builder/library/merge-using-component-path.ts",
    "chars": 738,
    "preview": "import { join, normalize, resolve } from '@angular-devkit/core';\nimport { UseComponent } from '../mini-program-compiler'"
  },
  {
    "path": "src/builder/library/ng-packagr-factory.ts",
    "chars": 856,
    "preview": "import { COMPILE_NGC_TRANSFORM } from 'ng-packagr/lib/ng-package/entry-point/compile-ngc.di';\nimport { STYLESHEET_PROCES"
  },
  {
    "path": "src/builder/library/output-template-metadata.service.ts",
    "chars": 3387,
    "preview": "import { join, normalize, resolve } from '@angular-devkit/core';\nimport { Inject, Injectable } from 'static-injector';\ni"
  },
  {
    "path": "src/builder/library/remove-publish-only.ts",
    "chars": 1537,
    "preview": "import fs from 'fs-extra';\nimport { transformFromPromise } from 'ng-packagr/lib/graph/transform';\nimport { WRITE_PACKAGE"
  },
  {
    "path": "src/builder/library/schema.json",
    "chars": 732,
    "preview": "{\n  \"$schema\": \"http://json-schema.org/draft-07/schema\",\n  \"title\": \"ng-packagr Target\",\n  \"description\": \"ng-packagr ta"
  },
  {
    "path": "src/builder/library/setup-component-data.service.ts",
    "chars": 3326,
    "preview": "import { join, normalize, resolve, strings } from '@angular-devkit/core';\nimport { Inject, Injectable } from 'static-inj"
  },
  {
    "path": "src/builder/library/stylesheet-processor.ts",
    "chars": 436,
    "preview": "import { StylesheetProcessor } from 'ng-packagr/lib/styles/stylesheet-processor';\n\nexport class CustomStyleSheetProcesso"
  },
  {
    "path": "src/builder/library/token.ts",
    "chars": 312,
    "preview": "import { InjectionToken } from 'static-injector';\n\nexport const RESOLVED_DATA_GROUP_TOKEN = new InjectionToken(\n  'RESOL"
  },
  {
    "path": "src/builder/library/type.ts",
    "chars": 528,
    "preview": "export interface ExtraTemplateData {\n  template: string;\n  useComponents?: Record<string, string>;\n  templateName?: stri"
  },
  {
    "path": "src/builder/mini-program-compiler/component-compiler.service.ts",
    "chars": 1051,
    "preview": "import type { R3ComponentMetadata } from '@angular/compiler';\nimport { Inject, Injectable } from 'static-injector';\nimpo"
  },
  {
    "path": "src/builder/mini-program-compiler/index.ts",
    "chars": 138,
    "preview": "export * from './mini-program-compiler.service';\nexport * from './meta-collection';\nexport * from './type';\nexport * fro"
  },
  {
    "path": "src/builder/mini-program-compiler/meta-collection.ts",
    "chars": 472,
    "preview": "import { UseComponent } from './type';\n\nexport class MetaCollection {\n  localPath: Set<UseComponent> = new Set();\n  libr"
  },
  {
    "path": "src/builder/mini-program-compiler/mini-program-compiler.service.ts",
    "chars": 9567,
    "preview": "import type {\n  R3ComponentMetadata,\n  R3DirectiveMetadata,\n  SelectorMatcher,\n} from '@angular/compiler';\nimport type {"
  },
  {
    "path": "src/builder/mini-program-compiler/parse-node/bound-text.ts",
    "chars": 514,
    "preview": "import type { BoundText } from '../../angular-internal/ast.type';\nimport {\n  NgBoundTextMeta,\n  NgNodeKind,\n  NgNodeMeta"
  },
  {
    "path": "src/builder/mini-program-compiler/parse-node/component-context.ts",
    "chars": 3121,
    "preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type {\n  R3ComponentMetadata,\n  R3DirectiveDependencyMeta"
  },
  {
    "path": "src/builder/mini-program-compiler/parse-node/content.ts",
    "chars": 969,
    "preview": "import type { Content } from '../../angular-internal/ast.type';\nimport { NgContentMeta, NgNodeKind, NgNodeMeta, ParsedNo"
  },
  {
    "path": "src/builder/mini-program-compiler/parse-node/element.ts",
    "chars": 2284,
    "preview": "import type { Element } from '../../angular-internal/ast.type';\nimport { ComponentContext } from './component-context';\n"
  },
  {
    "path": "src/builder/mini-program-compiler/parse-node/index.ts",
    "chars": 105,
    "preview": "export * from './component-context';\nexport * from './template-definition';\nexport * from './interface';\n"
  },
  {
    "path": "src/builder/mini-program-compiler/parse-node/interface.ts",
    "chars": 1172,
    "preview": "import type { MatchedComponent, MatchedDirective } from './type';\n\nexport interface ParsedNode<T> {\n  kind: NgNodeKind;\n"
  },
  {
    "path": "src/builder/mini-program-compiler/parse-node/template-definition.ts",
    "chars": 7976,
    "preview": "import type {\n  AST,\n  AstVisitor,\n  Binary,\n  BindingPipe,\n  Call,\n  Chain,\n  Conditional,\n  ImplicitReceiver,\n  Interp"
  },
  {
    "path": "src/builder/mini-program-compiler/parse-node/template.ts",
    "chars": 1045,
    "preview": "import type { Template } from '../../angular-internal/ast.type';\nimport {\n  NgNodeKind,\n  NgNodeMeta,\n  NgTemplateMeta,\n"
  },
  {
    "path": "src/builder/mini-program-compiler/parse-node/text.ts",
    "chars": 496,
    "preview": "import type { Text } from '../../angular-internal/ast.type';\nimport { NgNodeKind, NgNodeMeta, NgTextMeta, ParsedNode } f"
  },
  {
    "path": "src/builder/mini-program-compiler/parse-node/type.ts",
    "chars": 441,
    "preview": "export type MatchedMeta = MatchedComponent | MatchedDirective;\nexport interface MatchedComponent {\n  isComponent: true;\n"
  },
  {
    "path": "src/builder/mini-program-compiler/type.ts",
    "chars": 776,
    "preview": "import { MetaCollection } from './meta-collection';\n\nexport interface ComponentMetaFromLibrary {\n  isComponent: true;\n  "
  },
  {
    "path": "src/builder/platform/bd/bdzn-platform.ts",
    "chars": 727,
    "preview": "import * as fs from 'fs-extra';\nimport * as path from 'path';\nimport { Injectable } from 'static-injector';\nimport { Bui"
  },
  {
    "path": "src/builder/platform/bd/bdzn.transform.ts",
    "chars": 333,
    "preview": "import { Injectable } from 'static-injector';\nimport { WxTransformLike } from '../template-transform-strategy/wx-like/wx"
  },
  {
    "path": "src/builder/platform/dd/dd-platform.ts",
    "chars": 712,
    "preview": "import * as fs from 'fs-extra';\nimport * as path from 'path';\nimport { Injectable } from 'static-injector';\nimport { Bui"
  },
  {
    "path": "src/builder/platform/dd/dd.transform.ts",
    "chars": 231,
    "preview": "import { Injectable } from 'static-injector';\nimport { WxTransformLike } from '../template-transform-strategy/wx-like/wx"
  },
  {
    "path": "src/builder/platform/index.ts",
    "chars": 94,
    "preview": "export * from './platform-inject-config';\nexport * from './type';\nexport * from './platform';\n"
  },
  {
    "path": "src/builder/platform/jd/jd-platform.ts",
    "chars": 712,
    "preview": "import * as fs from 'fs-extra';\nimport * as path from 'path';\nimport { Injectable } from 'static-injector';\nimport { Bui"
  },
  {
    "path": "src/builder/platform/jd/jd.transform.ts",
    "chars": 232,
    "preview": "import { Injectable } from 'static-injector';\nimport { WxTransformLike } from '../template-transform-strategy/wx-like/wx"
  },
  {
    "path": "src/builder/platform/library/library-platform.ts",
    "chars": 659,
    "preview": "import { Injectable } from 'static-injector';\nimport { BuildPlatform } from '../platform';\nimport { LibraryTransform } f"
  },
  {
    "path": "src/builder/platform/library/library.transform.ts",
    "chars": 518,
    "preview": "import { Injectable } from 'static-injector';\nimport {\n  EVENT_PREFIX_REGEXP,\n  WxTransformLike,\n} from '../template-tra"
  },
  {
    "path": "src/builder/platform/platform-inject-config.ts",
    "chars": 2575,
    "preview": "import { BdZnBuildPlatform } from './bd/bdzn-platform';\nimport { BdZnTransform } from './bd/bdzn.transform';\nimport { Dd"
  },
  {
    "path": "src/builder/platform/platform.ts",
    "chars": 645,
    "preview": "import { Injectable } from 'static-injector';\nimport { TemplateTransformBase } from './template-transform-strategy/trans"
  },
  {
    "path": "src/builder/platform/qq/qq-platform.ts",
    "chars": 709,
    "preview": "import * as fs from 'fs-extra';\nimport * as path from 'path';\nimport { Injectable } from 'static-injector';\nimport { Bui"
  },
  {
    "path": "src/builder/platform/qq/qq.transform.ts",
    "chars": 232,
    "preview": "import { Injectable } from 'static-injector';\nimport { WxTransformLike } from '../template-transform-strategy/wx-like/wx"
  },
  {
    "path": "src/builder/platform/template/app-template.js",
    "chars": 1240,
    "preview": "const obj = {\n  Zone: typeof Zone !== 'undefined' && Zone,\n  setTimeout: typeof setTimeout !== 'undefined' && setTimeout"
  },
  {
    "path": "src/builder/platform/template-transform-strategy/transform.base.ts",
    "chars": 685,
    "preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Injectable } from 'static-injector';\nimport type { NgNo"
  },
  {
    "path": "src/builder/platform/template-transform-strategy/wx-like/wx-container.ts",
    "chars": 8811,
    "preview": "import type {\n  NgBoundTextMeta,\n  NgContentMeta,\n  NgElementMeta,\n  NgNodeMeta,\n  NgTemplateMeta,\n  NgTextMeta,\n} from "
  },
  {
    "path": "src/builder/platform/template-transform-strategy/wx-like/wx-transform.base.ts",
    "chars": 2704,
    "preview": "import { strings } from '@angular-devkit/core';\nimport type { NgNodeMeta } from '../../../mini-program-compiler';\nimport"
  },
  {
    "path": "src/builder/platform/type.ts",
    "chars": 140,
    "preview": "export interface PlatformFileExtname {\n  style: string;\n  logic: string;\n  content: string;\n  contentTemplate: string;\n "
  },
  {
    "path": "src/builder/platform/util/dataset-bind.ts",
    "chars": 1704,
    "preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\nexport class DatasetBind {\n  constructor(private data: any) {}\n "
  },
  {
    "path": "src/builder/platform/util/type-predicate.ts",
    "chars": 761,
    "preview": "import {\n  NgBoundTextMeta,\n  NgContentMeta,\n  NgElementMeta,\n  NgNodeKind,\n  NgNodeMeta,\n  NgTemplateMeta,\n  NgTextMeta"
  },
  {
    "path": "src/builder/platform/wx/wx-platform.ts",
    "chars": 712,
    "preview": "import * as fs from 'fs-extra';\nimport * as path from 'path';\nimport { Injectable } from 'static-injector';\nimport { Bui"
  },
  {
    "path": "src/builder/platform/wx/wx.transform.ts",
    "chars": 232,
    "preview": "import { Injectable } from 'static-injector';\nimport { WxTransformLike } from '../template-transform-strategy/wx-like/wx"
  },
  {
    "path": "src/builder/platform/zfb/zfb-platform.ts",
    "chars": 717,
    "preview": "import * as fs from 'fs-extra';\nimport * as path from 'path';\nimport { Injectable } from 'static-injector';\nimport { Bui"
  },
  {
    "path": "src/builder/platform/zfb/zfb.transform.ts",
    "chars": 945,
    "preview": "import { capitalize } from '@angular-devkit/core/src/utils/strings';\nimport { Injectable } from 'static-injector';\nimpor"
  },
  {
    "path": "src/builder/platform/zjtd/zj-platform.ts",
    "chars": 749,
    "preview": "import * as fs from 'fs-extra';\nimport * as path from 'path';\nimport { Injectable } from 'static-injector';\nimport { Bui"
  },
  {
    "path": "src/builder/platform/zjtd/zj.transform.ts",
    "chars": 232,
    "preview": "import { Injectable } from 'static-injector';\nimport { WxTransformLike } from '../template-transform-strategy/wx-like/wx"
  },
  {
    "path": "src/builder/test/fixture/watch/sub3/sub3.component.html",
    "chars": 14,
    "preview": "<div>测试</div>\n"
  },
  {
    "path": "src/builder/test/fixture/watch/sub3/sub3.component.ts",
    "chars": 217,
    "preview": "import { Component, OnInit } from '@angular/core';\n\n@Component({\n  selector: 'app-sub3',\n  templateUrl: './sub3.componen"
  },
  {
    "path": "src/builder/test/fixture/watch/sub3/sub3.entry.ts",
    "chars": 186,
    "preview": "import { pageStartup } from 'angular-miniprogram';\nimport { Sub3Component } from './sub3.component';\nimport { Sub3Module"
  },
  {
    "path": "src/builder/test/fixture/watch/sub3/sub3.module.ts",
    "chars": 254,
    "preview": "import { NgModule } from '@angular/core';\nimport { CommonModule } from 'angular-miniprogram/common';\nimport { Sub3Compon"
  },
  {
    "path": "src/builder/token/component.token.ts",
    "chars": 119,
    "preview": "import { InjectionToken } from 'static-injector';\n\nexport const COMPONENT_META = new InjectionToken('COMPONENT_META');\n"
  },
  {
    "path": "src/builder/util/index.ts",
    "chars": 171,
    "preview": "export * from './library-template-scope-name';\nexport * from './literal-resolve';\nexport * from './load_esm';\nexport * f"
  },
  {
    "path": "src/builder/util/library-template-scope-name.ts",
    "chars": 168,
    "preview": "import { strings } from '@angular-devkit/core';\n\nexport function libraryTemplateScopeName(library: string) {\n  return st"
  },
  {
    "path": "src/builder/util/literal-resolve.ts",
    "chars": 261,
    "preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { runScript } from './run-script';\n\nexport function liter"
  },
  {
    "path": "src/builder/util/load_esm.ts",
    "chars": 696,
    "preview": "async function loadEsmModule<T>(modulePath: string): Promise<T> {\n  const namespaceObject = await new Function(\n    'mod"
  },
  {
    "path": "src/builder/util/raw-updater.spec.ts",
    "chars": 1256,
    "preview": "import { DeleteChange, InsertChange, ReplaceChange } from 'cyia-code-util';\nimport { RawUpdater } from './raw-updater';\n"
  },
  {
    "path": "src/builder/util/raw-updater.ts",
    "chars": 1535,
    "preview": "import {\n  Change,\n  DeleteChange,\n  InsertChange,\n  ReplaceChange,\n} from 'cyia-code-util';\n\nexport class RawUpdater {\n"
  },
  {
    "path": "src/builder/util/run-script.ts",
    "chars": 227,
    "preview": "/* eslint-disable no-console */\nimport vm from 'vm';\n\nexport function runScript(code: string, context?: vm.Context) {\n  "
  },
  {
    "path": "src/library/common/.gitignore",
    "chars": 60,
    "preview": "*\n!.gitignore\n!ng-package.json\n!/http\n!/http/ng-package.json"
  },
  {
    "path": "src/library/common/ng-package.json",
    "chars": 121,
    "preview": "{\n  \"$schema\": \"../../../node_modules/ng-packagr/ng-package.schema.json\",\n  \"lib\": {\n    \"entryFile\": \"./index.ts\"\n  }\n}"
  },
  {
    "path": "src/library/declaration/index.d.ts",
    "chars": 61,
    "preview": "declare const ngDevMode: null | any;\ndeclare const Zone: any\n"
  },
  {
    "path": "src/library/forms/.gitignore",
    "chars": 411,
    "preview": "*\n!.gitignore\n!/src\n!/src/directives\n!/src/directives/default_value_accessor.ts\n!/src/directives/checkbox_value_accessor"
  },
  {
    "path": "src/library/forms/ng-package.json",
    "chars": 121,
    "preview": "{\n  \"$schema\": \"../../../node_modules/ng-packagr/ng-package.schema.json\",\n  \"lib\": {\n    \"entryFile\": \"./index.ts\"\n  }\n}"
  },
  {
    "path": "src/library/forms/readme.md",
    "chars": 3689,
    "preview": "# 表单逻辑\n\n| 组件名         | 输入属性                                                                                            "
  },
  {
    "path": "src/library/forms/src/directives/checkbox_value_accessor.ts",
    "chars": 2478,
    "preview": "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style l"
  },
  {
    "path": "src/library/forms/src/directives/default_value_accessor.ts",
    "chars": 3156,
    "preview": "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style l"
  },
  {
    "path": "src/library/forms/src/directives/picker_value_accessor.ts",
    "chars": 2001,
    "preview": "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style l"
  },
  {
    "path": "src/library/forms/src/directives/picker_view_value_accessor.ts",
    "chars": 1983,
    "preview": "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style l"
  },
  {
    "path": "src/library/forms/src/directives/radio_control_value_accessor.ts",
    "chars": 4864,
    "preview": "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style l"
  },
  {
    "path": "src/library/forms/src/directives/slider_value_accessor.ts",
    "chars": 1967,
    "preview": "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style l"
  },
  {
    "path": "src/library/forms/src/directives/switch_value_accessor.ts",
    "chars": 1971,
    "preview": "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style l"
  },
  {
    "path": "src/library/forms/src/directives.ts",
    "chars": 5022,
    "preview": "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style l"
  },
  {
    "path": "src/library/forms/src/forms.ts",
    "chars": 4038,
    "preview": "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style l"
  },
  {
    "path": "src/library/index.ts",
    "chars": 46,
    "preview": "export * from 'angular-miniprogram/platform';\n"
  },
  {
    "path": "src/library/ng-package.json",
    "chars": 296,
    "preview": "{\n  \"$schema\": \"../node_modules/ng-packagr/ng-package.schema.json\",\n  \"dest\": \"../../dist\",\n  \"deleteDestPath\": true,\n  "
  },
  {
    "path": "src/library/package.json",
    "chars": 1006,
    "preview": "{\n  \"name\": \"angular-miniprogram\",\n  \"version\": \"1.5.2\",\n  \"description\": \"使用Angular开发小程序\",\n  \"keywords\": [\n    \"Angular"
  },
  {
    "path": "src/library/platform/bd/index.ts",
    "chars": 33,
    "preview": "export * from './platform-core';\n"
  },
  {
    "path": "src/library/platform/bd/ng-package.json",
    "chars": 121,
    "preview": "{\n  \"$schema\": \"../../../node_modules/ng-packagr/ng-package.schema.json\",\n  \"lib\": {\n    \"entryFile\": \"./index.ts\"\n  }\n}"
  },
  {
    "path": "src/library/platform/bd/platform-core.ts",
    "chars": 432,
    "preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { MiniProgramCoreFactory as BaseFactory } from 'angular-m"
  },
  {
    "path": "src/library/platform/dd/index.ts",
    "chars": 33,
    "preview": "export * from './platform-core';\n"
  },
  {
    "path": "src/library/platform/dd/ng-package.json",
    "chars": 121,
    "preview": "{\n  \"$schema\": \"../../../node_modules/ng-packagr/ng-package.schema.json\",\n  \"lib\": {\n    \"entryFile\": \"./index.ts\"\n  }\n}"
  },
  {
    "path": "src/library/platform/dd/platform-core.ts",
    "chars": 54,
    "preview": "export * from 'angular-miniprogram/platform/default';\n"
  },
  {
    "path": "src/library/platform/default/agent-node.spec.ts",
    "chars": 2886,
    "preview": "import { AgentNode } from './agent-node';\n\nfunction getAgentNode() {\n  return new AgentNode('element');\n}\ndescribe('Agen"
  },
  {
    "path": "src/library/platform/default/agent-node.ts",
    "chars": 2587,
    "preview": "import type {\n  MPElementData,\n  MPTextData,\n} from 'angular-miniprogram/platform/type';\n\nexport class AgentNode {\n  sel"
  },
  {
    "path": "src/library/platform/default/component-finder.service.ts",
    "chars": 850,
    "preview": "import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class ComponentFinderService<T = unknown> {\n  private "
  },
  {
    "path": "src/library/platform/default/component-template-hook.factory.ts",
    "chars": 5897,
    "preview": "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { ComponentRef, NgZone } from '@angular/core';\nimport { L"
  },
  {
    "path": "src/library/platform/default/diff-node-data.spec.ts",
    "chars": 1400,
    "preview": "import { diffNodeData } from './diff-node-data';\n\ndescribe('diffNodeData', () => {\n  it('基础', () => {\n    expect(diffNod"
  },
  {
    "path": "src/library/platform/default/diff-node-data.ts",
    "chars": 3186,
    "preview": "interface DiffResult {\n  allChange: boolean;\n  object?: Record<string, unknown>;\n}\nfunction _arrayOrObjectItemDiff(\n  co"
  },
  {
    "path": "src/library/platform/default/index.ts",
    "chars": 260,
    "preview": "export * from './platform-core';\nexport * from './token';\nexport * from './mini-program.renderer';\nexport * from './mini"
  },
  {
    "path": "src/library/platform/default/mini-program.renderer.factory.ts",
    "chars": 629,
    "preview": "import {\n  Injectable,\n  Renderer2,\n  RendererFactory2,\n  RendererType2,\n} from '@angular/core';\nimport { AgentNode } fr"
  },
  {
    "path": "src/library/platform/default/mini-program.renderer.ts",
    "chars": 2688,
    "preview": "import { Renderer2, RendererStyleFlags2 } from '@angular/core';\nimport { AgentNode } from './agent-node';\n\nexport class "
  },
  {
    "path": "src/library/platform/default/ng-package.json",
    "chars": 121,
    "preview": "{\n  \"$schema\": \"../../../node_modules/ng-packagr/ng-package.schema.json\",\n  \"lib\": {\n    \"entryFile\": \"./index.ts\"\n  }\n}"
  }
]

// ... and 297 more files (download for full content)

About this extraction

This page contains the full source code of the wszgrcy/angular-miniprogram GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 497 files (549.0 KB), approximately 150.4k tokens, and a symbol index with 859 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!