@o3r/core 10.0.0-next.9 → 11.0.0-next.0
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 +38 -13
- package/builders/app-version/index.d.ts.map +1 -1
- package/builders/app-version/index.js +1 -1
- package/builders/app-version/index.js.map +1 -1
- package/builders/app-version/schema.json +1 -1
- package/builders/lib-build/schema.json +1 -1
- package/builders/multi-watcher/schema.json +1 -1
- package/builders/ngc/schema.json +1 -1
- package/builders/pattern-replacement/index.d.ts.map +1 -1
- package/builders/pattern-replacement/index.js +5 -5
- package/builders/pattern-replacement/index.js.map +1 -1
- package/builders/pattern-replacement/schema.json +1 -1
- package/builders/run-script/index.d.ts +4 -0
- package/builders/run-script/index.d.ts.map +1 -0
- package/builders/run-script/index.js +34 -0
- package/builders/run-script/index.js.map +1 -0
- package/builders/run-script/schema.d.ts +6 -0
- package/builders/run-script/schema.d.ts.map +1 -0
- package/{schematics/library → builders/run-script}/schema.js.map +1 -1
- package/builders/run-script/schema.json +15 -0
- package/builders.json +5 -0
- package/collection.json +0 -23
- package/core/application/dgp.interfaces.d.ts +6 -3
- package/core/application/dgp.interfaces.d.ts.map +1 -1
- package/core/devkit/devtools.interface.d.ts +16 -2
- package/core/devkit/devtools.interface.d.ts.map +1 -1
- package/core/index.d.ts +1 -0
- package/core/index.d.ts.map +1 -1
- package/core/index.js +1 -0
- package/core/index.js.map +1 -1
- package/core/interfaces/configuration.d.ts +39 -17
- package/core/interfaces/configuration.d.ts.map +1 -1
- package/core/interfaces/index.d.ts +0 -3
- package/core/interfaces/index.d.ts.map +1 -1
- package/core/interfaces/index.js +0 -3
- package/core/interfaces/index.js.map +1 -1
- package/core/metadata/component.decorator.d.ts +0 -1
- package/core/metadata/component.decorator.d.ts.map +1 -1
- package/core/metadata/component.decorator.js +0 -1
- package/core/metadata/component.decorator.js.map +1 -1
- package/core/metadata/component.identifier.d.ts +7 -0
- package/core/metadata/component.identifier.d.ts.map +1 -0
- package/core/metadata/component.identifier.js +9 -0
- package/core/metadata/component.identifier.js.map +1 -0
- package/core/metadata/index.d.ts +1 -0
- package/core/metadata/index.d.ts.map +1 -1
- package/core/metadata/index.js +1 -0
- package/core/metadata/index.js.map +1 -1
- package/core/rules-engine/index.d.ts +2 -0
- package/core/rules-engine/index.d.ts.map +1 -0
- package/core/rules-engine/index.js +2 -0
- package/core/rules-engine/index.js.map +1 -0
- package/core/rules-engine/rules-engine.interfaces.d.ts +24 -0
- package/core/rules-engine/rules-engine.interfaces.d.ts.map +1 -0
- package/core/rules-engine/rules-engine.interfaces.js +2 -0
- package/core/rules-engine/rules-engine.interfaces.js.map +1 -0
- package/esm2022/core/application/dgp.interfaces.mjs +1 -1
- package/esm2022/core/devkit/devtools.interface.mjs +1 -1
- package/esm2022/core/index.mjs +2 -1
- package/esm2022/core/interfaces/configuration.mjs +1 -1
- package/esm2022/core/interfaces/index.mjs +1 -4
- package/esm2022/core/metadata/component.decorator.mjs +1 -2
- package/esm2022/core/metadata/component.identifier.mjs +9 -0
- package/esm2022/core/metadata/index.mjs +2 -1
- package/esm2022/core/rules-engine/index.mjs +2 -0
- package/esm2022/core/rules-engine/rules-engine.interfaces.mjs +2 -0
- package/esm2022/log/logger.mjs +1 -1
- package/esm2022/messages/message.helpers.mjs +1 -5
- package/esm2022/store/async/async-entity.adapter.mjs +1 -2
- package/esm2022/store/async/async.adapter.mjs +1 -1
- package/esm2022/store/async/async.helpers.mjs +1 -4
- package/esm2022/store/async/async.operators.mjs +3 -4
- package/esm2022/store/async/async.serializer.mjs +1 -4
- package/esm2022/store/index.mjs +1 -2
- package/esm2022/utils/debug/debug.helper.mjs +1 -3
- package/esm2022/utils/deep-fill/deep-fill.mjs +23 -28
- package/esm2022/utils/rendering/rendering.helpers.mjs +1 -2
- package/fesm2022/o3r-core.mjs +47 -169
- package/fesm2022/o3r-core.mjs.map +1 -1
- package/log/logger.d.ts +0 -5
- package/log/logger.d.ts.map +1 -1
- package/messages/message.helpers.d.ts +0 -3
- package/messages/message.helpers.d.ts.map +1 -1
- package/messages/message.helpers.js +0 -4
- package/messages/message.helpers.js.map +1 -1
- package/migration.json +5 -0
- package/package.json +46 -39
- package/schematics/add-modules/index.d.ts +1 -2
- package/schematics/add-modules/index.d.ts.map +1 -1
- package/schematics/add-modules/index.js +16 -9
- package/schematics/add-modules/index.js.map +1 -1
- package/schematics/add-modules/schema.d.ts +5 -1
- package/schematics/add-modules/schema.d.ts.map +1 -1
- package/schematics/add-modules/schema.json +14 -4
- package/schematics/component/container/index.d.ts +0 -1
- package/schematics/component/container/index.d.ts.map +1 -1
- package/schematics/component/container/index.js +1 -3
- package/schematics/component/container/index.js.map +1 -1
- package/schematics/component/container/schema.json +1 -1
- package/schematics/component/index.d.ts.map +1 -1
- package/schematics/component/index.js +5 -2
- package/schematics/component/index.js.map +1 -1
- package/schematics/component/presenter/index.d.ts +0 -1
- package/schematics/component/presenter/index.d.ts.map +1 -1
- package/schematics/component/presenter/index.js +9 -9
- package/schematics/component/presenter/index.js.map +1 -1
- package/schematics/component/presenter/schema.json +4 -3
- package/schematics/component/schema.json +4 -4
- package/schematics/component/structures.types.d.ts +3 -2
- package/schematics/component/structures.types.d.ts.map +1 -1
- package/schematics/component/structures.types.js +1 -0
- package/schematics/component/structures.types.js.map +1 -1
- package/schematics/context-to-component/index.d.ts.map +1 -1
- package/schematics/context-to-component/index.js +1 -1
- package/schematics/context-to-component/index.js.map +1 -1
- package/schematics/context-to-component/schema.json +1 -1
- package/schematics/convert-component/index.js +2 -2
- package/schematics/convert-component/index.js.map +1 -1
- package/schematics/convert-component/schema.json +1 -1
- package/schematics/ng-add/index.d.ts.map +1 -1
- package/schematics/ng-add/index.js +30 -31
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/project-setup/index.d.ts +0 -1
- package/schematics/ng-add/project-setup/index.d.ts.map +1 -1
- package/schematics/ng-add/project-setup/index.js +16 -65
- package/schematics/ng-add/project-setup/index.js.map +1 -1
- package/schematics/ng-add/schema.d.ts +7 -46
- package/schematics/ng-add/schema.d.ts.map +1 -1
- package/schematics/ng-add/schema.json +16 -86
- package/schematics/ng-add/updates-for-v8/cms-adapters/update-builders-names.d.ts.map +1 -1
- package/schematics/ng-add/updates-for-v8/cms-adapters/update-builders-names.js +7 -3
- package/schematics/ng-add/updates-for-v8/cms-adapters/update-builders-names.js.map +1 -1
- package/schematics/ng-add/updates-for-v8/generators/update-generators-names.d.ts.map +1 -1
- package/schematics/ng-add/updates-for-v8/generators/update-generators-names.js +7 -2
- package/schematics/ng-add/updates-for-v8/generators/update-generators-names.js.map +1 -1
- package/schematics/ng-add-create/schema.json +1 -1
- package/schematics/ng-add-create/templates/schematics/ng-add/schema.json.template +2 -2
- package/schematics/ng-update/index.d.ts +4 -0
- package/schematics/ng-update/index.d.ts.map +1 -1
- package/schematics/ng-update/index.js +14 -1
- package/schematics/ng-update/index.js.map +1 -1
- package/schematics/ng-update/v10.0/configuration.d.ts +9 -0
- package/schematics/ng-update/v10.0/configuration.d.ts.map +1 -0
- package/schematics/ng-update/v10.0/configuration.js +23 -0
- package/schematics/ng-update/v10.0/configuration.js.map +1 -0
- package/schematics/page/index.d.ts +0 -1
- package/schematics/page/index.d.ts.map +1 -1
- package/schematics/page/index.js +6 -11
- package/schematics/page/index.js.map +1 -1
- package/schematics/page/schema.json +1 -1
- package/schematics/renovate/schema.json +1 -1
- package/schematics/renovate/templates/azure-pipelines.ugrade.yml +1 -1
- package/schematics/rule-factories/additional-modules/index.d.ts +0 -1
- package/schematics/rule-factories/additional-modules/index.d.ts.map +1 -1
- package/schematics/rule-factories/additional-modules/index.js +14 -18
- package/schematics/rule-factories/additional-modules/index.js.map +1 -1
- package/schematics/rule-factories/component/common.js +2 -2
- package/schematics/rule-factories/component/common.js.map +1 -1
- package/schematics/rule-factories/customization-environment/index.d.ts +0 -1
- package/schematics/rule-factories/customization-environment/index.d.ts.map +1 -1
- package/schematics/rule-factories/customization-environment/index.js +9 -30
- package/schematics/rule-factories/customization-environment/index.js.map +1 -1
- package/schematics/rule-factories/index.d.ts +0 -3
- package/schematics/rule-factories/index.d.ts.map +1 -1
- package/schematics/rule-factories/index.js +0 -3
- package/schematics/rule-factories/index.js.map +1 -1
- package/schematics/rule-factories/o3r-basic-updates/index.d.ts +1 -2
- package/schematics/rule-factories/o3r-basic-updates/index.d.ts.map +1 -1
- package/schematics/rule-factories/o3r-basic-updates/index.js +7 -4
- package/schematics/rule-factories/o3r-basic-updates/index.js.map +1 -1
- package/schematics/rule-factories/otter-environment/index.d.ts +0 -1
- package/schematics/rule-factories/otter-environment/index.d.ts.map +1 -1
- package/schematics/rule-factories/otter-environment/index.js +8 -13
- package/schematics/rule-factories/otter-environment/index.js.map +1 -1
- package/schematics/rule-factories/store/index.d.ts.map +1 -1
- package/schematics/rule-factories/store/index.js +30 -13
- package/schematics/rule-factories/store/index.js.map +1 -1
- package/schematics/schematics-update/schema.json +1 -1
- package/schematics/service/index.d.ts +0 -1
- package/schematics/service/index.d.ts.map +1 -1
- package/schematics/service/index.js +1 -2
- package/schematics/service/index.js.map +1 -1
- package/schematics/service/schema.json +1 -1
- package/schematics/shared/presets/all.preset.d.ts +10 -0
- package/schematics/shared/presets/all.preset.d.ts.map +1 -0
- package/schematics/shared/presets/all.preset.js +40 -0
- package/schematics/shared/presets/all.preset.js.map +1 -0
- package/schematics/shared/presets/external.preset.d.ts +10 -0
- package/schematics/shared/presets/external.preset.d.ts.map +1 -0
- package/schematics/shared/presets/external.preset.js +25 -0
- package/schematics/shared/presets/external.preset.js.map +1 -0
- package/schematics/shared/presets/helpers.js +1 -1
- package/schematics/shared/presets/helpers.js.map +1 -1
- package/schematics/shared/presets/index.d.ts +1 -0
- package/schematics/shared/presets/index.d.ts.map +1 -1
- package/schematics/shared/presets/index.js +4 -1
- package/schematics/shared/presets/index.js.map +1 -1
- package/schematics/show-modules/index.d.ts +1 -2
- package/schematics/show-modules/index.d.ts.map +1 -1
- package/schematics/show-modules/index.js +3 -5
- package/schematics/show-modules/index.js.map +1 -1
- package/schematics/show-modules/schema.json +1 -1
- package/schematics/store/entity-async/index.d.ts.map +1 -1
- package/schematics/store/entity-async/index.js +4 -0
- package/schematics/store/entity-async/index.js.map +1 -1
- package/schematics/store/entity-async/schema.json +1 -1
- package/schematics/store/entity-async/templates/__storeName@dasherize__.state.ts +1 -1
- package/schematics/store/entity-sync/index.d.ts.map +1 -1
- package/schematics/store/entity-sync/index.js +4 -0
- package/schematics/store/entity-sync/index.js.map +1 -1
- package/schematics/store/entity-sync/schema.json +1 -1
- package/schematics/store/entity-sync/templates/__storeName@dasherize__.state.ts +1 -1
- package/schematics/store/schema.json +1 -1
- package/schematics/store/simple-async/index.d.ts.map +1 -1
- package/schematics/store/simple-async/index.js +2 -0
- package/schematics/store/simple-async/index.js.map +1 -1
- package/schematics/store/simple-async/schema.json +1 -1
- package/schematics/store/simple-sync/index.d.ts.map +1 -1
- package/schematics/store/simple-sync/index.js +1 -0
- package/schematics/store/simple-sync/index.js.map +1 -1
- package/schematics/store/simple-sync/schema.json +1 -1
- package/schematics/store-action/schema.json +1 -1
- package/store/async/async-entity.adapter.d.ts +0 -8
- package/store/async/async-entity.adapter.d.ts.map +1 -1
- package/store/async/async-entity.adapter.js +0 -1
- package/store/async/async-entity.adapter.js.map +1 -1
- package/store/async/async.adapter.d.ts +0 -13
- package/store/async/async.adapter.d.ts.map +1 -1
- package/store/async/async.adapter.js.map +1 -1
- package/store/async/async.helpers.d.ts +0 -3
- package/store/async/async.helpers.d.ts.map +1 -1
- package/store/async/async.helpers.js +0 -3
- package/store/async/async.helpers.js.map +1 -1
- package/store/async/async.operators.d.ts +2 -3
- package/store/async/async.operators.d.ts.map +1 -1
- package/store/async/async.operators.js +2 -3
- package/store/async/async.operators.js.map +1 -1
- package/store/async/async.serializer.d.ts +0 -3
- package/store/async/async.serializer.d.ts.map +1 -1
- package/store/async/async.serializer.js +0 -3
- package/store/async/async.serializer.js.map +1 -1
- package/store/index.d.ts +0 -1
- package/store/index.d.ts.map +1 -1
- package/store/index.js +0 -1
- package/store/index.js.map +1 -1
- package/utils/debug/debug.helper.d.ts +0 -2
- package/utils/debug/debug.helper.d.ts.map +1 -1
- package/utils/debug/debug.helper.js +0 -2
- package/utils/debug/debug.helper.js.map +1 -1
- package/utils/deep-fill/deep-fill.d.ts +17 -12
- package/utils/deep-fill/deep-fill.d.ts.map +1 -1
- package/utils/deep-fill/deep-fill.js +22 -27
- package/utils/deep-fill/deep-fill.js.map +1 -1
- package/utils/rendering/rendering.helpers.d.ts +0 -1
- package/utils/rendering/rendering.helpers.d.ts.map +1 -1
- package/utils/rendering/rendering.helpers.js +0 -1
- package/utils/rendering/rendering.helpers.js.map +1 -1
- package/builders/package.json +0 -3
- package/core/interfaces/block.d.ts +0 -9
- package/core/interfaces/block.d.ts.map +0 -1
- package/core/interfaces/block.js +0 -2
- package/core/interfaces/block.js.map +0 -1
- package/core/interfaces/exposed-component.d.ts +0 -10
- package/core/interfaces/exposed-component.d.ts.map +0 -1
- package/core/interfaces/exposed-component.js +0 -2
- package/core/interfaces/exposed-component.js.map +0 -1
- package/core/interfaces/page.d.ts +0 -9
- package/core/interfaces/page.d.ts.map +0 -1
- package/core/interfaces/page.js +0 -2
- package/core/interfaces/page.js.map +0 -1
- package/esm2022/core/interfaces/block.mjs +0 -2
- package/esm2022/core/interfaces/exposed-component.mjs +0 -2
- package/esm2022/core/interfaces/page.mjs +0 -2
- package/esm2022/store/storage/index.mjs +0 -2
- package/esm2022/store/storage/store-sync.mjs +0 -111
- package/schematics/application/index.d.ts +0 -9
- package/schematics/application/index.d.ts.map +0 -1
- package/schematics/application/index.js +0 -68
- package/schematics/application/index.js.map +0 -1
- package/schematics/application/schema.d.ts +0 -14
- package/schematics/application/schema.d.ts.map +0 -1
- package/schematics/application/schema.js.map +0 -1
- package/schematics/application/schema.json +0 -38
- package/schematics/application/templates/package.json.template +0 -29
- package/schematics/library/index.d.ts +0 -9
- package/schematics/library/index.d.ts.map +0 -1
- package/schematics/library/index.js +0 -41
- package/schematics/library/index.js.map +0 -1
- package/schematics/library/rules/rules.ng.d.ts +0 -11
- package/schematics/library/rules/rules.ng.d.ts.map +0 -1
- package/schematics/library/rules/rules.ng.js +0 -113
- package/schematics/library/rules/rules.ng.js.map +0 -1
- package/schematics/library/rules/rules.nx.d.ts +0 -10
- package/schematics/library/rules/rules.nx.d.ts.map +0 -1
- package/schematics/library/rules/rules.nx.js +0 -126
- package/schematics/library/rules/rules.nx.js.map +0 -1
- package/schematics/library/rules/shared.d.ts +0 -19
- package/schematics/library/rules/shared.d.ts.map +0 -1
- package/schematics/library/rules/shared.js +0 -84
- package/schematics/library/rules/shared.js.map +0 -1
- package/schematics/library/schema.d.ts +0 -18
- package/schematics/library/schema.d.ts.map +0 -1
- package/schematics/library/schema.js +0 -3
- package/schematics/library/schema.json +0 -51
- package/schematics/library/templates/ng/.eslintrc.js.template +0 -19
- package/schematics/library/templates/ng/.gitignore.template +0 -2
- package/schematics/library/templates/ng/.npmignore.template +0 -0
- package/schematics/library/templates/ng/jest.config.js.template +0 -37
- package/schematics/library/templates/ng/testing/setup-jest.ts.template +0 -2
- package/schematics/library/templates/ng/tsconfig.builders.json.template +0 -22
- package/schematics/library/templates/ng/tsconfig.eslint.json.template +0 -8
- package/schematics/library/templates/ng/tsconfig.json.template +0 -12
- package/schematics/library/templates/ng/tsconfig.spec.json.template +0 -17
- package/schematics/library/templates/nx/.eslintrc.js.template +0 -19
- package/schematics/library/templates/nx/.gitignore.template +0 -2
- package/schematics/library/templates/nx/.npmignore.template +0 -0
- package/schematics/library/templates/nx/jest.config.js.template +0 -37
- package/schematics/library/templates/nx/project.json.template +0 -66
- package/schematics/library/templates/nx/testing/setup-jest.ts.template +0 -2
- package/schematics/library/templates/nx/tsconfig.eslint.json.template +0 -8
- package/schematics/package.json +0 -3
- package/schematics/rule-factories/azure-pipeline/index.d.ts +0 -14
- package/schematics/rule-factories/azure-pipeline/index.d.ts.map +0 -1
- package/schematics/rule-factories/azure-pipeline/index.js +0 -64
- package/schematics/rule-factories/azure-pipeline/index.js.map +0 -1
- package/schematics/rule-factories/azure-pipeline/templates/azure/scripts/e2e/attach-files-to-test-results.js.template +0 -147
- package/schematics/rule-factories/azure-pipeline/templates/azure/scripts/e2e/compute-deployment-service-url.js.template +0 -20
- package/schematics/rule-factories/azure-pipeline/templates/azure/scripts/e2e/gen-pckg-json-e2e.js.template +0 -15
- package/schematics/rule-factories/azure-pipeline/templates/azure/scripts/e2e/get-app-version.js.template +0 -36
- package/schematics/rule-factories/azure-pipeline/templates/azure/scripts/e2e/get-major-minor.js.template +0 -8
- package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/allure.yml.template +0 -24
- package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/cascading.yml.template +0 -8
- package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/publish.yml.template +0 -14
- package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/set-version-tag.yml.template +0 -13
- package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/setup.yml.template +0 -21
- package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/versioning.yml.template +0 -8
- package/schematics/rule-factories/azure-pipeline/templates/azure-pipelines.yml.template +0 -252
- package/schematics/rule-factories/module-list/index.d.ts +0 -11
- package/schematics/rule-factories/module-list/index.d.ts.map +0 -1
- package/schematics/rule-factories/module-list/index.js +0 -45
- package/schematics/rule-factories/module-list/index.js.map +0 -1
- package/schematics/rule-factories/monorepo/index.d.ts +0 -16
- package/schematics/rule-factories/monorepo/index.d.ts.map +0 -1
- package/schematics/rule-factories/monorepo/index.js +0 -65
- package/schematics/rule-factories/monorepo/index.js.map +0 -1
- package/schematics/rule-factories/renovate/index.d.ts +0 -8
- package/schematics/rule-factories/renovate/index.d.ts.map +0 -1
- package/schematics/rule-factories/renovate/index.js +0 -27
- package/schematics/rule-factories/renovate/index.js.map +0 -1
- package/schematics/rule-factories/renovate/templates/__dot__renovaterc.json.template +0 -61
- package/schematics/sdk/index.d.ts +0 -8
- package/schematics/sdk/index.d.ts.map +0 -1
- package/schematics/sdk/index.js +0 -62
- package/schematics/sdk/index.js.map +0 -1
- package/schematics/sdk/rules/clean-standalone.rule.d.ts +0 -7
- package/schematics/sdk/rules/clean-standalone.rule.d.ts.map +0 -1
- package/schematics/sdk/rules/clean-standalone.rule.js +0 -28
- package/schematics/sdk/rules/clean-standalone.rule.js.map +0 -1
- package/schematics/sdk/rules/rules.ng.d.ts +0 -11
- package/schematics/sdk/rules/rules.ng.d.ts.map +0 -1
- package/schematics/sdk/rules/rules.ng.js +0 -38
- package/schematics/sdk/rules/rules.ng.js.map +0 -1
- package/schematics/sdk/rules/rules.nx.d.ts +0 -11
- package/schematics/sdk/rules/rules.nx.d.ts.map +0 -1
- package/schematics/sdk/rules/rules.nx.js +0 -60
- package/schematics/sdk/rules/rules.nx.js.map +0 -1
- package/schematics/sdk/rules/update-ts-paths.rule.d.ts +0 -10
- package/schematics/sdk/rules/update-ts-paths.rule.d.ts.map +0 -1
- package/schematics/sdk/rules/update-ts-paths.rule.js +0 -41
- package/schematics/sdk/rules/update-ts-paths.rule.js.map +0 -1
- package/schematics/sdk/schema.d.ts +0 -19
- package/schematics/sdk/schema.d.ts.map +0 -1
- package/schematics/sdk/schema.js +0 -3
- package/schematics/sdk/schema.js.map +0 -1
- package/schematics/sdk/schema.json +0 -46
- package/schematics/sdk/templates/jest.config.js.template +0 -12
- package/schematics/store/common/mocks/example-module.d.ts +0 -2
- package/schematics/store/common/mocks/example-module.d.ts.map +0 -1
- package/schematics/store/common/mocks/example-module.js +0 -40
- package/schematics/store/common/mocks/example-module.js.map +0 -1
- package/schematics/store/common/mocks/index.d.ts +0 -2
- package/schematics/store/common/mocks/index.d.ts.map +0 -1
- package/schematics/store/common/mocks/index.js +0 -12
- package/schematics/store/common/mocks/index.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-actions.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-actions.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-actions.js +0 -82
- package/schematics/store/entity-async/mocks/example-actions.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-effect-spec.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-effect-spec.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-effect-spec.js +0 -45
- package/schematics/store/entity-async/mocks/example-effect-spec.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-effect.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-effect.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-effect.js +0 -72
- package/schematics/store/entity-async/mocks/example-effect.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-reducer-spec.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-reducer-spec.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-reducer-spec.js +0 -127
- package/schematics/store/entity-async/mocks/example-reducer-spec.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-reducer.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-reducer.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-reducer.js +0 -69
- package/schematics/store/entity-async/mocks/example-reducer.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-selectors-spec.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-selectors-spec.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-selectors-spec.js +0 -16
- package/schematics/store/entity-async/mocks/example-selectors-spec.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-selectors.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-selectors.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-selectors.js +0 -28
- package/schematics/store/entity-async/mocks/example-selectors.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-state.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-state.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-state.js +0 -39
- package/schematics/store/entity-async/mocks/example-state.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-sync.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-sync.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-sync.js +0 -29
- package/schematics/store/entity-async/mocks/example-sync.js.map +0 -1
- package/schematics/store/entity-sync/mocks/example-actions.d.ts +0 -2
- package/schematics/store/entity-sync/mocks/example-actions.d.ts.map +0 -1
- package/schematics/store/entity-sync/mocks/example-actions.js +0 -56
- package/schematics/store/entity-sync/mocks/example-actions.js.map +0 -1
- package/schematics/store/entity-sync/mocks/example-reducer-spec.d.ts +0 -2
- package/schematics/store/entity-sync/mocks/example-reducer-spec.d.ts.map +0 -1
- package/schematics/store/entity-sync/mocks/example-reducer-spec.js +0 -85
- package/schematics/store/entity-sync/mocks/example-reducer-spec.js.map +0 -1
- package/schematics/store/entity-sync/mocks/example-reducer.d.ts +0 -2
- package/schematics/store/entity-sync/mocks/example-reducer.d.ts.map +0 -1
- package/schematics/store/entity-sync/mocks/example-reducer.js +0 -51
- package/schematics/store/entity-sync/mocks/example-reducer.js.map +0 -1
- package/schematics/store/entity-sync/mocks/example-selectors-spec.d.ts +0 -2
- package/schematics/store/entity-sync/mocks/example-selectors-spec.d.ts.map +0 -1
- package/schematics/store/entity-sync/mocks/example-selectors-spec.js +0 -10
- package/schematics/store/entity-sync/mocks/example-selectors-spec.js.map +0 -1
- package/schematics/store/entity-sync/mocks/example-selectors.d.ts +0 -2
- package/schematics/store/entity-sync/mocks/example-selectors.d.ts.map +0 -1
- package/schematics/store/entity-sync/mocks/example-selectors.js +0 -25
- package/schematics/store/entity-sync/mocks/example-selectors.js.map +0 -1
- package/schematics/store/entity-sync/mocks/example-state.d.ts +0 -2
- package/schematics/store/entity-sync/mocks/example-state.d.ts.map +0 -1
- package/schematics/store/entity-sync/mocks/example-state.js +0 -37
- package/schematics/store/entity-sync/mocks/example-state.js.map +0 -1
- package/schematics/store/simple-async/mocks/example-actions.d.ts +0 -2
- package/schematics/store/simple-async/mocks/example-actions.d.ts.map +0 -1
- package/schematics/store/simple-async/mocks/example-actions.js +0 -56
- package/schematics/store/simple-async/mocks/example-actions.js.map +0 -1
- package/schematics/store/simple-async/mocks/example-effect-spec.d.ts +0 -2
- package/schematics/store/simple-async/mocks/example-effect-spec.d.ts.map +0 -1
- package/schematics/store/simple-async/mocks/example-effect-spec.js +0 -45
- package/schematics/store/simple-async/mocks/example-effect-spec.js.map +0 -1
- package/schematics/store/simple-async/mocks/example-effect.d.ts +0 -2
- package/schematics/store/simple-async/mocks/example-effect.d.ts.map +0 -1
- package/schematics/store/simple-async/mocks/example-effect.js +0 -54
- package/schematics/store/simple-async/mocks/example-effect.js.map +0 -1
- package/schematics/store/simple-async/mocks/example-reducer-spec.d.ts +0 -2
- package/schematics/store/simple-async/mocks/example-reducer-spec.d.ts.map +0 -1
- package/schematics/store/simple-async/mocks/example-reducer-spec.js +0 -58
- package/schematics/store/simple-async/mocks/example-reducer-spec.js.map +0 -1
- package/schematics/store/simple-async/mocks/example-reducer.d.ts +0 -2
- package/schematics/store/simple-async/mocks/example-reducer.d.ts.map +0 -1
- package/schematics/store/simple-async/mocks/example-reducer.js +0 -46
- package/schematics/store/simple-async/mocks/example-reducer.js.map +0 -1
- package/schematics/store/simple-async/mocks/example-state.d.ts +0 -2
- package/schematics/store/simple-async/mocks/example-state.d.ts.map +0 -1
- package/schematics/store/simple-async/mocks/example-state.js +0 -39
- package/schematics/store/simple-async/mocks/example-state.js.map +0 -1
- package/schematics/store/simple-async/mocks/example-sync.d.ts +0 -2
- package/schematics/store/simple-async/mocks/example-sync.d.ts.map +0 -1
- package/schematics/store/simple-async/mocks/example-sync.js +0 -22
- package/schematics/store/simple-async/mocks/example-sync.js.map +0 -1
- package/schematics/store/simple-sync/mocks/example-actions.d.ts +0 -2
- package/schematics/store/simple-sync/mocks/example-actions.d.ts.map +0 -1
- package/schematics/store/simple-sync/mocks/example-actions.js +0 -28
- package/schematics/store/simple-sync/mocks/example-actions.js.map +0 -1
- package/schematics/store/simple-sync/mocks/example-reducer-spec.d.ts +0 -2
- package/schematics/store/simple-sync/mocks/example-reducer-spec.d.ts.map +0 -1
- package/schematics/store/simple-sync/mocks/example-reducer-spec.js +0 -38
- package/schematics/store/simple-sync/mocks/example-reducer-spec.js.map +0 -1
- package/schematics/store/simple-sync/mocks/example-reducer.d.ts +0 -2
- package/schematics/store/simple-sync/mocks/example-reducer.d.ts.map +0 -1
- package/schematics/store/simple-sync/mocks/example-reducer.js +0 -32
- package/schematics/store/simple-sync/mocks/example-reducer.js.map +0 -1
- package/schematics/store/simple-sync/mocks/example-state.d.ts +0 -2
- package/schematics/store/simple-sync/mocks/example-state.d.ts.map +0 -1
- package/schematics/store/simple-sync/mocks/example-state.js +0 -22
- package/schematics/store/simple-sync/mocks/example-state.js.map +0 -1
- package/store/storage/index.d.ts +0 -2
- package/store/storage/index.d.ts.map +0 -1
- package/store/storage/index.js +0 -2
- package/store/storage/index.js.map +0 -1
- package/store/storage/store-sync.d.ts +0 -113
- package/store/storage/store-sync.d.ts.map +0 -1
- package/store/storage/store-sync.js +0 -111
- package/store/storage/store-sync.js.map +0 -1
- /package/{schematics/application → builders/run-script}/schema.js +0 -0
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.syncSimpleActionsContent = void 0;
|
|
4
|
-
exports.syncSimpleActionsContent = `import {createAction, props} from '@ngrx/store';
|
|
5
|
-
import {ExampleState} from './example.state';
|
|
6
|
-
|
|
7
|
-
/** StateDetailsActions */
|
|
8
|
-
const ACTION_SET = '[Example] set';
|
|
9
|
-
const ACTION_UPDATE = '[Example] update';
|
|
10
|
-
const ACTION_RESET = '[Example] reset';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Clear the current store object and replace it with the new one
|
|
14
|
-
*/
|
|
15
|
-
export const setExample = createAction(ACTION_SET, props<{model: ExampleState}>());
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Change a part or the whole object in the store.
|
|
19
|
-
*/
|
|
20
|
-
export const updateExample = createAction(ACTION_UPDATE, props<Partial<{model: ExampleState}>>());
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Clear the whole state, return to the initial one
|
|
24
|
-
*/
|
|
25
|
-
export const resetExample = createAction(ACTION_RESET);
|
|
26
|
-
|
|
27
|
-
`;
|
|
28
|
-
//# sourceMappingURL=example-actions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-actions.js","sourceRoot":"","sources":["../../../../../schematics/store/simple-sync/mocks/example-actions.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuBvC,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const syncSimpleReducerSpecContent = "import * as actions from './example.actions';\nimport {exampleInitialState, exampleReducer} from './example.reducer';\nimport {ExampleState} from './example.state';\n\ndescribe('Example Store reducer', () => {\n\n const simpleState: ExampleState = {};\n const firstExample: any = {id: 'example1', genericItems: []};\n const secondExample: any = {id: 'example2', genericItems: []};\n\n it('should by default return the initial state', () => {\n const state = exampleReducer(exampleInitialState, {type: 'fake'} as any);\n expect(state).toEqual(exampleInitialState);\n });\n\n describe('Actions on state details ', () => {\n\n it('SET action should clear current cart state details and return a state with the new one', () => {\n const firstState = exampleReducer(simpleState, actions.setExample({model : firstExample}));\n expect(firstState.model!.id).toEqual('example1');\n });\n\n it('UPDATE should update the state details without modifying entities', () => {\n const firstState = exampleReducer({model : firstExample}, actions.updateExample({model : secondExample}));\n expect(firstState.model!.id).toEqual('example2');\n });\n\n it('RESET action should return initial state', () => {\n const state = exampleReducer(simpleState, actions.resetExample());\n expect(state).toEqual(exampleInitialState);\n });\n });\n});\n";
|
|
2
|
-
//# sourceMappingURL=example-reducer-spec.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-reducer-spec.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/simple-sync/mocks/example-reducer-spec.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,02CAiCxC,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.syncSimpleReducerSpecContent = void 0;
|
|
4
|
-
exports.syncSimpleReducerSpecContent = `import * as actions from './example.actions';
|
|
5
|
-
import {exampleInitialState, exampleReducer} from './example.reducer';
|
|
6
|
-
import {ExampleState} from './example.state';
|
|
7
|
-
|
|
8
|
-
describe('Example Store reducer', () => {
|
|
9
|
-
|
|
10
|
-
const simpleState: ExampleState = {};
|
|
11
|
-
const firstExample: any = {id: 'example1', genericItems: []};
|
|
12
|
-
const secondExample: any = {id: 'example2', genericItems: []};
|
|
13
|
-
|
|
14
|
-
it('should by default return the initial state', () => {
|
|
15
|
-
const state = exampleReducer(exampleInitialState, {type: 'fake'} as any);
|
|
16
|
-
expect(state).toEqual(exampleInitialState);
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
describe('Actions on state details ', () => {
|
|
20
|
-
|
|
21
|
-
it('SET action should clear current cart state details and return a state with the new one', () => {
|
|
22
|
-
const firstState = exampleReducer(simpleState, actions.setExample({model : firstExample}));
|
|
23
|
-
expect(firstState.model!.id).toEqual('example1');
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it('UPDATE should update the state details without modifying entities', () => {
|
|
27
|
-
const firstState = exampleReducer({model : firstExample}, actions.updateExample({model : secondExample}));
|
|
28
|
-
expect(firstState.model!.id).toEqual('example2');
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it('RESET action should return initial state', () => {
|
|
32
|
-
const state = exampleReducer(simpleState, actions.resetExample());
|
|
33
|
-
expect(state).toEqual(exampleInitialState);
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
`;
|
|
38
|
-
//# sourceMappingURL=example-reducer-spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-reducer-spec.js","sourceRoot":"","sources":["../../../../../schematics/store/simple-sync/mocks/example-reducer-spec.ts"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC3C,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const syncSimpleReducerContent = "import {ActionCreator, createReducer, on, ReducerTypes} from '@ngrx/store';\nimport * as actions from './example.actions';\nimport {ExampleState} from './example.state';\n\n/**\n * example initial state\n */\nexport const exampleInitialState: ExampleState = {};\n\n/**\n * List of basic actions for Example Store\n */\nexport const exampleReducerFeatures: ReducerTypes<ExampleState, ActionCreator[]>[] = [\n on(actions.setExample, (_state, payload) => ({...payload.model})),\n\n on(actions.updateExample, (state, payload) => ({...state, ...payload.model})),\n\n on(actions.resetExample, () => exampleInitialState)\n];\n\n/**\n * Example Store reducer\n */\nexport const exampleReducer = createReducer(\n exampleInitialState,\n ...exampleReducerFeatures\n);\n";
|
|
2
|
-
//# sourceMappingURL=example-reducer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-reducer.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/simple-sync/mocks/example-reducer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,gwBA2BpC,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.syncSimpleReducerContent = void 0;
|
|
4
|
-
exports.syncSimpleReducerContent = `import {ActionCreator, createReducer, on, ReducerTypes} from '@ngrx/store';
|
|
5
|
-
import * as actions from './example.actions';
|
|
6
|
-
import {ExampleState} from './example.state';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* example initial state
|
|
10
|
-
*/
|
|
11
|
-
export const exampleInitialState: ExampleState = {};
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* List of basic actions for Example Store
|
|
15
|
-
*/
|
|
16
|
-
export const exampleReducerFeatures: ReducerTypes<ExampleState, ActionCreator[]>[] = [
|
|
17
|
-
on(actions.setExample, (_state, payload) => ({...payload.model})),
|
|
18
|
-
|
|
19
|
-
on(actions.updateExample, (state, payload) => ({...state, ...payload.model})),
|
|
20
|
-
|
|
21
|
-
on(actions.resetExample, () => exampleInitialState)
|
|
22
|
-
];
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Example Store reducer
|
|
26
|
-
*/
|
|
27
|
-
export const exampleReducer = createReducer(
|
|
28
|
-
exampleInitialState,
|
|
29
|
-
...exampleReducerFeatures
|
|
30
|
-
);
|
|
31
|
-
`;
|
|
32
|
-
//# sourceMappingURL=example-reducer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-reducer.js","sourceRoot":"","sources":["../../../../../schematics/store/simple-sync/mocks/example-reducer.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BvC,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const syncSimpleStateContent = "/**\n * Example store state\n */\nexport interface ExampleState {}\n\n/**\n * Name of the Example Store\n */\nexport const EXAMPLE_STORE_NAME = 'example';\n\n/**\n * Example Store Interface\n */\nexport interface ExampleStore {\n /** Example state */\n [EXAMPLE_STORE_NAME]: ExampleState;\n}\n";
|
|
2
|
-
//# sourceMappingURL=example-state.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-state.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/simple-sync/mocks/example-state.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,4SAiBlC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.syncSimpleStateContent = void 0;
|
|
4
|
-
exports.syncSimpleStateContent = `/**
|
|
5
|
-
* Example store state
|
|
6
|
-
*/
|
|
7
|
-
export interface ExampleState {}
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Name of the Example Store
|
|
11
|
-
*/
|
|
12
|
-
export const EXAMPLE_STORE_NAME = 'example';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Example Store Interface
|
|
16
|
-
*/
|
|
17
|
-
export interface ExampleStore {
|
|
18
|
-
/** Example state */
|
|
19
|
-
[EXAMPLE_STORE_NAME]: ExampleState;
|
|
20
|
-
}
|
|
21
|
-
`;
|
|
22
|
-
//# sourceMappingURL=example-state.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-state.js","sourceRoot":"","sources":["../../../../../schematics/store/simple-sync/mocks/example-state.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG;;;;;;;;;;;;;;;;;CAiBrC,CAAC"}
|
package/store/storage/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/storage/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
package/store/storage/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/storage/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { LocalStorageConfig } from 'ngrx-store-localstorage';
|
|
2
|
-
import { Serializer } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Format of a key in `StoreSyncConfig`
|
|
5
|
-
*
|
|
6
|
-
* @deprecated will be removed in v10, use the one exported by @o3r/store-sync instead
|
|
7
|
-
*/
|
|
8
|
-
export interface StoreSyncSerializers {
|
|
9
|
-
[storeName: string]: Serializer<any>;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Defines if an object is a Serializer
|
|
13
|
-
*
|
|
14
|
-
* @deprecated will be removed in v10, use the one exported by @o3r/store-sync instead
|
|
15
|
-
* @param obj Object to test
|
|
16
|
-
* @returns True if the object is a Serializer
|
|
17
|
-
*/
|
|
18
|
-
export declare const isSerializer: (obj: any) => obj is Serializer<any>;
|
|
19
|
-
/**
|
|
20
|
-
* An interface defining the configuration attributes to bootstrap `storeSyncMetaReducer`
|
|
21
|
-
*
|
|
22
|
-
* @deprecated will be removed in v10, use the one exported by @o3r/store-sync instead
|
|
23
|
-
*/
|
|
24
|
-
export interface StoreSyncConfig {
|
|
25
|
-
/** State keys to sync with storage */
|
|
26
|
-
keys: StoreSyncSerializers[];
|
|
27
|
-
/** Pull initial state from storage on startup */
|
|
28
|
-
rehydrate?: boolean;
|
|
29
|
-
/** Specify an object that conforms to the Storage interface to use, this will default to localStorage */
|
|
30
|
-
storage?: Storage;
|
|
31
|
-
/** When set, sync to storage will only occur when this function returns a true boolean */
|
|
32
|
-
syncCondition?: (state: any) => any;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Action to rehydrate the store
|
|
36
|
-
*
|
|
37
|
-
* @deprecated will be removed in v10, use the `rehydrateAction` exported by @o3r/store-sync instead
|
|
38
|
-
*/
|
|
39
|
-
export declare const rehydrate: import("@ngrx/store").ActionCreator<"[CapacitorRehydrater] rehydrate", (props: {
|
|
40
|
-
payload: Record<string, any>;
|
|
41
|
-
}) => {
|
|
42
|
-
payload: Record<string, any>;
|
|
43
|
-
} & import("@ngrx/store/src/models").TypedAction<"[CapacitorRehydrater] rehydrate">>;
|
|
44
|
-
/**
|
|
45
|
-
* Typings for async storage
|
|
46
|
-
*
|
|
47
|
-
* @deprecated will be removed in v10, use the one exported by @o3r/store-sync instead
|
|
48
|
-
*/
|
|
49
|
-
export type AsyncStorage = Omit<Storage, 'getItem'> & {
|
|
50
|
-
getItem(key: string): Promise<string | null>;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Options for async storage sync
|
|
54
|
-
*
|
|
55
|
-
* @deprecated will be removed in v10, use the one exported by @o3r/store-sync instead
|
|
56
|
-
*/
|
|
57
|
-
export interface AsyncStorageSyncOptions extends Omit<LocalStorageConfig, 'storage'> {
|
|
58
|
-
storage?: AsyncStorage;
|
|
59
|
-
}
|
|
60
|
-
interface Logger {
|
|
61
|
-
/**
|
|
62
|
-
* Log an error.
|
|
63
|
-
*
|
|
64
|
-
* @deprecated will be removed in v10, use the one exported by @o3r/store-sync instead
|
|
65
|
-
* @param message Message to log
|
|
66
|
-
* @param optionalParams Optional parameters to log
|
|
67
|
-
*/
|
|
68
|
-
error(message?: any, ...optionalParams: any[]): void;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Options for storage sync
|
|
72
|
-
*
|
|
73
|
-
* @deprecated will be removed in v10, use the one exported by @o3r/store-sync instead
|
|
74
|
-
*/
|
|
75
|
-
export type StorageSyncOptions = (LocalStorageConfig | AsyncStorageSyncOptions) & {
|
|
76
|
-
/**
|
|
77
|
-
* Optional logger to use for logging errors
|
|
78
|
-
*/
|
|
79
|
-
logger?: Logger;
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* Defines if the storage is a non-async storage
|
|
83
|
-
*
|
|
84
|
-
* @deprecated will be removed in v10, use the one exported by @o3r/store-sync instead
|
|
85
|
-
* @param options The storage config
|
|
86
|
-
* @returns in case the storage used is a non-async storage
|
|
87
|
-
*/
|
|
88
|
-
export declare const isLocalStorageConfig: (options: StorageSyncOptions) => options is LocalStorageConfig;
|
|
89
|
-
export declare class StorageSync {
|
|
90
|
-
private alreadyHydratedStoreSlices;
|
|
91
|
-
options: StorageSyncOptions;
|
|
92
|
-
private hasHydrated;
|
|
93
|
-
constructor(options?: Partial<StorageSyncOptions>);
|
|
94
|
-
/**
|
|
95
|
-
* Handle state manipulation in case of store storage sync
|
|
96
|
-
* Merge strategy is a full merge at init; When a new `store slice` is registered, its initial state is merged with its corresponding storage content
|
|
97
|
-
* Pass it as mergeReducer callback when calling localStorageSync function from 'ngrx-store-localstorage', in the app
|
|
98
|
-
*
|
|
99
|
-
* @deprecated will be removed in v10, use the one exported by @o3r/store-sync instead
|
|
100
|
-
* @param state actual state
|
|
101
|
-
* @param rehydratedState state from storage
|
|
102
|
-
* @param action Triggered action
|
|
103
|
-
*/
|
|
104
|
-
readonly mergeReducer: (state: any, rehydratedState: any, action: any) => any;
|
|
105
|
-
/**
|
|
106
|
-
* Returns a meta reducer that handles storage sync
|
|
107
|
-
*
|
|
108
|
-
* @deprecated will be removed in v10, use the one exported by @o3r/store-sync instead
|
|
109
|
-
*/
|
|
110
|
-
localStorageSync(): (reducer: any) => (state: any, action: any) => any;
|
|
111
|
-
}
|
|
112
|
-
export {};
|
|
113
|
-
//# sourceMappingURL=store-sync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"store-sync.d.ts","sourceRoot":"","sources":["../../../src/store/storage/store-sync.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAA4C,MAAM,yBAAyB,CAAC;AAEvG,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;CACtC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,QAAS,GAAG,2BAAoH,CAAC;AAE1J;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,IAAI,EAAE,oBAAoB,EAAE,CAAC;IAC7B,iDAAiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yGAAyG;IACzG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0FAA0F;IAC1F,aAAa,CAAC,EAAE,C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{ localStorageSync as ngrxLocalStorageSync } from 'ngrx-store-localstorage';
|
|
3
|
-
import { deepFill } from '../../utils';
|
|
4
|
-
/**
|
|
5
|
-
* Defines if an object is a Serializer
|
|
6
|
-
*
|
|
7
|
-
* @deprecated will be removed in v10, use the one exported by @o3r/store-sync instead
|
|
8
|
-
* @param obj Object to test
|
|
9
|
-
* @returns True if the object is a Serializer
|
|
10
|
-
*/
|
|
11
|
-
export const isSerializer = (obj) => !!(obj.serialize || obj.deserialize || obj.reviver || obj.replacer || obj.initialState);
|
|
12
|
-
/**
|
|
13
|
-
* Action to rehydrate the store
|
|
14
|
-
*
|
|
15
|
-
* @deprecated will be removed in v10, use the `rehydrateAction` exported by @o3r/store-sync instead
|
|
16
|
-
*/
|
|
17
|
-
export const rehydrate = createAction('[CapacitorRehydrater] rehydrate', props());
|
|
18
|
-
/**
|
|
19
|
-
* Defines if the storage is a non-async storage
|
|
20
|
-
*
|
|
21
|
-
* @deprecated will be removed in v10, use the one exported by @o3r/store-sync instead
|
|
22
|
-
* @param options The storage config
|
|
23
|
-
* @returns in case the storage used is a non-async storage
|
|
24
|
-
*/
|
|
25
|
-
export const isLocalStorageConfig = (options) => !options.storage || options.storage instanceof Storage;
|
|
26
|
-
export class StorageSync {
|
|
27
|
-
constructor(options) {
|
|
28
|
-
this.alreadyHydratedStoreSlices = new Set();
|
|
29
|
-
this.hasHydrated = false;
|
|
30
|
-
/**
|
|
31
|
-
* Handle state manipulation in case of store storage sync
|
|
32
|
-
* Merge strategy is a full merge at init; When a new `store slice` is registered, its initial state is merged with its corresponding storage content
|
|
33
|
-
* Pass it as mergeReducer callback when calling localStorageSync function from 'ngrx-store-localstorage', in the app
|
|
34
|
-
*
|
|
35
|
-
* @deprecated will be removed in v10, use the one exported by @o3r/store-sync instead
|
|
36
|
-
* @param state actual state
|
|
37
|
-
* @param rehydratedState state from storage
|
|
38
|
-
* @param action Triggered action
|
|
39
|
-
*/
|
|
40
|
-
this.mergeReducer = (state, rehydratedState, action) => {
|
|
41
|
-
if (rehydratedState) {
|
|
42
|
-
if (action.type === INIT) {
|
|
43
|
-
state = deepFill(state, rehydratedState);
|
|
44
|
-
}
|
|
45
|
-
if (action.type === UPDATE && Array.isArray(action.features)) {
|
|
46
|
-
const notHandledFeatures = action.features.filter((featName) => !this.alreadyHydratedStoreSlices.has(featName));
|
|
47
|
-
notHandledFeatures.filter((featName) => !!rehydratedState[featName]).forEach((fName) => {
|
|
48
|
-
state[fName] = state[fName] ? deepFill(state[fName], rehydratedState[fName]) : rehydratedState[fName];
|
|
49
|
-
this.alreadyHydratedStoreSlices.add(fName);
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return state;
|
|
54
|
-
};
|
|
55
|
-
this.options = {
|
|
56
|
-
keys: [],
|
|
57
|
-
...options,
|
|
58
|
-
mergeReducer: typeof options?.mergeReducer !== 'function' ? this.mergeReducer : options.mergeReducer
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Returns a meta reducer that handles storage sync
|
|
63
|
-
*
|
|
64
|
-
* @deprecated will be removed in v10, use the one exported by @o3r/store-sync instead
|
|
65
|
-
*/
|
|
66
|
-
localStorageSync() {
|
|
67
|
-
return (reducer) => {
|
|
68
|
-
if (isLocalStorageConfig(this.options)) {
|
|
69
|
-
return ngrxLocalStorageSync(this.options)(reducer);
|
|
70
|
-
}
|
|
71
|
-
const base = ngrxLocalStorageSync({
|
|
72
|
-
...this.options,
|
|
73
|
-
rehydrate: false,
|
|
74
|
-
storage: this.options.storage,
|
|
75
|
-
syncCondition: () => this.hasHydrated
|
|
76
|
-
})(reducer);
|
|
77
|
-
return (state, action) => {
|
|
78
|
-
let hydratedState = state;
|
|
79
|
-
if (action.type === rehydrate.type) {
|
|
80
|
-
const hasAlreadyHydrated = this.hasHydrated;
|
|
81
|
-
this.hasHydrated = true;
|
|
82
|
-
const initialStates = this.options.keys.reduce((acc, key) => {
|
|
83
|
-
const storeName = Object.keys(key)[0];
|
|
84
|
-
const storeSynchronizer = key[storeName];
|
|
85
|
-
if (isSerializer(storeSynchronizer)) {
|
|
86
|
-
acc[storeName] = storeSynchronizer.initialState;
|
|
87
|
-
}
|
|
88
|
-
return acc;
|
|
89
|
-
}, {});
|
|
90
|
-
let overrides = {};
|
|
91
|
-
if (!hasAlreadyHydrated) {
|
|
92
|
-
overrides = Object.entries(action.payload).reduce((acc, [storeName, value]) => {
|
|
93
|
-
if (!initialStates[storeName] || initialStates[storeName] === state[storeName]) {
|
|
94
|
-
acc[storeName] = value;
|
|
95
|
-
}
|
|
96
|
-
else if (initialStates[storeName] !== state[storeName]) {
|
|
97
|
-
(this.options.logger || console).error(`Unable to rehydrate store "${storeName}", it has been modified before being hydrated`);
|
|
98
|
-
}
|
|
99
|
-
return acc;
|
|
100
|
-
}, {});
|
|
101
|
-
}
|
|
102
|
-
if (Object.keys(overrides).length) {
|
|
103
|
-
hydratedState = { ...state, ...overrides };
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return base(hydratedState, action);
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
//# sourceMappingURL=store-sync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"store-sync.js","sourceRoot":"","sources":["../../../src/store/storage/store-sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAsB,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACvG,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAYvC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAQ,EAA0B,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,OAAO,IA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