@nrwl/angular 13.1.1 → 13.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/{esm2015/nrwl-angular.js → esm2020/nrwl-angular.mjs} +0 -0
- package/esm2020/src/runtime/nx/data-persistence.mjs +327 -0
- package/esm2020/src/runtime/nx/nx.module.mjs +21 -0
- package/esm2020/testing/index.mjs +19 -0
- package/{esm2015/testing/nrwl-angular-testing.js → esm2020/testing/nrwl-angular-testing.mjs} +0 -0
- package/{esm2015/testing/src/testing-utils.js → esm2020/testing/src/testing-utils.mjs} +0 -0
- package/fesm2015/{nrwl-angular-testing.js → nrwl-angular-testing.mjs} +19 -3
- package/fesm2015/nrwl-angular-testing.mjs.map +1 -0
- package/fesm2015/{nrwl-angular.js → nrwl-angular.mjs} +16 -13
- package/fesm2015/nrwl-angular.mjs.map +1 -0
- package/fesm2020/nrwl-angular-testing.mjs +56 -0
- package/fesm2020/nrwl-angular-testing.mjs.map +1 -0
- package/fesm2020/nrwl-angular.mjs +351 -0
- package/fesm2020/nrwl-angular.mjs.map +1 -0
- package/generators.js +16 -16
- package/generators.js.map +1 -1
- package/migrations.json +161 -0
- package/ng-package.json +3 -9
- package/nrwl-angular.d.ts +1 -0
- package/package.json +40 -15
- package/src/builders/webpack-browser/schema.json +4 -9
- package/src/builders/webpack-browser/webpack-browser.impl.d.ts +1 -1
- package/src/builders/webpack-browser/webpack-browser.impl.js +12 -12
- package/src/builders/webpack-browser/webpack-browser.impl.js.map +1 -1
- package/src/builders/webpack-server/lib/index.js +1 -1
- package/src/builders/webpack-server/lib/index.js.map +1 -1
- package/src/builders/webpack-server/schema.d.ts +0 -12
- package/src/builders/webpack-server/schema.json +0 -104
- package/src/builders/webpack-server/webpack-server.impl.d.ts +1 -1
- package/src/builders/webpack-server/webpack-server.impl.js +10 -10
- package/src/builders/webpack-server/webpack-server.impl.js.map +1 -1
- package/src/executors/delegate-build/compat.js +1 -1
- package/src/executors/delegate-build/compat.js.map +1 -1
- package/src/executors/delegate-build/delegate-build.impl.js +8 -8
- package/src/executors/delegate-build/delegate-build.impl.js.map +1 -1
- package/src/executors/ng-packagr-lite/compat.js +1 -1
- package/src/executors/ng-packagr-lite/compat.js.map +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/compile-ngc.d.ts +4 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/compile-ngc.js +22 -15
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/compile-ngc.js.map +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/compile-source-files.d.ts +12 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/compile-source-files.js +147 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/compile-source-files.js.map +1 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/entry-point.d.ts +3 -3
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/entry-point.di.js +2 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/entry-point.di.js.map +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/entry-point.js +7 -7
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/entry-point.js.map +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/package.di.d.ts +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/package.di.js +5 -9
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/package.di.js.map +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/write-package.d.ts +2 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/write-package.di.d.ts +2 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/write-package.di.js +4 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/write-package.di.js.map +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/write-package.js +31 -29
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/write-package.js.map +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-lite.impl.js +6 -6
- package/src/executors/ng-packagr-lite/ng-packagr-lite.impl.js.map +1 -1
- package/src/executors/package/compat.js +1 -1
- package/src/executors/package/compat.js.map +1 -1
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.di.js +1 -1
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.di.js.map +1 -1
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.js +19 -42
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.js.map +1 -1
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/entry-point.di.js +1 -1
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/entry-point.di.js.map +1 -1
- package/src/executors/package/ng-packagr-adjustments/ng-package/package.di.js +1 -2
- package/src/executors/package/ng-packagr-adjustments/ng-package/package.di.js.map +1 -1
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.d.ts +19 -15
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.js +208 -40
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.js.map +1 -1
- package/src/executors/package/ng-packagr-adjustments/utilities/tailwindcss.js +3 -3
- package/src/executors/package/ng-packagr-adjustments/utilities/tailwindcss.js.map +1 -1
- package/src/executors/package/package.impl.js +15 -32
- package/src/executors/package/package.impl.js.map +1 -1
- package/src/generators/add-linting/add-linting.js +6 -6
- package/src/generators/add-linting/add-linting.js.map +1 -1
- package/src/generators/add-linting/compat.js +1 -1
- package/src/generators/add-linting/compat.js.map +1 -1
- package/src/generators/add-linting/lib/add-angular-eslint-dependencies.js +1 -1
- package/src/generators/add-linting/lib/add-angular-eslint-dependencies.js.map +1 -1
- package/src/generators/add-linting/lib/add-project-lint-target.js +2 -2
- package/src/generators/add-linting/lib/add-project-lint-target.js.map +1 -1
- package/src/generators/add-linting/lib/create-eslint-configuration.js +2 -2
- package/src/generators/add-linting/lib/create-eslint-configuration.js.map +1 -1
- package/src/generators/application/application.compat.js +1 -1
- package/src/generators/application/application.compat.js.map +1 -1
- package/src/generators/application/application.js +23 -23
- package/src/generators/application/application.js.map +1 -1
- package/src/generators/application/lib/add-e2e.js +8 -8
- package/src/generators/application/lib/add-e2e.js.map +1 -1
- package/src/generators/application/lib/add-linting.js +2 -2
- package/src/generators/application/lib/add-linting.js.map +1 -1
- package/src/generators/application/lib/add-mfe.js +2 -2
- package/src/generators/application/lib/add-mfe.js.map +1 -1
- package/src/generators/application/lib/add-protractor.js +5 -5
- package/src/generators/application/lib/add-protractor.js.map +1 -1
- package/src/generators/application/lib/add-proxy-config.js +3 -3
- package/src/generators/application/lib/add-proxy-config.js.map +1 -1
- package/src/generators/application/lib/add-unit-test-runner.js +3 -3
- package/src/generators/application/lib/add-unit-test-runner.js.map +1 -1
- package/src/generators/application/lib/create-files.js +1 -1
- package/src/generators/application/lib/create-files.js.map +1 -1
- package/src/generators/application/lib/enable-strict-type-checking.js +1 -1
- package/src/generators/application/lib/enable-strict-type-checking.js.map +1 -1
- package/src/generators/application/lib/index.js +19 -19
- package/src/generators/application/lib/index.js.map +1 -1
- package/src/generators/application/lib/normalize-options.js +6 -6
- package/src/generators/application/lib/normalize-options.js.map +1 -1
- package/src/generators/application/lib/remove-scaffolded-e2e.js +2 -2
- package/src/generators/application/lib/remove-scaffolded-e2e.js.map +1 -1
- package/src/generators/application/lib/root-router-config.js +2 -2
- package/src/generators/application/lib/root-router-config.js.map +1 -1
- package/src/generators/application/lib/set-app-strict-default.js +2 -2
- package/src/generators/application/lib/set-app-strict-default.js.map +1 -1
- package/src/generators/application/lib/update-component-spec.js +2 -2
- package/src/generators/application/lib/update-component-spec.js.map +1 -1
- package/src/generators/application/lib/update-component-styles.js +2 -2
- package/src/generators/application/lib/update-component-styles.js.map +1 -1
- package/src/generators/application/lib/update-component-template.js +2 -2
- package/src/generators/application/lib/update-component-template.js.map +1 -1
- package/src/generators/application/lib/update-config-files.js +13 -11
- package/src/generators/application/lib/update-config-files.js.map +1 -1
- package/src/generators/application/lib/update-e2e-project.js +7 -7
- package/src/generators/application/lib/update-e2e-project.js.map +1 -1
- package/src/generators/application/lib/update-editor-tsconfig.js +1 -1
- package/src/generators/application/lib/update-editor-tsconfig.js.map +1 -1
- package/src/generators/component-cypress-spec/compat.js +1 -1
- package/src/generators/component-cypress-spec/compat.js.map +1 -1
- package/src/generators/component-cypress-spec/component-cypress-spec.js +9 -9
- package/src/generators/component-cypress-spec/component-cypress-spec.js.map +1 -1
- package/src/generators/component-cypress-spec/lib/get-component-selector.js +3 -3
- package/src/generators/component-cypress-spec/lib/get-component-selector.js.map +1 -1
- package/src/generators/component-story/compat.js +1 -1
- package/src/generators/component-story/compat.js.map +1 -1
- package/src/generators/component-story/component-story.js +5 -5
- package/src/generators/component-story/component-story.js.map +1 -1
- package/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.js +8 -8
- package/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.js.map +1 -1
- package/src/generators/downgrade-module/compat.js +1 -1
- package/src/generators/downgrade-module/compat.js.map +1 -1
- package/src/generators/downgrade-module/downgrade-module.js +7 -7
- package/src/generators/downgrade-module/downgrade-module.js.map +1 -1
- package/src/generators/downgrade-module/lib/add-entry-components-to-module.js +2 -2
- package/src/generators/downgrade-module/lib/add-entry-components-to-module.js.map +1 -1
- package/src/generators/downgrade-module/lib/index.js +4 -4
- package/src/generators/downgrade-module/lib/index.js.map +1 -1
- package/src/generators/downgrade-module/lib/update-main.js +2 -2
- package/src/generators/downgrade-module/lib/update-main.js.map +1 -1
- package/src/generators/downgrade-module/lib/update-module-bootstrap.js +3 -3
- package/src/generators/downgrade-module/lib/update-module-bootstrap.js.map +1 -1
- package/src/generators/init/init.compat.js +1 -1
- package/src/generators/init/init.compat.js.map +1 -1
- package/src/generators/init/init.d.ts +1 -1
- package/src/generators/init/init.js +25 -13
- package/src/generators/init/init.js.map +1 -1
- package/src/generators/karma/compat.js +1 -1
- package/src/generators/karma/compat.js.map +1 -1
- package/src/generators/karma/karma.js +3 -3
- package/src/generators/karma/karma.js.map +1 -1
- package/src/generators/karma-project/compat.js +1 -1
- package/src/generators/karma-project/compat.js.map +1 -1
- package/src/generators/karma-project/karma-project.js +6 -6
- package/src/generators/karma-project/karma-project.js.map +1 -1
- package/src/generators/karma-project/lib/check-test-target.js +1 -1
- package/src/generators/karma-project/lib/check-test-target.js.map +1 -1
- package/src/generators/karma-project/lib/generate-karma-project-files.js +3 -3
- package/src/generators/karma-project/lib/generate-karma-project-files.js.map +1 -1
- package/src/generators/karma-project/lib/update-tsconfig.js +3 -3
- package/src/generators/karma-project/lib/update-tsconfig.js.map +1 -1
- package/src/generators/karma-project/lib/update-workspace-config.js +7 -7
- package/src/generators/karma-project/lib/update-workspace-config.js.map +1 -1
- package/src/generators/library/lib/add-children.js +4 -4
- package/src/generators/library/lib/add-children.js.map +1 -1
- package/src/generators/library/lib/add-lazy-loaded-router-configuration.js +2 -2
- package/src/generators/library/lib/add-lazy-loaded-router-configuration.js.map +1 -1
- package/src/generators/library/lib/add-load-children.js +3 -3
- package/src/generators/library/lib/add-load-children.js.map +1 -1
- package/src/generators/library/lib/add-module.js +4 -4
- package/src/generators/library/lib/add-module.js.map +1 -1
- package/src/generators/library/lib/add-router-configuration.js +4 -4
- package/src/generators/library/lib/add-router-configuration.js.map +1 -1
- package/src/generators/library/lib/enable-strict-type-checking.js +3 -3
- package/src/generators/library/lib/enable-strict-type-checking.js.map +1 -1
- package/src/generators/library/lib/normalize-options.js +6 -6
- package/src/generators/library/lib/normalize-options.js.map +1 -1
- package/src/generators/library/lib/update-lib-package-npm-scope.js +1 -1
- package/src/generators/library/lib/update-lib-package-npm-scope.js.map +1 -1
- package/src/generators/library/lib/update-ng-package.js +3 -3
- package/src/generators/library/lib/update-ng-package.js.map +1 -1
- package/src/generators/library/lib/update-project.js +10 -10
- package/src/generators/library/lib/update-project.js.map +1 -1
- package/src/generators/library/lib/update-tsconfig.js +11 -8
- package/src/generators/library/lib/update-tsconfig.js.map +1 -1
- package/src/generators/library/library.compat.js +1 -1
- package/src/generators/library/library.compat.js.map +1 -1
- package/src/generators/library/library.js +20 -23
- package/src/generators/library/library.js.map +1 -1
- package/src/generators/library/schema.d.ts +0 -2
- package/src/generators/library/schema.json +0 -5
- package/src/generators/library-secondary-entry-point/compat.js +1 -1
- package/src/generators/library-secondary-entry-point/compat.js.map +1 -1
- package/src/generators/library-secondary-entry-point/lib/add-files.js +3 -3
- package/src/generators/library-secondary-entry-point/lib/add-files.js.map +1 -1
- package/src/generators/library-secondary-entry-point/lib/add-path-mapping.js +1 -1
- package/src/generators/library-secondary-entry-point/lib/add-path-mapping.js.map +1 -1
- package/src/generators/library-secondary-entry-point/lib/index.js +4 -4
- package/src/generators/library-secondary-entry-point/lib/index.js.map +1 -1
- package/src/generators/library-secondary-entry-point/lib/normalize-options.js +4 -4
- package/src/generators/library-secondary-entry-point/lib/normalize-options.js.map +1 -1
- package/src/generators/library-secondary-entry-point/lib/update-linting-file-patterns.js +1 -1
- package/src/generators/library-secondary-entry-point/lib/update-linting-file-patterns.js.map +1 -1
- package/src/generators/library-secondary-entry-point/library-secondary-entry-point.js +6 -6
- package/src/generators/library-secondary-entry-point/library-secondary-entry-point.js.map +1 -1
- package/src/generators/move/lib/update-module-name.js +7 -7
- package/src/generators/move/lib/update-module-name.js.map +1 -1
- package/src/generators/move/lib/update-ng-package.js +4 -4
- package/src/generators/move/lib/update-ng-package.js.map +1 -1
- package/src/generators/move/move.js +6 -6
- package/src/generators/move/move.js.map +1 -1
- package/src/generators/ngrx/compat.js +1 -1
- package/src/generators/ngrx/compat.js.map +1 -1
- package/src/generators/ngrx/files/classes-syntax/__directory__/__fileName__.effects.spec.ts__tmpl__ +1 -1
- package/src/generators/ngrx/files/creator-syntax/__directory__/__fileName__.effects.spec.ts__tmpl__ +1 -1
- package/src/generators/ngrx/lib/add-exports-barrel.js +9 -9
- package/src/generators/ngrx/lib/add-exports-barrel.js.map +1 -1
- package/src/generators/ngrx/lib/add-imports-to-module.js +21 -21
- package/src/generators/ngrx/lib/add-imports-to-module.js.map +1 -1
- package/src/generators/ngrx/lib/add-ngrx-to-package-json.js +12 -1
- package/src/generators/ngrx/lib/add-ngrx-to-package-json.js.map +1 -1
- package/src/generators/ngrx/lib/generate-files.js +5 -5
- package/src/generators/ngrx/lib/generate-files.js.map +1 -1
- package/src/generators/ngrx/lib/normalize-options.js +1 -1
- package/src/generators/ngrx/lib/normalize-options.js.map +1 -1
- package/src/generators/ngrx/ngrx.js +7 -7
- package/src/generators/ngrx/ngrx.js.map +1 -1
- package/src/generators/setup-mfe/lib/add-entry-module.js +2 -2
- package/src/generators/setup-mfe/lib/add-entry-module.js.map +1 -1
- package/src/generators/setup-mfe/lib/add-implicit-deps.js +2 -2
- package/src/generators/setup-mfe/lib/add-implicit-deps.js.map +1 -1
- package/src/generators/setup-mfe/lib/add-remote-to-host.js +5 -5
- package/src/generators/setup-mfe/lib/add-remote-to-host.js.map +1 -1
- package/src/generators/setup-mfe/lib/change-build-target.js +2 -2
- package/src/generators/setup-mfe/lib/change-build-target.js.map +1 -1
- package/src/generators/setup-mfe/lib/fix-bootstrap.js +2 -2
- package/src/generators/setup-mfe/lib/fix-bootstrap.js.map +1 -1
- package/src/generators/setup-mfe/lib/generate-config.js +2 -2
- package/src/generators/setup-mfe/lib/generate-config.js.map +1 -1
- package/src/generators/setup-mfe/lib/get-remotes-with-ports.js +1 -1
- package/src/generators/setup-mfe/lib/get-remotes-with-ports.js.map +1 -1
- package/src/generators/setup-mfe/lib/index.js +8 -8
- package/src/generators/setup-mfe/lib/index.js.map +1 -1
- package/src/generators/setup-mfe/lib/setup-serve-target.js +4 -4
- package/src/generators/setup-mfe/lib/setup-serve-target.js.map +1 -1
- package/src/generators/setup-mfe/setup-mfe.compat.js +1 -1
- package/src/generators/setup-mfe/setup-mfe.compat.js.map +1 -1
- package/src/generators/setup-mfe/setup-mfe.js +12 -12
- package/src/generators/setup-mfe/setup-mfe.js.map +1 -1
- package/src/generators/stories/compat.js +1 -1
- package/src/generators/stories/compat.js.map +1 -1
- package/src/generators/stories/lib/component-info.js +7 -7
- package/src/generators/stories/lib/component-info.js.map +1 -1
- package/src/generators/stories/lib/get-e2e-project.js +1 -1
- package/src/generators/stories/lib/get-e2e-project.js.map +1 -1
- package/src/generators/stories/lib/module-info.js +46 -10
- package/src/generators/stories/lib/module-info.js.map +1 -1
- package/src/generators/stories/lib/tree-utilities.js +2 -2
- package/src/generators/stories/lib/tree-utilities.js.map +1 -1
- package/src/generators/stories/stories.js +6 -6
- package/src/generators/stories/stories.js.map +1 -1
- package/src/generators/storybook-configuration/compat.js +1 -1
- package/src/generators/storybook-configuration/compat.js.map +1 -1
- package/src/generators/storybook-configuration/lib/assert-compatible-storybook-version.js +1 -1
- package/src/generators/storybook-configuration/lib/assert-compatible-storybook-version.js.map +1 -1
- package/src/generators/storybook-configuration/lib/generate-stories.js +3 -3
- package/src/generators/storybook-configuration/lib/generate-stories.js.map +1 -1
- package/src/generators/storybook-configuration/lib/generate-storybook-configuration.js +2 -2
- package/src/generators/storybook-configuration/lib/generate-storybook-configuration.js.map +1 -1
- package/src/generators/storybook-configuration/storybook-configuration.js +5 -5
- package/src/generators/storybook-configuration/storybook-configuration.js.map +1 -1
- package/src/generators/storybook-migrate-defaults-5-to-6/compat.js +1 -1
- package/src/generators/storybook-migrate-defaults-5-to-6/compat.js.map +1 -1
- package/src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6.js +1 -1
- package/src/generators/storybook-migrate-defaults-5-to-6/storybook-migrate-defaults-5-to-6.js.map +1 -1
- package/src/generators/storybook-migrate-stories-to-6-2/compat.js +1 -1
- package/src/generators/storybook-migrate-stories-to-6-2/compat.js.map +1 -1
- package/src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2.js +2 -2
- package/src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2.js.map +1 -1
- package/src/generators/upgrade-module/compat.js +1 -1
- package/src/generators/upgrade-module/compat.js.map +1 -1
- package/src/generators/upgrade-module/lib/add-imports-to-module.js +7 -7
- package/src/generators/upgrade-module/lib/add-imports-to-module.js.map +1 -1
- package/src/generators/upgrade-module/lib/create-files.js +3 -3
- package/src/generators/upgrade-module/lib/create-files.js.map +1 -1
- package/src/generators/upgrade-module/lib/index.js +4 -4
- package/src/generators/upgrade-module/lib/index.js.map +1 -1
- package/src/generators/upgrade-module/lib/update-module-bootstrap.js +5 -5
- package/src/generators/upgrade-module/lib/update-module-bootstrap.js.map +1 -1
- package/src/generators/upgrade-module/upgrade-module.js +7 -7
- package/src/generators/upgrade-module/upgrade-module.js.map +1 -1
- package/src/generators/utils/index.d.ts +1 -0
- package/src/generators/utils/index.js +5 -0
- package/src/generators/utils/index.js.map +1 -0
- package/src/generators/utils/insert-ngmodule-import.js +15 -15
- package/src/generators/utils/insert-ngmodule-import.js.map +1 -1
- package/src/generators/utils/storybook.js +4 -4
- package/src/generators/utils/storybook.js.map +1 -1
- package/src/generators/utils/testing.js +44 -6
- package/src/generators/utils/testing.js.map +1 -1
- package/src/generators/utils/upgrade.js +2 -2
- package/src/generators/utils/upgrade.js.map +1 -1
- package/src/generators/web-worker/compat.js +1 -1
- package/src/generators/web-worker/compat.js.map +1 -1
- package/src/generators/web-worker/lib/index.js +2 -2
- package/src/generators/web-worker/lib/index.js.map +1 -1
- package/src/generators/web-worker/lib/update-tsconfig.js +4 -4
- package/src/generators/web-worker/lib/update-tsconfig.js.map +1 -1
- package/src/generators/web-worker/web-worker.js +6 -6
- package/src/generators/web-worker/web-worker.js.map +1 -1
- package/src/migrations/update-10-0-0/update-10-0-0.js +5 -5
- package/src/migrations/update-10-0-0/update-10-0-0.js.map +1 -1
- package/src/migrations/update-10-2-0/update-10-2-0.js +4 -4
- package/src/migrations/update-10-2-0/update-10-2-0.js.map +1 -1
- package/src/migrations/update-10-3-0/update-10-3-0.js +15 -15
- package/src/migrations/update-10-3-0/update-10-3-0.js.map +1 -1
- package/src/migrations/update-10-4-0/update-10-4-0.js +9 -9
- package/src/migrations/update-10-4-0/update-10-4-0.js.map +1 -1
- package/src/migrations/update-10-5-0/add-template-support-and-presets-to-eslint.js +11 -11
- package/src/migrations/update-10-5-0/add-template-support-and-presets-to-eslint.js.map +1 -1
- package/src/migrations/update-11-0-0/update-builders-config.js +5 -5
- package/src/migrations/update-11-0-0/update-builders-config.js.map +1 -1
- package/src/migrations/update-12-0-0/update-ngcc-postinstall.js +2 -2
- package/src/migrations/update-12-0-0/update-ngcc-postinstall.js.map +1 -1
- package/src/migrations/update-12-3-0/convert-webpack-browser-build-target-to-delegate-build.js +10 -10
- package/src/migrations/update-12-3-0/convert-webpack-browser-build-target-to-delegate-build.js.map +1 -1
- package/src/migrations/update-12-3-0/update-angular-eslint-rules.js +5 -5
- package/src/migrations/update-12-3-0/update-angular-eslint-rules.js.map +1 -1
- package/src/migrations/update-12-3-0/update-storybook.js +8 -8
- package/src/migrations/update-12-3-0/update-storybook.js.map +1 -1
- package/src/migrations/update-12-3-0/update-webpack-browser-config.js +4 -4
- package/src/migrations/update-12-3-0/update-webpack-browser-config.js.map +1 -1
- package/src/migrations/update-12-9-0/update-invalid-import-paths.js +12 -12
- package/src/migrations/update-12-9-0/update-invalid-import-paths.js.map +1 -1
- package/src/migrations/update-13-0-0/add-postcss-packages.js +4 -4
- package/src/migrations/update-13-0-0/add-postcss-packages.js.map +1 -1
- package/src/migrations/update-13-2-0/update-angular-config.d.ts +2 -0
- package/src/migrations/update-13-2-0/update-angular-config.js +21 -0
- package/src/migrations/update-13-2-0/update-angular-config.js.map +1 -0
- package/src/migrations/update-13-2-0/update-angular-jest-config.d.ts +3 -0
- package/src/migrations/update-13-2-0/update-angular-jest-config.js +65 -0
- package/src/migrations/update-13-2-0/update-angular-jest-config.js.map +1 -0
- package/src/migrations/update-13-2-0/update-libraries.d.ts +2 -0
- package/src/migrations/update-13-2-0/update-libraries.js +59 -0
- package/src/migrations/update-13-2-0/update-libraries.js.map +1 -0
- package/src/migrations/update-13-2-0/update-testing-imports.d.ts +2 -0
- package/src/migrations/update-13-2-0/update-testing-imports.js +95 -0
- package/src/migrations/update-13-2-0/update-testing-imports.js.map +1 -0
- package/src/migrations/update-8-12-0/change-angular-lib-builder.js +3 -3
- package/src/migrations/update-8-12-0/change-angular-lib-builder.js.map +1 -1
- package/src/migrations/update-8-3-0/upgrade-ngrx-8-0.js +11 -11
- package/src/migrations/update-8-3-0/upgrade-ngrx-8-0.js.map +1 -1
- package/src/migrations/update-8-5-0/upgrade-cli-8-3.js +13 -13
- package/src/migrations/update-8-5-0/upgrade-cli-8-3.js.map +1 -1
- package/src/migrations/update-9-0-0/add-postinstall.js +3 -3
- package/src/migrations/update-9-0-0/add-postinstall.js.map +1 -1
- package/src/migrations/update-9-0-0/update-9-0-0.js +5 -5
- package/src/migrations/update-9-0-0/update-9-0-0.js.map +1 -1
- package/src/runtime/nx/data-persistence.js +20 -20
- package/src/runtime/nx/data-persistence.js.map +1 -1
- package/src/runtime/nx/nx.module.js +2 -2
- package/src/runtime/nx/nx.module.js.map +1 -1
- package/src/utils/nx-devkit/ast-utils.js +13 -13
- package/src/utils/nx-devkit/ast-utils.js.map +1 -1
- package/src/utils/nx-devkit/testing.js +2 -2
- package/src/utils/nx-devkit/testing.js.map +1 -1
- package/src/utils/testing.js +6 -6
- package/src/utils/testing.js.map +1 -1
- package/src/utils/versions.d.ts +6 -7
- package/src/utils/versions.js +8 -9
- package/src/utils/versions.js.map +1 -1
- package/tailwind.js +1 -1
- package/tailwind.js.map +1 -1
- package/testing/index.d.ts +17 -1
- package/testing/index.js +17 -5
- package/testing/index.js.map +1 -1
- package/testing/nrwl-angular-testing.d.ts +1 -0
- package/testing/package.json +7 -6
- package/testing/src/testing-utils.js +2 -2
- package/testing/src/testing-utils.js.map +1 -1
- package/bundles/nrwl-angular-testing.umd.js +0 -72
- package/bundles/nrwl-angular-testing.umd.js.map +0 -1
- package/bundles/nrwl-angular.umd.js +0 -690
- package/bundles/nrwl-angular.umd.js.map +0 -1
- package/esm2015/src/runtime/nx/data-persistence.js +0 -327
- package/esm2015/src/runtime/nx/nx.module.js +0 -16
- package/esm2015/testing/index.js +0 -3
- package/fesm2015/nrwl-angular-testing.js.map +0 -1
- package/fesm2015/nrwl-angular.js.map +0 -1
- package/nrwl-angular.metadata.json +0 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/init-tsconfig.d.ts +0 -10
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/init-tsconfig.js +0 -28
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/init-tsconfig.js.map +0 -1
- package/src/executors/package/ng-packagr-adjustments/ivy/styles/stylesheet-processor.d.ts +0 -30
- package/src/executors/package/ng-packagr-adjustments/ivy/styles/stylesheet-processor.js +0 -189
- package/src/executors/package/ng-packagr-adjustments/ivy/styles/stylesheet-processor.js.map +0 -1
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor-worker.d.ts +0 -9
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor-worker.js +0 -178
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor-worker.js.map +0 -1
- package/testing/nrwl-angular-testing.metadata.json +0 -1
|
@@ -1,690 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@ngrx/effects'), require('@ngrx/router-store'), require('@ngrx/store'), require('rxjs'), require('rxjs/operators')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@nrwl/angular', ['exports', '@angular/core', '@ngrx/effects', '@ngrx/router-store', '@ngrx/store', 'rxjs', 'rxjs/operators'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.nrwl = global.nrwl || {}, global.nrwl.angular = {}), global.ng.core, global.ngrx.effects, global.ngrx.routerStore, global.ngrx.store, global.rxjs, global.rxjs.operators));
|
|
5
|
-
}(this, (function (exports, core, effects, routerStore, store, rxjs, operators) { 'use strict';
|
|
6
|
-
|
|
7
|
-
/*! *****************************************************************************
|
|
8
|
-
Copyright (c) Microsoft Corporation.
|
|
9
|
-
|
|
10
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
-
purpose with or without fee is hereby granted.
|
|
12
|
-
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
-
***************************************************************************** */
|
|
21
|
-
/* global Reflect, Promise */
|
|
22
|
-
var extendStatics = function (d, b) {
|
|
23
|
-
extendStatics = Object.setPrototypeOf ||
|
|
24
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
25
|
-
function (d, b) { for (var p in b)
|
|
26
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
27
|
-
d[p] = b[p]; };
|
|
28
|
-
return extendStatics(d, b);
|
|
29
|
-
};
|
|
30
|
-
function __extends(d, b) {
|
|
31
|
-
if (typeof b !== "function" && b !== null)
|
|
32
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
33
|
-
extendStatics(d, b);
|
|
34
|
-
function __() { this.constructor = d; }
|
|
35
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
36
|
-
}
|
|
37
|
-
var __assign = function () {
|
|
38
|
-
__assign = Object.assign || function __assign(t) {
|
|
39
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
40
|
-
s = arguments[i];
|
|
41
|
-
for (var p in s)
|
|
42
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
43
|
-
t[p] = s[p];
|
|
44
|
-
}
|
|
45
|
-
return t;
|
|
46
|
-
};
|
|
47
|
-
return __assign.apply(this, arguments);
|
|
48
|
-
};
|
|
49
|
-
function __rest(s, e) {
|
|
50
|
-
var t = {};
|
|
51
|
-
for (var p in s)
|
|
52
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
53
|
-
t[p] = s[p];
|
|
54
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
55
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
56
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
57
|
-
t[p[i]] = s[p[i]];
|
|
58
|
-
}
|
|
59
|
-
return t;
|
|
60
|
-
}
|
|
61
|
-
function __decorate(decorators, target, key, desc) {
|
|
62
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
63
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
64
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
65
|
-
else
|
|
66
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
67
|
-
if (d = decorators[i])
|
|
68
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
69
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
70
|
-
}
|
|
71
|
-
function __param(paramIndex, decorator) {
|
|
72
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
73
|
-
}
|
|
74
|
-
function __metadata(metadataKey, metadataValue) {
|
|
75
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
76
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
77
|
-
}
|
|
78
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
79
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
80
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
81
|
-
function fulfilled(value) { try {
|
|
82
|
-
step(generator.next(value));
|
|
83
|
-
}
|
|
84
|
-
catch (e) {
|
|
85
|
-
reject(e);
|
|
86
|
-
} }
|
|
87
|
-
function rejected(value) { try {
|
|
88
|
-
step(generator["throw"](value));
|
|
89
|
-
}
|
|
90
|
-
catch (e) {
|
|
91
|
-
reject(e);
|
|
92
|
-
} }
|
|
93
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
94
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
function __generator(thisArg, body) {
|
|
98
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
99
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
100
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
101
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
102
|
-
function step(op) {
|
|
103
|
-
if (f)
|
|
104
|
-
throw new TypeError("Generator is already executing.");
|
|
105
|
-
while (_)
|
|
106
|
-
try {
|
|
107
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
108
|
-
return t;
|
|
109
|
-
if (y = 0, t)
|
|
110
|
-
op = [op[0] & 2, t.value];
|
|
111
|
-
switch (op[0]) {
|
|
112
|
-
case 0:
|
|
113
|
-
case 1:
|
|
114
|
-
t = op;
|
|
115
|
-
break;
|
|
116
|
-
case 4:
|
|
117
|
-
_.label++;
|
|
118
|
-
return { value: op[1], done: false };
|
|
119
|
-
case 5:
|
|
120
|
-
_.label++;
|
|
121
|
-
y = op[1];
|
|
122
|
-
op = [0];
|
|
123
|
-
continue;
|
|
124
|
-
case 7:
|
|
125
|
-
op = _.ops.pop();
|
|
126
|
-
_.trys.pop();
|
|
127
|
-
continue;
|
|
128
|
-
default:
|
|
129
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
130
|
-
_ = 0;
|
|
131
|
-
continue;
|
|
132
|
-
}
|
|
133
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
134
|
-
_.label = op[1];
|
|
135
|
-
break;
|
|
136
|
-
}
|
|
137
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
138
|
-
_.label = t[1];
|
|
139
|
-
t = op;
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
if (t && _.label < t[2]) {
|
|
143
|
-
_.label = t[2];
|
|
144
|
-
_.ops.push(op);
|
|
145
|
-
break;
|
|
146
|
-
}
|
|
147
|
-
if (t[2])
|
|
148
|
-
_.ops.pop();
|
|
149
|
-
_.trys.pop();
|
|
150
|
-
continue;
|
|
151
|
-
}
|
|
152
|
-
op = body.call(thisArg, _);
|
|
153
|
-
}
|
|
154
|
-
catch (e) {
|
|
155
|
-
op = [6, e];
|
|
156
|
-
y = 0;
|
|
157
|
-
}
|
|
158
|
-
finally {
|
|
159
|
-
f = t = 0;
|
|
160
|
-
}
|
|
161
|
-
if (op[0] & 5)
|
|
162
|
-
throw op[1];
|
|
163
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
167
|
-
if (k2 === undefined)
|
|
168
|
-
k2 = k;
|
|
169
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
170
|
-
}) : (function (o, m, k, k2) {
|
|
171
|
-
if (k2 === undefined)
|
|
172
|
-
k2 = k;
|
|
173
|
-
o[k2] = m[k];
|
|
174
|
-
});
|
|
175
|
-
function __exportStar(m, o) {
|
|
176
|
-
for (var p in m)
|
|
177
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
178
|
-
__createBinding(o, m, p);
|
|
179
|
-
}
|
|
180
|
-
function __values(o) {
|
|
181
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
182
|
-
if (m)
|
|
183
|
-
return m.call(o);
|
|
184
|
-
if (o && typeof o.length === "number")
|
|
185
|
-
return {
|
|
186
|
-
next: function () {
|
|
187
|
-
if (o && i >= o.length)
|
|
188
|
-
o = void 0;
|
|
189
|
-
return { value: o && o[i++], done: !o };
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
193
|
-
}
|
|
194
|
-
function __read(o, n) {
|
|
195
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
196
|
-
if (!m)
|
|
197
|
-
return o;
|
|
198
|
-
var i = m.call(o), r, ar = [], e;
|
|
199
|
-
try {
|
|
200
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
201
|
-
ar.push(r.value);
|
|
202
|
-
}
|
|
203
|
-
catch (error) {
|
|
204
|
-
e = { error: error };
|
|
205
|
-
}
|
|
206
|
-
finally {
|
|
207
|
-
try {
|
|
208
|
-
if (r && !r.done && (m = i["return"]))
|
|
209
|
-
m.call(i);
|
|
210
|
-
}
|
|
211
|
-
finally {
|
|
212
|
-
if (e)
|
|
213
|
-
throw e.error;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
return ar;
|
|
217
|
-
}
|
|
218
|
-
/** @deprecated */
|
|
219
|
-
function __spread() {
|
|
220
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
221
|
-
ar = ar.concat(__read(arguments[i]));
|
|
222
|
-
return ar;
|
|
223
|
-
}
|
|
224
|
-
/** @deprecated */
|
|
225
|
-
function __spreadArrays() {
|
|
226
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
227
|
-
s += arguments[i].length;
|
|
228
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
229
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
230
|
-
r[k] = a[j];
|
|
231
|
-
return r;
|
|
232
|
-
}
|
|
233
|
-
function __spreadArray(to, from) {
|
|
234
|
-
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
235
|
-
to[j] = from[i];
|
|
236
|
-
return to;
|
|
237
|
-
}
|
|
238
|
-
function __await(v) {
|
|
239
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
240
|
-
}
|
|
241
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
242
|
-
if (!Symbol.asyncIterator)
|
|
243
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
244
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
245
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
246
|
-
function verb(n) { if (g[n])
|
|
247
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
248
|
-
function resume(n, v) { try {
|
|
249
|
-
step(g[n](v));
|
|
250
|
-
}
|
|
251
|
-
catch (e) {
|
|
252
|
-
settle(q[0][3], e);
|
|
253
|
-
} }
|
|
254
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
255
|
-
function fulfill(value) { resume("next", value); }
|
|
256
|
-
function reject(value) { resume("throw", value); }
|
|
257
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
258
|
-
resume(q[0][0], q[0][1]); }
|
|
259
|
-
}
|
|
260
|
-
function __asyncDelegator(o) {
|
|
261
|
-
var i, p;
|
|
262
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
263
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
264
|
-
}
|
|
265
|
-
function __asyncValues(o) {
|
|
266
|
-
if (!Symbol.asyncIterator)
|
|
267
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
268
|
-
var m = o[Symbol.asyncIterator], i;
|
|
269
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
270
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
271
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
272
|
-
}
|
|
273
|
-
function __makeTemplateObject(cooked, raw) {
|
|
274
|
-
if (Object.defineProperty) {
|
|
275
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
276
|
-
}
|
|
277
|
-
else {
|
|
278
|
-
cooked.raw = raw;
|
|
279
|
-
}
|
|
280
|
-
return cooked;
|
|
281
|
-
}
|
|
282
|
-
;
|
|
283
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
284
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
285
|
-
}) : function (o, v) {
|
|
286
|
-
o["default"] = v;
|
|
287
|
-
};
|
|
288
|
-
function __importStar(mod) {
|
|
289
|
-
if (mod && mod.__esModule)
|
|
290
|
-
return mod;
|
|
291
|
-
var result = {};
|
|
292
|
-
if (mod != null)
|
|
293
|
-
for (var k in mod)
|
|
294
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
295
|
-
__createBinding(result, mod, k);
|
|
296
|
-
__setModuleDefault(result, mod);
|
|
297
|
-
return result;
|
|
298
|
-
}
|
|
299
|
-
function __importDefault(mod) {
|
|
300
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
301
|
-
}
|
|
302
|
-
function __classPrivateFieldGet(receiver, privateMap) {
|
|
303
|
-
if (!privateMap.has(receiver)) {
|
|
304
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
305
|
-
}
|
|
306
|
-
return privateMap.get(receiver);
|
|
307
|
-
}
|
|
308
|
-
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
309
|
-
if (!privateMap.has(receiver)) {
|
|
310
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
311
|
-
}
|
|
312
|
-
privateMap.set(receiver, value);
|
|
313
|
-
return value;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
function pessimisticUpdate(opts) {
|
|
317
|
-
return function (source) {
|
|
318
|
-
return source.pipe(mapActionAndState(), operators.concatMap(runWithErrorHandling(opts.run, opts.onError)));
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
function optimisticUpdate(opts) {
|
|
322
|
-
return function (source) {
|
|
323
|
-
return source.pipe(mapActionAndState(), operators.concatMap(runWithErrorHandling(opts.run, opts.undoAction)));
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
function fetch(opts) {
|
|
327
|
-
return function (source) {
|
|
328
|
-
if (opts.id) {
|
|
329
|
-
var groupedFetches = source.pipe(mapActionAndState(), operators.groupBy(function (_a) {
|
|
330
|
-
var _b = __read(_a, 2), action = _b[0], store = _b[1];
|
|
331
|
-
return opts.id(action, store);
|
|
332
|
-
}));
|
|
333
|
-
return groupedFetches.pipe(operators.mergeMap(function (pairs) { return pairs.pipe(operators.switchMap(runWithErrorHandling(opts.run, opts.onError))); }));
|
|
334
|
-
}
|
|
335
|
-
return source.pipe(mapActionAndState(), operators.concatMap(runWithErrorHandling(opts.run, opts.onError)));
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
function navigation(component, opts) {
|
|
339
|
-
return function (source) {
|
|
340
|
-
var nav = source.pipe(mapActionAndState(), operators.filter(function (_a) {
|
|
341
|
-
var _b = __read(_a, 2), action = _b[0], state = _b[1];
|
|
342
|
-
return isStateSnapshot(action);
|
|
343
|
-
}), operators.map(function (_a) {
|
|
344
|
-
var _b = __read(_a, 2), action = _b[0], state = _b[1];
|
|
345
|
-
if (!isStateSnapshot(action)) {
|
|
346
|
-
// Because of the above filter we'll never get here,
|
|
347
|
-
// but this properly type narrows `action`
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
return [
|
|
351
|
-
findSnapshot(component, action.payload.routerState.root),
|
|
352
|
-
state,
|
|
353
|
-
];
|
|
354
|
-
}), operators.filter(function (_a) {
|
|
355
|
-
var _b = __read(_a, 2), snapshot = _b[0], state = _b[1];
|
|
356
|
-
return !!snapshot;
|
|
357
|
-
}));
|
|
358
|
-
return nav.pipe(operators.switchMap(runWithErrorHandling(opts.run, opts.onError)));
|
|
359
|
-
};
|
|
360
|
-
}
|
|
361
|
-
function isStateSnapshot(action) {
|
|
362
|
-
return action.type === routerStore.ROUTER_NAVIGATION;
|
|
363
|
-
}
|
|
364
|
-
function runWithErrorHandling(run, onError) {
|
|
365
|
-
return function (_a) {
|
|
366
|
-
var _b = __read(_a, 2), action = _b[0], state = _b[1];
|
|
367
|
-
try {
|
|
368
|
-
var r = wrapIntoObservable(run(action, state));
|
|
369
|
-
return r.pipe(operators.catchError(function (e) { return wrapIntoObservable(onError(action, e)); }));
|
|
370
|
-
}
|
|
371
|
-
catch (e) {
|
|
372
|
-
return wrapIntoObservable(onError(action, e));
|
|
373
|
-
}
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
/**
|
|
377
|
-
* @whatItDoes maps Observable<Action | [Action, State]> to
|
|
378
|
-
* Observable<[Action, State]>
|
|
379
|
-
*/
|
|
380
|
-
function mapActionAndState() {
|
|
381
|
-
return function (source) {
|
|
382
|
-
return source.pipe(operators.map(function (value) {
|
|
383
|
-
var _a = __read(normalizeActionAndState(value), 2), action = _a[0], store = _a[1];
|
|
384
|
-
return [action, store];
|
|
385
|
-
}));
|
|
386
|
-
};
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
* @whatItDoes Normalizes either a bare action or an array of action and state
|
|
390
|
-
* into an array of action and state (or undefined)
|
|
391
|
-
*/
|
|
392
|
-
function normalizeActionAndState(args) {
|
|
393
|
-
var _a;
|
|
394
|
-
var action, state;
|
|
395
|
-
if (args instanceof Array) {
|
|
396
|
-
_a = __read(args, 2), action = _a[0], state = _a[1];
|
|
397
|
-
}
|
|
398
|
-
else {
|
|
399
|
-
action = args;
|
|
400
|
-
}
|
|
401
|
-
return [action, state];
|
|
402
|
-
}
|
|
403
|
-
/**
|
|
404
|
-
* @whatItDoes Provides convenience methods for implementing common operations of persisting data.
|
|
405
|
-
*/
|
|
406
|
-
var DataPersistence = /** @class */ (function () {
|
|
407
|
-
function DataPersistence(store, actions) {
|
|
408
|
-
this.store = store;
|
|
409
|
-
this.actions = actions;
|
|
410
|
-
}
|
|
411
|
-
/**
|
|
412
|
-
*
|
|
413
|
-
* @whatItDoes Handles pessimistic updates (updating the server first).
|
|
414
|
-
*
|
|
415
|
-
* Update the server implemented naively suffers from race conditions and poor error handling.
|
|
416
|
-
*
|
|
417
|
-
* `pessimisticUpdate` addresses these problems--it runs all fetches in order, which removes race conditions
|
|
418
|
-
* and forces the developer to handle errors.
|
|
419
|
-
*
|
|
420
|
-
* ## Example:
|
|
421
|
-
*
|
|
422
|
-
* ```typescript
|
|
423
|
-
* @Injectable()
|
|
424
|
-
* class TodoEffects {
|
|
425
|
-
* @Effect() updateTodo = this.s.pessimisticUpdate<UpdateTodo>('UPDATE_TODO', {
|
|
426
|
-
* // provides an action and the current state of the store
|
|
427
|
-
* run(a, state) {
|
|
428
|
-
* // update the backend first, and then dispatch an action that will
|
|
429
|
-
* // update the client side
|
|
430
|
-
* return this.backend(state.user, a.payload).map(updated => ({
|
|
431
|
-
* type: 'TODO_UPDATED',
|
|
432
|
-
* payload: updated
|
|
433
|
-
* }));
|
|
434
|
-
* },
|
|
435
|
-
*
|
|
436
|
-
* onError(a, e: any) {
|
|
437
|
-
* // we don't need to undo the changes on the client side.
|
|
438
|
-
* // we can dispatch an error, or simply log the error here and return `null`
|
|
439
|
-
* return null;
|
|
440
|
-
* }
|
|
441
|
-
* });
|
|
442
|
-
*
|
|
443
|
-
* constructor(private s: DataPersistence<TodosState>, private backend: Backend) {}
|
|
444
|
-
* }
|
|
445
|
-
* ```
|
|
446
|
-
*
|
|
447
|
-
* Note that if you don't return a new action from the run callback, you must set the dispatch property
|
|
448
|
-
* of the effect to false, like this:
|
|
449
|
-
*
|
|
450
|
-
* ```
|
|
451
|
-
* class TodoEffects {
|
|
452
|
-
* @Effect({dispatch: false})
|
|
453
|
-
* updateTodo; //...
|
|
454
|
-
* }
|
|
455
|
-
* ```
|
|
456
|
-
*/
|
|
457
|
-
DataPersistence.prototype.pessimisticUpdate = function (actionType, opts) {
|
|
458
|
-
return this.actions.pipe(effects.ofType(actionType), operators.withLatestFrom(this.store), pessimisticUpdate(opts));
|
|
459
|
-
};
|
|
460
|
-
/**
|
|
461
|
-
*
|
|
462
|
-
* @whatItDoes Handles optimistic updates (updating the client first).
|
|
463
|
-
*
|
|
464
|
-
* `optimisticUpdate` addresses these problems--it runs all fetches in order, which removes race conditions
|
|
465
|
-
* and forces the developer to handle errors.
|
|
466
|
-
*
|
|
467
|
-
* `optimisticUpdate` is different from `pessimisticUpdate`. In case of a failure, when using `optimisticUpdate`,
|
|
468
|
-
* the developer already updated the state locally, so the developer must provide an undo action.
|
|
469
|
-
*
|
|
470
|
-
* The error handling must be done in the callback, or by means of the undo action.
|
|
471
|
-
*
|
|
472
|
-
* ## Example:
|
|
473
|
-
*
|
|
474
|
-
* ```typescript
|
|
475
|
-
* @Injectable()
|
|
476
|
-
* class TodoEffects {
|
|
477
|
-
* @Effect() updateTodo = this.s.optimisticUpdate<UpdateTodo>('UPDATE_TODO', {
|
|
478
|
-
* // provides an action and the current state of the store
|
|
479
|
-
* run: (a, state) => {
|
|
480
|
-
* return this.backend(state.user, a.payload);
|
|
481
|
-
* },
|
|
482
|
-
*
|
|
483
|
-
* undoAction: (a, e: any) => {
|
|
484
|
-
* // dispatch an undo action to undo the changes in the client state
|
|
485
|
-
* return ({
|
|
486
|
-
* type: 'UNDO_UPDATE_TODO',
|
|
487
|
-
* payload: a
|
|
488
|
-
* });
|
|
489
|
-
* }
|
|
490
|
-
* });
|
|
491
|
-
*
|
|
492
|
-
* constructor(private s: DataPersistence<TodosState>, private backend: Backend) {}
|
|
493
|
-
* }
|
|
494
|
-
* ```
|
|
495
|
-
*
|
|
496
|
-
* Note that if you don't return a new action from the run callback, you must set the dispatch property
|
|
497
|
-
* of the effect to false, like this:
|
|
498
|
-
*
|
|
499
|
-
* ```
|
|
500
|
-
* class TodoEffects {
|
|
501
|
-
* @Effect({dispatch: false})
|
|
502
|
-
* updateTodo; //...
|
|
503
|
-
* }
|
|
504
|
-
* ```
|
|
505
|
-
*/
|
|
506
|
-
DataPersistence.prototype.optimisticUpdate = function (actionType, opts) {
|
|
507
|
-
return this.actions.pipe(effects.ofType(actionType), operators.withLatestFrom(this.store), optimisticUpdate(opts));
|
|
508
|
-
};
|
|
509
|
-
/**
|
|
510
|
-
*
|
|
511
|
-
* @whatItDoes Handles data fetching.
|
|
512
|
-
*
|
|
513
|
-
* Data fetching implemented naively suffers from race conditions and poor error handling.
|
|
514
|
-
*
|
|
515
|
-
* `fetch` addresses these problems--it runs all fetches in order, which removes race conditions
|
|
516
|
-
* and forces the developer to handle errors.
|
|
517
|
-
*
|
|
518
|
-
* ## Example:
|
|
519
|
-
*
|
|
520
|
-
* ```typescript
|
|
521
|
-
* @Injectable()
|
|
522
|
-
* class TodoEffects {
|
|
523
|
-
* @Effect() loadTodos = this.s.fetch<GetTodos>('GET_TODOS', {
|
|
524
|
-
* // provides an action and the current state of the store
|
|
525
|
-
* run: (a, state) => {
|
|
526
|
-
* return this.backend(state.user, a.payload).map(r => ({
|
|
527
|
-
* type: 'TODOS',
|
|
528
|
-
* payload: r
|
|
529
|
-
* });
|
|
530
|
-
* },
|
|
531
|
-
*
|
|
532
|
-
* onError: (a, e: any) => {
|
|
533
|
-
* // dispatch an undo action to undo the changes in the client state
|
|
534
|
-
* }
|
|
535
|
-
* });
|
|
536
|
-
*
|
|
537
|
-
* constructor(private s: DataPersistence<TodosState>, private backend: Backend) {}
|
|
538
|
-
* }
|
|
539
|
-
* ```
|
|
540
|
-
*
|
|
541
|
-
* This is correct, but because it set the concurrency to 1, it may not be performant.
|
|
542
|
-
*
|
|
543
|
-
* To fix that, you can provide the `id` function, like this:
|
|
544
|
-
*
|
|
545
|
-
* ```typescript
|
|
546
|
-
* @Injectable()
|
|
547
|
-
* class TodoEffects {
|
|
548
|
-
* @Effect() loadTodo = this.s.fetch<GetTodo>('GET_TODO', {
|
|
549
|
-
* id: (a, state) => {
|
|
550
|
-
* return a.payload.id;
|
|
551
|
-
* }
|
|
552
|
-
*
|
|
553
|
-
* // provides an action and the current state of the store
|
|
554
|
-
* run: (a, state) => {
|
|
555
|
-
* return this.backend(state.user, a.payload).map(r => ({
|
|
556
|
-
* type: 'TODO',
|
|
557
|
-
* payload: r
|
|
558
|
-
* });
|
|
559
|
-
* },
|
|
560
|
-
*
|
|
561
|
-
* onError: (a, e: any) => {
|
|
562
|
-
* // dispatch an undo action to undo the changes in the client state
|
|
563
|
-
* return null;
|
|
564
|
-
* }
|
|
565
|
-
* });
|
|
566
|
-
*
|
|
567
|
-
* constructor(private s: DataPersistence<TodosState>, private backend: Backend) {}
|
|
568
|
-
* }
|
|
569
|
-
* ```
|
|
570
|
-
*
|
|
571
|
-
* With this setup, the requests for Todo 1 will run concurrently with the requests for Todo 2.
|
|
572
|
-
*
|
|
573
|
-
* In addition, if DataPersistence notices that there are multiple requests for Todo 1 scheduled,
|
|
574
|
-
* it will only run the last one.
|
|
575
|
-
*/
|
|
576
|
-
DataPersistence.prototype.fetch = function (actionType, opts) {
|
|
577
|
-
return this.actions.pipe(effects.ofType(actionType), operators.withLatestFrom(this.store), fetch(opts));
|
|
578
|
-
};
|
|
579
|
-
/**
|
|
580
|
-
* @whatItDoes Handles data fetching as part of router navigation.
|
|
581
|
-
*
|
|
582
|
-
* Data fetching implemented naively suffers from race conditions and poor error handling.
|
|
583
|
-
*
|
|
584
|
-
* `navigation` addresses these problems.
|
|
585
|
-
*
|
|
586
|
-
* It checks if an activated router state contains the passed in component type, and, if it does, runs the `run`
|
|
587
|
-
* callback. It provides the activated snapshot associated with the component and the current state. And it only runs
|
|
588
|
-
* the last request.
|
|
589
|
-
*
|
|
590
|
-
* ## Example:
|
|
591
|
-
*
|
|
592
|
-
* ```typescript
|
|
593
|
-
* @Injectable()
|
|
594
|
-
* class TodoEffects {
|
|
595
|
-
* @Effect() loadTodo = this.s.navigation(TodoComponent, {
|
|
596
|
-
* run: (a, state) => {
|
|
597
|
-
* return this.backend.fetchTodo(a.params['id']).map(todo => ({
|
|
598
|
-
* type: 'TODO_LOADED',
|
|
599
|
-
* payload: todo
|
|
600
|
-
* }));
|
|
601
|
-
* },
|
|
602
|
-
* onError: (a, e: any) => {
|
|
603
|
-
* // we can log and error here and return null
|
|
604
|
-
* // we can also navigate back
|
|
605
|
-
* return null;
|
|
606
|
-
* }
|
|
607
|
-
* });
|
|
608
|
-
* constructor(private s: DataPersistence<TodosState>, private backend: Backend) {}
|
|
609
|
-
* }
|
|
610
|
-
* ```
|
|
611
|
-
*/
|
|
612
|
-
DataPersistence.prototype.navigation = function (component, opts) {
|
|
613
|
-
return this.actions.pipe(operators.withLatestFrom(this.store), navigation(component, opts));
|
|
614
|
-
};
|
|
615
|
-
return DataPersistence;
|
|
616
|
-
}());
|
|
617
|
-
DataPersistence.decorators = [
|
|
618
|
-
{ type: core.Injectable }
|
|
619
|
-
];
|
|
620
|
-
DataPersistence.ctorParameters = function () { return [
|
|
621
|
-
{ type: store.Store },
|
|
622
|
-
{ type: effects.Actions }
|
|
623
|
-
]; };
|
|
624
|
-
function findSnapshot(component, s) {
|
|
625
|
-
var e_1, _a;
|
|
626
|
-
if (s.routeConfig && s.routeConfig.component === component) {
|
|
627
|
-
return s;
|
|
628
|
-
}
|
|
629
|
-
try {
|
|
630
|
-
for (var _b = __values(s.children), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
631
|
-
var c = _c.value;
|
|
632
|
-
var ss = findSnapshot(component, c);
|
|
633
|
-
if (ss) {
|
|
634
|
-
return ss;
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
639
|
-
finally {
|
|
640
|
-
try {
|
|
641
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
642
|
-
}
|
|
643
|
-
finally { if (e_1) throw e_1.error; }
|
|
644
|
-
}
|
|
645
|
-
return null;
|
|
646
|
-
}
|
|
647
|
-
function wrapIntoObservable(obj) {
|
|
648
|
-
if (rxjs.isObservable(obj)) {
|
|
649
|
-
return obj;
|
|
650
|
-
}
|
|
651
|
-
else if (!obj) {
|
|
652
|
-
return rxjs.of();
|
|
653
|
-
}
|
|
654
|
-
else {
|
|
655
|
-
return rxjs.of(obj);
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
/**
|
|
660
|
-
* @whatItDoes Provides services for enterprise Angular applications.
|
|
661
|
-
*
|
|
662
|
-
* See {@link DataPersistence} for more information.
|
|
663
|
-
*/
|
|
664
|
-
var NxModule = /** @class */ (function () {
|
|
665
|
-
function NxModule() {
|
|
666
|
-
}
|
|
667
|
-
NxModule.forRoot = function () {
|
|
668
|
-
return { ngModule: NxModule, providers: [DataPersistence] };
|
|
669
|
-
};
|
|
670
|
-
return NxModule;
|
|
671
|
-
}());
|
|
672
|
-
NxModule.decorators = [
|
|
673
|
-
{ type: core.NgModule, args: [{},] }
|
|
674
|
-
];
|
|
675
|
-
|
|
676
|
-
/**
|
|
677
|
-
* Generated bundle index. Do not edit.
|
|
678
|
-
*/
|
|
679
|
-
|
|
680
|
-
exports.DataPersistence = DataPersistence;
|
|
681
|
-
exports.NxModule = NxModule;
|
|
682
|
-
exports.fetch = fetch;
|
|
683
|
-
exports.navigation = navigation;
|
|
684
|
-
exports.optimisticUpdate = optimisticUpdate;
|
|
685
|
-
exports.pessimisticUpdate = pessimisticUpdate;
|
|
686
|
-
|
|
687
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
688
|
-
|
|
689
|
-
})));
|
|
690
|
-
//# sourceMappingURL=nrwl-angular.umd.js.map
|